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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e22be0e4d4338c4698cb88ed9300a8e8d7254453 | app/models/renalware/hd/session/dna.rb | app/models/renalware/hd/session/dna.rb | module Renalware
module HD
class Session::DNA < Session
def self.policy_class
DNASessionPolicy
end
def immutable?
return true unless persisted?
temporary_editing_window_has_elapsed?
end
private
def temporary_editing_window_has_elapsed?
delay = Renalware.config.delay_after_which_a_finished_session_becomes_immutable
(Time.zone.now - delay) > created_at
end
# DNA sessions have a nil jsonb `document` but to avoid clumsy nil? checks
# wherever session.documents are being used, always return a NullSessionDocument
# which will even allow you to do eg session.document.objecta.objectb.attribute1 without
# issue. Inspired by Avdi Grim's confident ruby approach and using his naught gem.
def document
super || NullSessionDocument.instance
end
end
end
end
| module Renalware
module HD
class Session::DNA < Session
def self.policy_class
DNASessionPolicy
end
def immutable?
return true unless persisted?
temporary_editing_window_has_elapsed?
end
private
def temporary_editing_window_has_elapsed?
delay = Renalware.config.delay_after_which_a_finished_session_becomes_immutable
(Time.zone.now - delay) > created_at
end
end
end
end
| Remove DNA null session document | Remove DNA null session document
Its causing issues elsewhere. Reinstate later,
| Ruby | mit | airslie/renalware-core,airslie/renalware-core,airslie/renalware-core,airslie/renalware-core | ruby | ## Code Before:
module Renalware
module HD
class Session::DNA < Session
def self.policy_class
DNASessionPolicy
end
def immutable?
return true unless persisted?
temporary_editing_window_has_elapsed?
end
private
def temporary_editing_window_has_elapsed?
delay = Renalware.config.delay_after_which_a_finished_session_becomes_immutable
(Time.zone.now - delay) > created_at
end
# DNA sessions have a nil jsonb `document` but to avoid clumsy nil? checks
# wherever session.documents are being used, always return a NullSessionDocument
# which will even allow you to do eg session.document.objecta.objectb.attribute1 without
# issue. Inspired by Avdi Grim's confident ruby approach and using his naught gem.
def document
super || NullSessionDocument.instance
end
end
end
end
## Instruction:
Remove DNA null session document
Its causing issues elsewhere. Reinstate later,
## Code After:
module Renalware
module HD
class Session::DNA < Session
def self.policy_class
DNASessionPolicy
end
def immutable?
return true unless persisted?
temporary_editing_window_has_elapsed?
end
private
def temporary_editing_window_has_elapsed?
delay = Renalware.config.delay_after_which_a_finished_session_becomes_immutable
(Time.zone.now - delay) > created_at
end
end
end
end
| module Renalware
module HD
class Session::DNA < Session
def self.policy_class
DNASessionPolicy
end
def immutable?
return true unless persisted?
temporary_editing_window_has_elapsed?
end
private
def temporary_editing_window_has_elapsed?
delay = Renalware.config.delay_after_which_a_finished_session_becomes_immutable
(Time.zone.now - delay) > created_at
end
-
- # DNA sessions have a nil jsonb `document` but to avoid clumsy nil? checks
- # wherever session.documents are being used, always return a NullSessionDocument
- # which will even allow you to do eg session.document.objecta.objectb.attribute1 without
- # issue. Inspired by Avdi Grim's confident ruby approach and using his naught gem.
- def document
- super || NullSessionDocument.instance
- end
end
end
end | 8 | 0.275862 | 0 | 8 |
30e742a56a04c8227f82db3d8e9da1808cb0526b | tests/integration/src/Graze/Monolog/LoggerBuilderIntegrationTest.php | tests/integration/src/Graze/Monolog/LoggerBuilderIntegrationTest.php | <?php
namespace Graze\Monolog;
use Monolog\Logger;
class LoggerBuilderIntegrationTest extends \PHPUnit_Framework_TestCase
{
public function setUp()
{
$this->builder = new LoggerBuilder();
}
public function testBuild()
{
$logger = $this->builder->build();
$this->assertSame(LoggerBuilder::DEFAULT_NAME, $logger->getName());
}
}
| <?php
namespace Graze\Monolog;
use Monolog\Logger;
class LoggerBuilderIntegrationTest extends \PHPUnit_Framework_TestCase
{
public function setUp()
{
$this->builder = new LoggerBuilder();
}
public function assertDefaultHandlers(Logger $logger)
{
$handlers = array();
do {
try {
$handlers[] = $handler = $logger->popHandler();
} catch (\Exception $e) {
}
} while (!isset($e));
$this->assertSame(array(), $handlers, 'There are more handlers defined than should be');
}
public function assertDefaultProcessors(Logger $logger)
{
$processors = array();
do {
try {
$processors[] = $processor = $logger->popProcessor();
} catch (\Exception $e) {
}
} while (!isset($e));
$this->assertInstanceOf('Graze\Monolog\Processor\ExceptionMessageProcessor', array_shift($processors));
$this->assertInstanceOf('Graze\Monolog\Processor\EnvironmentProcessor', array_shift($processors));
$this->assertInstanceOf('Graze\Monolog\Processor\HttpProcessor', array_shift($processors));
$this->assertSame(array(), $processors, 'There are more processors defined than should be');
}
public function testBuild()
{
$logger = $this->builder->build();
$this->assertSame(LoggerBuilder::DEFAULT_NAME, $logger->getName());
$this->assertDefaultHandlers($logger);
$this->assertDefaultProcessors($logger);
}
}
| Test default values are set on the built logger | Test default values are set on the built logger
| PHP | mit | Lead-iD/monolog-extensions,graze/monolog-extensions | php | ## Code Before:
<?php
namespace Graze\Monolog;
use Monolog\Logger;
class LoggerBuilderIntegrationTest extends \PHPUnit_Framework_TestCase
{
public function setUp()
{
$this->builder = new LoggerBuilder();
}
public function testBuild()
{
$logger = $this->builder->build();
$this->assertSame(LoggerBuilder::DEFAULT_NAME, $logger->getName());
}
}
## Instruction:
Test default values are set on the built logger
## Code After:
<?php
namespace Graze\Monolog;
use Monolog\Logger;
class LoggerBuilderIntegrationTest extends \PHPUnit_Framework_TestCase
{
public function setUp()
{
$this->builder = new LoggerBuilder();
}
public function assertDefaultHandlers(Logger $logger)
{
$handlers = array();
do {
try {
$handlers[] = $handler = $logger->popHandler();
} catch (\Exception $e) {
}
} while (!isset($e));
$this->assertSame(array(), $handlers, 'There are more handlers defined than should be');
}
public function assertDefaultProcessors(Logger $logger)
{
$processors = array();
do {
try {
$processors[] = $processor = $logger->popProcessor();
} catch (\Exception $e) {
}
} while (!isset($e));
$this->assertInstanceOf('Graze\Monolog\Processor\ExceptionMessageProcessor', array_shift($processors));
$this->assertInstanceOf('Graze\Monolog\Processor\EnvironmentProcessor', array_shift($processors));
$this->assertInstanceOf('Graze\Monolog\Processor\HttpProcessor', array_shift($processors));
$this->assertSame(array(), $processors, 'There are more processors defined than should be');
}
public function testBuild()
{
$logger = $this->builder->build();
$this->assertSame(LoggerBuilder::DEFAULT_NAME, $logger->getName());
$this->assertDefaultHandlers($logger);
$this->assertDefaultProcessors($logger);
}
}
| <?php
namespace Graze\Monolog;
use Monolog\Logger;
class LoggerBuilderIntegrationTest extends \PHPUnit_Framework_TestCase
{
public function setUp()
{
$this->builder = new LoggerBuilder();
}
+ public function assertDefaultHandlers(Logger $logger)
+ {
+ $handlers = array();
+ do {
+ try {
+ $handlers[] = $handler = $logger->popHandler();
+ } catch (\Exception $e) {
+ }
+ } while (!isset($e));
+
+ $this->assertSame(array(), $handlers, 'There are more handlers defined than should be');
+ }
+
+ public function assertDefaultProcessors(Logger $logger)
+ {
+ $processors = array();
+ do {
+ try {
+ $processors[] = $processor = $logger->popProcessor();
+ } catch (\Exception $e) {
+ }
+ } while (!isset($e));
+
+ $this->assertInstanceOf('Graze\Monolog\Processor\ExceptionMessageProcessor', array_shift($processors));
+ $this->assertInstanceOf('Graze\Monolog\Processor\EnvironmentProcessor', array_shift($processors));
+ $this->assertInstanceOf('Graze\Monolog\Processor\HttpProcessor', array_shift($processors));
+ $this->assertSame(array(), $processors, 'There are more processors defined than should be');
+ }
+
public function testBuild()
{
$logger = $this->builder->build();
$this->assertSame(LoggerBuilder::DEFAULT_NAME, $logger->getName());
+ $this->assertDefaultHandlers($logger);
+ $this->assertDefaultProcessors($logger);
}
} | 31 | 1.631579 | 31 | 0 |
e0490ccd8de93deb1af0a410dcf89190f5b609f9 | js/explore.js | js/explore.js | // take input string
// create empty output string
// remove last letter of input string
// add that letter to empty string
// keep doing this until the input string is empty
// return output string
function reverse(str) {
var newString = ""
for (var i = str.length; i > 0, i--)
newString += str[i]
} | // take input string
// create empty output string
// get the last letter of the input string
// add that letter to empty string
// keep doing this until we've gone through the entire input string
// return output string
function reverse(str) {
var newString = "";
for (var i = str.length-1; i >= 0; i--) {
newString += str[i]
}
console.log(newString);
return newString
}
// driver code to test program
var test1 = reverse("Ellie");
var test2 = reverse("elephant");
var test3 = reverse("unencumbered");
console.log(test1)
if (1==1) {
console.log(test2)
} | Add driver code to test function | Add driver code to test function
| JavaScript | mit | elliedori/phase-0-tracks,elliedori/phase-0-tracks,elliedori/phase-0-tracks | javascript | ## Code Before:
// take input string
// create empty output string
// remove last letter of input string
// add that letter to empty string
// keep doing this until the input string is empty
// return output string
function reverse(str) {
var newString = ""
for (var i = str.length; i > 0, i--)
newString += str[i]
}
## Instruction:
Add driver code to test function
## Code After:
// take input string
// create empty output string
// get the last letter of the input string
// add that letter to empty string
// keep doing this until we've gone through the entire input string
// return output string
function reverse(str) {
var newString = "";
for (var i = str.length-1; i >= 0; i--) {
newString += str[i]
}
console.log(newString);
return newString
}
// driver code to test program
var test1 = reverse("Ellie");
var test2 = reverse("elephant");
var test3 = reverse("unencumbered");
console.log(test1)
if (1==1) {
console.log(test2)
} | // take input string
// create empty output string
- // remove last letter of input string
? ^ ^^^
+ // get the last letter of the input string
? ^ ^^^^ ++++
// add that letter to empty string
- // keep doing this until the input string is empty
+ // keep doing this until we've gone through the entire input string
// return output string
+
function reverse(str) {
+
- var newString = ""
+ var newString = "";
? +
+
- for (var i = str.length; i > 0, i--)
? ^
+ for (var i = str.length-1; i >= 0; i--) {
? ++ + ^ ++
newString += str[i]
+ }
+
+ console.log(newString);
+ return newString
}
+
+
+ // driver code to test program
+
+ var test1 = reverse("Ellie");
+ var test2 = reverse("elephant");
+ var test3 = reverse("unencumbered");
+
+ console.log(test1)
+
+ if (1==1) {
+ console.log(test2)
+ } | 28 | 2.333333 | 24 | 4 |
8de284f26728b529642cc79fbac71edbe295c967 | .codacy.yaml | .codacy.yaml | ---
exclude_paths:
- "api-java/src/test/**/*.*"
- "client/src/test/**/*.*"
| ---
exclude_paths:
- "api-java/src/test/**/*.*"
- "client/src/test/**/*.*"
- "firebase-endpoint/src/test/**/*.*"
| Exclude tests from Codacy check. | Exclude tests from Codacy check.
| YAML | apache-2.0 | SpineEventEngine/todo-list,SpineEventEngine/todo-list,SpineEventEngine/todo-list,SpineEventEngine/todo-list,SpineEventEngine/todo-list,SpineEventEngine/todo-list | yaml | ## Code Before:
---
exclude_paths:
- "api-java/src/test/**/*.*"
- "client/src/test/**/*.*"
## Instruction:
Exclude tests from Codacy check.
## Code After:
---
exclude_paths:
- "api-java/src/test/**/*.*"
- "client/src/test/**/*.*"
- "firebase-endpoint/src/test/**/*.*"
| ---
exclude_paths:
- "api-java/src/test/**/*.*"
- "client/src/test/**/*.*"
+ - "firebase-endpoint/src/test/**/*.*" | 1 | 0.25 | 1 | 0 |
a9cc67b9defeffc76091bd204f230a431db80196 | traftrack/image.py | traftrack/image.py | import PIL.Image
import PIL.ImageMath
import urllib.request
from io import BytesIO
def load_img_url(url):
req = urllib.request.urlopen(url)
data = BytesIO(req.read())
return PIL.Image.open(data)
def load_img_file(fname):
return PIL.Image.open(fname)
def compute_histo_RYG(img, mask):
img = img.convert(mode='RGB')
mask = mask.convert(mode='1')
black = PIL.Image.new('RGB', mask.size, color=(0, 0, 0, 0))
masked = PIL.Image.composite(img, black, mask)
palette = PIL.Image.new('P', (1, 1))
palette.putpalette(
[0, 0, 0, # black
255, 0, 0, # red
255, 255, 0, # yellow
0, 255, 0]) # green
quantized = masked.quantize(palette=palette)
colors = quantized.getcolors()
return colors[1][0], colors[2][0], colors[3][0]
| import PIL.Image
import PIL.ImageMath
import urllib.request
from io import BytesIO
def load_img_url(url):
req = urllib.request.urlopen(url)
data = BytesIO(req.read())
return PIL.Image.open(data)
def load_img_file(fname):
return PIL.Image.open(fname)
def compute_histo_RYG(img, mask):
img = img.convert(mode='RGB')
mask = mask.convert(mode='1')
black = PIL.Image.new('RGB', mask.size, color=(0, 0, 0, 0))
masked = PIL.Image.composite(img, black, mask)
palette = PIL.Image.new('P', (1, 1))
palette.putpalette(
[0, 0, 0, # black
255, 0, 0, # red
255, 255, 0, # yellow
0, 255, 0]) # green
quantized = masked.quantize(palette=palette)
colors = quantized.getcolors()
r = next((c[0] for c in colors if c[1] == 1), 0)
y = next((c[0] for c in colors if c[1] == 2), 0)
g = next((c[0] for c in colors if c[1] == 3), 0)
return r, y, g
| Fix issue with non-existing color in compute_histo_RYG | Fix issue with non-existing color in compute_histo_RYG
| Python | mit | asavonic/traftrack | python | ## Code Before:
import PIL.Image
import PIL.ImageMath
import urllib.request
from io import BytesIO
def load_img_url(url):
req = urllib.request.urlopen(url)
data = BytesIO(req.read())
return PIL.Image.open(data)
def load_img_file(fname):
return PIL.Image.open(fname)
def compute_histo_RYG(img, mask):
img = img.convert(mode='RGB')
mask = mask.convert(mode='1')
black = PIL.Image.new('RGB', mask.size, color=(0, 0, 0, 0))
masked = PIL.Image.composite(img, black, mask)
palette = PIL.Image.new('P', (1, 1))
palette.putpalette(
[0, 0, 0, # black
255, 0, 0, # red
255, 255, 0, # yellow
0, 255, 0]) # green
quantized = masked.quantize(palette=palette)
colors = quantized.getcolors()
return colors[1][0], colors[2][0], colors[3][0]
## Instruction:
Fix issue with non-existing color in compute_histo_RYG
## Code After:
import PIL.Image
import PIL.ImageMath
import urllib.request
from io import BytesIO
def load_img_url(url):
req = urllib.request.urlopen(url)
data = BytesIO(req.read())
return PIL.Image.open(data)
def load_img_file(fname):
return PIL.Image.open(fname)
def compute_histo_RYG(img, mask):
img = img.convert(mode='RGB')
mask = mask.convert(mode='1')
black = PIL.Image.new('RGB', mask.size, color=(0, 0, 0, 0))
masked = PIL.Image.composite(img, black, mask)
palette = PIL.Image.new('P', (1, 1))
palette.putpalette(
[0, 0, 0, # black
255, 0, 0, # red
255, 255, 0, # yellow
0, 255, 0]) # green
quantized = masked.quantize(palette=palette)
colors = quantized.getcolors()
r = next((c[0] for c in colors if c[1] == 1), 0)
y = next((c[0] for c in colors if c[1] == 2), 0)
g = next((c[0] for c in colors if c[1] == 3), 0)
return r, y, g
| import PIL.Image
import PIL.ImageMath
import urllib.request
from io import BytesIO
def load_img_url(url):
req = urllib.request.urlopen(url)
data = BytesIO(req.read())
return PIL.Image.open(data)
def load_img_file(fname):
return PIL.Image.open(fname)
def compute_histo_RYG(img, mask):
img = img.convert(mode='RGB')
mask = mask.convert(mode='1')
black = PIL.Image.new('RGB', mask.size, color=(0, 0, 0, 0))
masked = PIL.Image.composite(img, black, mask)
palette = PIL.Image.new('P', (1, 1))
palette.putpalette(
[0, 0, 0, # black
255, 0, 0, # red
255, 255, 0, # yellow
0, 255, 0]) # green
quantized = masked.quantize(palette=palette)
colors = quantized.getcolors()
- return colors[1][0], colors[2][0], colors[3][0]
+ r = next((c[0] for c in colors if c[1] == 1), 0)
+ y = next((c[0] for c in colors if c[1] == 2), 0)
+ g = next((c[0] for c in colors if c[1] == 3), 0)
+
+ return r, y, g | 6 | 0.176471 | 5 | 1 |
cee330e9fd976475949013ae35153e866aee6feb | _posts/2017-02-04-binary-search-implementation-in-go.md | _posts/2017-02-04-binary-search-implementation-in-go.md | ---
layout: post
title: Implementation of Binary Search Algorithm in Go
---
Last few days, I am looking into the go programming language.It seems like to me the C programing language with less complexity.As a very beginner of the language, I tried to implement the basic binary search algorithm in go.
here is the code --
{% highlight go %}
package main
import "fmt"
func BinarySearch(arr [] int, x int) bool{
var lowerBound int = 0
var higherBound int = len(arr) - 1
for lowerBound <= higherBound {
var midPoint = lowerBound + (higherBound - lowerBound) /2
if arr[midPoint] < x {
lowerBound = midPoint + 1
}
if arr[midPoint] > x {
higherBound = midPoint - 1
}
if arr[midPoint] == x {
return true
}
}
return false;
}
func main() {
fmt.Println("BinarySearch")
arry := [] int{1,2,3,4,5}
fmt.Println(BinarySearch(arry,4))
}
{% endhighlight %} | ---
layout: post
title: Implementation of Binary Search Algorithm in go programming language
---
Last few days, I am looking into the go programming language.It seems like to me the C programing language with less complexity.As a very beginner of the language, I tried to implement the basic binary search algorithm in go.
here is the code --
{% highlight go %}
package main
import "fmt"
func BinarySearch(arr [] int, x int) bool{
var lowerBound int = 0
var higherBound int = len(arr) - 1
for lowerBound <= higherBound {
var midPoint = lowerBound + (higherBound - lowerBound) /2
if arr[midPoint] < x {
lowerBound = midPoint + 1
}
if arr[midPoint] > x {
higherBound = midPoint - 1
}
if arr[midPoint] == x {
return true
}
}
return false;
}
func main() {
fmt.Println("BinarySearch")
arry := [] int{1,2,3,4,5}
fmt.Println(BinarySearch(arry,4))
}
{% endhighlight %} | Revert "added the go algorithms" | Revert "added the go algorithms"
This reverts commit 985cda0d4c6efb7f2de1f3ed7fd22ffd434560fd.
| Markdown | mit | frhan/frhan.github.io,frhan/frhan.github.io | markdown | ## Code Before:
---
layout: post
title: Implementation of Binary Search Algorithm in Go
---
Last few days, I am looking into the go programming language.It seems like to me the C programing language with less complexity.As a very beginner of the language, I tried to implement the basic binary search algorithm in go.
here is the code --
{% highlight go %}
package main
import "fmt"
func BinarySearch(arr [] int, x int) bool{
var lowerBound int = 0
var higherBound int = len(arr) - 1
for lowerBound <= higherBound {
var midPoint = lowerBound + (higherBound - lowerBound) /2
if arr[midPoint] < x {
lowerBound = midPoint + 1
}
if arr[midPoint] > x {
higherBound = midPoint - 1
}
if arr[midPoint] == x {
return true
}
}
return false;
}
func main() {
fmt.Println("BinarySearch")
arry := [] int{1,2,3,4,5}
fmt.Println(BinarySearch(arry,4))
}
{% endhighlight %}
## Instruction:
Revert "added the go algorithms"
This reverts commit 985cda0d4c6efb7f2de1f3ed7fd22ffd434560fd.
## Code After:
---
layout: post
title: Implementation of Binary Search Algorithm in go programming language
---
Last few days, I am looking into the go programming language.It seems like to me the C programing language with less complexity.As a very beginner of the language, I tried to implement the basic binary search algorithm in go.
here is the code --
{% highlight go %}
package main
import "fmt"
func BinarySearch(arr [] int, x int) bool{
var lowerBound int = 0
var higherBound int = len(arr) - 1
for lowerBound <= higherBound {
var midPoint = lowerBound + (higherBound - lowerBound) /2
if arr[midPoint] < x {
lowerBound = midPoint + 1
}
if arr[midPoint] > x {
higherBound = midPoint - 1
}
if arr[midPoint] == x {
return true
}
}
return false;
}
func main() {
fmt.Println("BinarySearch")
arry := [] int{1,2,3,4,5}
fmt.Println(BinarySearch(arry,4))
}
{% endhighlight %} | ---
layout: post
- title: Implementation of Binary Search Algorithm in Go
? ^
+ title: Implementation of Binary Search Algorithm in go programming language
? ^ +++++++++++++++++++++
---
Last few days, I am looking into the go programming language.It seems like to me the C programing language with less complexity.As a very beginner of the language, I tried to implement the basic binary search algorithm in go.
here is the code --
{% highlight go %}
package main
import "fmt"
func BinarySearch(arr [] int, x int) bool{
var lowerBound int = 0
var higherBound int = len(arr) - 1
for lowerBound <= higherBound {
var midPoint = lowerBound + (higherBound - lowerBound) /2
if arr[midPoint] < x {
lowerBound = midPoint + 1
}
if arr[midPoint] > x {
higherBound = midPoint - 1
}
if arr[midPoint] == x {
return true
}
}
return false;
}
func main() {
fmt.Println("BinarySearch")
arry := [] int{1,2,3,4,5}
fmt.Println(BinarySearch(arry,4))
}
{% endhighlight %} | 2 | 0.044444 | 1 | 1 |
f8db46b40629cfdb145a4a000d47277f72090c5b | powerline/lib/memoize.py | powerline/lib/memoize.py |
from functools import wraps
import time
def default_cache_key(**kwargs):
return frozenset(kwargs.items())
class memoize(object):
'''Memoization decorator with timeout.'''
def __init__(self, timeout, cache_key=default_cache_key, cache_reg_func=None):
self.timeout = timeout
self.cache_key = cache_key
self.cache = {}
self.cache_reg_func = cache_reg_func
def __call__(self, func):
@wraps(func)
def decorated_function(**kwargs):
if self.cache_reg_func:
self.cache_reg_func(self.cache)
self.cache_reg_func = None
key = self.cache_key(**kwargs)
try:
cached = self.cache.get(key, None)
except TypeError:
return func(**kwargs)
if cached is None or time.time() - cached['time'] > self.timeout:
cached = self.cache[key] = {
'result': func(**kwargs),
'time': time.time(),
}
return cached['result']
return decorated_function
|
from functools import wraps
try:
# Python>=3.3, the only valid clock source for this job
from time import monotonic as time
except ImportError:
# System time, is affected by clock updates.
from time import time
def default_cache_key(**kwargs):
return frozenset(kwargs.items())
class memoize(object):
'''Memoization decorator with timeout.'''
def __init__(self, timeout, cache_key=default_cache_key, cache_reg_func=None):
self.timeout = timeout
self.cache_key = cache_key
self.cache = {}
self.cache_reg_func = cache_reg_func
def __call__(self, func):
@wraps(func)
def decorated_function(**kwargs):
if self.cache_reg_func:
self.cache_reg_func(self.cache)
self.cache_reg_func = None
key = self.cache_key(**kwargs)
try:
cached = self.cache.get(key, None)
except TypeError:
return func(**kwargs)
# Handle case when time() appears to be less then cached['time'] due
# to clock updates. Not applicable for monotonic clock, but this
# case is currently rare.
if cached is None or not (cached['time'] < time() < cached['time'] + self.timeout):
cached = self.cache[key] = {
'result': func(**kwargs),
'time': time(),
}
return cached['result']
return decorated_function
| Use proper clock if possible | Use proper clock if possible
| Python | mit | Liangjianghao/powerline,kenrachynski/powerline,darac/powerline,darac/powerline,bezhermoso/powerline,firebitsbr/powerline,bartvm/powerline,cyrixhero/powerline,junix/powerline,prvnkumar/powerline,s0undt3ch/powerline,S0lll0s/powerline,Luffin/powerline,EricSB/powerline,dragon788/powerline,prvnkumar/powerline,wfscheper/powerline,xfumihiro/powerline,magus424/powerline,IvanAli/powerline,cyrixhero/powerline,seanfisk/powerline,bartvm/powerline,wfscheper/powerline,dragon788/powerline,xfumihiro/powerline,magus424/powerline,cyrixhero/powerline,xxxhycl2010/powerline,dragon788/powerline,lukw00/powerline,DoctorJellyface/powerline,blindFS/powerline,seanfisk/powerline,blindFS/powerline,IvanAli/powerline,IvanAli/powerline,keelerm84/powerline,Luffin/powerline,s0undt3ch/powerline,Liangjianghao/powerline,blindFS/powerline,S0lll0s/powerline,EricSB/powerline,lukw00/powerline,junix/powerline,areteix/powerline,junix/powerline,QuLogic/powerline,prvnkumar/powerline,seanfisk/powerline,bezhermoso/powerline,QuLogic/powerline,russellb/powerline,bezhermoso/powerline,russellb/powerline,bartvm/powerline,darac/powerline,lukw00/powerline,kenrachynski/powerline,firebitsbr/powerline,areteix/powerline,magus424/powerline,xfumihiro/powerline,Luffin/powerline,keelerm84/powerline,s0undt3ch/powerline,DoctorJellyface/powerline,wfscheper/powerline,xxxhycl2010/powerline,xxxhycl2010/powerline,firebitsbr/powerline,russellb/powerline,EricSB/powerline,DoctorJellyface/powerline,Liangjianghao/powerline,areteix/powerline,S0lll0s/powerline,kenrachynski/powerline,QuLogic/powerline | python | ## Code Before:
from functools import wraps
import time
def default_cache_key(**kwargs):
return frozenset(kwargs.items())
class memoize(object):
'''Memoization decorator with timeout.'''
def __init__(self, timeout, cache_key=default_cache_key, cache_reg_func=None):
self.timeout = timeout
self.cache_key = cache_key
self.cache = {}
self.cache_reg_func = cache_reg_func
def __call__(self, func):
@wraps(func)
def decorated_function(**kwargs):
if self.cache_reg_func:
self.cache_reg_func(self.cache)
self.cache_reg_func = None
key = self.cache_key(**kwargs)
try:
cached = self.cache.get(key, None)
except TypeError:
return func(**kwargs)
if cached is None or time.time() - cached['time'] > self.timeout:
cached = self.cache[key] = {
'result': func(**kwargs),
'time': time.time(),
}
return cached['result']
return decorated_function
## Instruction:
Use proper clock if possible
## Code After:
from functools import wraps
try:
# Python>=3.3, the only valid clock source for this job
from time import monotonic as time
except ImportError:
# System time, is affected by clock updates.
from time import time
def default_cache_key(**kwargs):
return frozenset(kwargs.items())
class memoize(object):
'''Memoization decorator with timeout.'''
def __init__(self, timeout, cache_key=default_cache_key, cache_reg_func=None):
self.timeout = timeout
self.cache_key = cache_key
self.cache = {}
self.cache_reg_func = cache_reg_func
def __call__(self, func):
@wraps(func)
def decorated_function(**kwargs):
if self.cache_reg_func:
self.cache_reg_func(self.cache)
self.cache_reg_func = None
key = self.cache_key(**kwargs)
try:
cached = self.cache.get(key, None)
except TypeError:
return func(**kwargs)
# Handle case when time() appears to be less then cached['time'] due
# to clock updates. Not applicable for monotonic clock, but this
# case is currently rare.
if cached is None or not (cached['time'] < time() < cached['time'] + self.timeout):
cached = self.cache[key] = {
'result': func(**kwargs),
'time': time(),
}
return cached['result']
return decorated_function
|
from functools import wraps
- import time
+ try:
+ # Python>=3.3, the only valid clock source for this job
+ from time import monotonic as time
+ except ImportError:
+ # System time, is affected by clock updates.
+ from time import time
def default_cache_key(**kwargs):
return frozenset(kwargs.items())
class memoize(object):
'''Memoization decorator with timeout.'''
def __init__(self, timeout, cache_key=default_cache_key, cache_reg_func=None):
self.timeout = timeout
self.cache_key = cache_key
self.cache = {}
self.cache_reg_func = cache_reg_func
def __call__(self, func):
@wraps(func)
def decorated_function(**kwargs):
if self.cache_reg_func:
self.cache_reg_func(self.cache)
self.cache_reg_func = None
key = self.cache_key(**kwargs)
try:
cached = self.cache.get(key, None)
except TypeError:
return func(**kwargs)
+ # Handle case when time() appears to be less then cached['time'] due
+ # to clock updates. Not applicable for monotonic clock, but this
+ # case is currently rare.
- if cached is None or time.time() - cached['time'] > self.timeout:
? ^ ^ ^
+ if cached is None or not (cached['time'] < time() < cached['time'] + self.timeout):
? +++++++++++++ ^^^^^ ^ ^ +
cached = self.cache[key] = {
'result': func(**kwargs),
- 'time': time.time(),
? -----
+ 'time': time(),
}
return cached['result']
return decorated_function | 14 | 0.388889 | 11 | 3 |
59c6d2fc157976b1b39f57acf745b41d6e33a783 | lib/ab_admin/i18n_tools/google_translate.rb | lib/ab_admin/i18n_tools/google_translate.rb | require 'multi_json'
require 'rest-client'
module AbAdmin
module I18nTools
module GoogleTranslate
def self.t(text, from, to)
return '' if text.blank?
return text if from == to
base = 'https://www.googleapis.com/language/translate/v2'
params = {
key: ENV['GOOGLE_API_KEY'] || Settings.data.else.try!(:google_api_key),
format: 'html',
source: from,
target: to,
q: text
}
response = RestClient.post(base, params, 'X-HTTP-Method-Override' => 'GET')
if response.code == 200
json = MultiJson.decode(response)
json['data']['translations'][0]['translatedText']
else
raise StandardError, response.inspect
end
end
end
end
end
| require 'multi_json'
require 'rest-client'
module AbAdmin
module I18nTools
module GoogleTranslate
def self.t(text, from, to)
return '' if text.blank?
return text if from == to
base = 'https://www.googleapis.com/language/translate/v2'
params = {
key: ENV['GOOGLE_API_KEY'] || Settings.data.else.try!(:google_api_key),
format: 'html',
source: from,
target: to,
q: text
}
response = RestClient.post(base, params, 'X-HTTP-Method-Override' => 'GET')
if response.code == 200
json = MultiJson.decode(response)
res = json['data']['translations'][0]['translatedText'].to_s.gsub(/%\s{/, ' %{')
res = "#{res[0].upcase}#{res[1..-1]}" if text.first[/[[:upper:]]/]
res
else
raise StandardError, response.inspect
end
end
end
end
end
| Add formatting to google translate endpoint | Add formatting to google translate endpoint
| Ruby | mit | leschenko/ab_admin,leschenko/ab_admin,leschenko/ab_admin | ruby | ## Code Before:
require 'multi_json'
require 'rest-client'
module AbAdmin
module I18nTools
module GoogleTranslate
def self.t(text, from, to)
return '' if text.blank?
return text if from == to
base = 'https://www.googleapis.com/language/translate/v2'
params = {
key: ENV['GOOGLE_API_KEY'] || Settings.data.else.try!(:google_api_key),
format: 'html',
source: from,
target: to,
q: text
}
response = RestClient.post(base, params, 'X-HTTP-Method-Override' => 'GET')
if response.code == 200
json = MultiJson.decode(response)
json['data']['translations'][0]['translatedText']
else
raise StandardError, response.inspect
end
end
end
end
end
## Instruction:
Add formatting to google translate endpoint
## Code After:
require 'multi_json'
require 'rest-client'
module AbAdmin
module I18nTools
module GoogleTranslate
def self.t(text, from, to)
return '' if text.blank?
return text if from == to
base = 'https://www.googleapis.com/language/translate/v2'
params = {
key: ENV['GOOGLE_API_KEY'] || Settings.data.else.try!(:google_api_key),
format: 'html',
source: from,
target: to,
q: text
}
response = RestClient.post(base, params, 'X-HTTP-Method-Override' => 'GET')
if response.code == 200
json = MultiJson.decode(response)
res = json['data']['translations'][0]['translatedText'].to_s.gsub(/%\s{/, ' %{')
res = "#{res[0].upcase}#{res[1..-1]}" if text.first[/[[:upper:]]/]
res
else
raise StandardError, response.inspect
end
end
end
end
end
| require 'multi_json'
require 'rest-client'
module AbAdmin
module I18nTools
module GoogleTranslate
def self.t(text, from, to)
return '' if text.blank?
return text if from == to
base = 'https://www.googleapis.com/language/translate/v2'
params = {
key: ENV['GOOGLE_API_KEY'] || Settings.data.else.try!(:google_api_key),
format: 'html',
source: from,
target: to,
q: text
}
response = RestClient.post(base, params, 'X-HTTP-Method-Override' => 'GET')
if response.code == 200
json = MultiJson.decode(response)
- json['data']['translations'][0]['translatedText']
+ res = json['data']['translations'][0]['translatedText'].to_s.gsub(/%\s{/, ' %{')
? ++++++ +++++++++++++++++++++++++
+ res = "#{res[0].upcase}#{res[1..-1]}" if text.first[/[[:upper:]]/]
+ res
else
raise StandardError, response.inspect
end
end
end
end
end | 4 | 0.137931 | 3 | 1 |
c2ec8cda0c53dc675068df471c8c44b331dc2aea | Resources/views/Layout/tb.html.twig | Resources/views/Layout/tb.html.twig | {% extends 'KnpRadBundle:Layout:h5bp.html.twig' %}
{% block stylesheets %}
<link rel="stylesheet" href="{{ asset('bundles/knprad/bootstrap/css/bootstrap.min.css') }}" />
<link rel="stylesheet" href="{{ asset('bundles/knprad/bootstrap/css/bootstrap-responsive.min.css') }}" />
{% endblock %}
{% block javascripts %}
<script src="{{ asset('bundles/knprad/common/js/jquery-1.8.2.min.js') }}"></script>
<script src="{{ asset('bundles/knprad/bootstrap/js/bootstrap.min.js') }}"></script>
{% endblock %}
{% block flashes %}
<div class="knprad-flashes" style="position:absolute;width:500px;z-index:1000;left:50%;margin-left:-250px;top:10px;">
{% for name, flash in app.session.flashes %}
<div class="alert alert-block alert-{{ name }}">
<button type="button" class="close" data-dismiss="alert">×</button>
{{ flash.message|default(flash)|trans(flash.parameters|default({}))|raw }}
</div>
{% endfor %}
</div>
{% endblock %}
{% block body %}
{% endblock %}
| {% extends 'KnpRadBundle:Layout:h5bp.html.twig' %}
{% block stylesheets %}
<link rel="stylesheet" href="{{ asset('bundles/knprad/bootstrap/css/bootstrap.min.css') }}" />
<link rel="stylesheet" href="{{ asset('bundles/knprad/bootstrap/css/bootstrap-responsive.min.css') }}" />
{% endblock %}
{% block javascripts %}
<script src="{{ asset('bundles/knprad/common/js/jquery-1.8.2.min.js') }}"></script>
<script src="{{ asset('bundles/knprad/bootstrap/js/bootstrap.min.js') }}"></script>
{% endblock %}
{% block flashes %}
{% flashes %}
<div class="alert alert-{{ type }}">
<button type="button" class="close" data-dismiss="alert">×</button>
{{ message }}
</div>
{% endflashes %}
{% endblock %}
{% block body %}
{% endblock %}
| Use the flashes tag in the twitter bootstrap layout | Use the flashes tag in the twitter bootstrap layout
| Twig | mit | KnpLabs/KnpRadBundle,KnpLabs/KnpRadBundle,KnpLabs/KnpRadBundle | twig | ## Code Before:
{% extends 'KnpRadBundle:Layout:h5bp.html.twig' %}
{% block stylesheets %}
<link rel="stylesheet" href="{{ asset('bundles/knprad/bootstrap/css/bootstrap.min.css') }}" />
<link rel="stylesheet" href="{{ asset('bundles/knprad/bootstrap/css/bootstrap-responsive.min.css') }}" />
{% endblock %}
{% block javascripts %}
<script src="{{ asset('bundles/knprad/common/js/jquery-1.8.2.min.js') }}"></script>
<script src="{{ asset('bundles/knprad/bootstrap/js/bootstrap.min.js') }}"></script>
{% endblock %}
{% block flashes %}
<div class="knprad-flashes" style="position:absolute;width:500px;z-index:1000;left:50%;margin-left:-250px;top:10px;">
{% for name, flash in app.session.flashes %}
<div class="alert alert-block alert-{{ name }}">
<button type="button" class="close" data-dismiss="alert">×</button>
{{ flash.message|default(flash)|trans(flash.parameters|default({}))|raw }}
</div>
{% endfor %}
</div>
{% endblock %}
{% block body %}
{% endblock %}
## Instruction:
Use the flashes tag in the twitter bootstrap layout
## Code After:
{% extends 'KnpRadBundle:Layout:h5bp.html.twig' %}
{% block stylesheets %}
<link rel="stylesheet" href="{{ asset('bundles/knprad/bootstrap/css/bootstrap.min.css') }}" />
<link rel="stylesheet" href="{{ asset('bundles/knprad/bootstrap/css/bootstrap-responsive.min.css') }}" />
{% endblock %}
{% block javascripts %}
<script src="{{ asset('bundles/knprad/common/js/jquery-1.8.2.min.js') }}"></script>
<script src="{{ asset('bundles/knprad/bootstrap/js/bootstrap.min.js') }}"></script>
{% endblock %}
{% block flashes %}
{% flashes %}
<div class="alert alert-{{ type }}">
<button type="button" class="close" data-dismiss="alert">×</button>
{{ message }}
</div>
{% endflashes %}
{% endblock %}
{% block body %}
{% endblock %}
| {% extends 'KnpRadBundle:Layout:h5bp.html.twig' %}
{% block stylesheets %}
<link rel="stylesheet" href="{{ asset('bundles/knprad/bootstrap/css/bootstrap.min.css') }}" />
<link rel="stylesheet" href="{{ asset('bundles/knprad/bootstrap/css/bootstrap-responsive.min.css') }}" />
{% endblock %}
{% block javascripts %}
<script src="{{ asset('bundles/knprad/common/js/jquery-1.8.2.min.js') }}"></script>
<script src="{{ asset('bundles/knprad/bootstrap/js/bootstrap.min.js') }}"></script>
{% endblock %}
{% block flashes %}
+ {% flashes %}
- <div class="knprad-flashes" style="position:absolute;width:500px;z-index:1000;left:50%;margin-left:-250px;top:10px;">
- {% for name, flash in app.session.flashes %}
- <div class="alert alert-block alert-{{ name }}">
? ------------ ^^^
+ <div class="alert alert-{{ type }}">
? ^^^
- <button type="button" class="close" data-dismiss="alert">×</button>
? ^
+ <button type="button" class="close" data-dismiss="alert">×</button>
? ^^^^^^^
- {{ flash.message|default(flash)|trans(flash.parameters|default({}))|raw }}
+ {{ message }}
</div>
- {% endfor %}
? ^^
+ {% endflashes %}
? ^^^^^^
- </div>
{% endblock %}
{% block body %}
{% endblock %} | 12 | 0.48 | 5 | 7 |
883d4808be8f5a5e8a9badf05e893eae1c4cefd3 | README.md | README.md | <!-- Nikita Kouevda -->
<!-- 2012/12/23 -->
# Imgur Album Downloader
Command-line downloading of Imgur albums.
## Usage
bash imgur.sh [-v] [album ...]
or (with execute permission):
./imgur.sh [-v] [album ...]
## Options
-v
Verbose output.
## Examples
./imgur.sh adkET
or
./imgur.sh http://imgur.com/a/adkET
## License
Licensed under the [MIT License](http://www.opensource.org/licenses/MIT).
| <!-- Nikita Kouevda -->
<!-- 2012/12/24 -->
# Imgur Album Downloader
Command-line downloading of Imgur albums.
## Usage
bash imgur.sh [-h] [-v] [album ...]
or (with execute permission):
./imgur.sh [-h] [-v] [album ...]
## Options
-h
Show the help message.
-v
Enable verbose output.
## Examples
./imgur.sh adkET
or
./imgur.sh http://imgur.com/a/adkET
## License
Licensed under the [MIT License](http://www.opensource.org/licenses/MIT).
| Update readme to document help option. | Update readme to document help option.
| Markdown | mit | nkouevda/albumr | markdown | ## Code Before:
<!-- Nikita Kouevda -->
<!-- 2012/12/23 -->
# Imgur Album Downloader
Command-line downloading of Imgur albums.
## Usage
bash imgur.sh [-v] [album ...]
or (with execute permission):
./imgur.sh [-v] [album ...]
## Options
-v
Verbose output.
## Examples
./imgur.sh adkET
or
./imgur.sh http://imgur.com/a/adkET
## License
Licensed under the [MIT License](http://www.opensource.org/licenses/MIT).
## Instruction:
Update readme to document help option.
## Code After:
<!-- Nikita Kouevda -->
<!-- 2012/12/24 -->
# Imgur Album Downloader
Command-line downloading of Imgur albums.
## Usage
bash imgur.sh [-h] [-v] [album ...]
or (with execute permission):
./imgur.sh [-h] [-v] [album ...]
## Options
-h
Show the help message.
-v
Enable verbose output.
## Examples
./imgur.sh adkET
or
./imgur.sh http://imgur.com/a/adkET
## License
Licensed under the [MIT License](http://www.opensource.org/licenses/MIT).
| <!-- Nikita Kouevda -->
- <!-- 2012/12/23 -->
? ^
+ <!-- 2012/12/24 -->
? ^
# Imgur Album Downloader
Command-line downloading of Imgur albums.
## Usage
- bash imgur.sh [-v] [album ...]
+ bash imgur.sh [-h] [-v] [album ...]
? +++++
or (with execute permission):
- ./imgur.sh [-v] [album ...]
+ ./imgur.sh [-h] [-v] [album ...]
? +++++
## Options
+ -h
+
+ Show the help message.
+
-v
- Verbose output.
? ^
+ Enable verbose output.
? ^^^^^^^^
## Examples
./imgur.sh adkET
or
./imgur.sh http://imgur.com/a/adkET
## License
Licensed under the [MIT License](http://www.opensource.org/licenses/MIT). | 12 | 0.375 | 8 | 4 |
f3382812806a7997a38a5bb0cf143a78ee328335 | docs-parts/definition/11-ERD_lang1.rst | docs-parts/definition/11-ERD_lang1.rst |
To plot the ERD for an entire schema in Python, an ERD object can be initialized with the schema object (which is normally used to decorate table objects)
.. code-block:: python
import datajoint as dj
schema = dj.schema('my_database')
dj.ERD(schema).draw()
or, alternatively an object that has the schema object as an attribute, such as the module defining a schema:
.. code-block:: python
import datajoint as dj
import seq # import the sequence module defining the seq database
dj.ERD(seq).draw() # draw the ERD
Note that calling the ``.draw()`` method is not necessary when working in a Jupyter notebook.
The preferred workflow is to simply let the object display itself, for example by writing ``dj.ERD(seq)``.
The ERD will then render in the notebook using its ``_repr_html_`` method.
An ERD displayed without ``.draw()`` will be rendered as an SVG, and hovering the mouse over a table will reveal a compact version of the output of the ``.describe()`` method.
|
To plot the ERD for an entire schema, an ERD object can be initialized with the schema object (which is normally used to decorate table objects)
.. code-block:: python
import datajoint as dj
schema = dj.schema('my_database')
dj.ERD(schema).draw()
or alternatively an object that has the schema object as an attribute, such as the module defining a schema:
.. code-block:: python
import datajoint as dj
import seq # import the sequence module defining the seq database
dj.ERD(seq).draw() # draw the ERD
Note that calling the ``.draw()`` method is not necessary when working in a Jupyter notebook.
The preferred workflow is to simply let the object display itself, for example by writing ``dj.ERD(seq)``.
The ERD will then render in the notebook using its ``_repr_html_`` method.
An ERD displayed without ``.draw()`` will be rendered as an SVG, and hovering the mouse over a table will reveal a compact version of the output of the ``.describe()`` method.
| Clean up ERD Python refs. | Clean up ERD Python refs.
| reStructuredText | lgpl-2.1 | dimitri-yatsenko/datajoint-python,eywalker/datajoint-python,datajoint/datajoint-python | restructuredtext | ## Code Before:
To plot the ERD for an entire schema in Python, an ERD object can be initialized with the schema object (which is normally used to decorate table objects)
.. code-block:: python
import datajoint as dj
schema = dj.schema('my_database')
dj.ERD(schema).draw()
or, alternatively an object that has the schema object as an attribute, such as the module defining a schema:
.. code-block:: python
import datajoint as dj
import seq # import the sequence module defining the seq database
dj.ERD(seq).draw() # draw the ERD
Note that calling the ``.draw()`` method is not necessary when working in a Jupyter notebook.
The preferred workflow is to simply let the object display itself, for example by writing ``dj.ERD(seq)``.
The ERD will then render in the notebook using its ``_repr_html_`` method.
An ERD displayed without ``.draw()`` will be rendered as an SVG, and hovering the mouse over a table will reveal a compact version of the output of the ``.describe()`` method.
## Instruction:
Clean up ERD Python refs.
## Code After:
To plot the ERD for an entire schema, an ERD object can be initialized with the schema object (which is normally used to decorate table objects)
.. code-block:: python
import datajoint as dj
schema = dj.schema('my_database')
dj.ERD(schema).draw()
or alternatively an object that has the schema object as an attribute, such as the module defining a schema:
.. code-block:: python
import datajoint as dj
import seq # import the sequence module defining the seq database
dj.ERD(seq).draw() # draw the ERD
Note that calling the ``.draw()`` method is not necessary when working in a Jupyter notebook.
The preferred workflow is to simply let the object display itself, for example by writing ``dj.ERD(seq)``.
The ERD will then render in the notebook using its ``_repr_html_`` method.
An ERD displayed without ``.draw()`` will be rendered as an SVG, and hovering the mouse over a table will reveal a compact version of the output of the ``.describe()`` method.
|
- To plot the ERD for an entire schema in Python, an ERD object can be initialized with the schema object (which is normally used to decorate table objects)
? ----------
+ To plot the ERD for an entire schema, an ERD object can be initialized with the schema object (which is normally used to decorate table objects)
.. code-block:: python
import datajoint as dj
schema = dj.schema('my_database')
dj.ERD(schema).draw()
- or, alternatively an object that has the schema object as an attribute, such as the module defining a schema:
? -
+ or alternatively an object that has the schema object as an attribute, such as the module defining a schema:
.. code-block:: python
import datajoint as dj
import seq # import the sequence module defining the seq database
dj.ERD(seq).draw() # draw the ERD
Note that calling the ``.draw()`` method is not necessary when working in a Jupyter notebook.
The preferred workflow is to simply let the object display itself, for example by writing ``dj.ERD(seq)``.
The ERD will then render in the notebook using its ``_repr_html_`` method.
An ERD displayed without ``.draw()`` will be rendered as an SVG, and hovering the mouse over a table will reveal a compact version of the output of the ``.describe()`` method. | 4 | 0.190476 | 2 | 2 |
d2fb1f22be6c6434873f2bcafb6b8a9b714acde9 | website/archiver/decorators.py | website/archiver/decorators.py | import functools
from framework.exceptions import HTTPError
from website.project.decorators import _inject_nodes
from website.archiver import ARCHIVER_UNCAUGHT_ERROR
from website.archiver import utils
def fail_archive_on_error(func):
@functools.wraps(func)
def wrapped(*args, **kwargs):
try:
return func(*args, **kwargs)
except HTTPError as e:
_inject_nodes(kwargs)
registration = kwargs['node']
utils.handle_archive_fail(
ARCHIVER_UNCAUGHT_ERROR,
registration.registered_from,
registration,
registration.registered_user,
str(e)
)
return wrapped
| import functools
from framework.exceptions import HTTPError
from website.project.decorators import _inject_nodes
from website.archiver import ARCHIVER_UNCAUGHT_ERROR
from website.archiver import signals
def fail_archive_on_error(func):
@functools.wraps(func)
def wrapped(*args, **kwargs):
try:
return func(*args, **kwargs)
except HTTPError as e:
_inject_nodes(kwargs)
registration = kwargs['node']
signals.send.archive_fail(
registration,
ARCHIVER_UNCAUGHT_ERROR,
[str(e)]
)
return wrapped
| Use fail signal in fail_archive_on_error decorator | Use fail signal in fail_archive_on_error decorator
| Python | apache-2.0 | amyshi188/osf.io,caneruguz/osf.io,TomHeatwole/osf.io,SSJohns/osf.io,mluke93/osf.io,DanielSBrown/osf.io,Nesiehr/osf.io,jeffreyliu3230/osf.io,chrisseto/osf.io,acshi/osf.io,mattclark/osf.io,billyhunt/osf.io,caneruguz/osf.io,cosenal/osf.io,SSJohns/osf.io,njantrania/osf.io,mattclark/osf.io,alexschiller/osf.io,samchrisinger/osf.io,HarryRybacki/osf.io,MerlinZhang/osf.io,mluo613/osf.io,TomBaxter/osf.io,mattclark/osf.io,kch8qx/osf.io,baylee-d/osf.io,chennan47/osf.io,asanfilippo7/osf.io,asanfilippo7/osf.io,amyshi188/osf.io,felliott/osf.io,CenterForOpenScience/osf.io,brandonPurvis/osf.io,acshi/osf.io,bdyetton/prettychart,danielneis/osf.io,brianjgeiger/osf.io,kch8qx/osf.io,emetsger/osf.io,reinaH/osf.io,ticklemepierce/osf.io,felliott/osf.io,hmoco/osf.io,SSJohns/osf.io,danielneis/osf.io,wearpants/osf.io,HalcyonChimera/osf.io,jmcarp/osf.io,TomHeatwole/osf.io,ZobairAlijan/osf.io,mfraezz/osf.io,cldershem/osf.io,adlius/osf.io,laurenrevere/osf.io,jolene-esposito/osf.io,sloria/osf.io,Johnetordoff/osf.io,doublebits/osf.io,MerlinZhang/osf.io,caneruguz/osf.io,monikagrabowska/osf.io,Nesiehr/osf.io,billyhunt/osf.io,crcresearch/osf.io,njantrania/osf.io,brianjgeiger/osf.io,TomBaxter/osf.io,mfraezz/osf.io,hmoco/osf.io,jinluyuan/osf.io,monikagrabowska/osf.io,danielneis/osf.io,aaxelb/osf.io,Nesiehr/osf.io,caseyrygt/osf.io,kwierman/osf.io,cldershem/osf.io,brandonPurvis/osf.io,cwisecarver/osf.io,fabianvf/osf.io,amyshi188/osf.io,petermalcolm/osf.io,adlius/osf.io,rdhyee/osf.io,brandonPurvis/osf.io,laurenrevere/osf.io,rdhyee/osf.io,samanehsan/osf.io,haoyuchen1992/osf.io,asanfilippo7/osf.io,dplorimer/osf,leb2dg/osf.io,mfraezz/osf.io,abought/osf.io,amyshi188/osf.io,doublebits/osf.io,sbt9uc/osf.io,lyndsysimon/osf.io,dplorimer/osf,caneruguz/osf.io,laurenrevere/osf.io,ticklemepierce/osf.io,lyndsysimon/osf.io,DanielSBrown/osf.io,jmcarp/osf.io,baylee-d/osf.io,GageGaskins/osf.io,chennan47/osf.io,fabianvf/osf.io,cldershem/osf.io,jmcarp/osf.io,jnayak1/osf.io,binoculars/osf.io,zamattiac/osf.io,acshi/osf.io,crcresearch/osf.io,jinluyuan/osf.io,jnayak1/osf.io,binoculars/osf.io,Ghalko/osf.io,jinluyuan/osf.io,cosenal/osf.io,RomanZWang/osf.io,wearpants/osf.io,cslzchen/osf.io,ticklemepierce/osf.io,wearpants/osf.io,samchrisinger/osf.io,SSJohns/osf.io,jeffreyliu3230/osf.io,abought/osf.io,zachjanicki/osf.io,rdhyee/osf.io,DanielSBrown/osf.io,bdyetton/prettychart,MerlinZhang/osf.io,pattisdr/osf.io,chennan47/osf.io,bdyetton/prettychart,caseyrygt/osf.io,samanehsan/osf.io,pattisdr/osf.io,reinaH/osf.io,sloria/osf.io,caseyrollins/osf.io,zamattiac/osf.io,bdyetton/prettychart,caseyrollins/osf.io,TomHeatwole/osf.io,jeffreyliu3230/osf.io,cldershem/osf.io,mluo613/osf.io,KAsante95/osf.io,lyndsysimon/osf.io,zamattiac/osf.io,ZobairAlijan/osf.io,petermalcolm/osf.io,billyhunt/osf.io,chrisseto/osf.io,GageGaskins/osf.io,RomanZWang/osf.io,Ghalko/osf.io,petermalcolm/osf.io,zachjanicki/osf.io,TomHeatwole/osf.io,ckc6cz/osf.io,njantrania/osf.io,billyhunt/osf.io,CenterForOpenScience/osf.io,erinspace/osf.io,ckc6cz/osf.io,alexschiller/osf.io,DanielSBrown/osf.io,leb2dg/osf.io,cwisecarver/osf.io,billyhunt/osf.io,GageGaskins/osf.io,dplorimer/osf,arpitar/osf.io,dplorimer/osf,baylee-d/osf.io,adlius/osf.io,monikagrabowska/osf.io,HalcyonChimera/osf.io,doublebits/osf.io,kwierman/osf.io,adlius/osf.io,aaxelb/osf.io,jnayak1/osf.io,haoyuchen1992/osf.io,KAsante95/osf.io,cwisecarver/osf.io,hmoco/osf.io,HalcyonChimera/osf.io,brianjgeiger/osf.io,MerlinZhang/osf.io,RomanZWang/osf.io,RomanZWang/osf.io,ticklemepierce/osf.io,pattisdr/osf.io,erinspace/osf.io,arpitar/osf.io,icereval/osf.io,felliott/osf.io,KAsante95/osf.io,danielneis/osf.io,leb2dg/osf.io,caseyrygt/osf.io,GageGaskins/osf.io,petermalcolm/osf.io,mluo613/osf.io,KAsante95/osf.io,HalcyonChimera/osf.io,jeffreyliu3230/osf.io,zachjanicki/osf.io,zamattiac/osf.io,HarryRybacki/osf.io,ZobairAlijan/osf.io,cwisecarver/osf.io,njantrania/osf.io,chrisseto/osf.io,monikagrabowska/osf.io,CenterForOpenScience/osf.io,emetsger/osf.io,cosenal/osf.io,sbt9uc/osf.io,RomanZWang/osf.io,hmoco/osf.io,reinaH/osf.io,Ghalko/osf.io,icereval/osf.io,cslzchen/osf.io,arpitar/osf.io,reinaH/osf.io,zachjanicki/osf.io,jolene-esposito/osf.io,fabianvf/osf.io,alexschiller/osf.io,GageGaskins/osf.io,cslzchen/osf.io,brandonPurvis/osf.io,samchrisinger/osf.io,rdhyee/osf.io,Ghalko/osf.io,Johnetordoff/osf.io,mluo613/osf.io,brandonPurvis/osf.io,haoyuchen1992/osf.io,brianjgeiger/osf.io,samchrisinger/osf.io,caseyrygt/osf.io,erinspace/osf.io,kwierman/osf.io,monikagrabowska/osf.io,aaxelb/osf.io,HarryRybacki/osf.io,KAsante95/osf.io,leb2dg/osf.io,felliott/osf.io,CenterForOpenScience/osf.io,kwierman/osf.io,caseyrollins/osf.io,sbt9uc/osf.io,samanehsan/osf.io,wearpants/osf.io,abought/osf.io,ckc6cz/osf.io,crcresearch/osf.io,chrisseto/osf.io,lyndsysimon/osf.io,jolene-esposito/osf.io,fabianvf/osf.io,binoculars/osf.io,kch8qx/osf.io,icereval/osf.io,mluke93/osf.io,Johnetordoff/osf.io,jmcarp/osf.io,mluo613/osf.io,acshi/osf.io,asanfilippo7/osf.io,saradbowman/osf.io,Nesiehr/osf.io,kch8qx/osf.io,mluke93/osf.io,mfraezz/osf.io,TomBaxter/osf.io,samanehsan/osf.io,mluke93/osf.io,arpitar/osf.io,jolene-esposito/osf.io,alexschiller/osf.io,cslzchen/osf.io,sbt9uc/osf.io,ZobairAlijan/osf.io,haoyuchen1992/osf.io,jinluyuan/osf.io,alexschiller/osf.io,jnayak1/osf.io,cosenal/osf.io,sloria/osf.io,HarryRybacki/osf.io,ckc6cz/osf.io,doublebits/osf.io,saradbowman/osf.io,abought/osf.io,doublebits/osf.io,kch8qx/osf.io,Johnetordoff/osf.io,emetsger/osf.io,emetsger/osf.io,acshi/osf.io,aaxelb/osf.io | python | ## Code Before:
import functools
from framework.exceptions import HTTPError
from website.project.decorators import _inject_nodes
from website.archiver import ARCHIVER_UNCAUGHT_ERROR
from website.archiver import utils
def fail_archive_on_error(func):
@functools.wraps(func)
def wrapped(*args, **kwargs):
try:
return func(*args, **kwargs)
except HTTPError as e:
_inject_nodes(kwargs)
registration = kwargs['node']
utils.handle_archive_fail(
ARCHIVER_UNCAUGHT_ERROR,
registration.registered_from,
registration,
registration.registered_user,
str(e)
)
return wrapped
## Instruction:
Use fail signal in fail_archive_on_error decorator
## Code After:
import functools
from framework.exceptions import HTTPError
from website.project.decorators import _inject_nodes
from website.archiver import ARCHIVER_UNCAUGHT_ERROR
from website.archiver import signals
def fail_archive_on_error(func):
@functools.wraps(func)
def wrapped(*args, **kwargs):
try:
return func(*args, **kwargs)
except HTTPError as e:
_inject_nodes(kwargs)
registration = kwargs['node']
signals.send.archive_fail(
registration,
ARCHIVER_UNCAUGHT_ERROR,
[str(e)]
)
return wrapped
| import functools
from framework.exceptions import HTTPError
from website.project.decorators import _inject_nodes
from website.archiver import ARCHIVER_UNCAUGHT_ERROR
- from website.archiver import utils
? ^^
+ from website.archiver import signals
? ^ +++
def fail_archive_on_error(func):
@functools.wraps(func)
def wrapped(*args, **kwargs):
try:
return func(*args, **kwargs)
except HTTPError as e:
_inject_nodes(kwargs)
registration = kwargs['node']
- utils.handle_archive_fail(
? ^^ ^^ ^^^
+ signals.send.archive_fail(
? ^ +++ ^^ ^
+ registration,
ARCHIVER_UNCAUGHT_ERROR,
- registration.registered_from,
- registration,
- registration.registered_user,
- str(e)
+ [str(e)]
? + +
)
return wrapped | 10 | 0.4 | 4 | 6 |
9c6ff62d31b2a611140b1ba86dff60dfc38e2b3f | .github/workflows/build-dev.yml | .github/workflows/build-dev.yml | name: Build and deploy
on:
push:
paths-ignore:
- 'docs/**'
- 'yarn.lock'
- 'package.json'
branches:
- dev
tags:
- '*'
jobs:
test-netcore-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.201'
- name: Run tests netcoreapp3.1
run: dotnet test -c Release -f netcoreapp3.1
test-win:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- name: Run tests on Windows for all targets
run: dotnet test -c Release
nuget:
runs-on: windows-latest
needs: [test-win,test-netcore-linux]
steps:
- uses: actions/checkout@v1
- name: Create and push NuGet package
run: |
dotnet pack -c Release -o nuget -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg
dotnet nuget push **/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate | name: Build and deploy
on:
push:
paths-ignore:
- 'docs/**'
- 'yarn.lock'
- 'package.json'
branches:
- dev
tags:
- '*'
jobs:
# test-netcore-linux:
# runs-on: ubuntu-latest
#
# steps:
# - uses: actions/checkout@v1
# - uses: actions/setup-dotnet@v1
# with:
# dotnet-version: '3.1.201'
#
# - name: Run tests netcoreapp3.1
# run: dotnet test -c Release -f netcoreapp3.1
test-win:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- name: Run tests on Windows for all targets
run: dotnet test -c Release
nuget:
runs-on: windows-latest
needs: [test-win,test-netcore-linux]
steps:
- uses: actions/checkout@v1
- name: Create and push NuGet package
run: |
dotnet pack -c Release -o nuget -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg
dotnet nuget push **/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate | Disable tests on Linux for now | Disable tests on Linux for now
| YAML | apache-2.0 | restsharp/RestSharp | yaml | ## Code Before:
name: Build and deploy
on:
push:
paths-ignore:
- 'docs/**'
- 'yarn.lock'
- 'package.json'
branches:
- dev
tags:
- '*'
jobs:
test-netcore-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.201'
- name: Run tests netcoreapp3.1
run: dotnet test -c Release -f netcoreapp3.1
test-win:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- name: Run tests on Windows for all targets
run: dotnet test -c Release
nuget:
runs-on: windows-latest
needs: [test-win,test-netcore-linux]
steps:
- uses: actions/checkout@v1
- name: Create and push NuGet package
run: |
dotnet pack -c Release -o nuget -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg
dotnet nuget push **/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
## Instruction:
Disable tests on Linux for now
## Code After:
name: Build and deploy
on:
push:
paths-ignore:
- 'docs/**'
- 'yarn.lock'
- 'package.json'
branches:
- dev
tags:
- '*'
jobs:
# test-netcore-linux:
# runs-on: ubuntu-latest
#
# steps:
# - uses: actions/checkout@v1
# - uses: actions/setup-dotnet@v1
# with:
# dotnet-version: '3.1.201'
#
# - name: Run tests netcoreapp3.1
# run: dotnet test -c Release -f netcoreapp3.1
test-win:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- name: Run tests on Windows for all targets
run: dotnet test -c Release
nuget:
runs-on: windows-latest
needs: [test-win,test-netcore-linux]
steps:
- uses: actions/checkout@v1
- name: Create and push NuGet package
run: |
dotnet pack -c Release -o nuget -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg
dotnet nuget push **/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate | name: Build and deploy
on:
push:
paths-ignore:
- 'docs/**'
- 'yarn.lock'
- 'package.json'
branches:
- dev
tags:
- '*'
jobs:
- test-netcore-linux:
+ # test-netcore-linux:
? +
- runs-on: ubuntu-latest
+ # runs-on: ubuntu-latest
? +
-
+ #
- steps:
+ # steps:
? +
- - uses: actions/checkout@v1
+ # - uses: actions/checkout@v1
? +
- - uses: actions/setup-dotnet@v1
+ # - uses: actions/setup-dotnet@v1
? +
- with:
+ # with:
? +
- dotnet-version: '3.1.201'
+ # dotnet-version: '3.1.201'
? +
-
+ #
- - name: Run tests netcoreapp3.1
+ # - name: Run tests netcoreapp3.1
? +
- run: dotnet test -c Release -f netcoreapp3.1
+ # run: dotnet test -c Release -f netcoreapp3.1
? +
test-win:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- name: Run tests on Windows for all targets
run: dotnet test -c Release
nuget:
runs-on: windows-latest
needs: [test-win,test-netcore-linux]
steps:
- uses: actions/checkout@v1
- name: Create and push NuGet package
run: |
dotnet pack -c Release -o nuget -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg
dotnet nuget push **/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate | 22 | 0.478261 | 11 | 11 |
ab0ee453d7385484106de7a79baa86caceaba05f | lib/api/com.js | lib/api/com.js | var $ = require('zepto-browserify').$;
var name = '.COM API';
var baseUrl = 'https://public-api.wordpress.com/rest/';
function getRequestUrl(request) {
var version = request.version || 'v1';
return baseUrl + version + request.path;
}
function getDiscoveryUrl(version) {
return baseUrl + version + '/help';
}
function parseEndpoints(data, version) {
return data;
}
function loadVersions(callback) {
// Strange having to specify a version to retrieve versions :)
$.ajax({
type: 'GET',
url: baseUrl + 'v1.1/versions?include_dev=true',
headers: $.extend({'accept':'application/json'}),
success: function(data) {
callback(undefined, data.versions.map(version => 'v' + version), 'v' + data.current_version);
},
error: function(xhr, errorType, error) {
callback({
status: xhr.status,
error: error,
errorType: errorType,
body: xhr.response,
});
}
});
}
module.exports = {
name: name,
baseUrl: baseUrl,
getRequestUrl: getRequestUrl,
getDiscoveryUrl: getDiscoveryUrl,
parseEndpoints: parseEndpoints,
loadVersions: loadVersions
};
| var $ = require('zepto-browserify').$;
var name = '.COM API';
var baseUrl = 'https://public-api.wordpress.com/rest/';
function getRequestUrl(request) {
var version = request.version || 'v1';
return baseUrl + version + request.path;
}
function getDiscoveryUrl(version) {
return baseUrl + version + '/help';
}
function parseEndpoints(data, version) {
return data;
}
function loadVersions(callback) {
// Strange having to specify a version to retrieve versions :)
$.ajax({
type: 'GET',
url: baseUrl + 'v1.1/versions?include_dev=true',
headers: $.extend({'accept':'application/json'}),
success: function(data) {
callback(
undefined,
data.versions.map(function(version) {
return 'v' + version;
}),
'v' + data.current_version
);
},
error: function(xhr, errorType, error) {
callback({
status: xhr.status,
error: error,
errorType: errorType,
body: xhr.response,
});
}
});
}
module.exports = {
name: name,
baseUrl: baseUrl,
getRequestUrl: getRequestUrl,
getDiscoveryUrl: getDiscoveryUrl,
parseEndpoints: parseEndpoints,
loadVersions: loadVersions
};
| Remove arrow function to fix the build | Remove arrow function to fix the build
events.js:165
throw err;
^
Error: Uncaught, unspecified "error" event. (SyntaxError: Unexpected
token: operator (>) while parsing file: [...]/lib/api/com.js
(line: 27, col: 53, pos: 695)
Error
at new JS_Parse_Error (eval at <anonymous>
([...]/node_modules/uglify-js/tools/node .js:28:1), <anonymous>:1545:18)
| JavaScript | mit | HamptonParkhp2w/Marong,Hamiltonz6x6/Dungog,Gawlerydyh/Geelong,Hamiltonz6x6/Dungog,Alexandriabez1/Gordon,Oatlandsuvdi/Mentone,Harveypahl/Beachmere,Vermontnapk/Silverwater,Oxleylrej/RingwoodEast,Automattic/rest-api-console2,PortMacquarieghp4/Revesby,Tuggeranongyqe2/Belair,paltasipse/stehnd,Redfernyrzj/Lilydale,Richmondfk5a/Malvern,luzelena57/fragtood,Invermayrxtr/LittleBay,Kambaldad1zd/Wahroonga,Redfernyrzj/Lilydale,Vermontnapk/Silverwater,Tuncurryfbcn/Milton,Braddonrcdz/EdgeHill,roena/startyack,Woodstocksw7m/Ridgley,CribPointsmid/Rocklea,noknarulmo/hestero,BrandyHillp17d/Wyongah,Geraldtonobww/CroydonNorth,Alexandriabez1/Gordon,Killarapbkw/Semaphore,Seafordnc6p/Ashburton,Morangodax/PortLincoln,Nunawadinger32/Kempsey,PointLonsdaleqsf3/LakeHeights,Lewistonx1sr/Bargara,HamptonParkhp2w/Marong,PortMacquarieghp4/Revesby,Parkhurstb1tl/BigPatsCreek,Nunawadinger32/Kempsey,wddesbvsp/winetest,Automattic/rest-api-console2,Woodstocksw7m/Ridgley,paltasipse/stehnd,Romseytrxx/Freeling,heisokjss/goedoo,Lewistonx1sr/Bargara,Ashgroveoszc/Carlingford,Kensingtonkadi/Kallista,Richmondfk5a/Malvern,Beaconsfieldkvb1/LakesEntrance,Yendadi04/OakPark,Morangodax/PortLincoln,Broadwaterudtp/Tanunda,BrandyHillp17d/Wyongah,Kelsolnty/MarsdenPark,Riverstonezbni/Gosforth,Tuncurryfbcn/Milton,SandyHollowx8d5/Waterloo,Kambaldad1zd/Wahroonga,Riverstonezbni/Gosforth,Beaconsfieldkvb1/LakesEntrance,Duralhc9a/Williams,Baringhupz067/Camperdown,Harveypahl/Beachmere,Broadwaterudtp/Tanunda,SandyHollowx8d5/Waterloo,Duralhc9a/Williams,Tuggeranongyqe2/Belair,OldBeachseep/SalamanderBay,GreenHilll75f/Tennyson,LongPointcaf0/Kyabram,heisokjss/goedoo,Daceyvilleuaex/SpringField,roena/startyack,Kensingtonkadi/Kallista,CribPointsmid/Rocklea,FreemansReachqsyh/Braeside,Rockhamptonm0x2/Sandringham,Geraldtonobww/CroydonNorth,Baringhupz067/Camperdown,PointLonsdaleqsf3/LakeHeights,Oxleylrej/RingwoodEast,OldBeachseep/SalamanderBay,Ashgroveoszc/Carlingford,Kelsolnty/MarsdenPark,LongPointcaf0/Kyabram,Romseytrxx/Freeling,Gawlerydyh/Geelong,Seafordnc6p/Ashburton,Killarapbkw/Semaphore,GreenHilll75f/Tennyson,Parkhurstb1tl/BigPatsCreek,Oatlandsuvdi/Mentone,noknarulmo/hestero,luzelena57/fragtood,wddesbvsp/winetest,Daceyvilleuaex/SpringField,Rockhamptonm0x2/Sandringham,Yendadi04/OakPark,FreemansReachqsyh/Braeside,Invermayrxtr/LittleBay,Braddonrcdz/EdgeHill | javascript | ## Code Before:
var $ = require('zepto-browserify').$;
var name = '.COM API';
var baseUrl = 'https://public-api.wordpress.com/rest/';
function getRequestUrl(request) {
var version = request.version || 'v1';
return baseUrl + version + request.path;
}
function getDiscoveryUrl(version) {
return baseUrl + version + '/help';
}
function parseEndpoints(data, version) {
return data;
}
function loadVersions(callback) {
// Strange having to specify a version to retrieve versions :)
$.ajax({
type: 'GET',
url: baseUrl + 'v1.1/versions?include_dev=true',
headers: $.extend({'accept':'application/json'}),
success: function(data) {
callback(undefined, data.versions.map(version => 'v' + version), 'v' + data.current_version);
},
error: function(xhr, errorType, error) {
callback({
status: xhr.status,
error: error,
errorType: errorType,
body: xhr.response,
});
}
});
}
module.exports = {
name: name,
baseUrl: baseUrl,
getRequestUrl: getRequestUrl,
getDiscoveryUrl: getDiscoveryUrl,
parseEndpoints: parseEndpoints,
loadVersions: loadVersions
};
## Instruction:
Remove arrow function to fix the build
events.js:165
throw err;
^
Error: Uncaught, unspecified "error" event. (SyntaxError: Unexpected
token: operator (>) while parsing file: [...]/lib/api/com.js
(line: 27, col: 53, pos: 695)
Error
at new JS_Parse_Error (eval at <anonymous>
([...]/node_modules/uglify-js/tools/node .js:28:1), <anonymous>:1545:18)
## Code After:
var $ = require('zepto-browserify').$;
var name = '.COM API';
var baseUrl = 'https://public-api.wordpress.com/rest/';
function getRequestUrl(request) {
var version = request.version || 'v1';
return baseUrl + version + request.path;
}
function getDiscoveryUrl(version) {
return baseUrl + version + '/help';
}
function parseEndpoints(data, version) {
return data;
}
function loadVersions(callback) {
// Strange having to specify a version to retrieve versions :)
$.ajax({
type: 'GET',
url: baseUrl + 'v1.1/versions?include_dev=true',
headers: $.extend({'accept':'application/json'}),
success: function(data) {
callback(
undefined,
data.versions.map(function(version) {
return 'v' + version;
}),
'v' + data.current_version
);
},
error: function(xhr, errorType, error) {
callback({
status: xhr.status,
error: error,
errorType: errorType,
body: xhr.response,
});
}
});
}
module.exports = {
name: name,
baseUrl: baseUrl,
getRequestUrl: getRequestUrl,
getDiscoveryUrl: getDiscoveryUrl,
parseEndpoints: parseEndpoints,
loadVersions: loadVersions
};
| var $ = require('zepto-browserify').$;
var name = '.COM API';
var baseUrl = 'https://public-api.wordpress.com/rest/';
function getRequestUrl(request) {
var version = request.version || 'v1';
return baseUrl + version + request.path;
}
function getDiscoveryUrl(version) {
return baseUrl + version + '/help';
}
function parseEndpoints(data, version) {
return data;
}
function loadVersions(callback) {
// Strange having to specify a version to retrieve versions :)
$.ajax({
type: 'GET',
url: baseUrl + 'v1.1/versions?include_dev=true',
headers: $.extend({'accept':'application/json'}),
success: function(data) {
- callback(undefined, data.versions.map(version => 'v' + version), 'v' + data.current_version);
+ callback(
+ undefined,
+ data.versions.map(function(version) {
+ return 'v' + version;
+ }),
+ 'v' + data.current_version
+ );
},
error: function(xhr, errorType, error) {
callback({
status: xhr.status,
error: error,
errorType: errorType,
body: xhr.response,
});
}
});
}
module.exports = {
name: name,
baseUrl: baseUrl,
getRequestUrl: getRequestUrl,
getDiscoveryUrl: getDiscoveryUrl,
parseEndpoints: parseEndpoints,
loadVersions: loadVersions
}; | 8 | 0.170213 | 7 | 1 |
aee2f4e61308de0cf7793ff86686fef373cb3709 | chippery/settings.sls | chippery/settings.sls |
{% set chippery = pillar.get('chippery', {}) %}
{% set settings = chippery.get('settings', {}) %}
# Set a default UMASK for the machine
{% if 'default_umask' in settings %}
.Set default UMASK on the minion:
file.replace:
- name: /etc/login.defs
- pattern: ^UMASK\s+[\dx]+
- repl: UMASK\t\t{{ settings['default_umask'] }}
- flags: ['IGNORECASE']
- backup: False
{% endif %}
|
{% set chippery = pillar.get('chippery', {}) %}
{% set settings = chippery.get('settings', {}) %}
| Remove UMASK setter into state formula system.states.default_umask | Remove UMASK setter into state formula system.states.default_umask
| SaltStack | bsd-2-clause | hipikat/chippery-formula | saltstack | ## Code Before:
{% set chippery = pillar.get('chippery', {}) %}
{% set settings = chippery.get('settings', {}) %}
# Set a default UMASK for the machine
{% if 'default_umask' in settings %}
.Set default UMASK on the minion:
file.replace:
- name: /etc/login.defs
- pattern: ^UMASK\s+[\dx]+
- repl: UMASK\t\t{{ settings['default_umask'] }}
- flags: ['IGNORECASE']
- backup: False
{% endif %}
## Instruction:
Remove UMASK setter into state formula system.states.default_umask
## Code After:
{% set chippery = pillar.get('chippery', {}) %}
{% set settings = chippery.get('settings', {}) %}
|
{% set chippery = pillar.get('chippery', {}) %}
{% set settings = chippery.get('settings', {}) %}
- # Set a default UMASK for the machine
- {% if 'default_umask' in settings %}
- .Set default UMASK on the minion:
- file.replace:
- - name: /etc/login.defs
- - pattern: ^UMASK\s+[\dx]+
- - repl: UMASK\t\t{{ settings['default_umask'] }}
- - flags: ['IGNORECASE']
- - backup: False
- {% endif %} | 10 | 0.666667 | 0 | 10 |
74be6c3d995a95c2c0dd541203e5d3e85bac053c | app/views/manage-projects.html | app/views/manage-projects.html | <md-content ng-cloak>
<md-content>
<md-list>
<md-list-item class="md-3-line" ng-repeat="project in projects">
<div class="md-list-item-text">
<h3>{{ ::project.title }} ({{ ::project.participants.length }})</h3>
<h4>
<translate>VIEWS.MANAGE.PROJECTS.CREATOR</translate>: {{ ::getUserFullName(project.creator) }}
<translate>VIEWS.PROJECT_LIST.LIST_TITLES.OWNER</translate>: {{ ::getUserFullName(project.owner) }}
</h4>
<p>
<translate>VIEWS.PROJECT_LIST.LIST_TITLES.START_DATE</translate>: {{ ::project.start }}
<translate>VIEWS.PROJECT_LIST.LIST_TITLES.END_DATE</translate>: {{ ::project.end }}
<translate>GENERAL.CREATED</translate>: {{ ::project.created }}
<translate>GENERAL.UPDATED</translate>: {{ ::project.updated }}
</p>
</div>
<md-button class="md-secondary" translate="GENERAL.OPEN"></md-button>
<md-divider ng-if="!$last"></md-divider>
</md-list-item>
</md-list>
</md-content>
</md-content>
| <md-content ng-cloak>
<md-content>
<md-list>
<md-list-item class="md-3-line" ng-repeat="project in projects">
<div class="md-list-item-text">
<h3>{{ ::project.title }} ({{ ::project.participants.length }})</h3>
<h4>
<translate>VIEWS.MANAGE.PROJECTS.CREATOR</translate>: {{ ::getUserFullName(project.creator) }}
<translate>VIEWS.PROJECT_LIST.LIST_TITLES.OWNER</translate>: {{ ::getUserFullName(project.owner) }}
</h4>
<p>
<translate>VIEWS.PROJECT_LIST.LIST_TITLES.START_DATE</translate>: {{ ::project.start | tlDate }}
<translate>VIEWS.PROJECT_LIST.LIST_TITLES.END_DATE</translate>: {{ ::project.end | tlDate }}
<translate>GENERAL.CREATED</translate>: {{ ::project.created | tlDate }}
<translate>GENERAL.UPDATED</translate>: {{ ::project.updated | tlDate }}
</p>
</div>
<md-button class="md-secondary" translate="GENERAL.OPEN"></md-button>
<md-divider ng-if="!$last"></md-divider>
</md-list-item>
</md-list>
</md-content>
</md-content>
| Handle dates in a few more places. | Handle dates in a few more places.
| HTML | mit | learning-layers/timeliner-client,learning-layers/timeliner-client | html | ## Code Before:
<md-content ng-cloak>
<md-content>
<md-list>
<md-list-item class="md-3-line" ng-repeat="project in projects">
<div class="md-list-item-text">
<h3>{{ ::project.title }} ({{ ::project.participants.length }})</h3>
<h4>
<translate>VIEWS.MANAGE.PROJECTS.CREATOR</translate>: {{ ::getUserFullName(project.creator) }}
<translate>VIEWS.PROJECT_LIST.LIST_TITLES.OWNER</translate>: {{ ::getUserFullName(project.owner) }}
</h4>
<p>
<translate>VIEWS.PROJECT_LIST.LIST_TITLES.START_DATE</translate>: {{ ::project.start }}
<translate>VIEWS.PROJECT_LIST.LIST_TITLES.END_DATE</translate>: {{ ::project.end }}
<translate>GENERAL.CREATED</translate>: {{ ::project.created }}
<translate>GENERAL.UPDATED</translate>: {{ ::project.updated }}
</p>
</div>
<md-button class="md-secondary" translate="GENERAL.OPEN"></md-button>
<md-divider ng-if="!$last"></md-divider>
</md-list-item>
</md-list>
</md-content>
</md-content>
## Instruction:
Handle dates in a few more places.
## Code After:
<md-content ng-cloak>
<md-content>
<md-list>
<md-list-item class="md-3-line" ng-repeat="project in projects">
<div class="md-list-item-text">
<h3>{{ ::project.title }} ({{ ::project.participants.length }})</h3>
<h4>
<translate>VIEWS.MANAGE.PROJECTS.CREATOR</translate>: {{ ::getUserFullName(project.creator) }}
<translate>VIEWS.PROJECT_LIST.LIST_TITLES.OWNER</translate>: {{ ::getUserFullName(project.owner) }}
</h4>
<p>
<translate>VIEWS.PROJECT_LIST.LIST_TITLES.START_DATE</translate>: {{ ::project.start | tlDate }}
<translate>VIEWS.PROJECT_LIST.LIST_TITLES.END_DATE</translate>: {{ ::project.end | tlDate }}
<translate>GENERAL.CREATED</translate>: {{ ::project.created | tlDate }}
<translate>GENERAL.UPDATED</translate>: {{ ::project.updated | tlDate }}
</p>
</div>
<md-button class="md-secondary" translate="GENERAL.OPEN"></md-button>
<md-divider ng-if="!$last"></md-divider>
</md-list-item>
</md-list>
</md-content>
</md-content>
| <md-content ng-cloak>
<md-content>
<md-list>
<md-list-item class="md-3-line" ng-repeat="project in projects">
<div class="md-list-item-text">
<h3>{{ ::project.title }} ({{ ::project.participants.length }})</h3>
<h4>
<translate>VIEWS.MANAGE.PROJECTS.CREATOR</translate>: {{ ::getUserFullName(project.creator) }}
<translate>VIEWS.PROJECT_LIST.LIST_TITLES.OWNER</translate>: {{ ::getUserFullName(project.owner) }}
</h4>
<p>
- <translate>VIEWS.PROJECT_LIST.LIST_TITLES.START_DATE</translate>: {{ ::project.start }}
+ <translate>VIEWS.PROJECT_LIST.LIST_TITLES.START_DATE</translate>: {{ ::project.start | tlDate }}
? +++++++++
- <translate>VIEWS.PROJECT_LIST.LIST_TITLES.END_DATE</translate>: {{ ::project.end }}
+ <translate>VIEWS.PROJECT_LIST.LIST_TITLES.END_DATE</translate>: {{ ::project.end | tlDate }}
? +++++++++
- <translate>GENERAL.CREATED</translate>: {{ ::project.created }}
+ <translate>GENERAL.CREATED</translate>: {{ ::project.created | tlDate }}
? +++++++++
- <translate>GENERAL.UPDATED</translate>: {{ ::project.updated }}
+ <translate>GENERAL.UPDATED</translate>: {{ ::project.updated | tlDate }}
? +++++++++
</p>
</div>
<md-button class="md-secondary" translate="GENERAL.OPEN"></md-button>
<md-divider ng-if="!$last"></md-divider>
</md-list-item>
</md-list>
</md-content>
</md-content> | 8 | 0.347826 | 4 | 4 |
8b97da7968fd946d597820c241cf6bd5e7d9edf5 | home/.vim/plugin/filetypes.vim | home/.vim/plugin/filetypes.vim | augroup set_filetype_group
autocmd!
autocmd BufNewFile,BufRead Guardfile set filetype=ruby
autocmd BufNewFile,BufRead *.md set filetype=markdown
autocmd BufNewFile,BufRead *.pde set filetype=processing
autocmd BufRead,BufNewFile *.scss set filetype=scss.css
augroup END
| augroup set_filetype_group
autocmd!
autocmd BufNewFile,BufRead Guardfile set filetype=ruby
autocmd BufNewFile,BufRead Vagrantfile set filetype=ruby
autocmd BufNewFile,BufRead .jshintrc set filetype=javascript
autocmd BufNewFile,BufRead *.md set filetype=markdown
autocmd BufNewFile,BufRead *.pde set filetype=processing
autocmd BufRead,BufNewFile *.scss set filetype=scss.css
augroup END
| Use correct filetype for Vagrantfile and .jshintrc | Use correct filetype for Vagrantfile and .jshintrc
| VimL | mit | lpil/vimrc | viml | ## Code Before:
augroup set_filetype_group
autocmd!
autocmd BufNewFile,BufRead Guardfile set filetype=ruby
autocmd BufNewFile,BufRead *.md set filetype=markdown
autocmd BufNewFile,BufRead *.pde set filetype=processing
autocmd BufRead,BufNewFile *.scss set filetype=scss.css
augroup END
## Instruction:
Use correct filetype for Vagrantfile and .jshintrc
## Code After:
augroup set_filetype_group
autocmd!
autocmd BufNewFile,BufRead Guardfile set filetype=ruby
autocmd BufNewFile,BufRead Vagrantfile set filetype=ruby
autocmd BufNewFile,BufRead .jshintrc set filetype=javascript
autocmd BufNewFile,BufRead *.md set filetype=markdown
autocmd BufNewFile,BufRead *.pde set filetype=processing
autocmd BufRead,BufNewFile *.scss set filetype=scss.css
augroup END
| augroup set_filetype_group
autocmd!
autocmd BufNewFile,BufRead Guardfile set filetype=ruby
+ autocmd BufNewFile,BufRead Vagrantfile set filetype=ruby
+ autocmd BufNewFile,BufRead .jshintrc set filetype=javascript
autocmd BufNewFile,BufRead *.md set filetype=markdown
autocmd BufNewFile,BufRead *.pde set filetype=processing
autocmd BufRead,BufNewFile *.scss set filetype=scss.css
augroup END | 2 | 0.285714 | 2 | 0 |
042d21e46474090d36db1c18ee7ca851d640426a | config/prisons/KMI-kirkham.yml | config/prisons/KMI-kirkham.yml | ---
name: Kirkham
nomis_id: KMI
address:
- Freckleton Road
- ' Kirkham'
- PR4 2RN
email: [email protected]
enabled: true
estate: Kirkham
phone:
slots:
fri:
- 1300-1530
sat:
- 1300-1530
sun:
- 1300-1530
unbookable:
- 2014-12-25
| ---
name: Kirkham
nomis_id: KMI
address:
- Freckleton Road
- ' Kirkham'
- PR4 2RN
email: [email protected]
enabled: true
estate: Kirkham
phone:
slot_anomalies:
2015-12-23:
- 1315-1540
2015-12-30:
- 1315-1540
slots:
fri:
- 1300-1530
sat:
- 1300-1530
sun:
- 1300-1530
unbookable:
- 2014-12-25
- 2015-12-24
- 2015-12-25
- 2015-12-31
- 2016-01-01
| Update Kirkham Christmas visit slots | Update Kirkham Christmas visit slots
Unbookable:
- Christmas Eve
- Christmas Day
- New Year's Eve
- New Year's Day
Additional:
- 23rd Dec 1315-1540
- 30th Dec 1315-1540 | YAML | mit | ministryofjustice/prison-visits,ministryofjustice/prison-visits,ministryofjustice/prison-visits | yaml | ## Code Before:
---
name: Kirkham
nomis_id: KMI
address:
- Freckleton Road
- ' Kirkham'
- PR4 2RN
email: [email protected]
enabled: true
estate: Kirkham
phone:
slots:
fri:
- 1300-1530
sat:
- 1300-1530
sun:
- 1300-1530
unbookable:
- 2014-12-25
## Instruction:
Update Kirkham Christmas visit slots
Unbookable:
- Christmas Eve
- Christmas Day
- New Year's Eve
- New Year's Day
Additional:
- 23rd Dec 1315-1540
- 30th Dec 1315-1540
## Code After:
---
name: Kirkham
nomis_id: KMI
address:
- Freckleton Road
- ' Kirkham'
- PR4 2RN
email: [email protected]
enabled: true
estate: Kirkham
phone:
slot_anomalies:
2015-12-23:
- 1315-1540
2015-12-30:
- 1315-1540
slots:
fri:
- 1300-1530
sat:
- 1300-1530
sun:
- 1300-1530
unbookable:
- 2014-12-25
- 2015-12-24
- 2015-12-25
- 2015-12-31
- 2016-01-01
| ---
name: Kirkham
nomis_id: KMI
address:
- Freckleton Road
- ' Kirkham'
- PR4 2RN
email: [email protected]
enabled: true
estate: Kirkham
phone:
+ slot_anomalies:
+ 2015-12-23:
+ - 1315-1540
+ 2015-12-30:
+ - 1315-1540
slots:
fri:
- 1300-1530
sat:
- 1300-1530
sun:
- 1300-1530
unbookable:
- 2014-12-25
+ - 2015-12-24
+ - 2015-12-25
+ - 2015-12-31
+ - 2016-01-01 | 9 | 0.45 | 9 | 0 |
d37bef6459cc2810660dfe702e46f5a303a02601 | composer.json | composer.json | {
"name": "flipbox/lumen-generator",
"description": "A Lumen Generator You Are Missing",
"type": "library",
"require": {
"illuminate/support": "^5.4|^6.0",
"symfony/var-dumper": "^3.1|^4.1|^4.2|^4.3",
"psy/psysh": "0.8.*|0.9.*",
"classpreloader/classpreloader": "^3.0|^4.0"
},
"license": "MIT",
"authors": [
{
"name": "Krisan Alfa Timur",
"email": "[email protected]"
}
],
"autoload": {
"psr-4": {
"Flipbox\\LumenGenerator\\": "src/LumenGenerator/"
}
}
}
| {
"name": "flipbox/lumen-generator",
"description": "A Lumen Generator You Are Missing",
"type": "library",
"require": {
"illuminate/support": "^5.4|^6.0|^7.0",
"symfony/var-dumper": "^3.1|^4.1|^4.2|^4.3|^5.0",
"psy/psysh": "0.8.*|0.9.*",
"classpreloader/classpreloader": "^3.0|^4.0"
},
"license": "MIT",
"authors": [
{
"name": "Krisan Alfa Timur",
"email": "[email protected]"
}
],
"autoload": {
"psr-4": {
"Flipbox\\LumenGenerator\\": "src/LumenGenerator/"
}
}
} | Add support for Lumen ^7.x | Add support for Lumen ^7.x
| JSON | mit | flipboxstudio/lumen-generator | json | ## Code Before:
{
"name": "flipbox/lumen-generator",
"description": "A Lumen Generator You Are Missing",
"type": "library",
"require": {
"illuminate/support": "^5.4|^6.0",
"symfony/var-dumper": "^3.1|^4.1|^4.2|^4.3",
"psy/psysh": "0.8.*|0.9.*",
"classpreloader/classpreloader": "^3.0|^4.0"
},
"license": "MIT",
"authors": [
{
"name": "Krisan Alfa Timur",
"email": "[email protected]"
}
],
"autoload": {
"psr-4": {
"Flipbox\\LumenGenerator\\": "src/LumenGenerator/"
}
}
}
## Instruction:
Add support for Lumen ^7.x
## Code After:
{
"name": "flipbox/lumen-generator",
"description": "A Lumen Generator You Are Missing",
"type": "library",
"require": {
"illuminate/support": "^5.4|^6.0|^7.0",
"symfony/var-dumper": "^3.1|^4.1|^4.2|^4.3|^5.0",
"psy/psysh": "0.8.*|0.9.*",
"classpreloader/classpreloader": "^3.0|^4.0"
},
"license": "MIT",
"authors": [
{
"name": "Krisan Alfa Timur",
"email": "[email protected]"
}
],
"autoload": {
"psr-4": {
"Flipbox\\LumenGenerator\\": "src/LumenGenerator/"
}
}
} | {
"name": "flipbox/lumen-generator",
"description": "A Lumen Generator You Are Missing",
"type": "library",
"require": {
- "illuminate/support": "^5.4|^6.0",
+ "illuminate/support": "^5.4|^6.0|^7.0",
? +++++
- "symfony/var-dumper": "^3.1|^4.1|^4.2|^4.3",
+ "symfony/var-dumper": "^3.1|^4.1|^4.2|^4.3|^5.0",
? +++++
"psy/psysh": "0.8.*|0.9.*",
"classpreloader/classpreloader": "^3.0|^4.0"
},
"license": "MIT",
"authors": [
{
"name": "Krisan Alfa Timur",
"email": "[email protected]"
}
],
"autoload": {
"psr-4": {
"Flipbox\\LumenGenerator\\": "src/LumenGenerator/"
}
}
} | 4 | 0.173913 | 2 | 2 |
d7d5c4fd076951df4ba171329b4b99e250c8282f | lib/data_kitten/origins/git.rb | lib/data_kitten/origins/git.rb | module DataKitten
module Origins
# Git origin module. Automatically mixed into {Dataset} for datasets that are loaded from Git repositories.
#
# @see Dataset
#
module Git
private
def self.supported?(uri)
uri =~ /\A(git|https?):\/\/.*\.git\Z/
end
public
# The origin type of the dataset.
# @return [Symbol] +:git+
# @see Dataset#origin
def origin
:git
end
# A history of changes to the Dataset, taken from the full git changelog
# @see Dataset#change_history
def change_history
@change_history ||= begin
repository.log.map{|commit| commit}
end
end
protected
def load_file(path)
# Make sure we have a working copy
repository
# read file
File.read(File.join(working_copy_path, path))
end
private
def working_copy_path
# Create holding directory
FileUtils.mkdir_p(File.join(File.dirname(__FILE__), 'tmp', 'repositories'))
# generate working copy dir
File.join(File.dirname(__FILE__), 'tmp', 'repositories', @access_url.gsub('/','-'))
end
def repository
@repository ||= begin
repo = ::Git.open(working_copy_path)
repo.pull("origin", "master")
repo
rescue ArgumentError
repo = ::Git.clone(@access_url, working_copy_path)
end
end
end
end
end | module DataKitten
module Origins
# Git origin module. Automatically mixed into {Dataset} for datasets that are loaded from Git repositories.
#
# @see Dataset
#
module Git
private
def self.supported?(uri)
uri =~ /\A(git|https?):\/\/.*\.git\Z/
end
public
# The origin type of the dataset.
# @return [Symbol] +:git+
# @see Dataset#origin
def origin
:git
end
# A history of changes to the Dataset, taken from the full git changelog
# @see Dataset#change_history
def change_history
@change_history ||= begin
repository.log.map{|commit| commit}
end
end
protected
def load_file(path)
# Make sure we have a working copy
repository
# read file
File.read(File.join(working_copy_path, path))
end
private
def working_copy_path
# Create holding directory
FileUtils.mkdir_p(File.join(File.dirname(__FILE__), '..', '..', '..', 'tmp', 'repositories'))
# generate working copy dir
File.join(File.dirname(__FILE__), '..', '..', '..', 'tmp', 'repositories', @access_url.gsub('/','-'))
end
def repository
@repository ||= begin
repo = ::Git.open(working_copy_path)
repo.pull("origin", "master")
repo
rescue ArgumentError
repo = ::Git.clone(@access_url, working_copy_path)
end
end
end
end
end | Make tmp folder in gem root | Make tmp folder in gem root
| Ruby | mit | theodi/data_kitten | ruby | ## Code Before:
module DataKitten
module Origins
# Git origin module. Automatically mixed into {Dataset} for datasets that are loaded from Git repositories.
#
# @see Dataset
#
module Git
private
def self.supported?(uri)
uri =~ /\A(git|https?):\/\/.*\.git\Z/
end
public
# The origin type of the dataset.
# @return [Symbol] +:git+
# @see Dataset#origin
def origin
:git
end
# A history of changes to the Dataset, taken from the full git changelog
# @see Dataset#change_history
def change_history
@change_history ||= begin
repository.log.map{|commit| commit}
end
end
protected
def load_file(path)
# Make sure we have a working copy
repository
# read file
File.read(File.join(working_copy_path, path))
end
private
def working_copy_path
# Create holding directory
FileUtils.mkdir_p(File.join(File.dirname(__FILE__), 'tmp', 'repositories'))
# generate working copy dir
File.join(File.dirname(__FILE__), 'tmp', 'repositories', @access_url.gsub('/','-'))
end
def repository
@repository ||= begin
repo = ::Git.open(working_copy_path)
repo.pull("origin", "master")
repo
rescue ArgumentError
repo = ::Git.clone(@access_url, working_copy_path)
end
end
end
end
end
## Instruction:
Make tmp folder in gem root
## Code After:
module DataKitten
module Origins
# Git origin module. Automatically mixed into {Dataset} for datasets that are loaded from Git repositories.
#
# @see Dataset
#
module Git
private
def self.supported?(uri)
uri =~ /\A(git|https?):\/\/.*\.git\Z/
end
public
# The origin type of the dataset.
# @return [Symbol] +:git+
# @see Dataset#origin
def origin
:git
end
# A history of changes to the Dataset, taken from the full git changelog
# @see Dataset#change_history
def change_history
@change_history ||= begin
repository.log.map{|commit| commit}
end
end
protected
def load_file(path)
# Make sure we have a working copy
repository
# read file
File.read(File.join(working_copy_path, path))
end
private
def working_copy_path
# Create holding directory
FileUtils.mkdir_p(File.join(File.dirname(__FILE__), '..', '..', '..', 'tmp', 'repositories'))
# generate working copy dir
File.join(File.dirname(__FILE__), '..', '..', '..', 'tmp', 'repositories', @access_url.gsub('/','-'))
end
def repository
@repository ||= begin
repo = ::Git.open(working_copy_path)
repo.pull("origin", "master")
repo
rescue ArgumentError
repo = ::Git.clone(@access_url, working_copy_path)
end
end
end
end
end | module DataKitten
module Origins
# Git origin module. Automatically mixed into {Dataset} for datasets that are loaded from Git repositories.
#
# @see Dataset
#
module Git
private
def self.supported?(uri)
uri =~ /\A(git|https?):\/\/.*\.git\Z/
end
public
# The origin type of the dataset.
# @return [Symbol] +:git+
# @see Dataset#origin
def origin
:git
end
# A history of changes to the Dataset, taken from the full git changelog
# @see Dataset#change_history
def change_history
@change_history ||= begin
repository.log.map{|commit| commit}
end
end
protected
def load_file(path)
# Make sure we have a working copy
repository
# read file
File.read(File.join(working_copy_path, path))
end
private
def working_copy_path
# Create holding directory
- FileUtils.mkdir_p(File.join(File.dirname(__FILE__), 'tmp', 'repositories'))
+ FileUtils.mkdir_p(File.join(File.dirname(__FILE__), '..', '..', '..', 'tmp', 'repositories'))
? ++++++++++++++++++
# generate working copy dir
- File.join(File.dirname(__FILE__), 'tmp', 'repositories', @access_url.gsub('/','-'))
+ File.join(File.dirname(__FILE__), '..', '..', '..', 'tmp', 'repositories', @access_url.gsub('/','-'))
? ++++++++++++++++++
end
def repository
@repository ||= begin
repo = ::Git.open(working_copy_path)
repo.pull("origin", "master")
repo
rescue ArgumentError
repo = ::Git.clone(@access_url, working_copy_path)
end
end
end
end
end | 4 | 0.060606 | 2 | 2 |
e1245fdf5db15718a26fc4ce3dddf4ebad639052 | source/nuPickers/Shared/CustomLabel/CustomLabelConfig.html | source/nuPickers/Shared/CustomLabel/CustomLabelConfig.html |
<div ng-controller="nuPickers.Shared.CustomLabel.CustomLabelConfigController" class="nuPickers-config">
<div>
<label for="">
Custom Label
<small>(optional) process each item though a macro, can use the parameters: key, keys, counter and total</small>
</label>
<div>
<select ng-model="model.value"
ng-options="macro.alias as macro.name for macro in macros">
<option value=""></option>
</select>
</div>
</div>
</div> |
<div ng-controller="nuPickers.Shared.CustomLabel.CustomLabelConfigController" class="nuPickers-config">
<div>
<label for="">
Custom Label
<small>(optional) process each item through a macro; Can use the parameters: contextId, propertyAlias, key, label, keys, counter and total</small>
</label>
<div>
<select ng-model="model.value"
ng-options="macro.alias as macro.name for macro in macros">
<option value=""></option>
</select>
</div>
</div>
</div> | Fix typo and add missing keys | Fix typo and add missing keys
| HTML | mit | abjerner/nuPickers,LottePitcher/nuPickers,abjerner/nuPickers,JimBobSquarePants/nuPickers,uComponents/nuPickers,iahdevelop/nuPickers,JimBobSquarePants/nuPickers,uComponents/nuPickers,LottePitcher/nuPickers,abjerner/nuPickers,JimBobSquarePants/nuPickers,uComponents/nuPickers,LottePitcher/nuPickers,iahdevelop/nuPickers,iahdevelop/nuPickers | html | ## Code Before:
<div ng-controller="nuPickers.Shared.CustomLabel.CustomLabelConfigController" class="nuPickers-config">
<div>
<label for="">
Custom Label
<small>(optional) process each item though a macro, can use the parameters: key, keys, counter and total</small>
</label>
<div>
<select ng-model="model.value"
ng-options="macro.alias as macro.name for macro in macros">
<option value=""></option>
</select>
</div>
</div>
</div>
## Instruction:
Fix typo and add missing keys
## Code After:
<div ng-controller="nuPickers.Shared.CustomLabel.CustomLabelConfigController" class="nuPickers-config">
<div>
<label for="">
Custom Label
<small>(optional) process each item through a macro; Can use the parameters: contextId, propertyAlias, key, label, keys, counter and total</small>
</label>
<div>
<select ng-model="model.value"
ng-options="macro.alias as macro.name for macro in macros">
<option value=""></option>
</select>
</div>
</div>
</div> |
<div ng-controller="nuPickers.Shared.CustomLabel.CustomLabelConfigController" class="nuPickers-config">
<div>
<label for="">
Custom Label
- <small>(optional) process each item though a macro, can use the parameters: key, keys, counter and total</small>
? ^ ^
+ <small>(optional) process each item through a macro; Can use the parameters: contextId, propertyAlias, key, label, keys, counter and total</small>
? + ^ ^ ++++++++++++++++++++++++++ +++++++
</label>
<div>
<select ng-model="model.value"
ng-options="macro.alias as macro.name for macro in macros">
<option value=""></option>
</select>
</div>
</div>
</div> | 2 | 0.090909 | 1 | 1 |
122c5dec3f15037f2ae3decc8661cdebdbc16f68 | README.md | README.md |
The paper and code can be found [here](http://sanghosuh.github.io/data/lens_nmf_icdm.pdf) and [there](https://github.com/sanghosuh/lens_nmf-matlab), respectively.
Full citation is as follows.
1. Suh, Sangho, et al. "L-EnsNMF: Boosted Local Topic Discovery via Ensemble of Nonnegative Matrix Factorization."
Proceedings of the IEEE International Conference on Data Mining (ICDM), 2016, Barcelona, Spain.
Best Student Paper Award (out of 917 total submissions).
|
The paper and code can be found [here](http://sanghosuh.github.io/papers/lensnmf_icdm.pdf) and [there](https://github.com/sanghosuh/lens_nmf-matlab), respectively.
To check out the presentation, click [here](https://sanghosuh.github.io/lens_nmf-icdm/).
Full citation is as follows.
1. Suh, Sangho, et al. "L-EnsNMF: Boosted Local Topic Discovery via Ensemble of Nonnegative Matrix Factorization."
Proceedings of the IEEE International Conference on Data Mining (ICDM), 2016, Barcelona, Spain.
Best Student Paper Award (out of 917 total submissions).
| Fix link to paper and add link to presentation | Fix link to paper and add link to presentation | Markdown | mit | sanghosuh/lens_nmf-icdm,sanghosuh/lens_nmf-icdm | markdown | ## Code Before:
The paper and code can be found [here](http://sanghosuh.github.io/data/lens_nmf_icdm.pdf) and [there](https://github.com/sanghosuh/lens_nmf-matlab), respectively.
Full citation is as follows.
1. Suh, Sangho, et al. "L-EnsNMF: Boosted Local Topic Discovery via Ensemble of Nonnegative Matrix Factorization."
Proceedings of the IEEE International Conference on Data Mining (ICDM), 2016, Barcelona, Spain.
Best Student Paper Award (out of 917 total submissions).
## Instruction:
Fix link to paper and add link to presentation
## Code After:
The paper and code can be found [here](http://sanghosuh.github.io/papers/lensnmf_icdm.pdf) and [there](https://github.com/sanghosuh/lens_nmf-matlab), respectively.
To check out the presentation, click [here](https://sanghosuh.github.io/lens_nmf-icdm/).
Full citation is as follows.
1. Suh, Sangho, et al. "L-EnsNMF: Boosted Local Topic Discovery via Ensemble of Nonnegative Matrix Factorization."
Proceedings of the IEEE International Conference on Data Mining (ICDM), 2016, Barcelona, Spain.
Best Student Paper Award (out of 917 total submissions).
|
+ The paper and code can be found [here](http://sanghosuh.github.io/papers/lensnmf_icdm.pdf) and [there](https://github.com/sanghosuh/lens_nmf-matlab), respectively.
- The paper and code can be found [here](http://sanghosuh.github.io/data/lens_nmf_icdm.pdf) and [there](https://github.com/sanghosuh/lens_nmf-matlab), respectively.
+ To check out the presentation, click [here](https://sanghosuh.github.io/lens_nmf-icdm/).
Full citation is as follows.
1. Suh, Sangho, et al. "L-EnsNMF: Boosted Local Topic Discovery via Ensemble of Nonnegative Matrix Factorization."
Proceedings of the IEEE International Conference on Data Mining (ICDM), 2016, Barcelona, Spain.
Best Student Paper Award (out of 917 total submissions).
| 3 | 0.3 | 2 | 1 |
d6092f14a4755ba9f19b3c39e1e5b7fcbcebebda | mkdocs.yml | mkdocs.yml | site_name: Peering Manager
pages:
- 'Introduction': 'index.md'
- 'Setup':
- 'PostgreSQL': 'setup/postgresql.md'
- 'Peering Manager': 'setup/peering-manager.md'
- 'Web Server': 'setup/web-server.md'
- 'Logging': 'setup/logging.md'
- 'LDAP': 'setup/ldap.md'
- 'Upgrading': 'setup/upgrading.md'
- 'Scheduled Tasks': 'setup/scheduled-tasks.md'
- 'User Manual': 'man.md'
- 'Templating': 'config-template.md'
- 'Integration': 'integration.md'
markdown_extensions:
- admonition:
theme: readthedocs
| site_name: Peering Manager
pages:
- 'Introduction': 'index.md'
- 'Setup':
- 'PostgreSQL': 'setup/postgresql.md'
- 'Peering Manager': 'setup/peering-manager.md'
- 'Web Server': 'setup/web-server.md'
- 'Logging': 'setup/logging.md'
- 'LDAP': 'setup/ldap.md'
- 'Upgrading': 'setup/upgrading.md'
- 'Scheduled Tasks': 'setup/scheduled-tasks.md'
- 'User Manual': 'man.md'
- 'Templating': 'config-template.md'
- 'Integration': 'integration.md'
theme: readthedocs
| Remove useless mardown extension for doc generation. | Remove useless mardown extension for doc generation.
| YAML | apache-2.0 | respawner/peering-manager,respawner/peering-manager,respawner/peering-manager,respawner/peering-manager | yaml | ## Code Before:
site_name: Peering Manager
pages:
- 'Introduction': 'index.md'
- 'Setup':
- 'PostgreSQL': 'setup/postgresql.md'
- 'Peering Manager': 'setup/peering-manager.md'
- 'Web Server': 'setup/web-server.md'
- 'Logging': 'setup/logging.md'
- 'LDAP': 'setup/ldap.md'
- 'Upgrading': 'setup/upgrading.md'
- 'Scheduled Tasks': 'setup/scheduled-tasks.md'
- 'User Manual': 'man.md'
- 'Templating': 'config-template.md'
- 'Integration': 'integration.md'
markdown_extensions:
- admonition:
theme: readthedocs
## Instruction:
Remove useless mardown extension for doc generation.
## Code After:
site_name: Peering Manager
pages:
- 'Introduction': 'index.md'
- 'Setup':
- 'PostgreSQL': 'setup/postgresql.md'
- 'Peering Manager': 'setup/peering-manager.md'
- 'Web Server': 'setup/web-server.md'
- 'Logging': 'setup/logging.md'
- 'LDAP': 'setup/ldap.md'
- 'Upgrading': 'setup/upgrading.md'
- 'Scheduled Tasks': 'setup/scheduled-tasks.md'
- 'User Manual': 'man.md'
- 'Templating': 'config-template.md'
- 'Integration': 'integration.md'
theme: readthedocs
| site_name: Peering Manager
pages:
- 'Introduction': 'index.md'
- 'Setup':
- 'PostgreSQL': 'setup/postgresql.md'
- 'Peering Manager': 'setup/peering-manager.md'
- 'Web Server': 'setup/web-server.md'
- 'Logging': 'setup/logging.md'
- 'LDAP': 'setup/ldap.md'
- 'Upgrading': 'setup/upgrading.md'
- 'Scheduled Tasks': 'setup/scheduled-tasks.md'
- 'User Manual': 'man.md'
- 'Templating': 'config-template.md'
- 'Integration': 'integration.md'
- markdown_extensions:
- - admonition:
-
theme: readthedocs | 3 | 0.15 | 0 | 3 |
3990e3aa64cff288def07ee36e24026cc15282c0 | taiga/projects/issues/serializers.py | taiga/projects/issues/serializers.py |
from rest_framework import serializers
from taiga.base.serializers import PickleField, NeighborsSerializerMixin
from . import models
class IssueSerializer(serializers.ModelSerializer):
tags = PickleField(required=False)
comment = serializers.SerializerMethodField("get_comment")
is_closed = serializers.Field(source="is_closed")
class Meta:
model = models.Issue
def get_comment(self, obj):
return ""
class IssueNeighborsSerializer(NeighborsSerializerMixin, IssueSerializer):
def serialize_neighbor(self, neighbor):
return NeighborIssueSerializer(neighbor).data
class NeighborIssueSerializer(serializers.ModelSerializer):
class Meta:
model = models.Issue
fields = ("id", "ref", "subject")
depth = 0
|
from rest_framework import serializers
from taiga.base.serializers import PickleField, NeighborsSerializerMixin
from . import models
class IssueSerializer(serializers.ModelSerializer):
tags = PickleField(required=False)
is_closed = serializers.Field(source="is_closed")
class Meta:
model = models.Issue
class IssueNeighborsSerializer(NeighborsSerializerMixin, IssueSerializer):
def serialize_neighbor(self, neighbor):
return NeighborIssueSerializer(neighbor).data
class NeighborIssueSerializer(serializers.ModelSerializer):
class Meta:
model = models.Issue
fields = ("id", "ref", "subject")
depth = 0
| Remove unnecessary field from IssueSerializer | Remove unnecessary field from IssueSerializer
| Python | agpl-3.0 | forging2012/taiga-back,EvgeneOskin/taiga-back,xdevelsistemas/taiga-back-community,seanchen/taiga-back,bdang2012/taiga-back-casting,Rademade/taiga-back,crr0004/taiga-back,dayatz/taiga-back,rajiteh/taiga-back,dycodedev/taiga-back,crr0004/taiga-back,obimod/taiga-back,Zaneh-/bearded-tribble-back,seanchen/taiga-back,gauravjns/taiga-back,joshisa/taiga-back,19kestier/taiga-back,jeffdwyatt/taiga-back,taigaio/taiga-back,WALR/taiga-back,joshisa/taiga-back,astronaut1712/taiga-back,taigaio/taiga-back,coopsource/taiga-back,gam-phon/taiga-back,Rademade/taiga-back,obimod/taiga-back,obimod/taiga-back,CMLL/taiga-back,frt-arch/taiga-back,dycodedev/taiga-back,bdang2012/taiga-back-casting,Tigerwhit4/taiga-back,19kestier/taiga-back,EvgeneOskin/taiga-back,EvgeneOskin/taiga-back,astagi/taiga-back,bdang2012/taiga-back-casting,Zaneh-/bearded-tribble-back,dayatz/taiga-back,CoolCloud/taiga-back,astronaut1712/taiga-back,jeffdwyatt/taiga-back,crr0004/taiga-back,WALR/taiga-back,gam-phon/taiga-back,CMLL/taiga-back,seanchen/taiga-back,astagi/taiga-back,gauravjns/taiga-back,gam-phon/taiga-back,WALR/taiga-back,jeffdwyatt/taiga-back,Tigerwhit4/taiga-back,Zaneh-/bearded-tribble-back,seanchen/taiga-back,xdevelsistemas/taiga-back-community,coopsource/taiga-back,astagi/taiga-back,EvgeneOskin/taiga-back,obimod/taiga-back,gam-phon/taiga-back,coopsource/taiga-back,CoolCloud/taiga-back,rajiteh/taiga-back,dycodedev/taiga-back,bdang2012/taiga-back-casting,19kestier/taiga-back,astronaut1712/taiga-back,forging2012/taiga-back,CMLL/taiga-back,frt-arch/taiga-back,astagi/taiga-back,WALR/taiga-back,forging2012/taiga-back,rajiteh/taiga-back,frt-arch/taiga-back,Rademade/taiga-back,xdevelsistemas/taiga-back-community,taigaio/taiga-back,joshisa/taiga-back,gauravjns/taiga-back,Rademade/taiga-back,crr0004/taiga-back,forging2012/taiga-back,joshisa/taiga-back,CMLL/taiga-back,dycodedev/taiga-back,coopsource/taiga-back,CoolCloud/taiga-back,Rademade/taiga-back,astronaut1712/taiga-back,jeffdwyatt/taiga-back,CoolCloud/taiga-back,gauravjns/taiga-back,rajiteh/taiga-back,dayatz/taiga-back,Tigerwhit4/taiga-back,Tigerwhit4/taiga-back | python | ## Code Before:
from rest_framework import serializers
from taiga.base.serializers import PickleField, NeighborsSerializerMixin
from . import models
class IssueSerializer(serializers.ModelSerializer):
tags = PickleField(required=False)
comment = serializers.SerializerMethodField("get_comment")
is_closed = serializers.Field(source="is_closed")
class Meta:
model = models.Issue
def get_comment(self, obj):
return ""
class IssueNeighborsSerializer(NeighborsSerializerMixin, IssueSerializer):
def serialize_neighbor(self, neighbor):
return NeighborIssueSerializer(neighbor).data
class NeighborIssueSerializer(serializers.ModelSerializer):
class Meta:
model = models.Issue
fields = ("id", "ref", "subject")
depth = 0
## Instruction:
Remove unnecessary field from IssueSerializer
## Code After:
from rest_framework import serializers
from taiga.base.serializers import PickleField, NeighborsSerializerMixin
from . import models
class IssueSerializer(serializers.ModelSerializer):
tags = PickleField(required=False)
is_closed = serializers.Field(source="is_closed")
class Meta:
model = models.Issue
class IssueNeighborsSerializer(NeighborsSerializerMixin, IssueSerializer):
def serialize_neighbor(self, neighbor):
return NeighborIssueSerializer(neighbor).data
class NeighborIssueSerializer(serializers.ModelSerializer):
class Meta:
model = models.Issue
fields = ("id", "ref", "subject")
depth = 0
|
from rest_framework import serializers
from taiga.base.serializers import PickleField, NeighborsSerializerMixin
from . import models
class IssueSerializer(serializers.ModelSerializer):
tags = PickleField(required=False)
- comment = serializers.SerializerMethodField("get_comment")
is_closed = serializers.Field(source="is_closed")
class Meta:
model = models.Issue
-
- def get_comment(self, obj):
- return ""
class IssueNeighborsSerializer(NeighborsSerializerMixin, IssueSerializer):
def serialize_neighbor(self, neighbor):
return NeighborIssueSerializer(neighbor).data
class NeighborIssueSerializer(serializers.ModelSerializer):
class Meta:
model = models.Issue
fields = ("id", "ref", "subject")
depth = 0 | 4 | 0.129032 | 0 | 4 |
a37656c1325a0e5afbd469070013aa2ee5184b65 | docs/library/sys.rst | docs/library/sys.rst | :mod:`sys` -- system specific functions
=======================================
.. module:: sys
:synopsis: system specific functions
Functions
---------
.. function:: exit([retval])
Raise a ``SystemExit`` exception. If an argument is given, it is the
value given to ``SystemExit``.
.. function:: print_exception(exc, [file])
Print exception with a traceback to a file-like object ``file`` (or
``sys.stdout`` by default).
.. admonition:: Difference to CPython
This function appears in the ``traceback`` module in CPython.
Constants
---------
.. data:: argv
a mutable list of arguments this program started with
.. data:: byteorder
the byte order of the system ("little" or "big")
.. data:: path
a mutable list of directories to search for imported modules
.. data:: platform
The platform that Micro Python is running on. This is "pyboard" on the
pyboard and provides a robust way of determining if a script is running
on the pyboard or not.
.. data:: stderr
standard error (connected to USB VCP, and optional UART object)
.. data:: stdin
standard input (connected to USB VCP, and optional UART object)
.. data:: stdout
standard output (connected to USB VCP, and optional UART object)
.. data:: version
Python language version that this implementation conforms to, as a string
.. data:: version_info
Python language version that this implementation conforms to, as a tuple of ints
| :mod:`sys` -- system specific functions
=======================================
.. module:: sys
:synopsis: system specific functions
Functions
---------
.. function:: exit([retval])
Raise a ``SystemExit`` exception. If an argument is given, it is the
value given to ``SystemExit``.
.. function:: print_exception(exc, [file])
Print exception with a traceback to a file-like object ``file`` (or
``sys.stdout`` by default).
.. admonition:: Difference to CPython
:class: attention
This function appears in the ``traceback`` module in CPython.
Constants
---------
.. data:: argv
a mutable list of arguments this program started with
.. data:: byteorder
the byte order of the system ("little" or "big")
.. data:: path
a mutable list of directories to search for imported modules
.. data:: platform
The platform that Micro Python is running on. This is "pyboard" on the
pyboard and provides a robust way of determining if a script is running
on the pyboard or not.
.. data:: stderr
standard error (connected to USB VCP, and optional UART object)
.. data:: stdin
standard input (connected to USB VCP, and optional UART object)
.. data:: stdout
standard output (connected to USB VCP, and optional UART object)
.. data:: version
Python language version that this implementation conforms to, as a string
.. data:: version_info
Python language version that this implementation conforms to, as a tuple of ints
| Make admonition for CPy-difference use "attention" class. | docs: Make admonition for CPy-difference use "attention" class.
This renders it in yellow/orange box on RTD server.
| reStructuredText | mit | infinnovation/micropython,paul-xxx/micropython,kerneltask/micropython,hosaka/micropython,bvernoux/micropython,MrSurly/micropython,Peetz0r/micropython-esp32,supergis/micropython,aethaniel/micropython,henriknelson/micropython,xyb/micropython,dinau/micropython,neilh10/micropython,PappaPeppar/micropython,selste/micropython,pfalcon/micropython,AriZuu/micropython,vriera/micropython,cnoviello/micropython,hiway/micropython,HenrikSolver/micropython,danicampora/micropython,xyb/micropython,galenhz/micropython,omtinez/micropython,misterdanb/micropython,MrSurly/micropython-esp32,vriera/micropython,infinnovation/micropython,galenhz/micropython,toolmacher/micropython,SHA2017-badge/micropython-esp32,swegener/micropython,alex-robbins/micropython,utopiaprince/micropython,SHA2017-badge/micropython-esp32,mpalomer/micropython,kostyll/micropython,ganshun666/micropython,HenrikSolver/micropython,Vogtinator/micropython,puuu/micropython,dhylands/micropython,tuc-osg/micropython,praemdonck/micropython,jmarcelino/pycom-micropython,skybird6672/micropython,firstval/micropython,vitiral/micropython,blmorris/micropython,danicampora/micropython,toolmacher/micropython,jlillest/micropython,micropython/micropython-esp32,adafruit/circuitpython,heisewangluo/micropython,AriZuu/micropython,EcmaXp/micropython,dinau/micropython,alex-march/micropython,heisewangluo/micropython,slzatz/micropython,noahwilliamsson/micropython,bvernoux/micropython,lowRISC/micropython,drrk/micropython,alex-robbins/micropython,EcmaXp/micropython,aethaniel/micropython,feilongfl/micropython,infinnovation/micropython,utopiaprince/micropython,oopy/micropython,orionrobots/micropython,MrSurly/micropython,cwyark/micropython,ericsnowcurrently/micropython,feilongfl/micropython,xhat/micropython,paul-xxx/micropython,firstval/micropython,deshipu/micropython,kostyll/micropython,pfalcon/micropython,noahwilliamsson/micropython,TDAbboud/micropython,praemdonck/micropython,martinribelotta/micropython,blazewicz/micropython,adafruit/circuitpython,puuu/micropython,tobbad/micropython,ChuckM/micropython,ceramos/micropython,chrisdearman/micropython,cloudformdesign/micropython,ahotam/micropython,dhylands/micropython,tdautc19841202/micropython,turbinenreiter/micropython,rubencabrera/micropython,noahchense/micropython,micropython/micropython-esp32,utopiaprince/micropython,ChuckM/micropython,tuc-osg/micropython,stonegithubs/micropython,jimkmc/micropython,slzatz/micropython,adamkh/micropython,stonegithubs/micropython,suda/micropython,tdautc19841202/micropython,PappaPeppar/micropython,mgyenik/micropython,adafruit/circuitpython,ernesto-g/micropython,cwyark/micropython,matthewelse/micropython,xuxiaoxin/micropython,noahchense/micropython,redbear/micropython,jlillest/micropython,ernesto-g/micropython,dxxb/micropython,chrisdearman/micropython,misterdanb/micropython,dinau/micropython,torwag/micropython,slzatz/micropython,xhat/micropython,noahwilliamsson/micropython,HenrikSolver/micropython,SHA2017-badge/micropython-esp32,chrisdearman/micropython,firstval/micropython,henriknelson/micropython,ernesto-g/micropython,suda/micropython,puuu/micropython,SungEun-Steve-Kim/test-mp,ganshun666/micropython,MrSurly/micropython-esp32,Timmenem/micropython,tralamazza/micropython,hiway/micropython,mpalomer/micropython,emfcamp/micropython,MrSurly/micropython,mianos/micropython,ahotam/micropython,selste/micropython,paul-xxx/micropython,henriknelson/micropython,xuxiaoxin/micropython,mpalomer/micropython,slzatz/micropython,SungEun-Steve-Kim/test-mp,mpalomer/micropython,cnoviello/micropython,dhylands/micropython,orionrobots/micropython,vitiral/micropython,trezor/micropython,xyb/micropython,pozetroninc/micropython,HenrikSolver/micropython,trezor/micropython,matthewelse/micropython,aethaniel/micropython,cloudformdesign/micropython,MrSurly/micropython-esp32,pramasoul/micropython,trezor/micropython,supergis/micropython,pramasoul/micropython,vriera/micropython,PappaPeppar/micropython,dmazzella/micropython,lbattraw/micropython,paul-xxx/micropython,jlillest/micropython,kerneltask/micropython,ericsnowcurrently/micropython,feilongfl/micropython,mpalomer/micropython,warner83/micropython,pfalcon/micropython,xuxiaoxin/micropython,xhat/micropython,ceramos/micropython,pfalcon/micropython,tobbad/micropython,deshipu/micropython,ryannathans/micropython,hosaka/micropython,stonegithubs/micropython,blazewicz/micropython,KISSMonX/micropython,ryannathans/micropython,cloudformdesign/micropython,tobbad/micropython,mianos/micropython,omtinez/micropython,blmorris/micropython,ericsnowcurrently/micropython,ryannathans/micropython,hosaka/micropython,bvernoux/micropython,selste/micropython,xhat/micropython,oopy/micropython,Peetz0r/micropython-esp32,adamkh/micropython,MrSurly/micropython-esp32,swegener/micropython,trezor/micropython,mgyenik/micropython,utopiaprince/micropython,lbattraw/micropython,matthewelse/micropython,stonegithubs/micropython,suda/micropython,ceramos/micropython,xuxiaoxin/micropython,turbinenreiter/micropython,redbear/micropython,xhat/micropython,supergis/micropython,KISSMonX/micropython,lowRISC/micropython,drrk/micropython,orionrobots/micropython,pozetroninc/micropython,tdautc19841202/micropython,adafruit/micropython,lowRISC/micropython,adafruit/micropython,noahwilliamsson/micropython,rubencabrera/micropython,warner83/micropython,TDAbboud/micropython,pramasoul/micropython,chrisdearman/micropython,lbattraw/micropython,neilh10/micropython,heisewangluo/micropython,TDAbboud/micropython,AriZuu/micropython,pramasoul/micropython,misterdanb/micropython,lbattraw/micropython,tralamazza/micropython,KISSMonX/micropython,MrSurly/micropython-esp32,supergis/micropython,dxxb/micropython,skybird6672/micropython,mianos/micropython,ruffy91/micropython,micropython/micropython-esp32,warner83/micropython,deshipu/micropython,blazewicz/micropython,redbear/micropython,warner83/micropython,cwyark/micropython,dhylands/micropython,toolmacher/micropython,turbinenreiter/micropython,lowRISC/micropython,hiway/micropython,infinnovation/micropython,xyb/micropython,kostyll/micropython,redbear/micropython,SHA2017-badge/micropython-esp32,feilongfl/micropython,kerneltask/micropython,skybird6672/micropython,ceramos/micropython,tdautc19841202/micropython,noahchense/micropython,warner83/micropython,alex-robbins/micropython,ericsnowcurrently/micropython,misterdanb/micropython,kostyll/micropython,SungEun-Steve-Kim/test-mp,kerneltask/micropython,emfcamp/micropython,hosaka/micropython,neilh10/micropython,praemdonck/micropython,blmorris/micropython,hiway/micropython,tobbad/micropython,ruffy91/micropython,Vogtinator/micropython,adamkh/micropython,dxxb/micropython,aethaniel/micropython,danicampora/micropython,jlillest/micropython,jimkmc/micropython,vitiral/micropython,cnoviello/micropython,alex-robbins/micropython,suda/micropython,adafruit/circuitpython,PappaPeppar/micropython,swegener/micropython,skybird6672/micropython,tuc-osg/micropython,suda/micropython,martinribelotta/micropython,dmazzella/micropython,pozetroninc/micropython,torwag/micropython,ChuckM/micropython,jlillest/micropython,ganshun666/micropython,rubencabrera/micropython,EcmaXp/micropython,omtinez/micropython,hiway/micropython,ahotam/micropython,torwag/micropython,cloudformdesign/micropython,bvernoux/micropython,noahchense/micropython,Vogtinator/micropython,torwag/micropython,martinribelotta/micropython,tralamazza/micropython,ruffy91/micropython,pozetroninc/micropython,emfcamp/micropython,paul-xxx/micropython,kostyll/micropython,rubencabrera/micropython,ruffy91/micropython,firstval/micropython,galenhz/micropython,mhoffma/micropython,micropython/micropython-esp32,selste/micropython,ericsnowcurrently/micropython,praemdonck/micropython,alex-march/micropython,utopiaprince/micropython,orionrobots/micropython,neilh10/micropython,dxxb/micropython,cnoviello/micropython,TDAbboud/micropython,firstval/micropython,toolmacher/micropython,pramasoul/micropython,alex-march/micropython,henriknelson/micropython,adamkh/micropython,praemdonck/micropython,bvernoux/micropython,blmorris/micropython,adafruit/micropython,blmorris/micropython,drrk/micropython,MrSurly/micropython,oopy/micropython,Peetz0r/micropython-esp32,KISSMonX/micropython,adafruit/circuitpython,SungEun-Steve-Kim/test-mp,matthewelse/micropython,mhoffma/micropython,KISSMonX/micropython,jmarcelino/pycom-micropython,mianos/micropython,jimkmc/micropython,puuu/micropython,hosaka/micropython,ryannathans/micropython,cnoviello/micropython,ganshun666/micropython,vitiral/micropython,slzatz/micropython,noahchense/micropython,danicampora/micropython,ganshun666/micropython,neilh10/micropython,henriknelson/micropython,misterdanb/micropython,dinau/micropython,ChuckM/micropython,Peetz0r/micropython-esp32,ceramos/micropython,adafruit/circuitpython,stonegithubs/micropython,mhoffma/micropython,ruffy91/micropython,torwag/micropython,blazewicz/micropython,jimkmc/micropython,Timmenem/micropython,dxxb/micropython,mgyenik/micropython,oopy/micropython,Vogtinator/micropython,martinribelotta/micropython,cloudformdesign/micropython,SHA2017-badge/micropython-esp32,puuu/micropython,heisewangluo/micropython,xuxiaoxin/micropython,TDAbboud/micropython,pfalcon/micropython,redbear/micropython,emfcamp/micropython,martinribelotta/micropython,tralamazza/micropython,toolmacher/micropython,feilongfl/micropython,emfcamp/micropython,dhylands/micropython,oopy/micropython,alex-robbins/micropython,matthewelse/micropython,noahwilliamsson/micropython,vriera/micropython,adamkh/micropython,AriZuu/micropython,tuc-osg/micropython,jimkmc/micropython,omtinez/micropython,swegener/micropython,matthewelse/micropython,alex-march/micropython,lbattraw/micropython,kerneltask/micropython,Timmenem/micropython,omtinez/micropython,AriZuu/micropython,EcmaXp/micropython,Timmenem/micropython,skybird6672/micropython,Peetz0r/micropython-esp32,selste/micropython,ryannathans/micropython,danicampora/micropython,turbinenreiter/micropython,SungEun-Steve-Kim/test-mp,ahotam/micropython,cwyark/micropython,mgyenik/micropython,cwyark/micropython,aethaniel/micropython,HenrikSolver/micropython,mhoffma/micropython,mgyenik/micropython,tuc-osg/micropython,adafruit/micropython,ernesto-g/micropython,drrk/micropython,drrk/micropython,dinau/micropython,dmazzella/micropython,rubencabrera/micropython,EcmaXp/micropython,adafruit/micropython,blazewicz/micropython,deshipu/micropython,ernesto-g/micropython,MrSurly/micropython,heisewangluo/micropython,Timmenem/micropython,Vogtinator/micropython,mhoffma/micropython,jmarcelino/pycom-micropython,xyb/micropython,mianos/micropython,ChuckM/micropython,galenhz/micropython,vitiral/micropython,jmarcelino/pycom-micropython,micropython/micropython-esp32,PappaPeppar/micropython,infinnovation/micropython,dmazzella/micropython,swegener/micropython,galenhz/micropython,supergis/micropython,turbinenreiter/micropython,vriera/micropython,tobbad/micropython,deshipu/micropython,jmarcelino/pycom-micropython,orionrobots/micropython,trezor/micropython,lowRISC/micropython,tdautc19841202/micropython,pozetroninc/micropython,ahotam/micropython,alex-march/micropython,chrisdearman/micropython | restructuredtext | ## Code Before:
:mod:`sys` -- system specific functions
=======================================
.. module:: sys
:synopsis: system specific functions
Functions
---------
.. function:: exit([retval])
Raise a ``SystemExit`` exception. If an argument is given, it is the
value given to ``SystemExit``.
.. function:: print_exception(exc, [file])
Print exception with a traceback to a file-like object ``file`` (or
``sys.stdout`` by default).
.. admonition:: Difference to CPython
This function appears in the ``traceback`` module in CPython.
Constants
---------
.. data:: argv
a mutable list of arguments this program started with
.. data:: byteorder
the byte order of the system ("little" or "big")
.. data:: path
a mutable list of directories to search for imported modules
.. data:: platform
The platform that Micro Python is running on. This is "pyboard" on the
pyboard and provides a robust way of determining if a script is running
on the pyboard or not.
.. data:: stderr
standard error (connected to USB VCP, and optional UART object)
.. data:: stdin
standard input (connected to USB VCP, and optional UART object)
.. data:: stdout
standard output (connected to USB VCP, and optional UART object)
.. data:: version
Python language version that this implementation conforms to, as a string
.. data:: version_info
Python language version that this implementation conforms to, as a tuple of ints
## Instruction:
docs: Make admonition for CPy-difference use "attention" class.
This renders it in yellow/orange box on RTD server.
## Code After:
:mod:`sys` -- system specific functions
=======================================
.. module:: sys
:synopsis: system specific functions
Functions
---------
.. function:: exit([retval])
Raise a ``SystemExit`` exception. If an argument is given, it is the
value given to ``SystemExit``.
.. function:: print_exception(exc, [file])
Print exception with a traceback to a file-like object ``file`` (or
``sys.stdout`` by default).
.. admonition:: Difference to CPython
:class: attention
This function appears in the ``traceback`` module in CPython.
Constants
---------
.. data:: argv
a mutable list of arguments this program started with
.. data:: byteorder
the byte order of the system ("little" or "big")
.. data:: path
a mutable list of directories to search for imported modules
.. data:: platform
The platform that Micro Python is running on. This is "pyboard" on the
pyboard and provides a robust way of determining if a script is running
on the pyboard or not.
.. data:: stderr
standard error (connected to USB VCP, and optional UART object)
.. data:: stdin
standard input (connected to USB VCP, and optional UART object)
.. data:: stdout
standard output (connected to USB VCP, and optional UART object)
.. data:: version
Python language version that this implementation conforms to, as a string
.. data:: version_info
Python language version that this implementation conforms to, as a tuple of ints
| :mod:`sys` -- system specific functions
=======================================
.. module:: sys
:synopsis: system specific functions
Functions
---------
.. function:: exit([retval])
Raise a ``SystemExit`` exception. If an argument is given, it is the
value given to ``SystemExit``.
.. function:: print_exception(exc, [file])
Print exception with a traceback to a file-like object ``file`` (or
``sys.stdout`` by default).
.. admonition:: Difference to CPython
+ :class: attention
This function appears in the ``traceback`` module in CPython.
Constants
---------
.. data:: argv
a mutable list of arguments this program started with
.. data:: byteorder
the byte order of the system ("little" or "big")
.. data:: path
a mutable list of directories to search for imported modules
.. data:: platform
The platform that Micro Python is running on. This is "pyboard" on the
pyboard and provides a robust way of determining if a script is running
on the pyboard or not.
.. data:: stderr
standard error (connected to USB VCP, and optional UART object)
.. data:: stdin
standard input (connected to USB VCP, and optional UART object)
.. data:: stdout
standard output (connected to USB VCP, and optional UART object)
.. data:: version
Python language version that this implementation conforms to, as a string
.. data:: version_info
Python language version that this implementation conforms to, as a tuple of ints | 1 | 0.015873 | 1 | 0 |
ed434c7724cf2e7731c0b0b91a4b8efa7c424106 | nbt/src/main/java/com/voxelwind/nbt/util/CompoundTagBuilder.java | nbt/src/main/java/com/voxelwind/nbt/util/CompoundTagBuilder.java | package com.voxelwind.nbt.util;
import com.voxelwind.nbt.tags.CompoundTag;
import com.voxelwind.nbt.tags.Tag;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import java.util.HashMap;
import java.util.Map;
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class CompoundTagBuilder {
private final Map<String, Tag<?>> tagMap = new HashMap<>();
public static CompoundTagBuilder builder() {
return new CompoundTagBuilder();
}
public static CompoundTagBuilder from(CompoundTag tag) {
CompoundTagBuilder builder = new CompoundTagBuilder();
builder.tagMap.putAll(tag.getValue());
return builder;
}
public CompoundTagBuilder tag(Tag<?> tag) {
tagMap.put(tag.getName(), tag);
return this;
}
public CompoundTag buildRootTag() {
return new CompoundTag("", tagMap);
}
public CompoundTag build(String tagName) {
return new CompoundTag(tagName, tagMap);
}
}
| package com.voxelwind.nbt.util;
import com.voxelwind.nbt.tags.*;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import java.util.HashMap;
import java.util.Map;
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class CompoundTagBuilder {
private final Map<String, Tag<?>> tagMap = new HashMap<>();
public static CompoundTagBuilder builder() {
return new CompoundTagBuilder();
}
public static CompoundTagBuilder from(CompoundTag tag) {
CompoundTagBuilder builder = new CompoundTagBuilder();
builder.tagMap.putAll(tag.getValue());
return builder;
}
public CompoundTagBuilder tag(Tag<?> tag) {
tagMap.put(tag.getName(), tag);
return this;
}
public CompoundTagBuilder tag(String name, byte value) {
return tag(new ByteTag(name, value));
}
public CompoundTagBuilder tag(String name, byte [] value) {
return tag(new ByteArrayTag(name, value));
}
public CompoundTagBuilder tag(String name, double value) {
return tag(new DoubleTag(name, value));
}
public CompoundTagBuilder tag(String name, float value) {
return tag(new FloatTag(name, value));
}
public CompoundTagBuilder tag(String name, int[] value) {
return tag(new IntArrayTag(name, value));
}
public CompoundTagBuilder tag(String name, int value) {
return tag(new IntTag(name, value));
}
public CompoundTagBuilder tag(String name, long value) {
return tag(new LongTag(name, value));
}
public CompoundTagBuilder tag(String name, short value) {
return tag(new ShortTag(name, value));
}
public CompoundTagBuilder tag(String name, String value) {
return tag(new StringTag(name, value));
}
public CompoundTag buildRootTag() {
return new CompoundTag("", tagMap);
}
public CompoundTag build(String tagName) {
return new CompoundTag(tagName, tagMap);
}
}
| Add type-related tag methods to nbt-builder | Add type-related tag methods to nbt-builder
| Java | mit | voxelwind/voxelwind,voxelwind/voxelwind,minecrafter/voxelwind,voxelwind/voxelwind,minecrafter/voxelwind,minecrafter/voxelwind,minecrafter/voxelwind,voxelwind/voxelwind | java | ## Code Before:
package com.voxelwind.nbt.util;
import com.voxelwind.nbt.tags.CompoundTag;
import com.voxelwind.nbt.tags.Tag;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import java.util.HashMap;
import java.util.Map;
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class CompoundTagBuilder {
private final Map<String, Tag<?>> tagMap = new HashMap<>();
public static CompoundTagBuilder builder() {
return new CompoundTagBuilder();
}
public static CompoundTagBuilder from(CompoundTag tag) {
CompoundTagBuilder builder = new CompoundTagBuilder();
builder.tagMap.putAll(tag.getValue());
return builder;
}
public CompoundTagBuilder tag(Tag<?> tag) {
tagMap.put(tag.getName(), tag);
return this;
}
public CompoundTag buildRootTag() {
return new CompoundTag("", tagMap);
}
public CompoundTag build(String tagName) {
return new CompoundTag(tagName, tagMap);
}
}
## Instruction:
Add type-related tag methods to nbt-builder
## Code After:
package com.voxelwind.nbt.util;
import com.voxelwind.nbt.tags.*;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import java.util.HashMap;
import java.util.Map;
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class CompoundTagBuilder {
private final Map<String, Tag<?>> tagMap = new HashMap<>();
public static CompoundTagBuilder builder() {
return new CompoundTagBuilder();
}
public static CompoundTagBuilder from(CompoundTag tag) {
CompoundTagBuilder builder = new CompoundTagBuilder();
builder.tagMap.putAll(tag.getValue());
return builder;
}
public CompoundTagBuilder tag(Tag<?> tag) {
tagMap.put(tag.getName(), tag);
return this;
}
public CompoundTagBuilder tag(String name, byte value) {
return tag(new ByteTag(name, value));
}
public CompoundTagBuilder tag(String name, byte [] value) {
return tag(new ByteArrayTag(name, value));
}
public CompoundTagBuilder tag(String name, double value) {
return tag(new DoubleTag(name, value));
}
public CompoundTagBuilder tag(String name, float value) {
return tag(new FloatTag(name, value));
}
public CompoundTagBuilder tag(String name, int[] value) {
return tag(new IntArrayTag(name, value));
}
public CompoundTagBuilder tag(String name, int value) {
return tag(new IntTag(name, value));
}
public CompoundTagBuilder tag(String name, long value) {
return tag(new LongTag(name, value));
}
public CompoundTagBuilder tag(String name, short value) {
return tag(new ShortTag(name, value));
}
public CompoundTagBuilder tag(String name, String value) {
return tag(new StringTag(name, value));
}
public CompoundTag buildRootTag() {
return new CompoundTag("", tagMap);
}
public CompoundTag build(String tagName) {
return new CompoundTag(tagName, tagMap);
}
}
| package com.voxelwind.nbt.util;
- import com.voxelwind.nbt.tags.CompoundTag;
- import com.voxelwind.nbt.tags.Tag;
? ^^^
+ import com.voxelwind.nbt.tags.*;
? ^
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import java.util.HashMap;
import java.util.Map;
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class CompoundTagBuilder {
private final Map<String, Tag<?>> tagMap = new HashMap<>();
public static CompoundTagBuilder builder() {
return new CompoundTagBuilder();
}
public static CompoundTagBuilder from(CompoundTag tag) {
CompoundTagBuilder builder = new CompoundTagBuilder();
builder.tagMap.putAll(tag.getValue());
return builder;
}
public CompoundTagBuilder tag(Tag<?> tag) {
tagMap.put(tag.getName(), tag);
return this;
}
+ public CompoundTagBuilder tag(String name, byte value) {
+ return tag(new ByteTag(name, value));
+ }
+
+ public CompoundTagBuilder tag(String name, byte [] value) {
+ return tag(new ByteArrayTag(name, value));
+ }
+
+ public CompoundTagBuilder tag(String name, double value) {
+ return tag(new DoubleTag(name, value));
+ }
+
+ public CompoundTagBuilder tag(String name, float value) {
+ return tag(new FloatTag(name, value));
+ }
+
+ public CompoundTagBuilder tag(String name, int[] value) {
+ return tag(new IntArrayTag(name, value));
+ }
+
+ public CompoundTagBuilder tag(String name, int value) {
+ return tag(new IntTag(name, value));
+ }
+
+ public CompoundTagBuilder tag(String name, long value) {
+ return tag(new LongTag(name, value));
+ }
+
+ public CompoundTagBuilder tag(String name, short value) {
+ return tag(new ShortTag(name, value));
+ }
+
+ public CompoundTagBuilder tag(String name, String value) {
+ return tag(new StringTag(name, value));
+ }
+
public CompoundTag buildRootTag() {
return new CompoundTag("", tagMap);
}
public CompoundTag build(String tagName) {
return new CompoundTag(tagName, tagMap);
}
} | 39 | 1.054054 | 37 | 2 |
6122600692d8a44cd84ff85c3f8f6437aa536387 | config/initializers/secret_token.rb | config/initializers/secret_token.rb | PopHealth::Application.config.secret_token = 'd2d8152dfb0736f5ae682c88a0e416c0104b9c0271ac9834d7349653c96f38715b94fc9bad48641725b149a83e59e77d0e7554cd407bb1771f9d343ce217c596'
| PopHealth::Application.config.secret_token = 'd2d8152dfb0736f5ae682c88a0e416c0104b9c0271ac9834d7349653c96f38715b94fc9bad48641725b149a83e59e77d0e7554cd407bb1771f9d343ce217c596'
PopHealth::Application.config.secret_key_base = '3e393dd55e17e1836ea8c7feb65595d120bc2f23a58e811f1e2256dc6de615704b99c964f4149c33b4728f566a16bde4bae2a1eecc49fe7715057de4932f0f8f' | Add secret_key_base since not adding it causes depreciation errors in rails 4. | Add secret_key_base since not adding it causes depreciation errors in rails 4.
| Ruby | apache-2.0 | lrasmus/popHealth,yss-miawptgm/popHealth,lrasmus/popHealth,pophealth/popHealth,ELXR/popHealth,eedrummer/popHealth,smc-ssiddiqui/popHealth,OSEHRA/popHealth,jeremyklein/popHealth,yss-miawptgm/popHealth,ELXR/popHealth,q-centrix/popHealth,smc-ssiddiqui/popHealth,OSEHRA/popHealth,eedrummer/popHealth,lrasmus/popHealth,jeremyklein/popHealth,q-centrix/popHealth,OSEHRA/popHealth,smc-ssiddiqui/popHealth,smc-ssiddiqui/popHealth,pophealth/popHealth,pophealth/popHealth,ELXR/popHealth,alabama-medicaid-mu/popHealth,alabama-medicaid-mu/popHealth,OSEHRA/popHealth,q-centrix/popHealth,alabama-medicaid-mu/popHealth,yss-miawptgm/popHealth,jeremyklein/popHealth,jeremyklein/popHealth,lrasmus/popHealth,yss-miawptgm/popHealth,eedrummer/popHealth,q-centrix/popHealth,ELXR/popHealth,eedrummer/popHealth,alabama-medicaid-mu/popHealth | ruby | ## Code Before:
PopHealth::Application.config.secret_token = 'd2d8152dfb0736f5ae682c88a0e416c0104b9c0271ac9834d7349653c96f38715b94fc9bad48641725b149a83e59e77d0e7554cd407bb1771f9d343ce217c596'
## Instruction:
Add secret_key_base since not adding it causes depreciation errors in rails 4.
## Code After:
PopHealth::Application.config.secret_token = 'd2d8152dfb0736f5ae682c88a0e416c0104b9c0271ac9834d7349653c96f38715b94fc9bad48641725b149a83e59e77d0e7554cd407bb1771f9d343ce217c596'
PopHealth::Application.config.secret_key_base = '3e393dd55e17e1836ea8c7feb65595d120bc2f23a58e811f1e2256dc6de615704b99c964f4149c33b4728f566a16bde4bae2a1eecc49fe7715057de4932f0f8f' | PopHealth::Application.config.secret_token = 'd2d8152dfb0736f5ae682c88a0e416c0104b9c0271ac9834d7349653c96f38715b94fc9bad48641725b149a83e59e77d0e7554cd407bb1771f9d343ce217c596'
+
+ PopHealth::Application.config.secret_key_base = '3e393dd55e17e1836ea8c7feb65595d120bc2f23a58e811f1e2256dc6de615704b99c964f4149c33b4728f566a16bde4bae2a1eecc49fe7715057de4932f0f8f' | 2 | 2 | 2 | 0 |
76a5e9b2d32311b07ad1a9736f9725c24406b05e | notes/lang/elixir/index.md | notes/lang/elixir/index.md | ---
layout: page
title: 'Elixir'
date: 2014-06-07 12:00:00
---
**Installation**
{% highlight ruby %}
brew install erlang elixir
{% endhighlight %}
**Videos**
- [Elixir - A modern approach to programming for the Erlang VM on Vimeo](https://vimeo.com/53221562), Jose Valim
- [Introduction to Elixir](http://www.youtube.com/watch?v=a-off4Vznjs&feature=youtu.be), Dave Thomas
- [Think Different](https://www.youtube.com/watch?v=5hDVftaPQwY), Dave Thomas keynote at Elixir Conf 2014
| ---
layout: page
title: 'Elixir'
date: 2014-06-07 12:00:00
---
**Installation**
{% highlight ruby %}
brew install erlang elixir
{% endhighlight %}
**Bookmarks**
* [Elixir lang](http://elixir-lang.org/)
* [Phoenix guides](https://github.com/lancehalvorsen/phoenix-guides) - Guides for the Phoenix web framework
**Videos**
- [Elixir - A modern approach to programming for the Erlang VM on Vimeo](https://vimeo.com/53221562), Jose Valim
- [Introduction to Elixir](http://www.youtube.com/watch?v=a-off4Vznjs&feature=youtu.be), Dave Thomas
- [Think Different](https://www.youtube.com/watch?v=5hDVftaPQwY), Dave Thomas keynote at Elixir Conf 2014
| Add bookmark to Phoenix guides | Add bookmark to Phoenix guides
| Markdown | mit | nithinbekal/nithinbekal.github.io,nithinbekal/nithinbekal.github.io | markdown | ## Code Before:
---
layout: page
title: 'Elixir'
date: 2014-06-07 12:00:00
---
**Installation**
{% highlight ruby %}
brew install erlang elixir
{% endhighlight %}
**Videos**
- [Elixir - A modern approach to programming for the Erlang VM on Vimeo](https://vimeo.com/53221562), Jose Valim
- [Introduction to Elixir](http://www.youtube.com/watch?v=a-off4Vznjs&feature=youtu.be), Dave Thomas
- [Think Different](https://www.youtube.com/watch?v=5hDVftaPQwY), Dave Thomas keynote at Elixir Conf 2014
## Instruction:
Add bookmark to Phoenix guides
## Code After:
---
layout: page
title: 'Elixir'
date: 2014-06-07 12:00:00
---
**Installation**
{% highlight ruby %}
brew install erlang elixir
{% endhighlight %}
**Bookmarks**
* [Elixir lang](http://elixir-lang.org/)
* [Phoenix guides](https://github.com/lancehalvorsen/phoenix-guides) - Guides for the Phoenix web framework
**Videos**
- [Elixir - A modern approach to programming for the Erlang VM on Vimeo](https://vimeo.com/53221562), Jose Valim
- [Introduction to Elixir](http://www.youtube.com/watch?v=a-off4Vznjs&feature=youtu.be), Dave Thomas
- [Think Different](https://www.youtube.com/watch?v=5hDVftaPQwY), Dave Thomas keynote at Elixir Conf 2014
| ---
layout: page
title: 'Elixir'
date: 2014-06-07 12:00:00
---
**Installation**
{% highlight ruby %}
brew install erlang elixir
{% endhighlight %}
+ **Bookmarks**
+
+ * [Elixir lang](http://elixir-lang.org/)
+ * [Phoenix guides](https://github.com/lancehalvorsen/phoenix-guides) - Guides for the Phoenix web framework
+
**Videos**
- [Elixir - A modern approach to programming for the Erlang VM on Vimeo](https://vimeo.com/53221562), Jose Valim
- [Introduction to Elixir](http://www.youtube.com/watch?v=a-off4Vznjs&feature=youtu.be), Dave Thomas
- [Think Different](https://www.youtube.com/watch?v=5hDVftaPQwY), Dave Thomas keynote at Elixir Conf 2014 | 5 | 0.294118 | 5 | 0 |
014e4fe380cddcdcc5ca12a32ab6af35e87ee56e | common/postgresqlfix.py | common/postgresqlfix.py |
from django.db.models import QuerySet
def new_exclude(self, *args, **kwargs):
new_kwargs = dict()
for key, value in kwargs.items():
if not ((isinstance(value, list) and not value) or (isinstance(value, QuerySet) and not value)):
new_kwargs[key] = value
if len(new_kwargs):
return old_exclude(self, *args, **new_kwargs)
else:
return self
def new_filter(self, *args, **kwargs):
new_kwargs = dict()
for key, value in kwargs.items():
if not ((isinstance(value, list) and not value) or (isinstance(value, QuerySet) and not value)):
new_kwargs[key] = value
if len(new_kwargs):
return old_filter(self, *args, **new_kwargs)
else:
return self
old_exclude = QuerySet.exclude
QuerySet.exclude = new_exclude
old_filter = QuerySet.filter
QuerySet.filter = new_filter |
from django.db.models import QuerySet
def new_exclude(self, *args, **kwargs):
new_kwargs = dict()
for key, value in kwargs.items():
if not ((isinstance(value, list) and not value) or (isinstance(value, QuerySet) and not value)):
new_kwargs[key] = value
return old_exclude(self, *args, **new_kwargs)
def new_filter(self, *args, **kwargs):
new_kwargs = dict()
for key, value in kwargs.items():
if not ((isinstance(value, list) and not value) or (isinstance(value, QuerySet) and not value)):
new_kwargs[key] = value
return old_filter(self, *args, **new_kwargs)
old_exclude = QuerySet.exclude
QuerySet.exclude = new_exclude
old_filter = QuerySet.filter
QuerySet.filter = new_filter | Fix buggy patched QuerySet methods | Fix buggy patched QuerySet methods
| Python | agpl-3.0 | m4tx/egielda,m4tx/egielda,m4tx/egielda | python | ## Code Before:
from django.db.models import QuerySet
def new_exclude(self, *args, **kwargs):
new_kwargs = dict()
for key, value in kwargs.items():
if not ((isinstance(value, list) and not value) or (isinstance(value, QuerySet) and not value)):
new_kwargs[key] = value
if len(new_kwargs):
return old_exclude(self, *args, **new_kwargs)
else:
return self
def new_filter(self, *args, **kwargs):
new_kwargs = dict()
for key, value in kwargs.items():
if not ((isinstance(value, list) and not value) or (isinstance(value, QuerySet) and not value)):
new_kwargs[key] = value
if len(new_kwargs):
return old_filter(self, *args, **new_kwargs)
else:
return self
old_exclude = QuerySet.exclude
QuerySet.exclude = new_exclude
old_filter = QuerySet.filter
QuerySet.filter = new_filter
## Instruction:
Fix buggy patched QuerySet methods
## Code After:
from django.db.models import QuerySet
def new_exclude(self, *args, **kwargs):
new_kwargs = dict()
for key, value in kwargs.items():
if not ((isinstance(value, list) and not value) or (isinstance(value, QuerySet) and not value)):
new_kwargs[key] = value
return old_exclude(self, *args, **new_kwargs)
def new_filter(self, *args, **kwargs):
new_kwargs = dict()
for key, value in kwargs.items():
if not ((isinstance(value, list) and not value) or (isinstance(value, QuerySet) and not value)):
new_kwargs[key] = value
return old_filter(self, *args, **new_kwargs)
old_exclude = QuerySet.exclude
QuerySet.exclude = new_exclude
old_filter = QuerySet.filter
QuerySet.filter = new_filter |
from django.db.models import QuerySet
def new_exclude(self, *args, **kwargs):
new_kwargs = dict()
for key, value in kwargs.items():
if not ((isinstance(value, list) and not value) or (isinstance(value, QuerySet) and not value)):
new_kwargs[key] = value
- if len(new_kwargs):
- return old_exclude(self, *args, **new_kwargs)
? ----
+ return old_exclude(self, *args, **new_kwargs)
- else:
- return self
def new_filter(self, *args, **kwargs):
new_kwargs = dict()
for key, value in kwargs.items():
if not ((isinstance(value, list) and not value) or (isinstance(value, QuerySet) and not value)):
new_kwargs[key] = value
- if len(new_kwargs):
- return old_filter(self, *args, **new_kwargs)
? ----
+ return old_filter(self, *args, **new_kwargs)
- else:
- return self
old_exclude = QuerySet.exclude
QuerySet.exclude = new_exclude
old_filter = QuerySet.filter
QuerySet.filter = new_filter | 10 | 0.30303 | 2 | 8 |
6d107312c1bcca56ead5b4cc27b89c028f2eafeb | README.rst | README.rst | fmn.lib
=======
`fmn <https://github.com/fedora-infra/fmn>`_ is a family of systems to manage
end-user notifications triggered by
`fedmsg, the Fedora FEDerated MESsage bus <http://fedmsg.com>`_.
This module contains the internal API components and data model for Fedora
Notifications
There is a parental placeholder repo with some useful information you might
want to read through, like an `overview
<https://github.com/fedora-infra/fmn/#fedora-notifications>`_, a little
`architecture diagram <https://github.com/fedora-infra/fmn/#architecture>`_,
and some `development instructions
<https://github.com/fedora-infra/fmn/#hacking>`_ to help you get set up and
coding.
| fmn.lib
=======
`fmn <https://github.com/fedora-infra/fmn>`_ is a family of systems to manage
end-user notifications triggered by
`fedmsg, the Fedora FEDerated MESsage bus <http://fedmsg.com>`_.
This module contains the internal API components and data model for Fedora
Notifications
There is a parental placeholder repo with some useful information you might
want to read through, like an `overview
<https://github.com/fedora-infra/fmn/#fedora-notifications>`_, a little
`architecture diagram <https://github.com/fedora-infra/fmn/#architecture>`_,
and some `development instructions
<https://github.com/fedora-infra/fmn/#hacking>`_ to help you get set up and
coding.
To run the test suite, make sure you have `fmn.rules
<https://github.com/fedora-infra/fmn.rules>`_ checked out.
Then cd into fmn/lib/tests, and run nosetests.
If you have fmn.rules installed in a virtual environment,
make sure you also run nosetests from the same venv.
| Add some documentation on testing fmn.lib | Add some documentation on testing fmn.lib
Signed-off-by: Patrick Uiterwijk <[email protected]>
| reStructuredText | lgpl-2.1 | jeremycline/fmn,jeremycline/fmn,jeremycline/fmn | restructuredtext | ## Code Before:
fmn.lib
=======
`fmn <https://github.com/fedora-infra/fmn>`_ is a family of systems to manage
end-user notifications triggered by
`fedmsg, the Fedora FEDerated MESsage bus <http://fedmsg.com>`_.
This module contains the internal API components and data model for Fedora
Notifications
There is a parental placeholder repo with some useful information you might
want to read through, like an `overview
<https://github.com/fedora-infra/fmn/#fedora-notifications>`_, a little
`architecture diagram <https://github.com/fedora-infra/fmn/#architecture>`_,
and some `development instructions
<https://github.com/fedora-infra/fmn/#hacking>`_ to help you get set up and
coding.
## Instruction:
Add some documentation on testing fmn.lib
Signed-off-by: Patrick Uiterwijk <[email protected]>
## Code After:
fmn.lib
=======
`fmn <https://github.com/fedora-infra/fmn>`_ is a family of systems to manage
end-user notifications triggered by
`fedmsg, the Fedora FEDerated MESsage bus <http://fedmsg.com>`_.
This module contains the internal API components and data model for Fedora
Notifications
There is a parental placeholder repo with some useful information you might
want to read through, like an `overview
<https://github.com/fedora-infra/fmn/#fedora-notifications>`_, a little
`architecture diagram <https://github.com/fedora-infra/fmn/#architecture>`_,
and some `development instructions
<https://github.com/fedora-infra/fmn/#hacking>`_ to help you get set up and
coding.
To run the test suite, make sure you have `fmn.rules
<https://github.com/fedora-infra/fmn.rules>`_ checked out.
Then cd into fmn/lib/tests, and run nosetests.
If you have fmn.rules installed in a virtual environment,
make sure you also run nosetests from the same venv.
| fmn.lib
=======
`fmn <https://github.com/fedora-infra/fmn>`_ is a family of systems to manage
end-user notifications triggered by
`fedmsg, the Fedora FEDerated MESsage bus <http://fedmsg.com>`_.
This module contains the internal API components and data model for Fedora
Notifications
There is a parental placeholder repo with some useful information you might
want to read through, like an `overview
<https://github.com/fedora-infra/fmn/#fedora-notifications>`_, a little
`architecture diagram <https://github.com/fedora-infra/fmn/#architecture>`_,
and some `development instructions
<https://github.com/fedora-infra/fmn/#hacking>`_ to help you get set up and
coding.
+
+ To run the test suite, make sure you have `fmn.rules
+ <https://github.com/fedora-infra/fmn.rules>`_ checked out.
+ Then cd into fmn/lib/tests, and run nosetests.
+ If you have fmn.rules installed in a virtual environment,
+ make sure you also run nosetests from the same venv. | 6 | 0.352941 | 6 | 0 |
9f54b2574c5826738e76119a305547f950b24b1d | docs/index.rst | docs/index.rst | .. indoctrinate documentation master file, created by
sphinx-quickstart on Tue Nov 18 19:52:51 2014.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to indoctrinate's documentation!
========================================
Contents:
.. toctree::
:maxdepth: 2
api/modules
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
| .. indoctrinate documentation master file, created by
sphinx-quickstart on Tue Nov 18 19:52:51 2014.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to indoctrinate's documentation!
========================================
Installation
------------
Use pip_:
.. code-block:: bash
$ pip install cybox
You might also want to consider using a virtualenv_.
.. note::
I wouldn't recommend actually installing this, since it doesn't really do
anything!
.. _pip: http://pip.readthedocs.org/
.. _virtualenv: http://virtualenv.readthedocs.org/
API Documentation
-----------------
.. toctree::
:maxdepth: 2
api/modules
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
| Add text to documentation home page. | Add text to documentation home page.
| reStructuredText | mit | gtback/indoctrinate | restructuredtext | ## Code Before:
.. indoctrinate documentation master file, created by
sphinx-quickstart on Tue Nov 18 19:52:51 2014.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to indoctrinate's documentation!
========================================
Contents:
.. toctree::
:maxdepth: 2
api/modules
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
## Instruction:
Add text to documentation home page.
## Code After:
.. indoctrinate documentation master file, created by
sphinx-quickstart on Tue Nov 18 19:52:51 2014.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to indoctrinate's documentation!
========================================
Installation
------------
Use pip_:
.. code-block:: bash
$ pip install cybox
You might also want to consider using a virtualenv_.
.. note::
I wouldn't recommend actually installing this, since it doesn't really do
anything!
.. _pip: http://pip.readthedocs.org/
.. _virtualenv: http://virtualenv.readthedocs.org/
API Documentation
-----------------
.. toctree::
:maxdepth: 2
api/modules
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
| .. indoctrinate documentation master file, created by
sphinx-quickstart on Tue Nov 18 19:52:51 2014.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to indoctrinate's documentation!
========================================
- Contents:
+ Installation
+ ------------
+
+ Use pip_:
+
+ .. code-block:: bash
+
+ $ pip install cybox
+
+ You might also want to consider using a virtualenv_.
+
+ .. note::
+ I wouldn't recommend actually installing this, since it doesn't really do
+ anything!
+
+ .. _pip: http://pip.readthedocs.org/
+ .. _virtualenv: http://virtualenv.readthedocs.org/
+
+
+ API Documentation
+ -----------------
.. toctree::
:maxdepth: 2
api/modules
-
-
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
| 24 | 1 | 21 | 3 |
4e35b16b8aed2ccb9dbc34a2bb56ce129450546b | mode/formatter/format_server.py | mode/formatter/format_server.py | import socket
from struct import pack, unpack
import sys
import autopep8
PORT = 10011
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server_address = ('localhost', 10011)
sock.bind(server_address)
sock.listen(1)
print >>sys.stderr, 'Format server up on %s port %s' % server_address
while True:
connection, client_address = sock.accept()
try:
buf = connection.recv(4)
(size,) = unpack('>i', buf)
if size == -1:
print >>sys.stderr, 'Format server exiting.'
sys.exit(0)
src = ''
while len(src) < size:
src += connection.recv(4096)
src = src.decode('utf-8')
reformatted = autopep8.fix_code(src)
encoded = reformatted.encode('utf-8')
connection.sendall(pack('>i', len(encoded)))
connection.sendall(encoded)
finally:
connection.close() | import socket
from struct import pack, unpack
import sys
import autopep8
PORT = 10011
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server_address = ('localhost', 10011)
sock.bind(server_address)
sock.listen(1)
print >>sys.stderr, 'Format server up on %s port %s' % server_address
while True:
connection, client_address = sock.accept()
try:
buf = ''
while len(buf) < 4:
buf += connection.recv(4 - len(buf))
(size,) = unpack('>i', buf)
if size == -1:
print >>sys.stderr, 'Format server exiting.'
sys.exit(0)
src = ''
while len(src) < size:
src += connection.recv(4096)
src = src.decode('utf-8')
reformatted = autopep8.fix_code(src)
encoded = reformatted.encode('utf-8')
connection.sendall(pack('>i', len(encoded)))
connection.sendall(encoded)
finally:
connection.close()
| Fix a bug in format server not fully reading 4-byte length. | Fix a bug in format server not fully reading 4-byte length.
| Python | apache-2.0 | tildebyte/processing.py,mashrin/processing.py,Luxapodular/processing.py,tildebyte/processing.py,Luxapodular/processing.py,tildebyte/processing.py,mashrin/processing.py,mashrin/processing.py,jdf/processing.py,jdf/processing.py,Luxapodular/processing.py,jdf/processing.py | python | ## Code Before:
import socket
from struct import pack, unpack
import sys
import autopep8
PORT = 10011
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server_address = ('localhost', 10011)
sock.bind(server_address)
sock.listen(1)
print >>sys.stderr, 'Format server up on %s port %s' % server_address
while True:
connection, client_address = sock.accept()
try:
buf = connection.recv(4)
(size,) = unpack('>i', buf)
if size == -1:
print >>sys.stderr, 'Format server exiting.'
sys.exit(0)
src = ''
while len(src) < size:
src += connection.recv(4096)
src = src.decode('utf-8')
reformatted = autopep8.fix_code(src)
encoded = reformatted.encode('utf-8')
connection.sendall(pack('>i', len(encoded)))
connection.sendall(encoded)
finally:
connection.close()
## Instruction:
Fix a bug in format server not fully reading 4-byte length.
## Code After:
import socket
from struct import pack, unpack
import sys
import autopep8
PORT = 10011
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server_address = ('localhost', 10011)
sock.bind(server_address)
sock.listen(1)
print >>sys.stderr, 'Format server up on %s port %s' % server_address
while True:
connection, client_address = sock.accept()
try:
buf = ''
while len(buf) < 4:
buf += connection.recv(4 - len(buf))
(size,) = unpack('>i', buf)
if size == -1:
print >>sys.stderr, 'Format server exiting.'
sys.exit(0)
src = ''
while len(src) < size:
src += connection.recv(4096)
src = src.decode('utf-8')
reformatted = autopep8.fix_code(src)
encoded = reformatted.encode('utf-8')
connection.sendall(pack('>i', len(encoded)))
connection.sendall(encoded)
finally:
connection.close()
| import socket
from struct import pack, unpack
import sys
import autopep8
PORT = 10011
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server_address = ('localhost', 10011)
sock.bind(server_address)
sock.listen(1)
print >>sys.stderr, 'Format server up on %s port %s' % server_address
while True:
connection, client_address = sock.accept()
try:
+ buf = ''
+ while len(buf) < 4:
- buf = connection.recv(4)
+ buf += connection.recv(4 - len(buf))
? ++++ + ++++++++++ +
(size,) = unpack('>i', buf)
if size == -1:
print >>sys.stderr, 'Format server exiting.'
sys.exit(0)
src = ''
while len(src) < size:
src += connection.recv(4096)
src = src.decode('utf-8')
reformatted = autopep8.fix_code(src)
encoded = reformatted.encode('utf-8')
connection.sendall(pack('>i', len(encoded)))
connection.sendall(encoded)
finally:
connection.close() | 4 | 0.133333 | 3 | 1 |
c3d3dc14031c44510b948ad17b4c395906603cc6 | database/factories/UserFactory.php | database/factories/UserFactory.php | <?php
use Faker\Generator as Faker;
/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| This directory should contain each of the model factory definitions for
| your application. Factories provide a convenient way to generate new
| model instances for testing / seeding your application's database.
|
*/
$factory->define(App\User::class, function (Faker $faker) {
return [
'name' => $faker->name,
'email' => $faker->unique()->safeEmail,
'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm',
'remember_token' => str_random(10),
];
});
| <?php
use Faker\Generator as Faker;
/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| This directory should contain each of the model factory definitions for
| your application. Factories provide a convenient way to generate new
| model instances for testing / seeding your application's database.
|
*/
$factory->define(App\User::class, function (Faker $faker) {
return [
'name' => $faker->name,
'email' => $faker->unique()->safeEmail,
'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret
'remember_token' => str_random(10),
];
});
| Add comment with the value of the hashed password | Add comment with the value of the hashed password | PHP | apache-2.0 | hackel/laravel,tinywitch/laravel,hackel/laravel,slimkit/thinksns-plus,cbnuke/FilesCollection,cbnuke/FilesCollection,slimkit/thinksns-plus,hackel/laravel | php | ## Code Before:
<?php
use Faker\Generator as Faker;
/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| This directory should contain each of the model factory definitions for
| your application. Factories provide a convenient way to generate new
| model instances for testing / seeding your application's database.
|
*/
$factory->define(App\User::class, function (Faker $faker) {
return [
'name' => $faker->name,
'email' => $faker->unique()->safeEmail,
'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm',
'remember_token' => str_random(10),
];
});
## Instruction:
Add comment with the value of the hashed password
## Code After:
<?php
use Faker\Generator as Faker;
/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| This directory should contain each of the model factory definitions for
| your application. Factories provide a convenient way to generate new
| model instances for testing / seeding your application's database.
|
*/
$factory->define(App\User::class, function (Faker $faker) {
return [
'name' => $faker->name,
'email' => $faker->unique()->safeEmail,
'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret
'remember_token' => str_random(10),
];
});
| <?php
use Faker\Generator as Faker;
/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| This directory should contain each of the model factory definitions for
| your application. Factories provide a convenient way to generate new
| model instances for testing / seeding your application's database.
|
*/
$factory->define(App\User::class, function (Faker $faker) {
return [
'name' => $faker->name,
'email' => $faker->unique()->safeEmail,
- 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm',
+ 'password' => '$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm', // secret
? ++++++++++
'remember_token' => str_random(10),
];
}); | 2 | 0.086957 | 1 | 1 |
cb6689fc1b0c1da1f3596f5cb4017aa71a28189b | src/index.coffee | src/index.coffee | sysPath = require 'path'
compileHBS = require './ember-handlebars-compiler'
module.exports = class EmberHandlebarsCompiler
brunchPlugin: yes
type: 'template'
extension: 'hbs'
precompile: off
root: null
modulesPrefix: 'module.exports = '
constructor: (@config) ->
if @config.files.templates.precompile is on
@precompile = on
if @config.files.templates.root?
@root = sysPath.join 'app', @config.files.templates.root, sysPath.sep
if @config.modules.wrapper is off
@modulesPrefix = ''
null
compile: (data, path, callback) ->
try
tmplPath = path.replace @root, ''
tmplPath = tmplPath.replace /\\/g, '/'
tmplPath = tmplPath.substr 0, tmplPath.length - sysPath.extname(tmplPath).length
tmplName = "Ember.TEMPLATES['#{tmplPath}']"
if @precompile is on
content = compileHBS data.toString()
result = "#{@modulesPrefix}#{tmplName} = Ember.Handlebars.template(#{content});"
else
content = JSON.stringify data.toString()
result = "#{@modulesPrefix}#{tmplName} = Ember.Handlebars.compile(#{content});"
catch err
error = err
finally
callback error, result
| sysPath = require 'path'
compileHBS = require './ember-handlebars-compiler'
module.exports = class EmberHandlebarsCompiler
brunchPlugin: yes
type: 'template'
extension: 'hbs'
precompile: off
root: null
modulesPrefix: 'module.exports = '
constructor: (@config) ->
if @config.files.templates.precompile is on
@precompile = on
if @config.files.templates.root?
@root = sysPath.join 'app', @config.files.templates.root, sysPath.sep
if @config.modules.wrapper is off
@modulesPrefix = ''
if @config.files.templates.defaultExtension?
@extension = @config.files.templates.defaultExtension
null
compile: (data, path, callback) ->
try
tmplPath = path.replace @root, ''
tmplPath = tmplPath.replace /\\/g, '/'
tmplPath = tmplPath.substr 0, tmplPath.length - sysPath.extname(tmplPath).length
tmplName = "Ember.TEMPLATES['#{tmplPath}']"
if @precompile is on
content = compileHBS data.toString()
result = "#{@modulesPrefix}#{tmplName} = Ember.Handlebars.template(#{content});"
else
content = JSON.stringify data.toString()
result = "#{@modulesPrefix}#{tmplName} = Ember.Handlebars.compile(#{content});"
catch err
error = err
finally
callback error, result
| Use the configured default extension | Use the configured default extension
Right now the code does not take defaultExtension into account.
| CoffeeScript | mit | bartsqueezy/ember-handlebars-brunch,rvermillion/ember-handlebars-brunch | coffeescript | ## Code Before:
sysPath = require 'path'
compileHBS = require './ember-handlebars-compiler'
module.exports = class EmberHandlebarsCompiler
brunchPlugin: yes
type: 'template'
extension: 'hbs'
precompile: off
root: null
modulesPrefix: 'module.exports = '
constructor: (@config) ->
if @config.files.templates.precompile is on
@precompile = on
if @config.files.templates.root?
@root = sysPath.join 'app', @config.files.templates.root, sysPath.sep
if @config.modules.wrapper is off
@modulesPrefix = ''
null
compile: (data, path, callback) ->
try
tmplPath = path.replace @root, ''
tmplPath = tmplPath.replace /\\/g, '/'
tmplPath = tmplPath.substr 0, tmplPath.length - sysPath.extname(tmplPath).length
tmplName = "Ember.TEMPLATES['#{tmplPath}']"
if @precompile is on
content = compileHBS data.toString()
result = "#{@modulesPrefix}#{tmplName} = Ember.Handlebars.template(#{content});"
else
content = JSON.stringify data.toString()
result = "#{@modulesPrefix}#{tmplName} = Ember.Handlebars.compile(#{content});"
catch err
error = err
finally
callback error, result
## Instruction:
Use the configured default extension
Right now the code does not take defaultExtension into account.
## Code After:
sysPath = require 'path'
compileHBS = require './ember-handlebars-compiler'
module.exports = class EmberHandlebarsCompiler
brunchPlugin: yes
type: 'template'
extension: 'hbs'
precompile: off
root: null
modulesPrefix: 'module.exports = '
constructor: (@config) ->
if @config.files.templates.precompile is on
@precompile = on
if @config.files.templates.root?
@root = sysPath.join 'app', @config.files.templates.root, sysPath.sep
if @config.modules.wrapper is off
@modulesPrefix = ''
if @config.files.templates.defaultExtension?
@extension = @config.files.templates.defaultExtension
null
compile: (data, path, callback) ->
try
tmplPath = path.replace @root, ''
tmplPath = tmplPath.replace /\\/g, '/'
tmplPath = tmplPath.substr 0, tmplPath.length - sysPath.extname(tmplPath).length
tmplName = "Ember.TEMPLATES['#{tmplPath}']"
if @precompile is on
content = compileHBS data.toString()
result = "#{@modulesPrefix}#{tmplName} = Ember.Handlebars.template(#{content});"
else
content = JSON.stringify data.toString()
result = "#{@modulesPrefix}#{tmplName} = Ember.Handlebars.compile(#{content});"
catch err
error = err
finally
callback error, result
| sysPath = require 'path'
compileHBS = require './ember-handlebars-compiler'
module.exports = class EmberHandlebarsCompiler
brunchPlugin: yes
type: 'template'
extension: 'hbs'
precompile: off
root: null
modulesPrefix: 'module.exports = '
constructor: (@config) ->
if @config.files.templates.precompile is on
@precompile = on
if @config.files.templates.root?
@root = sysPath.join 'app', @config.files.templates.root, sysPath.sep
if @config.modules.wrapper is off
@modulesPrefix = ''
+ if @config.files.templates.defaultExtension?
+ @extension = @config.files.templates.defaultExtension
null
compile: (data, path, callback) ->
try
tmplPath = path.replace @root, ''
tmplPath = tmplPath.replace /\\/g, '/'
tmplPath = tmplPath.substr 0, tmplPath.length - sysPath.extname(tmplPath).length
tmplName = "Ember.TEMPLATES['#{tmplPath}']"
if @precompile is on
content = compileHBS data.toString()
result = "#{@modulesPrefix}#{tmplName} = Ember.Handlebars.template(#{content});"
else
content = JSON.stringify data.toString()
result = "#{@modulesPrefix}#{tmplName} = Ember.Handlebars.compile(#{content});"
catch err
error = err
finally
callback error, result | 2 | 0.055556 | 2 | 0 |
2edcb77935d0c0169ea63f27cd030fa048dc118f | Tidy_tapas_files.sh | Tidy_tapas_files.sh |
declare -a arr=("HD202206-2")
for FOLDER in "${arr[@]}"
do
echo "Moving to", $FOLDER, "xml files"
cd ~/Phd/data/Crires/BDs-DRACS/$FOLDER/
mkdir Telluric_files
mv tapas_*ipac Telluric_files/
mv *tapas*request*.xml Telluric_files/
done |
declare -a arr=("HD202206-1" "HD202206-2" "HD202206-3"
"HD162020-1" "HD162020-2"
"HD167665-1a" "HD167665-1b" "HD167665-2"
"HD168443-1" "HD168443-2"
"HD211847-1" "HD211847-2"
"HD4747-1")
declare -a arr2=("HD30501-1" "HD30501-2" "HD30501-2b" "HD30501-3")
for FOLDER in "${arr[@]}"
do
echo "Tidying telluric files in", $FOLDER
cd ~/Phd/data/Crires/BDs-DRACS/$FOLDER/
mkdir Telluric_files
mv tapas_*ipac Telluric_files/
mv *tapas*request*.xml Telluric_files/
done
for FOLDER in "${arr2[@]}"
do
echo "Tidying telluric files in", $FOLDER
cd ~/Phd/data/Crires/BDs-DRACS/$FOLDER/
mkdir Telluric_files
mv Combined_Nods/tapas_*ipac Telluric_files/
#mv *tapas*request*.xml Telluric_files/
done | Add tiding of HD30501 data | Add tiding of HD30501 data
| Shell | mit | jason-neal/equanimous-octo-tribble,jason-neal/equanimous-octo-tribble,jason-neal/equanimous-octo-tribble | shell | ## Code Before:
declare -a arr=("HD202206-2")
for FOLDER in "${arr[@]}"
do
echo "Moving to", $FOLDER, "xml files"
cd ~/Phd/data/Crires/BDs-DRACS/$FOLDER/
mkdir Telluric_files
mv tapas_*ipac Telluric_files/
mv *tapas*request*.xml Telluric_files/
done
## Instruction:
Add tiding of HD30501 data
## Code After:
declare -a arr=("HD202206-1" "HD202206-2" "HD202206-3"
"HD162020-1" "HD162020-2"
"HD167665-1a" "HD167665-1b" "HD167665-2"
"HD168443-1" "HD168443-2"
"HD211847-1" "HD211847-2"
"HD4747-1")
declare -a arr2=("HD30501-1" "HD30501-2" "HD30501-2b" "HD30501-3")
for FOLDER in "${arr[@]}"
do
echo "Tidying telluric files in", $FOLDER
cd ~/Phd/data/Crires/BDs-DRACS/$FOLDER/
mkdir Telluric_files
mv tapas_*ipac Telluric_files/
mv *tapas*request*.xml Telluric_files/
done
for FOLDER in "${arr2[@]}"
do
echo "Tidying telluric files in", $FOLDER
cd ~/Phd/data/Crires/BDs-DRACS/$FOLDER/
mkdir Telluric_files
mv Combined_Nods/tapas_*ipac Telluric_files/
#mv *tapas*request*.xml Telluric_files/
done |
- declare -a arr=("HD202206-2")
+
+ declare -a arr=("HD202206-1" "HD202206-2" "HD202206-3"
+ "HD162020-1" "HD162020-2"
+ "HD167665-1a" "HD167665-1b" "HD167665-2"
+ "HD168443-1" "HD168443-2"
+ "HD211847-1" "HD211847-2"
+ "HD4747-1")
+
+ declare -a arr2=("HD30501-1" "HD30501-2" "HD30501-2b" "HD30501-3")
for FOLDER in "${arr[@]}"
do
- echo "Moving to", $FOLDER, "xml files"
+ echo "Tidying telluric files in", $FOLDER
cd ~/Phd/data/Crires/BDs-DRACS/$FOLDER/
mkdir Telluric_files
mv tapas_*ipac Telluric_files/
mv *tapas*request*.xml Telluric_files/
done
+
+
+ for FOLDER in "${arr2[@]}"
+ do
+ echo "Tidying telluric files in", $FOLDER
+ cd ~/Phd/data/Crires/BDs-DRACS/$FOLDER/
+
+ mkdir Telluric_files
+ mv Combined_Nods/tapas_*ipac Telluric_files/
+ #mv *tapas*request*.xml Telluric_files/
+ done | 23 | 1.916667 | 21 | 2 |
a34fc77ae3f1cd8c0bd992b22a46299cfc34635f | package.json | package.json | {
"name": "ActiveU",
"private": true,
"scripts": {
"start": "meteor run"
},
"dependencies": {
"babel-runtime": "^6.20.0",
"meteor-node-stubs": "~0.2.4",
"react": "^15.5.4",
"react-addons-pure-render-mixin": "^15.5.2",
"react-dom": "^15.5.4"
}
}
| {
"name": "ActiveU",
"private": true,
"scripts": {
"start": "meteor run"
},
"dependencies": {
"babel-runtime": "^6.20.0",
"meteor-node-stubs": "~0.2.4",
"react": "^15.5.4",
"react-addons-pure-render-mixin": "^15.5.2",
"react-bootstrap": "^0.31.0",
"react-dom": "^15.5.4",
"react-router-bootstrap": "^0.24.2",
"react-router-dom": "^4.1.1"
}
}
| Add react, router & bootstrap dps | Add react, router & bootstrap dps
| JSON | mit | f-martinez11/ActiveU,f-martinez11/ActiveU | json | ## Code Before:
{
"name": "ActiveU",
"private": true,
"scripts": {
"start": "meteor run"
},
"dependencies": {
"babel-runtime": "^6.20.0",
"meteor-node-stubs": "~0.2.4",
"react": "^15.5.4",
"react-addons-pure-render-mixin": "^15.5.2",
"react-dom": "^15.5.4"
}
}
## Instruction:
Add react, router & bootstrap dps
## Code After:
{
"name": "ActiveU",
"private": true,
"scripts": {
"start": "meteor run"
},
"dependencies": {
"babel-runtime": "^6.20.0",
"meteor-node-stubs": "~0.2.4",
"react": "^15.5.4",
"react-addons-pure-render-mixin": "^15.5.2",
"react-bootstrap": "^0.31.0",
"react-dom": "^15.5.4",
"react-router-bootstrap": "^0.24.2",
"react-router-dom": "^4.1.1"
}
}
| {
"name": "ActiveU",
"private": true,
"scripts": {
"start": "meteor run"
},
"dependencies": {
"babel-runtime": "^6.20.0",
"meteor-node-stubs": "~0.2.4",
"react": "^15.5.4",
"react-addons-pure-render-mixin": "^15.5.2",
+ "react-bootstrap": "^0.31.0",
- "react-dom": "^15.5.4"
+ "react-dom": "^15.5.4",
? +
+ "react-router-bootstrap": "^0.24.2",
+ "react-router-dom": "^4.1.1"
}
} | 5 | 0.357143 | 4 | 1 |
01b389977382080bc7fb50bebcb43780cfda852b | README.md | README.md | [](https://magnum.travis-ci.com/facebook/componentkit)
ComponentKit is a view framework for iOS that is heavily inspired by React. It takes a functional, declarative approach to building UI. It was built to power Facebook's News Feed and is now used throughout the Facebook iOS app.
### Quick start
ComponentKit is available on [CocoaPods](http://cocoapods.org). Add the following to your Podfile:
```ruby
pod 'ComponentKit', '~> 0.9'
```
### Learn more
* Read the [Getting Started guide](http://www.componentkit.org/docs/getting-started.html)
* Get the [sample projects](https://github.com/facebook/componentkit/tree/master/Examples/WildeGuess)
* Read the [objc.io article](http://www.objc.io/issue-22/facebook.html) by Adam Ernst
* Watch the [@Scale talk](https://youtu.be/mLSeEoC6GjU?t=24m18s) by Ari Grant
## Contributing
See the [CONTRIBUTING](https://github.com/facebook/componentkit/blob/master/CONTRIBUTING.md) file for how to help out.
## License
ComponentKit is BSD-licensed. We also provide an additional patent grant.
The files in the /Examples directory are licensed under a separate license as specified in each file; documentation is licensed CC-BY-4.0.
| [](https://magnum.travis-ci.com/facebook/componentkit)
ComponentKit is a view framework for iOS that is heavily inspired by React. It takes a functional, declarative approach to building UI. It was built to power Facebook's News Feed and is now used throughout the Facebook iOS app.
### Quick start
ComponentKit is available on [CocoaPods](http://cocoapods.org). Add the following to your Podfile:
```ruby
pod 'ComponentKit', '~> 0.9'
```
### Learn more
* Read the [Getting Started guide](http://www.componentkit.org/docs/getting-started.html)
* Get the [sample projects](https://github.com/facebook/componentkit/tree/master/Examples/WildeGuess)
* Read the [objc.io article](http://www.objc.io/issue-22/facebook.html) by Adam Ernst
* Watch the [@Scale talk](https://youtu.be/mLSeEoC6GjU?t=24m18s) by Ari Grant
## Contributing
See the [CONTRIBUTING](CONTRIBUTING.md) file for how to help out.
## License
ComponentKit is BSD-licensed. We also provide an additional patent grant.
The files in the /Examples directory are licensed under a separate license as specified in each file; documentation is licensed CC-BY-4.0.
| Use relative link to CONTRIBUTING.md | Use relative link to CONTRIBUTING.md | Markdown | bsd-3-clause | stevielu/componentkit,avnerbarr/componentkit,modocache/componentkit,TribeMedia/componentkit,IveWong/componentkit,bricooke/componentkit,dstnbrkr/componentkit,ernestopino/componentkit,21451061/componentkit,dstnbrkr/componentkit,orta/componentkit,yiding/componentkit,IveWong/componentkit,pairyo/componentkit,21451061/componentkit,inbilin-inc/componentkit,Jericho25/componentkit_JeckoHero,MDSilber/componentkit,wee/componentkit,leoschweizer/componentkit,eczarny/componentkit,liyong03/componentkit,Eric-LeiYang/componentkit,avnerbarr/componentkit,IveWong/componentkit,mcohnen/componentkit,IveWong/componentkit,wee/componentkit,Jericho25/componentkit_JeckoHero,bricooke/componentkit,SummerHanada/componentkit,adamdahan/componentkit,stevielu/componentkit,lydonchandra/componentkit,Jericho25/componentkit_JeckoHero,SummerHanada/componentkit,Eric-LeiYang/componentkit,SummerHanada/componentkit,aaronschubert0/componentkit,avnerbarr/componentkit,smalllixin/componentkit,MDSilber/componentkit,21451061/componentkit,adamdahan/componentkit,ezc/componentkit,smalllixin/componentkit,SummerHanada/componentkit,darknoon/componentkitx,TribeMedia/componentkit,dshahidehpour/componentkit,Eric-LeiYang/componentkit,mcohnen/componentkit,wee/componentkit,darknoon/componentkitx,darknoon/componentkitx,TribeMedia/componentkit,liyong03/componentkit,claricetechnologies/componentkit,adamjernst/componentkit,pairyo/componentkit,aaronschubert0/componentkit,inbilin-inc/componentkit,MDSilber/componentkit,MDSilber/componentkit,pairyo/componentkit,leoschweizer/componentkit,dshahidehpour/componentkit,dstnbrkr/componentkit,inbilin-inc/componentkit,eczarny/componentkit,ezc/componentkit,liyong03/componentkit,orta/componentkit,liyong03/componentkit,adamdahan/componentkit,yiding/componentkit,orta/componentkit,inbilin-inc/componentkit,claricetechnologies/componentkit,orta/componentkit,claricetechnologies/componentkit,mcohnen/componentkit,yiding/componentkit,adamjernst/componentkit,dshahidehpour/componentkit,leoschweizer/componentkit,stevielu/componentkit,TribeMedia/componentkit,ernestopino/componentkit,ernestopino/componentkit,darknoon/componentkitx,modocache/componentkit,dstnbrkr/componentkit,Jericho25/componentkit_JeckoHero,21451061/componentkit,pairyo/componentkit,modocache/componentkit,stevielu/componentkit,claricetechnologies/componentkit,wee/componentkit,ezc/componentkit,bricooke/componentkit,lydonchandra/componentkit,ernestopino/componentkit,Eric-LeiYang/componentkit,eczarny/componentkit,smalllixin/componentkit,ezc/componentkit,lydonchandra/componentkit,modocache/componentkit,mcohnen/componentkit,lydonchandra/componentkit,avnerbarr/componentkit,bricooke/componentkit,aaronschubert0/componentkit,yiding/componentkit,leoschweizer/componentkit,adamjernst/componentkit,adamdahan/componentkit,aaronschubert0/componentkit,adamjernst/componentkit,smalllixin/componentkit | markdown | ## Code Before:
[](https://magnum.travis-ci.com/facebook/componentkit)
ComponentKit is a view framework for iOS that is heavily inspired by React. It takes a functional, declarative approach to building UI. It was built to power Facebook's News Feed and is now used throughout the Facebook iOS app.
### Quick start
ComponentKit is available on [CocoaPods](http://cocoapods.org). Add the following to your Podfile:
```ruby
pod 'ComponentKit', '~> 0.9'
```
### Learn more
* Read the [Getting Started guide](http://www.componentkit.org/docs/getting-started.html)
* Get the [sample projects](https://github.com/facebook/componentkit/tree/master/Examples/WildeGuess)
* Read the [objc.io article](http://www.objc.io/issue-22/facebook.html) by Adam Ernst
* Watch the [@Scale talk](https://youtu.be/mLSeEoC6GjU?t=24m18s) by Ari Grant
## Contributing
See the [CONTRIBUTING](https://github.com/facebook/componentkit/blob/master/CONTRIBUTING.md) file for how to help out.
## License
ComponentKit is BSD-licensed. We also provide an additional patent grant.
The files in the /Examples directory are licensed under a separate license as specified in each file; documentation is licensed CC-BY-4.0.
## Instruction:
Use relative link to CONTRIBUTING.md
## Code After:
[](https://magnum.travis-ci.com/facebook/componentkit)
ComponentKit is a view framework for iOS that is heavily inspired by React. It takes a functional, declarative approach to building UI. It was built to power Facebook's News Feed and is now used throughout the Facebook iOS app.
### Quick start
ComponentKit is available on [CocoaPods](http://cocoapods.org). Add the following to your Podfile:
```ruby
pod 'ComponentKit', '~> 0.9'
```
### Learn more
* Read the [Getting Started guide](http://www.componentkit.org/docs/getting-started.html)
* Get the [sample projects](https://github.com/facebook/componentkit/tree/master/Examples/WildeGuess)
* Read the [objc.io article](http://www.objc.io/issue-22/facebook.html) by Adam Ernst
* Watch the [@Scale talk](https://youtu.be/mLSeEoC6GjU?t=24m18s) by Ari Grant
## Contributing
See the [CONTRIBUTING](CONTRIBUTING.md) file for how to help out.
## License
ComponentKit is BSD-licensed. We also provide an additional patent grant.
The files in the /Examples directory are licensed under a separate license as specified in each file; documentation is licensed CC-BY-4.0.
| [](https://magnum.travis-ci.com/facebook/componentkit)
ComponentKit is a view framework for iOS that is heavily inspired by React. It takes a functional, declarative approach to building UI. It was built to power Facebook's News Feed and is now used throughout the Facebook iOS app.
### Quick start
ComponentKit is available on [CocoaPods](http://cocoapods.org). Add the following to your Podfile:
```ruby
pod 'ComponentKit', '~> 0.9'
```
### Learn more
* Read the [Getting Started guide](http://www.componentkit.org/docs/getting-started.html)
* Get the [sample projects](https://github.com/facebook/componentkit/tree/master/Examples/WildeGuess)
* Read the [objc.io article](http://www.objc.io/issue-22/facebook.html) by Adam Ernst
* Watch the [@Scale talk](https://youtu.be/mLSeEoC6GjU?t=24m18s) by Ari Grant
## Contributing
- See the [CONTRIBUTING](https://github.com/facebook/componentkit/blob/master/CONTRIBUTING.md) file for how to help out.
+ See the [CONTRIBUTING](CONTRIBUTING.md) file for how to help out.
## License
ComponentKit is BSD-licensed. We also provide an additional patent grant.
The files in the /Examples directory are licensed under a separate license as specified in each file; documentation is licensed CC-BY-4.0. | 2 | 0.071429 | 1 | 1 |
2e38230e141652cc6768010a314a5f80cdb92ec3 | Code/Compiler/Extrinsic-environment/symbol-value.lisp | Code/Compiler/Extrinsic-environment/symbol-value.lisp | (cl:in-package #:sicl-extrinsic-environment)
(defun find-variable-entry (symbol env)
(loop for entry in (dynamic-environment env)
do (when (and (typep entry 'variable-binding)
(eq (symbol entry) symbol))
(return entry))))
(defun symbol-value (symbol env)
(let ((entry (find-variable-entry symbol env))
(unbound-value (sicl-global-environment:variable-unbound symbol env))
(global-value-cell (sicl-global-environment:variable-cell symbol env)))
(if (null entry)
(if (eq (car global-value-cell) unbound-value)
(error "unbound variable ~s" symbol)
(car global-value-cell))
(if (eq (value entry) unbound-value)
(error "unbound variable ~s" symbol)
(value entry)))))
(defun (setf symbol-value) (new-value symbol env)
(let ((entry (find-variable-entry symbol env))
(global-value-cell (sicl-global-environment:variable-cell symbol env)))
(if (null entry)
(setf (car global-value-cell) new-value)
(setf (value entry) new-value))))
| (cl:in-package #:sicl-extrinsic-environment)
(defun find-variable-entry (symbol dynamic-environment)
(loop for entry in dynamic-environment
do (when (and (typep entry 'variable-binding)
(eq (symbol entry) symbol))
(return entry))))
(defun symbol-value (symbol env)
(let* ((dynamic-environment *dynamic-environment*)
(entry (find-variable-entry symbol dynamic-environment))
(unbound-value (sicl-global-environment:variable-unbound symbol env))
(global-value-cell (sicl-global-environment:variable-cell symbol env)))
(if (null entry)
(if (eq (car global-value-cell) unbound-value)
(error "unbound variable ~s" symbol)
(car global-value-cell))
(if (eq (value entry) unbound-value)
(error "unbound variable ~s" symbol)
(value entry)))))
(defun (setf symbol-value) (new-value symbol env)
(let* ((dynamic-environment *dynamic-environment*)
(entry (find-variable-entry symbol dynamic-environment))
(global-value-cell (sicl-global-environment:variable-cell symbol env)))
(if (null entry)
(setf (car global-value-cell) new-value)
(setf (value entry) new-value))))
| Modify according to new way of transmitting the dynamic environment. | Modify according to new way of transmitting the dynamic environment.
| Common Lisp | bsd-2-clause | vtomole/SICL,clasp-developers/SICL,vtomole/SICL,clasp-developers/SICL,clasp-developers/SICL,clasp-developers/SICL,vtomole/SICL,vtomole/SICL | common-lisp | ## Code Before:
(cl:in-package #:sicl-extrinsic-environment)
(defun find-variable-entry (symbol env)
(loop for entry in (dynamic-environment env)
do (when (and (typep entry 'variable-binding)
(eq (symbol entry) symbol))
(return entry))))
(defun symbol-value (symbol env)
(let ((entry (find-variable-entry symbol env))
(unbound-value (sicl-global-environment:variable-unbound symbol env))
(global-value-cell (sicl-global-environment:variable-cell symbol env)))
(if (null entry)
(if (eq (car global-value-cell) unbound-value)
(error "unbound variable ~s" symbol)
(car global-value-cell))
(if (eq (value entry) unbound-value)
(error "unbound variable ~s" symbol)
(value entry)))))
(defun (setf symbol-value) (new-value symbol env)
(let ((entry (find-variable-entry symbol env))
(global-value-cell (sicl-global-environment:variable-cell symbol env)))
(if (null entry)
(setf (car global-value-cell) new-value)
(setf (value entry) new-value))))
## Instruction:
Modify according to new way of transmitting the dynamic environment.
## Code After:
(cl:in-package #:sicl-extrinsic-environment)
(defun find-variable-entry (symbol dynamic-environment)
(loop for entry in dynamic-environment
do (when (and (typep entry 'variable-binding)
(eq (symbol entry) symbol))
(return entry))))
(defun symbol-value (symbol env)
(let* ((dynamic-environment *dynamic-environment*)
(entry (find-variable-entry symbol dynamic-environment))
(unbound-value (sicl-global-environment:variable-unbound symbol env))
(global-value-cell (sicl-global-environment:variable-cell symbol env)))
(if (null entry)
(if (eq (car global-value-cell) unbound-value)
(error "unbound variable ~s" symbol)
(car global-value-cell))
(if (eq (value entry) unbound-value)
(error "unbound variable ~s" symbol)
(value entry)))))
(defun (setf symbol-value) (new-value symbol env)
(let* ((dynamic-environment *dynamic-environment*)
(entry (find-variable-entry symbol dynamic-environment))
(global-value-cell (sicl-global-environment:variable-cell symbol env)))
(if (null entry)
(setf (car global-value-cell) new-value)
(setf (value entry) new-value))))
| (cl:in-package #:sicl-extrinsic-environment)
- (defun find-variable-entry (symbol env)
+ (defun find-variable-entry (symbol dynamic-environment)
? ++++++++ ++++++++
- (loop for entry in (dynamic-environment env)
? - -----
+ (loop for entry in dynamic-environment
do (when (and (typep entry 'variable-binding)
(eq (symbol entry) symbol))
(return entry))))
(defun symbol-value (symbol env)
+ (let* ((dynamic-environment *dynamic-environment*)
- (let ((entry (find-variable-entry symbol env))
? -------
+ (entry (find-variable-entry symbol dynamic-environment))
? + ++++++++ ++++++++
- (unbound-value (sicl-global-environment:variable-unbound symbol env))
+ (unbound-value (sicl-global-environment:variable-unbound symbol env))
? +
- (global-value-cell (sicl-global-environment:variable-cell symbol env)))
+ (global-value-cell (sicl-global-environment:variable-cell symbol env)))
? +
(if (null entry)
(if (eq (car global-value-cell) unbound-value)
(error "unbound variable ~s" symbol)
(car global-value-cell))
(if (eq (value entry) unbound-value)
(error "unbound variable ~s" symbol)
(value entry)))))
(defun (setf symbol-value) (new-value symbol env)
+ (let* ((dynamic-environment *dynamic-environment*)
- (let ((entry (find-variable-entry symbol env))
? -------
+ (entry (find-variable-entry symbol dynamic-environment))
? + ++++++++ ++++++++
- (global-value-cell (sicl-global-environment:variable-cell symbol env)))
+ (global-value-cell (sicl-global-environment:variable-cell symbol env)))
? +
(if (null entry)
(setf (car global-value-cell) new-value)
(setf (value entry) new-value)))) | 16 | 0.615385 | 9 | 7 |
cd4fc6b8c3eb7e5e90f42311906122f108355ede | HISTORY.rst | HISTORY.rst | .. :changelog:
Release History
---------------
0.1.3 (Not yet released)
++++++++++++++++++
- Removed *.md from the MANIFEST file as it warns when installing that no files matching *.md are found.
- Fix allowing an IntervalSet to be initialised with a generator.
0.1.2 (2013-10-12)
++++++++++++++++++
- Fixed the rendering of the README on pypi (hopefully!) by converting it from a .md file to a .rst file.
0.1.1 (2013-10-09)
++++++++++++++++++
- Adding Manifest file to fix the pypi release. This was broken because the README.md was not being included in the source distribution but setup.py had a reference to this file and therefore failed to run.
0.1.0 (2013-07-03)
++++++++++++++++++
- Initial release
| .. :changelog:
Release History
---------------
0.1.4 (Not yet released)
++++++++++++++++++
0.1.3 (2013-11-16)
++++++++++++++++++
- Removed *.md from the MANIFEST file as it warns when installing that no files matching *.md are found.
- Fix allowing an IntervalSet to be initialised with a generator.
0.1.2 (2013-10-12)
++++++++++++++++++
- Fixed the rendering of the README on pypi (hopefully!) by converting it from a .md file to a .rst file.
0.1.1 (2013-10-09)
++++++++++++++++++
- Adding Manifest file to fix the pypi release. This was broken because the README.md was not being included in the source distribution but setup.py had a reference to this file and therefore failed to run.
0.1.0 (2013-07-03)
++++++++++++++++++
- Initial release
| Update changelog before rolling a new release | Update changelog before rolling a new release
| reStructuredText | mit | intiocean/pyinter,Shopify/pyinter | restructuredtext | ## Code Before:
.. :changelog:
Release History
---------------
0.1.3 (Not yet released)
++++++++++++++++++
- Removed *.md from the MANIFEST file as it warns when installing that no files matching *.md are found.
- Fix allowing an IntervalSet to be initialised with a generator.
0.1.2 (2013-10-12)
++++++++++++++++++
- Fixed the rendering of the README on pypi (hopefully!) by converting it from a .md file to a .rst file.
0.1.1 (2013-10-09)
++++++++++++++++++
- Adding Manifest file to fix the pypi release. This was broken because the README.md was not being included in the source distribution but setup.py had a reference to this file and therefore failed to run.
0.1.0 (2013-07-03)
++++++++++++++++++
- Initial release
## Instruction:
Update changelog before rolling a new release
## Code After:
.. :changelog:
Release History
---------------
0.1.4 (Not yet released)
++++++++++++++++++
0.1.3 (2013-11-16)
++++++++++++++++++
- Removed *.md from the MANIFEST file as it warns when installing that no files matching *.md are found.
- Fix allowing an IntervalSet to be initialised with a generator.
0.1.2 (2013-10-12)
++++++++++++++++++
- Fixed the rendering of the README on pypi (hopefully!) by converting it from a .md file to a .rst file.
0.1.1 (2013-10-09)
++++++++++++++++++
- Adding Manifest file to fix the pypi release. This was broken because the README.md was not being included in the source distribution but setup.py had a reference to this file and therefore failed to run.
0.1.0 (2013-07-03)
++++++++++++++++++
- Initial release
| .. :changelog:
Release History
---------------
- 0.1.3 (Not yet released)
? ^
+ 0.1.4 (Not yet released)
? ^
+ ++++++++++++++++++
+
+
+ 0.1.3 (2013-11-16)
++++++++++++++++++
- Removed *.md from the MANIFEST file as it warns when installing that no files matching *.md are found.
- Fix allowing an IntervalSet to be initialised with a generator.
0.1.2 (2013-10-12)
++++++++++++++++++
- Fixed the rendering of the README on pypi (hopefully!) by converting it from a .md file to a .rst file.
0.1.1 (2013-10-09)
++++++++++++++++++
- Adding Manifest file to fix the pypi release. This was broken because the README.md was not being included in the source distribution but setup.py had a reference to this file and therefore failed to run.
0.1.0 (2013-07-03)
++++++++++++++++++
- Initial release | 6 | 0.24 | 5 | 1 |
24241e9be99a697dc1282b11e54175d852358166 | docs/templating/examples/peering-request-email.md | docs/templating/examples/peering-request-email.md | ```no-highlight
{#- With several affiliated autonomous systems `my_as` is a list -#}
{%- set my_asn = my_as.asn -%}
Dear {{ autonomous_system.name }},
We are AS{{ my_asn }}.
We found that we could peer at the following IXPs:
{%- for ix in internet_exchanges %}
- IX Name: {{ ix.internet_exchange.name }}
AS{{ my_asn }} details:
{%- if ix.internet_exchange.ipv6_address %}
IPv6: {{ ix.internet_exchange.ipv6_address }}
{%- endif %}
{%- if ix.internet_exchange.ipv4_address %}
IPv4: {{ ix.internet_exchange.ipv4_address }}
{%- endif %}
AS{{ autonomous_system.asn }} details:
{%- if ix.missing_sessions.ipv6 %}
IPv6: {{ ix.missing_sessions.ipv6|join(", ") }}
{%- endif %}
{%- if ix.missing_sessions.ipv4 %}
IPv4: {{ ix.missing_sessions.ipv4|join(", ") }}
{%- endif %}
{%- endfor %}
If you want to peer with us, you can configure the sessions and reply to this email.
We will configure them as well if you agree to do so.
Kind regards,
```
| ```no-highlight
{%- set local_as = affiliated_autonomous_systems | get(asn=64500) %}
Dear {{ autonomous_system.name }},
We are AS {{ local_as.asn }} peering team,
We found that we could peer at the following IXPs:
{%- for ixp in autonomous_system | shared_ixps(local_as) %}
- IX Name: {{ ixp.name }}
AS{{ local_as.asn }} details:
IPv6: {{ ixp | local_ips | ipv6 | join(", ") }}
IPv4: {{ ixp | local_ips | ipv4 | join(", ") }}
AS{{ autonomous_system.asn }} details:
{%- for s in autonomous_system | missing_sessions(local_as, ixp) %}
* {{ s.ipaddr4 }}
* {{ s.ipaddr6 }}
{%- endfor %}
{%- endfor %}
If you want to peer with us, you can configure the sessions and reply to this
email. We will configure them as well if you agree to do so.
Kind regards,
--
Your awwesome peering team
```
| Fix email template example (in theory) | Fix email template example (in theory)
| Markdown | apache-2.0 | respawner/peering-manager,respawner/peering-manager,respawner/peering-manager,respawner/peering-manager | markdown | ## Code Before:
```no-highlight
{#- With several affiliated autonomous systems `my_as` is a list -#}
{%- set my_asn = my_as.asn -%}
Dear {{ autonomous_system.name }},
We are AS{{ my_asn }}.
We found that we could peer at the following IXPs:
{%- for ix in internet_exchanges %}
- IX Name: {{ ix.internet_exchange.name }}
AS{{ my_asn }} details:
{%- if ix.internet_exchange.ipv6_address %}
IPv6: {{ ix.internet_exchange.ipv6_address }}
{%- endif %}
{%- if ix.internet_exchange.ipv4_address %}
IPv4: {{ ix.internet_exchange.ipv4_address }}
{%- endif %}
AS{{ autonomous_system.asn }} details:
{%- if ix.missing_sessions.ipv6 %}
IPv6: {{ ix.missing_sessions.ipv6|join(", ") }}
{%- endif %}
{%- if ix.missing_sessions.ipv4 %}
IPv4: {{ ix.missing_sessions.ipv4|join(", ") }}
{%- endif %}
{%- endfor %}
If you want to peer with us, you can configure the sessions and reply to this email.
We will configure them as well if you agree to do so.
Kind regards,
```
## Instruction:
Fix email template example (in theory)
## Code After:
```no-highlight
{%- set local_as = affiliated_autonomous_systems | get(asn=64500) %}
Dear {{ autonomous_system.name }},
We are AS {{ local_as.asn }} peering team,
We found that we could peer at the following IXPs:
{%- for ixp in autonomous_system | shared_ixps(local_as) %}
- IX Name: {{ ixp.name }}
AS{{ local_as.asn }} details:
IPv6: {{ ixp | local_ips | ipv6 | join(", ") }}
IPv4: {{ ixp | local_ips | ipv4 | join(", ") }}
AS{{ autonomous_system.asn }} details:
{%- for s in autonomous_system | missing_sessions(local_as, ixp) %}
* {{ s.ipaddr4 }}
* {{ s.ipaddr6 }}
{%- endfor %}
{%- endfor %}
If you want to peer with us, you can configure the sessions and reply to this
email. We will configure them as well if you agree to do so.
Kind regards,
--
Your awwesome peering team
```
| ```no-highlight
+ {%- set local_as = affiliated_autonomous_systems | get(asn=64500) %}
- {#- With several affiliated autonomous systems `my_as` is a list -#}
- {%- set my_asn = my_as.asn -%}
Dear {{ autonomous_system.name }},
- We are AS{{ my_asn }}.
+ We are AS {{ local_as.asn }} peering team,
We found that we could peer at the following IXPs:
- {%- for ix in internet_exchanges %}
- - IX Name: {{ ix.internet_exchange.name }}
+ {%- for ixp in autonomous_system | shared_ixps(local_as) %}
+ - IX Name: {{ ixp.name }}
- AS{{ my_asn }} details:
? ^^
+ AS{{ local_as.asn }} details:
? ^^^^^ +++
+ IPv6: {{ ixp | local_ips | ipv6 | join(", ") }}
+ IPv4: {{ ixp | local_ips | ipv4 | join(", ") }}
+
- {%- if ix.internet_exchange.ipv6_address %}
- IPv6: {{ ix.internet_exchange.ipv6_address }}
- {%- endif %}
- {%- if ix.internet_exchange.ipv4_address %}
- IPv4: {{ ix.internet_exchange.ipv4_address }}
- {%- endif %}
AS{{ autonomous_system.asn }} details:
- {%- if ix.missing_sessions.ipv6 %}
- IPv6: {{ ix.missing_sessions.ipv6|join(", ") }}
+ {%- for s in autonomous_system | missing_sessions(local_as, ixp) %}
+ * {{ s.ipaddr4 }}
+ * {{ s.ipaddr6 }}
- {%- endif %}
? -
+ {%- endfor %}
? ++
- {%- if ix.missing_sessions.ipv4 %}
- IPv4: {{ ix.missing_sessions.ipv4|join(", ") }}
- {%- endif %}
{%- endfor %}
- If you want to peer with us, you can configure the sessions and reply to this email.
? -------
+ If you want to peer with us, you can configure the sessions and reply to this
- We will configure them as well if you agree to do so.
+ email. We will configure them as well if you agree to do so.
? +++++++
Kind regards,
+
+ --
+ Your awwesome peering team
``` | 37 | 1.193548 | 17 | 20 |
292949c38e6207a6292a7caa2f301f91326780cb | features/builtin_contracts/args.feature | features/builtin_contracts/args.feature | Feature: Args (TODO)
| Feature: Args
Used for `*args` (variadic functions). Takes contract and uses it to validate
every element passed in through `*args`.
```ruby
Contract C::Args[C::Num] => C::Bool
def example(*args)
```
This example contract will validate all arguments passed through `*args` to
accept only numbers.
Background:
Given a file named "args_usage.rb" with:
"""ruby
require "contracts"
C = Contracts
class Example
include Contracts::Core
Contract C::Args[C::Num] => C::Bool
def only_nums(*args)
args.inspect
end
end
"""
Scenario: Accepts no arguments
Given a file named "accepts_no_arguments.rb" with:
"""ruby
require "./args_usage"
puts Example.new.only_nums
"""
When I run `ruby accepts_no_arguments.rb`
Then the output should contain:
"""
[]
"""
Scenario: Accepts one valid argument
Given a file named "accepts_one_argument.rb" with:
"""ruby
require "./args_usage"
puts Example.new.only_nums(42)
"""
When I run `ruby accepts_one_argument.rb`
Then the output should contain:
"""
[42]
"""
Scenario: Accepts many valid arguments
Given a file named "accepts_many_arguments.rb" with:
"""ruby
require "./args_usage"
puts Example.new.only_nums(42, 45, 17, 24)
"""
When I run `ruby accepts_many_arguments.rb`
Then the output should contain:
"""
[42, 45, 17, 24]
"""
Scenario: Rejects invalid argument
Given a file named "rejects_invalid_argument.rb" with:
"""ruby
require "./args_usage"
puts Example.new.only_nums(42, "foo", 17, 24)
"""
When I run `ruby rejects_invalid_argument.rb`
Then the output should contain:
"""
: Contract violation for argument 1 of 4: (ParamContractError)
Expected: (Args[Contracts::Builtin::Num]),
Actual: "foo"
Value guarded in: Example::only_nums
With Contract: Args => Bool
"""
| Add docs for builtin Args contract | Add docs for builtin Args contract
| Cucumber | bsd-2-clause | egonSchiele/contracts.ruby,smt116/contracts.ruby,smt116/contracts.ruby,egonSchiele/contracts.ruby | cucumber | ## Code Before:
Feature: Args (TODO)
## Instruction:
Add docs for builtin Args contract
## Code After:
Feature: Args
Used for `*args` (variadic functions). Takes contract and uses it to validate
every element passed in through `*args`.
```ruby
Contract C::Args[C::Num] => C::Bool
def example(*args)
```
This example contract will validate all arguments passed through `*args` to
accept only numbers.
Background:
Given a file named "args_usage.rb" with:
"""ruby
require "contracts"
C = Contracts
class Example
include Contracts::Core
Contract C::Args[C::Num] => C::Bool
def only_nums(*args)
args.inspect
end
end
"""
Scenario: Accepts no arguments
Given a file named "accepts_no_arguments.rb" with:
"""ruby
require "./args_usage"
puts Example.new.only_nums
"""
When I run `ruby accepts_no_arguments.rb`
Then the output should contain:
"""
[]
"""
Scenario: Accepts one valid argument
Given a file named "accepts_one_argument.rb" with:
"""ruby
require "./args_usage"
puts Example.new.only_nums(42)
"""
When I run `ruby accepts_one_argument.rb`
Then the output should contain:
"""
[42]
"""
Scenario: Accepts many valid arguments
Given a file named "accepts_many_arguments.rb" with:
"""ruby
require "./args_usage"
puts Example.new.only_nums(42, 45, 17, 24)
"""
When I run `ruby accepts_many_arguments.rb`
Then the output should contain:
"""
[42, 45, 17, 24]
"""
Scenario: Rejects invalid argument
Given a file named "rejects_invalid_argument.rb" with:
"""ruby
require "./args_usage"
puts Example.new.only_nums(42, "foo", 17, 24)
"""
When I run `ruby rejects_invalid_argument.rb`
Then the output should contain:
"""
: Contract violation for argument 1 of 4: (ParamContractError)
Expected: (Args[Contracts::Builtin::Num]),
Actual: "foo"
Value guarded in: Example::only_nums
With Contract: Args => Bool
"""
| - Feature: Args (TODO)
? -------
+ Feature: Args
+
+ Used for `*args` (variadic functions). Takes contract and uses it to validate
+ every element passed in through `*args`.
+
+ ```ruby
+ Contract C::Args[C::Num] => C::Bool
+ def example(*args)
+ ```
+
+ This example contract will validate all arguments passed through `*args` to
+ accept only numbers.
+
+ Background:
+ Given a file named "args_usage.rb" with:
+ """ruby
+ require "contracts"
+ C = Contracts
+
+ class Example
+ include Contracts::Core
+
+ Contract C::Args[C::Num] => C::Bool
+ def only_nums(*args)
+ args.inspect
+ end
+ end
+ """
+
+ Scenario: Accepts no arguments
+ Given a file named "accepts_no_arguments.rb" with:
+ """ruby
+ require "./args_usage"
+ puts Example.new.only_nums
+ """
+ When I run `ruby accepts_no_arguments.rb`
+ Then the output should contain:
+ """
+ []
+ """
+
+ Scenario: Accepts one valid argument
+ Given a file named "accepts_one_argument.rb" with:
+ """ruby
+ require "./args_usage"
+ puts Example.new.only_nums(42)
+ """
+ When I run `ruby accepts_one_argument.rb`
+ Then the output should contain:
+ """
+ [42]
+ """
+
+ Scenario: Accepts many valid arguments
+ Given a file named "accepts_many_arguments.rb" with:
+ """ruby
+ require "./args_usage"
+ puts Example.new.only_nums(42, 45, 17, 24)
+ """
+ When I run `ruby accepts_many_arguments.rb`
+ Then the output should contain:
+ """
+ [42, 45, 17, 24]
+ """
+
+ Scenario: Rejects invalid argument
+ Given a file named "rejects_invalid_argument.rb" with:
+ """ruby
+ require "./args_usage"
+ puts Example.new.only_nums(42, "foo", 17, 24)
+ """
+ When I run `ruby rejects_invalid_argument.rb`
+ Then the output should contain:
+ """
+ : Contract violation for argument 1 of 4: (ParamContractError)
+ Expected: (Args[Contracts::Builtin::Num]),
+ Actual: "foo"
+ Value guarded in: Example::only_nums
+ With Contract: Args => Bool
+ """ | 81 | 81 | 80 | 1 |
53e4b0cc1d9309efb8596acd482cb3478294b82c | tasks/openstack_update_hosts_file.yml | tasks/openstack_update_hosts_file.yml | ---
# Copyright 2014, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Drop hosts file entries script locally
template:
src: "openstack-host-hostfile-setup.sh.j2"
dest: "/usr/local/bin/openstack-host-hostfile-setup.sh"
mode: "0755"
delegate_to: localhost
run_once: true
- name: Copy templated hosts file entries script
copy:
src: "/usr/local/bin/openstack-host-hostfile-setup.sh"
dest: "/usr/local/bin/openstack-host-hostfile-setup.sh"
mode: "0755"
- name: Stat host file
stat:
path: /etc/hosts
register: stat_hosts
- name: Update hosts file
command: "/usr/local/bin/openstack-host-hostfile-setup.sh"
register: update_hosts
changed_when: stat_hosts.stat.md5 | string != update_hosts.stdout | string
| ---
# Copyright 2014, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Drop hosts file entries script locally
template:
src: "openstack-host-hostfile-setup.sh.j2"
dest: "/var/tmp/openstack-host-hostfile-setup.sh"
mode: "0755"
delegate_to: localhost
run_once: true
- name: Copy templated hosts file entries script
copy:
src: "/var/tmp/openstack-host-hostfile-setup.sh"
dest: "/usr/local/bin/openstack-host-hostfile-setup.sh"
mode: "0755"
- name: Stat host file
stat:
path: /etc/hosts
register: stat_hosts
- name: Update hosts file
command: "/usr/local/bin/openstack-host-hostfile-setup.sh"
register: update_hosts
changed_when: stat_hosts.stat.md5 | string != update_hosts.stdout | string
| Write script to /var/tmp instead of /usr/local/bin | Write script to /var/tmp instead of /usr/local/bin
/var/tmp is world writeable which allows this local
task to be run by non-root users
Further, the deployment host never executes the script
so there is no need for it to be in a location which is
in the $PATH
Change-Id: Icf47ca346634885cab521fc054493ce623f17cb9
| YAML | apache-2.0 | openstack/openstack-ansible-openstack_hosts,openstack/openstack-ansible-openstack_hosts | yaml | ## Code Before:
---
# Copyright 2014, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Drop hosts file entries script locally
template:
src: "openstack-host-hostfile-setup.sh.j2"
dest: "/usr/local/bin/openstack-host-hostfile-setup.sh"
mode: "0755"
delegate_to: localhost
run_once: true
- name: Copy templated hosts file entries script
copy:
src: "/usr/local/bin/openstack-host-hostfile-setup.sh"
dest: "/usr/local/bin/openstack-host-hostfile-setup.sh"
mode: "0755"
- name: Stat host file
stat:
path: /etc/hosts
register: stat_hosts
- name: Update hosts file
command: "/usr/local/bin/openstack-host-hostfile-setup.sh"
register: update_hosts
changed_when: stat_hosts.stat.md5 | string != update_hosts.stdout | string
## Instruction:
Write script to /var/tmp instead of /usr/local/bin
/var/tmp is world writeable which allows this local
task to be run by non-root users
Further, the deployment host never executes the script
so there is no need for it to be in a location which is
in the $PATH
Change-Id: Icf47ca346634885cab521fc054493ce623f17cb9
## Code After:
---
# Copyright 2014, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Drop hosts file entries script locally
template:
src: "openstack-host-hostfile-setup.sh.j2"
dest: "/var/tmp/openstack-host-hostfile-setup.sh"
mode: "0755"
delegate_to: localhost
run_once: true
- name: Copy templated hosts file entries script
copy:
src: "/var/tmp/openstack-host-hostfile-setup.sh"
dest: "/usr/local/bin/openstack-host-hostfile-setup.sh"
mode: "0755"
- name: Stat host file
stat:
path: /etc/hosts
register: stat_hosts
- name: Update hosts file
command: "/usr/local/bin/openstack-host-hostfile-setup.sh"
register: update_hosts
changed_when: stat_hosts.stat.md5 | string != update_hosts.stdout | string
| ---
# Copyright 2014, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Drop hosts file entries script locally
template:
src: "openstack-host-hostfile-setup.sh.j2"
- dest: "/usr/local/bin/openstack-host-hostfile-setup.sh"
? ^^ ^^^^^^^^^
+ dest: "/var/tmp/openstack-host-hostfile-setup.sh"
? ^^ ^^^
mode: "0755"
delegate_to: localhost
run_once: true
- name: Copy templated hosts file entries script
copy:
- src: "/usr/local/bin/openstack-host-hostfile-setup.sh"
? ^^ ^^^^^^^^^
+ src: "/var/tmp/openstack-host-hostfile-setup.sh"
? ^^ ^^^
dest: "/usr/local/bin/openstack-host-hostfile-setup.sh"
mode: "0755"
- name: Stat host file
stat:
path: /etc/hosts
register: stat_hosts
- name: Update hosts file
command: "/usr/local/bin/openstack-host-hostfile-setup.sh"
register: update_hosts
changed_when: stat_hosts.stat.md5 | string != update_hosts.stdout | string | 4 | 0.105263 | 2 | 2 |
9d660f328184ba2bd1dc22e8d319a57348f1d446 | app/views/layouts/application.html.haml | app/views/layouts/application.html.haml | !!! 5
%html{:xmlns => "http://www.w3.org/1999/xhtml"}
%head
%meta{:charset => 'utf-8'}/
%meta{:content => "Simon Huerlimann <[email protected]>", :name => "author"}/
%link{:rel => "shortcut icon", :href => image_path('favicon.ico')}/
= stylesheet_link_tag 'compiled/screen.css', :media => 'screen, projection'
= stylesheet_link_tag 'compiled/print.css', :media => 'print'
/[if lt IE 8]
= stylesheet_link_tag 'compiled/ie.css', :media => 'screen, projection'
/[if lt IE 7]
= stylesheet_link_tag 'compiled/ie6.css', :media => 'screen, projection'
= csrf_meta_tag
%title
= "#{t('application.title')} - #{controller.action_name.capitalize}"
%body
#container
#header
#logo{:style => 'margin: 0px'}
= image_tag('logo.png')
%h1#logo-text book<span id="logo-yt">yt</span>
#main-menu
= render_navigation(:level => 1)
#content-column
#content
- if flash[:notice]
#flash.flash.notice
= flash[:notice]
= yield
#sidebar-column
#sidebar
= yield :sidebar
= javascript_include_tag :defaults
| !!! 5
%html{:xmlns => "http://www.w3.org/1999/xhtml"}
%head
%meta{:charset => 'utf-8'}/
%meta{:content => "Simon Huerlimann <[email protected]>", :name => "author"}/
%link{:rel => "shortcut icon", :href => image_path('favicon.ico')}/
= stylesheet_link_tag 'compiled/screen.css', :media => 'screen, projection'
= stylesheet_link_tag 'compiled/print.css', :media => 'print'
/[if lt IE 8]
= stylesheet_link_tag 'compiled/ie.css', :media => 'screen, projection'
/[if lt IE 7]
= stylesheet_link_tag 'compiled/ie6.css', :media => 'screen, projection'
= csrf_meta_tag
%title
= "#{t('application.title')} - #{controller.action_name.capitalize}"
%body
#container
#header
#logo{:style => 'margin: 0px'}
= image_tag('logo.png')
%h1#logo-text book<span id="logo-yt">yt</span>
#main-menu
= render_navigation(:level => 1)
#content-column
#content
- if notice
#flash.flash.notice= notice
- if alert
#alert.flash.alert= alert
= yield
#sidebar-column
#sidebar
= yield :sidebar
= javascript_include_tag :defaults
| Add notice output to layout. | Add notice output to layout.
| Haml | agpl-3.0 | wtag/bookyt,xuewenfei/bookyt,gaapt/bookyt,gaapt/bookyt,hauledev/bookyt,silvermind/bookyt,huerlisi/bookyt,hauledev/bookyt,gaapt/bookyt,xuewenfei/bookyt,silvermind/bookyt,huerlisi/bookyt,silvermind/bookyt,silvermind/bookyt,hauledev/bookyt,gaapt/bookyt,huerlisi/bookyt,wtag/bookyt,wtag/bookyt,xuewenfei/bookyt,hauledev/bookyt | haml | ## Code Before:
!!! 5
%html{:xmlns => "http://www.w3.org/1999/xhtml"}
%head
%meta{:charset => 'utf-8'}/
%meta{:content => "Simon Huerlimann <[email protected]>", :name => "author"}/
%link{:rel => "shortcut icon", :href => image_path('favicon.ico')}/
= stylesheet_link_tag 'compiled/screen.css', :media => 'screen, projection'
= stylesheet_link_tag 'compiled/print.css', :media => 'print'
/[if lt IE 8]
= stylesheet_link_tag 'compiled/ie.css', :media => 'screen, projection'
/[if lt IE 7]
= stylesheet_link_tag 'compiled/ie6.css', :media => 'screen, projection'
= csrf_meta_tag
%title
= "#{t('application.title')} - #{controller.action_name.capitalize}"
%body
#container
#header
#logo{:style => 'margin: 0px'}
= image_tag('logo.png')
%h1#logo-text book<span id="logo-yt">yt</span>
#main-menu
= render_navigation(:level => 1)
#content-column
#content
- if flash[:notice]
#flash.flash.notice
= flash[:notice]
= yield
#sidebar-column
#sidebar
= yield :sidebar
= javascript_include_tag :defaults
## Instruction:
Add notice output to layout.
## Code After:
!!! 5
%html{:xmlns => "http://www.w3.org/1999/xhtml"}
%head
%meta{:charset => 'utf-8'}/
%meta{:content => "Simon Huerlimann <[email protected]>", :name => "author"}/
%link{:rel => "shortcut icon", :href => image_path('favicon.ico')}/
= stylesheet_link_tag 'compiled/screen.css', :media => 'screen, projection'
= stylesheet_link_tag 'compiled/print.css', :media => 'print'
/[if lt IE 8]
= stylesheet_link_tag 'compiled/ie.css', :media => 'screen, projection'
/[if lt IE 7]
= stylesheet_link_tag 'compiled/ie6.css', :media => 'screen, projection'
= csrf_meta_tag
%title
= "#{t('application.title')} - #{controller.action_name.capitalize}"
%body
#container
#header
#logo{:style => 'margin: 0px'}
= image_tag('logo.png')
%h1#logo-text book<span id="logo-yt">yt</span>
#main-menu
= render_navigation(:level => 1)
#content-column
#content
- if notice
#flash.flash.notice= notice
- if alert
#alert.flash.alert= alert
= yield
#sidebar-column
#sidebar
= yield :sidebar
= javascript_include_tag :defaults
| !!! 5
%html{:xmlns => "http://www.w3.org/1999/xhtml"}
%head
%meta{:charset => 'utf-8'}/
%meta{:content => "Simon Huerlimann <[email protected]>", :name => "author"}/
%link{:rel => "shortcut icon", :href => image_path('favicon.ico')}/
= stylesheet_link_tag 'compiled/screen.css', :media => 'screen, projection'
= stylesheet_link_tag 'compiled/print.css', :media => 'print'
/[if lt IE 8]
= stylesheet_link_tag 'compiled/ie.css', :media => 'screen, projection'
/[if lt IE 7]
= stylesheet_link_tag 'compiled/ie6.css', :media => 'screen, projection'
= csrf_meta_tag
%title
= "#{t('application.title')} - #{controller.action_name.capitalize}"
%body
#container
#header
#logo{:style => 'margin: 0px'}
= image_tag('logo.png')
%h1#logo-text book<span id="logo-yt">yt</span>
#main-menu
= render_navigation(:level => 1)
#content-column
#content
- - if flash[:notice]
? ------- -
+ - if notice
- #flash.flash.notice
+ #flash.flash.notice= notice
? ++++++++
- = flash[:notice]
+ - if alert
+ #alert.flash.alert= alert
= yield
#sidebar-column
#sidebar
= yield :sidebar
= javascript_include_tag :defaults | 7 | 0.189189 | 4 | 3 |
adaa9cdfd9ab00dfec042bd4c13e9f7869f22d83 | src/Behat/Symfony2Extension/Context/KernelDictionary.php | src/Behat/Symfony2Extension/Context/KernelDictionary.php | <?php
namespace Behat\Symfony2Extension\Context;
use Symfony\Component\HttpKernel\KernelInterface;
/*
* This file is part of the Behat\Symfony2Extension.
* (c) Konstantin Kudryashov <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Kernel support methods for Symfony2Extension.
*
* @author Konstantin Kudryashov <[email protected]>
*/
trait KernelDictionary
{
private $kernel;
/**
* Sets Kernel instance.
*
* @param KernelInterface $kernel HttpKernel instance
*/
public function setKernel(KernelInterface $kernel)
{
$this->kernel = $kernel;
}
/**
* Returns HttpKernel instance.
*
* @return HttpKernel
*/
public function getKernel()
{
return $this->kernel;
}
/**
* Returns HttpKernel service container.
*
* @return ServiceContainer
*/
public function getContainer()
{
return $this->kernel->getContainer();
}
}
| <?php
namespace Behat\Symfony2Extension\Context;
use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/*
* This file is part of the Behat\Symfony2Extension.
* (c) Konstantin Kudryashov <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Kernel support methods for Symfony2Extension.
*
* @author Konstantin Kudryashov <[email protected]>
*/
trait KernelDictionary
{
private $kernel;
/**
* Sets Kernel instance.
*
* @param KernelInterface $kernel HttpKernel instance
*/
public function setKernel(KernelInterface $kernel)
{
$this->kernel = $kernel;
}
/**
* Returns HttpKernel instance.
*
* @return KernelInterface
*/
public function getKernel()
{
return $this->kernel;
}
/**
* Returns HttpKernel service container.
*
* @return ContainerInterface
*/
public function getContainer()
{
return $this->kernel->getContainer();
}
}
| Fix PHPDocs for proper IDE completion | Fix PHPDocs for proper IDE completion
| PHP | mit | Behat/Symfony2Extension,piwi91/Symfony2Extension | php | ## Code Before:
<?php
namespace Behat\Symfony2Extension\Context;
use Symfony\Component\HttpKernel\KernelInterface;
/*
* This file is part of the Behat\Symfony2Extension.
* (c) Konstantin Kudryashov <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Kernel support methods for Symfony2Extension.
*
* @author Konstantin Kudryashov <[email protected]>
*/
trait KernelDictionary
{
private $kernel;
/**
* Sets Kernel instance.
*
* @param KernelInterface $kernel HttpKernel instance
*/
public function setKernel(KernelInterface $kernel)
{
$this->kernel = $kernel;
}
/**
* Returns HttpKernel instance.
*
* @return HttpKernel
*/
public function getKernel()
{
return $this->kernel;
}
/**
* Returns HttpKernel service container.
*
* @return ServiceContainer
*/
public function getContainer()
{
return $this->kernel->getContainer();
}
}
## Instruction:
Fix PHPDocs for proper IDE completion
## Code After:
<?php
namespace Behat\Symfony2Extension\Context;
use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/*
* This file is part of the Behat\Symfony2Extension.
* (c) Konstantin Kudryashov <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Kernel support methods for Symfony2Extension.
*
* @author Konstantin Kudryashov <[email protected]>
*/
trait KernelDictionary
{
private $kernel;
/**
* Sets Kernel instance.
*
* @param KernelInterface $kernel HttpKernel instance
*/
public function setKernel(KernelInterface $kernel)
{
$this->kernel = $kernel;
}
/**
* Returns HttpKernel instance.
*
* @return KernelInterface
*/
public function getKernel()
{
return $this->kernel;
}
/**
* Returns HttpKernel service container.
*
* @return ContainerInterface
*/
public function getContainer()
{
return $this->kernel->getContainer();
}
}
| <?php
namespace Behat\Symfony2Extension\Context;
use Symfony\Component\HttpKernel\KernelInterface;
+ use Symfony\Component\DependencyInjection\ContainerInterface;
/*
* This file is part of the Behat\Symfony2Extension.
* (c) Konstantin Kudryashov <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Kernel support methods for Symfony2Extension.
*
* @author Konstantin Kudryashov <[email protected]>
*/
trait KernelDictionary
{
private $kernel;
/**
* Sets Kernel instance.
*
* @param KernelInterface $kernel HttpKernel instance
*/
public function setKernel(KernelInterface $kernel)
{
$this->kernel = $kernel;
}
/**
* Returns HttpKernel instance.
*
- * @return HttpKernel
? ----
+ * @return KernelInterface
? +++++++++
*/
public function getKernel()
{
return $this->kernel;
}
/**
* Returns HttpKernel service container.
*
- * @return ServiceContainer
? -------
+ * @return ContainerInterface
? +++++++++
*/
public function getContainer()
{
return $this->kernel->getContainer();
}
} | 5 | 0.09434 | 3 | 2 |
4710449519c214b71cb30fe3e6afbdb84ccaac23 | data/css/modules/card/_legacyPolaroid.scss | data/css/modules/card/_legacyPolaroid.scss | .CardLegacyPolaroid {
padding: 10px 10px 0px 10px;
margin: 7px;
background-color: white;
&__title {
padding: 4px 0px;
color: $accent-dark-color;
font-family: $title-font, sans-serif;
font-size: 0.77em;
font-weight: bold;
&.highlighted {
background-color: $background-dark-color;
}
}
&.highlighted &__title {
color: $accent-dark-color;
}
&__thumbnail {
min-height: 133px;
}
&__synopsis {
padding: 0px 0px 4px 0px;
color: #666666;
font-size: 0.68em;
text-shadow: white 0px 1px 0px;
&.highlighted {
background-color: $background-dark-color;
}
}
.composite & {
&__title {
font-weight: 600;
font-size: 16.4px; /* Original spec may have been wrong */
}
&__synopsis {
color: black;
font-size: 16.4px; /* 14px spec * 88% */
text-shadow: none;
}
}
}
| .CardLegacyPolaroid {
padding: 10px;
margin: 7px;
background-color: white;
&__title {
padding: 4px 0px;
color: $accent-dark-color;
font-family: $title-font, sans-serif;
font-size: 0.77em;
font-weight: bold;
&.highlighted {
background-color: $background-dark-color;
}
}
&.highlighted &__title {
color: $accent-dark-color;
}
&__thumbnail {
min-height: 133px;
}
&__synopsis {
padding: 0px 0px 4px 0px;
color: #666666;
font-size: 0.68em;
text-shadow: white 0px 1px 0px;
&.highlighted {
background-color: $background-dark-color;
}
}
.composite & {
&__title {
font-weight: 600;
font-size: 16.4px; /* Original spec may have been wrong */
}
&__synopsis {
color: black;
font-size: 16.4px; /* 14px spec * 88% */
text-shadow: none;
}
}
}
| Add padding-bototm on Card.LegacyPolaroid module | Add padding-bototm on Card.LegacyPolaroid module
Changed padding to 10px all around
https://phabricator.endlessm.com/T15368
| SCSS | lgpl-2.1 | endlessm/eos-knowledge-lib,endlessm/eos-knowledge-lib,endlessm/eos-knowledge-lib,endlessm/eos-knowledge-lib | scss | ## Code Before:
.CardLegacyPolaroid {
padding: 10px 10px 0px 10px;
margin: 7px;
background-color: white;
&__title {
padding: 4px 0px;
color: $accent-dark-color;
font-family: $title-font, sans-serif;
font-size: 0.77em;
font-weight: bold;
&.highlighted {
background-color: $background-dark-color;
}
}
&.highlighted &__title {
color: $accent-dark-color;
}
&__thumbnail {
min-height: 133px;
}
&__synopsis {
padding: 0px 0px 4px 0px;
color: #666666;
font-size: 0.68em;
text-shadow: white 0px 1px 0px;
&.highlighted {
background-color: $background-dark-color;
}
}
.composite & {
&__title {
font-weight: 600;
font-size: 16.4px; /* Original spec may have been wrong */
}
&__synopsis {
color: black;
font-size: 16.4px; /* 14px spec * 88% */
text-shadow: none;
}
}
}
## Instruction:
Add padding-bototm on Card.LegacyPolaroid module
Changed padding to 10px all around
https://phabricator.endlessm.com/T15368
## Code After:
.CardLegacyPolaroid {
padding: 10px;
margin: 7px;
background-color: white;
&__title {
padding: 4px 0px;
color: $accent-dark-color;
font-family: $title-font, sans-serif;
font-size: 0.77em;
font-weight: bold;
&.highlighted {
background-color: $background-dark-color;
}
}
&.highlighted &__title {
color: $accent-dark-color;
}
&__thumbnail {
min-height: 133px;
}
&__synopsis {
padding: 0px 0px 4px 0px;
color: #666666;
font-size: 0.68em;
text-shadow: white 0px 1px 0px;
&.highlighted {
background-color: $background-dark-color;
}
}
.composite & {
&__title {
font-weight: 600;
font-size: 16.4px; /* Original spec may have been wrong */
}
&__synopsis {
color: black;
font-size: 16.4px; /* 14px spec * 88% */
text-shadow: none;
}
}
}
| .CardLegacyPolaroid {
- padding: 10px 10px 0px 10px;
+ padding: 10px;
margin: 7px;
background-color: white;
&__title {
padding: 4px 0px;
color: $accent-dark-color;
font-family: $title-font, sans-serif;
font-size: 0.77em;
font-weight: bold;
&.highlighted {
background-color: $background-dark-color;
}
}
&.highlighted &__title {
color: $accent-dark-color;
}
&__thumbnail {
min-height: 133px;
}
&__synopsis {
padding: 0px 0px 4px 0px;
color: #666666;
font-size: 0.68em;
text-shadow: white 0px 1px 0px;
&.highlighted {
background-color: $background-dark-color;
}
}
.composite & {
&__title {
font-weight: 600;
font-size: 16.4px; /* Original spec may have been wrong */
}
&__synopsis {
color: black;
font-size: 16.4px; /* 14px spec * 88% */
text-shadow: none;
}
}
} | 2 | 0.040816 | 1 | 1 |
1cfb839eece31810a88d761792388318c3aec6f4 | recipes/whatshap/meta.yaml | recipes/whatshap/meta.yaml | package:
name: whatshap
version: "0.13"
about:
home: https://whatshap.readthedocs.io/
license: MIT License
summary: 'phase genomic variants using DNA sequencing reads (haplotype assembly)'
source:
fn: whatshap-0.13.tar.gz
url: https://pypi.python.org/packages/e2/f3/c71cb4bc3ba3b1234ee0c5fe729c60440164e07437695ca09c61750e0e11/whatshap-0.13.tar.gz
md5: 6c9c8b7d6138b60a5a070f0de59f576f
requirements:
# To do: Pinnng of the setuptools version is a workaround. Try to remove it.
build:
- python
- setuptools ==23
- pysam <0.9.0
- pyvcf
- pyfaidx
- xopen
run:
- python
- setuptools ==23
- pysam <0.9.0
- pyvcf
- pyfaidx
- xopen
build:
skip: True # [not py3k or osx]
script: python3 setup.py install
test:
imports:
- whatshap
commands:
- whatshap --help > /dev/null
| package:
name: whatshap
version: "0.13"
about:
home: https://whatshap.readthedocs.io/
license: MIT License
summary: 'phase genomic variants using DNA sequencing reads (haplotype assembly)'
source:
fn: whatshap-0.13.tar.gz
url: https://pypi.python.org/packages/e2/f3/c71cb4bc3ba3b1234ee0c5fe729c60440164e07437695ca09c61750e0e11/whatshap-0.13.tar.gz
md5: 6c9c8b7d6138b60a5a070f0de59f576f
requirements:
# To do: Pinnng of the setuptools version is a workaround. Try to remove it.
build:
- gcc # [not osx]
- llvm # [osx]
- python
- setuptools ==23
- pysam <0.9.0
- pyvcf
- pyfaidx
- xopen
run:
- libgcc # [not osx]
- python
- setuptools ==23
- pysam <0.9.0
- pyvcf
- pyfaidx
- xopen
build:
skip: True # [not py3k]
script: python3 setup.py install
test:
imports:
- whatshap
commands:
- whatshap --help > /dev/null
| Build WhatsHap on OS X | Build WhatsHap on OS X
| YAML | mit | instituteofpathologyheidelberg/bioconda-recipes,acaprez/recipes,matthdsm/bioconda-recipes,ThomasWollmann/bioconda-recipes,ivirshup/bioconda-recipes,ivirshup/bioconda-recipes,instituteofpathologyheidelberg/bioconda-recipes,gvlproject/bioconda-recipes,jasper1918/bioconda-recipes,HassanAmr/bioconda-recipes,mcornwell1957/bioconda-recipes,JenCabral/bioconda-recipes,gvlproject/bioconda-recipes,roryk/recipes,rvalieris/bioconda-recipes,omicsnut/bioconda-recipes,ivirshup/bioconda-recipes,ThomasWollmann/bioconda-recipes,shenwei356/bioconda-recipes,lpantano/recipes,gvlproject/bioconda-recipes,mdehollander/bioconda-recipes,omicsnut/bioconda-recipes,mdehollander/bioconda-recipes,lpantano/recipes,martin-mann/bioconda-recipes,CGATOxford/bioconda-recipes,Luobiny/bioconda-recipes,abims-sbr/bioconda-recipes,matthdsm/bioconda-recipes,omicsnut/bioconda-recipes,saketkc/bioconda-recipes,zwanli/bioconda-recipes,keuv-grvl/bioconda-recipes,ivirshup/bioconda-recipes,dkoppstein/recipes,colinbrislawn/bioconda-recipes,pinguinkiste/bioconda-recipes,keuv-grvl/bioconda-recipes,ivirshup/bioconda-recipes,saketkc/bioconda-recipes,instituteofpathologyheidelberg/bioconda-recipes,oena/bioconda-recipes,phac-nml/bioconda-recipes,shenwei356/bioconda-recipes,bebatut/bioconda-recipes,BIMSBbioinfo/bioconda-recipes,zwanli/bioconda-recipes,pinguinkiste/bioconda-recipes,dmaticzka/bioconda-recipes,npavlovikj/bioconda-recipes,JenCabral/bioconda-recipes,dmaticzka/bioconda-recipes,bow/bioconda-recipes,bioconda/bioconda-recipes,chapmanb/bioconda-recipes,keuv-grvl/bioconda-recipes,jfallmann/bioconda-recipes,daler/bioconda-recipes,lpantano/recipes,dmaticzka/bioconda-recipes,bow/bioconda-recipes,phac-nml/bioconda-recipes,Luobiny/bioconda-recipes,bebatut/bioconda-recipes,gvlproject/bioconda-recipes,chapmanb/bioconda-recipes,daler/bioconda-recipes,colinbrislawn/bioconda-recipes,bioconda/recipes,peterjc/bioconda-recipes,dkoppstein/recipes,xguse/bioconda-recipes,joachimwolff/bioconda-recipes,hardingnj/bioconda-recipes,abims-sbr/bioconda-recipes,martin-mann/bioconda-recipes,abims-sbr/bioconda-recipes,daler/bioconda-recipes,ostrokach/bioconda-recipes,cokelaer/bioconda-recipes,colinbrislawn/bioconda-recipes,mdehollander/bioconda-recipes,jasper1918/bioconda-recipes,oena/bioconda-recipes,pinguinkiste/bioconda-recipes,lpantano/recipes,npavlovikj/bioconda-recipes,oena/bioconda-recipes,bebatut/bioconda-recipes,jasper1918/bioconda-recipes,omicsnut/bioconda-recipes,guowei-he/bioconda-recipes,rvalieris/bioconda-recipes,acaprez/recipes,mcornwell1957/bioconda-recipes,blankenberg/bioconda-recipes,phac-nml/bioconda-recipes,bioconda/bioconda-recipes,JenCabral/bioconda-recipes,rvalieris/bioconda-recipes,keuv-grvl/bioconda-recipes,npavlovikj/bioconda-recipes,Luobiny/bioconda-recipes,matthdsm/bioconda-recipes,peterjc/bioconda-recipes,xguse/bioconda-recipes,ThomasWollmann/bioconda-recipes,keuv-grvl/bioconda-recipes,abims-sbr/bioconda-recipes,pinguinkiste/bioconda-recipes,joachimwolff/bioconda-recipes,phac-nml/bioconda-recipes,shenwei356/bioconda-recipes,HassanAmr/bioconda-recipes,phac-nml/bioconda-recipes,guowei-he/bioconda-recipes,CGATOxford/bioconda-recipes,bioconda/bioconda-recipes,keuv-grvl/bioconda-recipes,saketkc/bioconda-recipes,joachimwolff/bioconda-recipes,bow/bioconda-recipes,ThomasWollmann/bioconda-recipes,ostrokach/bioconda-recipes,colinbrislawn/bioconda-recipes,cokelaer/bioconda-recipes,dmaticzka/bioconda-recipes,npavlovikj/bioconda-recipes,JenCabral/bioconda-recipes,jasper1918/bioconda-recipes,dmaticzka/bioconda-recipes,saketkc/bioconda-recipes,daler/bioconda-recipes,rvalieris/bioconda-recipes,CGATOxford/bioconda-recipes,matthdsm/bioconda-recipes,zachcp/bioconda-recipes,jfallmann/bioconda-recipes,BIMSBbioinfo/bioconda-recipes,jfallmann/bioconda-recipes,ostrokach/bioconda-recipes,zachcp/bioconda-recipes,HassanAmr/bioconda-recipes,saketkc/bioconda-recipes,jfallmann/bioconda-recipes,mdehollander/bioconda-recipes,HassanAmr/bioconda-recipes,peterjc/bioconda-recipes,oena/bioconda-recipes,rob-p/bioconda-recipes,guowei-he/bioconda-recipes,gregvonkuster/bioconda-recipes,ostrokach/bioconda-recipes,ThomasWollmann/bioconda-recipes,cokelaer/bioconda-recipes,instituteofpathologyheidelberg/bioconda-recipes,abims-sbr/bioconda-recipes,ThomasWollmann/bioconda-recipes,bioconda/recipes,roryk/recipes,peterjc/bioconda-recipes,BIMSBbioinfo/bioconda-recipes,saketkc/bioconda-recipes,BIMSBbioinfo/bioconda-recipes,zwanli/bioconda-recipes,guowei-he/bioconda-recipes,JenCabral/bioconda-recipes,ostrokach/bioconda-recipes,bow/bioconda-recipes,hardingnj/bioconda-recipes,mcornwell1957/bioconda-recipes,gregvonkuster/bioconda-recipes,martin-mann/bioconda-recipes,colinbrislawn/bioconda-recipes,CGATOxford/bioconda-recipes,acaprez/recipes,CGATOxford/bioconda-recipes,gregvonkuster/bioconda-recipes,zwanli/bioconda-recipes,jasper1918/bioconda-recipes,omicsnut/bioconda-recipes,colinbrislawn/bioconda-recipes,martin-mann/bioconda-recipes,matthdsm/bioconda-recipes,daler/bioconda-recipes,blankenberg/bioconda-recipes,ostrokach/bioconda-recipes,hardingnj/bioconda-recipes,guowei-he/bioconda-recipes,peterjc/bioconda-recipes,rob-p/bioconda-recipes,joachimwolff/bioconda-recipes,chapmanb/bioconda-recipes,cokelaer/bioconda-recipes,bow/bioconda-recipes,peterjc/bioconda-recipes,rob-p/bioconda-recipes,matthdsm/bioconda-recipes,mdehollander/bioconda-recipes,bow/bioconda-recipes,bebatut/bioconda-recipes,JenCabral/bioconda-recipes,daler/bioconda-recipes,blankenberg/bioconda-recipes,hardingnj/bioconda-recipes,zwanli/bioconda-recipes,zachcp/bioconda-recipes,Luobiny/bioconda-recipes,acaprez/recipes,mcornwell1957/bioconda-recipes,rob-p/bioconda-recipes,instituteofpathologyheidelberg/bioconda-recipes,xguse/bioconda-recipes,ivirshup/bioconda-recipes,joachimwolff/bioconda-recipes,pinguinkiste/bioconda-recipes,oena/bioconda-recipes,gregvonkuster/bioconda-recipes,shenwei356/bioconda-recipes,xguse/bioconda-recipes,chapmanb/bioconda-recipes,HassanAmr/bioconda-recipes,joachimwolff/bioconda-recipes,zwanli/bioconda-recipes,abims-sbr/bioconda-recipes,dkoppstein/recipes,dmaticzka/bioconda-recipes,chapmanb/bioconda-recipes,zachcp/bioconda-recipes,mdehollander/bioconda-recipes,rvalieris/bioconda-recipes,xguse/bioconda-recipes,CGATOxford/bioconda-recipes,martin-mann/bioconda-recipes,mcornwell1957/bioconda-recipes,roryk/recipes,BIMSBbioinfo/bioconda-recipes,gvlproject/bioconda-recipes,bioconda/recipes,blankenberg/bioconda-recipes,gvlproject/bioconda-recipes,bioconda/bioconda-recipes,BIMSBbioinfo/bioconda-recipes,HassanAmr/bioconda-recipes,hardingnj/bioconda-recipes,pinguinkiste/bioconda-recipes,rvalieris/bioconda-recipes | yaml | ## Code Before:
package:
name: whatshap
version: "0.13"
about:
home: https://whatshap.readthedocs.io/
license: MIT License
summary: 'phase genomic variants using DNA sequencing reads (haplotype assembly)'
source:
fn: whatshap-0.13.tar.gz
url: https://pypi.python.org/packages/e2/f3/c71cb4bc3ba3b1234ee0c5fe729c60440164e07437695ca09c61750e0e11/whatshap-0.13.tar.gz
md5: 6c9c8b7d6138b60a5a070f0de59f576f
requirements:
# To do: Pinnng of the setuptools version is a workaround. Try to remove it.
build:
- python
- setuptools ==23
- pysam <0.9.0
- pyvcf
- pyfaidx
- xopen
run:
- python
- setuptools ==23
- pysam <0.9.0
- pyvcf
- pyfaidx
- xopen
build:
skip: True # [not py3k or osx]
script: python3 setup.py install
test:
imports:
- whatshap
commands:
- whatshap --help > /dev/null
## Instruction:
Build WhatsHap on OS X
## Code After:
package:
name: whatshap
version: "0.13"
about:
home: https://whatshap.readthedocs.io/
license: MIT License
summary: 'phase genomic variants using DNA sequencing reads (haplotype assembly)'
source:
fn: whatshap-0.13.tar.gz
url: https://pypi.python.org/packages/e2/f3/c71cb4bc3ba3b1234ee0c5fe729c60440164e07437695ca09c61750e0e11/whatshap-0.13.tar.gz
md5: 6c9c8b7d6138b60a5a070f0de59f576f
requirements:
# To do: Pinnng of the setuptools version is a workaround. Try to remove it.
build:
- gcc # [not osx]
- llvm # [osx]
- python
- setuptools ==23
- pysam <0.9.0
- pyvcf
- pyfaidx
- xopen
run:
- libgcc # [not osx]
- python
- setuptools ==23
- pysam <0.9.0
- pyvcf
- pyfaidx
- xopen
build:
skip: True # [not py3k]
script: python3 setup.py install
test:
imports:
- whatshap
commands:
- whatshap --help > /dev/null
| package:
name: whatshap
version: "0.13"
about:
home: https://whatshap.readthedocs.io/
license: MIT License
summary: 'phase genomic variants using DNA sequencing reads (haplotype assembly)'
source:
fn: whatshap-0.13.tar.gz
url: https://pypi.python.org/packages/e2/f3/c71cb4bc3ba3b1234ee0c5fe729c60440164e07437695ca09c61750e0e11/whatshap-0.13.tar.gz
md5: 6c9c8b7d6138b60a5a070f0de59f576f
requirements:
# To do: Pinnng of the setuptools version is a workaround. Try to remove it.
build:
+ - gcc # [not osx]
+ - llvm # [osx]
- python
- setuptools ==23
- pysam <0.9.0
- pyvcf
- pyfaidx
- xopen
run:
+ - libgcc # [not osx]
- python
- setuptools ==23
- pysam <0.9.0
- pyvcf
- pyfaidx
- xopen
build:
- skip: True # [not py3k or osx]
? -------
+ skip: True # [not py3k]
script: python3 setup.py install
test:
imports:
- whatshap
commands:
- whatshap --help > /dev/null | 5 | 0.125 | 4 | 1 |
b7bb11ab992d77c591f0c58151c00e9febb43861 | extensions/EGL_ANGLE_software_display.txt | extensions/EGL_ANGLE_software_display.txt | Name
ANGLE_software_display
Name Strings
EGL_ANGLE_software_display
Contributors
John Bauman
Daniel Koch
Contacts
John Bauman, Google Inc. (jbauman 'at' chromium.org)
Status
In progress
Version
Version 1, July 12, 2011
Number
EGL Extension #??
Dependencies
This extension is written against the wording of the EGL 1.4
Specification.
Overview
This extension allows for receiving a device that uses software rendering.
New Types
None
New Procedures and Functions
None
New Tokens
None
Additions to Chapter 3 of the EGL 1.4 Specification (EGL Functions and Errors)
Add before the last sentence of the first paragraph of section 3.2,
"Initialization":
"If <display_id> is EGL_SOFTWARE_DISPLAY_ANGLE, a display that will render
everything in software will be returned."
Issues
Revision History
Version 1, 2011/07/12 - first draft.
| Name
ANGLE_software_display
Name Strings
EGL_ANGLE_software_display
Contributors
John Bauman
Daniel Koch
Contacts
John Bauman, Google Inc. (jbauman 'at' chromium.org)
Status
In progress
Version
Version 2, October 19, 2011
Number
EGL Extension #??
Dependencies
This extension is written against the wording of the EGL 1.4
Specification.
Overview
This extension allows for receiving a device that uses software rendering.
New Types
None
New Procedures and Functions
None
New Tokens
EGL_SOFTWARE_DISPLAY_ANGLE (EGLNativeDisplayType)-1
Additions to Chapter 3 of the EGL 1.4 Specification (EGL Functions and Errors)
Add before the last sentence of the first paragraph of section 3.2,
"Initialization":
"If <display_id> is EGL_SOFTWARE_DISPLAY_ANGLE, a display that will render
everything in software will be returned."
Issues
Revision History
Version 1, 2011/07/12 - first draft.
Version 2, 2011/10/18 - add token definition
| Add token to ANGLE_software_display extension | Add token to ANGLE_software_display extension
git-svn-id: a070b70d2b8c44c266a3870c0cddd9a0ee470458@796 736b8ea6-26fd-11df-bfd4-992fa37f6226
| Text | bsd-3-clause | stammen/angleproject,csa7mdm/angle,cvsuser-chromium/chromium-third-party_angle_dx11,android-ia/platform_external_chromium_org_third_party_angle,mlfarrell/angle,vvuk/angle,xin3liang/platform_external_chromium_org_third_party_angle,xin3liang/platform_external_chromium_org_third_party_angle_dx11,android-ia/platform_external_chromium_org_third_party_angle,RepublicMaster/angleproject,crezefire/angle,pombreda/angleproject,ecoal95/angle,cantren/angleproject,geekboxzone/lollipop_external_chromium_org_third_party_angle,bsergean/angle,vvuk/angle-old,RepublicMaster/angleproject,xin3liang/platform_external_chromium_org_third_party_angle,larsbergstrom/angle,ehsan/angle,mikolalysenko/angle,RepublicMaster/angleproject,ppy/angle,cantren/angleproject,KTXSoftware/angleproject,KalebDark/angleproject,cantren/angleproject,vvuk/angle,xuxiandi/angleproject,crezefire/angle,themusicgod1/angleproject,geekboxzone/lollipop_external_chromium_org_third_party_angle,domokit/waterfall,mlfarrell/angle,xin3liang/platform_external_chromium_org_third_party_angle_dx11,xin3liang/platform_external_chromium_org_third_party_angle_dx11,KTXSoftware/angleproject,nandhanurrevanth/angle,geekboxzone/lollipop_external_chromium_org_third_party_angle,mlfarrell/angle,mrobinson/rust-angle,xuxiandi/angleproject,xin3liang/platform_external_chromium_org_third_party_angle_dx11,mybios/angle,MSOpenTech/angle-win8.0,pombreda/angleproject,nandhanurrevanth/angle,MIPS/external-chromium_org-third_party-angle_dx11,crezefire/angle,mrobinson/rust-angle,RepublicMaster/angleproject,android-ia/platform_external_chromium_org_third_party_angle_dx11,stammen/angleproject,vvuk/angle,cvsuser-chromium/chromium-third-party_angle_dx11,nandhanurrevanth/angle,shairai/angleproject,ppy/angle,MIPS/external-chromium_org-third_party-angle_dx11,bsergean/angle,ehsan/angle,mybios/angle,cantren/angleproject,jgcaaprom/android_external_chromium_org_third_party_angle,stammen/angleproject,android-ia/platform_external_chromium_org_third_party_angle_dx11,geekboxzone/lollipop_external_chromium_org_third_party_angle,ehsan/angle,larsbergstrom/angle,xin3liang/platform_external_chromium_org_third_party_angle,MIPS/external-chromium_org-third_party-angle,cvsuser-chromium/chromium-third-party_angle_dx11,larsbergstrom/angle,xuxiandi/angleproject,ppy/angle,larsbergstrom/angle,jgcaaprom/android_external_chromium_org_third_party_angle,android-ia/platform_external_chromium_org_third_party_angle_dx11,mikolalysenko/angle,pombreda/angleproject,ghostoy/angle,android-ia/platform_external_chromium_org_third_party_angle,mlfarrell/angle,mikolalysenko/angle,ecoal95/angle,pombreda/angleproject,MIPS/external-chromium_org-third_party-angle,ghostoy/angle,MSOpenTech/angle-win8.0,KTXSoftware/angleproject,MIPS/external-chromium_org-third_party-angle,MSOpenTech/angle,jgcaaprom/android_external_chromium_org_third_party_angle,themusicgod1/angleproject,xin3liang/platform_external_chromium_org_third_party_angle,android-ia/platform_external_chromium_org_third_party_angle,ghostoy/angle,stammen/angleproject,KalebDark/angleproject,KTXSoftware/angleproject,ecoal95/angle,shairai/angleproject,KTXSoftware/angleproject,csa7mdm/angle,ecoal95/angle,domokit/waterfall,MSOpenTech/angle,android-ia/platform_external_chromium_org_third_party_angle_dx11,xuxiandi/angleproject,MIPS/external-chromium_org-third_party-angle_dx11,mrobinson/rust-angle,MIPS/external-chromium_org-third_party-angle,cvsuser-chromium/chromium-third-party_angle_dx11,ppy/angle,mrobinson/rust-angle,nandhanurrevanth/angle,KalebDark/angleproject,ghostoy/angle,ehsan/angle,themusicgod1/angleproject,vvuk/angle-old,MSOpenTech/angle-win8.0,bsergean/angle,jgcaaprom/android_external_chromium_org_third_party_angle,vvuk/angle,MSOpenTech/angle,csa7mdm/angle,KalebDark/angleproject,csa7mdm/angle,shairai/angleproject,mrobinson/rust-angle,ecoal95/angle,mybios/angle,MIPS/external-chromium_org-third_party-angle_dx11,shairai/angleproject,bsergean/angle,vvuk/angle-old,MSOpenTech/angle-win8.0,mybios/angle,MSOpenTech/angle,themusicgod1/angleproject,crezefire/angle,mikolalysenko/angle,vvuk/angle-old | text | ## Code Before:
Name
ANGLE_software_display
Name Strings
EGL_ANGLE_software_display
Contributors
John Bauman
Daniel Koch
Contacts
John Bauman, Google Inc. (jbauman 'at' chromium.org)
Status
In progress
Version
Version 1, July 12, 2011
Number
EGL Extension #??
Dependencies
This extension is written against the wording of the EGL 1.4
Specification.
Overview
This extension allows for receiving a device that uses software rendering.
New Types
None
New Procedures and Functions
None
New Tokens
None
Additions to Chapter 3 of the EGL 1.4 Specification (EGL Functions and Errors)
Add before the last sentence of the first paragraph of section 3.2,
"Initialization":
"If <display_id> is EGL_SOFTWARE_DISPLAY_ANGLE, a display that will render
everything in software will be returned."
Issues
Revision History
Version 1, 2011/07/12 - first draft.
## Instruction:
Add token to ANGLE_software_display extension
git-svn-id: a070b70d2b8c44c266a3870c0cddd9a0ee470458@796 736b8ea6-26fd-11df-bfd4-992fa37f6226
## Code After:
Name
ANGLE_software_display
Name Strings
EGL_ANGLE_software_display
Contributors
John Bauman
Daniel Koch
Contacts
John Bauman, Google Inc. (jbauman 'at' chromium.org)
Status
In progress
Version
Version 2, October 19, 2011
Number
EGL Extension #??
Dependencies
This extension is written against the wording of the EGL 1.4
Specification.
Overview
This extension allows for receiving a device that uses software rendering.
New Types
None
New Procedures and Functions
None
New Tokens
EGL_SOFTWARE_DISPLAY_ANGLE (EGLNativeDisplayType)-1
Additions to Chapter 3 of the EGL 1.4 Specification (EGL Functions and Errors)
Add before the last sentence of the first paragraph of section 3.2,
"Initialization":
"If <display_id> is EGL_SOFTWARE_DISPLAY_ANGLE, a display that will render
everything in software will be returned."
Issues
Revision History
Version 1, 2011/07/12 - first draft.
Version 2, 2011/10/18 - add token definition
| Name
ANGLE_software_display
Name Strings
EGL_ANGLE_software_display
Contributors
John Bauman
Daniel Koch
Contacts
John Bauman, Google Inc. (jbauman 'at' chromium.org)
Status
In progress
Version
- Version 1, July 12, 2011
+ Version 2, October 19, 2011
Number
EGL Extension #??
Dependencies
This extension is written against the wording of the EGL 1.4
Specification.
Overview
This extension allows for receiving a device that uses software rendering.
New Types
None
New Procedures and Functions
None
New Tokens
- None
+ EGL_SOFTWARE_DISPLAY_ANGLE (EGLNativeDisplayType)-1
Additions to Chapter 3 of the EGL 1.4 Specification (EGL Functions and Errors)
Add before the last sentence of the first paragraph of section 3.2,
"Initialization":
"If <display_id> is EGL_SOFTWARE_DISPLAY_ANGLE, a display that will render
everything in software will be returned."
Issues
Revision History
Version 1, 2011/07/12 - first draft.
+ Version 2, 2011/10/18 - add token definition
+ | 6 | 0.095238 | 4 | 2 |
7a795b2a276e9a499aab6443d4ca53683d364b7d | README.md | README.md | ===
[](https://travis-ci.org/emahags/puppet-module-resource)
Module to manage resources
===
# Compatibility
---------------
This module is built for use with Puppet v3 on the following OS families.
* EL 6
===
# Parameters
------------
file
----
Hash of files
- *Default*: undef
- *Hiera example*:
<pre>
file::file:
'example file':
path: '/usr/local/bin/do_stuff'
owner: root
group: root
mode: 0755
</pre>
file_hiera_merge
----------------
Merge files in hiera
- *Default*: false
| ===
[](https://travis-ci.org/emahags/puppet-module-resource)
Module to manage resources
===
# Compatibility
---------------
This module is built for use with Puppet v3 on the following OS families.
* EL 6
===
# Parameters
------------
file
----
Hash of files
- *Default*: undef
- *Hiera example*:
<pre>
resource::file:
'example file':
path: '/usr/local/bin/do_stuff'
owner: root
group: root
mode: 0755
</pre>
file_hiera_merge
----------------
Merge files in hiera
- *Default*: false
mount
-----
Hash of mounts
- *Default*: undef
- *Hiera example*:
<pre>
resource::mount:
'/opt/files':
ensure: mounted
atboot: true
device: 'fileserver:/exports/files'
fstype: 'nfs'
options: 'defaults'
</pre>
mount_hiera_merge
-----------------
Merge mounts in hiera
- *Default*: false
cron
----
Hash of cronjobs
- *Default*: undef
- *Hiera example*:
<pre>
resource::cron:
'do_stuff':
command: '/usr/local/bin/do_stuff'
hour: '23'
user: 'root'
</pre>
cron_hiera_merge
----------------
Merge cronjobs in hiera
- *Default*: false
exec
----
Hash of execs
- *Default*: undef
- *Hiera example*:
<pre>
resource::exec:
'say hello':
command: 'wall hello'
path: '/usr/bin'
</pre>
exec_hiera_merge
----------------
Merge execs in hiera
- *Default*: false
| Update readme with all available variables | Update readme with all available variables
| Markdown | apache-2.0 | emahags/puppet-module-resource | markdown | ## Code Before:
===
[](https://travis-ci.org/emahags/puppet-module-resource)
Module to manage resources
===
# Compatibility
---------------
This module is built for use with Puppet v3 on the following OS families.
* EL 6
===
# Parameters
------------
file
----
Hash of files
- *Default*: undef
- *Hiera example*:
<pre>
file::file:
'example file':
path: '/usr/local/bin/do_stuff'
owner: root
group: root
mode: 0755
</pre>
file_hiera_merge
----------------
Merge files in hiera
- *Default*: false
## Instruction:
Update readme with all available variables
## Code After:
===
[](https://travis-ci.org/emahags/puppet-module-resource)
Module to manage resources
===
# Compatibility
---------------
This module is built for use with Puppet v3 on the following OS families.
* EL 6
===
# Parameters
------------
file
----
Hash of files
- *Default*: undef
- *Hiera example*:
<pre>
resource::file:
'example file':
path: '/usr/local/bin/do_stuff'
owner: root
group: root
mode: 0755
</pre>
file_hiera_merge
----------------
Merge files in hiera
- *Default*: false
mount
-----
Hash of mounts
- *Default*: undef
- *Hiera example*:
<pre>
resource::mount:
'/opt/files':
ensure: mounted
atboot: true
device: 'fileserver:/exports/files'
fstype: 'nfs'
options: 'defaults'
</pre>
mount_hiera_merge
-----------------
Merge mounts in hiera
- *Default*: false
cron
----
Hash of cronjobs
- *Default*: undef
- *Hiera example*:
<pre>
resource::cron:
'do_stuff':
command: '/usr/local/bin/do_stuff'
hour: '23'
user: 'root'
</pre>
cron_hiera_merge
----------------
Merge cronjobs in hiera
- *Default*: false
exec
----
Hash of execs
- *Default*: undef
- *Hiera example*:
<pre>
resource::exec:
'say hello':
command: 'wall hello'
path: '/usr/bin'
</pre>
exec_hiera_merge
----------------
Merge execs in hiera
- *Default*: false
| ===
[](https://travis-ci.org/emahags/puppet-module-resource)
Module to manage resources
===
# Compatibility
---------------
This module is built for use with Puppet v3 on the following OS families.
* EL 6
===
# Parameters
------------
file
----
Hash of files
- *Default*: undef
- *Hiera example*:
<pre>
- file::file:
+ resource::file:
'example file':
path: '/usr/local/bin/do_stuff'
owner: root
group: root
mode: 0755
</pre>
file_hiera_merge
----------------
Merge files in hiera
- *Default*: false
+ mount
+ -----
+ Hash of mounts
+ - *Default*: undef
+
+ - *Hiera example*:
+ <pre>
+ resource::mount:
+ '/opt/files':
+ ensure: mounted
+ atboot: true
+ device: 'fileserver:/exports/files'
+ fstype: 'nfs'
+ options: 'defaults'
+ </pre>
+
+ mount_hiera_merge
+ -----------------
+ Merge mounts in hiera
+
+ - *Default*: false
+
+ cron
+ ----
+ Hash of cronjobs
+
+ - *Default*: undef
+
+ - *Hiera example*:
+ <pre>
+ resource::cron:
+ 'do_stuff':
+ command: '/usr/local/bin/do_stuff'
+ hour: '23'
+ user: 'root'
+ </pre>
+
+ cron_hiera_merge
+ ----------------
+ Merge cronjobs in hiera
+
+ - *Default*: false
+
+ exec
+ ----
+ Hash of execs
+
+ - *Default*: undef
+
+ - *Hiera example*:
+ <pre>
+ resource::exec:
+ 'say hello':
+ command: 'wall hello'
+ path: '/usr/bin'
+ </pre>
+
+ exec_hiera_merge
+ ----------------
+ Merge execs in hiera
+
+ - *Default*: false | 64 | 1.52381 | 63 | 1 |
171e43a9aee813c53f970d28379074a0c682575f | src/test/java/AllTests.java | src/test/java/AllTests.java | import br.com.cronapi.DatabaseTest;
import br.com.cronapi.RestClientTest;
import br.com.cronapi.VarTest;
import br.com.cronapi.dateTime.DateTimeTest;
import br.com.cronapi.json.JsonTest;
import br.com.cronapi.list.ListTest;
import br.com.cronapi.rest.security.CronappSecurityTest;
import br.com.cronapi.xml.XmlTest;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@RunWith(Suite.class)
@Suite.SuiteClasses({
DateTimeTest.class, ListTest.class, CronappSecurityTest.class,
DatabaseTest.class, RestClientTest.class, VarTest.class, JsonTest.class,
XmlTest.class})
public class AllTests {
}
| import br.com.cronapi.DatabaseTest;
import br.com.cronapi.RestClientTest;
import br.com.cronapi.VarTest;
import br.com.cronapi.dateTime.DateTimeTest;
import br.com.cronapi.json.JsonTest;
import br.com.cronapi.list.ListTest;
import br.com.cronapi.math.MathTest;
import br.com.cronapi.rest.security.CronappSecurityTest;
import br.com.cronapi.xml.XmlTest;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@RunWith(Suite.class)
@Suite.SuiteClasses({
DateTimeTest.class, ListTest.class, CronappSecurityTest.class,
DatabaseTest.class, RestClientTest.class, VarTest.class, JsonTest.class,
XmlTest.class, MathTest.class})
public class AllTests {
}
| Add class test in suite class test. | :ok_hand: Add class test in suite class test.
| Java | mit | technecloud/cronapi-java | java | ## Code Before:
import br.com.cronapi.DatabaseTest;
import br.com.cronapi.RestClientTest;
import br.com.cronapi.VarTest;
import br.com.cronapi.dateTime.DateTimeTest;
import br.com.cronapi.json.JsonTest;
import br.com.cronapi.list.ListTest;
import br.com.cronapi.rest.security.CronappSecurityTest;
import br.com.cronapi.xml.XmlTest;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@RunWith(Suite.class)
@Suite.SuiteClasses({
DateTimeTest.class, ListTest.class, CronappSecurityTest.class,
DatabaseTest.class, RestClientTest.class, VarTest.class, JsonTest.class,
XmlTest.class})
public class AllTests {
}
## Instruction:
:ok_hand: Add class test in suite class test.
## Code After:
import br.com.cronapi.DatabaseTest;
import br.com.cronapi.RestClientTest;
import br.com.cronapi.VarTest;
import br.com.cronapi.dateTime.DateTimeTest;
import br.com.cronapi.json.JsonTest;
import br.com.cronapi.list.ListTest;
import br.com.cronapi.math.MathTest;
import br.com.cronapi.rest.security.CronappSecurityTest;
import br.com.cronapi.xml.XmlTest;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@RunWith(Suite.class)
@Suite.SuiteClasses({
DateTimeTest.class, ListTest.class, CronappSecurityTest.class,
DatabaseTest.class, RestClientTest.class, VarTest.class, JsonTest.class,
XmlTest.class, MathTest.class})
public class AllTests {
}
| import br.com.cronapi.DatabaseTest;
import br.com.cronapi.RestClientTest;
import br.com.cronapi.VarTest;
import br.com.cronapi.dateTime.DateTimeTest;
import br.com.cronapi.json.JsonTest;
import br.com.cronapi.list.ListTest;
+ import br.com.cronapi.math.MathTest;
import br.com.cronapi.rest.security.CronappSecurityTest;
import br.com.cronapi.xml.XmlTest;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@RunWith(Suite.class)
@Suite.SuiteClasses({
DateTimeTest.class, ListTest.class, CronappSecurityTest.class,
DatabaseTest.class, RestClientTest.class, VarTest.class, JsonTest.class,
- XmlTest.class})
+ XmlTest.class, MathTest.class})
public class AllTests {
} | 3 | 0.166667 | 2 | 1 |
a0049a1e2278208695c00a5f08238f84c01f9322 | build/build.ps1 | build/build.ps1 | $toolsDirectory = '.\tools'
if (!(Test-Path -path $toolsDirectory )) { New-Item $toolsDirectory -Type Directory }
$nuget = '.\tools\nuget.exe'
if ((Test-Path $nuget) -eq $false) {
Invoke-WebRequest -Uri http://nuget.org/nuget.exe -OutFile $nuget
}
Set-Alias nuget $nuget
$cake = '.\tools\Cake\Cake.exe'
if ((Test-Path $cake) -eq $false) {
nuget install Cake -OutputDirectory $toolsDirectory -ExcludeVersion
}
Set-Alias cake $cake
cake build.cake
| $toolsDirectory = '.\tools'
if (!(Test-Path -path $toolsDirectory )) { New-Item $toolsDirectory -Type Directory }
$nuget = '.\tools\nuget.exe'
if ((Test-Path $nuget) -eq $false) {
Invoke-WebRequest -Uri https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -OutFile $nuget
}
Set-Alias nuget $nuget
$cake = '.\tools\Cake\Cake.exe'
if ((Test-Path $cake) -eq $false) {
nuget install Cake -OutputDirectory $toolsDirectory -ExcludeVersion
}
Set-Alias cake $cake
cake build.cake
| Use the latest NuGet version. | Use the latest NuGet version.
| PowerShell | mit | MatthewKing/DeviceId | powershell | ## Code Before:
$toolsDirectory = '.\tools'
if (!(Test-Path -path $toolsDirectory )) { New-Item $toolsDirectory -Type Directory }
$nuget = '.\tools\nuget.exe'
if ((Test-Path $nuget) -eq $false) {
Invoke-WebRequest -Uri http://nuget.org/nuget.exe -OutFile $nuget
}
Set-Alias nuget $nuget
$cake = '.\tools\Cake\Cake.exe'
if ((Test-Path $cake) -eq $false) {
nuget install Cake -OutputDirectory $toolsDirectory -ExcludeVersion
}
Set-Alias cake $cake
cake build.cake
## Instruction:
Use the latest NuGet version.
## Code After:
$toolsDirectory = '.\tools'
if (!(Test-Path -path $toolsDirectory )) { New-Item $toolsDirectory -Type Directory }
$nuget = '.\tools\nuget.exe'
if ((Test-Path $nuget) -eq $false) {
Invoke-WebRequest -Uri https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -OutFile $nuget
}
Set-Alias nuget $nuget
$cake = '.\tools\Cake\Cake.exe'
if ((Test-Path $cake) -eq $false) {
nuget install Cake -OutputDirectory $toolsDirectory -ExcludeVersion
}
Set-Alias cake $cake
cake build.cake
| $toolsDirectory = '.\tools'
if (!(Test-Path -path $toolsDirectory )) { New-Item $toolsDirectory -Type Directory }
$nuget = '.\tools\nuget.exe'
if ((Test-Path $nuget) -eq $false) {
- Invoke-WebRequest -Uri http://nuget.org/nuget.exe -OutFile $nuget
+ Invoke-WebRequest -Uri https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -OutFile $nuget
? + +++++ +++++++++++++++++++++++++++
}
Set-Alias nuget $nuget
$cake = '.\tools\Cake\Cake.exe'
if ((Test-Path $cake) -eq $false) {
nuget install Cake -OutputDirectory $toolsDirectory -ExcludeVersion
}
Set-Alias cake $cake
cake build.cake | 2 | 0.125 | 1 | 1 |
6d9f2d7c6de8090ad3b8a6aa88e576e3944dde97 | docs/manage/tpl/vendor/submit_email.txt | docs/manage/tpl/vendor/submit_email.txt | [%- page.style='bare.html' %]To: [email protected]
From: ([% combust.user.username %]) [% combust.user.email %]
Subject: New vendor zone application: [% vz.zone_name %]
[% combust.user.username %] requested a [% vz.zone_name %] zone for [% vz.organization_name %].
[% combust.config.base_url('ntppool') %]/manage/vendor/zone?id=[% vz.id %]
Notes:
[% vz.request_information %]
Contact information:
[% vz.contact_information %]
| [%- page.style='bare.html' %]To: [email protected]
From: ([% combust.user.username %]) [% combust.user.email %]
Subject: New vendor zone application: [% vz.zone_name %]
[% combust.user.username %] requested a [% vz.zone_name %] zone for [% vz.organization_name %].
[% combust.manage_url('/manage/vendor/zone?id=' + vz.id) %]
Notes:
[% vz.request_information %]
Contact information:
[% vz.contact_information %]
| Fix manage vendor zone URL in 'vendor zone request submitted' email | Fix manage vendor zone URL in 'vendor zone request submitted' email
| Text | apache-2.0 | tklauser/ntppool,tklauser/ntppool,punitvara/ntppool,punitvara/ntppool,tklauser/ntppool,tklauser/ntppool,punitvara/ntppool | text | ## Code Before:
[%- page.style='bare.html' %]To: [email protected]
From: ([% combust.user.username %]) [% combust.user.email %]
Subject: New vendor zone application: [% vz.zone_name %]
[% combust.user.username %] requested a [% vz.zone_name %] zone for [% vz.organization_name %].
[% combust.config.base_url('ntppool') %]/manage/vendor/zone?id=[% vz.id %]
Notes:
[% vz.request_information %]
Contact information:
[% vz.contact_information %]
## Instruction:
Fix manage vendor zone URL in 'vendor zone request submitted' email
## Code After:
[%- page.style='bare.html' %]To: [email protected]
From: ([% combust.user.username %]) [% combust.user.email %]
Subject: New vendor zone application: [% vz.zone_name %]
[% combust.user.username %] requested a [% vz.zone_name %] zone for [% vz.organization_name %].
[% combust.manage_url('/manage/vendor/zone?id=' + vz.id) %]
Notes:
[% vz.request_information %]
Contact information:
[% vz.contact_information %]
| [%- page.style='bare.html' %]To: [email protected]
From: ([% combust.user.username %]) [% combust.user.email %]
Subject: New vendor zone application: [% vz.zone_name %]
[% combust.user.username %] requested a [% vz.zone_name %] zone for [% vz.organization_name %].
- [% combust.config.base_url('ntppool') %]/manage/vendor/zone?id=[% vz.id %]
? ^^ ^^ ---- ------------ ^^
+ [% combust.manage_url('/manage/vendor/zone?id=' + vz.id) %]
? ^^ ^ ^^^ +
Notes:
[% vz.request_information %]
Contact information:
[% vz.contact_information %]
| 2 | 0.111111 | 1 | 1 |
5dc87015823a4787234eb2153a780a5580f4ea74 | app/views/patients/death.html.haml | app/views/patients/death.html.haml | .main-content
.row.g-center
= render partial: "patients/patient_info_header", locals: { model: @patient }
.row
= render partial: "patients/mini_renal_profile", locals: { model: @patient }
.row
%h5 Deceased Patients
.row
%ul.no-bullet
- @dead_patients.each do |patient|
%li
= patient.full_name
| .main-content
.row
%h5 Deceased Patients
.row
%ul.no-bullet
- @dead_patients.each do |patient|
%li
= patient.full_name
| Fix failing 'manage patients' functionality | Fix failing 'manage patients' functionality
| Haml | mit | airslie/renalware-core,airslie/renalware-core,airslie/renalware-core,airslie/renalware-core | haml | ## Code Before:
.main-content
.row.g-center
= render partial: "patients/patient_info_header", locals: { model: @patient }
.row
= render partial: "patients/mini_renal_profile", locals: { model: @patient }
.row
%h5 Deceased Patients
.row
%ul.no-bullet
- @dead_patients.each do |patient|
%li
= patient.full_name
## Instruction:
Fix failing 'manage patients' functionality
## Code After:
.main-content
.row
%h5 Deceased Patients
.row
%ul.no-bullet
- @dead_patients.each do |patient|
%li
= patient.full_name
| .main-content
- .row.g-center
- = render partial: "patients/patient_info_header", locals: { model: @patient }
-
- .row
- = render partial: "patients/mini_renal_profile", locals: { model: @patient }
.row
%h5 Deceased Patients
.row
%ul.no-bullet
- @dead_patients.each do |patient|
%li
= patient.full_name | 5 | 0.3125 | 0 | 5 |
cf3855fd6accb771143f4c3d814d202692385a18 | lib/zendesk_apps_support/validations/source.rb | lib/zendesk_apps_support/validations/source.rb | require 'jshintrb'
module ZendeskAppsSupport
module Validations
module Source
LINTER_OPTIONS = {
# enforcing options:
:noarg => true,
:undef => true,
# relaxing options:
:eqnull => true,
:laxcomma => true,
# predefined globals:
:predef => %w(_ console services helpers alert JSON Base64 clearInterval clearTimeout setInterval setTimeout)
}.freeze
class <<self
def call(package)
source = package.files.find { |f| f.relative_path == 'app.js' }
if package.requirements_only
return source ? [ ValidationError.new(:no_app_js_required) ] : []
end
return [ ValidationError.new(:missing_source) ] unless source
jshint_errors = linter.lint(source.read)
if jshint_errors.any?
[ JSHintValidationError.new(source.relative_path, jshint_errors) ]
else
[]
end
end
private
def linter
Jshintrb::Lint.new(LINTER_OPTIONS)
end
end
end
end
end
| require 'jshintrb'
module ZendeskAppsSupport
module Validations
module Source
LINTER_OPTIONS = {
# enforcing options:
:noarg => true,
:undef => true,
# relaxing options:
:eqnull => true,
:laxcomma => true,
# predefined globals:
:predef => %w(_ console services helpers alert window document self
JSON Base64 clearInterval clearTimeout setInterval setTimeout)
}.freeze
class <<self
def call(package)
source = package.files.find { |f| f.relative_path == 'app.js' }
if package.requirements_only
return source ? [ ValidationError.new(:no_app_js_required) ] : []
end
return [ ValidationError.new(:missing_source) ] unless source
jshint_errors = linter.lint(source.read)
if jshint_errors.any?
[ JSHintValidationError.new(source.relative_path, jshint_errors) ]
else
[]
end
end
private
def linter
Jshintrb::Lint.new(LINTER_OPTIONS)
end
end
end
end
end
| Add window and document object to jshint validation | Add window and document object to jshint validation
| Ruby | apache-2.0 | zendesk/zendesk_apps_support,zendesk/zendesk_apps_support,zendesk/zendesk_apps_support | ruby | ## Code Before:
require 'jshintrb'
module ZendeskAppsSupport
module Validations
module Source
LINTER_OPTIONS = {
# enforcing options:
:noarg => true,
:undef => true,
# relaxing options:
:eqnull => true,
:laxcomma => true,
# predefined globals:
:predef => %w(_ console services helpers alert JSON Base64 clearInterval clearTimeout setInterval setTimeout)
}.freeze
class <<self
def call(package)
source = package.files.find { |f| f.relative_path == 'app.js' }
if package.requirements_only
return source ? [ ValidationError.new(:no_app_js_required) ] : []
end
return [ ValidationError.new(:missing_source) ] unless source
jshint_errors = linter.lint(source.read)
if jshint_errors.any?
[ JSHintValidationError.new(source.relative_path, jshint_errors) ]
else
[]
end
end
private
def linter
Jshintrb::Lint.new(LINTER_OPTIONS)
end
end
end
end
end
## Instruction:
Add window and document object to jshint validation
## Code After:
require 'jshintrb'
module ZendeskAppsSupport
module Validations
module Source
LINTER_OPTIONS = {
# enforcing options:
:noarg => true,
:undef => true,
# relaxing options:
:eqnull => true,
:laxcomma => true,
# predefined globals:
:predef => %w(_ console services helpers alert window document self
JSON Base64 clearInterval clearTimeout setInterval setTimeout)
}.freeze
class <<self
def call(package)
source = package.files.find { |f| f.relative_path == 'app.js' }
if package.requirements_only
return source ? [ ValidationError.new(:no_app_js_required) ] : []
end
return [ ValidationError.new(:missing_source) ] unless source
jshint_errors = linter.lint(source.read)
if jshint_errors.any?
[ JSHintValidationError.new(source.relative_path, jshint_errors) ]
else
[]
end
end
private
def linter
Jshintrb::Lint.new(LINTER_OPTIONS)
end
end
end
end
end
| require 'jshintrb'
module ZendeskAppsSupport
module Validations
module Source
LINTER_OPTIONS = {
# enforcing options:
:noarg => true,
:undef => true,
# relaxing options:
:eqnull => true,
:laxcomma => true,
# predefined globals:
+ :predef => %w(_ console services helpers alert window document self
- :predef => %w(_ console services helpers alert JSON Base64 clearInterval clearTimeout setInterval setTimeout)
? ------- -- ---- ------- -------- ------- ^^^^^
+ JSON Base64 clearInterval clearTimeout setInterval setTimeout)
? ^^^^^^^
}.freeze
class <<self
def call(package)
source = package.files.find { |f| f.relative_path == 'app.js' }
if package.requirements_only
return source ? [ ValidationError.new(:no_app_js_required) ] : []
end
return [ ValidationError.new(:missing_source) ] unless source
jshint_errors = linter.lint(source.read)
if jshint_errors.any?
[ JSHintValidationError.new(source.relative_path, jshint_errors) ]
else
[]
end
end
private
def linter
Jshintrb::Lint.new(LINTER_OPTIONS)
end
end
end
end
end | 3 | 0.06383 | 2 | 1 |
7f811495c19935e80027d0314851ae9ade681a30 | test/utility/css/font-size.spec.js | test/utility/css/font-size.spec.js | import assert from 'power-assert';
import test from '../../helper/test';
import fontSize, {PX, PT} from '../../../lib/utility/css/font-size';
describe('fontSize', () => {
it('returns the font size of an element in pixels', async () => {
await test(
`
<p style="font-size: 12px">Lorem ipsum</p>
`,
p => assert(fontSize(p, PX) === 12)
);
});
it('returns the font size of an element in points', async () => {
await test(
`
<p style="font-size: 12px">Lorem ipsum</p>
`,
p => assert(fontSize(p, PT) === 9)
);
await test(
`
<p style="font-size: 11pt">Lorem ipsum</p>
`,
p => assert(fontSize(p, PT) === 11)
);
});
it('returns the font size of an element in points by default', async () => {
await test(
`
<p style="font-size: 12px">Lorem ipsum</p>
`,
p => assert(fontSize(p) === 9)
);
});
});
| import assert from 'power-assert';
import test from '../../helper/test';
import fontSize, {PX, PT} from '../../../lib/utility/css/font-size';
describe('fontSize', () => {
it('returns the font size of an element in pixels', async () => {
await test(
`
<p style="font-size: 12px">Lorem ipsum</p>
`,
p => assert(fontSize(p, PX) === 12)
);
await test(
`
<p style="font-size: 1.5em">Lorem ipsum</p>
`,
p => assert(fontSize(p, PX) === 24)
);
});
it('returns the font size of an element in points', async () => {
await test(
`
<p style="font-size: 12px">Lorem ipsum</p>
`,
p => assert(fontSize(p, PT) === 9)
);
await test(
`
<p style="font-size: 11pt">Lorem ipsum</p>
`,
p => assert(fontSize(p, PT) === 11)
);
});
it('returns the font size of an element in points by default', async () => {
await test(
`
<p style="font-size: 12px">Lorem ipsum</p>
`,
p => assert(fontSize(p) === 9)
);
});
});
| Add additional font size test | Add additional font size test
| JavaScript | mit | kasperisager/allie | javascript | ## Code Before:
import assert from 'power-assert';
import test from '../../helper/test';
import fontSize, {PX, PT} from '../../../lib/utility/css/font-size';
describe('fontSize', () => {
it('returns the font size of an element in pixels', async () => {
await test(
`
<p style="font-size: 12px">Lorem ipsum</p>
`,
p => assert(fontSize(p, PX) === 12)
);
});
it('returns the font size of an element in points', async () => {
await test(
`
<p style="font-size: 12px">Lorem ipsum</p>
`,
p => assert(fontSize(p, PT) === 9)
);
await test(
`
<p style="font-size: 11pt">Lorem ipsum</p>
`,
p => assert(fontSize(p, PT) === 11)
);
});
it('returns the font size of an element in points by default', async () => {
await test(
`
<p style="font-size: 12px">Lorem ipsum</p>
`,
p => assert(fontSize(p) === 9)
);
});
});
## Instruction:
Add additional font size test
## Code After:
import assert from 'power-assert';
import test from '../../helper/test';
import fontSize, {PX, PT} from '../../../lib/utility/css/font-size';
describe('fontSize', () => {
it('returns the font size of an element in pixels', async () => {
await test(
`
<p style="font-size: 12px">Lorem ipsum</p>
`,
p => assert(fontSize(p, PX) === 12)
);
await test(
`
<p style="font-size: 1.5em">Lorem ipsum</p>
`,
p => assert(fontSize(p, PX) === 24)
);
});
it('returns the font size of an element in points', async () => {
await test(
`
<p style="font-size: 12px">Lorem ipsum</p>
`,
p => assert(fontSize(p, PT) === 9)
);
await test(
`
<p style="font-size: 11pt">Lorem ipsum</p>
`,
p => assert(fontSize(p, PT) === 11)
);
});
it('returns the font size of an element in points by default', async () => {
await test(
`
<p style="font-size: 12px">Lorem ipsum</p>
`,
p => assert(fontSize(p) === 9)
);
});
});
| import assert from 'power-assert';
import test from '../../helper/test';
import fontSize, {PX, PT} from '../../../lib/utility/css/font-size';
describe('fontSize', () => {
it('returns the font size of an element in pixels', async () => {
await test(
`
<p style="font-size: 12px">Lorem ipsum</p>
`,
p => assert(fontSize(p, PX) === 12)
+ );
+
+ await test(
+ `
+ <p style="font-size: 1.5em">Lorem ipsum</p>
+ `,
+ p => assert(fontSize(p, PX) === 24)
);
});
it('returns the font size of an element in points', async () => {
await test(
`
<p style="font-size: 12px">Lorem ipsum</p>
`,
p => assert(fontSize(p, PT) === 9)
);
await test(
`
<p style="font-size: 11pt">Lorem ipsum</p>
`,
p => assert(fontSize(p, PT) === 11)
);
});
it('returns the font size of an element in points by default', async () => {
await test(
`
<p style="font-size: 12px">Lorem ipsum</p>
`,
p => assert(fontSize(p) === 9)
);
});
}); | 7 | 0.179487 | 7 | 0 |
94c78cda2fc8679f04170a12102907fa85cb2cbe | sass/griddle/_span.scss | sass/griddle/_span.scss | @mixin span($start, $span) {
grid-column: $start / span $span;
}
@mixin column-span($start, $span) {
@include span($start, $span);
}
// ----
@mixin vertical-span($start, $span) {
grid-row: $start / span $span;
}
@mixin row-span($start, $span) {
@include vertical-span($start, $span);
}
| @mixin span($span, $start: false) {
@if $start {
grid-column: $start / span $span;
}
@else {
grid-column: span $span;
}
}
@mixin column-span($span, $start: false) {
@include span($span, $start);
}
// ----
@mixin vertical-span($span, $start: false) {
@if $start {
grid-row: $start / span $span;
}
@else {
grid-row: span $span;
}
}
@mixin row-span($span, $start: false) {
@include vertical-span($span, $start);
}
| Swap $span and $start in span mixins | :boom: Swap $span and $start in span mixins
Align with Singularity, number to span first, from where second
| SCSS | mit | at-import/griddle | scss | ## Code Before:
@mixin span($start, $span) {
grid-column: $start / span $span;
}
@mixin column-span($start, $span) {
@include span($start, $span);
}
// ----
@mixin vertical-span($start, $span) {
grid-row: $start / span $span;
}
@mixin row-span($start, $span) {
@include vertical-span($start, $span);
}
## Instruction:
:boom: Swap $span and $start in span mixins
Align with Singularity, number to span first, from where second
## Code After:
@mixin span($span, $start: false) {
@if $start {
grid-column: $start / span $span;
}
@else {
grid-column: span $span;
}
}
@mixin column-span($span, $start: false) {
@include span($span, $start);
}
// ----
@mixin vertical-span($span, $start: false) {
@if $start {
grid-row: $start / span $span;
}
@else {
grid-row: span $span;
}
}
@mixin row-span($span, $start: false) {
@include vertical-span($span, $start);
}
| - @mixin span($start, $span) {
+ @mixin span($span, $start: false) {
+ @if $start {
- grid-column: $start / span $span;
+ grid-column: $start / span $span;
? ++
+ }
+ @else {
+ grid-column: span $span;
+ }
}
- @mixin column-span($start, $span) {
? ^ ^ ^^^
+ @mixin column-span($span, $start: false) {
? +++++++ ^ ^^^ ^
- @include span($start, $span);
? -------
+ @include span($span, $start);
? +++++++
}
// ----
- @mixin vertical-span($start, $span) {
? ^ ^ ^^^
+ @mixin vertical-span($span, $start: false) {
? +++++++ ^ ^^^ ^
+ @if $start {
- grid-row: $start / span $span;
+ grid-row: $start / span $span;
? ++
+ }
+ @else {
+ grid-row: span $span;
+ }
}
- @mixin row-span($start, $span) {
? ^ ^ ^^^
+ @mixin row-span($span, $start: false) {
? +++++++ ^ ^^^ ^
- @include vertical-span($start, $span);
? -------
+ @include vertical-span($span, $start);
? +++++++
} | 26 | 1.529412 | 18 | 8 |
6461a126ec28c05ef2a4d6b735e6ee7a79a480d1 | .travis.yml | .travis.yml | language: php
php:
- "5.4"
- "5.5"
- "5.6"
- "nightly"
- "hhvm"
sudo: false
before_script:
- composer install --no-interaction
- cp config/app_travis.php config/app.php
- cp config/oauth_example.php config/oauth.php
- mysql -e 'create database pmaerr;'
- wget https://scrutinizer-ci.com/ocular.phar
script:
- bin/cake migrations migrate
- vendor/bin/phpunit --coverage-clover build/logs/clover.xml -c phpunit.xml.dist
after_script:
- php vendor/bin/coveralls -v
- php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
matrix:
allow_failures:
- php: "hhvm"
- php: "nightly"
| language: php
php:
- "5.6"
- "nightly"
- "hhvm"
sudo: false
before_script:
- composer install --no-interaction
- cp config/app_travis.php config/app.php
- cp config/oauth_example.php config/oauth.php
- mysql -e 'create database pmaerr;'
- wget https://scrutinizer-ci.com/ocular.phar
script:
- bin/cake migrations migrate
- vendor/bin/phpunit --coverage-clover build/logs/clover.xml -c phpunit.xml.dist
after_script:
- php vendor/bin/coveralls -v
- php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
matrix:
allow_failures:
- php: "hhvm"
- php: "nightly"
| Remove older PHP versions from Travis | Remove older PHP versions from Travis
Our production is 5.6 so there is no need to support anything older.
Signed-off-by: Michal Čihař <[email protected]>
| YAML | mit | phpmyadmin/error-reporting-server,madhuracj/error-reporting-server,ujjwalwahi/error-reporting-server,devenbansod/error-reporting-server,ujjwalwahi/error-reporting-server,devenbansod/error-reporting-server,madhuracj/error-reporting-server,madhuracj/error-reporting-server,ujjwalwahi/error-reporting-server,phpmyadmin/error-reporting-server,phpmyadmin/error-reporting-server,devenbansod/error-reporting-server | yaml | ## Code Before:
language: php
php:
- "5.4"
- "5.5"
- "5.6"
- "nightly"
- "hhvm"
sudo: false
before_script:
- composer install --no-interaction
- cp config/app_travis.php config/app.php
- cp config/oauth_example.php config/oauth.php
- mysql -e 'create database pmaerr;'
- wget https://scrutinizer-ci.com/ocular.phar
script:
- bin/cake migrations migrate
- vendor/bin/phpunit --coverage-clover build/logs/clover.xml -c phpunit.xml.dist
after_script:
- php vendor/bin/coveralls -v
- php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
matrix:
allow_failures:
- php: "hhvm"
- php: "nightly"
## Instruction:
Remove older PHP versions from Travis
Our production is 5.6 so there is no need to support anything older.
Signed-off-by: Michal Čihař <[email protected]>
## Code After:
language: php
php:
- "5.6"
- "nightly"
- "hhvm"
sudo: false
before_script:
- composer install --no-interaction
- cp config/app_travis.php config/app.php
- cp config/oauth_example.php config/oauth.php
- mysql -e 'create database pmaerr;'
- wget https://scrutinizer-ci.com/ocular.phar
script:
- bin/cake migrations migrate
- vendor/bin/phpunit --coverage-clover build/logs/clover.xml -c phpunit.xml.dist
after_script:
- php vendor/bin/coveralls -v
- php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
matrix:
allow_failures:
- php: "hhvm"
- php: "nightly"
| language: php
php:
- - "5.4"
- - "5.5"
- "5.6"
- "nightly"
- "hhvm"
sudo: false
before_script:
- composer install --no-interaction
- cp config/app_travis.php config/app.php
- cp config/oauth_example.php config/oauth.php
- mysql -e 'create database pmaerr;'
- wget https://scrutinizer-ci.com/ocular.phar
script:
- bin/cake migrations migrate
- vendor/bin/phpunit --coverage-clover build/logs/clover.xml -c phpunit.xml.dist
after_script:
- php vendor/bin/coveralls -v
- php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
matrix:
allow_failures:
- php: "hhvm"
- php: "nightly" | 2 | 0.083333 | 0 | 2 |
7a7251c3693e01b85109856d00c9d455d60ca84b | src/broker.h | src/broker.h |
class Broker {
public:
Broker(std::string bind, std::string private_key) :
bind_(bind), private_key_(private_key) {}
void main_loop();
private:
void handleMessage(const Message& message);
void sendMessage(Client &client, std::vector<std::string> frames);
std::string readPrivateKey(std::string path);
std::map<std::string,Client> clients_;
std::map<std::string,Topic> topics_;
zmq::socket_t* socket_;
size_t recv_ = 0;
size_t sent_ = 0;
std::string bind_;
std::string private_key_;
};
#endif
|
class Broker {
public:
Broker(std::string bind, std::string private_key) :
bind_(bind), private_key_(private_key) {}
void main_loop();
private:
void handleMessage(const Message& message);
void sendMessage(Client &client, std::vector<std::string> frames);
std::string readPrivateKey(std::string path);
std::unordered_map<std::string,Client> clients_;
std::unordered_map<std::string,Topic> topics_;
zmq::socket_t* socket_;
size_t recv_ = 0;
size_t sent_ = 0;
std::string bind_;
std::string private_key_;
};
#endif
| Use unordered_map rather than map | Use unordered_map rather than map
`unordered_map` containers are faster than map containers to
access individual elements by their key, although they are
generally less efficient for range iteration through a subset
of their elements.
http://www.cplusplus.com/reference/unordered_map/unordered_map/
Which is fine, because we never do range iteration on these maps,
so use the tiny bit faster one.
| C | apache-2.0 | puppetlabs/mc0d,puppetlabs/mc0d | c | ## Code Before:
class Broker {
public:
Broker(std::string bind, std::string private_key) :
bind_(bind), private_key_(private_key) {}
void main_loop();
private:
void handleMessage(const Message& message);
void sendMessage(Client &client, std::vector<std::string> frames);
std::string readPrivateKey(std::string path);
std::map<std::string,Client> clients_;
std::map<std::string,Topic> topics_;
zmq::socket_t* socket_;
size_t recv_ = 0;
size_t sent_ = 0;
std::string bind_;
std::string private_key_;
};
#endif
## Instruction:
Use unordered_map rather than map
`unordered_map` containers are faster than map containers to
access individual elements by their key, although they are
generally less efficient for range iteration through a subset
of their elements.
http://www.cplusplus.com/reference/unordered_map/unordered_map/
Which is fine, because we never do range iteration on these maps,
so use the tiny bit faster one.
## Code After:
class Broker {
public:
Broker(std::string bind, std::string private_key) :
bind_(bind), private_key_(private_key) {}
void main_loop();
private:
void handleMessage(const Message& message);
void sendMessage(Client &client, std::vector<std::string> frames);
std::string readPrivateKey(std::string path);
std::unordered_map<std::string,Client> clients_;
std::unordered_map<std::string,Topic> topics_;
zmq::socket_t* socket_;
size_t recv_ = 0;
size_t sent_ = 0;
std::string bind_;
std::string private_key_;
};
#endif
|
class Broker {
public:
Broker(std::string bind, std::string private_key) :
bind_(bind), private_key_(private_key) {}
void main_loop();
private:
void handleMessage(const Message& message);
void sendMessage(Client &client, std::vector<std::string> frames);
std::string readPrivateKey(std::string path);
- std::map<std::string,Client> clients_;
+ std::unordered_map<std::string,Client> clients_;
? ++++++++++
- std::map<std::string,Topic> topics_;
+ std::unordered_map<std::string,Topic> topics_;
? ++++++++++
zmq::socket_t* socket_;
size_t recv_ = 0;
size_t sent_ = 0;
std::string bind_;
std::string private_key_;
};
#endif | 4 | 0.181818 | 2 | 2 |
c2bec97044c4205807953fbda5983642c8b2b985 | app/views/map_uploads/_form.html.haml | app/views/map_uploads/_form.html.haml | = simple_form_for(@map_upload, :html => { :class => 'form-inline' }) do |f|
= f.input :file, :as => :file, :label => false, :placeholder => 'Map .bsp, .bsp.bz2 or .zip file with maps'
%button.btn.btn-primary{:type => :submit}
Upload
| = simple_form_for(@map_upload, :html => { :class => 'form-inline' }, data: { turbo: false} ) do |f|
= f.input :file, :as => :file, :label => false, :placeholder => 'Map .bsp, .bsp.bz2 or .zip file with maps'
%button.btn.btn-primary{:type => :submit}
Upload
| Disable turbo on map uploads | Disable turbo on map uploads
| Haml | apache-2.0 | Arie/serveme,Arie/serveme,Arie/serveme,Arie/serveme | haml | ## Code Before:
= simple_form_for(@map_upload, :html => { :class => 'form-inline' }) do |f|
= f.input :file, :as => :file, :label => false, :placeholder => 'Map .bsp, .bsp.bz2 or .zip file with maps'
%button.btn.btn-primary{:type => :submit}
Upload
## Instruction:
Disable turbo on map uploads
## Code After:
= simple_form_for(@map_upload, :html => { :class => 'form-inline' }, data: { turbo: false} ) do |f|
= f.input :file, :as => :file, :label => false, :placeholder => 'Map .bsp, .bsp.bz2 or .zip file with maps'
%button.btn.btn-primary{:type => :submit}
Upload
| - = simple_form_for(@map_upload, :html => { :class => 'form-inline' }) do |f|
+ = simple_form_for(@map_upload, :html => { :class => 'form-inline' }, data: { turbo: false} ) do |f|
? ++++++++++++++++++++++++
= f.input :file, :as => :file, :label => false, :placeholder => 'Map .bsp, .bsp.bz2 or .zip file with maps'
%button.btn.btn-primary{:type => :submit}
Upload | 2 | 0.333333 | 1 | 1 |
4190937c741f56bb4bb8b81621a711bba03fe705 | imhotep/shas.py | imhotep/shas.py | from collections import namedtuple
Remote = namedtuple('Remote', ('name', 'url'))
CommitInfo = namedtuple("CommitInfo", ('commit', 'origin', 'remote_repo'))
class PRInfo(object):
def __init__(self, json):
self.json = json
@property
def base_sha(self):
return self.json['base']['sha']
@property
def head_sha(self):
return self.json['head']['sha']
@property
def has_remote_repo(self):
return self.json['base']['repo']['owner']['login'] != \
self.json['head']['repo']['owner']['login']
@property
def remote_repo(self):
return Remote(name=self.json['head']['repo']['owner']['login'],
url=self.json['head']['repo']['clone_url'])
def to_commit_info(self):
remote_repo = None
if self.has_remote_repo:
remote_repo = self.remote_repo
return CommitInfo(self.base_sha, self.head_sha, remote_repo)
def get_pr_info(requester, reponame, number):
"Returns the PullRequest as a PRInfo object"
resp = requester.get(
'https://api.github.com/repos/%s/pulls/%s' % (reponame, number))
return PRInfo(resp.json)
| from collections import namedtuple
Remote = namedtuple('Remote', ('name', 'url'))
CommitInfo = namedtuple("CommitInfo", ('commit', 'origin', 'remote_repo'))
class PRInfo(object):
def __init__(self, json):
self.json = json
@property
def base_sha(self):
return self.json['base']['sha']
@property
def head_sha(self):
return self.json['head']['sha']
@property
def has_remote_repo(self):
return self.json['base']['repo']['owner']['login'] != \
self.json['head']['repo']['owner']['login']
@property
def remote_repo(self):
remote = None
if self.has_remote_repo:
remote = Remote(name=self.json['head']['repo']['owner']['login'],
url=self.json['head']['repo']['clone_url'])
return remote
def to_commit_info(self):
return CommitInfo(self.base_sha, self.head_sha, self.remote_repo)
def get_pr_info(requester, reponame, number):
"Returns the PullRequest as a PRInfo object"
resp = requester.get(
'https://api.github.com/repos/%s/pulls/%s' % (reponame, number))
return PRInfo(resp.json)
| Refactor remote_repo, to return None if there is no remote. | Refactor remote_repo, to return None
if there is no remote.
| Python | mit | richtier/imhotep,justinabrahms/imhotep,justinabrahms/imhotep,Appdynamics/imhotep | python | ## Code Before:
from collections import namedtuple
Remote = namedtuple('Remote', ('name', 'url'))
CommitInfo = namedtuple("CommitInfo", ('commit', 'origin', 'remote_repo'))
class PRInfo(object):
def __init__(self, json):
self.json = json
@property
def base_sha(self):
return self.json['base']['sha']
@property
def head_sha(self):
return self.json['head']['sha']
@property
def has_remote_repo(self):
return self.json['base']['repo']['owner']['login'] != \
self.json['head']['repo']['owner']['login']
@property
def remote_repo(self):
return Remote(name=self.json['head']['repo']['owner']['login'],
url=self.json['head']['repo']['clone_url'])
def to_commit_info(self):
remote_repo = None
if self.has_remote_repo:
remote_repo = self.remote_repo
return CommitInfo(self.base_sha, self.head_sha, remote_repo)
def get_pr_info(requester, reponame, number):
"Returns the PullRequest as a PRInfo object"
resp = requester.get(
'https://api.github.com/repos/%s/pulls/%s' % (reponame, number))
return PRInfo(resp.json)
## Instruction:
Refactor remote_repo, to return None
if there is no remote.
## Code After:
from collections import namedtuple
Remote = namedtuple('Remote', ('name', 'url'))
CommitInfo = namedtuple("CommitInfo", ('commit', 'origin', 'remote_repo'))
class PRInfo(object):
def __init__(self, json):
self.json = json
@property
def base_sha(self):
return self.json['base']['sha']
@property
def head_sha(self):
return self.json['head']['sha']
@property
def has_remote_repo(self):
return self.json['base']['repo']['owner']['login'] != \
self.json['head']['repo']['owner']['login']
@property
def remote_repo(self):
remote = None
if self.has_remote_repo:
remote = Remote(name=self.json['head']['repo']['owner']['login'],
url=self.json['head']['repo']['clone_url'])
return remote
def to_commit_info(self):
return CommitInfo(self.base_sha, self.head_sha, self.remote_repo)
def get_pr_info(requester, reponame, number):
"Returns the PullRequest as a PRInfo object"
resp = requester.get(
'https://api.github.com/repos/%s/pulls/%s' % (reponame, number))
return PRInfo(resp.json)
| from collections import namedtuple
Remote = namedtuple('Remote', ('name', 'url'))
CommitInfo = namedtuple("CommitInfo", ('commit', 'origin', 'remote_repo'))
class PRInfo(object):
def __init__(self, json):
self.json = json
@property
def base_sha(self):
return self.json['base']['sha']
@property
def head_sha(self):
return self.json['head']['sha']
@property
def has_remote_repo(self):
return self.json['base']['repo']['owner']['login'] != \
self.json['head']['repo']['owner']['login']
@property
def remote_repo(self):
+ remote = None
+ if self.has_remote_repo:
- return Remote(name=self.json['head']['repo']['owner']['login'],
? ^^^
+ remote = Remote(name=self.json['head']['repo']['owner']['login'],
? ++++ ++ ^^^
- url=self.json['head']['repo']['clone_url'])
+ url=self.json['head']['repo']['clone_url'])
? ++++++
+ return remote
def to_commit_info(self):
- remote_repo = None
- if self.has_remote_repo:
- remote_repo = self.remote_repo
- return CommitInfo(self.base_sha, self.head_sha, remote_repo)
+ return CommitInfo(self.base_sha, self.head_sha, self.remote_repo)
? +++++
def get_pr_info(requester, reponame, number):
"Returns the PullRequest as a PRInfo object"
resp = requester.get(
'https://api.github.com/repos/%s/pulls/%s' % (reponame, number))
return PRInfo(resp.json) | 12 | 0.3 | 6 | 6 |
c17c6dfe630f24fc6f173e7e9675ea7b32b6fd07 | css/bar-chart-timeline.css | css/bar-chart-timeline.css | .timeline.bar-chart .graph rect {
fill: gray;
}
.timeline.bar-chart .graph rect.selected {
fill: lightgray;
}
.timeline.bar-chart .graph .tooltip {
pointer-events: none;
}
.timeline.bar-chart .graph .tooltip rect {
fill: gray;
stroke: white;
stroke-width: 1px;
}
.timeline.bar-chart .graph .tooltip text {
fill: white;
font-family: Courier;
font-size: 14px;
text-anchor: middle;
}
.timeline.bar-chart .graph .tooltip.show {
display: inline;
}
.timeline.bar-chart .graph .tooltip.hide {
display: none;
} | .timeline.bar-chart .graph rect {
fill: gray;
}
.timeline.bar-chart .graph rect.selected {
opacity: 0.4;
}
.timeline.bar-chart .graph .tooltip {
pointer-events: none;
}
.timeline.bar-chart .graph .tooltip rect {
fill: gray;
stroke: white;
stroke-width: 1px;
}
.timeline.bar-chart .graph .tooltip text {
fill: white;
font-family: Courier;
font-size: 14px;
text-anchor: middle;
}
.timeline.bar-chart .graph .tooltip.show {
display: inline;
}
.timeline.bar-chart .graph .tooltip.hide {
display: none;
} | Modify bar color of bar chart | Modify bar color of bar chart
| CSS | mit | ionstage/timeline,ionstage/timeline | css | ## Code Before:
.timeline.bar-chart .graph rect {
fill: gray;
}
.timeline.bar-chart .graph rect.selected {
fill: lightgray;
}
.timeline.bar-chart .graph .tooltip {
pointer-events: none;
}
.timeline.bar-chart .graph .tooltip rect {
fill: gray;
stroke: white;
stroke-width: 1px;
}
.timeline.bar-chart .graph .tooltip text {
fill: white;
font-family: Courier;
font-size: 14px;
text-anchor: middle;
}
.timeline.bar-chart .graph .tooltip.show {
display: inline;
}
.timeline.bar-chart .graph .tooltip.hide {
display: none;
}
## Instruction:
Modify bar color of bar chart
## Code After:
.timeline.bar-chart .graph rect {
fill: gray;
}
.timeline.bar-chart .graph rect.selected {
opacity: 0.4;
}
.timeline.bar-chart .graph .tooltip {
pointer-events: none;
}
.timeline.bar-chart .graph .tooltip rect {
fill: gray;
stroke: white;
stroke-width: 1px;
}
.timeline.bar-chart .graph .tooltip text {
fill: white;
font-family: Courier;
font-size: 14px;
text-anchor: middle;
}
.timeline.bar-chart .graph .tooltip.show {
display: inline;
}
.timeline.bar-chart .graph .tooltip.hide {
display: none;
} | .timeline.bar-chart .graph rect {
fill: gray;
}
.timeline.bar-chart .graph rect.selected {
- fill: lightgray;
+ opacity: 0.4;
}
.timeline.bar-chart .graph .tooltip {
pointer-events: none;
}
.timeline.bar-chart .graph .tooltip rect {
fill: gray;
stroke: white;
stroke-width: 1px;
}
.timeline.bar-chart .graph .tooltip text {
fill: white;
font-family: Courier;
font-size: 14px;
text-anchor: middle;
}
.timeline.bar-chart .graph .tooltip.show {
display: inline;
}
.timeline.bar-chart .graph .tooltip.hide {
display: none;
} | 2 | 0.0625 | 1 | 1 |
56265fe8c18e7c123cd67778d922307e83861236 | docs/SUMMARY.md | docs/SUMMARY.md |
* [Introduction](index.md)
## Usage
* [Generic contaners](usage/generic_containers.md)
* [Temporary database containers](usage/database_containers.md)
* [Webdriver containers](usage/webdriver_containers.md)
* [Docker Compose](usage/docker_compose.md)
* [Dockerfile containers](usage/dockerfile.md)
* [Windows support](usage/windows_support.md)
|
* [Introduction](index.md)
## Generic containers
* [Benefits](usage/generic_containers.md#benefits)
* [Example](usage/generic_containers.md#example)
* [Accessing a container from tests](usage/generic_containers.md#accessing-a-container-from-tests)
* [Options](usage/generic_containers.md#options)
* [Specifying image name](usage/generic_containers.md#image)
* [Exposing ports](usage/generic_containers.md#exposing-ports)
* [Environment variables](usage/generic_containers.md#environment-variables)
* [Command](usage/generic_containers.md#command)
* [Volume mapping](usage/generic_containers.md#volume-mapping)
* [Startup timeout](usage/generic_containers.md#startup-timeout)
* [Following container output](usage/generic_containers.md#following-container-output)
* [Executing a command](usage/generic_containers.md#executing-a-command)
## Specialised container types
* [Temporary database containers](usage/database_containers.md)
* [Benefits](usage/database_containers.md#benefits)
* [Examples and options](usage/database_containers.md#examples-and-options)
* [JUnit rule](usage/database_containers.md#junit-rule)
* [JDBC URL](usage/database_containers.md#jdbc-url)
* [Using an init script](usage/database_containers.md#using-an-init-script)
* [Webdriver containers](usage/webdriver_containers.md)
* [Benefits](usage/webdriver_containers.md#benefits)
* [Example](usage/webdriver_containers.md#example)
* [Other browsers](usage/webdriver_containers.md#other-browsers)
* [Recording videos](usage/webdriver_containers.md#recording-videos)
* [Docker Compose](usage/docker_compose.md)
* [Dockerfile containers](usage/dockerfile.md)
* [Windows support](usage/windows_support.md)
| Add extra TOC entries for specific subsections of key docs | Add extra TOC entries for specific subsections of key docs
| Markdown | mit | rnorth/test-containers,barrycommins/testcontainers-java,gorelikov/testcontainers-java,gorelikov/testcontainers-java,gorelikov/testcontainers-java,rnorth/test-containers,outofcoffee/testcontainers-java,gorelikov/testcontainers-java,rnorth/test-containers,testcontainers/testcontainers-java,barrycommins/testcontainers-java,outofcoffee/testcontainers-java,outofcoffee/testcontainers-java,barrycommins/testcontainers-java,testcontainers/testcontainers-java,barrycommins/testcontainers-java,testcontainers/testcontainers-java | markdown | ## Code Before:
* [Introduction](index.md)
## Usage
* [Generic contaners](usage/generic_containers.md)
* [Temporary database containers](usage/database_containers.md)
* [Webdriver containers](usage/webdriver_containers.md)
* [Docker Compose](usage/docker_compose.md)
* [Dockerfile containers](usage/dockerfile.md)
* [Windows support](usage/windows_support.md)
## Instruction:
Add extra TOC entries for specific subsections of key docs
## Code After:
* [Introduction](index.md)
## Generic containers
* [Benefits](usage/generic_containers.md#benefits)
* [Example](usage/generic_containers.md#example)
* [Accessing a container from tests](usage/generic_containers.md#accessing-a-container-from-tests)
* [Options](usage/generic_containers.md#options)
* [Specifying image name](usage/generic_containers.md#image)
* [Exposing ports](usage/generic_containers.md#exposing-ports)
* [Environment variables](usage/generic_containers.md#environment-variables)
* [Command](usage/generic_containers.md#command)
* [Volume mapping](usage/generic_containers.md#volume-mapping)
* [Startup timeout](usage/generic_containers.md#startup-timeout)
* [Following container output](usage/generic_containers.md#following-container-output)
* [Executing a command](usage/generic_containers.md#executing-a-command)
## Specialised container types
* [Temporary database containers](usage/database_containers.md)
* [Benefits](usage/database_containers.md#benefits)
* [Examples and options](usage/database_containers.md#examples-and-options)
* [JUnit rule](usage/database_containers.md#junit-rule)
* [JDBC URL](usage/database_containers.md#jdbc-url)
* [Using an init script](usage/database_containers.md#using-an-init-script)
* [Webdriver containers](usage/webdriver_containers.md)
* [Benefits](usage/webdriver_containers.md#benefits)
* [Example](usage/webdriver_containers.md#example)
* [Other browsers](usage/webdriver_containers.md#other-browsers)
* [Recording videos](usage/webdriver_containers.md#recording-videos)
* [Docker Compose](usage/docker_compose.md)
* [Dockerfile containers](usage/dockerfile.md)
* [Windows support](usage/windows_support.md)
|
* [Introduction](index.md)
- ## Usage
+ ## Generic containers
- * [Generic contaners](usage/generic_containers.md)
? ^ ^ ----- ----
+ * [Benefits](usage/generic_containers.md#benefits)
? ^ ^ +++++++++
+ * [Example](usage/generic_containers.md#example)
+ * [Accessing a container from tests](usage/generic_containers.md#accessing-a-container-from-tests)
+
+ * [Options](usage/generic_containers.md#options)
+
+ * [Specifying image name](usage/generic_containers.md#image)
+ * [Exposing ports](usage/generic_containers.md#exposing-ports)
+ * [Environment variables](usage/generic_containers.md#environment-variables)
+ * [Command](usage/generic_containers.md#command)
+ * [Volume mapping](usage/generic_containers.md#volume-mapping)
+ * [Startup timeout](usage/generic_containers.md#startup-timeout)
+ * [Following container output](usage/generic_containers.md#following-container-output)
+ * [Executing a command](usage/generic_containers.md#executing-a-command)
+
+
+ ## Specialised container types
+
* [Temporary database containers](usage/database_containers.md)
+
+ * [Benefits](usage/database_containers.md#benefits)
+ * [Examples and options](usage/database_containers.md#examples-and-options)
+ * [JUnit rule](usage/database_containers.md#junit-rule)
+ * [JDBC URL](usage/database_containers.md#jdbc-url)
+ * [Using an init script](usage/database_containers.md#using-an-init-script)
+
* [Webdriver containers](usage/webdriver_containers.md)
+
+ * [Benefits](usage/webdriver_containers.md#benefits)
+ * [Example](usage/webdriver_containers.md#example)
+ * [Other browsers](usage/webdriver_containers.md#other-browsers)
+ * [Recording videos](usage/webdriver_containers.md#recording-videos)
+
* [Docker Compose](usage/docker_compose.md)
* [Dockerfile containers](usage/dockerfile.md)
* [Windows support](usage/windows_support.md) | 34 | 3.090909 | 32 | 2 |
fdd224baa838f665553eb3ce66eeaae942db80f6 | .travis.yml | .travis.yml | language: php
php:
- 5.4
- 5.5
- 5.6
- 7
- nightly
- hhvm
matrix:
allow_failures:
- php: hhvm
- php: nightly
before_script:
- composer install --no-interaction
| language: php
php:
- 5.4
- 5.5
- 5.6
- 7
- nightly
- hhvm
matrix:
allow_failures:
- php: hhvm
- php: nightly
- php: 7
before_script:
- composer install --no-interaction
| Allow tests to fail against PHP7 until final release, since we are hitting a PHP bug | Allow tests to fail against PHP7 until final release, since we are hitting a PHP bug
| YAML | mit | hason/MtHaml,pwhelan/MtHaml,pwhelan/MtHaml,hason/MtHaml | yaml | ## Code Before:
language: php
php:
- 5.4
- 5.5
- 5.6
- 7
- nightly
- hhvm
matrix:
allow_failures:
- php: hhvm
- php: nightly
before_script:
- composer install --no-interaction
## Instruction:
Allow tests to fail against PHP7 until final release, since we are hitting a PHP bug
## Code After:
language: php
php:
- 5.4
- 5.5
- 5.6
- 7
- nightly
- hhvm
matrix:
allow_failures:
- php: hhvm
- php: nightly
- php: 7
before_script:
- composer install --no-interaction
| language: php
php:
- 5.4
- 5.5
- 5.6
- 7
- nightly
- hhvm
matrix:
allow_failures:
- php: hhvm
- php: nightly
+ - php: 7
before_script:
- composer install --no-interaction | 1 | 0.071429 | 1 | 0 |
2f186c133ef76b813faa2da8453e12910e088984 | Readme.md | Readme.md |
A node.js client for the [Dialog](https://dialoganalytics.com) API.
[](https://gemnasium.com/github.com/dialoganalytics/dialog-node)
## Documentation
See the [API docs](https://docs.dialoganalytics.com).
## Installation
Install using [npm](https://www.npmjs.com/).
```bash
npm install [email protected] --save
```
## Usage
Create a framework specific API client:
```js
// Require the right version for your framework
var Dialog = require('dialog-api/lib/botkit');
var Dialog = require('dialog-api/lib/messenger');
var Dialog = require('dialog-api/lib/kik');
var track = new Dialog('DIALOG_API_TOKEN', 'botId')
```
Or keep it real:
```js
var Dialog = require('dialog-api');
var payload = {}; // See https://docs.dialoganalytics.com/reference/track/
Dialog.track('DIALOG_API_TOKEN', 'botId', payload);
```
|
A node.js client for the [Dialog](https://dialoganalytics.com) API.
[](https://gemnasium.com/github.com/dialoganalytics/dialog-node)
## Documentation
See the [API docs](https://docs.dialoganalytics.com).
## Installation
Install using [npm](https://www.npmjs.com/).
```bash
npm install [email protected] --save
```
## Usage
Create a framework specific API client:
```js
// Require the right version for your framework
var Dialog = require('dialog-api/lib/botkit/messenger');
var Dialog = require('dialog-api/lib/botkit/twilioipm');
var Dialog = require('dialog-api/lib/messenger');
var Dialog = require('dialog-api/lib/kik');
var track = new Dialog('DIALOG_API_TOKEN', 'botId')
```
Or keep it real:
```js
var Dialog = require('dialog-api');
var payload = {}; // See https://docs.dialoganalytics.com/reference/track/
Dialog.track('DIALOG_API_TOKEN', 'botId', payload);
```
| Update require paths in readme | Update require paths in readme
| Markdown | mit | dialoganalytics/dialog-node | markdown | ## Code Before:
A node.js client for the [Dialog](https://dialoganalytics.com) API.
[](https://gemnasium.com/github.com/dialoganalytics/dialog-node)
## Documentation
See the [API docs](https://docs.dialoganalytics.com).
## Installation
Install using [npm](https://www.npmjs.com/).
```bash
npm install [email protected] --save
```
## Usage
Create a framework specific API client:
```js
// Require the right version for your framework
var Dialog = require('dialog-api/lib/botkit');
var Dialog = require('dialog-api/lib/messenger');
var Dialog = require('dialog-api/lib/kik');
var track = new Dialog('DIALOG_API_TOKEN', 'botId')
```
Or keep it real:
```js
var Dialog = require('dialog-api');
var payload = {}; // See https://docs.dialoganalytics.com/reference/track/
Dialog.track('DIALOG_API_TOKEN', 'botId', payload);
```
## Instruction:
Update require paths in readme
## Code After:
A node.js client for the [Dialog](https://dialoganalytics.com) API.
[](https://gemnasium.com/github.com/dialoganalytics/dialog-node)
## Documentation
See the [API docs](https://docs.dialoganalytics.com).
## Installation
Install using [npm](https://www.npmjs.com/).
```bash
npm install [email protected] --save
```
## Usage
Create a framework specific API client:
```js
// Require the right version for your framework
var Dialog = require('dialog-api/lib/botkit/messenger');
var Dialog = require('dialog-api/lib/botkit/twilioipm');
var Dialog = require('dialog-api/lib/messenger');
var Dialog = require('dialog-api/lib/kik');
var track = new Dialog('DIALOG_API_TOKEN', 'botId')
```
Or keep it real:
```js
var Dialog = require('dialog-api');
var payload = {}; // See https://docs.dialoganalytics.com/reference/track/
Dialog.track('DIALOG_API_TOKEN', 'botId', payload);
```
|
A node.js client for the [Dialog](https://dialoganalytics.com) API.
[](https://gemnasium.com/github.com/dialoganalytics/dialog-node)
## Documentation
See the [API docs](https://docs.dialoganalytics.com).
## Installation
Install using [npm](https://www.npmjs.com/).
```bash
npm install [email protected] --save
```
## Usage
Create a framework specific API client:
```js
// Require the right version for your framework
- var Dialog = require('dialog-api/lib/botkit');
+ var Dialog = require('dialog-api/lib/botkit/messenger');
? ++++++++++
+ var Dialog = require('dialog-api/lib/botkit/twilioipm');
var Dialog = require('dialog-api/lib/messenger');
var Dialog = require('dialog-api/lib/kik');
var track = new Dialog('DIALOG_API_TOKEN', 'botId')
```
Or keep it real:
```js
var Dialog = require('dialog-api');
var payload = {}; // See https://docs.dialoganalytics.com/reference/track/
Dialog.track('DIALOG_API_TOKEN', 'botId', payload);
``` | 3 | 0.075 | 2 | 1 |
9a4056e150d530c7b26f91688f1f52deb96b88ea | README.md | README.md | A simple Maven plugin to make your build byte-for-byte reproducible
| [](https://travis-ci.org/Zlika/reproducible-build-maven-plugin)
# reproducible-build-maven-plugin
A simple Maven plugin to make your build byte-for-byte reproducible
| Add Tracis CI build badge. | Add Tracis CI build badge. | Markdown | apache-2.0 | Zlika/reproducible-build-maven-plugin,Zlika/reproducible-build-maven-plugin | markdown | ## Code Before:
A simple Maven plugin to make your build byte-for-byte reproducible
## Instruction:
Add Tracis CI build badge.
## Code After:
[](https://travis-ci.org/Zlika/reproducible-build-maven-plugin)
# reproducible-build-maven-plugin
A simple Maven plugin to make your build byte-for-byte reproducible
| + [](https://travis-ci.org/Zlika/reproducible-build-maven-plugin)
+
+ # reproducible-build-maven-plugin
A simple Maven plugin to make your build byte-for-byte reproducible | 3 | 3 | 3 | 0 |
48543d559d13bb9446f455d14ec3e8ae1ff4f2d7 | angular_flask/__init__.py | angular_flask/__init__.py | import os
from flask import Flask
from flask_sslify import SSLify
app = Flask(__name__, instance_path='/instance')
if 'DYNO' in os.environ:
sslify = SSLify(app)
app.config.from_object('config')
app.config.from_pyfile('config.py')
import angular_flask.core
import angular_flask.models
import angular_flask.controllers
| import os
from flask import Flask
from flask_sslify import SSLify
app = Flask(__name__, instance_relative_config=True)
if 'DYNO' in os.environ:
sslify = SSLify(app)
app.config.from_object('config')
app.config.from_pyfile('config.py', True)
import angular_flask.core
import angular_flask.models
import angular_flask.controllers
| Set tru to config from pyfile | Set tru to config from pyfile
| Python | mit | Clarity-89/blog,Clarity-89/blog,Clarity-89/blog | python | ## Code Before:
import os
from flask import Flask
from flask_sslify import SSLify
app = Flask(__name__, instance_path='/instance')
if 'DYNO' in os.environ:
sslify = SSLify(app)
app.config.from_object('config')
app.config.from_pyfile('config.py')
import angular_flask.core
import angular_flask.models
import angular_flask.controllers
## Instruction:
Set tru to config from pyfile
## Code After:
import os
from flask import Flask
from flask_sslify import SSLify
app = Flask(__name__, instance_relative_config=True)
if 'DYNO' in os.environ:
sslify = SSLify(app)
app.config.from_object('config')
app.config.from_pyfile('config.py', True)
import angular_flask.core
import angular_flask.models
import angular_flask.controllers
| import os
from flask import Flask
from flask_sslify import SSLify
- app = Flask(__name__, instance_path='/instance')
+ app = Flask(__name__, instance_relative_config=True)
if 'DYNO' in os.environ:
sslify = SSLify(app)
app.config.from_object('config')
- app.config.from_pyfile('config.py')
+ app.config.from_pyfile('config.py', True)
? ++++++
import angular_flask.core
import angular_flask.models
import angular_flask.controllers | 4 | 0.266667 | 2 | 2 |
d49438ad2d238f8d76a2ec2ed864843444bd5741 | bluebottle/payments_mock/static/js/bluebottle/payments_mock/controllers.js | bluebottle/payments_mock/static/js/bluebottle/payments_mock/controllers.js | App.MockIdealController = App.StandardPaymentMethodController.extend(App.ControllerValidationMixin, {
requiredFields: ['issuerId'],
init: function() {
this._super();
this.set('model', App.MockIdeal.create());
}
});
App.MockPaypalController = App.StandardPaymentMethodController.extend(App.ControllerValidationMixin, {
});
App.MockCreditcardController = App.StandardPaymentMethodController.extend(App.ControllerValidationMixin, {
init: function() {
this._super();
this.set('model', App.MockCreditcard.create());
},
getIntegrationData: function(){
return this.get('model');
}
}); | App.MockIdealController = App.StandardPaymentMethodController.extend(App.ControllerValidationMixin, {
requiredFields: ['issuerId'],
init: function() {
this._super();
this.set('model', App.MockIdeal.create());
}
});
App.MockPaypalController = App.StandardPaymentMethodController.extend(App.ControllerValidationMixin, {
getIntegrationData: function(){
return {};
}
});
App.MockCreditcardController = App.StandardPaymentMethodController.extend(App.ControllerValidationMixin, {
init: function() {
this._super();
this.set('model', App.MockCreditcard.create());
},
getIntegrationData: function(){
return this.get('model');
}
}); | REturn integration data for MockPal payment | REturn integration data for MockPal payment
| JavaScript | bsd-3-clause | onepercentclub/bluebottle,jfterpstra/bluebottle,onepercentclub/bluebottle,jfterpstra/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,jfterpstra/bluebottle,onepercentclub/bluebottle,jfterpstra/bluebottle | javascript | ## Code Before:
App.MockIdealController = App.StandardPaymentMethodController.extend(App.ControllerValidationMixin, {
requiredFields: ['issuerId'],
init: function() {
this._super();
this.set('model', App.MockIdeal.create());
}
});
App.MockPaypalController = App.StandardPaymentMethodController.extend(App.ControllerValidationMixin, {
});
App.MockCreditcardController = App.StandardPaymentMethodController.extend(App.ControllerValidationMixin, {
init: function() {
this._super();
this.set('model', App.MockCreditcard.create());
},
getIntegrationData: function(){
return this.get('model');
}
});
## Instruction:
REturn integration data for MockPal payment
## Code After:
App.MockIdealController = App.StandardPaymentMethodController.extend(App.ControllerValidationMixin, {
requiredFields: ['issuerId'],
init: function() {
this._super();
this.set('model', App.MockIdeal.create());
}
});
App.MockPaypalController = App.StandardPaymentMethodController.extend(App.ControllerValidationMixin, {
getIntegrationData: function(){
return {};
}
});
App.MockCreditcardController = App.StandardPaymentMethodController.extend(App.ControllerValidationMixin, {
init: function() {
this._super();
this.set('model', App.MockCreditcard.create());
},
getIntegrationData: function(){
return this.get('model');
}
}); | App.MockIdealController = App.StandardPaymentMethodController.extend(App.ControllerValidationMixin, {
requiredFields: ['issuerId'],
init: function() {
this._super();
this.set('model', App.MockIdeal.create());
}
});
App.MockPaypalController = App.StandardPaymentMethodController.extend(App.ControllerValidationMixin, {
-
+ getIntegrationData: function(){
+ return {};
+ }
});
App.MockCreditcardController = App.StandardPaymentMethodController.extend(App.ControllerValidationMixin, {
init: function() {
this._super();
this.set('model', App.MockCreditcard.create());
},
getIntegrationData: function(){
return this.get('model');
}
}); | 4 | 0.166667 | 3 | 1 |
71958df5d3251372d23bcc5722ede0b5d824f1f3 | Readme.md | Readme.md | 
# GitHub Blog
See it [live](https://abstractOwl.github.io)!
Jekyll also automatically publishes an [atom feed](/atom.xml).
## Feedback
If you have any questions/comments, feel free to write a Disqus comment or
open an issue!
## License
The "_posts/" and "_images" directories and their contents are licensed under a
[Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License]
(http://creativecommons.org/licenses/by-nc-sa/4.0/).
Everything else is licensed under the [BSD license](LICENSE).
<br />
---
[![Creative Commons License]
(https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png)]
(http://creativecommons.org/licenses/by-nc-sa/4.0/)
<br />
| 
# GitHub Blog
See it in action [here](https://abstractOwl.github.io)! Jekyll also
automatically publishes an [atom feed](/atom.xml).
## Feedback
If you have any questions/comments, feel free to write a Disqus comment or
open an issue!
## License
The "_posts/" and "_images" directories and their contents are licensed under a
[Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License]
(http://creativecommons.org/licenses/by-nc-sa/4.0/).
Everything else is licensed under the [BSD license](LICENSE).
<br />
(My posts are my own and do not reflect the opinions of my employer,
my dentist, or Hugh Jackman).
| Add disclaimer, remove odd CC icon | Add disclaimer, remove odd CC icon
| Markdown | bsd-2-clause | abstractOwl/abstractOwl.github.io | markdown | ## Code Before:

# GitHub Blog
See it [live](https://abstractOwl.github.io)!
Jekyll also automatically publishes an [atom feed](/atom.xml).
## Feedback
If you have any questions/comments, feel free to write a Disqus comment or
open an issue!
## License
The "_posts/" and "_images" directories and their contents are licensed under a
[Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License]
(http://creativecommons.org/licenses/by-nc-sa/4.0/).
Everything else is licensed under the [BSD license](LICENSE).
<br />
---
[![Creative Commons License]
(https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png)]
(http://creativecommons.org/licenses/by-nc-sa/4.0/)
<br />
## Instruction:
Add disclaimer, remove odd CC icon
## Code After:

# GitHub Blog
See it in action [here](https://abstractOwl.github.io)! Jekyll also
automatically publishes an [atom feed](/atom.xml).
## Feedback
If you have any questions/comments, feel free to write a Disqus comment or
open an issue!
## License
The "_posts/" and "_images" directories and their contents are licensed under a
[Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License]
(http://creativecommons.org/licenses/by-nc-sa/4.0/).
Everything else is licensed under the [BSD license](LICENSE).
<br />
(My posts are my own and do not reflect the opinions of my employer,
my dentist, or Hugh Jackman).
| 
# GitHub Blog
- See it [live](https://abstractOwl.github.io)!
+ See it in action [here](https://abstractOwl.github.io)! Jekyll also
- Jekyll also automatically publishes an [atom feed](/atom.xml).
? ------------
+ automatically publishes an [atom feed](/atom.xml).
## Feedback
If you have any questions/comments, feel free to write a Disqus comment or
open an issue!
## License
The "_posts/" and "_images" directories and their contents are licensed under a
[Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License]
(http://creativecommons.org/licenses/by-nc-sa/4.0/).
Everything else is licensed under the [BSD license](LICENSE).
<br />
+ (My posts are my own and do not reflect the opinions of my employer,
+ my dentist, or Hugh Jackman).
- ---
-
- [![Creative Commons License]
- (https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png)]
- (http://creativecommons.org/licenses/by-nc-sa/4.0/)
-
- <br /> | 13 | 0.433333 | 4 | 9 |
1c84e46a21b63287af8a59697747c76614e444ec | app/services/reports/docx/draw_step_checklist.rb | app/services/reports/docx/draw_step_checklist.rb |
module DrawStepChecklist
def draw_step_checklist(subject)
checklist = Checklist.find_by_id(subject['id']['checklist_id'])
return unless checklist
items = checklist.checklist_items
timestamp = checklist.created_at
color = @color
@docx.p
@docx.p do
text SmartAnnotations::TagToText.new(
@user,
@report_team,
I18n.t('projects.reports.elements.step_checklist.checklist_name', name: checklist.name)
).text, italic: true
text ' '
text I18n.t('projects.reports.elements.step_checklist.user_time',
timestamp: I18n.l(timestamp, format: :full)), color: color[:gray]
end
items.each do |item|
html = custom_auto_link(item.text, team: @report_team)
html_to_word_converter(html)
@docx.p " (#{I18n.t('projects.reports.elements.step_checklist.checked')})", color: '2dbe61' if item.checked
end
end
end
|
module DrawStepChecklist
def draw_step_checklist(subject)
checklist = Checklist.find_by_id(subject['id']['checklist_id'])
return unless checklist
items = checklist.checklist_items
timestamp = checklist.created_at
color = @color
@docx.p
@docx.p do
text SmartAnnotations::TagToText.new(
@user,
@report_team,
I18n.t('projects.reports.elements.step_checklist.checklist_name', name: checklist.name)
).text, italic: true
text ' '
text I18n.t('projects.reports.elements.step_checklist.user_time',
timestamp: I18n.l(timestamp, format: :full)), color: color[:gray]
end
@docx.ul do
items.each do |item|
li do
text SmartAnnotations::TagToText.new(@user, @report_team, item.text).text
text " (#{I18n.t('projects.reports.elements.step_checklist.checked')})", color: '2dbe61' if item.checked
end
end
end
end
end
| Revert "SCI-3702 replace _to_text with _to_html" | Revert "SCI-3702 replace _to_text with _to_html"
This reverts commit 93b7c472ac8ef271c9b23bfc6ea85d78a713b7eb.
| Ruby | mpl-2.0 | Ducz0r/scinote-web,mlorb/scinote-web,mlorb/scinote-web,mlorb/scinote-web,Ducz0r/scinote-web,Ducz0r/scinote-web | ruby | ## Code Before:
module DrawStepChecklist
def draw_step_checklist(subject)
checklist = Checklist.find_by_id(subject['id']['checklist_id'])
return unless checklist
items = checklist.checklist_items
timestamp = checklist.created_at
color = @color
@docx.p
@docx.p do
text SmartAnnotations::TagToText.new(
@user,
@report_team,
I18n.t('projects.reports.elements.step_checklist.checklist_name', name: checklist.name)
).text, italic: true
text ' '
text I18n.t('projects.reports.elements.step_checklist.user_time',
timestamp: I18n.l(timestamp, format: :full)), color: color[:gray]
end
items.each do |item|
html = custom_auto_link(item.text, team: @report_team)
html_to_word_converter(html)
@docx.p " (#{I18n.t('projects.reports.elements.step_checklist.checked')})", color: '2dbe61' if item.checked
end
end
end
## Instruction:
Revert "SCI-3702 replace _to_text with _to_html"
This reverts commit 93b7c472ac8ef271c9b23bfc6ea85d78a713b7eb.
## Code After:
module DrawStepChecklist
def draw_step_checklist(subject)
checklist = Checklist.find_by_id(subject['id']['checklist_id'])
return unless checklist
items = checklist.checklist_items
timestamp = checklist.created_at
color = @color
@docx.p
@docx.p do
text SmartAnnotations::TagToText.new(
@user,
@report_team,
I18n.t('projects.reports.elements.step_checklist.checklist_name', name: checklist.name)
).text, italic: true
text ' '
text I18n.t('projects.reports.elements.step_checklist.user_time',
timestamp: I18n.l(timestamp, format: :full)), color: color[:gray]
end
@docx.ul do
items.each do |item|
li do
text SmartAnnotations::TagToText.new(@user, @report_team, item.text).text
text " (#{I18n.t('projects.reports.elements.step_checklist.checked')})", color: '2dbe61' if item.checked
end
end
end
end
end
|
module DrawStepChecklist
def draw_step_checklist(subject)
checklist = Checklist.find_by_id(subject['id']['checklist_id'])
return unless checklist
items = checklist.checklist_items
timestamp = checklist.created_at
color = @color
@docx.p
@docx.p do
text SmartAnnotations::TagToText.new(
@user,
@report_team,
I18n.t('projects.reports.elements.step_checklist.checklist_name', name: checklist.name)
).text, italic: true
text ' '
text I18n.t('projects.reports.elements.step_checklist.user_time',
timestamp: I18n.l(timestamp, format: :full)), color: color[:gray]
end
+ @docx.ul do
- items.each do |item|
+ items.each do |item|
? ++
- html = custom_auto_link(item.text, team: @report_team)
- html_to_word_converter(html)
+ li do
+ text SmartAnnotations::TagToText.new(@user, @report_team, item.text).text
- @docx.p " (#{I18n.t('projects.reports.elements.step_checklist.checked')})", color: '2dbe61' if item.checked
? ^^^^ ^^
+ text " (#{I18n.t('projects.reports.elements.step_checklist.checked')})", color: '2dbe61' if item.checked
? ^^^^^^ ^
+ end
+ end
end
-
end
end | 12 | 0.428571 | 7 | 5 |
71f2cd196587eb4ade9dbca2498046e1b4eb2dae | jquery-replacetext.js | jquery-replacetext.js | (function($){
var textNode = function(node, search, replace, capturing) {
var tokens = node.nodeValue.split(search);
if (tokens.length < 2) return false;
for (var i = 0; i+capturing < tokens.length; i += capturing+1) {
$(node).before(document.createTextNode(tokens[i]));
$(node).before(replace(tokens.slice(i+1, i+1+capturing)));
}
$(node).before(document.createTextNode(tokens[tokens.length-1]));
return true;
};
/**
* Replace substrings with HTML.
*
* @param node A text node.
* @param search A RegExp object that must have at least one capturing subgroup.
* @param replace A function that generates the replacement jQuery content.
* @param groups (optional) The number of capturing subgroups in the RegExp.
*/
$.fn.replaceText = function(search, replace, capturing) {
capturing = capturing || 1;
return this.each(function() {
var remove = [];
for (var node = this.firstChild; node; node = node.nextSibling) {
if (node.nodeType == document.TEXT_NODE && textNode(node, search, replace, capturing)) {
remove.push(node);
}
}
$(remove).remove();
});
}
})(jQuery);
| (function($){
var textNode = function(node, search, replace, capturing) {
var tokens = node.nodeValue.split(search);
if (tokens.length < 2) return false;
for (var i = 0; i+capturing < tokens.length; i += capturing+1) {
$(node).before(document.createTextNode(tokens[i]));
$(node).before(replace(tokens.slice(i+1, i+1+capturing)));
}
$(node).before(document.createTextNode(tokens[tokens.length-1]));
return true;
};
/**
* Replace substrings with HTML.
*
* @param node A text node.
* @param search A RegExp object that must have at least one capturing subgroup.
* @param replace A function that generates the replacement jQuery content.
*/
$.fn.replaceText = function(search, replace) {
var capturing = RegExp(search.source + '|').exec('').length - 1;
return this.each(function() {
var remove = [];
for (var node = this.firstChild; node; node = node.nextSibling) {
if (node.nodeType == document.TEXT_NODE && textNode(node, search, replace, capturing)) {
remove.push(node);
}
}
$(remove).remove();
});
}
})(jQuery);
| Make replaceText() count the sub-groups. | Make replaceText() count the sub-groups.
Instead of requiring the number of capturing groups as an argument,
match the provided expression with the empty string to see how many
groups are captured.
(cburschka/cadence#235)
| JavaScript | mit | cburschka/jquery-replacetext | javascript | ## Code Before:
(function($){
var textNode = function(node, search, replace, capturing) {
var tokens = node.nodeValue.split(search);
if (tokens.length < 2) return false;
for (var i = 0; i+capturing < tokens.length; i += capturing+1) {
$(node).before(document.createTextNode(tokens[i]));
$(node).before(replace(tokens.slice(i+1, i+1+capturing)));
}
$(node).before(document.createTextNode(tokens[tokens.length-1]));
return true;
};
/**
* Replace substrings with HTML.
*
* @param node A text node.
* @param search A RegExp object that must have at least one capturing subgroup.
* @param replace A function that generates the replacement jQuery content.
* @param groups (optional) The number of capturing subgroups in the RegExp.
*/
$.fn.replaceText = function(search, replace, capturing) {
capturing = capturing || 1;
return this.each(function() {
var remove = [];
for (var node = this.firstChild; node; node = node.nextSibling) {
if (node.nodeType == document.TEXT_NODE && textNode(node, search, replace, capturing)) {
remove.push(node);
}
}
$(remove).remove();
});
}
})(jQuery);
## Instruction:
Make replaceText() count the sub-groups.
Instead of requiring the number of capturing groups as an argument,
match the provided expression with the empty string to see how many
groups are captured.
(cburschka/cadence#235)
## Code After:
(function($){
var textNode = function(node, search, replace, capturing) {
var tokens = node.nodeValue.split(search);
if (tokens.length < 2) return false;
for (var i = 0; i+capturing < tokens.length; i += capturing+1) {
$(node).before(document.createTextNode(tokens[i]));
$(node).before(replace(tokens.slice(i+1, i+1+capturing)));
}
$(node).before(document.createTextNode(tokens[tokens.length-1]));
return true;
};
/**
* Replace substrings with HTML.
*
* @param node A text node.
* @param search A RegExp object that must have at least one capturing subgroup.
* @param replace A function that generates the replacement jQuery content.
*/
$.fn.replaceText = function(search, replace) {
var capturing = RegExp(search.source + '|').exec('').length - 1;
return this.each(function() {
var remove = [];
for (var node = this.firstChild; node; node = node.nextSibling) {
if (node.nodeType == document.TEXT_NODE && textNode(node, search, replace, capturing)) {
remove.push(node);
}
}
$(remove).remove();
});
}
})(jQuery);
| (function($){
var textNode = function(node, search, replace, capturing) {
var tokens = node.nodeValue.split(search);
if (tokens.length < 2) return false;
for (var i = 0; i+capturing < tokens.length; i += capturing+1) {
$(node).before(document.createTextNode(tokens[i]));
$(node).before(replace(tokens.slice(i+1, i+1+capturing)));
}
$(node).before(document.createTextNode(tokens[tokens.length-1]));
return true;
};
/**
* Replace substrings with HTML.
*
* @param node A text node.
* @param search A RegExp object that must have at least one capturing subgroup.
* @param replace A function that generates the replacement jQuery content.
- * @param groups (optional) The number of capturing subgroups in the RegExp.
*/
- $.fn.replaceText = function(search, replace, capturing) {
? -----------
+ $.fn.replaceText = function(search, replace) {
- capturing = capturing || 1;
+ var capturing = RegExp(search.source + '|').exec('').length - 1;
return this.each(function() {
var remove = [];
for (var node = this.firstChild; node; node = node.nextSibling) {
if (node.nodeType == document.TEXT_NODE && textNode(node, search, replace, capturing)) {
remove.push(node);
}
}
$(remove).remove();
});
}
})(jQuery); | 5 | 0.151515 | 2 | 3 |
643a02c5b66b8da3124463aa3225ee0fc2c72ab4 | composer.json | composer.json | {
"name": "tasmaniski/zf2-current-route",
"description": "View Helper for reading current route info - Controller, action, module and route name",
"type": "library",
"keywords": ["zf2", "view", "helper", "route"],
"homepage": "https://github.com/tasmaniski",
"authors": [
{
"name": "Aleksandar Varnicic",
"email": "[email protected]"
}
],
"require": {
"php": ">=5.3"
},
"autoload": {
"psr-0": {
"CurrentRoute": "src/"
},
"classmap": [
"src/"
]
}
}
| {
"name": "tasmaniski/zf2-current-route",
"description": "View Helper for reading current route info: Controller, Action, Module name",
"type": "library",
"keywords": ["zf2", "view", "helper", "route"],
"homepage": "https://github.com/tasmaniski",
"authors": [
{
"name": "Aleksandar Varnicic",
"email": "[email protected]"
}
],
"require": {
"php": ">=5.3"
},
"autoload": {
"psr-0": {
"CurrentRoute": "src/"
},
"classmap": [
"src/"
]
}
}
| Change description in .json file | Change description in .json file
| JSON | mit | tasmaniski/zf2-current-route | json | ## Code Before:
{
"name": "tasmaniski/zf2-current-route",
"description": "View Helper for reading current route info - Controller, action, module and route name",
"type": "library",
"keywords": ["zf2", "view", "helper", "route"],
"homepage": "https://github.com/tasmaniski",
"authors": [
{
"name": "Aleksandar Varnicic",
"email": "[email protected]"
}
],
"require": {
"php": ">=5.3"
},
"autoload": {
"psr-0": {
"CurrentRoute": "src/"
},
"classmap": [
"src/"
]
}
}
## Instruction:
Change description in .json file
## Code After:
{
"name": "tasmaniski/zf2-current-route",
"description": "View Helper for reading current route info: Controller, Action, Module name",
"type": "library",
"keywords": ["zf2", "view", "helper", "route"],
"homepage": "https://github.com/tasmaniski",
"authors": [
{
"name": "Aleksandar Varnicic",
"email": "[email protected]"
}
],
"require": {
"php": ">=5.3"
},
"autoload": {
"psr-0": {
"CurrentRoute": "src/"
},
"classmap": [
"src/"
]
}
}
| {
"name": "tasmaniski/zf2-current-route",
- "description": "View Helper for reading current route info - Controller, action, module and route name",
? ^^ ^ ^ ----------
+ "description": "View Helper for reading current route info: Controller, Action, Module name",
? ^ ^ ^
"type": "library",
"keywords": ["zf2", "view", "helper", "route"],
"homepage": "https://github.com/tasmaniski",
"authors": [
{
"name": "Aleksandar Varnicic",
"email": "[email protected]"
}
],
"require": {
"php": ">=5.3"
},
"autoload": {
"psr-0": {
"CurrentRoute": "src/"
},
"classmap": [
"src/"
]
}
} | 2 | 0.083333 | 1 | 1 |
4653ee1b478a0eaceaea0f94737e023e98215e70 | inc/modules/siteorigin-panels/sass/_mtalents-panel-simple.scss | inc/modules/siteorigin-panels/sass/_mtalents-panel-simple.scss | .mtalents-simple-panel{
width: 350px;
margin: 0 auto 25px;
padding: 40px 30px;
background-color: #f7f9f9;
border-bottom: solid 4px transparent;
&-icon{
margin-bottom: 20px;
}
&-title{
margin-bottom: 20px;
color: #313030;
@include font-size(1.25);
}
&-content{
}
} | .mtalents-simple-panel{
width: 350px;
max-width: 100%;
margin: 0 auto 25px;
padding: 40px 30px;
background-color: #f7f9f9;
border-bottom: solid 4px transparent;
&-icon{
margin-bottom: 20px;
}
&-title{
margin-bottom: 20px;
color: #313030;
@include font-size(1.25);
}
&-content{
}
} | Add max width to simple panel | Add max width to simple panel | SCSS | mit | mb-projects/mbtheme-mtalents,mb-projects/mbtheme-mtalents | scss | ## Code Before:
.mtalents-simple-panel{
width: 350px;
margin: 0 auto 25px;
padding: 40px 30px;
background-color: #f7f9f9;
border-bottom: solid 4px transparent;
&-icon{
margin-bottom: 20px;
}
&-title{
margin-bottom: 20px;
color: #313030;
@include font-size(1.25);
}
&-content{
}
}
## Instruction:
Add max width to simple panel
## Code After:
.mtalents-simple-panel{
width: 350px;
max-width: 100%;
margin: 0 auto 25px;
padding: 40px 30px;
background-color: #f7f9f9;
border-bottom: solid 4px transparent;
&-icon{
margin-bottom: 20px;
}
&-title{
margin-bottom: 20px;
color: #313030;
@include font-size(1.25);
}
&-content{
}
} | .mtalents-simple-panel{
width: 350px;
+ max-width: 100%;
margin: 0 auto 25px;
padding: 40px 30px;
background-color: #f7f9f9;
border-bottom: solid 4px transparent;
&-icon{
margin-bottom: 20px;
}
&-title{
margin-bottom: 20px;
color: #313030;
@include font-size(1.25);
}
&-content{
}
} | 1 | 0.055556 | 1 | 0 |
3e46977ec15093ff8fcf84bf5d3e339c17a06630 | libcontainer/stacktrace/capture_test.go | libcontainer/stacktrace/capture_test.go | package stacktrace
import "testing"
func captureFunc() Stacktrace {
return Capture(0)
}
func TestCaptureTestFunc(t *testing.T) {
stack := captureFunc()
if len(stack.Frames) == 0 {
t.Fatal("expected stack frames to be returned")
}
// the first frame is the caller
frame := stack.Frames[0]
if expected := "captureFunc"; frame.Function != expected {
t.Fatalf("expteced function %q but recevied %q", expected, frame.Function)
}
if expected := "github.com/opencontainers/runc/libcontainer/stacktrace"; frame.Package != expected {
t.Fatalf("expected package %q but received %q", expected, frame.Package)
}
if expected := "capture_test.go"; frame.File != expected {
t.Fatalf("expected file %q but received %q", expected, frame.File)
}
}
| package stacktrace
import (
"strings"
"testing"
)
func captureFunc() Stacktrace {
return Capture(0)
}
func TestCaptureTestFunc(t *testing.T) {
stack := captureFunc()
if len(stack.Frames) == 0 {
t.Fatal("expected stack frames to be returned")
}
// the first frame is the caller
frame := stack.Frames[0]
if expected := "captureFunc"; frame.Function != expected {
t.Fatalf("expteced function %q but recevied %q", expected, frame.Function)
}
expected := "github.com/opencontainers/runc/libcontainer/stacktrace"
if !strings.HasSuffix(frame.Package, expected) {
t.Fatalf("expected package %q but received %q", expected, frame.Package)
}
if expected := "capture_test.go"; frame.File != expected {
t.Fatalf("expected file %q but received %q", expected, frame.File)
}
}
| Fix to allow for build in different path | Fix to allow for build in different path
The path in the stacktrace might not be:
"github.com/opencontainers/runc/libcontainer/stacktrace"
For example, for me its:
"_/go/src/github.com/opencontainers/runc/libcontainer/stacktrace"
so I changed the check to make sure the tail end of the path matches instead
of the entire thing
Signed-off-by: Doug Davis <[email protected]>
| Go | apache-2.0 | adrianreber/runc,wangkirin/runc,albertoleal/runc,sunyuan3/runc,runcom/runc,estesp/runc,opencontainers/runc,nkwilson/runc,justincormack/runc,mikebrow/runc,coolljt0725/runc,jhowardmsft/runc,kolyshkin/runc,dqminh/runc,runcom/runc,mheon/runc,WeiZhang555/runc,adrianreber/runc,mikebrow/runc,maxamillion/runc,docker/runc,albertoleal/runc,xiaochenshen/runc,mheon/runc,hqhq/runc,coolljt0725/runc,dqminh/runc,cloudfoundry-incubator/runc,hqhq/runc,stefanberger/runc,runcom/runc,abduld/runc,hqhq/runc,rhatdan/runc,crosbymichael/runc,maxamillion/runc,keloyang/runc,inatatsu/runc,coolljt0725/runc,laijs/runc,rhatdan/runc,estesp/runc,WeiZhang555/runc,adrianreber/runc,dqminh/runc,rhatdan/runc,ZJU-SEL/runc,cyphar/runc,cyphar/runc,mYmNeo/runc,cloudfoundry-incubator/runc,wking/runc,rhatdan/runc,vbatts/runc,stefanberger/runc,jhowardmsft/runc,vbatts/runc,sunyuan3/runc,justincormack/runc,opencontainers/runc,cloudfoundry-incubator/runc,shishir-a412ed/runc,ZJU-SEL/runc,laijs/runc,abduld/runc,inatatsu/runc,albertoleal/runc,jhowardmsft/runc,wangkirin/runc,wangkirin/runc,avagin/runc,crosbymichael/runc,avagin/runc,docker/runc,mikebrow/runc,keloyang/runc,justincormack/runc,mYmNeo/runc,xiaochenshen/runc,kolyshkin/runc,rajasec/runc,mYmNeo/runc,avagin/runc,mheon/runc,sunyuan3/runc,vbatts/runc,laijs/runc,crosbymichael/runc,WeiZhang555/runc,shishir-a412ed/runc,wking/runc,rajasec/runc,wking/runc,opencontainers/runc,inatatsu/runc,abduld/runc,nkwilson/runc,ZJU-SEL/runc,opencontainers/runc,estesp/runc,xiaochenshen/runc,cyphar/runc,shishir-a412ed/runc,keloyang/runc,kolyshkin/runc,rajasec/runc,dqminh/runc,maxamillion/runc,stefanberger/runc,kolyshkin/runc,nkwilson/runc,docker/runc | go | ## Code Before:
package stacktrace
import "testing"
func captureFunc() Stacktrace {
return Capture(0)
}
func TestCaptureTestFunc(t *testing.T) {
stack := captureFunc()
if len(stack.Frames) == 0 {
t.Fatal("expected stack frames to be returned")
}
// the first frame is the caller
frame := stack.Frames[0]
if expected := "captureFunc"; frame.Function != expected {
t.Fatalf("expteced function %q but recevied %q", expected, frame.Function)
}
if expected := "github.com/opencontainers/runc/libcontainer/stacktrace"; frame.Package != expected {
t.Fatalf("expected package %q but received %q", expected, frame.Package)
}
if expected := "capture_test.go"; frame.File != expected {
t.Fatalf("expected file %q but received %q", expected, frame.File)
}
}
## Instruction:
Fix to allow for build in different path
The path in the stacktrace might not be:
"github.com/opencontainers/runc/libcontainer/stacktrace"
For example, for me its:
"_/go/src/github.com/opencontainers/runc/libcontainer/stacktrace"
so I changed the check to make sure the tail end of the path matches instead
of the entire thing
Signed-off-by: Doug Davis <[email protected]>
## Code After:
package stacktrace
import (
"strings"
"testing"
)
func captureFunc() Stacktrace {
return Capture(0)
}
func TestCaptureTestFunc(t *testing.T) {
stack := captureFunc()
if len(stack.Frames) == 0 {
t.Fatal("expected stack frames to be returned")
}
// the first frame is the caller
frame := stack.Frames[0]
if expected := "captureFunc"; frame.Function != expected {
t.Fatalf("expteced function %q but recevied %q", expected, frame.Function)
}
expected := "github.com/opencontainers/runc/libcontainer/stacktrace"
if !strings.HasSuffix(frame.Package, expected) {
t.Fatalf("expected package %q but received %q", expected, frame.Package)
}
if expected := "capture_test.go"; frame.File != expected {
t.Fatalf("expected file %q but received %q", expected, frame.File)
}
}
| package stacktrace
- import "testing"
+ import (
+ "strings"
+ "testing"
+ )
func captureFunc() Stacktrace {
return Capture(0)
}
func TestCaptureTestFunc(t *testing.T) {
stack := captureFunc()
if len(stack.Frames) == 0 {
t.Fatal("expected stack frames to be returned")
}
// the first frame is the caller
frame := stack.Frames[0]
if expected := "captureFunc"; frame.Function != expected {
t.Fatalf("expteced function %q but recevied %q", expected, frame.Function)
}
- if expected := "github.com/opencontainers/runc/libcontainer/stacktrace"; frame.Package != expected {
? --- -----------------------------
+ expected := "github.com/opencontainers/runc/libcontainer/stacktrace"
+ if !strings.HasSuffix(frame.Package, expected) {
t.Fatalf("expected package %q but received %q", expected, frame.Package)
}
if expected := "capture_test.go"; frame.File != expected {
t.Fatalf("expected file %q but received %q", expected, frame.File)
}
} | 8 | 0.296296 | 6 | 2 |
7d6a365f891041da8e80fcf23c0ea5f54b841147 | README.md | README.md | Xinming Creative Official Website
## Reference
- [How to create github page](https://pages.github.com/)
- [Agency Jekyll Theme](http://y7kim.github.io/agency-jekyll-theme/)
- [Support Multiple Languages](https://github.com/Anthony-Gaudino/jekyll-multiple-languages-plugin)
| This is the source of Xinming Creative Enterprise official Website.
## Requirements
> Jekyll 3.x
# Install Jekyll on Ubuntu 16.04
~~~
$ sudo apt-get update
$ sudo apt-get install ruby ruby-dev make gcc
$ sudo gem install jekyll bundler
~~~
see [source](https://www.digitalocean.com/community/tutorials/how-to-set-up-a-jekyll-development-site-on-ubuntu-16-04)
## How to Start Jekyll
~~~
$ jekyll new myblog
$ cd myblog
~~~
Run
~~~
$ bundle exec jekyll serve
~~~
or simply
~~~
$ jekyll serve
~~~
with reload and refresh every file changes
~~~
$ jekyll serve -w
~~~
Start Jekyll locally same like Github page environment
~~~
$ jekyll serve --safe
~~~
Now browse to http://localhost:4000
## Reference
- [How to create github page](https://pages.github.com/)
- [Agency Jekyll Theme](http://y7kim.github.io/agency-jekyll-theme/)
- [Support Multiple Languages](https://github.com/Anthony-Gaudino/jekyll-multiple-languages-plugin)
| Add useful how to step in readme | Add useful how to step in readme
| Markdown | apache-2.0 | xinmingcreative/xinmingcreative.github.io,xinmingcreative/xinmingcreative.github.io,xinmingcreative/xinmingcreative.github.io,xinmingcreative/xinmingcreative.github.io | markdown | ## Code Before:
Xinming Creative Official Website
## Reference
- [How to create github page](https://pages.github.com/)
- [Agency Jekyll Theme](http://y7kim.github.io/agency-jekyll-theme/)
- [Support Multiple Languages](https://github.com/Anthony-Gaudino/jekyll-multiple-languages-plugin)
## Instruction:
Add useful how to step in readme
## Code After:
This is the source of Xinming Creative Enterprise official Website.
## Requirements
> Jekyll 3.x
# Install Jekyll on Ubuntu 16.04
~~~
$ sudo apt-get update
$ sudo apt-get install ruby ruby-dev make gcc
$ sudo gem install jekyll bundler
~~~
see [source](https://www.digitalocean.com/community/tutorials/how-to-set-up-a-jekyll-development-site-on-ubuntu-16-04)
## How to Start Jekyll
~~~
$ jekyll new myblog
$ cd myblog
~~~
Run
~~~
$ bundle exec jekyll serve
~~~
or simply
~~~
$ jekyll serve
~~~
with reload and refresh every file changes
~~~
$ jekyll serve -w
~~~
Start Jekyll locally same like Github page environment
~~~
$ jekyll serve --safe
~~~
Now browse to http://localhost:4000
## Reference
- [How to create github page](https://pages.github.com/)
- [Agency Jekyll Theme](http://y7kim.github.io/agency-jekyll-theme/)
- [Support Multiple Languages](https://github.com/Anthony-Gaudino/jekyll-multiple-languages-plugin)
| - Xinming Creative Official Website
+ This is the source of Xinming Creative Enterprise official Website.
+
+ ## Requirements
+ > Jekyll 3.x
+
+ # Install Jekyll on Ubuntu 16.04
+ ~~~
+ $ sudo apt-get update
+ $ sudo apt-get install ruby ruby-dev make gcc
+ $ sudo gem install jekyll bundler
+ ~~~
+
+ see [source](https://www.digitalocean.com/community/tutorials/how-to-set-up-a-jekyll-development-site-on-ubuntu-16-04)
+
+ ## How to Start Jekyll
+ ~~~
+ $ jekyll new myblog
+ $ cd myblog
+ ~~~
+
+ Run
+ ~~~
+ $ bundle exec jekyll serve
+ ~~~
+
+ or simply
+ ~~~
+ $ jekyll serve
+ ~~~
+
+ with reload and refresh every file changes
+ ~~~
+ $ jekyll serve -w
+ ~~~
+
+ Start Jekyll locally same like Github page environment
+ ~~~
+ $ jekyll serve --safe
+ ~~~
+
+ Now browse to http://localhost:4000
+
## Reference
- [How to create github page](https://pages.github.com/)
- [Agency Jekyll Theme](http://y7kim.github.io/agency-jekyll-theme/)
- [Support Multiple Languages](https://github.com/Anthony-Gaudino/jekyll-multiple-languages-plugin) | 43 | 7.166667 | 42 | 1 |
48dc53c5c92a49fca959a962434bee6c2810a0c8 | tensorboard_plugin_wit/pip_package/setup.py | tensorboard_plugin_wit/pip_package/setup.py |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import setuptools
setuptools.setup(
name="tensorboard_plugin_wit",
version="1.6.0",
description="What-If Tool TensorBoard plugin.",
packages=setuptools.find_packages(),
package_data={
"tensorboard_plugin_wit": ["static/**"],
},
entry_points={
"tensorboard_plugins": [
"wit = tensorboard_plugin_wit.wit_plugin_loader:WhatIfToolPluginLoader",
],
},
)
|
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import setuptools
setuptools.setup(
name="tensorboard_plugin_wit",
version="1.6.0",
description="What-If Tool TensorBoard plugin.",
packages=setuptools.find_packages(),
license='Apache 2.0',
package_data={
"tensorboard_plugin_wit": ["static/**"],
},
entry_points={
"tensorboard_plugins": [
"wit = tensorboard_plugin_wit.wit_plugin_loader:WhatIfToolPluginLoader",
],
},
)
| Add missing license to pip package | Add missing license to pip package | Python | apache-2.0 | PAIR-code/what-if-tool,PAIR-code/what-if-tool,PAIR-code/what-if-tool,pair-code/what-if-tool,pair-code/what-if-tool,PAIR-code/what-if-tool,pair-code/what-if-tool,pair-code/what-if-tool,PAIR-code/what-if-tool,pair-code/what-if-tool | python | ## Code Before:
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import setuptools
setuptools.setup(
name="tensorboard_plugin_wit",
version="1.6.0",
description="What-If Tool TensorBoard plugin.",
packages=setuptools.find_packages(),
package_data={
"tensorboard_plugin_wit": ["static/**"],
},
entry_points={
"tensorboard_plugins": [
"wit = tensorboard_plugin_wit.wit_plugin_loader:WhatIfToolPluginLoader",
],
},
)
## Instruction:
Add missing license to pip package
## Code After:
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import setuptools
setuptools.setup(
name="tensorboard_plugin_wit",
version="1.6.0",
description="What-If Tool TensorBoard plugin.",
packages=setuptools.find_packages(),
license='Apache 2.0',
package_data={
"tensorboard_plugin_wit": ["static/**"],
},
entry_points={
"tensorboard_plugins": [
"wit = tensorboard_plugin_wit.wit_plugin_loader:WhatIfToolPluginLoader",
],
},
)
|
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import setuptools
setuptools.setup(
name="tensorboard_plugin_wit",
version="1.6.0",
description="What-If Tool TensorBoard plugin.",
packages=setuptools.find_packages(),
+ license='Apache 2.0',
package_data={
"tensorboard_plugin_wit": ["static/**"],
},
entry_points={
"tensorboard_plugins": [
"wit = tensorboard_plugin_wit.wit_plugin_loader:WhatIfToolPluginLoader",
],
},
) | 1 | 0.045455 | 1 | 0 |
668f3f1bd9e9ed578ab58da02b7276950f9a4b4b | src/mobile/lib/model/MstGoal.ts | src/mobile/lib/model/MstGoal.ts | import {MstSvt} from "../../../model/master/Master";
import {MstSkillContainer, MstSvtSkillContainer, MstCombineSkillContainer} from "../../../model/impl/MstContainer";
export interface MstGoal {
appVer: string;
svtRawData: Array<MstSvt>;
svtSkillData: MstSvtSkillContainer;
skillCombineData: MstCombineSkillContainer;
skillData: MstSkillContainer;
current: Goal;
goals: Array<Goal>;
compareSourceId: string; // UUID of one Goal
compareTargetId: string; // UUID of one Goal
}
export interface Goal {
id: string; // UUID
name: string;
servants: Array<GoalSvt>;
}
export interface GoalSvt {
svtId: number;
skills: Array<GoalSvtSkill>;
}
export interface GoalSvtSkill {
skillId: number;
level: number;
}
export const defaultCurrentGoal = { // Goal
id: "current",
name: "当前进度",
servants: [],
} as Goal;
export const defaultMstGoal = { // MstGoal
appVer: undefined,
current: undefined,
goals: [defaultCurrentGoal],
compareSourceId: "current",
compareTargetId: "current",
} as MstGoal; | import {MstSvt} from "../../../model/master/Master";
import {MstSkillContainer, MstSvtSkillContainer, MstCombineSkillContainer} from "../../../model/impl/MstContainer";
export interface MstGoal {
appVer: string;
svtRawData: Array<MstSvt>;
svtSkillData: MstSvtSkillContainer;
skillCombineData: MstCombineSkillContainer;
skillData: MstSkillContainer;
current: Goal;
goals: Array<Goal>;
compareSourceId: string; // UUID of one Goal
compareTargetId: string; // UUID of one Goal
}
export interface Goal {
id: string; // UUID
name: string;
servants: Array<GoalSvt>;
}
export interface GoalSvt {
svtId: number;
limit: number; // 灵基再临状态,0 - 4
skills: Array<GoalSvtSkill>;
}
export interface GoalSvtSkill {
skillId: number;
level: number;
}
export const defaultCurrentGoal = { // Goal
id: "current",
name: "当前进度",
servants: [],
} as Goal;
export const defaultMstGoal = { // MstGoal
appVer: undefined,
current: undefined,
goals: [defaultCurrentGoal],
compareSourceId: "current",
compareTargetId: "current",
} as MstGoal; | Add servant limit attribute in state. | Add servant limit attribute in state.
| TypeScript | mit | agreatfool/fgo-handbook,agreatfool/fgo-handbook,agreatfool/fgo-handbook,agreatfool/fgo-handbook,agreatfool/fgo-handbook,agreatfool/fgo-handbook | typescript | ## Code Before:
import {MstSvt} from "../../../model/master/Master";
import {MstSkillContainer, MstSvtSkillContainer, MstCombineSkillContainer} from "../../../model/impl/MstContainer";
export interface MstGoal {
appVer: string;
svtRawData: Array<MstSvt>;
svtSkillData: MstSvtSkillContainer;
skillCombineData: MstCombineSkillContainer;
skillData: MstSkillContainer;
current: Goal;
goals: Array<Goal>;
compareSourceId: string; // UUID of one Goal
compareTargetId: string; // UUID of one Goal
}
export interface Goal {
id: string; // UUID
name: string;
servants: Array<GoalSvt>;
}
export interface GoalSvt {
svtId: number;
skills: Array<GoalSvtSkill>;
}
export interface GoalSvtSkill {
skillId: number;
level: number;
}
export const defaultCurrentGoal = { // Goal
id: "current",
name: "当前进度",
servants: [],
} as Goal;
export const defaultMstGoal = { // MstGoal
appVer: undefined,
current: undefined,
goals: [defaultCurrentGoal],
compareSourceId: "current",
compareTargetId: "current",
} as MstGoal;
## Instruction:
Add servant limit attribute in state.
## Code After:
import {MstSvt} from "../../../model/master/Master";
import {MstSkillContainer, MstSvtSkillContainer, MstCombineSkillContainer} from "../../../model/impl/MstContainer";
export interface MstGoal {
appVer: string;
svtRawData: Array<MstSvt>;
svtSkillData: MstSvtSkillContainer;
skillCombineData: MstCombineSkillContainer;
skillData: MstSkillContainer;
current: Goal;
goals: Array<Goal>;
compareSourceId: string; // UUID of one Goal
compareTargetId: string; // UUID of one Goal
}
export interface Goal {
id: string; // UUID
name: string;
servants: Array<GoalSvt>;
}
export interface GoalSvt {
svtId: number;
limit: number; // 灵基再临状态,0 - 4
skills: Array<GoalSvtSkill>;
}
export interface GoalSvtSkill {
skillId: number;
level: number;
}
export const defaultCurrentGoal = { // Goal
id: "current",
name: "当前进度",
servants: [],
} as Goal;
export const defaultMstGoal = { // MstGoal
appVer: undefined,
current: undefined,
goals: [defaultCurrentGoal],
compareSourceId: "current",
compareTargetId: "current",
} as MstGoal; | import {MstSvt} from "../../../model/master/Master";
import {MstSkillContainer, MstSvtSkillContainer, MstCombineSkillContainer} from "../../../model/impl/MstContainer";
export interface MstGoal {
appVer: string;
svtRawData: Array<MstSvt>;
svtSkillData: MstSvtSkillContainer;
skillCombineData: MstCombineSkillContainer;
skillData: MstSkillContainer;
current: Goal;
goals: Array<Goal>;
compareSourceId: string; // UUID of one Goal
compareTargetId: string; // UUID of one Goal
}
export interface Goal {
id: string; // UUID
name: string;
servants: Array<GoalSvt>;
}
export interface GoalSvt {
svtId: number;
+ limit: number; // 灵基再临状态,0 - 4
skills: Array<GoalSvtSkill>;
}
export interface GoalSvtSkill {
skillId: number;
level: number;
}
export const defaultCurrentGoal = { // Goal
id: "current",
name: "当前进度",
servants: [],
} as Goal;
export const defaultMstGoal = { // MstGoal
appVer: undefined,
current: undefined,
goals: [defaultCurrentGoal],
compareSourceId: "current",
compareTargetId: "current",
} as MstGoal; | 1 | 0.022727 | 1 | 0 |
2bc65818b86843f759d4cbf10617ce53d2263581 | lib/everything/piece.rb | lib/everything/piece.rb | require 'forwardable'
module Everything
class Piece
extend Forwardable
attr_reader :full_path
# TODO: Add the following methods:
# - dir (Relative to Everything.path)
# - path (Relative to Everything.path)
# - absolute_dir
# - absolute_path
def initialize(full_path)
@full_path = full_path
end
def absolute_dir
@absolute_dir ||= File.join(Everything.path, dir)
end
def absolute_path
@absolute_path ||= File.join(absolute_dir, file_name)
end
def content
@content ||= Content.new(full_path)
end
def dir
@dir ||= calculated_dir
end
def_delegators :content, :body, :file_name, :raw_markdown, :raw_markdown=, :title
def metadata
@metadata ||= Metadata.new(full_path)
end
def public?
metadata['public']
end
def_delegators :metadata, :raw_yaml, :raw_yaml=
def name
@name ||= File.basename(full_path)
end
def path
@path ||= File.join(dir, content.file_name)
end
def save
content.save
metadata.save
end
private
def calculated_dir
everything_pathname = Pathname.new(Everything.path)
full_pathname = Pathname.new(full_path)
relative_pathname = full_pathname.relative_path_from(everything_pathname)
relative_pathname.to_s
end
end
end
require 'everything/piece/content'
require 'everything/piece/metadata'
| require 'forwardable'
module Everything
class Piece
extend Forwardable
attr_reader :full_path
def initialize(full_path)
@full_path = full_path
end
def absolute_dir
@absolute_dir ||= File.join(Everything.path, dir)
end
def absolute_path
@absolute_path ||= File.join(absolute_dir, file_name)
end
def content
@content ||= Content.new(full_path)
end
def dir
@dir ||= calculated_dir
end
def_delegators :content, :body, :file_name, :raw_markdown, :raw_markdown=, :title
def metadata
@metadata ||= Metadata.new(full_path)
end
def public?
metadata['public']
end
def_delegators :metadata, :raw_yaml, :raw_yaml=
def name
@name ||= File.basename(full_path)
end
def path
@path ||= File.join(dir, content.file_name)
end
def save
content.save
metadata.save
end
private
def calculated_dir
everything_pathname = Pathname.new(Everything.path)
full_pathname = Pathname.new(full_path)
relative_pathname = full_pathname.relative_path_from(everything_pathname)
relative_pathname.to_s
end
end
end
require 'everything/piece/content'
require 'everything/piece/metadata'
| Remove TODOs that are done | Remove TODOs that are done
| Ruby | mit | kyletolle/everything-core | ruby | ## Code Before:
require 'forwardable'
module Everything
class Piece
extend Forwardable
attr_reader :full_path
# TODO: Add the following methods:
# - dir (Relative to Everything.path)
# - path (Relative to Everything.path)
# - absolute_dir
# - absolute_path
def initialize(full_path)
@full_path = full_path
end
def absolute_dir
@absolute_dir ||= File.join(Everything.path, dir)
end
def absolute_path
@absolute_path ||= File.join(absolute_dir, file_name)
end
def content
@content ||= Content.new(full_path)
end
def dir
@dir ||= calculated_dir
end
def_delegators :content, :body, :file_name, :raw_markdown, :raw_markdown=, :title
def metadata
@metadata ||= Metadata.new(full_path)
end
def public?
metadata['public']
end
def_delegators :metadata, :raw_yaml, :raw_yaml=
def name
@name ||= File.basename(full_path)
end
def path
@path ||= File.join(dir, content.file_name)
end
def save
content.save
metadata.save
end
private
def calculated_dir
everything_pathname = Pathname.new(Everything.path)
full_pathname = Pathname.new(full_path)
relative_pathname = full_pathname.relative_path_from(everything_pathname)
relative_pathname.to_s
end
end
end
require 'everything/piece/content'
require 'everything/piece/metadata'
## Instruction:
Remove TODOs that are done
## Code After:
require 'forwardable'
module Everything
class Piece
extend Forwardable
attr_reader :full_path
def initialize(full_path)
@full_path = full_path
end
def absolute_dir
@absolute_dir ||= File.join(Everything.path, dir)
end
def absolute_path
@absolute_path ||= File.join(absolute_dir, file_name)
end
def content
@content ||= Content.new(full_path)
end
def dir
@dir ||= calculated_dir
end
def_delegators :content, :body, :file_name, :raw_markdown, :raw_markdown=, :title
def metadata
@metadata ||= Metadata.new(full_path)
end
def public?
metadata['public']
end
def_delegators :metadata, :raw_yaml, :raw_yaml=
def name
@name ||= File.basename(full_path)
end
def path
@path ||= File.join(dir, content.file_name)
end
def save
content.save
metadata.save
end
private
def calculated_dir
everything_pathname = Pathname.new(Everything.path)
full_pathname = Pathname.new(full_path)
relative_pathname = full_pathname.relative_path_from(everything_pathname)
relative_pathname.to_s
end
end
end
require 'everything/piece/content'
require 'everything/piece/metadata'
| require 'forwardable'
module Everything
class Piece
extend Forwardable
attr_reader :full_path
-
- # TODO: Add the following methods:
- # - dir (Relative to Everything.path)
- # - path (Relative to Everything.path)
- # - absolute_dir
- # - absolute_path
def initialize(full_path)
@full_path = full_path
end
def absolute_dir
@absolute_dir ||= File.join(Everything.path, dir)
end
def absolute_path
@absolute_path ||= File.join(absolute_dir, file_name)
end
def content
@content ||= Content.new(full_path)
end
def dir
@dir ||= calculated_dir
end
def_delegators :content, :body, :file_name, :raw_markdown, :raw_markdown=, :title
def metadata
@metadata ||= Metadata.new(full_path)
end
def public?
metadata['public']
end
def_delegators :metadata, :raw_yaml, :raw_yaml=
def name
@name ||= File.basename(full_path)
end
def path
@path ||= File.join(dir, content.file_name)
end
def save
content.save
metadata.save
end
private
def calculated_dir
everything_pathname = Pathname.new(Everything.path)
full_pathname = Pathname.new(full_path)
relative_pathname = full_pathname.relative_path_from(everything_pathname)
relative_pathname.to_s
end
end
end
require 'everything/piece/content'
require 'everything/piece/metadata'
| 6 | 0.081081 | 0 | 6 |
a9f83ae514ebce5b7e5db29530f8714cc02e0086 | services/taxonomy/client/src/main/resources/collectionspace-client.properties | services/taxonomy/client/src/main/resources/collectionspace-client.properties | cspace.url=http://localhost:8180/cspace-services/
cspace.ssl=false
cspace.auth=true
[email protected]
cspace.password=Administrator
# default tenant
cspace.tenant=1
# the tenantID of the numbered tenant:
cspace.tenantID=core.collectionspace.org
| cspace.url=http://localhost:8180/cspace-services/
cspace.ssl=false
cspace.auth=true
[email protected]
cspace.password=Administrator
| Remove extraneous (and incorrect) values from properties file for running Taxonomy service client tests. | CSPACE-6152: Remove extraneous (and incorrect) values from properties file for running Taxonomy service client tests.
| INI | apache-2.0 | cherryhill/collectionspace-services,cherryhill/collectionspace-services | ini | ## Code Before:
cspace.url=http://localhost:8180/cspace-services/
cspace.ssl=false
cspace.auth=true
[email protected]
cspace.password=Administrator
# default tenant
cspace.tenant=1
# the tenantID of the numbered tenant:
cspace.tenantID=core.collectionspace.org
## Instruction:
CSPACE-6152: Remove extraneous (and incorrect) values from properties file for running Taxonomy service client tests.
## Code After:
cspace.url=http://localhost:8180/cspace-services/
cspace.ssl=false
cspace.auth=true
[email protected]
cspace.password=Administrator
| cspace.url=http://localhost:8180/cspace-services/
cspace.ssl=false
cspace.auth=true
[email protected]
cspace.password=Administrator
- # default tenant
- cspace.tenant=1
- # the tenantID of the numbered tenant:
- cspace.tenantID=core.collectionspace.org | 4 | 0.444444 | 0 | 4 |
ec5fa6010d07937800de6c98848909f4ceee5979 | app/assets/style/overrides.scss | app/assets/style/overrides.scss | @import 'vars';
/* Material overrides */
cherry-form {
white-space: normal;
}
md-input-container {
padding: 0;
}
md-input-container textarea.md-input {
height: auto;
min-height: 0;
}
md-content {
background-color: transparent;
color: $brand-black;
}
md-content form h1 {
white-space: normal;
font-weight: 500;
}
.md-button {
margin: 26px 0 6px;
background-color: rgba(0,0,0,0.03);
}
/* Pixeden icon overrides */
[class*=" pe-7s-"],
[class^=pe-7s-] {
line-height: inherit;
} | @import 'vars';
/* Material overrides */
cherry-form {
white-space: normal;
}
md-input-container {
padding: 0;
.md-char-counter {
padding-right: 5px;
}
label,
.md-input,
[ng-message]:not(.md-char-counter) {
padding-left: 5px !important;
}
}
md-input-container textarea.md-input {
height: auto;
min-height: 0;
}
md-content {
background-color: transparent;
color: $brand-black;
}
md-content form h1 {
white-space: normal;
font-weight: 500;
}
.md-button {
margin: 26px 0 6px;
background-color: rgba(0,0,0,0.03);
}
/* Pixeden icon overrides */
[class*=" pe-7s-"],
[class^=pe-7s-] {
line-height: inherit;
} | Add some padding to the signin form | Add some padding to the signin form
| SCSS | mit | robotnoises/CherryTask,robotnoises/CherryTask | scss | ## Code Before:
@import 'vars';
/* Material overrides */
cherry-form {
white-space: normal;
}
md-input-container {
padding: 0;
}
md-input-container textarea.md-input {
height: auto;
min-height: 0;
}
md-content {
background-color: transparent;
color: $brand-black;
}
md-content form h1 {
white-space: normal;
font-weight: 500;
}
.md-button {
margin: 26px 0 6px;
background-color: rgba(0,0,0,0.03);
}
/* Pixeden icon overrides */
[class*=" pe-7s-"],
[class^=pe-7s-] {
line-height: inherit;
}
## Instruction:
Add some padding to the signin form
## Code After:
@import 'vars';
/* Material overrides */
cherry-form {
white-space: normal;
}
md-input-container {
padding: 0;
.md-char-counter {
padding-right: 5px;
}
label,
.md-input,
[ng-message]:not(.md-char-counter) {
padding-left: 5px !important;
}
}
md-input-container textarea.md-input {
height: auto;
min-height: 0;
}
md-content {
background-color: transparent;
color: $brand-black;
}
md-content form h1 {
white-space: normal;
font-weight: 500;
}
.md-button {
margin: 26px 0 6px;
background-color: rgba(0,0,0,0.03);
}
/* Pixeden icon overrides */
[class*=" pe-7s-"],
[class^=pe-7s-] {
line-height: inherit;
} | @import 'vars';
/* Material overrides */
cherry-form {
white-space: normal;
}
md-input-container {
+
padding: 0;
+
+ .md-char-counter {
+ padding-right: 5px;
+ }
+
+ label,
+ .md-input,
+ [ng-message]:not(.md-char-counter) {
+ padding-left: 5px !important;
+ }
}
md-input-container textarea.md-input {
height: auto;
min-height: 0;
}
md-content {
background-color: transparent;
color: $brand-black;
}
md-content form h1 {
white-space: normal;
font-weight: 500;
}
.md-button {
margin: 26px 0 6px;
background-color: rgba(0,0,0,0.03);
}
/* Pixeden icon overrides */
[class*=" pe-7s-"],
[class^=pe-7s-] {
line-height: inherit;
} | 11 | 0.289474 | 11 | 0 |
a141f0f9781f013ca313db5f97a261f8fa95c1a2 | multi-arch-manifest.yaml | multi-arch-manifest.yaml | image: bkimminich/juice-shop:snapshot
manifests:
- image: bkimminich/juice-shop:snapshot-amd64
platform:
architecture: amd64
os: linux
- image: bkimminich/juice-shop:snapshot-arm64v8
platform:
architecture: arm64
os: linux
variant: v8 | image: bkimminich/juice-shop:snapshot
manifests:
- image: bkimminich/juice-shop:snapshot-amd64
platform:
architecture: amd64
os: linux | Remove Arm64 manifest entry for initial testing from Travis-CI | Remove Arm64 manifest entry for initial testing from Travis-CI
| YAML | mit | bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop,bkimminich/juice-shop | yaml | ## Code Before:
image: bkimminich/juice-shop:snapshot
manifests:
- image: bkimminich/juice-shop:snapshot-amd64
platform:
architecture: amd64
os: linux
- image: bkimminich/juice-shop:snapshot-arm64v8
platform:
architecture: arm64
os: linux
variant: v8
## Instruction:
Remove Arm64 manifest entry for initial testing from Travis-CI
## Code After:
image: bkimminich/juice-shop:snapshot
manifests:
- image: bkimminich/juice-shop:snapshot-amd64
platform:
architecture: amd64
os: linux | image: bkimminich/juice-shop:snapshot
manifests:
- image: bkimminich/juice-shop:snapshot-amd64
platform:
architecture: amd64
os: linux
- - image: bkimminich/juice-shop:snapshot-arm64v8
- platform:
- architecture: arm64
- os: linux
- variant: v8 | 5 | 0.454545 | 0 | 5 |
6c3821507a40b0844a8b7a1b0d73e1d11b8ca8f5 | docs/rtd-conda-environment.yml | docs/rtd-conda-environment.yml | dependencies:
- ipykernel
- sphinx >= 1.4
- scikit-learn
- numpy
- scipy
- lxml <= 3.6.1
- pandas >= 0.18,<0.19
- patsy
- pytz
- requests
- pip:
- nbsphinx
- sphinx-rtd-theme
- sphinxcontrib-napoleon
- holidays
| dependencies:
- ipykernel
- sphinx >= 1.4
- scikit-learn
- numpy
- scipy
- lxml <= 3.6.1
- pandas >= 0.18,<0.19
- patsy
- pytz
- requests
- statsmodels
- pip:
- nbsphinx
- sphinx-rtd-theme
- sphinxcontrib-napoleon
- holidays
| Add statsmodels dependency to docs | Add statsmodels dependency to docs
| YAML | apache-2.0 | openeemeter/eemeter,openeemeter/eemeter | yaml | ## Code Before:
dependencies:
- ipykernel
- sphinx >= 1.4
- scikit-learn
- numpy
- scipy
- lxml <= 3.6.1
- pandas >= 0.18,<0.19
- patsy
- pytz
- requests
- pip:
- nbsphinx
- sphinx-rtd-theme
- sphinxcontrib-napoleon
- holidays
## Instruction:
Add statsmodels dependency to docs
## Code After:
dependencies:
- ipykernel
- sphinx >= 1.4
- scikit-learn
- numpy
- scipy
- lxml <= 3.6.1
- pandas >= 0.18,<0.19
- patsy
- pytz
- requests
- statsmodels
- pip:
- nbsphinx
- sphinx-rtd-theme
- sphinxcontrib-napoleon
- holidays
| dependencies:
- ipykernel
- sphinx >= 1.4
- scikit-learn
- numpy
- scipy
- lxml <= 3.6.1
- pandas >= 0.18,<0.19
- patsy
- pytz
- requests
+ - statsmodels
- pip:
- nbsphinx
- sphinx-rtd-theme
- sphinxcontrib-napoleon
- holidays | 1 | 0.0625 | 1 | 0 |
be00af0a0e87af5b4c82107d2f1356f378b65cb4 | obj_sys/management/commands/tag_the_file.py | obj_sys/management/commands/tag_the_file.py | import os
from optparse import make_option
from django.core.management import BaseCommand
from djangoautoconf.cmd_handler_base.msg_process_cmd_base import DjangoCmdBase
from obj_sys.models_ufs_obj import UfsObj
class FileTagger(DjangoCmdBase):
option_list = BaseCommand.option_list + (
make_option('--tags',
action='store',
dest='tags',
type='string',
help='Tags separated with ","'),
make_option('--file_path',
action='store',
dest='file_path',
type='string',
help='Path of the file to be tagged'),
make_option('--log-file',
action='store',
dest='log_file',
help='Log file destination'),
make_option('--log-std',
action='store_true',
dest='log_std',
help='Redirect stdout and stderr to the logging system'),
)
def msg_loop(self):
# enum_method = enum_git_repo
# pull_all_in_enumerable(enum_method)
if os.path.exists(self.options["file_path"]):
new_file_ufs_obj = UfsObj.objects.get_or_create(full_path=self.options["file_path"])
new_file_ufs_obj.tags = self.options["tags"]
Command = FileTagger
| import os
from optparse import make_option
from django.core.management import BaseCommand
from djangoautoconf.cmd_handler_base.msg_process_cmd_base import DjangoCmdBase
from obj_sys.models_ufs_obj import UfsObj
class FileTagger(DjangoCmdBase):
option_list = BaseCommand.option_list + (
make_option('--tags',
action='store',
dest='tags',
type='string',
help='Tags separated with ","'),
make_option('--file_path',
action='store',
dest='file_path',
type='string',
help='Path of the file to be tagged'),
make_option('--log-file',
action='store',
dest='log_file',
help='Log file destination'),
make_option('--log-std',
action='store_true',
dest='log_std',
help='Redirect stdout and stderr to the logging system'),
)
def msg_loop(self):
# enum_method = enum_git_repo
# pull_all_in_enumerable(enum_method)
if os.path.exists(self.options["file_path"]):
new_file_ufs_obj, is_created = UfsObj.objects.get_or_create(full_path=self.options["file_path"])
new_file_ufs_obj.tags = self.options["tags"]
Command = FileTagger
| Fix the issue that get_or_create returns a tuple instead of one object. | Fix the issue that get_or_create returns a tuple instead of one object.
| Python | bsd-3-clause | weijia/obj_sys,weijia/obj_sys | python | ## Code Before:
import os
from optparse import make_option
from django.core.management import BaseCommand
from djangoautoconf.cmd_handler_base.msg_process_cmd_base import DjangoCmdBase
from obj_sys.models_ufs_obj import UfsObj
class FileTagger(DjangoCmdBase):
option_list = BaseCommand.option_list + (
make_option('--tags',
action='store',
dest='tags',
type='string',
help='Tags separated with ","'),
make_option('--file_path',
action='store',
dest='file_path',
type='string',
help='Path of the file to be tagged'),
make_option('--log-file',
action='store',
dest='log_file',
help='Log file destination'),
make_option('--log-std',
action='store_true',
dest='log_std',
help='Redirect stdout and stderr to the logging system'),
)
def msg_loop(self):
# enum_method = enum_git_repo
# pull_all_in_enumerable(enum_method)
if os.path.exists(self.options["file_path"]):
new_file_ufs_obj = UfsObj.objects.get_or_create(full_path=self.options["file_path"])
new_file_ufs_obj.tags = self.options["tags"]
Command = FileTagger
## Instruction:
Fix the issue that get_or_create returns a tuple instead of one object.
## Code After:
import os
from optparse import make_option
from django.core.management import BaseCommand
from djangoautoconf.cmd_handler_base.msg_process_cmd_base import DjangoCmdBase
from obj_sys.models_ufs_obj import UfsObj
class FileTagger(DjangoCmdBase):
option_list = BaseCommand.option_list + (
make_option('--tags',
action='store',
dest='tags',
type='string',
help='Tags separated with ","'),
make_option('--file_path',
action='store',
dest='file_path',
type='string',
help='Path of the file to be tagged'),
make_option('--log-file',
action='store',
dest='log_file',
help='Log file destination'),
make_option('--log-std',
action='store_true',
dest='log_std',
help='Redirect stdout and stderr to the logging system'),
)
def msg_loop(self):
# enum_method = enum_git_repo
# pull_all_in_enumerable(enum_method)
if os.path.exists(self.options["file_path"]):
new_file_ufs_obj, is_created = UfsObj.objects.get_or_create(full_path=self.options["file_path"])
new_file_ufs_obj.tags = self.options["tags"]
Command = FileTagger
| import os
from optparse import make_option
from django.core.management import BaseCommand
from djangoautoconf.cmd_handler_base.msg_process_cmd_base import DjangoCmdBase
from obj_sys.models_ufs_obj import UfsObj
class FileTagger(DjangoCmdBase):
option_list = BaseCommand.option_list + (
make_option('--tags',
action='store',
dest='tags',
type='string',
help='Tags separated with ","'),
make_option('--file_path',
action='store',
dest='file_path',
type='string',
help='Path of the file to be tagged'),
make_option('--log-file',
action='store',
dest='log_file',
help='Log file destination'),
make_option('--log-std',
action='store_true',
dest='log_std',
help='Redirect stdout and stderr to the logging system'),
)
def msg_loop(self):
# enum_method = enum_git_repo
# pull_all_in_enumerable(enum_method)
if os.path.exists(self.options["file_path"]):
- new_file_ufs_obj = UfsObj.objects.get_or_create(full_path=self.options["file_path"])
+ new_file_ufs_obj, is_created = UfsObj.objects.get_or_create(full_path=self.options["file_path"])
? ++++++++++++
new_file_ufs_obj.tags = self.options["tags"]
Command = FileTagger | 2 | 0.05 | 1 | 1 |
87fc65d6820def0974b2f35437dc77c2da3f5957 | examples/index.php | examples/index.php | <?php
session_start();
require __DIR__.'/../vendor/autoload.php';
use \BW\Vkontakte as Vk;
$vk = new Vk([
'client_id' => '5759854',
'client_secret' => 'a556FovqtUBHArlXlAAO',
'redirect_uri' => 'http://localhost:8000',
]);
if (isset($_GET['code'])) {
$vk->authenticate($_GET['code']);
$_SESSION['access_token'] = $vk->getAccessToken();
header('Location: ' . $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']);
exit;
} else {
$accessToken = isset($_SESSION['access_token']) ? $_SESSION['access_token'] : null;
$vk->setAccessToken($accessToken);
}
$userId = $vk->getUserId();
var_dump($userId);
$users = $vk->api('users.get', [
'user_id' => '1',
'fields' => [
'photo_50',
'city',
'sex',
],
]);
var_dump($users);
?>
<br>
<a href="<?= $vk->getLoginUrl() ?>">
<?php if ($userId) : ?>
Re-authenticate
<?php else : ?>
Authenticate
<?php endif ?>
</a>
| <?php
session_start();
require __DIR__.'/../vendor/autoload.php';
use \BW\Vkontakte as Vk;
$vk = new Vk([
'client_id' => '5759854',
'client_secret' => 'a556FovqtUBHArlXlAAO',
'redirect_uri' => 'http://localhost:8000',
]);
if (isset($_GET['code'])) {
$vk->authenticate($_GET['code']);
$_SESSION['access_token'] = $vk->getAccessToken();
header('Location: '.'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']);
exit;
} else {
$accessToken = isset($_SESSION['access_token']) ? $_SESSION['access_token'] : null;
$vk->setAccessToken($accessToken);
}
$userId = $vk->getUserId();
var_dump($userId);
$users = $vk->api('users.get', [
'user_id' => '1',
'fields' => [
'photo_50',
'city',
'sex',
],
]);
var_dump($users);
?>
<br>
<a href="<?= $vk->getLoginUrl() ?>">
<?php if ($userId) : ?>
Re-authenticate
<?php else : ?>
Authenticate
<?php endif ?>
</a>
| Fix request scheme: REQUEST_SCHEME doesn't exist for PHP 7 built-in server | Fix request scheme: REQUEST_SCHEME doesn't exist for PHP 7 built-in server
| PHP | mit | bocharsky-bw/vkontakte-php-sdk | php | ## Code Before:
<?php
session_start();
require __DIR__.'/../vendor/autoload.php';
use \BW\Vkontakte as Vk;
$vk = new Vk([
'client_id' => '5759854',
'client_secret' => 'a556FovqtUBHArlXlAAO',
'redirect_uri' => 'http://localhost:8000',
]);
if (isset($_GET['code'])) {
$vk->authenticate($_GET['code']);
$_SESSION['access_token'] = $vk->getAccessToken();
header('Location: ' . $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']);
exit;
} else {
$accessToken = isset($_SESSION['access_token']) ? $_SESSION['access_token'] : null;
$vk->setAccessToken($accessToken);
}
$userId = $vk->getUserId();
var_dump($userId);
$users = $vk->api('users.get', [
'user_id' => '1',
'fields' => [
'photo_50',
'city',
'sex',
],
]);
var_dump($users);
?>
<br>
<a href="<?= $vk->getLoginUrl() ?>">
<?php if ($userId) : ?>
Re-authenticate
<?php else : ?>
Authenticate
<?php endif ?>
</a>
## Instruction:
Fix request scheme: REQUEST_SCHEME doesn't exist for PHP 7 built-in server
## Code After:
<?php
session_start();
require __DIR__.'/../vendor/autoload.php';
use \BW\Vkontakte as Vk;
$vk = new Vk([
'client_id' => '5759854',
'client_secret' => 'a556FovqtUBHArlXlAAO',
'redirect_uri' => 'http://localhost:8000',
]);
if (isset($_GET['code'])) {
$vk->authenticate($_GET['code']);
$_SESSION['access_token'] = $vk->getAccessToken();
header('Location: '.'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']);
exit;
} else {
$accessToken = isset($_SESSION['access_token']) ? $_SESSION['access_token'] : null;
$vk->setAccessToken($accessToken);
}
$userId = $vk->getUserId();
var_dump($userId);
$users = $vk->api('users.get', [
'user_id' => '1',
'fields' => [
'photo_50',
'city',
'sex',
],
]);
var_dump($users);
?>
<br>
<a href="<?= $vk->getLoginUrl() ?>">
<?php if ($userId) : ?>
Re-authenticate
<?php else : ?>
Authenticate
<?php endif ?>
</a>
| <?php
session_start();
require __DIR__.'/../vendor/autoload.php';
use \BW\Vkontakte as Vk;
$vk = new Vk([
'client_id' => '5759854',
'client_secret' => 'a556FovqtUBHArlXlAAO',
'redirect_uri' => 'http://localhost:8000',
]);
if (isset($_GET['code'])) {
$vk->authenticate($_GET['code']);
$_SESSION['access_token'] = $vk->getAccessToken();
- header('Location: ' . $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']);
? - ---------- ^^^^^^^^^^^^^^^^^^^^ - - - -
+ header('Location: '.'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']);
? ^^^^
exit;
} else {
$accessToken = isset($_SESSION['access_token']) ? $_SESSION['access_token'] : null;
$vk->setAccessToken($accessToken);
}
$userId = $vk->getUserId();
var_dump($userId);
$users = $vk->api('users.get', [
'user_id' => '1',
'fields' => [
'photo_50',
'city',
'sex',
],
]);
var_dump($users);
?>
<br>
<a href="<?= $vk->getLoginUrl() ?>">
<?php if ($userId) : ?>
Re-authenticate
<?php else : ?>
Authenticate
<?php endif ?>
</a> | 2 | 0.042553 | 1 | 1 |
d836455d890374406da531eb2e5f777320ba8539 | lib/rrj/rspec.rb | lib/rrj/rspec.rb |
require 'rrj/tools/gem/config'
# :reek:UtilityFunction
module RubyRabbitmqJanus
# # RRJRSpec
#
# Initializer to use with RSpec execution
class RRJRSpec < RRJTaskAdmin
def initialize
RubyRabbitmqJanus::Tools::Config.instance
end
def session_endpoint_public(_options)
yield(RubyRabbitmqJanus::Janus::Transactions::RSpec.new)
end
def handle_endpoint_public(_options)
transaction = RubyRabbitmqJanus::Janus::Transactions::RSpec.new
yield(transaction)
transaction.response
end
def admin_endpoint(_options)
yield(RubyRabbitmqJanus::Janus::Transactions::RSpec.new)
end
alias session_endpoint_private session_endpoint_public
alias handle_endpoint_private handle_endpoint_public
end
end
|
require 'rrj/tools/gem/config'
# :reek:UtilityFunction
module RubyRabbitmqJanus
# # RRJRSpec
#
# Initializer to use with RSpec execution
class RRJRSpec < RRJTaskAdmin
def initialize
RubyRabbitmqJanus::Tools::Config.instance
end
# @see RubyRabbitmqJanus::RRJ::session_endpoint_public
def session_endpoint_public(_options)
yield(RubyRabbitmqJanus::Janus::Transactions::RSpec.new)
end
# @see RubyRabbitmqJanus::RRJ::session_endpoint_private
def handle_endpoint_public(_options)
transaction = RubyRabbitmqJanus::Janus::Transactions::RSpec.new
yield(transaction)
transaction.response
end
# @see RubyRabbitmqJanus::RRJAdmin::admin_endpoint
def admin_endpoint(_options)
yield(RubyRabbitmqJanus::Janus::Transactions::RSpec.new)
end
alias session_endpoint_private session_endpoint_public
alias handle_endpoint_private handle_endpoint_public
end
end
| Add reference about similary medthods | Add reference about similary medthods
| Ruby | mit | dazzl-tv/ruby-rabbitmq-janus | ruby | ## Code Before:
require 'rrj/tools/gem/config'
# :reek:UtilityFunction
module RubyRabbitmqJanus
# # RRJRSpec
#
# Initializer to use with RSpec execution
class RRJRSpec < RRJTaskAdmin
def initialize
RubyRabbitmqJanus::Tools::Config.instance
end
def session_endpoint_public(_options)
yield(RubyRabbitmqJanus::Janus::Transactions::RSpec.new)
end
def handle_endpoint_public(_options)
transaction = RubyRabbitmqJanus::Janus::Transactions::RSpec.new
yield(transaction)
transaction.response
end
def admin_endpoint(_options)
yield(RubyRabbitmqJanus::Janus::Transactions::RSpec.new)
end
alias session_endpoint_private session_endpoint_public
alias handle_endpoint_private handle_endpoint_public
end
end
## Instruction:
Add reference about similary medthods
## Code After:
require 'rrj/tools/gem/config'
# :reek:UtilityFunction
module RubyRabbitmqJanus
# # RRJRSpec
#
# Initializer to use with RSpec execution
class RRJRSpec < RRJTaskAdmin
def initialize
RubyRabbitmqJanus::Tools::Config.instance
end
# @see RubyRabbitmqJanus::RRJ::session_endpoint_public
def session_endpoint_public(_options)
yield(RubyRabbitmqJanus::Janus::Transactions::RSpec.new)
end
# @see RubyRabbitmqJanus::RRJ::session_endpoint_private
def handle_endpoint_public(_options)
transaction = RubyRabbitmqJanus::Janus::Transactions::RSpec.new
yield(transaction)
transaction.response
end
# @see RubyRabbitmqJanus::RRJAdmin::admin_endpoint
def admin_endpoint(_options)
yield(RubyRabbitmqJanus::Janus::Transactions::RSpec.new)
end
alias session_endpoint_private session_endpoint_public
alias handle_endpoint_private handle_endpoint_public
end
end
|
require 'rrj/tools/gem/config'
# :reek:UtilityFunction
module RubyRabbitmqJanus
# # RRJRSpec
#
# Initializer to use with RSpec execution
class RRJRSpec < RRJTaskAdmin
def initialize
RubyRabbitmqJanus::Tools::Config.instance
end
+ # @see RubyRabbitmqJanus::RRJ::session_endpoint_public
def session_endpoint_public(_options)
yield(RubyRabbitmqJanus::Janus::Transactions::RSpec.new)
end
+ # @see RubyRabbitmqJanus::RRJ::session_endpoint_private
def handle_endpoint_public(_options)
transaction = RubyRabbitmqJanus::Janus::Transactions::RSpec.new
yield(transaction)
transaction.response
end
+ # @see RubyRabbitmqJanus::RRJAdmin::admin_endpoint
def admin_endpoint(_options)
yield(RubyRabbitmqJanus::Janus::Transactions::RSpec.new)
end
alias session_endpoint_private session_endpoint_public
alias handle_endpoint_private handle_endpoint_public
end
end | 3 | 0.09375 | 3 | 0 |
776c7a86607d2d28990f6877716bfea0bd61bc3c | src/main/java/com/telus/training/ex1/ClockNeedles.java | src/main/java/com/telus/training/ex1/ClockNeedles.java | package com.telus.training.ex1;
public class ClockNeedles {
public double calculateAngle(int hours, int minutes) {
double hoursAngle = hours*30;
double minutesAngle = minutes*6;
double angle = Math.abs(hoursAngle - minutesAngle);
if(angle > 180.0) angle = angle - 180.0;
return angle;
}
}
| package com.telus.training.ex1;
public class ClockNeedles {
public double calculateAngleBetween(int hours, int minutes) {
double hoursAngle = convertHoursToAngle(hours);
double minutesAngle = convertMinutesToAngle(minutes);
double angle = Math.abs(hoursAngle - minutesAngle);
return (angle > 180.0) ? (angle - 180.0) : angle;
}
private int convertMinutesToAngle(int minutes) {
if (minutes < 0 || minutes > 60) {
throw new IllegalArgumentException("Minutes must be between 0 and 60");
}
return minutes*6;
}
private int convertHoursToAngle(int hours) {
if(hours < 0 || hours > 12) {
throw new IllegalArgumentException("Hours must be between 0 and 12");
}
return hours*30;
}
}
| Add checks for hours and minutes | Add checks for hours and minutes
| Java | mit | tristanles/tdd-ex1-java | java | ## Code Before:
package com.telus.training.ex1;
public class ClockNeedles {
public double calculateAngle(int hours, int minutes) {
double hoursAngle = hours*30;
double minutesAngle = minutes*6;
double angle = Math.abs(hoursAngle - minutesAngle);
if(angle > 180.0) angle = angle - 180.0;
return angle;
}
}
## Instruction:
Add checks for hours and minutes
## Code After:
package com.telus.training.ex1;
public class ClockNeedles {
public double calculateAngleBetween(int hours, int minutes) {
double hoursAngle = convertHoursToAngle(hours);
double minutesAngle = convertMinutesToAngle(minutes);
double angle = Math.abs(hoursAngle - minutesAngle);
return (angle > 180.0) ? (angle - 180.0) : angle;
}
private int convertMinutesToAngle(int minutes) {
if (minutes < 0 || minutes > 60) {
throw new IllegalArgumentException("Minutes must be between 0 and 60");
}
return minutes*6;
}
private int convertHoursToAngle(int hours) {
if(hours < 0 || hours > 12) {
throw new IllegalArgumentException("Hours must be between 0 and 12");
}
return hours*30;
}
}
| package com.telus.training.ex1;
public class ClockNeedles {
- public double calculateAngle(int hours, int minutes) {
+ public double calculateAngleBetween(int hours, int minutes) {
? +++++++
- double hoursAngle = hours*30;
- double minutesAngle = minutes*6;
+ double hoursAngle = convertHoursToAngle(hours);
+ double minutesAngle = convertMinutesToAngle(minutes);
double angle = Math.abs(hoursAngle - minutesAngle);
- if(angle > 180.0) angle = angle - 180.0;
- return angle;
+ return (angle > 180.0) ? (angle - 180.0) : angle;
+ }
+
+ private int convertMinutesToAngle(int minutes) {
+ if (minutes < 0 || minutes > 60) {
+ throw new IllegalArgumentException("Minutes must be between 0 and 60");
+ }
+ return minutes*6;
+ }
+
+ private int convertHoursToAngle(int hours) {
+ if(hours < 0 || hours > 12) {
+ throw new IllegalArgumentException("Hours must be between 0 and 12");
+ }
+ return hours*30;
}
} | 23 | 1.769231 | 18 | 5 |
070a7541edd38e14e13fa607388a7c24a6c1d402 | _protected/app/system/core/classes/VisitorCore.php | _protected/app/system/core/classes/VisitorCore.php | <?php
/**
* @author Pierre-Henry Soria <[email protected]>
* @copyright (c) 2017-2019, Pierre-Henry Soria. All Rights Reserved.
* @license GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
* @package PH7 / App / System / Core / Class
*/
namespace PH7;
use stdClass;
class VisitorCore
{
/**
* @return void
*/
public function updateViews()
{
$oVisitorModel = new VisitorCoreModel(
$this->iProfileId,
$this->iVisitorId,
$this->dateTime->get()->dateTime('Y-m-d H:i:s')
);
if (!$oVisitorModel->already()) {
// Add a new visit
$oVisitorModel->set();
} else {
// Update the date of last visit
$oVisitorModel->update();
}
unset($oVisitorModel);
}
public function isViewUpdateEligible(
stdClass $oPrivacyViewsUser,
stdClass $oPrivacyViewsVisitor,
ProfileBaseController $oProfile
)
{
return $oPrivacyViewsUser->userSaveViews === PrivacyCore::YES &&
$oPrivacyViewsVisitor->userSaveViews === PrivacyCore::YES &&
!$oProfile->isOwnProfile();
}
}
| <?php
/**
* @author Pierre-Henry Soria <[email protected]>
* @copyright (c) 2017-2019, Pierre-Henry Soria. All Rights Reserved.
* @license GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
* @package PH7 / App / System / Core / Class
*/
namespace PH7;
use stdClass;
class VisitorCore
{
const DATETIME_FORMAT = 'Y-m-d H:i:s';
/**
* @return void
*/
public function updateViews()
{
$oVisitorModel = new VisitorCoreModel(
$this->iProfileId,
$this->iVisitorId,
$this->dateTime->get()->dateTime(self::DATETIME_FORMAT)
);
if (!$oVisitorModel->already()) {
// Add a new visit
$oVisitorModel->set();
} else {
// Update the date of last visit
$oVisitorModel->update();
}
unset($oVisitorModel);
}
public function isViewUpdateEligible(
stdClass $oPrivacyViewsUser,
stdClass $oPrivacyViewsVisitor,
ProfileBaseController $oProfile
)
{
return $oPrivacyViewsUser->userSaveViews === PrivacyCore::YES &&
$oPrivacyViewsVisitor->userSaveViews === PrivacyCore::YES &&
!$oProfile->isOwnProfile();
}
}
| Store `Y-m-d H:i:s` into a readable constant name | Store `Y-m-d H:i:s` into a readable constant name
| PHP | mit | pH7Software/pH7-Social-Dating-CMS,pH7Software/pH7-Social-Dating-CMS,pH7Software/pH7-Social-Dating-CMS,pH7Software/pH7-Social-Dating-CMS | php | ## Code Before:
<?php
/**
* @author Pierre-Henry Soria <[email protected]>
* @copyright (c) 2017-2019, Pierre-Henry Soria. All Rights Reserved.
* @license GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
* @package PH7 / App / System / Core / Class
*/
namespace PH7;
use stdClass;
class VisitorCore
{
/**
* @return void
*/
public function updateViews()
{
$oVisitorModel = new VisitorCoreModel(
$this->iProfileId,
$this->iVisitorId,
$this->dateTime->get()->dateTime('Y-m-d H:i:s')
);
if (!$oVisitorModel->already()) {
// Add a new visit
$oVisitorModel->set();
} else {
// Update the date of last visit
$oVisitorModel->update();
}
unset($oVisitorModel);
}
public function isViewUpdateEligible(
stdClass $oPrivacyViewsUser,
stdClass $oPrivacyViewsVisitor,
ProfileBaseController $oProfile
)
{
return $oPrivacyViewsUser->userSaveViews === PrivacyCore::YES &&
$oPrivacyViewsVisitor->userSaveViews === PrivacyCore::YES &&
!$oProfile->isOwnProfile();
}
}
## Instruction:
Store `Y-m-d H:i:s` into a readable constant name
## Code After:
<?php
/**
* @author Pierre-Henry Soria <[email protected]>
* @copyright (c) 2017-2019, Pierre-Henry Soria. All Rights Reserved.
* @license GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
* @package PH7 / App / System / Core / Class
*/
namespace PH7;
use stdClass;
class VisitorCore
{
const DATETIME_FORMAT = 'Y-m-d H:i:s';
/**
* @return void
*/
public function updateViews()
{
$oVisitorModel = new VisitorCoreModel(
$this->iProfileId,
$this->iVisitorId,
$this->dateTime->get()->dateTime(self::DATETIME_FORMAT)
);
if (!$oVisitorModel->already()) {
// Add a new visit
$oVisitorModel->set();
} else {
// Update the date of last visit
$oVisitorModel->update();
}
unset($oVisitorModel);
}
public function isViewUpdateEligible(
stdClass $oPrivacyViewsUser,
stdClass $oPrivacyViewsVisitor,
ProfileBaseController $oProfile
)
{
return $oPrivacyViewsUser->userSaveViews === PrivacyCore::YES &&
$oPrivacyViewsVisitor->userSaveViews === PrivacyCore::YES &&
!$oProfile->isOwnProfile();
}
}
| <?php
/**
* @author Pierre-Henry Soria <[email protected]>
* @copyright (c) 2017-2019, Pierre-Henry Soria. All Rights Reserved.
* @license GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
* @package PH7 / App / System / Core / Class
*/
namespace PH7;
use stdClass;
class VisitorCore
{
+ const DATETIME_FORMAT = 'Y-m-d H:i:s';
+
/**
* @return void
*/
public function updateViews()
{
$oVisitorModel = new VisitorCoreModel(
$this->iProfileId,
$this->iVisitorId,
- $this->dateTime->get()->dateTime('Y-m-d H:i:s')
? ^^^^^^^^ - ^^
+ $this->dateTime->get()->dateTime(self::DATETIME_FORMAT)
? ^^^^ ^^^^^^^^^^^^^^^
);
if (!$oVisitorModel->already()) {
// Add a new visit
$oVisitorModel->set();
} else {
// Update the date of last visit
$oVisitorModel->update();
}
unset($oVisitorModel);
}
public function isViewUpdateEligible(
stdClass $oPrivacyViewsUser,
stdClass $oPrivacyViewsVisitor,
ProfileBaseController $oProfile
)
{
return $oPrivacyViewsUser->userSaveViews === PrivacyCore::YES &&
$oPrivacyViewsVisitor->userSaveViews === PrivacyCore::YES &&
!$oProfile->isOwnProfile();
}
} | 4 | 0.086957 | 3 | 1 |
ce9aae297d5004700951948df69bab4a6f56280c | core/update_translations.sh | core/update_translations.sh |
cd $(dirname $0)
tx pull -l de,el_GR,es,hu_HU,pt,ro,ru,sr,zh_CN,vi,th_TH,fa,fr
translations="translations/bisq-desktop.displaystringsproperties"
i18n="src/main/resources/i18n"
mv "$translations/de.properties" "$i18n/displayStrings_de.properties"
mv "$translations/el_GR.properties" "$i18n/displayStrings_el.properties"
mv "$translations/es.properties" "$i18n/displayStrings_es.properties"
mv "$translations/hu_HU.properties" "$i18n/displayStrings_hu.properties"
mv "$translations/pt.properties" "$i18n/displayStrings_pt.properties"
mv "$translations/ro.properties" "$i18n/displayStrings_ro.properties"
mv "$translations/ru.properties" "$i18n/displayStrings_ru.properties"
mv "$translations/sr.properties" "$i18n/displayStrings_sr.properties"
mv "$translations/zh_CN.properties" "$i18n/displayStrings_zh.properties"
mv "$translations/vi.properties" "$i18n/displayStrings_vi.properties"
mv "$translations/th_TH.properties" "$i18n/displayStrings_th.properties"
mv "$translations/fa.properties" "$i18n/displayStrings_fa.properties"
mv "$translations/fr.properties" "$i18n/displayStrings_fr.properties"
rm -rf $translations
|
cd $(dirname $0)
tx pull -l de,el_GR,es,pt,ru,zh_CN,vi,th_TH,fa,fr
translations="translations/bisq-desktop.displaystringsproperties"
i18n="src/main/resources/i18n"
mv "$translations/de.properties" "$i18n/displayStrings_de.properties"
mv "$translations/el_GR.properties" "$i18n/displayStrings_el.properties"
mv "$translations/es.properties" "$i18n/displayStrings_es.properties"
mv "$translations/pt.properties" "$i18n/displayStrings_pt.properties"
mv "$translations/ru.properties" "$i18n/displayStrings_ru.properties"
mv "$translations/zh_CN.properties" "$i18n/displayStrings_zh.properties"
mv "$translations/vi.properties" "$i18n/displayStrings_vi.properties"
mv "$translations/th_TH.properties" "$i18n/displayStrings_th.properties"
mv "$translations/fa.properties" "$i18n/displayStrings_fa.properties"
mv "$translations/fr.properties" "$i18n/displayStrings_fr.properties"
rm -rf $translations
| Update transifex script with new core languages | Update transifex script with new core languages
| Shell | agpl-3.0 | bisq-network/exchange,bisq-network/exchange,bitsquare/bitsquare,bitsquare/bitsquare | shell | ## Code Before:
cd $(dirname $0)
tx pull -l de,el_GR,es,hu_HU,pt,ro,ru,sr,zh_CN,vi,th_TH,fa,fr
translations="translations/bisq-desktop.displaystringsproperties"
i18n="src/main/resources/i18n"
mv "$translations/de.properties" "$i18n/displayStrings_de.properties"
mv "$translations/el_GR.properties" "$i18n/displayStrings_el.properties"
mv "$translations/es.properties" "$i18n/displayStrings_es.properties"
mv "$translations/hu_HU.properties" "$i18n/displayStrings_hu.properties"
mv "$translations/pt.properties" "$i18n/displayStrings_pt.properties"
mv "$translations/ro.properties" "$i18n/displayStrings_ro.properties"
mv "$translations/ru.properties" "$i18n/displayStrings_ru.properties"
mv "$translations/sr.properties" "$i18n/displayStrings_sr.properties"
mv "$translations/zh_CN.properties" "$i18n/displayStrings_zh.properties"
mv "$translations/vi.properties" "$i18n/displayStrings_vi.properties"
mv "$translations/th_TH.properties" "$i18n/displayStrings_th.properties"
mv "$translations/fa.properties" "$i18n/displayStrings_fa.properties"
mv "$translations/fr.properties" "$i18n/displayStrings_fr.properties"
rm -rf $translations
## Instruction:
Update transifex script with new core languages
## Code After:
cd $(dirname $0)
tx pull -l de,el_GR,es,pt,ru,zh_CN,vi,th_TH,fa,fr
translations="translations/bisq-desktop.displaystringsproperties"
i18n="src/main/resources/i18n"
mv "$translations/de.properties" "$i18n/displayStrings_de.properties"
mv "$translations/el_GR.properties" "$i18n/displayStrings_el.properties"
mv "$translations/es.properties" "$i18n/displayStrings_es.properties"
mv "$translations/pt.properties" "$i18n/displayStrings_pt.properties"
mv "$translations/ru.properties" "$i18n/displayStrings_ru.properties"
mv "$translations/zh_CN.properties" "$i18n/displayStrings_zh.properties"
mv "$translations/vi.properties" "$i18n/displayStrings_vi.properties"
mv "$translations/th_TH.properties" "$i18n/displayStrings_th.properties"
mv "$translations/fa.properties" "$i18n/displayStrings_fa.properties"
mv "$translations/fr.properties" "$i18n/displayStrings_fr.properties"
rm -rf $translations
|
cd $(dirname $0)
- tx pull -l de,el_GR,es,hu_HU,pt,ro,ru,sr,zh_CN,vi,th_TH,fa,fr
? ------ --- ---
+ tx pull -l de,el_GR,es,pt,ru,zh_CN,vi,th_TH,fa,fr
translations="translations/bisq-desktop.displaystringsproperties"
i18n="src/main/resources/i18n"
mv "$translations/de.properties" "$i18n/displayStrings_de.properties"
mv "$translations/el_GR.properties" "$i18n/displayStrings_el.properties"
mv "$translations/es.properties" "$i18n/displayStrings_es.properties"
- mv "$translations/hu_HU.properties" "$i18n/displayStrings_hu.properties"
mv "$translations/pt.properties" "$i18n/displayStrings_pt.properties"
- mv "$translations/ro.properties" "$i18n/displayStrings_ro.properties"
mv "$translations/ru.properties" "$i18n/displayStrings_ru.properties"
- mv "$translations/sr.properties" "$i18n/displayStrings_sr.properties"
mv "$translations/zh_CN.properties" "$i18n/displayStrings_zh.properties"
mv "$translations/vi.properties" "$i18n/displayStrings_vi.properties"
mv "$translations/th_TH.properties" "$i18n/displayStrings_th.properties"
mv "$translations/fa.properties" "$i18n/displayStrings_fa.properties"
mv "$translations/fr.properties" "$i18n/displayStrings_fr.properties"
rm -rf $translations | 5 | 0.227273 | 1 | 4 |
3e730eb226cb32a699ae41351691d3507c9deef0 | README.md | README.md | README
======
What is symfony-installer?
--------------------------
symfony-installer is a Docker image to use [Symfony Installer](http://symfony.com/download)
Running symfony-installer
-------------------------
This is the same commands from Symfony Installer.
Just replace `symfony` with
`docker run --rm --interactive --tty --user $UID --volume $PWD:/code --workdir /code roukmoute/symfony-installer`
You have not needed to do a `self-update`, it is automatic.
Example
-------
Here is an exemple to create a new project called `blog`.
- Linux systems
In the current directory use:
```
docker run --rm -it -u $UID -v $PWD:/code -w /code roukmoute/symfony-installer new blog
```
- Windows systems
It only works with minimum version of Docker 1.12.
In settings of Docker, you have to share the correct drive before you
run the docker command:

Next you can do command like this:
```
docker run --rm -it -v C:\www:/code -w /code roukmoute/symfony-installer new blog
```
| README
======
What is symfony-installer?
--------------------------
symfony-installer is a Docker image to use [Symfony Installer](https://github.com/symfony/symfony-installer)
Running symfony-installer
-------------------------
This is the same commands from [Symfony Installer](https://github.com/symfony/symfony-installer).
Just replace `symfony` with
`docker run --rm --interactive --tty --user $UID --volume $PWD:/code --workdir /code roukmoute/symfony-installer`
You have not needed to do a `self-update`, it is automatic.
Example
-------
Here is an exemple to create a new project called `blog`.
- Linux systems
In the current directory use:
```
docker run --rm -it -u $UID -v $PWD:/code -w /code roukmoute/symfony-installer new blog
```
- Windows systems
It only works with minimum version of Docker 1.12.
In settings of Docker, you have to share the correct drive before you
run the docker command:

Next you can do command like this:
```
docker run --rm -it -v C:\www:/code -w /code roukmoute/symfony-installer new blog
```
| Update link of Symfony Installer | Update link of Symfony Installer
| Markdown | mit | roukmoute/symfony-installer | markdown | ## Code Before:
README
======
What is symfony-installer?
--------------------------
symfony-installer is a Docker image to use [Symfony Installer](http://symfony.com/download)
Running symfony-installer
-------------------------
This is the same commands from Symfony Installer.
Just replace `symfony` with
`docker run --rm --interactive --tty --user $UID --volume $PWD:/code --workdir /code roukmoute/symfony-installer`
You have not needed to do a `self-update`, it is automatic.
Example
-------
Here is an exemple to create a new project called `blog`.
- Linux systems
In the current directory use:
```
docker run --rm -it -u $UID -v $PWD:/code -w /code roukmoute/symfony-installer new blog
```
- Windows systems
It only works with minimum version of Docker 1.12.
In settings of Docker, you have to share the correct drive before you
run the docker command:

Next you can do command like this:
```
docker run --rm -it -v C:\www:/code -w /code roukmoute/symfony-installer new blog
```
## Instruction:
Update link of Symfony Installer
## Code After:
README
======
What is symfony-installer?
--------------------------
symfony-installer is a Docker image to use [Symfony Installer](https://github.com/symfony/symfony-installer)
Running symfony-installer
-------------------------
This is the same commands from [Symfony Installer](https://github.com/symfony/symfony-installer).
Just replace `symfony` with
`docker run --rm --interactive --tty --user $UID --volume $PWD:/code --workdir /code roukmoute/symfony-installer`
You have not needed to do a `self-update`, it is automatic.
Example
-------
Here is an exemple to create a new project called `blog`.
- Linux systems
In the current directory use:
```
docker run --rm -it -u $UID -v $PWD:/code -w /code roukmoute/symfony-installer new blog
```
- Windows systems
It only works with minimum version of Docker 1.12.
In settings of Docker, you have to share the correct drive before you
run the docker command:

Next you can do command like this:
```
docker run --rm -it -v C:\www:/code -w /code roukmoute/symfony-installer new blog
```
| README
======
What is symfony-installer?
--------------------------
- symfony-installer is a Docker image to use [Symfony Installer](http://symfony.com/download)
? ^^ ----- ^^^
+ symfony-installer is a Docker image to use [Symfony Installer](https://github.com/symfony/symfony-installer)
? + +++++++++++ ^^^^^ +++++++ ^^^
Running symfony-installer
-------------------------
- This is the same commands from Symfony Installer.
+ This is the same commands from [Symfony Installer](https://github.com/symfony/symfony-installer).
Just replace `symfony` with
`docker run --rm --interactive --tty --user $UID --volume $PWD:/code --workdir /code roukmoute/symfony-installer`
You have not needed to do a `self-update`, it is automatic.
Example
-------
Here is an exemple to create a new project called `blog`.
- Linux systems
In the current directory use:
```
docker run --rm -it -u $UID -v $PWD:/code -w /code roukmoute/symfony-installer new blog
```
- Windows systems
It only works with minimum version of Docker 1.12.
In settings of Docker, you have to share the correct drive before you
run the docker command:

Next you can do command like this:
```
docker run --rm -it -v C:\www:/code -w /code roukmoute/symfony-installer new blog
``` | 4 | 0.088889 | 2 | 2 |
cae45d4ea0b01b70d2c4579ea84391be5317e872 | geoconnect/apps/worldmap_layers/templates/metadata/unmatched_tabular_rows.html | geoconnect/apps/worldmap_layers/templates/metadata/unmatched_tabular_rows.html | <!-- START: Unmatched rows -->
<p>The tabular data below was <b>NOT</b> mapped.</p>
<br />Count: <b>{{ failed_records_list|length }} row{{ failed_records_list|pluralize }}</b>
</p>
<div class="row">
<div class="col-sm-12">
<table id="unmatched-tbl" class="table table-bordered table-hover table-striped table-condensed">
<thead>
<tr>
<th>Row #</th>
{% for col in attribute_data %}
<th>{{ col.name }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for single_row in failed_records_list %}
<tr>
<td>{{ forloop.counter }}</td>
{% for tbl_val in single_row %}
<td>{{ tbl_val }}</td>
{% endfor %}
</tr>
{% empty %}
<tr><td colspan="2">(No rows to display)</td></tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<!-- END: Unmatched rows -->
<script>
$( document ).ready(function() {
if ($("#unmatched-tbl").length>0){
$('#unmatched-tbl').DataTable( {
"info":false, // remove 'Showing 1 to n of n entries'
"scrollX": true, // "scrollY": 200,
"paging" : false,
"searching" : false
} );
}
});
</script>
| <!-- START: Unmatched rows -->
<p>The tabular data below was <b>NOT</b> mapped.</p>
<br />Count: <b>{{ failed_records_list|length }} row{{ failed_records_list|pluralize }}</b>
</p>
<div class="row">
<div class="col-sm-12">
<table id="unmatched-tbl" class="table table-bordered table-hover table-striped table-condensed small" width="100%">
<thead>
<tr>
<th>Row #</th>
{% for col in attribute_data %}
<th>{{ col.name }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for single_row in failed_records_list %}
<tr>
<td>{{ forloop.counter }}</td>
{% for tbl_val in single_row %}
<td>{{ tbl_val }}</td>
{% endfor %}
</tr>
{% empty %}
<tr><td colspan="2">(No rows to display)</td></tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<!-- END: Unmatched rows -->
<script>
$( document ).ready(function() {
if ($("#unmatched-tbl").length>0){
$("#unmatched-tbl").DataTable( {
"searching" : false,
"paging" : false,
"info":false,
"scrollX": true
} );
}
});
</script>
| Clean up layout of preview table in View Map Metadata popup. | Clean up layout of preview table in View Map Metadata popup.
| HTML | apache-2.0 | IQSS/geoconnect,IQSS/geoconnect,IQSS/geoconnect,IQSS/geoconnect | html | ## Code Before:
<!-- START: Unmatched rows -->
<p>The tabular data below was <b>NOT</b> mapped.</p>
<br />Count: <b>{{ failed_records_list|length }} row{{ failed_records_list|pluralize }}</b>
</p>
<div class="row">
<div class="col-sm-12">
<table id="unmatched-tbl" class="table table-bordered table-hover table-striped table-condensed">
<thead>
<tr>
<th>Row #</th>
{% for col in attribute_data %}
<th>{{ col.name }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for single_row in failed_records_list %}
<tr>
<td>{{ forloop.counter }}</td>
{% for tbl_val in single_row %}
<td>{{ tbl_val }}</td>
{% endfor %}
</tr>
{% empty %}
<tr><td colspan="2">(No rows to display)</td></tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<!-- END: Unmatched rows -->
<script>
$( document ).ready(function() {
if ($("#unmatched-tbl").length>0){
$('#unmatched-tbl').DataTable( {
"info":false, // remove 'Showing 1 to n of n entries'
"scrollX": true, // "scrollY": 200,
"paging" : false,
"searching" : false
} );
}
});
</script>
## Instruction:
Clean up layout of preview table in View Map Metadata popup.
## Code After:
<!-- START: Unmatched rows -->
<p>The tabular data below was <b>NOT</b> mapped.</p>
<br />Count: <b>{{ failed_records_list|length }} row{{ failed_records_list|pluralize }}</b>
</p>
<div class="row">
<div class="col-sm-12">
<table id="unmatched-tbl" class="table table-bordered table-hover table-striped table-condensed small" width="100%">
<thead>
<tr>
<th>Row #</th>
{% for col in attribute_data %}
<th>{{ col.name }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for single_row in failed_records_list %}
<tr>
<td>{{ forloop.counter }}</td>
{% for tbl_val in single_row %}
<td>{{ tbl_val }}</td>
{% endfor %}
</tr>
{% empty %}
<tr><td colspan="2">(No rows to display)</td></tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<!-- END: Unmatched rows -->
<script>
$( document ).ready(function() {
if ($("#unmatched-tbl").length>0){
$("#unmatched-tbl").DataTable( {
"searching" : false,
"paging" : false,
"info":false,
"scrollX": true
} );
}
});
</script>
| <!-- START: Unmatched rows -->
<p>The tabular data below was <b>NOT</b> mapped.</p>
<br />Count: <b>{{ failed_records_list|length }} row{{ failed_records_list|pluralize }}</b>
</p>
<div class="row">
<div class="col-sm-12">
- <table id="unmatched-tbl" class="table table-bordered table-hover table-striped table-condensed">
+ <table id="unmatched-tbl" class="table table-bordered table-hover table-striped table-condensed small" width="100%">
? +++++++++++++++++++
<thead>
<tr>
<th>Row #</th>
{% for col in attribute_data %}
<th>{{ col.name }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for single_row in failed_records_list %}
<tr>
<td>{{ forloop.counter }}</td>
{% for tbl_val in single_row %}
<td>{{ tbl_val }}</td>
{% endfor %}
</tr>
{% empty %}
<tr><td colspan="2">(No rows to display)</td></tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<!-- END: Unmatched rows -->
<script>
$( document ).ready(function() {
if ($("#unmatched-tbl").length>0){
-
- $('#unmatched-tbl').DataTable( {
? ^ ^
+ $("#unmatched-tbl").DataTable( {
? ^ ^
+ "searching" : false,
- "info":false, // remove 'Showing 1 to n of n entries'
- "scrollX": true, // "scrollY": 200,
"paging" : false,
- "searching" : false
? ------ ^ - -
+ "info":false,
? ^^ +
+ "scrollX": true
} );
}
});
</script> | 11 | 0.244444 | 5 | 6 |
d2a4be714df8cfa8d47410a173a980c44259348b | src/ie.js | src/ie.js | // Zepto.js
// (c) 2010-2013 Thomas Fuchs
// Zepto.js may be freely distributed under the MIT license.
;(function(){
// __proto__ doesn't exist on IE<11, so redefine
// the Z function to use object extension instead
if (!('__proto__' in {})) {
$.extend($.zepto, {
Z: function(dom, selector) {
dom = dom || []
$.extend(dom, $.fn)
dom.selector = selector || ''
return dom
}
})
}
// getComputedStyle shouldn't freak out when called
// without a valid element as argument
try {
getComputedStyle(undefined)
} catch(e) {
var nativeGetComputedStyle = getComputedStyle;
window.getComputedStyle = function(element){
try {
return nativeGetComputedStyle(element)
} catch(e) {
return null
}
}
}
})()
| // Zepto.js
// (c) 2010-2013 Thomas Fuchs
// Zepto.js may be freely distributed under the MIT license.
;(function(){
// __proto__ doesn't exist on IE<11, so redefine
// the Z function to use object extension instead
if (!('__proto__' in {})) {
$.extend($.zepto, {
Z: function(dom, selector){
dom = dom || []
$.extend(dom, $.fn)
dom.selector = selector || ''
dom.__Z = true
return dom
},
// this is a kludge but works
isZ: function(object){
return $.type(object) === 'array' && '__Z' in object
}
})
}
// getComputedStyle shouldn't freak out when called
// without a valid element as argument
try {
getComputedStyle(undefined)
} catch(e) {
var nativeGetComputedStyle = getComputedStyle;
window.getComputedStyle = function(element){
try {
return nativeGetComputedStyle(element)
} catch(e) {
return null
}
}
}
})()
| Implement $.zepto.isZ in IE support module | Implement $.zepto.isZ in IE support module
| JavaScript | mit | laispace/zepto,rayrc/zepto,huaziHear/zepto,mscienski/zepto,afgoulart/zepto,Genie77998/zepto,evilemon/zepto,baiyanghese/zepto,vincent1988/zepto,xuechunL/zepto,modulexcite/zepto,wushuyi/zepto,chenruixuan/zepto,fbiz/zepto,Jiasm/zepto,yuhualingfeng/zepto,alatvanas9/zepto,wanglam/zepto,Genie77998/zepto,treejames/zepto,SlaF/zepto,linqingyicen/zepto,yinchuandong/zepto,assgod/zepto,liuweifeng/zepto,Genie77998/zepto,zhengdai/zepto,SlaF/zepto,honeinc/zepto,zhengdai/zepto,clearwind/zepto,webcoding/zepto,Jiasm/zepto,linqingyicen/zepto,chenruixuan/zepto,leolin1229/zepto,leolin1229/zepto,webcoding/zepto,honeinc/zepto,zhengdai/zepto,zhangbg/zepto,modulexcite/zepto,vincent1988/zepto,pandoraui/zepto,wubian0517/zepto,zhangbg/zepto,xueduany/zepto,GerHobbelt/zepto,yubin-huang/zepto,nerdgore/zepto,kolf/zepto,mscienski/zepto,afgoulart/zepto,liyandalmllml/zepto,laispace/zepto,rayrc/zepto,xueduany/zepto,huaziHear/zepto,behind2/zepto,changfengliu/zepto,wushuyi/zepto,liyandalmllml/zepto,changfengliu/zepto,assgod/zepto,xueduany/zepto,yinchuandong/zepto,YongX/zepto,eric-seekas/zepto,waiter/zepto,alatvanas9/zepto,yuhualingfeng/zepto,clearwind/zepto,fbiz/zepto,chenruixuan/zepto,alatvanas9/zepto,yubin-huang/zepto,honeinc/zepto,dajbd/zepto,nerdgore/zepto,philip8728/zepto,JimmyVV/zepto,JimmyVV/zepto,huaziHear/zepto,midare/zepto,nerdgore/zepto,wyfyyy818818/zepto,midare/zepto,leolin1229/zepto,YongX/zepto,xuechunL/zepto,philip8728/zepto,behind2/zepto,linqingyicen/zepto,eric-seekas/zepto,wubian0517/zepto,treejames/zepto,fbiz/zepto,liyandalmllml/zepto,clearwind/zepto,evilemon/zepto,yubin-huang/zepto,pandoraui/zepto,vincent1988/zepto,mmcai/zepto,kolf/zepto,121595113/zepto,liuweifeng/zepto,121595113/zepto,mscienski/zepto,pandoraui/zepto,xuechunL/zepto,SallyRice/zepto,vivijiang/zepto,JimmyVV/zepto,eric-seekas/zepto,webcoding/zepto,noikiy/zepto,modulexcite/zepto,zhangwei001/zepto,vivijiang/zepto,SlaF/zepto,behind2/zepto,yinchuandong/zepto,GerHobbelt/zepto,vivijiang/zepto,mmcai/zepto,changfengliu/zepto,wanglam/zepto,evilemon/zepto,liuweifeng/zepto,zhangwei001/zepto,philip8728/zepto,noikiy/zepto,dajbd/zepto,assgod/zepto,GerHobbelt/zepto,wushuyi/zepto,dajbd/zepto,wyfyyy818818/zepto,waiter/zepto,baiyanghese/zepto,rayrc/zepto,wanglam/zepto,SallyRice/zepto,kolf/zepto,wyfyyy818818/zepto,noikiy/zepto,wubian0517/zepto,Jiasm/zepto,treejames/zepto,SallyRice/zepto,yuhualingfeng/zepto,zhangwei001/zepto,waiter/zepto,afgoulart/zepto,midare/zepto,mmcai/zepto,zhangbg/zepto,YongX/zepto | javascript | ## Code Before:
// Zepto.js
// (c) 2010-2013 Thomas Fuchs
// Zepto.js may be freely distributed under the MIT license.
;(function(){
// __proto__ doesn't exist on IE<11, so redefine
// the Z function to use object extension instead
if (!('__proto__' in {})) {
$.extend($.zepto, {
Z: function(dom, selector) {
dom = dom || []
$.extend(dom, $.fn)
dom.selector = selector || ''
return dom
}
})
}
// getComputedStyle shouldn't freak out when called
// without a valid element as argument
try {
getComputedStyle(undefined)
} catch(e) {
var nativeGetComputedStyle = getComputedStyle;
window.getComputedStyle = function(element){
try {
return nativeGetComputedStyle(element)
} catch(e) {
return null
}
}
}
})()
## Instruction:
Implement $.zepto.isZ in IE support module
## Code After:
// Zepto.js
// (c) 2010-2013 Thomas Fuchs
// Zepto.js may be freely distributed under the MIT license.
;(function(){
// __proto__ doesn't exist on IE<11, so redefine
// the Z function to use object extension instead
if (!('__proto__' in {})) {
$.extend($.zepto, {
Z: function(dom, selector){
dom = dom || []
$.extend(dom, $.fn)
dom.selector = selector || ''
dom.__Z = true
return dom
},
// this is a kludge but works
isZ: function(object){
return $.type(object) === 'array' && '__Z' in object
}
})
}
// getComputedStyle shouldn't freak out when called
// without a valid element as argument
try {
getComputedStyle(undefined)
} catch(e) {
var nativeGetComputedStyle = getComputedStyle;
window.getComputedStyle = function(element){
try {
return nativeGetComputedStyle(element)
} catch(e) {
return null
}
}
}
})()
| // Zepto.js
// (c) 2010-2013 Thomas Fuchs
// Zepto.js may be freely distributed under the MIT license.
;(function(){
// __proto__ doesn't exist on IE<11, so redefine
// the Z function to use object extension instead
if (!('__proto__' in {})) {
$.extend($.zepto, {
- Z: function(dom, selector) {
? -
+ Z: function(dom, selector){
dom = dom || []
$.extend(dom, $.fn)
dom.selector = selector || ''
+ dom.__Z = true
return dom
+ },
+ // this is a kludge but works
+ isZ: function(object){
+ return $.type(object) === 'array' && '__Z' in object
}
})
}
// getComputedStyle shouldn't freak out when called
// without a valid element as argument
try {
getComputedStyle(undefined)
} catch(e) {
var nativeGetComputedStyle = getComputedStyle;
window.getComputedStyle = function(element){
try {
return nativeGetComputedStyle(element)
} catch(e) {
return null
}
}
}
})() | 7 | 0.212121 | 6 | 1 |
2b3c8a3917e9a6972dcde10cc899b7fd4b5b8fe4 | .tmuxinator/dns.yml | .tmuxinator/dns.yml | name: dns
root: ~/
windows:
- dns: >
PORT=53
CNAMES=forever.dev:nginx.nginx.dev.docker
SELF=self
LOOP=dev
SERVERS='docker/127.0.0.1:5553,home/10.30.30.7:9753'
RESOLV=/etc/resolv.conf.upstream
BOGUS='193.234.222.38,199.101.28.20,64.94.110.11,67.215.65.130,67.215.65.132,92.242.140.21'
~/git/localdns/localdns
| name: dns
root: ~/
windows:
- dns: >
sudo capsh
--caps='cap_net_bind_service+iep cap_setpcap,cap_setuid,cap_setgid+ep'
--keep=1
--user=$(id -un)
--addamb=cap_net_bind_service
--print
--
-c 'exec env GOPATH=/opt/go/path/go1.9.5-nix PORT=53 CNAMES=forever.dev:nginx.nginx.dev.docker SELF=self LOOP=loop,vhost SERVERS=docker/127.0.0.1:5553,home/10.30.30.7:9753 RESOLV=/etc/resolv.conf.upstream BOGUS=193.234.222.38,199.101.28.20,64.94.110.11,67.215.65.130,67.215.65.132,92.242.140.21 DOCKER=docker DOCKERHTTP=localhost:9998 ~bhaskell/git/localdns/localdns'
| Fix `.tmuxinator` DNS to use `capsh` | Fix `.tmuxinator` DNS to use `capsh`
Not ideal, but it's working at this point.
| YAML | mit | benizi/dotfiles,benizi/dotfiles,benizi/dotfiles,benizi/dotfiles,benizi/dotfiles,benizi/dotfiles,benizi/dotfiles,benizi/dotfiles | yaml | ## Code Before:
name: dns
root: ~/
windows:
- dns: >
PORT=53
CNAMES=forever.dev:nginx.nginx.dev.docker
SELF=self
LOOP=dev
SERVERS='docker/127.0.0.1:5553,home/10.30.30.7:9753'
RESOLV=/etc/resolv.conf.upstream
BOGUS='193.234.222.38,199.101.28.20,64.94.110.11,67.215.65.130,67.215.65.132,92.242.140.21'
~/git/localdns/localdns
## Instruction:
Fix `.tmuxinator` DNS to use `capsh`
Not ideal, but it's working at this point.
## Code After:
name: dns
root: ~/
windows:
- dns: >
sudo capsh
--caps='cap_net_bind_service+iep cap_setpcap,cap_setuid,cap_setgid+ep'
--keep=1
--user=$(id -un)
--addamb=cap_net_bind_service
--print
--
-c 'exec env GOPATH=/opt/go/path/go1.9.5-nix PORT=53 CNAMES=forever.dev:nginx.nginx.dev.docker SELF=self LOOP=loop,vhost SERVERS=docker/127.0.0.1:5553,home/10.30.30.7:9753 RESOLV=/etc/resolv.conf.upstream BOGUS=193.234.222.38,199.101.28.20,64.94.110.11,67.215.65.130,67.215.65.132,92.242.140.21 DOCKER=docker DOCKERHTTP=localhost:9998 ~bhaskell/git/localdns/localdns'
| name: dns
root: ~/
windows:
- dns: >
- PORT=53
- CNAMES=forever.dev:nginx.nginx.dev.docker
- SELF=self
- LOOP=dev
- SERVERS='docker/127.0.0.1:5553,home/10.30.30.7:9753'
- RESOLV=/etc/resolv.conf.upstream
- BOGUS='193.234.222.38,199.101.28.20,64.94.110.11,67.215.65.130,67.215.65.132,92.242.140.21'
- ~/git/localdns/localdns
+ sudo capsh
+ --caps='cap_net_bind_service+iep cap_setpcap,cap_setuid,cap_setgid+ep'
+ --keep=1
+ --user=$(id -un)
+ --addamb=cap_net_bind_service
+ --print
+ --
+ -c 'exec env GOPATH=/opt/go/path/go1.9.5-nix PORT=53 CNAMES=forever.dev:nginx.nginx.dev.docker SELF=self LOOP=loop,vhost SERVERS=docker/127.0.0.1:5553,home/10.30.30.7:9753 RESOLV=/etc/resolv.conf.upstream BOGUS=193.234.222.38,199.101.28.20,64.94.110.11,67.215.65.130,67.215.65.132,92.242.140.21 DOCKER=docker DOCKERHTTP=localhost:9998 ~bhaskell/git/localdns/localdns' | 16 | 1.333333 | 8 | 8 |
619581fca6399ce2e624c16881785f8e21147911 | README.md | README.md | An example of automated JUnit testing, code analysis and deployment of a Java Spark application to Heroku, utilizing GitHub, Travis CI, and CodeClimate.
[](https://travis-ci.org/tarisatram/heroku-java-ci) [](https://codebeat.co/projects/github-com-tarisatram-heroku-java-ci)
| An example of automated JUnit testing, code analysis and deployment of a Java Spark application to Heroku, utilizing GitHub, Travis CI, and CodeClimate.
[](https://travis-ci.org/tarisatram/heroku-java-ci) [](https://www.codacy.com/app/taris-atram/heroku-java-ci?utm_source=github.com&utm_medium=referral&utm_content=tarisatram/heroku-java-ci&utm_campaign=Badge_Grade)
| Change from Codebeat to Codacy | Change from Codebeat to Codacy
| Markdown | mit | tarisatram/heroku-java-ci | markdown | ## Code Before:
An example of automated JUnit testing, code analysis and deployment of a Java Spark application to Heroku, utilizing GitHub, Travis CI, and CodeClimate.
[](https://travis-ci.org/tarisatram/heroku-java-ci) [](https://codebeat.co/projects/github-com-tarisatram-heroku-java-ci)
## Instruction:
Change from Codebeat to Codacy
## Code After:
An example of automated JUnit testing, code analysis and deployment of a Java Spark application to Heroku, utilizing GitHub, Travis CI, and CodeClimate.
[](https://travis-ci.org/tarisatram/heroku-java-ci) [](https://www.codacy.com/app/taris-atram/heroku-java-ci?utm_source=github.com&utm_medium=referral&utm_content=tarisatram/heroku-java-ci&utm_campaign=Badge_Grade)
| An example of automated JUnit testing, code analysis and deployment of a Java Spark application to Heroku, utilizing GitHub, Travis CI, and CodeClimate.
- [](https://travis-ci.org/tarisatram/heroku-java-ci) [](https://codebeat.co/projects/github-com-tarisatram-heroku-java-ci)
+ [](https://travis-ci.org/tarisatram/heroku-java-ci) [](https://www.codacy.com/app/taris-atram/heroku-java-ci?utm_source=github.com&utm_medium=referral&utm_content=tarisatram/heroku-java-ci&utm_campaign=Badge_Grade) | 2 | 0.666667 | 1 | 1 |
e99dc17223cc213962c98597527630fc9ce0fa70 | app/views/admin/editions/new.html.erb | app/views/admin/editions/new.html.erb | <% content_for :page_title, "New #{@edition.type.titleize}" %>
<% content_for :back_link, (render "govuk_publishing_components/components/back_link", {
href: admin_editions_path
})
%>
<% content_for :error_summary, render('shared/error_summary', object: @edition, parent_class: "edition", class_name: @edition.format_name) %>
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<%= render "govuk_publishing_components/components/title", {
title: "New #{@edition.format_name}"
} %>
<%= render "form", edition: @edition %>
</div>
</div>
| <% content_for :page_title, "New #{@edition.type.titleize}" %>
<% content_for :back_link, (render "govuk_publishing_components/components/back_link", {
href: admin_editions_path
})
%>
<% content_for :error_summary, render('shared/error_summary', object: @edition, parent_class: "edition", class_name: @edition.format_name) %>
<div class="govuk-grid-row">
<%= render "govuk_publishing_components/components/title", {
title: "New #{@edition.format_name}"
} %>
<%= render "components/secondary_navigation", {
aria_label: "Document navigation tabs",
items: secondary_navigation_tabs_items(@edition, request.path)
} %>
<div class="govuk-grid-column-two-thirds">
<%= render "form", edition: @edition %>
</div>
</div>
| Add secondary nav component to the new editions page | Add secondary nav component to the new editions page
| HTML+ERB | mit | alphagov/whitehall,alphagov/whitehall,alphagov/whitehall,alphagov/whitehall | html+erb | ## Code Before:
<% content_for :page_title, "New #{@edition.type.titleize}" %>
<% content_for :back_link, (render "govuk_publishing_components/components/back_link", {
href: admin_editions_path
})
%>
<% content_for :error_summary, render('shared/error_summary', object: @edition, parent_class: "edition", class_name: @edition.format_name) %>
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<%= render "govuk_publishing_components/components/title", {
title: "New #{@edition.format_name}"
} %>
<%= render "form", edition: @edition %>
</div>
</div>
## Instruction:
Add secondary nav component to the new editions page
## Code After:
<% content_for :page_title, "New #{@edition.type.titleize}" %>
<% content_for :back_link, (render "govuk_publishing_components/components/back_link", {
href: admin_editions_path
})
%>
<% content_for :error_summary, render('shared/error_summary', object: @edition, parent_class: "edition", class_name: @edition.format_name) %>
<div class="govuk-grid-row">
<%= render "govuk_publishing_components/components/title", {
title: "New #{@edition.format_name}"
} %>
<%= render "components/secondary_navigation", {
aria_label: "Document navigation tabs",
items: secondary_navigation_tabs_items(@edition, request.path)
} %>
<div class="govuk-grid-column-two-thirds">
<%= render "form", edition: @edition %>
</div>
</div>
| <% content_for :page_title, "New #{@edition.type.titleize}" %>
<% content_for :back_link, (render "govuk_publishing_components/components/back_link", {
href: admin_editions_path
})
%>
<% content_for :error_summary, render('shared/error_summary', object: @edition, parent_class: "edition", class_name: @edition.format_name) %>
<div class="govuk-grid-row">
+ <%= render "govuk_publishing_components/components/title", {
+ title: "New #{@edition.format_name}"
+ } %>
+
+ <%= render "components/secondary_navigation", {
+ aria_label: "Document navigation tabs",
+ items: secondary_navigation_tabs_items(@edition, request.path)
+ } %>
+
<div class="govuk-grid-column-two-thirds">
- <%= render "govuk_publishing_components/components/title", {
- title: "New #{@edition.format_name}"
- } %>
-
<%= render "form", edition: @edition %>
</div>
</div> | 13 | 0.8125 | 9 | 4 |
2a5d20dbbf525dd1f9e41fcf05c7291ca3f20861 | packages/nslu2-binary-only/nslu2-linksys-firmware_2.3r63.bb | packages/nslu2-binary-only/nslu2-linksys-firmware_2.3r63.bb | SECTION = "base"
PACKAGES = ""
LICENSE = "GPL"
INHIBIT_DEFAULT_DEPS = "1"
PR = "r2"
SRC_URI = "http://nslu.sf.net/downloads/${PN}-${PV}.tar.bz2"
S = "${WORKDIR}/${PN}-${PV}"
COMPATIBLE_MACHINE = "nslu2"
do_compile () {
install -d ${STAGING_LIBDIR}/nslu2-binaries
install -m 0755 ${S}/RedBoot ${STAGING_LIBDIR}/nslu2-binaries/
install -m 0755 ${S}/SysConf ${STAGING_LIBDIR}/nslu2-binaries/
install -m 0755 ${S}/vmlinuz ${STAGING_LIBDIR}/nslu2-binaries/
install -m 0755 ${S}/Trailer ${STAGING_LIBDIR}/nslu2-binaries/
}
| SECTION = "base"
PACKAGES = ""
LICENSE = "GPL"
INHIBIT_DEFAULT_DEPS = "1"
PR = "r3"
SRC_URI = "http://nslu.sf.net/downloads/${PN}-${PV}.tar.bz2"
S = "${WORKDIR}/${PN}-${PV}"
COMPATIBLE_MACHINE = "(nslu2|ixp4xx)"
do_compile () {
install -d ${STAGING_LIBDIR}/nslu2-binaries
install -m 0755 ${S}/RedBoot ${STAGING_LIBDIR}/nslu2-binaries/
install -m 0755 ${S}/SysConf ${STAGING_LIBDIR}/nslu2-binaries/
install -m 0755 ${S}/vmlinuz ${STAGING_LIBDIR}/nslu2-binaries/
install -m 0755 ${S}/Trailer ${STAGING_LIBDIR}/nslu2-binaries/
}
| Enable for ixp4xx machines too. | nslu2-linksys-firmware: Enable for ixp4xx machines too.
| BitBake | mit | scottellis/overo-oe,John-NY/overo-oe,crystalfontz/openembedded,libo/openembedded,BlackPole/bp-openembedded,BlackPole/bp-openembedded,scottellis/overo-oe,trini/openembedded,trini/openembedded,giobauermeister/openembedded,sampov2/audio-openembedded,philb/pbcl-oe-2010,bticino/openembedded,demsey/openenigma2,libo/openembedded,buglabs/oe-buglabs,buglabs/oe-buglabs,rascalmicro/openembedded-rascal,nx111/openembeded_openpli2.1_nx111,YtvwlD/od-oe,BlackPole/bp-openembedded,John-NY/overo-oe,JrCs/opendreambox,giobauermeister/openembedded,dave-billin/overo-ui-moos-auv,buglabs/oe-buglabs,dellysunnymtech/sakoman-oe,JamesAng/oe,rascalmicro/openembedded-rascal,popazerty/openembedded-cuberevo,xifengchuo/openembedded,nvl1109/openembeded,John-NY/overo-oe,nvl1109/openembeded,sledz/oe,dave-billin/overo-ui-moos-auv,libo/openembedded,JamesAng/goe,JrCs/opendreambox,KDAB/OpenEmbedded-Archos,giobauermeister/openembedded,demsey/openenigma2,nlebedenco/mini2440,John-NY/overo-oe,philb/pbcl-oe-2010,demsey/openenigma2,nvl1109/openembeded,thebohemian/openembedded,yyli/overo-oe,nzjrs/overo-openembedded,demsey/openenigma2,dave-billin/overo-ui-moos-auv,JrCs/opendreambox,nx111/openembeded_openpli2.1_nx111,JrCs/opendreambox,dellysunnymtech/sakoman-oe,sledz/oe,demsey/openenigma2,openembedded/openembedded,philb/pbcl-oe-2010,scottellis/overo-oe,rascalmicro/openembedded-rascal,mrchapp/arago-oe-dev,philb/pbcl-oe-2010,dellysunnymtech/sakoman-oe,rascalmicro/openembedded-rascal,scottellis/overo-oe,YtvwlD/od-oe,SIFTeam/openembedded,nlebedenco/mini2440,openembedded/openembedded,giobauermeister/openembedded,sutajiokousagi/openembedded,xifengchuo/openembedded,yyli/overo-oe,SIFTeam/openembedded,demsey/openembedded,YtvwlD/od-oe,Martix/Eonos,xifengchuo/openembedded,nx111/openembeded_openpli2.1_nx111,libo/openembedded,JamesAng/goe,giobauermeister/openembedded,sutajiokousagi/openembedded,openembedded/openembedded,troth/oe-ts7xxx,demsey/openembedded,scottellis/overo-oe,scottellis/overo-oe,xifengchuo/openembedded,Martix/Eonos,JamesAng/goe,popazerty/openembedded-cuberevo,Martix/Eonos,philb/pbcl-oe-2010,sledz/oe,SIFTeam/openembedded,sutajiokousagi/openembedded,nzjrs/overo-openembedded,dellysunnymtech/sakoman-oe,popazerty/openembedded-cuberevo,openembedded/openembedded,crystalfontz/openembedded,sentient-energy/emsw-oe-mirror,sampov2/audio-openembedded,xifengchuo/openembedded,Martix/Eonos,openpli-arm/openembedded,nlebedenco/mini2440,JamesAng/oe,openpli-arm/openembedded,openembedded/openembedded,crystalfontz/openembedded,nvl1109/openembeded,nlebedenco/mini2440,John-NY/overo-oe,KDAB/OpenEmbedded-Archos,yyli/overo-oe,openembedded/openembedded,nlebedenco/mini2440,buglabs/oe-buglabs,nx111/openembeded_openpli2.1_nx111,dave-billin/overo-ui-moos-auv,yyli/overo-oe,YtvwlD/od-oe,philb/pbcl-oe-2010,anguslees/openembedded-android,sampov2/audio-openembedded,thebohemian/openembedded,yyli/overo-oe,JrCs/opendreambox,anguslees/openembedded-android,KDAB/OpenEmbedded-Archos,YtvwlD/od-oe,JamesAng/oe,dellysunnymtech/sakoman-oe,demsey/openembedded,demsey/openenigma2,JamesAng/oe,openpli-arm/openembedded,scottellis/overo-oe,thebohemian/openembedded,dave-billin/overo-ui-moos-auv,rascalmicro/openembedded-rascal,Martix/Eonos,mrchapp/arago-oe-dev,mrchapp/arago-oe-dev,popazerty/openembedded-cuberevo,openembedded/openembedded,crystalfontz/openembedded,popazerty/openembedded-cuberevo,mrchapp/arago-oe-dev,sentient-energy/emsw-oe-mirror,dellysunnymtech/sakoman-oe,dellysunnymtech/sakoman-oe,thebohemian/openembedded,nzjrs/overo-openembedded,Martix/Eonos,thebohemian/openembedded,openpli-arm/openembedded,KDAB/OpenEmbedded-Archos,popazerty/openembedded-cuberevo,sentient-energy/emsw-oe-mirror,mrchapp/arago-oe-dev,JrCs/opendreambox,JamesAng/goe,SIFTeam/openembedded,bticino/openembedded,libo/openembedded,crystalfontz/openembedded,yyli/overo-oe,philb/pbcl-oe-2010,giobauermeister/openembedded,openpli-arm/openembedded,dellysunnymtech/sakoman-oe,yyli/overo-oe,sledz/oe,troth/oe-ts7xxx,sampov2/audio-openembedded,John-NY/overo-oe,sampov2/audio-openembedded,hulifox008/openembedded,SIFTeam/openembedded,JamesAng/goe,JrCs/opendreambox,openpli-arm/openembedded,YtvwlD/od-oe,xifengchuo/openembedded,rascalmicro/openembedded-rascal,demsey/openembedded,libo/openembedded,xifengchuo/openembedded,trini/openembedded,hulifox008/openembedded,sledz/oe,JamesAng/oe,nvl1109/openembeded,buglabs/oe-buglabs,JamesAng/oe,yyli/overo-oe,rascalmicro/openembedded-rascal,nzjrs/overo-openembedded,openpli-arm/openembedded,sentient-energy/emsw-oe-mirror,popazerty/openembedded-cuberevo,buglabs/oe-buglabs,JamesAng/goe,buglabs/oe-buglabs,nvl1109/openembeded,SIFTeam/openembedded,BlackPole/bp-openembedded,hulifox008/openembedded,troth/oe-ts7xxx,demsey/openembedded,xifengchuo/openembedded,dave-billin/overo-ui-moos-auv,giobauermeister/openembedded,crystalfontz/openembedded,mrchapp/arago-oe-dev,dave-billin/overo-ui-moos-auv,popazerty/openembedded-cuberevo,sampov2/audio-openembedded,anguslees/openembedded-android,KDAB/OpenEmbedded-Archos,nvl1109/openembeded,nzjrs/overo-openembedded,nx111/openembeded_openpli2.1_nx111,sledz/oe,nlebedenco/mini2440,giobauermeister/openembedded,sledz/oe,sutajiokousagi/openembedded,bticino/openembedded,trini/openembedded,JamesAng/oe,nzjrs/overo-openembedded,demsey/openembedded,hulifox008/openembedded,buglabs/oe-buglabs,thebohemian/openembedded,KDAB/OpenEmbedded-Archos,anguslees/openembedded-android,nx111/openembeded_openpli2.1_nx111,thebohemian/openembedded,anguslees/openembedded-android,sutajiokousagi/openembedded,troth/oe-ts7xxx,hulifox008/openembedded,sentient-energy/emsw-oe-mirror,trini/openembedded,JrCs/opendreambox,openembedded/openembedded,SIFTeam/openembedded,troth/oe-ts7xxx,anguslees/openembedded-android,hulifox008/openembedded,YtvwlD/od-oe,crystalfontz/openembedded,sentient-energy/emsw-oe-mirror,troth/oe-ts7xxx,bticino/openembedded,xifengchuo/openembedded,hulifox008/openembedded,openembedded/openembedded,sentient-energy/emsw-oe-mirror,dellysunnymtech/sakoman-oe,anguslees/openembedded-android,John-NY/overo-oe,demsey/openenigma2,BlackPole/bp-openembedded,JrCs/opendreambox,demsey/openembedded,Martix/Eonos,JamesAng/goe,nlebedenco/mini2440,nx111/openembeded_openpli2.1_nx111,sampov2/audio-openembedded,BlackPole/bp-openembedded,mrchapp/arago-oe-dev,bticino/openembedded,openembedded/openembedded,openembedded/openembedded,nx111/openembeded_openpli2.1_nx111,nzjrs/overo-openembedded,giobauermeister/openembedded,trini/openembedded,libo/openembedded,trini/openembedded,bticino/openembedded,sutajiokousagi/openembedded,YtvwlD/od-oe,KDAB/OpenEmbedded-Archos,bticino/openembedded,rascalmicro/openembedded-rascal,troth/oe-ts7xxx,sutajiokousagi/openembedded,BlackPole/bp-openembedded | bitbake | ## Code Before:
SECTION = "base"
PACKAGES = ""
LICENSE = "GPL"
INHIBIT_DEFAULT_DEPS = "1"
PR = "r2"
SRC_URI = "http://nslu.sf.net/downloads/${PN}-${PV}.tar.bz2"
S = "${WORKDIR}/${PN}-${PV}"
COMPATIBLE_MACHINE = "nslu2"
do_compile () {
install -d ${STAGING_LIBDIR}/nslu2-binaries
install -m 0755 ${S}/RedBoot ${STAGING_LIBDIR}/nslu2-binaries/
install -m 0755 ${S}/SysConf ${STAGING_LIBDIR}/nslu2-binaries/
install -m 0755 ${S}/vmlinuz ${STAGING_LIBDIR}/nslu2-binaries/
install -m 0755 ${S}/Trailer ${STAGING_LIBDIR}/nslu2-binaries/
}
## Instruction:
nslu2-linksys-firmware: Enable for ixp4xx machines too.
## Code After:
SECTION = "base"
PACKAGES = ""
LICENSE = "GPL"
INHIBIT_DEFAULT_DEPS = "1"
PR = "r3"
SRC_URI = "http://nslu.sf.net/downloads/${PN}-${PV}.tar.bz2"
S = "${WORKDIR}/${PN}-${PV}"
COMPATIBLE_MACHINE = "(nslu2|ixp4xx)"
do_compile () {
install -d ${STAGING_LIBDIR}/nslu2-binaries
install -m 0755 ${S}/RedBoot ${STAGING_LIBDIR}/nslu2-binaries/
install -m 0755 ${S}/SysConf ${STAGING_LIBDIR}/nslu2-binaries/
install -m 0755 ${S}/vmlinuz ${STAGING_LIBDIR}/nslu2-binaries/
install -m 0755 ${S}/Trailer ${STAGING_LIBDIR}/nslu2-binaries/
}
| SECTION = "base"
PACKAGES = ""
LICENSE = "GPL"
INHIBIT_DEFAULT_DEPS = "1"
- PR = "r2"
? ^
+ PR = "r3"
? ^
SRC_URI = "http://nslu.sf.net/downloads/${PN}-${PV}.tar.bz2"
S = "${WORKDIR}/${PN}-${PV}"
- COMPATIBLE_MACHINE = "nslu2"
+ COMPATIBLE_MACHINE = "(nslu2|ixp4xx)"
? + ++++++++
do_compile () {
install -d ${STAGING_LIBDIR}/nslu2-binaries
install -m 0755 ${S}/RedBoot ${STAGING_LIBDIR}/nslu2-binaries/
install -m 0755 ${S}/SysConf ${STAGING_LIBDIR}/nslu2-binaries/
install -m 0755 ${S}/vmlinuz ${STAGING_LIBDIR}/nslu2-binaries/
install -m 0755 ${S}/Trailer ${STAGING_LIBDIR}/nslu2-binaries/
} | 4 | 0.222222 | 2 | 2 |
62b92fa48eceebe0d427807cd684e580fed75ab5 | stylesheets/blue/components/_grid_cell.scss | stylesheets/blue/components/_grid_cell.scss | // GridCell
//
// Center its content and limits it to a threshold
//
// default - Aligns content to the left
// .GridCell--alignCenter - Centers the content
// .GridCell--alignRight - Aligns content to the right
//
// markup:
// <div class="GridCell {$modifiers}">
// <div class="GridCell-content">
// <div>Cell 1</div>
// <div>Cell 3</div>
// </div>
// </div>
//
// Styleguide 1.14
@import '../reset';
@import '../theme_vars';
.GridCell {
display: flex;
justify-content: flex-start;
width: 100%;
padding: 0 $Theme-spacing-small;
}
@include media('>=tablet') {
.GridCell {
padding: 0 $Theme-spacing-default;
}
.GridCell.GridCell--alignCenter {
justify-content: center;
}
.GridCell.GridCell--alignRight {
justify-content: flex-end;
}
}
.GridCell-content {
max-width: 565px;
width: 100%;
}
| // GridCell
//
// Center its content and limits it to a threshold
//
// default - Aligns content to the left
// .GridCell--alignCenter - Centers the content
// .GridCell--alignRight - Aligns content to the right
//
// markup:
// <div class="GridCell {$modifiers}">
// <div class="GridCell-content">
// <div>Cell 1</div>
// <div>Cell 3</div>
// </div>
// </div>
//
// Styleguide 1.14
@import '../reset';
@import '../theme_vars';
.GridCell {
display: flex;
justify-content: flex-start;
width: 100%;
padding: 0 $Theme-spacing-small;
}
@include media('>=tablet') {
.GridCell {
padding: 0 $Theme-spacing-default;
}
.GridCell.GridCell--alignCenter {
justify-content: center;
}
.GridCell.GridCell--alignRight {
justify-content: flex-end;
}
}
.GridCell-content {
width: 100%;
max-width: 600px;
}
| Change the max-width to the one required by the designs | Change the max-width to the one required by the designs
Could not find a good reason to have this weird number as a max width
| SCSS | mit | subvisual/blue,subvisual/blue | scss | ## Code Before:
// GridCell
//
// Center its content and limits it to a threshold
//
// default - Aligns content to the left
// .GridCell--alignCenter - Centers the content
// .GridCell--alignRight - Aligns content to the right
//
// markup:
// <div class="GridCell {$modifiers}">
// <div class="GridCell-content">
// <div>Cell 1</div>
// <div>Cell 3</div>
// </div>
// </div>
//
// Styleguide 1.14
@import '../reset';
@import '../theme_vars';
.GridCell {
display: flex;
justify-content: flex-start;
width: 100%;
padding: 0 $Theme-spacing-small;
}
@include media('>=tablet') {
.GridCell {
padding: 0 $Theme-spacing-default;
}
.GridCell.GridCell--alignCenter {
justify-content: center;
}
.GridCell.GridCell--alignRight {
justify-content: flex-end;
}
}
.GridCell-content {
max-width: 565px;
width: 100%;
}
## Instruction:
Change the max-width to the one required by the designs
Could not find a good reason to have this weird number as a max width
## Code After:
// GridCell
//
// Center its content and limits it to a threshold
//
// default - Aligns content to the left
// .GridCell--alignCenter - Centers the content
// .GridCell--alignRight - Aligns content to the right
//
// markup:
// <div class="GridCell {$modifiers}">
// <div class="GridCell-content">
// <div>Cell 1</div>
// <div>Cell 3</div>
// </div>
// </div>
//
// Styleguide 1.14
@import '../reset';
@import '../theme_vars';
.GridCell {
display: flex;
justify-content: flex-start;
width: 100%;
padding: 0 $Theme-spacing-small;
}
@include media('>=tablet') {
.GridCell {
padding: 0 $Theme-spacing-default;
}
.GridCell.GridCell--alignCenter {
justify-content: center;
}
.GridCell.GridCell--alignRight {
justify-content: flex-end;
}
}
.GridCell-content {
width: 100%;
max-width: 600px;
}
| // GridCell
//
// Center its content and limits it to a threshold
//
// default - Aligns content to the left
// .GridCell--alignCenter - Centers the content
// .GridCell--alignRight - Aligns content to the right
//
// markup:
// <div class="GridCell {$modifiers}">
// <div class="GridCell-content">
// <div>Cell 1</div>
// <div>Cell 3</div>
// </div>
// </div>
//
// Styleguide 1.14
@import '../reset';
@import '../theme_vars';
.GridCell {
display: flex;
justify-content: flex-start;
width: 100%;
padding: 0 $Theme-spacing-small;
}
@include media('>=tablet') {
.GridCell {
padding: 0 $Theme-spacing-default;
}
.GridCell.GridCell--alignCenter {
justify-content: center;
}
.GridCell.GridCell--alignRight {
justify-content: flex-end;
}
}
.GridCell-content {
- max-width: 565px;
width: 100%;
+ max-width: 600px;
} | 2 | 0.042553 | 1 | 1 |
7e5d8eb0d6eabb427d7e9bd02bac3ee7b90d228d | src/config.py | src/config.py |
import urllib
import urllib.request
proxies = [
False,
False
] |
import urllib
import urllib.request
from pprint import pprint
proxies = [
'',
''
]
_tested_proxies = False
def test_proxies():
global _tested_proxies
if _tested_proxies:
return
_tested_proxies = {}
def _testproxy(proxyid):
if proxyid=='':
return True
if _tested_proxies.get(proxyid) is not None:
return _tested_proxies.get(proxyid)
print("Pretesting proxy",proxyid)
proxy = urllib.request.ProxyHandler( {'http': proxyid , 'https': proxyid } )
opener = urllib.request.build_opener(proxy)
#urllib.request.install_opener(opener)
try:
opened = opener.open('http://example.com')
if not opened:
_tested_proxies[proxyid] = False
return False
assert(opened.read().find(b"Example Domain")>-1)
except urllib.error.URLError as e:
try:
opened = opener.open('http://google.com')
if not opened:
_tested_proxies[proxyid] = False
return False
except urllib.error.URLError as e:
print("Proxy error",proxyid,e)
_tested_proxies[proxyid] = False
return False
_tested_proxies[proxyid] = True
return True
proxies[:] = [tup for tup in proxies if _testproxy(tup)]
_tested_proxies = True
| Test proxies before using them. | Test proxies before using them.
| Python | mit | koivunen/whoisabusetool | python | ## Code Before:
import urllib
import urllib.request
proxies = [
False,
False
]
## Instruction:
Test proxies before using them.
## Code After:
import urllib
import urllib.request
from pprint import pprint
proxies = [
'',
''
]
_tested_proxies = False
def test_proxies():
global _tested_proxies
if _tested_proxies:
return
_tested_proxies = {}
def _testproxy(proxyid):
if proxyid=='':
return True
if _tested_proxies.get(proxyid) is not None:
return _tested_proxies.get(proxyid)
print("Pretesting proxy",proxyid)
proxy = urllib.request.ProxyHandler( {'http': proxyid , 'https': proxyid } )
opener = urllib.request.build_opener(proxy)
#urllib.request.install_opener(opener)
try:
opened = opener.open('http://example.com')
if not opened:
_tested_proxies[proxyid] = False
return False
assert(opened.read().find(b"Example Domain")>-1)
except urllib.error.URLError as e:
try:
opened = opener.open('http://google.com')
if not opened:
_tested_proxies[proxyid] = False
return False
except urllib.error.URLError as e:
print("Proxy error",proxyid,e)
_tested_proxies[proxyid] = False
return False
_tested_proxies[proxyid] = True
return True
proxies[:] = [tup for tup in proxies if _testproxy(tup)]
_tested_proxies = True
|
import urllib
import urllib.request
+ from pprint import pprint
+ proxies = [
+ '',
+ ''
+ ]
- proxies = [
- False,
- False
- ]
+
+ _tested_proxies = False
+ def test_proxies():
+ global _tested_proxies
+
+ if _tested_proxies:
+ return
+
+ _tested_proxies = {}
+
+ def _testproxy(proxyid):
+ if proxyid=='':
+ return True
+
+ if _tested_proxies.get(proxyid) is not None:
+ return _tested_proxies.get(proxyid)
+
+ print("Pretesting proxy",proxyid)
+ proxy = urllib.request.ProxyHandler( {'http': proxyid , 'https': proxyid } )
+ opener = urllib.request.build_opener(proxy)
+ #urllib.request.install_opener(opener)
+ try:
+ opened = opener.open('http://example.com')
+ if not opened:
+ _tested_proxies[proxyid] = False
+ return False
+ assert(opened.read().find(b"Example Domain")>-1)
+
+ except urllib.error.URLError as e:
+ try:
+ opened = opener.open('http://google.com')
+ if not opened:
+ _tested_proxies[proxyid] = False
+ return False
+
+ except urllib.error.URLError as e:
+ print("Proxy error",proxyid,e)
+ _tested_proxies[proxyid] = False
+ return False
+
+ _tested_proxies[proxyid] = True
+ return True
+
+ proxies[:] = [tup for tup in proxies if _testproxy(tup)]
+
+ _tested_proxies = True
+ | 56 | 7 | 52 | 4 |
dea6978cadec646f8942e426a475698165ebd306 | modules/core/client/controllers/header.client.controller.js | modules/core/client/controllers/header.client.controller.js | 'use strict';
angular.module('core').controller('HeaderController', ['$scope', '$state', 'Authentication', 'Menus',
function ($scope, $state, Authentication, Menus) {
// Expose view variables
$scope.$state = $state;
$scope.authentication = Authentication;
// Get the topbar menu
$scope.menu = document.getElementById("side-menu");
// Toggle the menu items
$scope.isCollapsed = false;
$scope.toggleCollapsibleMenu = function () {
$scope.isCollapsed = !$scope.isCollapsed;
};
// Collapsing the menu after navigation
$scope.$on('$stateChangeSuccess', function () {
$scope.isCollapsed = false;
});
$scope.toggleMenu = function() {
if ($scope.menu.style.left === "-200px") {
$scope.menu.style.left = "0px";
} else {
$scope.menu.style.left = "-200px";
}
};
$scope.closeMenu = function() {
$scope.menu.style.left = "-200px";
}
}
]);
| 'use strict';
angular.module('core').controller('HeaderController', ['$scope', '$state', 'Authentication', 'Menus',
function ($scope, $state, Authentication, Menus) {
// Expose view variables
$scope.$state = $state;
$scope.authentication = Authentication;
// Get the topbar menu
$scope.menu = document.getElementById('side-menu');
// Toggle the menu items
$scope.isCollapsed = false;
$scope.toggleCollapsibleMenu = function () {
$scope.isCollapsed = !$scope.isCollapsed;
};
// Collapsing the menu after navigation
$scope.$on('$stateChangeSuccess', function () {
$scope.isCollapsed = false;
});
$scope.toggleMenu = function() {
if ($scope.menu.style.left === '-200px') {
$scope.menu.style.left = '0px';
} else {
$scope.menu.style.left = '-200px';
}
};
$scope.closeMenu = function() {
$scope.menu.style.left = '-200px';
};
}
]);
| Fix some grunt / linting issues | Fix some grunt / linting issues
| JavaScript | mit | CEN3031GroupA/US-Hackathon,CEN3031GroupA/US-Hackathon,CEN3031GroupA/US-Hackathon | javascript | ## Code Before:
'use strict';
angular.module('core').controller('HeaderController', ['$scope', '$state', 'Authentication', 'Menus',
function ($scope, $state, Authentication, Menus) {
// Expose view variables
$scope.$state = $state;
$scope.authentication = Authentication;
// Get the topbar menu
$scope.menu = document.getElementById("side-menu");
// Toggle the menu items
$scope.isCollapsed = false;
$scope.toggleCollapsibleMenu = function () {
$scope.isCollapsed = !$scope.isCollapsed;
};
// Collapsing the menu after navigation
$scope.$on('$stateChangeSuccess', function () {
$scope.isCollapsed = false;
});
$scope.toggleMenu = function() {
if ($scope.menu.style.left === "-200px") {
$scope.menu.style.left = "0px";
} else {
$scope.menu.style.left = "-200px";
}
};
$scope.closeMenu = function() {
$scope.menu.style.left = "-200px";
}
}
]);
## Instruction:
Fix some grunt / linting issues
## Code After:
'use strict';
angular.module('core').controller('HeaderController', ['$scope', '$state', 'Authentication', 'Menus',
function ($scope, $state, Authentication, Menus) {
// Expose view variables
$scope.$state = $state;
$scope.authentication = Authentication;
// Get the topbar menu
$scope.menu = document.getElementById('side-menu');
// Toggle the menu items
$scope.isCollapsed = false;
$scope.toggleCollapsibleMenu = function () {
$scope.isCollapsed = !$scope.isCollapsed;
};
// Collapsing the menu after navigation
$scope.$on('$stateChangeSuccess', function () {
$scope.isCollapsed = false;
});
$scope.toggleMenu = function() {
if ($scope.menu.style.left === '-200px') {
$scope.menu.style.left = '0px';
} else {
$scope.menu.style.left = '-200px';
}
};
$scope.closeMenu = function() {
$scope.menu.style.left = '-200px';
};
}
]);
| 'use strict';
angular.module('core').controller('HeaderController', ['$scope', '$state', 'Authentication', 'Menus',
function ($scope, $state, Authentication, Menus) {
// Expose view variables
$scope.$state = $state;
$scope.authentication = Authentication;
// Get the topbar menu
- $scope.menu = document.getElementById("side-menu");
? ^ ^
+ $scope.menu = document.getElementById('side-menu');
? ^ ^
// Toggle the menu items
$scope.isCollapsed = false;
$scope.toggleCollapsibleMenu = function () {
$scope.isCollapsed = !$scope.isCollapsed;
};
// Collapsing the menu after navigation
$scope.$on('$stateChangeSuccess', function () {
$scope.isCollapsed = false;
});
$scope.toggleMenu = function() {
- if ($scope.menu.style.left === "-200px") {
? -- ^ ^
+ if ($scope.menu.style.left === '-200px') {
? ^ ^
- $scope.menu.style.left = "0px";
? ---- ^ ^
+ $scope.menu.style.left = '0px';
? ^ ^
- } else {
? --
+ } else {
- $scope.menu.style.left = "-200px";
? ---- ^ ^
+ $scope.menu.style.left = '-200px';
? ^ ^
- }
? --
+ }
};
$scope.closeMenu = function() {
- $scope.menu.style.left = "-200px";
? ^ ^
+ $scope.menu.style.left = '-200px';
? ^ ^
- }
+ };
? +
}
]); | 16 | 0.457143 | 8 | 8 |
b2f60b739ae730db502f7a33af185c58a6b7580e | roles/haskell/tasks/main.yml | roles/haskell/tasks/main.yml | ---
- name: Enable GCC
homebrew: name=gcc state=linked
- name: Install Haskell Platform
homebrew: name=haskell-platform state=installed
- name: Update cabal
shell: 'cabal update'
tags: update
- name: Install packages
shell: 'cabal install {{ dotfiles.haskell.packages | join(" ")}}'
- name: Link dotfiles
file: src={{ item }} dest=~/.{{ item | basename }} state=link
with_fileglob:
- ./*
| ---
- name: Install Haskell packages
homebrew: name={{ item }} state=latest
with_items:
- cabal-install
- gcc
- ghc
- name: Update cabal
shell: 'cabal update'
tags: update
- name: Install packages
shell: 'cabal install {{ dotfiles.haskell.packages | join(" ")}}'
- name: Link dotfiles
file: src={{ item }} dest=~/.{{ item | basename }} state=link
with_fileglob:
- ./*
| Replace haskell-platform with cabal-install and ghc | Replace haskell-platform with cabal-install and ghc
| YAML | mit | jcf/ansible-dotfiles,jcf/ansible-dotfiles,jcf/ansible-dotfiles,jcf/ansible-dotfiles,jcf/ansible-dotfiles | yaml | ## Code Before:
---
- name: Enable GCC
homebrew: name=gcc state=linked
- name: Install Haskell Platform
homebrew: name=haskell-platform state=installed
- name: Update cabal
shell: 'cabal update'
tags: update
- name: Install packages
shell: 'cabal install {{ dotfiles.haskell.packages | join(" ")}}'
- name: Link dotfiles
file: src={{ item }} dest=~/.{{ item | basename }} state=link
with_fileglob:
- ./*
## Instruction:
Replace haskell-platform with cabal-install and ghc
## Code After:
---
- name: Install Haskell packages
homebrew: name={{ item }} state=latest
with_items:
- cabal-install
- gcc
- ghc
- name: Update cabal
shell: 'cabal update'
tags: update
- name: Install packages
shell: 'cabal install {{ dotfiles.haskell.packages | join(" ")}}'
- name: Link dotfiles
file: src={{ item }} dest=~/.{{ item | basename }} state=link
with_fileglob:
- ./*
| ---
- - name: Enable GCC
- homebrew: name=gcc state=linked
-
- - name: Install Haskell Platform
? ^^ ^^^^^
+ - name: Install Haskell packages
? ^ ^^^^^^
- homebrew: name=haskell-platform state=installed
+ homebrew: name={{ item }} state=latest
+ with_items:
+ - cabal-install
+ - gcc
+ - ghc
- name: Update cabal
shell: 'cabal update'
tags: update
- name: Install packages
shell: 'cabal install {{ dotfiles.haskell.packages | join(" ")}}'
- name: Link dotfiles
file: src={{ item }} dest=~/.{{ item | basename }} state=link
with_fileglob:
- ./* | 11 | 0.611111 | 6 | 5 |
c51ad6b0efe09473b9796774ebedf04cef03cbb0 | README.md | README.md |
[](LICENSE.md)
Easy access control for PHP
> This library is currently under development. Things will change. Things will break.
## Install
Via Composer
``` bash
$ composer require jpkleemans/firewall:dev-master
```
## Usage
``` php
use Firewall\Adapter\HtaccessAdapter;
use Firewall\Host\IP;
// Create an instance of an adapter that implements the Firewall interface.
$firewall = new HtaccessAdapter('path/to/.htaccess');
// Create an instance of a class that implements the Host interface.
$host = IP::fromString('123.0.0.1');
// Block the host
$firewall->block($host);
```
## Planned Adapters
- Htaccess
- NGINX
- IIS
- PSR-7 Middleware
## Testing
``` bash
$ phpspec run
```
|
[](LICENSE.md)
Easy access control for PHP
> This library is currently under development. Things will change. Things will break.
## Install
Via Composer
``` bash
$ composer require jpkleemans/firewall:dev-master
```
## Usage
``` php
use Firewall\Adapter\HtaccessAdapter;
use Firewall\Host\IP;
// Create an instance of an adapter that implements the Firewall interface.
$firewall = new HtaccessAdapter('path/to/.htaccess');
// Create an instance of a class that implements the Host interface.
$host = IP::fromString('123.0.0.1');
// Block the host
$firewall->block($host);
```
## Planned Adapters
- Htaccess
- NGINX
- IIS
- HHVM
- lighttpd
- PSR-7 Middleware
## Testing
``` bash
$ phpspec run
```
| Add HHVM and lighttpd to Planned Adapters | Add HHVM and lighttpd to Planned Adapters | Markdown | mit | jpkleemans/firewall | markdown | ## Code Before:
[](LICENSE.md)
Easy access control for PHP
> This library is currently under development. Things will change. Things will break.
## Install
Via Composer
``` bash
$ composer require jpkleemans/firewall:dev-master
```
## Usage
``` php
use Firewall\Adapter\HtaccessAdapter;
use Firewall\Host\IP;
// Create an instance of an adapter that implements the Firewall interface.
$firewall = new HtaccessAdapter('path/to/.htaccess');
// Create an instance of a class that implements the Host interface.
$host = IP::fromString('123.0.0.1');
// Block the host
$firewall->block($host);
```
## Planned Adapters
- Htaccess
- NGINX
- IIS
- PSR-7 Middleware
## Testing
``` bash
$ phpspec run
```
## Instruction:
Add HHVM and lighttpd to Planned Adapters
## Code After:
[](LICENSE.md)
Easy access control for PHP
> This library is currently under development. Things will change. Things will break.
## Install
Via Composer
``` bash
$ composer require jpkleemans/firewall:dev-master
```
## Usage
``` php
use Firewall\Adapter\HtaccessAdapter;
use Firewall\Host\IP;
// Create an instance of an adapter that implements the Firewall interface.
$firewall = new HtaccessAdapter('path/to/.htaccess');
// Create an instance of a class that implements the Host interface.
$host = IP::fromString('123.0.0.1');
// Block the host
$firewall->block($host);
```
## Planned Adapters
- Htaccess
- NGINX
- IIS
- HHVM
- lighttpd
- PSR-7 Middleware
## Testing
``` bash
$ phpspec run
```
|
[](LICENSE.md)
Easy access control for PHP
> This library is currently under development. Things will change. Things will break.
## Install
Via Composer
``` bash
$ composer require jpkleemans/firewall:dev-master
```
## Usage
``` php
use Firewall\Adapter\HtaccessAdapter;
use Firewall\Host\IP;
// Create an instance of an adapter that implements the Firewall interface.
$firewall = new HtaccessAdapter('path/to/.htaccess');
// Create an instance of a class that implements the Host interface.
$host = IP::fromString('123.0.0.1');
// Block the host
$firewall->block($host);
```
## Planned Adapters
- Htaccess
- NGINX
- IIS
+ - HHVM
+ - lighttpd
- PSR-7 Middleware
## Testing
``` bash
$ phpspec run
``` | 2 | 0.046512 | 2 | 0 |
5e68b23f804398cfee84cc1d52c478308ea8cde5 | .circleci/config.yml | .circleci/config.yml | version: 2
defaults:
container: &default_container
working_directory: ~/build
docker:
- image: circleci/openjdk:8-jdk
release_filter: &release_filter
filters:
tags:
only: /.*/
jobs:
build_and_deploy_image:
<<: *default_container
steps:
- checkout
- setup_remote_docker:
version: 17.05.0-ce
- run:
name: Build and deploy docker image
command: |
docker build -t build/kafka-namager -f ./Dockerfile ./
docker login -u $DOCKER_USER -p $DOCKER_PASS
docker tag build/kafka-namager hlebalbau/kafka-namager:$CIRCLE_TAG
docker push hlebalbau/kafka-namager:$CIRCLE_TAG
docker tag build/cm-stream-api hlebalbau/kafka-namager:latest
docker push hlebalbau/kafka-namager:latest
workflows:
version: 2
build_and_deploy_image:
jobs:
- build_and_deploy_image:
<<: *release_filter | version: 2
defaults:
container: &default_container
working_directory: ~/build
docker:
- image: circleci/openjdk:8-jdk
release_filter: &release_filter
filters:
tags:
only: /.*/
branches:
ignore: /.*/
jobs:
build_and_deploy_image:
<<: *default_container
steps:
- checkout
- setup_remote_docker:
version: 17.05.0-ce
- run:
name: Build and deploy docker image
command: |
docker build -t build/kafka-namager -f ./Dockerfile ./
docker login -u $DOCKER_USER -p $DOCKER_PASS
docker tag build/kafka-namager hlebalbau/kafka-namager:$CIRCLE_TAG
docker push hlebalbau/kafka-namager:$CIRCLE_TAG
docker tag build/cm-stream-api hlebalbau/kafka-namager:latest
docker push hlebalbau/kafka-namager:latest
workflows:
version: 2
build_and_deploy_image:
jobs:
- build_and_deploy_image:
<<: *release_filter | Fix circle ci release filter | Fix circle ci release filter
run image script only for releases
| YAML | apache-2.0 | hleb-albau/kafka-manager-docker | yaml | ## Code Before:
version: 2
defaults:
container: &default_container
working_directory: ~/build
docker:
- image: circleci/openjdk:8-jdk
release_filter: &release_filter
filters:
tags:
only: /.*/
jobs:
build_and_deploy_image:
<<: *default_container
steps:
- checkout
- setup_remote_docker:
version: 17.05.0-ce
- run:
name: Build and deploy docker image
command: |
docker build -t build/kafka-namager -f ./Dockerfile ./
docker login -u $DOCKER_USER -p $DOCKER_PASS
docker tag build/kafka-namager hlebalbau/kafka-namager:$CIRCLE_TAG
docker push hlebalbau/kafka-namager:$CIRCLE_TAG
docker tag build/cm-stream-api hlebalbau/kafka-namager:latest
docker push hlebalbau/kafka-namager:latest
workflows:
version: 2
build_and_deploy_image:
jobs:
- build_and_deploy_image:
<<: *release_filter
## Instruction:
Fix circle ci release filter
run image script only for releases
## Code After:
version: 2
defaults:
container: &default_container
working_directory: ~/build
docker:
- image: circleci/openjdk:8-jdk
release_filter: &release_filter
filters:
tags:
only: /.*/
branches:
ignore: /.*/
jobs:
build_and_deploy_image:
<<: *default_container
steps:
- checkout
- setup_remote_docker:
version: 17.05.0-ce
- run:
name: Build and deploy docker image
command: |
docker build -t build/kafka-namager -f ./Dockerfile ./
docker login -u $DOCKER_USER -p $DOCKER_PASS
docker tag build/kafka-namager hlebalbau/kafka-namager:$CIRCLE_TAG
docker push hlebalbau/kafka-namager:$CIRCLE_TAG
docker tag build/cm-stream-api hlebalbau/kafka-namager:latest
docker push hlebalbau/kafka-namager:latest
workflows:
version: 2
build_and_deploy_image:
jobs:
- build_and_deploy_image:
<<: *release_filter | version: 2
defaults:
container: &default_container
working_directory: ~/build
docker:
- image: circleci/openjdk:8-jdk
release_filter: &release_filter
filters:
tags:
only: /.*/
+ branches:
+ ignore: /.*/
jobs:
build_and_deploy_image:
<<: *default_container
steps:
- checkout
- setup_remote_docker:
version: 17.05.0-ce
- run:
name: Build and deploy docker image
command: |
docker build -t build/kafka-namager -f ./Dockerfile ./
docker login -u $DOCKER_USER -p $DOCKER_PASS
docker tag build/kafka-namager hlebalbau/kafka-namager:$CIRCLE_TAG
docker push hlebalbau/kafka-namager:$CIRCLE_TAG
docker tag build/cm-stream-api hlebalbau/kafka-namager:latest
docker push hlebalbau/kafka-namager:latest
workflows:
version: 2
build_and_deploy_image:
jobs:
- build_and_deploy_image:
<<: *release_filter | 2 | 0.04878 | 2 | 0 |
15461c3a4f16fcb147ce84f8e702005703cff587 | TODO.md | TODO.md | Issues
======
- PyPI packages that depends on another package's `extra_requires` are not
supported (needs upstream support from `pip show`).
- `scikit-image` depends on `dask[array]`.
- Special flags may be required (?) for optimized builds of `numpy` and `scipy`.
- License support is incomplete.
- e.g. `matplotlib` has a `LICENSE` *folder*.
- `git` packages are cloned twice; we may be able to cache them.
Arch packaging
==============
- Arch packages that "vendor" some dependencies are supported, although the
`depends` array may be a bit mangled.
- Some packages are not installed as wheels (e.g. PyQt5) and thus not seen by
`pip list --outdated` (and thus `pypi2pkgbuild.py -o`).
Remaining manual packages
=========================
- Undeclared dependencies:
- `hmmlearn`
- `nitime` (still uses `distutils`...)
- `supersmoother`
- `ctypes`-loaded binary dependencies.
- `yep`: depends on `gperftools`
| Issues
======
- PyPI packages that depends on another package's `extra_requires` are not
supported (needs upstream support from `pip show`).
- `scikit-image` depends on `dask[array]`.
- PyPI does not prevent uploading of wheels using local version
identifiers, despite PEP440's explicit disallowance (see
https://github.com/pypa/pypi-legacy/issues/486). This breaks a
check (assertion) on the wheel name, which can be skipped by setting
`PYTHONOPTIMIZE=1`.
- Special flags may be required (?) for optimized builds of `numpy` and `scipy`.
- License support is incomplete.
- e.g. `matplotlib` has a `LICENSE` *folder*.
- `git` packages are cloned twice; we may be able to cache them.
Arch packaging
==============
- Arch packages that "vendor" some dependencies are supported, although the
`depends` array may be a bit mangled.
- Some packages are not installed as wheels (e.g. PyQt5) and thus not seen by
`pip list --outdated` (and thus `pypi2pkgbuild.py -o`).
Remaining manual packages
=========================
- Undeclared dependencies:
- `hmmlearn`
- `nitime` (still uses `distutils`...)
- `supersmoother`
- `ctypes`-loaded binary dependencies.
- `yep`: depends on `gperftools`
| Add note about invalid versions on PyPI. | Add note about invalid versions on PyPI.
| Markdown | mit | anntzer/pypi2pkgbuild,anntzer/pypi2pkgbuild | markdown | ## Code Before:
Issues
======
- PyPI packages that depends on another package's `extra_requires` are not
supported (needs upstream support from `pip show`).
- `scikit-image` depends on `dask[array]`.
- Special flags may be required (?) for optimized builds of `numpy` and `scipy`.
- License support is incomplete.
- e.g. `matplotlib` has a `LICENSE` *folder*.
- `git` packages are cloned twice; we may be able to cache them.
Arch packaging
==============
- Arch packages that "vendor" some dependencies are supported, although the
`depends` array may be a bit mangled.
- Some packages are not installed as wheels (e.g. PyQt5) and thus not seen by
`pip list --outdated` (and thus `pypi2pkgbuild.py -o`).
Remaining manual packages
=========================
- Undeclared dependencies:
- `hmmlearn`
- `nitime` (still uses `distutils`...)
- `supersmoother`
- `ctypes`-loaded binary dependencies.
- `yep`: depends on `gperftools`
## Instruction:
Add note about invalid versions on PyPI.
## Code After:
Issues
======
- PyPI packages that depends on another package's `extra_requires` are not
supported (needs upstream support from `pip show`).
- `scikit-image` depends on `dask[array]`.
- PyPI does not prevent uploading of wheels using local version
identifiers, despite PEP440's explicit disallowance (see
https://github.com/pypa/pypi-legacy/issues/486). This breaks a
check (assertion) on the wheel name, which can be skipped by setting
`PYTHONOPTIMIZE=1`.
- Special flags may be required (?) for optimized builds of `numpy` and `scipy`.
- License support is incomplete.
- e.g. `matplotlib` has a `LICENSE` *folder*.
- `git` packages are cloned twice; we may be able to cache them.
Arch packaging
==============
- Arch packages that "vendor" some dependencies are supported, although the
`depends` array may be a bit mangled.
- Some packages are not installed as wheels (e.g. PyQt5) and thus not seen by
`pip list --outdated` (and thus `pypi2pkgbuild.py -o`).
Remaining manual packages
=========================
- Undeclared dependencies:
- `hmmlearn`
- `nitime` (still uses `distutils`...)
- `supersmoother`
- `ctypes`-loaded binary dependencies.
- `yep`: depends on `gperftools`
| Issues
======
- PyPI packages that depends on another package's `extra_requires` are not
supported (needs upstream support from `pip show`).
- `scikit-image` depends on `dask[array]`.
+
+ - PyPI does not prevent uploading of wheels using local version
+ identifiers, despite PEP440's explicit disallowance (see
+ https://github.com/pypa/pypi-legacy/issues/486). This breaks a
+ check (assertion) on the wheel name, which can be skipped by setting
+ `PYTHONOPTIMIZE=1`.
- Special flags may be required (?) for optimized builds of `numpy` and `scipy`.
- License support is incomplete.
- e.g. `matplotlib` has a `LICENSE` *folder*.
- `git` packages are cloned twice; we may be able to cache them.
Arch packaging
==============
- Arch packages that "vendor" some dependencies are supported, although the
`depends` array may be a bit mangled.
- Some packages are not installed as wheels (e.g. PyQt5) and thus not seen by
`pip list --outdated` (and thus `pypi2pkgbuild.py -o`).
Remaining manual packages
=========================
- Undeclared dependencies:
- `hmmlearn`
- `nitime` (still uses `distutils`...)
- `supersmoother`
- `ctypes`-loaded binary dependencies.
- `yep`: depends on `gperftools` | 6 | 0.181818 | 6 | 0 |
Subsets and Splits