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
aaa2549a74320e7c69ae09f27a07c7bf896dfa2f
src/Office365Adapter.php
src/Office365Adapter.php
<?php /** * This file is part of the CalendArt package * * For the full copyright and license information, please view the LICENSE file * that was distributed with this source code. * * @copyright Wisembly * @license http://www.opensource.org/licenses/MIT-License MIT License */ namespace CalendArt\Adapter\Office365; use GuzzleHttp\Client as Guzzle; use CalendArt\AbstractCalendar, CalendArt\Adapter\AdapterInterface; /** * Office365 Adapter - He knows how to dialog with office 365's calendars ! * * This requires to have an OAuth2 token established with the following scopes : * - Calendar.read * - Calendar.write * * @author Baptiste Clavié <baptiste@wisembly.com> */ class Office365Adapter implements AdapterInterface { /** @param string $token access token delivered by azure's oauth system */ public function __construct($token) { $this->guzzle = new Guzzle(['base_url' => 'https://outlook.office365.com/api/v1.0/me/', 'defaults' => ['headers' => ['Authorization' => sprintf('Bearer %s', $token)], 'exceptions' => false]]); } /** {@inheritDoc} */ public function getCalendarApi() { } /** {@inheritDoc} */ public function getEventApi() { } }
<?php /** * This file is part of the CalendArt package * * For the full copyright and license information, please view the LICENSE file * that was distributed with this source code. * * @copyright Wisembly * @license http://www.opensource.org/licenses/MIT-License MIT License */ namespace CalendArt\Adapter\Office365; use GuzzleHttp\Client as Guzzle; use CalendArt\AbstractCalendar, CalendArt\Adapter\AdapterInterface; /** * Office365 Adapter - He knows how to dialog with office 365's calendars ! * * This requires to have an OAuth2 token established with the following scopes : * - Calendar.read * - Calendar.write * * @author Baptiste Clavié <baptiste@wisembly.com> */ class Office365Adapter implements AdapterInterface { /** @param string $token access token delivered by azure's oauth system */ public function __construct($token) { $this->guzzle = new Guzzle(['base_url' => 'https://outlook.office365.com/api/v1.0/me/', 'defaults' => ['exceptions' => false, 'headers' => ['Authorization' => sprintf('Bearer %s', $token), 'Content-Type' => 'application/json', 'Accept' => 'application/json;odata=verbose']]]); } /** {@inheritDoc} */ public function getCalendarApi() { } /** {@inheritDoc} */ public function getEventApi() { } }
Add some headers to the default Guzzle config
Add some headers to the default Guzzle config
PHP
mit
krichprollsch/Office365Adapter,Calendart/Office365Adapter
php
## Code Before: <?php /** * This file is part of the CalendArt package * * For the full copyright and license information, please view the LICENSE file * that was distributed with this source code. * * @copyright Wisembly * @license http://www.opensource.org/licenses/MIT-License MIT License */ namespace CalendArt\Adapter\Office365; use GuzzleHttp\Client as Guzzle; use CalendArt\AbstractCalendar, CalendArt\Adapter\AdapterInterface; /** * Office365 Adapter - He knows how to dialog with office 365's calendars ! * * This requires to have an OAuth2 token established with the following scopes : * - Calendar.read * - Calendar.write * * @author Baptiste Clavié <baptiste@wisembly.com> */ class Office365Adapter implements AdapterInterface { /** @param string $token access token delivered by azure's oauth system */ public function __construct($token) { $this->guzzle = new Guzzle(['base_url' => 'https://outlook.office365.com/api/v1.0/me/', 'defaults' => ['headers' => ['Authorization' => sprintf('Bearer %s', $token)], 'exceptions' => false]]); } /** {@inheritDoc} */ public function getCalendarApi() { } /** {@inheritDoc} */ public function getEventApi() { } } ## Instruction: Add some headers to the default Guzzle config ## Code After: <?php /** * This file is part of the CalendArt package * * For the full copyright and license information, please view the LICENSE file * that was distributed with this source code. * * @copyright Wisembly * @license http://www.opensource.org/licenses/MIT-License MIT License */ namespace CalendArt\Adapter\Office365; use GuzzleHttp\Client as Guzzle; use CalendArt\AbstractCalendar, CalendArt\Adapter\AdapterInterface; /** * Office365 Adapter - He knows how to dialog with office 365's calendars ! * * This requires to have an OAuth2 token established with the following scopes : * - Calendar.read * - Calendar.write * * @author Baptiste Clavié <baptiste@wisembly.com> */ class Office365Adapter implements AdapterInterface { /** @param string $token access token delivered by azure's oauth system */ public function __construct($token) { $this->guzzle = new Guzzle(['base_url' => 'https://outlook.office365.com/api/v1.0/me/', 'defaults' => ['exceptions' => false, 'headers' => ['Authorization' => sprintf('Bearer %s', $token), 'Content-Type' => 'application/json', 'Accept' => 'application/json;odata=verbose']]]); } /** {@inheritDoc} */ public function getCalendarApi() { } /** {@inheritDoc} */ public function getEventApi() { } }
<?php /** * This file is part of the CalendArt package * * For the full copyright and license information, please view the LICENSE file * that was distributed with this source code. * * @copyright Wisembly * @license http://www.opensource.org/licenses/MIT-License MIT License */ namespace CalendArt\Adapter\Office365; use GuzzleHttp\Client as Guzzle; use CalendArt\AbstractCalendar, CalendArt\Adapter\AdapterInterface; /** * Office365 Adapter - He knows how to dialog with office 365's calendars ! * * This requires to have an OAuth2 token established with the following scopes : * - Calendar.read * - Calendar.write * * @author Baptiste Clavié <baptiste@wisembly.com> */ class Office365Adapter implements AdapterInterface { /** @param string $token access token delivered by azure's oauth system */ public function __construct($token) { $this->guzzle = new Guzzle(['base_url' => 'https://outlook.office365.com/api/v1.0/me/', + 'defaults' => ['exceptions' => false, - 'defaults' => ['headers' => ['Authorization' => sprintf('Bearer %s', $token)], ? --------------- --- - + 'headers' => ['Authorization' => sprintf('Bearer %s', $token), ? ++++++++++++++++ - 'exceptions' => false]]); + 'Content-Type' => 'application/json', + 'Accept' => 'application/json;odata=verbose']]]); } /** {@inheritDoc} */ public function getCalendarApi() { } /** {@inheritDoc} */ public function getEventApi() { } }
6
0.125
4
2
ad053987e5f1ce62787228478dc056986fb9f248
api/sys_health.go
api/sys_health.go
package api func (c *Sys) Health() (*HealthResponse, error) { r := c.c.NewRequest("GET", "/v1/sys/health") // If the code is 400 or above it will automatically turn into an error, // but the sys/health API defaults to returning 5xx when not sealed or // inited, so we force this code to be something else so we parse correctly r.Params.Add("sealedcode", "299") r.Params.Add("uninitcode", "299") resp, err := c.c.RawRequest(r) if err != nil { return nil, err } defer resp.Body.Close() var result HealthResponse err = resp.DecodeJSON(&result) return &result, err } type HealthResponse struct { Initialized bool `json:"initialized"` Sealed bool `json:"sealed"` Standby bool `json:"standby"` ServerTimeUTC int64 `json:"server_time_utc"` Version string `json:"version"` ClusterName string `json:"cluster_name,omitempty"` ClusterID string `json:"cluster_id,omitempty"` }
package api func (c *Sys) Health() (*HealthResponse, error) { r := c.c.NewRequest("GET", "/v1/sys/health") // If the code is 400 or above it will automatically turn into an error, // but the sys/health API defaults to returning 5xx when not sealed or // inited, so we force this code to be something else so we parse correctly r.Params.Add("sealedcode", "299") r.Params.Add("uninitcode", "299") resp, err := c.c.RawRequest(r) if err != nil { return nil, err } defer resp.Body.Close() var result HealthResponse err = resp.DecodeJSON(&result) return &result, err } type HealthResponse struct { Initialized bool `json:"initialized"` Sealed bool `json:"sealed"` Standby bool `json:"standby"` ReplicationPerfMode string `json:"replication_perf_mode"` ReplicationDRMode string `json:"replication_dr_mode"` ServerTimeUTC int64 `json:"server_time_utc"` Version string `json:"version"` ClusterName string `json:"cluster_name,omitempty"` ClusterID string `json:"cluster_id,omitempty"` }
Add replication mode sys health information to Go API
Add replication mode sys health information to Go API
Go
mpl-2.0
Aloomaio/vault,mgk/vault,Aloomaio/vault,hashicorp/vault,mgk/vault,hashicorp/vault,hartsock/vault,joelthompson/vault,rnaveiras/vault,quixoten/vault,mgk/vault,joelthompson/vault,hartsock/vault,Aloomaio/vault,rnaveiras/vault,kingland/vault,hartsock/vault,rnaveiras/vault,joelthompson/vault,hashicorp/vault,hartsock/vault,naunga/vault,Aloomaio/vault,hashicorp/vault,quixoten/vault,quixoten/vault,mgk/vault,hashicorp/vault,kingland/vault,rnaveiras/vault,naunga/vault,rnaveiras/vault,quixoten/vault,kingland/vault,hartsock/vault,hashicorp/vault,kingland/vault,kingland/vault,joelthompson/vault
go
## Code Before: package api func (c *Sys) Health() (*HealthResponse, error) { r := c.c.NewRequest("GET", "/v1/sys/health") // If the code is 400 or above it will automatically turn into an error, // but the sys/health API defaults to returning 5xx when not sealed or // inited, so we force this code to be something else so we parse correctly r.Params.Add("sealedcode", "299") r.Params.Add("uninitcode", "299") resp, err := c.c.RawRequest(r) if err != nil { return nil, err } defer resp.Body.Close() var result HealthResponse err = resp.DecodeJSON(&result) return &result, err } type HealthResponse struct { Initialized bool `json:"initialized"` Sealed bool `json:"sealed"` Standby bool `json:"standby"` ServerTimeUTC int64 `json:"server_time_utc"` Version string `json:"version"` ClusterName string `json:"cluster_name,omitempty"` ClusterID string `json:"cluster_id,omitempty"` } ## Instruction: Add replication mode sys health information to Go API ## Code After: package api func (c *Sys) Health() (*HealthResponse, error) { r := c.c.NewRequest("GET", "/v1/sys/health") // If the code is 400 or above it will automatically turn into an error, // but the sys/health API defaults to returning 5xx when not sealed or // inited, so we force this code to be something else so we parse correctly r.Params.Add("sealedcode", "299") r.Params.Add("uninitcode", "299") resp, err := c.c.RawRequest(r) if err != nil { return nil, err } defer resp.Body.Close() var result HealthResponse err = resp.DecodeJSON(&result) return &result, err } type HealthResponse struct { Initialized bool `json:"initialized"` Sealed bool `json:"sealed"` Standby bool `json:"standby"` ReplicationPerfMode string `json:"replication_perf_mode"` ReplicationDRMode string `json:"replication_dr_mode"` ServerTimeUTC int64 `json:"server_time_utc"` Version string `json:"version"` ClusterName string `json:"cluster_name,omitempty"` ClusterID string `json:"cluster_id,omitempty"` }
package api func (c *Sys) Health() (*HealthResponse, error) { r := c.c.NewRequest("GET", "/v1/sys/health") // If the code is 400 or above it will automatically turn into an error, // but the sys/health API defaults to returning 5xx when not sealed or // inited, so we force this code to be something else so we parse correctly r.Params.Add("sealedcode", "299") r.Params.Add("uninitcode", "299") resp, err := c.c.RawRequest(r) if err != nil { return nil, err } defer resp.Body.Close() var result HealthResponse err = resp.DecodeJSON(&result) return &result, err } type HealthResponse struct { - Initialized bool `json:"initialized"` + Initialized bool `json:"initialized"` ? ++++++ - Sealed bool `json:"sealed"` + Sealed bool `json:"sealed"` ? ++++++ - Standby bool `json:"standby"` + Standby bool `json:"standby"` ? ++++++ + ReplicationPerfMode string `json:"replication_perf_mode"` + ReplicationDRMode string `json:"replication_dr_mode"` - ServerTimeUTC int64 `json:"server_time_utc"` + ServerTimeUTC int64 `json:"server_time_utc"` ? ++++++ - Version string `json:"version"` + Version string `json:"version"` ? ++++++ - ClusterName string `json:"cluster_name,omitempty"` + ClusterName string `json:"cluster_name,omitempty"` ? ++++++ - ClusterID string `json:"cluster_id,omitempty"` + ClusterID string `json:"cluster_id,omitempty"` ? ++++++ }
16
0.551724
9
7
50551b513f3d705f0ad5125bfbf08da86ad70181
_sass/_social-media.scss
_sass/_social-media.scss
/* Social Top-Bar Stylings ------------------------------------------------------------------- */ .social-media-section { //color: #3FA9F5 !important; .social-icons li a { font-size: rem-calc(23); display: block; width: 36px; border-radius: 50%; color: #fff; background: #3FA9F5; text-align: center; } .social-icons li a:hover { color: #3FA9F5; background: #fff; } }
/* Social Top-Bar Stylings ------------------------------------------------------------------- */ .social-media-top { .social-icons { margin-bottom: 0; li { padding-top: 15px; } a { color: $primary-color; background: #ddd; font-size: rem-calc(23); display: block; width: 36px; border-radius: 50%; text-align: center; transition: all 0.1s ease-out; &:hover, &:active, &:focus { color: $body-bg; background: $primary-color; } } } }
Refactor styles according to markup changes
Refactor styles according to markup changes - reformat styles for better inheritance - set pseudo-classes for link behavior - swap hover and default colors - set color variables instead of fixed values
SCSS
mit
srenatus/crowd-funding,srenatus/crowd-funding,plutonik-a/crowd-funding,refugee-emancipation/crowd-funding,plutonik-a/crowd-funding,srenatus/crowd-funding,plutonik-a/crowd-funding,refugee-emancipation/crowd-funding,ilmDitsch/crowd-funding,ilmDitsch/crowd-funding,ilmDitsch/crowd-funding,refugee-emancipation/crowd-funding
scss
## Code Before: /* Social Top-Bar Stylings ------------------------------------------------------------------- */ .social-media-section { //color: #3FA9F5 !important; .social-icons li a { font-size: rem-calc(23); display: block; width: 36px; border-radius: 50%; color: #fff; background: #3FA9F5; text-align: center; } .social-icons li a:hover { color: #3FA9F5; background: #fff; } } ## Instruction: Refactor styles according to markup changes - reformat styles for better inheritance - set pseudo-classes for link behavior - swap hover and default colors - set color variables instead of fixed values ## Code After: /* Social Top-Bar Stylings ------------------------------------------------------------------- */ .social-media-top { .social-icons { margin-bottom: 0; li { padding-top: 15px; } a { color: $primary-color; background: #ddd; font-size: rem-calc(23); display: block; width: 36px; border-radius: 50%; text-align: center; transition: all 0.1s ease-out; &:hover, &:active, &:focus { color: $body-bg; background: $primary-color; } } } }
/* Social Top-Bar Stylings ------------------------------------------------------------------- */ - .social-media-section { ? --- - ^ + .social-media-top { ? ^ - //color: #3FA9F5 !important; - .social-icons li a { ? ----- + .social-icons { + margin-bottom: 0; + li { + padding-top: 15px; + } + a { + color: $primary-color; + background: #ddd; - font-size: rem-calc(23); + font-size: rem-calc(23); ? ++ - display: block; + display: block; ? ++ - width: 36px; + width: 36px; ? ++ - border-radius: 50%; + border-radius: 50%; ? ++ - color: #fff; - background: #3FA9F5; - text-align: center; + text-align: center; ? ++ + transition: all 0.1s ease-out; + &:hover, + &:active, + &:focus { + color: $body-bg; + background: $primary-color; + } - } + } ? ++ - .social-icons li a:hover { - color: #3FA9F5; - background: #fff; } }
36
1.894737
22
14
f814c4dfea2b3f76a78a63e45d0f869866b44d9c
README.md
README.md
Run foreman Procfiles with Rust ## Installation ```shell cargo install fors ``` ## Usage ```shell $ fors web | Puma starting in single mode... web | * Version 3.6.0 (ruby 2.3.1-p112), codename: Sleepy Sunday Serenity web | * Min threads: 5, max threads: 5 web | * Environment: development web | * Listening on tcp://0.0.0.0:3000 ```
[![Build Status](https://travis-ci.org/jtdowney/fors.svg?branch=master)](https://travis-ci.org/jtdowney/fors) Run foreman Procfiles with Rust ## Installation ```shell cargo install fors ``` ## Usage ```shell $ fors web | Puma starting in single mode... web | * Version 3.6.0 (ruby 2.3.1-p112), codename: Sleepy Sunday Serenity web | * Min threads: 5, max threads: 5 web | * Environment: development web | * Listening on tcp://0.0.0.0:3000 ```
Add travis ci status to readme
Add travis ci status to readme
Markdown
mit
jtdowney/fors
markdown
## Code Before: Run foreman Procfiles with Rust ## Installation ```shell cargo install fors ``` ## Usage ```shell $ fors web | Puma starting in single mode... web | * Version 3.6.0 (ruby 2.3.1-p112), codename: Sleepy Sunday Serenity web | * Min threads: 5, max threads: 5 web | * Environment: development web | * Listening on tcp://0.0.0.0:3000 ``` ## Instruction: Add travis ci status to readme ## Code After: [![Build Status](https://travis-ci.org/jtdowney/fors.svg?branch=master)](https://travis-ci.org/jtdowney/fors) Run foreman Procfiles with Rust ## Installation ```shell cargo install fors ``` ## Usage ```shell $ fors web | Puma starting in single mode... web | * Version 3.6.0 (ruby 2.3.1-p112), codename: Sleepy Sunday Serenity web | * Min threads: 5, max threads: 5 web | * Environment: development web | * Listening on tcp://0.0.0.0:3000 ```
+ + [![Build Status](https://travis-ci.org/jtdowney/fors.svg?branch=master)](https://travis-ci.org/jtdowney/fors) Run foreman Procfiles with Rust ## Installation ```shell cargo install fors ``` ## Usage ```shell $ fors web | Puma starting in single mode... web | * Version 3.6.0 (ruby 2.3.1-p112), codename: Sleepy Sunday Serenity web | * Min threads: 5, max threads: 5 web | * Environment: development web | * Listening on tcp://0.0.0.0:3000 ```
2
0.105263
2
0
524d725bf91ac6d9fdb1586d0e28be616ebc7982
UPGRADE-1.11.md
UPGRADE-1.11.md
1. `Sylius\Bundle\ApiBundle\View\CartShippingMethodInterface` and `Sylius\Bundle\ApiBundle\View\CartShippingMethod` have been removed. 1. `Sylius\Bundle\ApiBundle\View\Factory\CartShippingMethodFactoryInterface` and `Sylius\Bundle\ApiBundle\View\Factory\CartShippingMethodFactory` have been removed. 1. The constructor of `Sylius\Bundle\ApiBundle\DataProvider\CartShippingMethodsSubresourceDataProvider` has been changed: ```diff public function __construct( OrderRepositoryInterface $orderRepository, ShipmentRepositoryInterface $shipmentRepository, ShippingMethodsResolverInterface $shippingMethodsResolver, - ServiceRegistryInterface $calculators, - CartShippingMethodFactoryInterface $cartShippingMethodFactory ) { ... } ```
1. `Sylius\Bundle\ApiBundle\View\CartShippingMethodInterface` and `Sylius\Bundle\ApiBundle\View\CartShippingMethod` have been removed. 1. `Sylius\Bundle\ApiBundle\View\Factory\CartShippingMethodFactoryInterface` and `Sylius\Bundle\ApiBundle\View\Factory\CartShippingMethodFactory` have been removed. 1. The constructor of `Sylius\Bundle\ApiBundle\DataProvider\CartShippingMethodsSubresourceDataProvider` has been changed: ```diff public function __construct( OrderRepositoryInterface $orderRepository, ShipmentRepositoryInterface $shipmentRepository, ShippingMethodsResolverInterface $shippingMethodsResolver, - ServiceRegistryInterface $calculators, - CartShippingMethodFactoryInterface $cartShippingMethodFactory ) { ... } ``` 1. The response schema for endpoint `GET /api/v2/shop/orders/{tokenValue}/shipments/{shipments}/methods` has been changed from: ``` ... "hydra:member": [ { ... "@type": "CartShippingMethod", "shippingMethod": { ... "price": 500 } } ] ``` to: ``` ... "hydra:member": [ { ... "@type": "ShippingMethod", ... "price": 500 } ] ```
Add an additional note to UPGRADE file about changing schema fo getting shipping methods
[API] Add an additional note to UPGRADE file about changing schema fo getting shipping methods
Markdown
mit
SyliusBot/Sylius,lchrusciel/Sylius,Sylius/Sylius,loic425/Sylius,101medialab/Sylius,lchrusciel/Sylius,pamil/Sylius,SyliusBot/Sylius,loic425/Sylius,SyliusBot/Sylius,lchrusciel/Sylius,diimpp/Sylius,Sylius/Sylius,antonioperic/Sylius,antonioperic/Sylius,Zales0123/Sylius,101medialab/Sylius,Arminek/Sylius,diimpp/Sylius,Zales0123/Sylius,diimpp/Sylius,antonioperic/Sylius,101medialab/Sylius,Arminek/Sylius,pamil/Sylius,Sylius/Sylius,Zales0123/Sylius,loic425/Sylius,pamil/Sylius,Arminek/Sylius
markdown
## Code Before: 1. `Sylius\Bundle\ApiBundle\View\CartShippingMethodInterface` and `Sylius\Bundle\ApiBundle\View\CartShippingMethod` have been removed. 1. `Sylius\Bundle\ApiBundle\View\Factory\CartShippingMethodFactoryInterface` and `Sylius\Bundle\ApiBundle\View\Factory\CartShippingMethodFactory` have been removed. 1. The constructor of `Sylius\Bundle\ApiBundle\DataProvider\CartShippingMethodsSubresourceDataProvider` has been changed: ```diff public function __construct( OrderRepositoryInterface $orderRepository, ShipmentRepositoryInterface $shipmentRepository, ShippingMethodsResolverInterface $shippingMethodsResolver, - ServiceRegistryInterface $calculators, - CartShippingMethodFactoryInterface $cartShippingMethodFactory ) { ... } ``` ## Instruction: [API] Add an additional note to UPGRADE file about changing schema fo getting shipping methods ## Code After: 1. `Sylius\Bundle\ApiBundle\View\CartShippingMethodInterface` and `Sylius\Bundle\ApiBundle\View\CartShippingMethod` have been removed. 1. `Sylius\Bundle\ApiBundle\View\Factory\CartShippingMethodFactoryInterface` and `Sylius\Bundle\ApiBundle\View\Factory\CartShippingMethodFactory` have been removed. 1. The constructor of `Sylius\Bundle\ApiBundle\DataProvider\CartShippingMethodsSubresourceDataProvider` has been changed: ```diff public function __construct( OrderRepositoryInterface $orderRepository, ShipmentRepositoryInterface $shipmentRepository, ShippingMethodsResolverInterface $shippingMethodsResolver, - ServiceRegistryInterface $calculators, - CartShippingMethodFactoryInterface $cartShippingMethodFactory ) { ... } ``` 1. The response schema for endpoint `GET /api/v2/shop/orders/{tokenValue}/shipments/{shipments}/methods` has been changed from: ``` ... "hydra:member": [ { ... "@type": "CartShippingMethod", "shippingMethod": { ... "price": 500 } } ] ``` to: ``` ... "hydra:member": [ { ... "@type": "ShippingMethod", ... "price": 500 } ] ```
1. `Sylius\Bundle\ApiBundle\View\CartShippingMethodInterface` and `Sylius\Bundle\ApiBundle\View\CartShippingMethod` have been removed. 1. `Sylius\Bundle\ApiBundle\View\Factory\CartShippingMethodFactoryInterface` and `Sylius\Bundle\ApiBundle\View\Factory\CartShippingMethodFactory` have been removed. 1. The constructor of `Sylius\Bundle\ApiBundle\DataProvider\CartShippingMethodsSubresourceDataProvider` has been changed: ```diff public function __construct( OrderRepositoryInterface $orderRepository, ShipmentRepositoryInterface $shipmentRepository, ShippingMethodsResolverInterface $shippingMethodsResolver, - ServiceRegistryInterface $calculators, - CartShippingMethodFactoryInterface $cartShippingMethodFactory ) { ... } ``` + + 1. The response schema for endpoint `GET /api/v2/shop/orders/{tokenValue}/shipments/{shipments}/methods` has been changed from: + + ``` + ... + "hydra:member": [ + { + ... + "@type": "CartShippingMethod", + "shippingMethod": { + ... + "price": 500 + } + } + ] + ``` + to: + ``` + ... + "hydra:member": [ + { + ... + "@type": "ShippingMethod", + ... + "price": 500 + } + ] + ```
28
1.555556
28
0
ab0849317a729b5ebd9b8ab8945ade395b967f44
jgrapht-dist/src/assembly/assembly.xml
jgrapht-dist/src/assembly/assembly.xml
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"> <formats> <format>zip</format> <format>tar.gz</format> </formats> <dependencySets> <dependencySet> <outputDirectory>/lib</outputDirectory> <scope>runtime</scope> </dependencySet> </dependencySets> </assembly>
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"> <formats> <format>zip</format> <format>tar.gz</format> </formats> <dependencySets> <dependencySet> <outputDirectory>/lib</outputDirectory> <scope>runtime</scope> </dependencySet> </dependencySets> <files> <file> <source>${basedir}/../README.html</source> <outputDirectory>/</outputDirectory> </file> <file> <source>${basedir}/../license-LGPL.txt</source> <outputDirectory>/</outputDirectory> </file> </files> </assembly>
Include the README and license file in the resulting archives.
Include the README and license file in the resulting archives.
XML
epl-1.0
kashak79/jgrapht,arcanefoam/jgrapht,feilong0309/jgrapht,wselwood/jgrapht,hal/jgrapht,lingeringsocket/jgrapht,arcanefoam/jgrapht,hal/jgrapht,Infeligo/jgrapht,AidanDelaney/jgrapht,feilong0309/jgrapht,gjroelofs/jgrapht,WorstCase00/jgrapht,rcpoison/jgrapht,alexeykudinkin/jgrapht,AidanDelaney/jgrapht,alexeykudinkin/jgrapht,WorstCase00/jgrapht,cthiebaud/jgrapht,kashak79/jgrapht,mt0803/jgrapht,gjroelofs/jgrapht,Infeligo/jgrapht,wselwood/jgrapht,VoVanHai/jgrapht,cthiebaud/jgrapht,WorstCase00/jgrapht,WorstCase00/jgrapht,mt0803/jgrapht
xml
## Code Before: <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"> <formats> <format>zip</format> <format>tar.gz</format> </formats> <dependencySets> <dependencySet> <outputDirectory>/lib</outputDirectory> <scope>runtime</scope> </dependencySet> </dependencySets> </assembly> ## Instruction: Include the README and license file in the resulting archives. ## Code After: <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"> <formats> <format>zip</format> <format>tar.gz</format> </formats> <dependencySets> <dependencySet> <outputDirectory>/lib</outputDirectory> <scope>runtime</scope> </dependencySet> </dependencySets> <files> <file> <source>${basedir}/../README.html</source> <outputDirectory>/</outputDirectory> </file> <file> <source>${basedir}/../license-LGPL.txt</source> <outputDirectory>/</outputDirectory> </file> </files> </assembly>
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"> <formats> <format>zip</format> <format>tar.gz</format> </formats> <dependencySets> <dependencySet> <outputDirectory>/lib</outputDirectory> <scope>runtime</scope> </dependencySet> </dependencySets> + + <files> + <file> + <source>${basedir}/../README.html</source> + <outputDirectory>/</outputDirectory> + </file> + <file> + <source>${basedir}/../license-LGPL.txt</source> + <outputDirectory>/</outputDirectory> + </file> + </files> </assembly>
11
0.6875
11
0
95406702bdbb62abef517fd81d9aeb2628f0286a
package.json
package.json
{ "name": "statichook", "description": "Push to Bitbucket, trigger a webhook, and upload your static site via SCP.", "version": "0.1.0", "maintainers": [ { "name": "Matthew Lewis", "email": "matt@mplewis.com", "web": "http://www.mplewis.com/" } ], "dependencies": { "tmp": "0.0.23", "gitane": "0.3.1", "express": "4.1.2", "body-parser": "1.0.2", "jayschema": "0.2.7", "winston": "0.7.3", "rimraf": "2.2.8" }, "scripts": { "start": "node statichook" }, "repository": { "type": "git", "url": "git@github.com:mplewis/statichook.git" }, "licenses": [ { "name": "The MIT License", "url": "http://opensource.org/licenses/MIT" } ] }
{ "name": "statichook", "description": "Push to Bitbucket, trigger a webhook, and upload your static site via SCP.", "version": "0.1.0", "maintainers": [ { "name": "Matthew Lewis", "email": "matt@mplewis.com", "web": "http://www.mplewis.com/" } ], "dependencies": { "tmp": "0.0.23", "gitane": "0.3.1", "express": "4.1.2", "body-parser": "1.0.2", "jayschema": "0.2.7", "winston": "0.7.3", "rimraf": "2.2.8", "scp2": "0.1.4" }, "scripts": { "start": "node statichook" }, "repository": { "type": "git", "url": "git@github.com:mplewis/statichook.git" }, "licenses": [ { "name": "The MIT License", "url": "http://opensource.org/licenses/MIT" } ] }
Add scp requirement to force installation of dependencies
Add scp requirement to force installation of dependencies
JSON
mit
mplewis/statichook
json
## Code Before: { "name": "statichook", "description": "Push to Bitbucket, trigger a webhook, and upload your static site via SCP.", "version": "0.1.0", "maintainers": [ { "name": "Matthew Lewis", "email": "matt@mplewis.com", "web": "http://www.mplewis.com/" } ], "dependencies": { "tmp": "0.0.23", "gitane": "0.3.1", "express": "4.1.2", "body-parser": "1.0.2", "jayschema": "0.2.7", "winston": "0.7.3", "rimraf": "2.2.8" }, "scripts": { "start": "node statichook" }, "repository": { "type": "git", "url": "git@github.com:mplewis/statichook.git" }, "licenses": [ { "name": "The MIT License", "url": "http://opensource.org/licenses/MIT" } ] } ## Instruction: Add scp requirement to force installation of dependencies ## Code After: { "name": "statichook", "description": "Push to Bitbucket, trigger a webhook, and upload your static site via SCP.", "version": "0.1.0", "maintainers": [ { "name": "Matthew Lewis", "email": "matt@mplewis.com", "web": "http://www.mplewis.com/" } ], "dependencies": { "tmp": "0.0.23", "gitane": "0.3.1", "express": "4.1.2", "body-parser": "1.0.2", "jayschema": "0.2.7", "winston": "0.7.3", "rimraf": "2.2.8", "scp2": "0.1.4" }, "scripts": { "start": "node statichook" }, "repository": { "type": "git", "url": "git@github.com:mplewis/statichook.git" }, "licenses": [ { "name": "The MIT License", "url": "http://opensource.org/licenses/MIT" } ] }
{ "name": "statichook", "description": "Push to Bitbucket, trigger a webhook, and upload your static site via SCP.", "version": "0.1.0", "maintainers": [ { "name": "Matthew Lewis", "email": "matt@mplewis.com", "web": "http://www.mplewis.com/" } ], "dependencies": { "tmp": "0.0.23", "gitane": "0.3.1", "express": "4.1.2", "body-parser": "1.0.2", "jayschema": "0.2.7", "winston": "0.7.3", - "rimraf": "2.2.8" + "rimraf": "2.2.8", ? + + "scp2": "0.1.4" }, "scripts": { "start": "node statichook" }, "repository": { "type": "git", "url": "git@github.com:mplewis/statichook.git" }, "licenses": [ { "name": "The MIT License", "url": "http://opensource.org/licenses/MIT" } ] }
3
0.088235
2
1
22548b3d45b13361fe1df9af8897e38c61bad894
setup.py
setup.py
import os import sys import re from setuptools import setup, find_packages v = open(os.path.join(os.path.dirname(__file__), 'dogpile', 'cache', '__init__.py')) VERSION = re.compile(r".*__version__ = '(.*?)'", re.S).match(v.read()).group(1) v.close() readme = os.path.join(os.path.dirname(__file__), 'README.rst') setup(name='dogpile.cache', version=VERSION, description="A caching front-end based on the Dogpile lock.", long_description=open(readme).read(), classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Programming Language :: Python', 'Programming Language :: Python :: 3', ], keywords='caching', author='Mike Bayer', author_email='mike_mp@zzzcomputing.com', url='http://bitbucket.org/zzzeek/dogpile.cache', license='BSD', packages=find_packages('.', exclude=['ez_setup', 'tests*']), namespace_packages=['dogpile'], entry_points=""" [mako.cache] dogpile = dogpile.cache.plugins.mako:MakoPlugin """, zip_safe=False, install_requires=['dogpile.core>=0.4.1'], test_suite='nose.collector', tests_require=['nose', 'mock'], )
import os import sys import re from setuptools import setup, find_packages v = open(os.path.join(os.path.dirname(__file__), 'dogpile', 'cache', '__init__.py')) VERSION = re.compile(r".*__version__ = '(.*?)'", re.S).match(v.read()).group(1) v.close() readme = os.path.join(os.path.dirname(__file__), 'README.rst') setup(name='dogpile.cache', version=VERSION, description="A caching front-end based on the Dogpile lock.", long_description=open(readme).read(), classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Programming Language :: Python', 'Programming Language :: Python :: 3', ], keywords='caching', author='Mike Bayer', author_email='mike_mp@zzzcomputing.com', url='http://bitbucket.org/zzzeek/dogpile.cache', license='BSD', packages=find_packages('.', exclude=['ez_setup', 'tests*']), namespace_packages=['dogpile'], entry_points=""" [mako.cache] dogpile.cache = dogpile.cache.plugins.mako_cache:MakoPlugin """, zip_safe=False, install_requires=['dogpile.core>=0.4.1'], test_suite='nose.collector', tests_require=['nose', 'mock'], )
Fix entry point for Mako.
Fix entry point for Mako.
Python
bsd-3-clause
thruflo/dogpile.cache,thruflo/dogpile.cache
python
## Code Before: import os import sys import re from setuptools import setup, find_packages v = open(os.path.join(os.path.dirname(__file__), 'dogpile', 'cache', '__init__.py')) VERSION = re.compile(r".*__version__ = '(.*?)'", re.S).match(v.read()).group(1) v.close() readme = os.path.join(os.path.dirname(__file__), 'README.rst') setup(name='dogpile.cache', version=VERSION, description="A caching front-end based on the Dogpile lock.", long_description=open(readme).read(), classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Programming Language :: Python', 'Programming Language :: Python :: 3', ], keywords='caching', author='Mike Bayer', author_email='mike_mp@zzzcomputing.com', url='http://bitbucket.org/zzzeek/dogpile.cache', license='BSD', packages=find_packages('.', exclude=['ez_setup', 'tests*']), namespace_packages=['dogpile'], entry_points=""" [mako.cache] dogpile = dogpile.cache.plugins.mako:MakoPlugin """, zip_safe=False, install_requires=['dogpile.core>=0.4.1'], test_suite='nose.collector', tests_require=['nose', 'mock'], ) ## Instruction: Fix entry point for Mako. ## Code After: import os import sys import re from setuptools import setup, find_packages v = open(os.path.join(os.path.dirname(__file__), 'dogpile', 'cache', '__init__.py')) VERSION = re.compile(r".*__version__ = '(.*?)'", re.S).match(v.read()).group(1) v.close() readme = os.path.join(os.path.dirname(__file__), 'README.rst') setup(name='dogpile.cache', version=VERSION, description="A caching front-end based on the Dogpile lock.", long_description=open(readme).read(), classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Programming Language :: Python', 'Programming Language :: Python :: 3', ], keywords='caching', author='Mike Bayer', author_email='mike_mp@zzzcomputing.com', url='http://bitbucket.org/zzzeek/dogpile.cache', license='BSD', packages=find_packages('.', exclude=['ez_setup', 'tests*']), namespace_packages=['dogpile'], entry_points=""" [mako.cache] dogpile.cache = dogpile.cache.plugins.mako_cache:MakoPlugin """, zip_safe=False, install_requires=['dogpile.core>=0.4.1'], test_suite='nose.collector', tests_require=['nose', 'mock'], )
import os import sys import re from setuptools import setup, find_packages v = open(os.path.join(os.path.dirname(__file__), 'dogpile', 'cache', '__init__.py')) VERSION = re.compile(r".*__version__ = '(.*?)'", re.S).match(v.read()).group(1) v.close() readme = os.path.join(os.path.dirname(__file__), 'README.rst') setup(name='dogpile.cache', version=VERSION, description="A caching front-end based on the Dogpile lock.", long_description=open(readme).read(), classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Programming Language :: Python', 'Programming Language :: Python :: 3', ], keywords='caching', author='Mike Bayer', author_email='mike_mp@zzzcomputing.com', url='http://bitbucket.org/zzzeek/dogpile.cache', license='BSD', packages=find_packages('.', exclude=['ez_setup', 'tests*']), namespace_packages=['dogpile'], entry_points=""" [mako.cache] - dogpile = dogpile.cache.plugins.mako:MakoPlugin + dogpile.cache = dogpile.cache.plugins.mako_cache:MakoPlugin ? ++++++ ++++++ """, zip_safe=False, install_requires=['dogpile.core>=0.4.1'], test_suite='nose.collector', tests_require=['nose', 'mock'], )
2
0.051282
1
1
4830238fddd72aff223817b2e1c3369b78f1fe83
ansible/roles/docker_config/tasks/main.yml
ansible/roles/docker_config/tasks/main.yml
--- - name: Add Github host key become: yes become_user: jenkins lineinfile: dest: "{{ jenkins_user_home }}/.ssh/known_hosts" create: yes state: present line: "{{ lookup('pipe', 'ssh-keyscan -t rsa github.com') }}" regexp: "^github\\.com" - name: Clone Git repo become: yes become_user: jenkins git: dest: "{{ repo_dir }}" repo: "{{ git_repo }}" force: yes version: "{{ branch }}" - name: Copy Jenkins config files become: yes become_user: jenkins copy: src: files/ dest: "{{ repo_dir }}/docker/jenkins/bootstrap" - name: Process Jenkins templates become: yes become_user: jenkins shell: "{{ repo_dir }}/docker/jenkins/build.sh" - name: Jenkins init config become: yes become_user: jenkins shell: "{{ repo_dir }}/docker/jenkins/init.sh"
--- - name: Add Github host key become: yes become_user: jenkins lineinfile: dest: "{{ jenkins_user_home }}/.ssh/known_hosts" create: yes state: present line: "{{ lookup('pipe', 'ssh-keyscan -t rsa github.com') }}" regexp: "^github\\.com" - name: Configure Git become: yes become_user: jenkins git_config: name: "{{ item.name }}" scope: global value: "{{ item.value }}" with_items: - name: user.name value: Jenkins CI - name: user.email value: jenkins@unguiculus.io - name: alias.st value: status - name: alias.co value: checkout - name: alias.l value: log --pretty=format:"%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%ci) %C(bold blue)<%an>%Creset" - name: alias.rhu value: reset --hard @{u} - name: Clone Git repo become: yes become_user: jenkins git: dest: "{{ repo_dir }}" repo: "{{ git_repo }}" force: yes version: "{{ branch }}" - name: Copy Jenkins config files become: yes become_user: jenkins copy: src: files/ dest: "{{ repo_dir }}/docker/jenkins/bootstrap" - name: Process Jenkins templates become: yes become_user: jenkins shell: "{{ repo_dir }}/docker/jenkins/build.sh" - name: Jenkins init config become: yes become_user: jenkins shell: "{{ repo_dir }}/docker/jenkins/init.sh"
Add Git configuration for jenkins user
Add Git configuration for jenkins user
YAML
apache-2.0
unguiculus/docker-jenkins-bootstrap
yaml
## Code Before: --- - name: Add Github host key become: yes become_user: jenkins lineinfile: dest: "{{ jenkins_user_home }}/.ssh/known_hosts" create: yes state: present line: "{{ lookup('pipe', 'ssh-keyscan -t rsa github.com') }}" regexp: "^github\\.com" - name: Clone Git repo become: yes become_user: jenkins git: dest: "{{ repo_dir }}" repo: "{{ git_repo }}" force: yes version: "{{ branch }}" - name: Copy Jenkins config files become: yes become_user: jenkins copy: src: files/ dest: "{{ repo_dir }}/docker/jenkins/bootstrap" - name: Process Jenkins templates become: yes become_user: jenkins shell: "{{ repo_dir }}/docker/jenkins/build.sh" - name: Jenkins init config become: yes become_user: jenkins shell: "{{ repo_dir }}/docker/jenkins/init.sh" ## Instruction: Add Git configuration for jenkins user ## Code After: --- - name: Add Github host key become: yes become_user: jenkins lineinfile: dest: "{{ jenkins_user_home }}/.ssh/known_hosts" create: yes state: present line: "{{ lookup('pipe', 'ssh-keyscan -t rsa github.com') }}" regexp: "^github\\.com" - name: Configure Git become: yes become_user: jenkins git_config: name: "{{ item.name }}" scope: global value: "{{ item.value }}" with_items: - name: user.name value: Jenkins CI - name: user.email value: jenkins@unguiculus.io - name: alias.st value: status - name: alias.co value: checkout - name: alias.l value: log --pretty=format:"%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%ci) %C(bold blue)<%an>%Creset" - name: alias.rhu value: reset --hard @{u} - name: Clone Git repo become: yes become_user: jenkins git: dest: "{{ repo_dir }}" repo: "{{ git_repo }}" force: yes version: "{{ branch }}" - name: Copy Jenkins config files become: yes become_user: jenkins copy: src: files/ dest: "{{ repo_dir }}/docker/jenkins/bootstrap" - name: Process Jenkins templates become: yes become_user: jenkins shell: "{{ repo_dir }}/docker/jenkins/build.sh" - name: Jenkins init config become: yes become_user: jenkins shell: "{{ repo_dir }}/docker/jenkins/init.sh"
--- - name: Add Github host key become: yes become_user: jenkins lineinfile: dest: "{{ jenkins_user_home }}/.ssh/known_hosts" create: yes state: present line: "{{ lookup('pipe', 'ssh-keyscan -t rsa github.com') }}" regexp: "^github\\.com" + + - name: Configure Git + become: yes + become_user: jenkins + git_config: + name: "{{ item.name }}" + scope: global + value: "{{ item.value }}" + with_items: + - name: user.name + value: Jenkins CI + - name: user.email + value: jenkins@unguiculus.io + - name: alias.st + value: status + - name: alias.co + value: checkout + - name: alias.l + value: log --pretty=format:"%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%ci) %C(bold blue)<%an>%Creset" + - name: alias.rhu + value: reset --hard @{u} - name: Clone Git repo become: yes become_user: jenkins git: dest: "{{ repo_dir }}" repo: "{{ git_repo }}" force: yes version: "{{ branch }}" - name: Copy Jenkins config files become: yes become_user: jenkins copy: src: files/ dest: "{{ repo_dir }}/docker/jenkins/bootstrap" - name: Process Jenkins templates become: yes become_user: jenkins shell: "{{ repo_dir }}/docker/jenkins/build.sh" - name: Jenkins init config become: yes become_user: jenkins shell: "{{ repo_dir }}/docker/jenkins/init.sh"
21
0.583333
21
0
5737f121c7a2c28b4923334b4b1edddd710d97f9
content_scripts/observers.js
content_scripts/observers.js
/// </// <reference path="data_functions.js" /> // function getSvg(){ // return document.getElementsByClassName("highcharts-container")[0].firstChild; // } function getAnalysisNavtab() { return document.getElementsByClassName("nav")[0].getElementsByTagName("li")[0]; } var svgObserver = new MutationObserver(function (mutations) { console.log({ svg: mutations }); }); var navtabObserver = new MutationObserver(function (mutations) { console.log({ tab: mutations }); }); function initObservers(svg, navtab) { var svgObserverConfig = { childList: true }; var navtabObserverConfig = { attributes: true, attributeOldValue: true, attributeFilter: ["class"] } svgObserver.observe(svg, svgObserverConfig); navtabObserver.observe(navtab || getAnalysisNavtab(), navtabObserverConfig); } function disconnectObservers() { svgObserver.disconnect(); navtabObserver.disconnect(); }
/// </// <reference path="data_functions.js" /> function getAnalysisNavtab() { return document.getElementsByClassName("nav")[0].getElementsByTagName("li")[0]; } var svgObserver = new MutationObserver(function (mutations) { //console.log({ svg: mutations }); var button = null; for (var i = 0; i < mutations[0].addedNodes.length; i++) { var element = mutations[0].addedNodes[i]; var classAtt = element.attributes["class"]; if (classAtt && classAtt.value === "highcharts-button") { button = element; break; } } if (button === null) return; button.addEventListener("click", function (e) { hideData(); }); }); var navtabObserver = new MutationObserver(function (mutations) { console.log({ tab: mutations }); }); function initObservers(svg, navtab) { var svgObserverConfig = { childList: true }; var navtabObserverConfig = { attributes: true, attributeOldValue: true, attributeFilter: ["class"] } svgObserver.observe(svg, svgObserverConfig); navtabObserver.observe(navtab || getAnalysisNavtab(), navtabObserverConfig); } function disconnectObservers() { svgObserver.disconnect(); navtabObserver.disconnect(); }
Hide data when "reset zoom" button is pressed.
Hide data when "reset zoom" button is pressed.
JavaScript
mit
mcibor/speedomondo
javascript
## Code Before: /// </// <reference path="data_functions.js" /> // function getSvg(){ // return document.getElementsByClassName("highcharts-container")[0].firstChild; // } function getAnalysisNavtab() { return document.getElementsByClassName("nav")[0].getElementsByTagName("li")[0]; } var svgObserver = new MutationObserver(function (mutations) { console.log({ svg: mutations }); }); var navtabObserver = new MutationObserver(function (mutations) { console.log({ tab: mutations }); }); function initObservers(svg, navtab) { var svgObserverConfig = { childList: true }; var navtabObserverConfig = { attributes: true, attributeOldValue: true, attributeFilter: ["class"] } svgObserver.observe(svg, svgObserverConfig); navtabObserver.observe(navtab || getAnalysisNavtab(), navtabObserverConfig); } function disconnectObservers() { svgObserver.disconnect(); navtabObserver.disconnect(); } ## Instruction: Hide data when "reset zoom" button is pressed. ## Code After: /// </// <reference path="data_functions.js" /> function getAnalysisNavtab() { return document.getElementsByClassName("nav")[0].getElementsByTagName("li")[0]; } var svgObserver = new MutationObserver(function (mutations) { //console.log({ svg: mutations }); var button = null; for (var i = 0; i < mutations[0].addedNodes.length; i++) { var element = mutations[0].addedNodes[i]; var classAtt = element.attributes["class"]; if (classAtt && classAtt.value === "highcharts-button") { button = element; break; } } if (button === null) return; button.addEventListener("click", function (e) { hideData(); }); }); var navtabObserver = new MutationObserver(function (mutations) { console.log({ tab: mutations }); }); function initObservers(svg, navtab) { var svgObserverConfig = { childList: true }; var navtabObserverConfig = { attributes: true, attributeOldValue: true, attributeFilter: ["class"] } svgObserver.observe(svg, svgObserverConfig); navtabObserver.observe(navtab || getAnalysisNavtab(), navtabObserverConfig); } function disconnectObservers() { svgObserver.disconnect(); navtabObserver.disconnect(); }
/// </// <reference path="data_functions.js" /> - // function getSvg(){ - // return document.getElementsByClassName("highcharts-container")[0].firstChild; - // } function getAnalysisNavtab() { return document.getElementsByClassName("nav")[0].getElementsByTagName("li")[0]; } var svgObserver = new MutationObserver(function (mutations) { - console.log({ svg: mutations }); + //console.log({ svg: mutations }); ? ++ + + var button = null; + for (var i = 0; i < mutations[0].addedNodes.length; i++) { + var element = mutations[0].addedNodes[i]; + var classAtt = element.attributes["class"]; + if (classAtt && classAtt.value === "highcharts-button") { + button = element; + break; + } + } + + if (button === null) + return; + + button.addEventListener("click", function (e) { + hideData(); + }); }); var navtabObserver = new MutationObserver(function (mutations) { console.log({ tab: mutations }); }); function initObservers(svg, navtab) { var svgObserverConfig = { childList: true }; var navtabObserverConfig = { attributes: true, attributeOldValue: true, attributeFilter: ["class"] } svgObserver.observe(svg, svgObserverConfig); navtabObserver.observe(navtab || getAnalysisNavtab(), navtabObserverConfig); } function disconnectObservers() { svgObserver.disconnect(); navtabObserver.disconnect(); }
22
0.666667
18
4
2e3d97a4b8fe20ff84b1e3706a61732ad3c49cc0
src/wirecloud/commons/test-data/src/context-inspector/config.xml
src/wirecloud/commons/test-data/src/context-inspector/config.xml
<?xml version="1.0" ?> <Template xmlns="http://morfeo-project.org/2007/Template"> <Catalog.ResourceDescription> <Vendor>Wirecloud</Vendor> <Name>context-inspector</Name> <DisplayName>Context Inspector</DisplayName> <Version>0.2</Version> <Author>aarranz</Author> <Mail>aarranz@conwet.com</Mail> <Description>This widget is used to test some of the features of the Wirecloud platform</Description> <ImageURI>images/catalogue.png</ImageURI> <iPhoneImageURI>images/catalogue_iphone.png</iPhoneImageURI> </Catalog.ResourceDescription> <Platform.Preferences> </Platform.Preferences> <Platform.StateProperties> </Platform.StateProperties> <Platform.Wiring> </Platform.Wiring> <Platform.Link> <XHTML content-type="application/xhtml+xml" href="context-inspector.html"/> </Platform.Link> <Platform.Rendering height="24" width="6"/> </Template>
<?xml version="1.0" ?> <Template xmlns="http://morfeo-project.org/2007/Template"> <Catalog.ResourceDescription> <Vendor>Wirecloud</Vendor> <Name>context-inspector</Name> <DisplayName>Context Inspector</DisplayName> <Version>0.2</Version> <Author>aarranz</Author> <Mail>aarranz@conwet.com</Mail> <Description>This widget is used to test some of the features of the Wirecloud platform</Description> <ImageURI>images/catalogue.png</ImageURI> <iPhoneImageURI>images/catalogue_iphone.png</iPhoneImageURI> </Catalog.ResourceDescription> <Platform.Preferences> </Platform.Preferences> <Platform.StateProperties> </Platform.StateProperties> <Platform.Wiring> </Platform.Wiring> <Platform.Link> <XHTML content-type="application/xhtml+xml" use-platform-style="true" href="context-inspector.html"/> </Platform.Link> <Platform.Rendering height="24" width="6"/> </Template>
Use platform style in the context-inspector widget
Use platform style in the context-inspector widget
XML
agpl-3.0
jpajuelo/wirecloud,rockneurotiko/wirecloud,rockneurotiko/wirecloud,jpajuelo/wirecloud,rockneurotiko/wirecloud,jpajuelo/wirecloud,jpajuelo/wirecloud,rockneurotiko/wirecloud
xml
## Code Before: <?xml version="1.0" ?> <Template xmlns="http://morfeo-project.org/2007/Template"> <Catalog.ResourceDescription> <Vendor>Wirecloud</Vendor> <Name>context-inspector</Name> <DisplayName>Context Inspector</DisplayName> <Version>0.2</Version> <Author>aarranz</Author> <Mail>aarranz@conwet.com</Mail> <Description>This widget is used to test some of the features of the Wirecloud platform</Description> <ImageURI>images/catalogue.png</ImageURI> <iPhoneImageURI>images/catalogue_iphone.png</iPhoneImageURI> </Catalog.ResourceDescription> <Platform.Preferences> </Platform.Preferences> <Platform.StateProperties> </Platform.StateProperties> <Platform.Wiring> </Platform.Wiring> <Platform.Link> <XHTML content-type="application/xhtml+xml" href="context-inspector.html"/> </Platform.Link> <Platform.Rendering height="24" width="6"/> </Template> ## Instruction: Use platform style in the context-inspector widget ## Code After: <?xml version="1.0" ?> <Template xmlns="http://morfeo-project.org/2007/Template"> <Catalog.ResourceDescription> <Vendor>Wirecloud</Vendor> <Name>context-inspector</Name> <DisplayName>Context Inspector</DisplayName> <Version>0.2</Version> <Author>aarranz</Author> <Mail>aarranz@conwet.com</Mail> <Description>This widget is used to test some of the features of the Wirecloud platform</Description> <ImageURI>images/catalogue.png</ImageURI> <iPhoneImageURI>images/catalogue_iphone.png</iPhoneImageURI> </Catalog.ResourceDescription> <Platform.Preferences> </Platform.Preferences> <Platform.StateProperties> </Platform.StateProperties> <Platform.Wiring> </Platform.Wiring> <Platform.Link> <XHTML content-type="application/xhtml+xml" use-platform-style="true" href="context-inspector.html"/> </Platform.Link> <Platform.Rendering height="24" width="6"/> </Template>
<?xml version="1.0" ?> <Template xmlns="http://morfeo-project.org/2007/Template"> <Catalog.ResourceDescription> <Vendor>Wirecloud</Vendor> <Name>context-inspector</Name> <DisplayName>Context Inspector</DisplayName> <Version>0.2</Version> <Author>aarranz</Author> <Mail>aarranz@conwet.com</Mail> <Description>This widget is used to test some of the features of the Wirecloud platform</Description> <ImageURI>images/catalogue.png</ImageURI> <iPhoneImageURI>images/catalogue_iphone.png</iPhoneImageURI> </Catalog.ResourceDescription> <Platform.Preferences> </Platform.Preferences> <Platform.StateProperties> </Platform.StateProperties> <Platform.Wiring> </Platform.Wiring> <Platform.Link> - <XHTML content-type="application/xhtml+xml" href="context-inspector.html"/> + <XHTML content-type="application/xhtml+xml" use-platform-style="true" href="context-inspector.html"/> ? ++++++++++++++++++++++++++ </Platform.Link> <Platform.Rendering height="24" width="6"/> </Template>
2
0.074074
1
1
954450756613209bf7f4b32909549af860bab3d1
app/components/node-stream.js
app/components/node-stream.js
import Ember from 'ember'; import moment from 'moment'; export default Ember.Component.extend({ /** * So what's the issue? * * Updating my data attribute doesn't trigger any changes * to the live-chart component! */ io: Ember.inject.service('socket-io'), serverUrl: 'localhost:8081', // Node identifier? Or node object? selectedNode: null, // How to model incoming sensor data? streamingObservations: Ember.A([]), init() { this._super(...arguments); this.set('streamingObservations', [{ 'data': Ember.A([]), 'name': 'electricThings' }]); const socket = this.get('io').socketFor('localhost:8081'); const appendObservations = function (newObs) { let hash = this.get('streamingObservations'); hash[0]['data'].pushObject([moment(), newObs.results]); this.set('streamingSeries', [{ 'data': hash[0]['data'].toArray(), 'name': '' }]); }; socket.on('data', appendObservations, this); }, actions: { connect() { }, disconnect() { } }, });
import Ember from 'ember'; import moment from 'moment'; export default Ember.Component.extend({ /** * So what's the issue? * * Updating my data attribute doesn't trigger any changes * to the live-chart component! */ io: Ember.inject.service('socket-io'), serverUrl: 'localhost:8081', // Node identifier? Or node object? selectedNode: null, // How to model incoming sensor data? streamingObservations: Ember.A([]), init() { this._super(...arguments); const socket = this.get('io').socketFor('localhost:8081'); const appendObservations = function (newObs) { const series = this.get('streamingObservations'); series.pushObject([moment(), newObs.results]); this.set('streamingSeries', [{ 'data': series.toArray(), 'name': '' }]); }; socket.on('data', appendObservations, this); }, actions: { connect() { }, disconnect() { } }, });
Remove unneccessary wrapper around observation container
Remove unneccessary wrapper around observation container
JavaScript
mit
UrbanCCD-UChicago/plenario-explorer,UrbanCCD-UChicago/plenario-explorer,UrbanCCD-UChicago/plenario-explorer
javascript
## Code Before: import Ember from 'ember'; import moment from 'moment'; export default Ember.Component.extend({ /** * So what's the issue? * * Updating my data attribute doesn't trigger any changes * to the live-chart component! */ io: Ember.inject.service('socket-io'), serverUrl: 'localhost:8081', // Node identifier? Or node object? selectedNode: null, // How to model incoming sensor data? streamingObservations: Ember.A([]), init() { this._super(...arguments); this.set('streamingObservations', [{ 'data': Ember.A([]), 'name': 'electricThings' }]); const socket = this.get('io').socketFor('localhost:8081'); const appendObservations = function (newObs) { let hash = this.get('streamingObservations'); hash[0]['data'].pushObject([moment(), newObs.results]); this.set('streamingSeries', [{ 'data': hash[0]['data'].toArray(), 'name': '' }]); }; socket.on('data', appendObservations, this); }, actions: { connect() { }, disconnect() { } }, }); ## Instruction: Remove unneccessary wrapper around observation container ## Code After: import Ember from 'ember'; import moment from 'moment'; export default Ember.Component.extend({ /** * So what's the issue? * * Updating my data attribute doesn't trigger any changes * to the live-chart component! */ io: Ember.inject.service('socket-io'), serverUrl: 'localhost:8081', // Node identifier? Or node object? selectedNode: null, // How to model incoming sensor data? streamingObservations: Ember.A([]), init() { this._super(...arguments); const socket = this.get('io').socketFor('localhost:8081'); const appendObservations = function (newObs) { const series = this.get('streamingObservations'); series.pushObject([moment(), newObs.results]); this.set('streamingSeries', [{ 'data': series.toArray(), 'name': '' }]); }; socket.on('data', appendObservations, this); }, actions: { connect() { }, disconnect() { } }, });
import Ember from 'ember'; import moment from 'moment'; export default Ember.Component.extend({ /** * So what's the issue? * * Updating my data attribute doesn't trigger any changes * to the live-chart component! */ io: Ember.inject.service('socket-io'), serverUrl: 'localhost:8081', // Node identifier? Or node object? selectedNode: null, // How to model incoming sensor data? streamingObservations: Ember.A([]), init() { this._super(...arguments); - this.set('streamingObservations', - [{ - 'data': Ember.A([]), - 'name': 'electricThings' - }]); - const socket = this.get('io').socketFor('localhost:8081'); const appendObservations = function (newObs) { - let hash = this.get('streamingObservations'); ? ^^ -- ^ + const series = this.get('streamingObservations'); ? ^^^^ ^^^^^ - hash[0]['data'].pushObject([moment(), newObs.results]); ? -- ^^^^^^^^^^^^ + series.pushObject([moment(), newObs.results]); ? ^^^^^ this.set('streamingSeries', [{ - 'data': hash[0]['data'].toArray(), ? -- ^^^^^^^^^^^^ + 'data': series.toArray(), ? ^^^^^ 'name': '' }]); }; socket.on('data', appendObservations, this); }, actions: { connect() { }, disconnect() { } }, });
12
0.230769
3
9
174a1a4d98db52ac1472f4268195a538e6626800
src/chunks/applyLight.glsl
src/chunks/applyLight.glsl
/** * Calculates the intensity of light on a surface. * * @method transpose * @private * * */ vec3 applyLight(in vec3 material) { int numLights = int(u_NumLights); float lambertianTerm; vec3 finalColor = vec3(0.0); vec3 normal = normalize(v_Normal); vec3 ambientLight = u_AmbientLight * material; vec3 eyeVector = vec3(-v_Position); vec3 diffuse, specular, lightDirection; for(int i = 0; i < 4; i++) { if (i >= numLights) break; diffuse = vec3(0.0, 0.0, 0.0); specular = vec3(0.0, 0.0, 0.0); lightDirection = normalize(u_LightPosition[i].xyz - v_Position); lambertianTerm = dot(lightDirection, normal); if (lambertianTerm > 0.0 && glossiness > 0.0) { diffuse = material * lambertianTerm; vec3 E = normalize(eyeVector); vec3 R = reflect(lightDirection, normal); float specularWeight = pow(max(dot(R, E), 0.0), glossiness); specular = u_LightColor[i].rgb * specularWeight; finalColor += diffuse + specular; } else { lambertianTerm = max(lambertianTerm, 0.0); finalColor += u_LightColor[i].rgb * material * lambertianTerm; } } return ambientLight + finalColor; } #pragma glslify: export(applyLight)
/** * Calculates the intensity of light on a surface. * * @method applyLight * @private * */ vec3 applyLight(in vec3 material) { int numLights = int(u_NumLights); vec3 ambientColor = u_AmbientLight * material; vec3 normal = normalize(v_Normal); vec3 center = resolution * 0.5; vec3 eyeVector = normalize(center - v_Position); vec3 specular = vec3(0.0); vec3 finalColor = vec3(0.0); for(int i = 0; i < 4; i++) { if (i >= numLights) break; vec3 lightDirection = normalize(u_LightPosition[i].xyz - v_Position); float lambertian = max(dot(lightDirection, normal), 0.0); vec3 diffuse = u_LightColor[i].rgb * material; if (lambertian > 0.0) { vec3 halfVector = normalize(lightDirection + eyeVector); float specularAngle = max(dot(halfVector, normal), 0.0); specular = u_LightColor[i].rgb * pow(specularAngle, glossiness * 10.0); if (glossiness > 0.0) finalColor += specular; } finalColor += lambertian * diffuse; } return ambientColor + finalColor; } #pragma glslify: export(applyLight)
Update lighting model to a faster reflection model
Feat: Update lighting model to a faster reflection model
GLSL
mit
yummy222/engine,alexanderGugel/engine,sonwh98/engine,andreaslangsays/engine,steveblue/engine,infamous/engine,prepare/engine,Bizboard/engine,arunabhdas/engine,Wanderfalke/engine,huanghjb/engine,noikiy/engine,codesdk/engine,avikalpa/engine,codesdk/engine,nmai/engine,andreaslangsays/engine,Morgantheplant/engine,trusktr/engine,Morgantheplant/engine,steveblue/engine,tbossert/engine,mcanthony/engine,avikalpa/engine,aug2uag/engine,noikiy/engine,TheAlphaNerd/engine,alexanderGugel/engine,beni55/engine,Wanderfalke/engine,prepare/engine,IjzerenHein/engine,manyoo/engine,talves/famous-engine,mcanthony/engine,infamous/famous-engine,trusktr/engine,infamous/famous-engine,artichox/engine,artichox/engine,sonwh98/engine,manyoo/engine,CedarLogic/engine,redwoodfavorite/engine,redwoodfavorite/engine,yummy222/engine,beni55/engine,arunabhdas/engine,aug2uag/engine,Famous/engine,woltemade/engine,IjzerenHein/engine,huanghjb/engine,TheAlphaNerd/engine,Bizboard/engine,tbossert/engine,nmai/engine,talves/famous-engine,CedarLogic/engine,infamous/engine,Famous/engine,woltemade/engine
glsl
## Code Before: /** * Calculates the intensity of light on a surface. * * @method transpose * @private * * */ vec3 applyLight(in vec3 material) { int numLights = int(u_NumLights); float lambertianTerm; vec3 finalColor = vec3(0.0); vec3 normal = normalize(v_Normal); vec3 ambientLight = u_AmbientLight * material; vec3 eyeVector = vec3(-v_Position); vec3 diffuse, specular, lightDirection; for(int i = 0; i < 4; i++) { if (i >= numLights) break; diffuse = vec3(0.0, 0.0, 0.0); specular = vec3(0.0, 0.0, 0.0); lightDirection = normalize(u_LightPosition[i].xyz - v_Position); lambertianTerm = dot(lightDirection, normal); if (lambertianTerm > 0.0 && glossiness > 0.0) { diffuse = material * lambertianTerm; vec3 E = normalize(eyeVector); vec3 R = reflect(lightDirection, normal); float specularWeight = pow(max(dot(R, E), 0.0), glossiness); specular = u_LightColor[i].rgb * specularWeight; finalColor += diffuse + specular; } else { lambertianTerm = max(lambertianTerm, 0.0); finalColor += u_LightColor[i].rgb * material * lambertianTerm; } } return ambientLight + finalColor; } #pragma glslify: export(applyLight) ## Instruction: Feat: Update lighting model to a faster reflection model ## Code After: /** * Calculates the intensity of light on a surface. * * @method applyLight * @private * */ vec3 applyLight(in vec3 material) { int numLights = int(u_NumLights); vec3 ambientColor = u_AmbientLight * material; vec3 normal = normalize(v_Normal); vec3 center = resolution * 0.5; vec3 eyeVector = normalize(center - v_Position); vec3 specular = vec3(0.0); vec3 finalColor = vec3(0.0); for(int i = 0; i < 4; i++) { if (i >= numLights) break; vec3 lightDirection = normalize(u_LightPosition[i].xyz - v_Position); float lambertian = max(dot(lightDirection, normal), 0.0); vec3 diffuse = u_LightColor[i].rgb * material; if (lambertian > 0.0) { vec3 halfVector = normalize(lightDirection + eyeVector); float specularAngle = max(dot(halfVector, normal), 0.0); specular = u_LightColor[i].rgb * pow(specularAngle, glossiness * 10.0); if (glossiness > 0.0) finalColor += specular; } finalColor += lambertian * diffuse; } return ambientColor + finalColor; } #pragma glslify: export(applyLight)
/** * Calculates the intensity of light on a surface. - * ? - + * - * @method transpose + * @method applyLight * @private * - * */ - vec3 applyLight(in vec3 material) { int numLights = int(u_NumLights); - float lambertianTerm; + vec3 ambientColor = u_AmbientLight * material; + vec3 normal = normalize(v_Normal); + vec3 center = resolution * 0.5; + vec3 eyeVector = normalize(center - v_Position); + vec3 specular = vec3(0.0); vec3 finalColor = vec3(0.0); - vec3 normal = normalize(v_Normal); - vec3 ambientLight = u_AmbientLight * material; - vec3 eyeVector = vec3(-v_Position); - vec3 diffuse, specular, lightDirection; for(int i = 0; i < 4; i++) { if (i >= numLights) break; - diffuse = vec3(0.0, 0.0, 0.0); - specular = vec3(0.0, 0.0, 0.0); - lightDirection = normalize(u_LightPosition[i].xyz - v_Position); + vec3 lightDirection = normalize(u_LightPosition[i].xyz - v_Position); ? +++++ - lambertianTerm = dot(lightDirection, normal); ? ---- + float lambertian = max(dot(lightDirection, normal), 0.0); ? ++++++ ++++ ++++++ - if (lambertianTerm > 0.0 && glossiness > 0.0) { - diffuse = material * lambertianTerm; - vec3 E = normalize(eyeVector); - vec3 R = reflect(lightDirection, normal); - float specularWeight = pow(max(dot(R, E), 0.0), glossiness); + vec3 diffuse = u_LightColor[i].rgb * material; + + if (lambertian > 0.0) { + vec3 halfVector = normalize(lightDirection + eyeVector); + float specularAngle = max(dot(halfVector, normal), 0.0); - specular = u_LightColor[i].rgb * specularWeight; ? ^ ^^^ + specular = u_LightColor[i].rgb * pow(specularAngle, glossiness * 10.0); ? ++++ ^^^^ +++++++ ^^^^^^^^^^^^ - finalColor += diffuse + specular; + if (glossiness > 0.0) finalColor += specular; } + + finalColor += lambertian * diffuse; - else { - lambertianTerm = max(lambertianTerm, 0.0); - finalColor += u_LightColor[i].rgb * material * lambertianTerm; - } } - return ambientLight + finalColor; ? ^^^^^ + return ambientColor + finalColor; ? ^^^^^ } #pragma glslify: export(applyLight)
44
1.047619
19
25
0a8350d98005ef25ea1de4b743d6346bbae9b173
citrination_client/base/errors.py
citrination_client/base/errors.py
class CitrinationClientError(Exception): pass class APIVersionMismatchException(CitrinationClientError): def __init__(self, message="Version mismatch with Citrination identified. Please check for available PyCC updates"): super(APIVersionMismatchException, self).__init__(message) class FeatureUnavailableException(CitrinationClientError): def __init__(self, message="Access to an unauthorized resource requested"): super(FeatureUnavailableException, self).__init__(message) class UnauthorizedAccessException(CitrinationClientError): def __init__(self, message="Access to an unauthorized resource requested"): super(UnauthorizedAccessException, self).__init__(message) class ResourceNotFoundException(CitrinationClientError): def __init__(self, message="Resource not found"): super(ResourceNotFoundException, self).__init__(message) class CitrinationServerErrorException(CitrinationClientError): def __init__(self, message=None): super(CitrinationServerErrorException, self).__init__(message) class RequestTimeoutException(CitrinationClientError): def __init__(self, message="Request to Citrination host timed out"): super(RequestTimeoutException, self).__init__(message) class RateLimitingException(CitrinationClientError): def __init__(self, message="Rate limit hit, throttle requests"): super(RateLimitingException, self).__init__(message)
class CitrinationClientError(Exception): def __init__(self, message=None, server_response=None): if message is not None and server_response is not None: message = "{}\nCitrination returned: {}".format(message, server_response) super(CitrinationClientError, self).__init__(message) class APIVersionMismatchException(CitrinationClientError): def __init__(self, message="Version mismatch with Citrination identified, server_response=None. Please check for available PyCC updates", server_response=None): super(APIVersionMismatchException, self).__init__(message) class FeatureUnavailableException(CitrinationClientError): def __init__(self, message="This feature is unavailable on your Citrination deployment", server_response=None): super(FeatureUnavailableException, self).__init__(message) class UnauthorizedAccessException(CitrinationClientError): def __init__(self, message="Access to an unauthorized resource requested", server_response=None): super(UnauthorizedAccessException, self).__init__(message) class ResourceNotFoundException(CitrinationClientError): def __init__(self, message="Resource not found", server_response=None): super(ResourceNotFoundException, self).__init__(message) class CitrinationServerErrorException(CitrinationClientError): def __init__(self, message=None, server_response=None): super(CitrinationServerErrorException, self).__init__(message) class RequestTimeoutException(CitrinationClientError): def __init__(self, message="Request to Citrination host timed out", server_response=None): super(RequestTimeoutException, self).__init__(message) class RateLimitingException(CitrinationClientError): def __init__(self, message="Rate limit hit, throttle requests", server_response=None): super(RateLimitingException, self).__init__(message)
Add Optional Server Response Parameter To Error Classes
Add Optional Server Response Parameter To Error Classes
Python
apache-2.0
CitrineInformatics/python-citrination-client
python
## Code Before: class CitrinationClientError(Exception): pass class APIVersionMismatchException(CitrinationClientError): def __init__(self, message="Version mismatch with Citrination identified. Please check for available PyCC updates"): super(APIVersionMismatchException, self).__init__(message) class FeatureUnavailableException(CitrinationClientError): def __init__(self, message="Access to an unauthorized resource requested"): super(FeatureUnavailableException, self).__init__(message) class UnauthorizedAccessException(CitrinationClientError): def __init__(self, message="Access to an unauthorized resource requested"): super(UnauthorizedAccessException, self).__init__(message) class ResourceNotFoundException(CitrinationClientError): def __init__(self, message="Resource not found"): super(ResourceNotFoundException, self).__init__(message) class CitrinationServerErrorException(CitrinationClientError): def __init__(self, message=None): super(CitrinationServerErrorException, self).__init__(message) class RequestTimeoutException(CitrinationClientError): def __init__(self, message="Request to Citrination host timed out"): super(RequestTimeoutException, self).__init__(message) class RateLimitingException(CitrinationClientError): def __init__(self, message="Rate limit hit, throttle requests"): super(RateLimitingException, self).__init__(message) ## Instruction: Add Optional Server Response Parameter To Error Classes ## Code After: class CitrinationClientError(Exception): def __init__(self, message=None, server_response=None): if message is not None and server_response is not None: message = "{}\nCitrination returned: {}".format(message, server_response) super(CitrinationClientError, self).__init__(message) class APIVersionMismatchException(CitrinationClientError): def __init__(self, message="Version mismatch with Citrination identified, server_response=None. Please check for available PyCC updates", server_response=None): super(APIVersionMismatchException, self).__init__(message) class FeatureUnavailableException(CitrinationClientError): def __init__(self, message="This feature is unavailable on your Citrination deployment", server_response=None): super(FeatureUnavailableException, self).__init__(message) class UnauthorizedAccessException(CitrinationClientError): def __init__(self, message="Access to an unauthorized resource requested", server_response=None): super(UnauthorizedAccessException, self).__init__(message) class ResourceNotFoundException(CitrinationClientError): def __init__(self, message="Resource not found", server_response=None): super(ResourceNotFoundException, self).__init__(message) class CitrinationServerErrorException(CitrinationClientError): def __init__(self, message=None, server_response=None): super(CitrinationServerErrorException, self).__init__(message) class RequestTimeoutException(CitrinationClientError): def __init__(self, message="Request to Citrination host timed out", server_response=None): super(RequestTimeoutException, self).__init__(message) class RateLimitingException(CitrinationClientError): def __init__(self, message="Rate limit hit, throttle requests", server_response=None): super(RateLimitingException, self).__init__(message)
class CitrinationClientError(Exception): - pass + + def __init__(self, message=None, server_response=None): + if message is not None and server_response is not None: + message = "{}\nCitrination returned: {}".format(message, server_response) + super(CitrinationClientError, self).__init__(message) class APIVersionMismatchException(CitrinationClientError): - def __init__(self, message="Version mismatch with Citrination identified. Please check for available PyCC updates"): + def __init__(self, message="Version mismatch with Citrination identified, server_response=None. Please check for available PyCC updates", server_response=None): ? ++++++++++++++++++++++ ++++++++++++++++++++++ super(APIVersionMismatchException, self).__init__(message) class FeatureUnavailableException(CitrinationClientError): - def __init__(self, message="Access to an unauthorized resource requested"): + def __init__(self, message="This feature is unavailable on your Citrination deployment", server_response=None): super(FeatureUnavailableException, self).__init__(message) class UnauthorizedAccessException(CitrinationClientError): - def __init__(self, message="Access to an unauthorized resource requested"): + def __init__(self, message="Access to an unauthorized resource requested", server_response=None): ? ++++++++++++++++++++++ super(UnauthorizedAccessException, self).__init__(message) class ResourceNotFoundException(CitrinationClientError): - def __init__(self, message="Resource not found"): + def __init__(self, message="Resource not found", server_response=None): ? ++++++++++++++++++++++ super(ResourceNotFoundException, self).__init__(message) class CitrinationServerErrorException(CitrinationClientError): - def __init__(self, message=None): + def __init__(self, message=None, server_response=None): ? ++++++++++++++++++++++ super(CitrinationServerErrorException, self).__init__(message) class RequestTimeoutException(CitrinationClientError): - def __init__(self, message="Request to Citrination host timed out"): + def __init__(self, message="Request to Citrination host timed out", server_response=None): ? ++++++++++++++++++++++ super(RequestTimeoutException, self).__init__(message) class RateLimitingException(CitrinationClientError): - def __init__(self, message="Rate limit hit, throttle requests"): + def __init__(self, message="Rate limit hit, throttle requests", server_response=None): ? ++++++++++++++++++++++ super(RateLimitingException, self).__init__(message)
20
0.540541
12
8
95604d3da4696d799af0446d9fa293316c7010f5
app/styles/sidebar-list.scss
app/styles/sidebar-list.scss
.list { border-top: 1px solid #eee; border-bottom: 1px solid #eee; } .list-item { display: flex; /* establish flex container */ flex-direction: row; /* make main axis horizontal */ justify-content: flex-start; /* center items vertically, in this case */ align-items: center; /* center items horizontally, in this case */ padding: 10px 10px; border-bottom: 1px solid #eee; } .list-item:last-child { border:none; } .list-item-icon { width: 40px; margin: 10px; display: flex; flex-direction: row; justify-content: center; align-items: center; } .list-item-description { width: 320px; .content { color: #333; font-size: 16px; } .time { color: #999; font-weight: 300; font-size: 12px; margin: 3px 0px; } }
.list { border-top: 1px solid #eee; border-bottom: 1px solid #eee; height: 570px; overflow-y: scroll; } .list-item { display: flex; /* establish flex container */ flex-direction: row; /* make main axis horizontal */ justify-content: flex-start; /* flush items to the left */ align-items: center; /* center items vertically */ padding: 10px 10px; border-bottom: 1px solid #eee; } .list-item:last-child { border:none; } .list-item-icon { width: 40px; margin: 10px; display: flex; flex-direction: row; justify-content: center; align-items: center; } .list-item-description { width: 320px; .content { color: #333; font-size: 16px; } .time { color: #999; font-weight: 300; font-size: 12px; margin: 3px 0px; } }
Make sidepanel's list to scroll when it overflows
Make sidepanel's list to scroll when it overflows
SCSS
mit
TrailSec/TrailSec-WebUI,TrailSec/TrailSec-WebUI
scss
## Code Before: .list { border-top: 1px solid #eee; border-bottom: 1px solid #eee; } .list-item { display: flex; /* establish flex container */ flex-direction: row; /* make main axis horizontal */ justify-content: flex-start; /* center items vertically, in this case */ align-items: center; /* center items horizontally, in this case */ padding: 10px 10px; border-bottom: 1px solid #eee; } .list-item:last-child { border:none; } .list-item-icon { width: 40px; margin: 10px; display: flex; flex-direction: row; justify-content: center; align-items: center; } .list-item-description { width: 320px; .content { color: #333; font-size: 16px; } .time { color: #999; font-weight: 300; font-size: 12px; margin: 3px 0px; } } ## Instruction: Make sidepanel's list to scroll when it overflows ## Code After: .list { border-top: 1px solid #eee; border-bottom: 1px solid #eee; height: 570px; overflow-y: scroll; } .list-item { display: flex; /* establish flex container */ flex-direction: row; /* make main axis horizontal */ justify-content: flex-start; /* flush items to the left */ align-items: center; /* center items vertically */ padding: 10px 10px; border-bottom: 1px solid #eee; } .list-item:last-child { border:none; } .list-item-icon { width: 40px; margin: 10px; display: flex; flex-direction: row; justify-content: center; align-items: center; } .list-item-description { width: 320px; .content { color: #333; font-size: 16px; } .time { color: #999; font-weight: 300; font-size: 12px; margin: 3px 0px; } }
.list { border-top: 1px solid #eee; border-bottom: 1px solid #eee; + height: 570px; + overflow-y: scroll; } .list-item { display: flex; /* establish flex container */ flex-direction: row; /* make main axis horizontal */ - justify-content: flex-start; /* center items vertically, in this case */ + justify-content: flex-start; /* flush items to the left */ - align-items: center; /* center items horizontally, in this case */ ? ^^ ^^^^ -------------- + align-items: center; /* center items vertically */ ? ^^ + ^ padding: 10px 10px; border-bottom: 1px solid #eee; } .list-item:last-child { border:none; } .list-item-icon { width: 40px; margin: 10px; display: flex; flex-direction: row; justify-content: center; align-items: center; } .list-item-description { width: 320px; .content { color: #333; font-size: 16px; } .time { color: #999; font-weight: 300; font-size: 12px; margin: 3px 0px; } }
6
0.146341
4
2
927b281a1f3987af179590fab1126f0e0973612b
.travis.yml
.travis.yml
language: ruby rvm: - "2.2" - "2.3.0" - "2.4.0" sudo: false cache: bundler script: bundle exec rake $TASK env: - TASK=test - TASK=rubocop
language: ruby rvm: - "2.2" - "2.3.0" - "2.4.0" - "2.5.0" sudo: false cache: bundler script: bundle exec rake $TASK env: - TASK=test - TASK=rubocop
Add ruby 2.5.0 to Travis test matrix
Add ruby 2.5.0 to Travis test matrix
YAML
mit
abonas/kubeclient,moolitayer/kubeclient
yaml
## Code Before: language: ruby rvm: - "2.2" - "2.3.0" - "2.4.0" sudo: false cache: bundler script: bundle exec rake $TASK env: - TASK=test - TASK=rubocop ## Instruction: Add ruby 2.5.0 to Travis test matrix ## Code After: language: ruby rvm: - "2.2" - "2.3.0" - "2.4.0" - "2.5.0" sudo: false cache: bundler script: bundle exec rake $TASK env: - TASK=test - TASK=rubocop
language: ruby rvm: - "2.2" - "2.3.0" - "2.4.0" + - "2.5.0" sudo: false cache: bundler script: bundle exec rake $TASK env: - TASK=test - TASK=rubocop
1
0.090909
1
0
82cb6d190ce1e805914cc791518c97e063ecdc96
tests/test_individual.py
tests/test_individual.py
import sys, os myPath = os.path.dirname(os.path.abspath(__file__)) print(myPath) sys.path.insert(0, myPath + '/../SATSolver') from unittest import TestCase from individual import Individual from BitVector import BitVector from bitarray import bitarray class TestIndividual(TestCase): """ Testing class for Individual. """ def test_get(self): ind = Individual(9) ind.data = bitarray("011010100") self.assertEqual(ind.get(5), 1) self.assertEqual(ind.get(1), 0) self.assertEqual(ind.get(10), None) def test_set(self): ind = Individual(9) ind.data = bitarray("011010100") ind.set(2, 1) self.assertEqual(ind.get(2), 1) ind.set(7, 0) self.assertEqual(ind.get(7), 0) ind.set(6, 1) self.assertEqual(ind.get(6), 1) def test_flip(self): ind = Individual(9) ind.data = bitarray("011010100") ind.flip(1) self.assertEqual(ind.get(1), 1) ind.flip(8) self.assertEqual(ind.get(8), 1) ind.flip(4) self.assertEqual(ind.get(4), 1)
import sys, os myPath = os.path.dirname(os.path.abspath(__file__)) print(myPath) sys.path.insert(0, myPath + '/../SATSolver') from unittest import TestCase from individual import Individual from bitarray import bitarray class TestIndividual(TestCase): """ Testing class for Individual. """ def test_get(self): ind = Individual(9) ind.data = bitarray("011010100") self.assertEqual(ind.get(5), 1) self.assertEqual(ind.get(1), 0) self.assertEqual(ind.get(10), None) def test_set(self): ind = Individual(9) ind.data = bitarray("011010100") ind.set(2, 1) self.assertEqual(ind.get(2), 1) ind.set(7, 0) self.assertEqual(ind.get(7), 0) ind.set(6, 1) self.assertEqual(ind.get(6), 1) def test_flip(self): ind = Individual(9) ind.data = bitarray("011010100") ind.flip(1) self.assertEqual(ind.get(1), 1) ind.flip(8) self.assertEqual(ind.get(8), 1) ind.flip(4) self.assertEqual(ind.get(4), 1)
Remove BitVector import - Build fails
Remove BitVector import - Build fails
Python
mit
Imperium-Software/resolver,Imperium-Software/resolver,Imperium-Software/resolver,Imperium-Software/resolver
python
## Code Before: import sys, os myPath = os.path.dirname(os.path.abspath(__file__)) print(myPath) sys.path.insert(0, myPath + '/../SATSolver') from unittest import TestCase from individual import Individual from BitVector import BitVector from bitarray import bitarray class TestIndividual(TestCase): """ Testing class for Individual. """ def test_get(self): ind = Individual(9) ind.data = bitarray("011010100") self.assertEqual(ind.get(5), 1) self.assertEqual(ind.get(1), 0) self.assertEqual(ind.get(10), None) def test_set(self): ind = Individual(9) ind.data = bitarray("011010100") ind.set(2, 1) self.assertEqual(ind.get(2), 1) ind.set(7, 0) self.assertEqual(ind.get(7), 0) ind.set(6, 1) self.assertEqual(ind.get(6), 1) def test_flip(self): ind = Individual(9) ind.data = bitarray("011010100") ind.flip(1) self.assertEqual(ind.get(1), 1) ind.flip(8) self.assertEqual(ind.get(8), 1) ind.flip(4) self.assertEqual(ind.get(4), 1) ## Instruction: Remove BitVector import - Build fails ## Code After: import sys, os myPath = os.path.dirname(os.path.abspath(__file__)) print(myPath) sys.path.insert(0, myPath + '/../SATSolver') from unittest import TestCase from individual import Individual from bitarray import bitarray class TestIndividual(TestCase): """ Testing class for Individual. """ def test_get(self): ind = Individual(9) ind.data = bitarray("011010100") self.assertEqual(ind.get(5), 1) self.assertEqual(ind.get(1), 0) self.assertEqual(ind.get(10), None) def test_set(self): ind = Individual(9) ind.data = bitarray("011010100") ind.set(2, 1) self.assertEqual(ind.get(2), 1) ind.set(7, 0) self.assertEqual(ind.get(7), 0) ind.set(6, 1) self.assertEqual(ind.get(6), 1) def test_flip(self): ind = Individual(9) ind.data = bitarray("011010100") ind.flip(1) self.assertEqual(ind.get(1), 1) ind.flip(8) self.assertEqual(ind.get(8), 1) ind.flip(4) self.assertEqual(ind.get(4), 1)
import sys, os myPath = os.path.dirname(os.path.abspath(__file__)) print(myPath) sys.path.insert(0, myPath + '/../SATSolver') from unittest import TestCase from individual import Individual - from BitVector import BitVector from bitarray import bitarray class TestIndividual(TestCase): """ Testing class for Individual. """ def test_get(self): ind = Individual(9) ind.data = bitarray("011010100") self.assertEqual(ind.get(5), 1) self.assertEqual(ind.get(1), 0) self.assertEqual(ind.get(10), None) def test_set(self): ind = Individual(9) ind.data = bitarray("011010100") ind.set(2, 1) self.assertEqual(ind.get(2), 1) ind.set(7, 0) self.assertEqual(ind.get(7), 0) ind.set(6, 1) self.assertEqual(ind.get(6), 1) def test_flip(self): ind = Individual(9) ind.data = bitarray("011010100") ind.flip(1) self.assertEqual(ind.get(1), 1) ind.flip(8) self.assertEqual(ind.get(8), 1) ind.flip(4) self.assertEqual(ind.get(4), 1)
1
0.023256
0
1
7ce81f012ba860ff011814553ea936af679bb49f
.semaphore/semaphore.yml
.semaphore/semaphore.yml
version: v1.0 name: Test Atlas agent: machine: type: e1-standard-2 os_image: ubuntu2004 blocks: - name: RSpec task: env_vars: - name: DATABASE_HOST value: localhost jobs: - name: Test commands: - checkout - sem-version ruby $RUBY_VERSION - gem install bundler -v ">= 2.0" - bundle install - bundle exec rspec --format RspecJunitFormatter --out junit.xml --format progress matrix: - env_var: RUBY_VERSION values: - 2.7.5 - 3.1.1 epilogue: always: commands: - test-results publish junit.xml
version: v1.0 name: Test Atlas agent: machine: type: e1-standard-2 os_image: ubuntu2004 blocks: - name: RSpec task: jobs: - name: Test commands: - checkout - sem-version ruby $RUBY_VERSION - gem install bundler -v ">= 2.0" - bundle install - bundle exec rspec --format RspecJunitFormatter --out junit.xml --format progress matrix: - env_var: RUBY_VERSION values: - 2.7.5 - 3.1.1 secrets: - name: Atlas epilogue: always: commands: - test-results publish junit.xml
Add CodeCov env when running CI
Add CodeCov env when running CI
YAML
mit
quintel/atlas
yaml
## Code Before: version: v1.0 name: Test Atlas agent: machine: type: e1-standard-2 os_image: ubuntu2004 blocks: - name: RSpec task: env_vars: - name: DATABASE_HOST value: localhost jobs: - name: Test commands: - checkout - sem-version ruby $RUBY_VERSION - gem install bundler -v ">= 2.0" - bundle install - bundle exec rspec --format RspecJunitFormatter --out junit.xml --format progress matrix: - env_var: RUBY_VERSION values: - 2.7.5 - 3.1.1 epilogue: always: commands: - test-results publish junit.xml ## Instruction: Add CodeCov env when running CI ## Code After: version: v1.0 name: Test Atlas agent: machine: type: e1-standard-2 os_image: ubuntu2004 blocks: - name: RSpec task: jobs: - name: Test commands: - checkout - sem-version ruby $RUBY_VERSION - gem install bundler -v ">= 2.0" - bundle install - bundle exec rspec --format RspecJunitFormatter --out junit.xml --format progress matrix: - env_var: RUBY_VERSION values: - 2.7.5 - 3.1.1 secrets: - name: Atlas epilogue: always: commands: - test-results publish junit.xml
version: v1.0 name: Test Atlas agent: machine: type: e1-standard-2 os_image: ubuntu2004 blocks: - name: RSpec task: - env_vars: - - name: DATABASE_HOST - value: localhost jobs: - name: Test commands: - checkout - sem-version ruby $RUBY_VERSION - gem install bundler -v ">= 2.0" - bundle install - bundle exec rspec --format RspecJunitFormatter --out junit.xml --format progress matrix: - env_var: RUBY_VERSION values: - 2.7.5 - 3.1.1 + secrets: + - name: Atlas epilogue: always: commands: - test-results publish junit.xml
5
0.172414
2
3
9ab30907ea73fb559b7f8ebdcf58ad5fee92fc50
lib/PDB/secondary_structure.rb
lib/PDB/secondary_structure.rb
module PDB class SecondaryStructure attr_reader :structure, :subtype_index def initialize(type_of, subclass_index) @structure = type_of @subtype_index = subclass_index end end end
module PDB # From Stride Documentation # H alpha helix # G 3-10 # I PI helix # Extended conformation # T turn - many types # C coil class SecondaryStructure attr_reader :structure, :subtype_index def initialize(type_of, subclass_index) @structure = type_of @subtype_index = subclass_index end end end
Add some annotation of secondary structure from STRIDE documentation
Add some annotation of secondary structure from STRIDE documentation
Ruby
mit
rambor/PDBTools
ruby
## Code Before: module PDB class SecondaryStructure attr_reader :structure, :subtype_index def initialize(type_of, subclass_index) @structure = type_of @subtype_index = subclass_index end end end ## Instruction: Add some annotation of secondary structure from STRIDE documentation ## Code After: module PDB # From Stride Documentation # H alpha helix # G 3-10 # I PI helix # Extended conformation # T turn - many types # C coil class SecondaryStructure attr_reader :structure, :subtype_index def initialize(type_of, subclass_index) @structure = type_of @subtype_index = subclass_index end end end
module PDB + # From Stride Documentation + # H alpha helix + # G 3-10 + # I PI helix + # Extended conformation + # T turn - many types + # C coil class SecondaryStructure attr_reader :structure, :subtype_index def initialize(type_of, subclass_index) @structure = type_of @subtype_index = subclass_index end end + + end
9
0.6
9
0
b60155c7ce74bfff5e1c23f733fbd87847dc1a17
bootstrap.sh
bootstrap.sh
sudo su # Check if dnsmasq package is installed if [[ ! -n $(dpkg -l | grep dnsmasq) ]]; then # Update apt repositories apt-get -y update # Install requirements for further unattended installation #apt-get install -y python-software-properties vim git subversion curl build-essential fi
dnsmasqconfig="$(cat <<-ENDOFCONFIG no-dhcp-interface= server=8.8.8.8 no-hosts addn-hosts=/etc/dnsmasq.hosts ENDOFCONFIG )" # Make sure to use root user sudo su # Check if dnsmasq package is installed if [[ ! -n $(dpkg -l | grep dnsmasq) ]]; then # Update apt repositories apt-get -y update # Install ... apt-get install -y curl vim git build-essential # ... requirements apt-get install -y apache2 php5 libapache2-mod-php5 php5-mysql # ... web server + php apt-get install -y dnsmasq # ... dnsmasq # Base config for dnsmasq echo "$dnsmasqconfig" > /etc/dnsmasq.conf echo "1.2.3.4 this.is.a.tld.test" >> /etc/dnsmasq.hosts # Restart dnsmasq service dnsmasq restart echo "Done! Try to run the following command on your host to test the DNS server:" echo "$ dig this.is.a.tld.test @192.168.33.10 +short" fi
Install dnsmasq and apply minimal configuration file
Install dnsmasq and apply minimal configuration file
Shell
mit
cam5/hostkeeper,frdmn/hostkeeper,frdmn/hostkeeper,cam5/hostkeeper,frdmn/hostkeeper,cam5/hostkeeper
shell
## Code Before: sudo su # Check if dnsmasq package is installed if [[ ! -n $(dpkg -l | grep dnsmasq) ]]; then # Update apt repositories apt-get -y update # Install requirements for further unattended installation #apt-get install -y python-software-properties vim git subversion curl build-essential fi ## Instruction: Install dnsmasq and apply minimal configuration file ## Code After: dnsmasqconfig="$(cat <<-ENDOFCONFIG no-dhcp-interface= server=8.8.8.8 no-hosts addn-hosts=/etc/dnsmasq.hosts ENDOFCONFIG )" # Make sure to use root user sudo su # Check if dnsmasq package is installed if [[ ! -n $(dpkg -l | grep dnsmasq) ]]; then # Update apt repositories apt-get -y update # Install ... apt-get install -y curl vim git build-essential # ... requirements apt-get install -y apache2 php5 libapache2-mod-php5 php5-mysql # ... web server + php apt-get install -y dnsmasq # ... dnsmasq # Base config for dnsmasq echo "$dnsmasqconfig" > /etc/dnsmasq.conf echo "1.2.3.4 this.is.a.tld.test" >> /etc/dnsmasq.hosts # Restart dnsmasq service dnsmasq restart echo "Done! Try to run the following command on your host to test the DNS server:" echo "$ dig this.is.a.tld.test @192.168.33.10 +short" fi
+ dnsmasqconfig="$(cat <<-ENDOFCONFIG + no-dhcp-interface= + server=8.8.8.8 + + no-hosts + addn-hosts=/etc/dnsmasq.hosts + ENDOFCONFIG + )" + + # Make sure to use root user sudo su # Check if dnsmasq package is installed if [[ ! -n $(dpkg -l | grep dnsmasq) ]]; then # Update apt repositories apt-get -y update - # Install requirements for further unattended installation - #apt-get install -y python-software-properties vim git subversion curl build-essential + # Install ... + apt-get install -y curl vim git build-essential # ... requirements + apt-get install -y apache2 php5 libapache2-mod-php5 php5-mysql # ... web server + php + apt-get install -y dnsmasq # ... dnsmasq + # Base config for dnsmasq + echo "$dnsmasqconfig" > /etc/dnsmasq.conf + echo "1.2.3.4 this.is.a.tld.test" >> /etc/dnsmasq.hosts + # Restart dnsmasq + service dnsmasq restart + echo "Done! Try to run the following command on your host to test the DNS server:" + echo "$ dig this.is.a.tld.test @192.168.33.10 +short" fi
23
2.555556
21
2
989d2e6eb5aa10c877cdff21e49a0bda89eb6546
index.js
index.js
function Supercollider() { this.options = {}; this.searchOptions = {}; this.adapters = {}; this.tree = []; this.template = null; } Supercollider.prototype.init = require('./lib/init'); Supercollider.prototype.parse = require('./lib/parse'); Supercollider.prototype.build = require('./lib/build'); Supercollider.prototype.adapter = require('./lib/adapter'); Supercollider.prototype.config = require('./lib/config'); Supercollider.prototype.buildSearch = require('./lib/buildSearch'); Supercollider.prototype.searchConfig = require('./lib/searchConfig'); module.exports = new Supercollider();
function Supercollider() { this.options = {}; this.searchOptions = {}; this.adapters = {}; this.tree = []; this.template = null; } Supercollider.prototype.init = require('./lib/init'); Supercollider.prototype.parse = require('./lib/parse'); Supercollider.prototype.build = require('./lib/build'); Supercollider.prototype.adapter = require('./lib/adapter'); Supercollider.prototype.config = require('./lib/config'); Supercollider.prototype.buildSearch = require('./lib/buildSearch'); Supercollider.prototype.searchConfig = require('./lib/searchConfig'); module.exports = new Supercollider(); module.exports.Supercollider = Supercollider;
Add Supercollider class as a separate module export
Add Supercollider class as a separate module export
JavaScript
mit
gakimball/supercollider,spacedoc/spacedoc,spacedoc/spacedoc
javascript
## Code Before: function Supercollider() { this.options = {}; this.searchOptions = {}; this.adapters = {}; this.tree = []; this.template = null; } Supercollider.prototype.init = require('./lib/init'); Supercollider.prototype.parse = require('./lib/parse'); Supercollider.prototype.build = require('./lib/build'); Supercollider.prototype.adapter = require('./lib/adapter'); Supercollider.prototype.config = require('./lib/config'); Supercollider.prototype.buildSearch = require('./lib/buildSearch'); Supercollider.prototype.searchConfig = require('./lib/searchConfig'); module.exports = new Supercollider(); ## Instruction: Add Supercollider class as a separate module export ## Code After: function Supercollider() { this.options = {}; this.searchOptions = {}; this.adapters = {}; this.tree = []; this.template = null; } Supercollider.prototype.init = require('./lib/init'); Supercollider.prototype.parse = require('./lib/parse'); Supercollider.prototype.build = require('./lib/build'); Supercollider.prototype.adapter = require('./lib/adapter'); Supercollider.prototype.config = require('./lib/config'); Supercollider.prototype.buildSearch = require('./lib/buildSearch'); Supercollider.prototype.searchConfig = require('./lib/searchConfig'); module.exports = new Supercollider(); module.exports.Supercollider = Supercollider;
function Supercollider() { this.options = {}; this.searchOptions = {}; this.adapters = {}; this.tree = []; this.template = null; } Supercollider.prototype.init = require('./lib/init'); Supercollider.prototype.parse = require('./lib/parse'); Supercollider.prototype.build = require('./lib/build'); Supercollider.prototype.adapter = require('./lib/adapter'); Supercollider.prototype.config = require('./lib/config'); Supercollider.prototype.buildSearch = require('./lib/buildSearch'); Supercollider.prototype.searchConfig = require('./lib/searchConfig'); module.exports = new Supercollider(); + module.exports.Supercollider = Supercollider;
1
0.058824
1
0
df7f12046222ae1b263d9148d493182617edc611
numeric.h
numeric.h
template<class T> typename std::enable_if<!std::numeric_limits<T>::is_integer, bool>::type almost_equal(T x, T y, int ulp=2) { // the machine epsilon has to be scaled to the magnitude of the values used // and multiplied by the desired precision in ULPs (units in the last place) return std::abs(x-y) <= std::numeric_limits<T>::epsilon() * std::abs(x+y) * ulp // unless the result is subnormal || std::abs(x-y) < std::numeric_limits<T>::min(); } template<class T> T half(T x){} template <> float half(float x){return 0.5f * x;} template <> double half(double x){return 0.5 * x;} #endif
/** * @brief use of machine epsilon to compare floating-point values for equality * http://en.cppreference.com/w/cpp/types/numeric_limits/epsilon */ template<class T> typename std::enable_if<!std::numeric_limits<T>::is_integer, bool>::type almost_equal(T x, T y, int ulp=2) { // the machine epsilon has to be scaled to the magnitude of the values used // and multiplied by the desired precision in ULPs (units in the last place) return std::abs(x-y) <= std::numeric_limits<T>::epsilon() * std::abs(x+y) * ulp // unless the result is subnormal || std::abs(x-y) < std::numeric_limits<T>::min(); } template<class T> T half(T x){} template <> float half(float x){return 0.5f * x;} template <> double half(double x){return 0.5 * x;} #endif
Add reference for almost_equal function
Add reference for almost_equal function
C
mit
Bl4ckb0ne/delaunay-triangulation
c
## Code Before: template<class T> typename std::enable_if<!std::numeric_limits<T>::is_integer, bool>::type almost_equal(T x, T y, int ulp=2) { // the machine epsilon has to be scaled to the magnitude of the values used // and multiplied by the desired precision in ULPs (units in the last place) return std::abs(x-y) <= std::numeric_limits<T>::epsilon() * std::abs(x+y) * ulp // unless the result is subnormal || std::abs(x-y) < std::numeric_limits<T>::min(); } template<class T> T half(T x){} template <> float half(float x){return 0.5f * x;} template <> double half(double x){return 0.5 * x;} #endif ## Instruction: Add reference for almost_equal function ## Code After: /** * @brief use of machine epsilon to compare floating-point values for equality * http://en.cppreference.com/w/cpp/types/numeric_limits/epsilon */ template<class T> typename std::enable_if<!std::numeric_limits<T>::is_integer, bool>::type almost_equal(T x, T y, int ulp=2) { // the machine epsilon has to be scaled to the magnitude of the values used // and multiplied by the desired precision in ULPs (units in the last place) return std::abs(x-y) <= std::numeric_limits<T>::epsilon() * std::abs(x+y) * ulp // unless the result is subnormal || std::abs(x-y) < std::numeric_limits<T>::min(); } template<class T> T half(T x){} template <> float half(float x){return 0.5f * x;} template <> double half(double x){return 0.5 * x;} #endif
+ /** + * @brief use of machine epsilon to compare floating-point values for equality + * http://en.cppreference.com/w/cpp/types/numeric_limits/epsilon + */ template<class T> typename std::enable_if<!std::numeric_limits<T>::is_integer, bool>::type almost_equal(T x, T y, int ulp=2) { // the machine epsilon has to be scaled to the magnitude of the values used // and multiplied by the desired precision in ULPs (units in the last place) return std::abs(x-y) <= std::numeric_limits<T>::epsilon() * std::abs(x+y) * ulp // unless the result is subnormal - || std::abs(x-y) < std::numeric_limits<T>::min(); ? --- + || std::abs(x-y) < std::numeric_limits<T>::min(); } template<class T> T half(T x){} template <> float half(float x){return 0.5f * x;} template <> double half(double x){return 0.5 * x;} #endif
6
0.272727
5
1
153c50f257b0ab8fa5d8707d9f4680f209d5a817
.travis.yml
.travis.yml
language: node_js node_js: - "6.10.2" dist: trusty before_install: - sudo dpkg --add-architecture i386 - sudo apt-get update -qq install: - sudo apt-get install -y gcc-multilib nasm gdb script: - "./.travis-run-$TEST_SUITE.sh" env: - TEST_SUITE=unit - TEST_SUITE=integration - TEST_SUITE=unit-qemu - TEST_SUITE=nasm
language: node_js node_js: - "6.10.2" dist: trusty before_install: - sudo dpkg --add-architecture i386 - sudo apt-get update -qq install: - sudo apt-get install -y gcc-multilib nasm gdb script: - "./.travis-run-$TEST_SUITE.sh" env: - TEST_SUITE=unit - TEST_SUITE=integration - TEST_SUITE=unit-qemu - TEST_SUITE=nasm matrix: allow_failures: - env: TEST_SUITE=unit-qemu
Allow the QEMU test to fail
Allow the QEMU test to fail I haven't seen this one work yet. *shrugs*
YAML
bsd-2-clause
copy/v86,copy/v86,copy/v86,copy/v86,copy/v86,copy/v86,copy/v86
yaml
## Code Before: language: node_js node_js: - "6.10.2" dist: trusty before_install: - sudo dpkg --add-architecture i386 - sudo apt-get update -qq install: - sudo apt-get install -y gcc-multilib nasm gdb script: - "./.travis-run-$TEST_SUITE.sh" env: - TEST_SUITE=unit - TEST_SUITE=integration - TEST_SUITE=unit-qemu - TEST_SUITE=nasm ## Instruction: Allow the QEMU test to fail I haven't seen this one work yet. *shrugs* ## Code After: language: node_js node_js: - "6.10.2" dist: trusty before_install: - sudo dpkg --add-architecture i386 - sudo apt-get update -qq install: - sudo apt-get install -y gcc-multilib nasm gdb script: - "./.travis-run-$TEST_SUITE.sh" env: - TEST_SUITE=unit - TEST_SUITE=integration - TEST_SUITE=unit-qemu - TEST_SUITE=nasm matrix: allow_failures: - env: TEST_SUITE=unit-qemu
language: node_js node_js: - "6.10.2" dist: trusty before_install: - sudo dpkg --add-architecture i386 - sudo apt-get update -qq install: - sudo apt-get install -y gcc-multilib nasm gdb script: - "./.travis-run-$TEST_SUITE.sh" env: - TEST_SUITE=unit - TEST_SUITE=integration - TEST_SUITE=unit-qemu - TEST_SUITE=nasm + matrix: + allow_failures: + - env: TEST_SUITE=unit-qemu
3
0.1875
3
0
f1e91513d6bc4885fcb5b41e927eaa2f4f9b8596
.travis.yml
.travis.yml
arch: # Disabled for now #- amd64 # Handled via partner queue, uncharged - ppc64le #- arm64 jobs: include: - &run_tests # Template; subsequent uses modify 'env' env: - IMAGE=centos:centos7 TASK=tests COMPONENTS=udt,myproxy,ssh stage: test sudo: required services: - docker before_install: - sudo apt-get update - sleep 5 - sudo docker pull ${IMAGE} script: - travis-ci/setup_tasks.sh - <<: *run_tests env: - IMAGE=centos:centos7 TASK=tests COMPONENTS=gram5
os: linux dist: focal language: ruby # As per [1] explicitly included builds inherit the first value in an array. # [1]: https://docs.travis-ci.com/user/multi-cpu-architectures#example-multi-architecture-build-matrix # Hence the desired arch needs to be specified for each job additionally # below. #arch: # Disabled for now #- amd64 # Handled via partner queue, uncharged #- ppc64le #- arm64 jobs: include: - &run_tests # Template; subsequent uses modify 'env' arch: - ppc64le env: - IMAGE=centos:centos7 TASK=tests COMPONENTS=udt,myproxy,ssh stage: test services: - docker before_install: - sudo apt-get update - sleep 5 - sudo docker pull ${IMAGE} script: - travis-ci/setup_tasks.sh - <<: *run_tests arch: - arm64 - <<: *run_tests arch: - ppc64le env: - IMAGE=centos:centos7 TASK=tests COMPONENTS=gram5 - <<: *run_tests arch: - arm64 env: - IMAGE=centos:centos7 TASK=tests COMPONENTS=gram5
Change to Ubuntu Focal (20.04) as build environment on Travis Ci, cleanup configuration and enable builds on arm64, too.
Change to Ubuntu Focal (20.04) as build environment on Travis Ci, cleanup configuration and enable builds on arm64, too.
YAML
apache-2.0
gridcf/gct,gridcf/gct,gridcf/gct,gridcf/gct,gridcf/gct,gridcf/gct
yaml
## Code Before: arch: # Disabled for now #- amd64 # Handled via partner queue, uncharged - ppc64le #- arm64 jobs: include: - &run_tests # Template; subsequent uses modify 'env' env: - IMAGE=centos:centos7 TASK=tests COMPONENTS=udt,myproxy,ssh stage: test sudo: required services: - docker before_install: - sudo apt-get update - sleep 5 - sudo docker pull ${IMAGE} script: - travis-ci/setup_tasks.sh - <<: *run_tests env: - IMAGE=centos:centos7 TASK=tests COMPONENTS=gram5 ## Instruction: Change to Ubuntu Focal (20.04) as build environment on Travis Ci, cleanup configuration and enable builds on arm64, too. ## Code After: os: linux dist: focal language: ruby # As per [1] explicitly included builds inherit the first value in an array. # [1]: https://docs.travis-ci.com/user/multi-cpu-architectures#example-multi-architecture-build-matrix # Hence the desired arch needs to be specified for each job additionally # below. #arch: # Disabled for now #- amd64 # Handled via partner queue, uncharged #- ppc64le #- arm64 jobs: include: - &run_tests # Template; subsequent uses modify 'env' arch: - ppc64le env: - IMAGE=centos:centos7 TASK=tests COMPONENTS=udt,myproxy,ssh stage: test services: - docker before_install: - sudo apt-get update - sleep 5 - sudo docker pull ${IMAGE} script: - travis-ci/setup_tasks.sh - <<: *run_tests arch: - arm64 - <<: *run_tests arch: - ppc64le env: - IMAGE=centos:centos7 TASK=tests COMPONENTS=gram5 - <<: *run_tests arch: - arm64 env: - IMAGE=centos:centos7 TASK=tests COMPONENTS=gram5
+ os: linux + dist: focal + language: ruby + # As per [1] explicitly included builds inherit the first value in an array. + # [1]: https://docs.travis-ci.com/user/multi-cpu-architectures#example-multi-architecture-build-matrix + # Hence the desired arch needs to be specified for each job additionally + # below. - arch: + #arch: ? + # Disabled for now #- amd64 # Handled via partner queue, uncharged - - ppc64le + #- ppc64le ? + #- arm64 jobs: include: - &run_tests # Template; subsequent uses modify 'env' + arch: + - ppc64le env: - IMAGE=centos:centos7 TASK=tests COMPONENTS=udt,myproxy,ssh stage: test - sudo: required services: - docker before_install: - sudo apt-get update - sleep 5 - sudo docker pull ${IMAGE} script: - travis-ci/setup_tasks.sh + - <<: *run_tests + arch: + - arm64 + + - <<: *run_tests + arch: + - ppc64le env: - IMAGE=centos:centos7 TASK=tests COMPONENTS=gram5 + + - <<: *run_tests + arch: + - arm64 + env: + - IMAGE=centos:centos7 TASK=tests COMPONENTS=gram5
27
0.964286
24
3
2e68a71fb2e266ade6a07d265559b71fd1ae44ad
app/views/platform/open_data/index.html.haml
app/views/platform/open_data/index.html.haml
.page-header %h1 Open Data %p We are providing multiple CSV files into a zip file. #{link_to 'Click here to download', 'http://voxe.s3.amazonaws.com/open_data/voxe-2013-02-24.zip', class: 'btn small'}
.page-header %h1 Open Data %p We are providing multiple CSV files into a zip file. %p These data are under license #{link_to 'Creative Commons Attribution 3.0 France', 'http://creativecommons.org/licenses/by/3.0/fr/deed.en'}. %br #{link_to 'Click here to download', 'http://voxe.s3.amazonaws.com/open_data/voxe-2013-02-24.zip', class: 'btn small'}
Add CC licence on Open Data page
Add CC licence on Open Data page
Haml
apache-2.0
voxe/voxe-web,voxe/voxe-web,voxe/voxe-web
haml
## Code Before: .page-header %h1 Open Data %p We are providing multiple CSV files into a zip file. #{link_to 'Click here to download', 'http://voxe.s3.amazonaws.com/open_data/voxe-2013-02-24.zip', class: 'btn small'} ## Instruction: Add CC licence on Open Data page ## Code After: .page-header %h1 Open Data %p We are providing multiple CSV files into a zip file. %p These data are under license #{link_to 'Creative Commons Attribution 3.0 France', 'http://creativecommons.org/licenses/by/3.0/fr/deed.en'}. %br #{link_to 'Click here to download', 'http://voxe.s3.amazonaws.com/open_data/voxe-2013-02-24.zip', class: 'btn small'}
.page-header %h1 Open Data %p We are providing multiple CSV files into a zip file. + %p + These data are under license #{link_to 'Creative Commons Attribution 3.0 France', 'http://creativecommons.org/licenses/by/3.0/fr/deed.en'}. + %br #{link_to 'Click here to download', 'http://voxe.s3.amazonaws.com/open_data/voxe-2013-02-24.zip', class: 'btn small'}
3
0.5
3
0
d90f4fbc0106e5310adb8d5c11faddbe04641372
README.md
README.md
This repository contains all my Arduino experiments. They are realized with the [SparkFun Inventor's Kit](https://www.sparkfun.com/products/12001). * Morse encoder ([tutorial](http://www.jonathan-petitcolas.com/2014/03/16/2014-03-16-creating-morse-encoder-with-arduino.html) | [demonstration](http://www.youtube.com/watch?v=4H3hKid6ucA))
This repository contains all my Arduino experiments. They are realized with the [SparkFun Inventor's Kit](https://www.sparkfun.com/products/12001). * Morse encoder ([tutorial](http://www.jonathan-petitcolas.com/2014/03/16/creating-morse-encoder-with-arduino.html) | [demonstration](http://www.youtube.com/watch?v=4H3hKid6ucA))
Fix Morse encoder tutorial link
Fix Morse encoder tutorial link
Markdown
mit
jpetitcolas/arduino-experiments,jpetitcolas/arduino-experiments
markdown
## Code Before: This repository contains all my Arduino experiments. They are realized with the [SparkFun Inventor's Kit](https://www.sparkfun.com/products/12001). * Morse encoder ([tutorial](http://www.jonathan-petitcolas.com/2014/03/16/2014-03-16-creating-morse-encoder-with-arduino.html) | [demonstration](http://www.youtube.com/watch?v=4H3hKid6ucA)) ## Instruction: Fix Morse encoder tutorial link ## Code After: This repository contains all my Arduino experiments. They are realized with the [SparkFun Inventor's Kit](https://www.sparkfun.com/products/12001). * Morse encoder ([tutorial](http://www.jonathan-petitcolas.com/2014/03/16/creating-morse-encoder-with-arduino.html) | [demonstration](http://www.youtube.com/watch?v=4H3hKid6ucA))
This repository contains all my Arduino experiments. They are realized with the [SparkFun Inventor's Kit](https://www.sparkfun.com/products/12001). - * Morse encoder ([tutorial](http://www.jonathan-petitcolas.com/2014/03/16/2014-03-16-creating-morse-encoder-with-arduino.html) | [demonstration](http://www.youtube.com/watch?v=4H3hKid6ucA)) ? ----------- + * Morse encoder ([tutorial](http://www.jonathan-petitcolas.com/2014/03/16/creating-morse-encoder-with-arduino.html) | [demonstration](http://www.youtube.com/watch?v=4H3hKid6ucA))
2
0.5
1
1
e88616af00bd25d4c4b88184dfcb7d1823f2d809
.travis.yml
.travis.yml
language: python env: - TOXENV=py26 - TOXENV=py27 - TOXENV=py32 - TOXENV=py33 - TOXENV=py34 install: - travis_retry pip install tox==1.6.1 script: - travis_retry tox
language: python sudo: false env: - TOXENV=py26 - TOXENV=py27 - TOXENV=py32 - TOXENV=py33 - TOXENV=py34 install: - travis_retry pip install tox==1.6.1 script: - travis_retry tox
Use the new build env on Travis
Use the new build env on Travis
YAML
bsd-3-clause
mnaberez/supervisor_twiddler
yaml
## Code Before: language: python env: - TOXENV=py26 - TOXENV=py27 - TOXENV=py32 - TOXENV=py33 - TOXENV=py34 install: - travis_retry pip install tox==1.6.1 script: - travis_retry tox ## Instruction: Use the new build env on Travis ## Code After: language: python sudo: false env: - TOXENV=py26 - TOXENV=py27 - TOXENV=py32 - TOXENV=py33 - TOXENV=py34 install: - travis_retry pip install tox==1.6.1 script: - travis_retry tox
language: python + sudo: false env: - TOXENV=py26 - TOXENV=py27 - TOXENV=py32 - TOXENV=py33 - TOXENV=py34 install: - travis_retry pip install tox==1.6.1 script: - travis_retry tox
1
0.090909
1
0
6cfa1c71d9b13e5d80d13589fdbe6329a26419c3
src/SimplyTestable/ApiBundle/Tests/Command/Job/ResolveWebsiteCommand/CommandTest.php
src/SimplyTestable/ApiBundle/Tests/Command/Job/ResolveWebsiteCommand/CommandTest.php
<?php namespace SimplyTestable\ApiBundle\Tests\Command\Job\ResolveWebsiteCommand; use SimplyTestable\ApiBundle\Tests\ConsoleCommandTestCase; abstract class CommandTest extends ConsoleCommandTestCase { const CANONICAL_URL = 'http://example.com'; /** * * @return string */ protected function getCommandName() { return 'simplytestable:job:resolve'; } /** * * @return \Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand[] */ protected function getAdditionalCommands() { return array( new \SimplyTestable\ApiBundle\Command\Job\ResolveWebsiteCommand() ); } }
<?php namespace SimplyTestable\ApiBundle\Tests\Command\Job\ResolveWebsiteCommand; use SimplyTestable\ApiBundle\Tests\ConsoleCommandTestCase; abstract class CommandTest extends ConsoleCommandTestCase { const CANONICAL_URL = 'http://example.com'; /** * * @return string */ protected function getCommandName() { return 'simplytestable:job:resolve'; } }
Test handling http errors resolving job website
Test handling http errors resolving job website
PHP
mit
webignition/app.simplytestable.com,webignition/app.simplytestable.com
php
## Code Before: <?php namespace SimplyTestable\ApiBundle\Tests\Command\Job\ResolveWebsiteCommand; use SimplyTestable\ApiBundle\Tests\ConsoleCommandTestCase; abstract class CommandTest extends ConsoleCommandTestCase { const CANONICAL_URL = 'http://example.com'; /** * * @return string */ protected function getCommandName() { return 'simplytestable:job:resolve'; } /** * * @return \Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand[] */ protected function getAdditionalCommands() { return array( new \SimplyTestable\ApiBundle\Command\Job\ResolveWebsiteCommand() ); } } ## Instruction: Test handling http errors resolving job website ## Code After: <?php namespace SimplyTestable\ApiBundle\Tests\Command\Job\ResolveWebsiteCommand; use SimplyTestable\ApiBundle\Tests\ConsoleCommandTestCase; abstract class CommandTest extends ConsoleCommandTestCase { const CANONICAL_URL = 'http://example.com'; /** * * @return string */ protected function getCommandName() { return 'simplytestable:job:resolve'; } }
<?php namespace SimplyTestable\ApiBundle\Tests\Command\Job\ResolveWebsiteCommand; use SimplyTestable\ApiBundle\Tests\ConsoleCommandTestCase; abstract class CommandTest extends ConsoleCommandTestCase { const CANONICAL_URL = 'http://example.com'; /** * * @return string */ protected function getCommandName() { return 'simplytestable:job:resolve'; } - - - /** - * - * @return \Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand[] - */ - protected function getAdditionalCommands() { - return array( - new \SimplyTestable\ApiBundle\Command\Job\ResolveWebsiteCommand() - ); - } }
11
0.37931
0
11
fcb24be46a457425bf57df42c6d59c83aa442c88
packs/purr/actions/workflows/process_stg1_tweet.yaml
packs/purr/actions/workflows/process_stg1_tweet.yaml
version: '2.0' purr.process_stg1_tweet: description: Process tweet for stage 1 of the puzzle. input: - contestant - tweet_text - tweet_timestamp vars: tracker: <% $.contestant + '.stage.1' %> tasks: validate_tweet: action: core.noop on-success: - follow_contestant follow_contestant: action: twitter.follow input: screen_name: <% $.contestant %> on-success: - notify_contestant notify_contestant: action: core.noop on-success: - set_tracker set_tracker: action: st2.kv.set input: key: <% $.tracker %> value: <% $.tweet_timestamp %>
version: '2.0' purr.process_stg1_tweet: description: Process tweet for stage 1 of the puzzle. input: - contestant - tweet_text - tweet_timestamp vars: tracker: <% $.contestant + '.stage.1' %> tasks: validate_tweet: action: core.noop on-success: - follow_contestant follow_contestant: action: twitter.follow input: screen_name: <% $.contestant %> on-success: - notify_contestant notify_contestant: action: twitter.direct_message input: screen_name: <% $.contestant %> message: "TBD" on-success: - set_tracker set_tracker: action: st2.kv.set input: key: <% $.tracker %> value: <% $.tweet_timestamp %>
Use twitter direct message to notify contestant
Use twitter direct message to notify contestant
YAML
apache-2.0
StackStorm/st2incubator,StackStorm/st2incubator
yaml
## Code Before: version: '2.0' purr.process_stg1_tweet: description: Process tweet for stage 1 of the puzzle. input: - contestant - tweet_text - tweet_timestamp vars: tracker: <% $.contestant + '.stage.1' %> tasks: validate_tweet: action: core.noop on-success: - follow_contestant follow_contestant: action: twitter.follow input: screen_name: <% $.contestant %> on-success: - notify_contestant notify_contestant: action: core.noop on-success: - set_tracker set_tracker: action: st2.kv.set input: key: <% $.tracker %> value: <% $.tweet_timestamp %> ## Instruction: Use twitter direct message to notify contestant ## Code After: version: '2.0' purr.process_stg1_tweet: description: Process tweet for stage 1 of the puzzle. input: - contestant - tweet_text - tweet_timestamp vars: tracker: <% $.contestant + '.stage.1' %> tasks: validate_tweet: action: core.noop on-success: - follow_contestant follow_contestant: action: twitter.follow input: screen_name: <% $.contestant %> on-success: - notify_contestant notify_contestant: action: twitter.direct_message input: screen_name: <% $.contestant %> message: "TBD" on-success: - set_tracker set_tracker: action: st2.kv.set input: key: <% $.tracker %> value: <% $.tweet_timestamp %>
version: '2.0' purr.process_stg1_tweet: description: Process tweet for stage 1 of the puzzle. input: - contestant - tweet_text - tweet_timestamp vars: tracker: <% $.contestant + '.stage.1' %> tasks: validate_tweet: action: core.noop on-success: - follow_contestant follow_contestant: action: twitter.follow input: screen_name: <% $.contestant %> on-success: - notify_contestant notify_contestant: - action: core.noop + action: twitter.direct_message + input: + screen_name: <% $.contestant %> + message: "TBD" on-success: - set_tracker set_tracker: action: st2.kv.set input: key: <% $.tracker %> value: <% $.tweet_timestamp %>
5
0.16129
4
1
7fe9c9fcb59c2e822b5a088861207fda5d180cd8
app-ui/src/main/resources/application.properties
app-ui/src/main/resources/application.properties
server.port = 8080 server.servlet.context-path = /ligoj server.use-forward-headers = true server.address = 0.0.0.0 spring.application.name = Ligoj WEB spring.profiles.active = prod spring.main.allow-bean-definition-overriding=true # End-points ligoj.endpoint = http://localhost:8081/ligoj-api ligoj.endpoint.api.url = ${ligoj.endpoint}/rest ligoj.endpoint.manage.url = ${ligoj.endpoint}/manage ligoj.endpoint.plugins.url = ${ligoj.endpoint}/webjars sso.url = ${ligoj.endpoint.api.url}/security/login sso.content = {"name":"%s","password":"%s"} # Security implementation used to load the AuthenticationProvider # Default value is "Rest" # For "Trusted" value : org.ligoj.app.http.security.TrustedAuthenticationProvider --> authentication is not checked security = Rest # Suffix for index and login HTML files # For "" value : index.html, login.html # For "-prod" value : index-prod.html, login-prod.html # When set to "auto" (default value), the suffix is guessed from the way the application is started # The "auto" environment is replaced by "-prod" when the application is started from "java -jar ...war" command # Otherwise the auto environment is empty (""). app-env = auto
server.port = 8080 server.servlet.context-path = /ligoj server.forward-headers-strategy = FRAMEWORK server.address = 0.0.0.0 spring.application.name = Ligoj WEB spring.profiles.active = prod spring.main.allow-bean-definition-overriding=true # End-points ligoj.endpoint = http://localhost:8081/ligoj-api ligoj.endpoint.api.url = ${ligoj.endpoint}/rest ligoj.endpoint.manage.url = ${ligoj.endpoint}/manage ligoj.endpoint.plugins.url = ${ligoj.endpoint}/webjars sso.url = ${ligoj.endpoint.api.url}/security/login sso.content = {"name":"%s","password":"%s"} # Security implementation used to load the AuthenticationProvider # Default value is "Rest" # For "Trusted" value : org.ligoj.app.http.security.TrustedAuthenticationProvider --> authentication is not checked security = Rest # Suffix for index and login HTML files # For "" value : index.html, login.html # For "-prod" value : index-prod.html, login-prod.html # When set to "auto" (default value), the suffix is guessed from the way the application is started # The "auto" environment is replaced by "-prod" when the application is started from "java -jar ...war" command # Otherwise the auto environment is empty (""). app-env = auto
Use the new Spring-Boot forward-headers-strategy for load balancers
Use the new Spring-Boot forward-headers-strategy for load balancers
INI
mit
ligoj/ligoj,ligoj/ligoj,ligoj/ligoj,ligoj/ligoj
ini
## Code Before: server.port = 8080 server.servlet.context-path = /ligoj server.use-forward-headers = true server.address = 0.0.0.0 spring.application.name = Ligoj WEB spring.profiles.active = prod spring.main.allow-bean-definition-overriding=true # End-points ligoj.endpoint = http://localhost:8081/ligoj-api ligoj.endpoint.api.url = ${ligoj.endpoint}/rest ligoj.endpoint.manage.url = ${ligoj.endpoint}/manage ligoj.endpoint.plugins.url = ${ligoj.endpoint}/webjars sso.url = ${ligoj.endpoint.api.url}/security/login sso.content = {"name":"%s","password":"%s"} # Security implementation used to load the AuthenticationProvider # Default value is "Rest" # For "Trusted" value : org.ligoj.app.http.security.TrustedAuthenticationProvider --> authentication is not checked security = Rest # Suffix for index and login HTML files # For "" value : index.html, login.html # For "-prod" value : index-prod.html, login-prod.html # When set to "auto" (default value), the suffix is guessed from the way the application is started # The "auto" environment is replaced by "-prod" when the application is started from "java -jar ...war" command # Otherwise the auto environment is empty (""). app-env = auto ## Instruction: Use the new Spring-Boot forward-headers-strategy for load balancers ## Code After: server.port = 8080 server.servlet.context-path = /ligoj server.forward-headers-strategy = FRAMEWORK server.address = 0.0.0.0 spring.application.name = Ligoj WEB spring.profiles.active = prod spring.main.allow-bean-definition-overriding=true # End-points ligoj.endpoint = http://localhost:8081/ligoj-api ligoj.endpoint.api.url = ${ligoj.endpoint}/rest ligoj.endpoint.manage.url = ${ligoj.endpoint}/manage ligoj.endpoint.plugins.url = ${ligoj.endpoint}/webjars sso.url = ${ligoj.endpoint.api.url}/security/login sso.content = {"name":"%s","password":"%s"} # Security implementation used to load the AuthenticationProvider # Default value is "Rest" # For "Trusted" value : org.ligoj.app.http.security.TrustedAuthenticationProvider --> authentication is not checked security = Rest # Suffix for index and login HTML files # For "" value : index.html, login.html # For "-prod" value : index-prod.html, login-prod.html # When set to "auto" (default value), the suffix is guessed from the way the application is started # The "auto" environment is replaced by "-prod" when the application is started from "java -jar ...war" command # Otherwise the auto environment is empty (""). app-env = auto
server.port = 8080 server.servlet.context-path = /ligoj - server.use-forward-headers = true + server.forward-headers-strategy = FRAMEWORK + server.address = 0.0.0.0 spring.application.name = Ligoj WEB spring.profiles.active = prod spring.main.allow-bean-definition-overriding=true # End-points ligoj.endpoint = http://localhost:8081/ligoj-api ligoj.endpoint.api.url = ${ligoj.endpoint}/rest ligoj.endpoint.manage.url = ${ligoj.endpoint}/manage ligoj.endpoint.plugins.url = ${ligoj.endpoint}/webjars sso.url = ${ligoj.endpoint.api.url}/security/login sso.content = {"name":"%s","password":"%s"} # Security implementation used to load the AuthenticationProvider # Default value is "Rest" # For "Trusted" value : org.ligoj.app.http.security.TrustedAuthenticationProvider --> authentication is not checked security = Rest # Suffix for index and login HTML files # For "" value : index.html, login.html # For "-prod" value : index-prod.html, login-prod.html # When set to "auto" (default value), the suffix is guessed from the way the application is started # The "auto" environment is replaced by "-prod" when the application is started from "java -jar ...war" command # Otherwise the auto environment is empty (""). app-env = auto
3
0.107143
2
1
95ea1d7d6564bcbb2e3b8d2ba254ccd2c1c38436
mamba/__init__.py
mamba/__init__.py
__version__ = '0.9.2' def description(message): pass def _description(message): pass def it(message): pass def _it(message): pass def context(message): pass def _context(message): pass def before(): pass def after(): pass
__version__ = '0.9.2' def description(message): pass def _description(message): pass def fdescription(message): pass def it(message): pass def _it(message): pass def fit(message): pass def context(message): pass def _context(message): pass def fcontext(message): pass def before(): pass def after(): pass
Add import for focused stuff
Add import for focused stuff
Python
mit
nestorsalceda/mamba
python
## Code Before: __version__ = '0.9.2' def description(message): pass def _description(message): pass def it(message): pass def _it(message): pass def context(message): pass def _context(message): pass def before(): pass def after(): pass ## Instruction: Add import for focused stuff ## Code After: __version__ = '0.9.2' def description(message): pass def _description(message): pass def fdescription(message): pass def it(message): pass def _it(message): pass def fit(message): pass def context(message): pass def _context(message): pass def fcontext(message): pass def before(): pass def after(): pass
__version__ = '0.9.2' def description(message): pass def _description(message): pass + def fdescription(message): + pass + + def it(message): pass def _it(message): + pass + + + def fit(message): pass def context(message): pass def _context(message): pass + def fcontext(message): + pass + + def before(): pass def after(): pass
12
0.363636
12
0
1cf12d10298074593402529ca603b0c066b578dd
.travis.yml
.travis.yml
language: php php: - 5.5.29 - 5.6.13 before_script: - pyrus install http://phptal.org/latest.tar.gz - pear install pear/PHP_CodeSniffer - phpenv rehash script: - phpcs --standard=test/phpcs-ganglia-web.xml -p *.php api graph.d lib nagios test || echo "Completed - Returned $?" - phpunit test
language: php sudo: false php: - 5.5.29 - 5.6.13 before_script: - pyrus install http://phptal.org/latest.tar.gz - pear install pear/PHP_CodeSniffer - phpenv rehash script: - phpcs --standard=test/phpcs-ganglia-web.xml -p *.php api graph.d lib nagios test || echo "Completed - Returned $?" - phpunit test
Move to container architecture for traivs builds.
Move to container architecture for traivs builds.
YAML
bsd-3-clause
ganglia/ganglia-web,ganglia/ganglia-web,ganglia/ganglia-web,ganglia/ganglia-web,ganglia/ganglia-web
yaml
## Code Before: language: php php: - 5.5.29 - 5.6.13 before_script: - pyrus install http://phptal.org/latest.tar.gz - pear install pear/PHP_CodeSniffer - phpenv rehash script: - phpcs --standard=test/phpcs-ganglia-web.xml -p *.php api graph.d lib nagios test || echo "Completed - Returned $?" - phpunit test ## Instruction: Move to container architecture for traivs builds. ## Code After: language: php sudo: false php: - 5.5.29 - 5.6.13 before_script: - pyrus install http://phptal.org/latest.tar.gz - pear install pear/PHP_CodeSniffer - phpenv rehash script: - phpcs --standard=test/phpcs-ganglia-web.xml -p *.php api graph.d lib nagios test || echo "Completed - Returned $?" - phpunit test
language: php + sudo: false php: - 5.5.29 - 5.6.13 before_script: - pyrus install http://phptal.org/latest.tar.gz - pear install pear/PHP_CodeSniffer - phpenv rehash script: - phpcs --standard=test/phpcs-ganglia-web.xml -p *.php api graph.d lib nagios test || echo "Completed - Returned $?" - phpunit test
1
0.090909
1
0
1f2dd3d929e4a2f1e9494f67800d148a68cb96f6
tools/gate/integration/post_test_hook.sh
tools/gate/integration/post_test_hook.sh
set -x source commons $@ set +e cd /opt/stack/new/sahara-dashboard sudo wget -q -O firefox.deb https://sourceforge.net/projects/ubuntuzilla/files/mozilla/apt/pool/main/f/firefox-mozilla-build/firefox-mozilla-build_46.0.1-0ubuntu1_amd64.deb/download sudo apt-get -y purge firefox sudo dpkg -i firefox.deb sudo rm firefox.deb cat >> /tmp/fake_config.json <<EOF { "plugin_labels": { "hidden": { "status": false } } } EOF source $DEVSTACK_DIR/stackrc source $DEVSTACK_DIR/openrc admin demo openstack dataprocessing plugin update fake /tmp/fake_config.json openstack dataprocessing plugin show fake sudo -H -u stack tox -e py27integration retval=$? set -e if [ -d ${SAHARA_DASHBOARD_SCREENSHOTS_DIR}/ ]; then cp -r ${SAHARA_DASHBOARD_SCREENSHOTS_DIR}/ /home/jenkins/workspace/gate-sahara-dashboard-dsvm-integration/ fi exit $retval
set -x source commons $@ set +e cd /opt/stack/new/sahara-dashboard sudo wget -q -O firefox.deb https://sourceforge.net/projects/ubuntuzilla/files/mozilla/apt/pool/main/f/firefox-mozilla-build/firefox-mozilla-build_46.0.1-0ubuntu1_amd64.deb/download sudo apt-get -y purge firefox sudo dpkg -i firefox.deb sudo rm firefox.deb cat >> /tmp/fake_config.json <<EOF { "plugin_labels": { "hidden": { "status": false } } } EOF source $DEVSTACK_DIR/stackrc source $DEVSTACK_DIR/openrc admin demo openstack dataprocessing plugin update fake /tmp/fake_config.json sudo -H -u stack tox -e py27integration retval=$? set -e if [ -d ${SAHARA_DASHBOARD_SCREENSHOTS_DIR}/ ]; then cp -r ${SAHARA_DASHBOARD_SCREENSHOTS_DIR}/ /home/jenkins/workspace/gate-sahara-dashboard-dsvm-integration/ fi exit $retval
Remove some debugging artifacts from file
Remove some debugging artifacts from file This "show" command is really unneeded in post-test-hook. It atifacts of debug integration tests. Change-Id: If96351be498d2ed5726fcf624160d89d9be172ed
Shell
apache-2.0
openstack/sahara-dashboard,openstack/sahara-dashboard,openstack/sahara-dashboard,openstack/sahara-dashboard
shell
## Code Before: set -x source commons $@ set +e cd /opt/stack/new/sahara-dashboard sudo wget -q -O firefox.deb https://sourceforge.net/projects/ubuntuzilla/files/mozilla/apt/pool/main/f/firefox-mozilla-build/firefox-mozilla-build_46.0.1-0ubuntu1_amd64.deb/download sudo apt-get -y purge firefox sudo dpkg -i firefox.deb sudo rm firefox.deb cat >> /tmp/fake_config.json <<EOF { "plugin_labels": { "hidden": { "status": false } } } EOF source $DEVSTACK_DIR/stackrc source $DEVSTACK_DIR/openrc admin demo openstack dataprocessing plugin update fake /tmp/fake_config.json openstack dataprocessing plugin show fake sudo -H -u stack tox -e py27integration retval=$? set -e if [ -d ${SAHARA_DASHBOARD_SCREENSHOTS_DIR}/ ]; then cp -r ${SAHARA_DASHBOARD_SCREENSHOTS_DIR}/ /home/jenkins/workspace/gate-sahara-dashboard-dsvm-integration/ fi exit $retval ## Instruction: Remove some debugging artifacts from file This "show" command is really unneeded in post-test-hook. It atifacts of debug integration tests. Change-Id: If96351be498d2ed5726fcf624160d89d9be172ed ## Code After: set -x source commons $@ set +e cd /opt/stack/new/sahara-dashboard sudo wget -q -O firefox.deb https://sourceforge.net/projects/ubuntuzilla/files/mozilla/apt/pool/main/f/firefox-mozilla-build/firefox-mozilla-build_46.0.1-0ubuntu1_amd64.deb/download sudo apt-get -y purge firefox sudo dpkg -i firefox.deb sudo rm firefox.deb cat >> /tmp/fake_config.json <<EOF { "plugin_labels": { "hidden": { "status": false } } } EOF source $DEVSTACK_DIR/stackrc source $DEVSTACK_DIR/openrc admin demo openstack dataprocessing plugin update fake /tmp/fake_config.json sudo -H -u stack tox -e py27integration retval=$? set -e if [ -d ${SAHARA_DASHBOARD_SCREENSHOTS_DIR}/ ]; then cp -r ${SAHARA_DASHBOARD_SCREENSHOTS_DIR}/ /home/jenkins/workspace/gate-sahara-dashboard-dsvm-integration/ fi exit $retval
set -x source commons $@ set +e cd /opt/stack/new/sahara-dashboard sudo wget -q -O firefox.deb https://sourceforge.net/projects/ubuntuzilla/files/mozilla/apt/pool/main/f/firefox-mozilla-build/firefox-mozilla-build_46.0.1-0ubuntu1_amd64.deb/download sudo apt-get -y purge firefox sudo dpkg -i firefox.deb sudo rm firefox.deb cat >> /tmp/fake_config.json <<EOF { "plugin_labels": { "hidden": { "status": false } } } EOF source $DEVSTACK_DIR/stackrc source $DEVSTACK_DIR/openrc admin demo openstack dataprocessing plugin update fake /tmp/fake_config.json - openstack dataprocessing plugin show fake sudo -H -u stack tox -e py27integration retval=$? set -e if [ -d ${SAHARA_DASHBOARD_SCREENSHOTS_DIR}/ ]; then cp -r ${SAHARA_DASHBOARD_SCREENSHOTS_DIR}/ /home/jenkins/workspace/gate-sahara-dashboard-dsvm-integration/ fi exit $retval
1
0.027778
0
1
d602b99beaf513d8d34cca8675607909618e5795
Datez/Datez/Extensions/FoundationConversion/NSTimeInterval+Conversion.swift
Datez/Datez/Extensions/FoundationConversion/NSTimeInterval+Conversion.swift
// // NSTimeInterval+Conversion.swift // Datez // // Created by Mazyad Alabduljaleel on 11/7/15. // Copyright © 2015 kitz. All rights reserved. // import Foundation /** [BONUS]: This is a bonus API for ballpark calculations, useful for making hardcoded intervals more readable. e.g. + declaring a cache expiration interval + estimating the number of hours, or minutes in NSTimeInterval */ public extension NSTimeInterval { /** given 63.0, returns DateComponents(minute: 1, second: 3) WARNING: assumes gregorian calendar */ public var components: DateComponents { return NSCalendar.Gregorian.components( NSCalendarUnit(rawValue: UInt.max), fromTimeInterval: self ).datez } } public extension DateComponents { /** given DateComponents(minute: 1, second: 3), returns 63.0 */ public var timeInterval: NSTimeInterval { let dateView = NSDate().gregorian + self return round(dateView.date - NSDate()) } }
// // NSTimeInterval+Conversion.swift // Datez // // Created by Mazyad Alabduljaleel on 11/7/15. // Copyright © 2015 kitz. All rights reserved. // import Foundation /** [BONUS]: This is a bonus API for ballpark calculations, useful for making hardcoded intervals more readable. e.g. + declaring a cache expiration interval + estimating the number of hours, or minutes in NSTimeInterval */ public extension NSTimeInterval { /** given 63.0, returns DateComponents(minute: 1, second: 3) WARNING: assumes gregorian calendar */ public var components: DateComponents { return NSCalendar.Gregorian.components( NSCalendarUnit(rawValue: UInt.max), fromTimeInterval: self ).datez } } public extension DateComponents { /** given DateComponents(minute: 1, second: 3), returns 63.0 */ public var timeInterval: NSTimeInterval { let baseDate = NSDate(timeIntervalSinceReferenceDate: 0) let dateView = baseDate.gregorian + self return dateView.date - baseDate } }
Fix another NSTimeInterval calculation Tests should always pass now
Fix another NSTimeInterval calculation Tests should always pass now
Swift
mit
SwiftKitz/Datez,SwiftKitz/Datez
swift
## Code Before: // // NSTimeInterval+Conversion.swift // Datez // // Created by Mazyad Alabduljaleel on 11/7/15. // Copyright © 2015 kitz. All rights reserved. // import Foundation /** [BONUS]: This is a bonus API for ballpark calculations, useful for making hardcoded intervals more readable. e.g. + declaring a cache expiration interval + estimating the number of hours, or minutes in NSTimeInterval */ public extension NSTimeInterval { /** given 63.0, returns DateComponents(minute: 1, second: 3) WARNING: assumes gregorian calendar */ public var components: DateComponents { return NSCalendar.Gregorian.components( NSCalendarUnit(rawValue: UInt.max), fromTimeInterval: self ).datez } } public extension DateComponents { /** given DateComponents(minute: 1, second: 3), returns 63.0 */ public var timeInterval: NSTimeInterval { let dateView = NSDate().gregorian + self return round(dateView.date - NSDate()) } } ## Instruction: Fix another NSTimeInterval calculation Tests should always pass now ## Code After: // // NSTimeInterval+Conversion.swift // Datez // // Created by Mazyad Alabduljaleel on 11/7/15. // Copyright © 2015 kitz. All rights reserved. // import Foundation /** [BONUS]: This is a bonus API for ballpark calculations, useful for making hardcoded intervals more readable. e.g. + declaring a cache expiration interval + estimating the number of hours, or minutes in NSTimeInterval */ public extension NSTimeInterval { /** given 63.0, returns DateComponents(minute: 1, second: 3) WARNING: assumes gregorian calendar */ public var components: DateComponents { return NSCalendar.Gregorian.components( NSCalendarUnit(rawValue: UInt.max), fromTimeInterval: self ).datez } } public extension DateComponents { /** given DateComponents(minute: 1, second: 3), returns 63.0 */ public var timeInterval: NSTimeInterval { let baseDate = NSDate(timeIntervalSinceReferenceDate: 0) let dateView = baseDate.gregorian + self return dateView.date - baseDate } }
// // NSTimeInterval+Conversion.swift // Datez // // Created by Mazyad Alabduljaleel on 11/7/15. // Copyright © 2015 kitz. All rights reserved. // import Foundation /** [BONUS]: This is a bonus API for ballpark calculations, useful for making hardcoded intervals more readable. e.g. + declaring a cache expiration interval + estimating the number of hours, or minutes in NSTimeInterval */ public extension NSTimeInterval { /** given 63.0, returns DateComponents(minute: 1, second: 3) WARNING: assumes gregorian calendar */ public var components: DateComponents { return NSCalendar.Gregorian.components( NSCalendarUnit(rawValue: UInt.max), fromTimeInterval: self ).datez } } public extension DateComponents { /** given DateComponents(minute: 1, second: 3), returns 63.0 */ public var timeInterval: NSTimeInterval { + let baseDate = NSDate(timeIntervalSinceReferenceDate: 0) - let dateView = NSDate().gregorian + self ? ^^ -- + let dateView = baseDate.gregorian + self ? ^^^^ - return round(dateView.date - NSDate()) ? ------ ^^ --- + return dateView.date - baseDate ? ^^^^ } }
5
0.121951
3
2
b8cacab927c5b98285f15ae4d400b9577dbacef6
openstack_dashboard/dashboards/admin/dashboard.py
openstack_dashboard/dashboards/admin/dashboard.py
from django.utils.translation import ugettext_lazy as _ from openstack_auth import utils import horizon from django.conf import settings class Admin(horizon.Dashboard): name = _("Admin") slug = "admin" if getattr(settings, 'POLICY_CHECK_FUNCTION', None): policy_rules = (('identity', 'admin_required'), ('image', 'context_is_admin'), ('volume', 'context_is_admin'), ('compute', 'context_is_admin'), ('network', 'context_is_admin'), ('orchestration', 'context_is_admin'), ('telemetry', 'context_is_admin'),) else: permissions = (tuple(utils.get_admin_permissions()),) horizon.register(Admin)
from django.utils.translation import ugettext_lazy as _ from openstack_auth import utils import horizon from django.conf import settings class Admin(horizon.Dashboard): name = _("Admin") slug = "admin" if getattr(settings, 'POLICY_CHECK_FUNCTION', None): policy_rules = (('identity', 'admin_required'), ('image', 'context_is_admin'), ('volume', 'context_is_admin'), ('compute', 'context_is_admin'), ('network', 'context_is_admin'), ('orchestration', 'context_is_admin'),) else: permissions = (tuple(utils.get_admin_permissions()),) horizon.register(Admin)
Remove broken telemetry policy check
Remove broken telemetry policy check The reference to telemetry policy is no longer needed as well as broken causing the admin dashboard to show up inappropriately. Closes-Bug: #1643009 Change-Id: I07406f5d6c23b0fcc34df00a29b573ffc2c900e7
Python
apache-2.0
yeming233/horizon,ChameleonCloud/horizon,noironetworks/horizon,ChameleonCloud/horizon,noironetworks/horizon,NeCTAR-RC/horizon,noironetworks/horizon,BiznetGIO/horizon,BiznetGIO/horizon,yeming233/horizon,NeCTAR-RC/horizon,BiznetGIO/horizon,openstack/horizon,BiznetGIO/horizon,ChameleonCloud/horizon,openstack/horizon,ChameleonCloud/horizon,yeming233/horizon,noironetworks/horizon,NeCTAR-RC/horizon,openstack/horizon,yeming233/horizon,NeCTAR-RC/horizon,openstack/horizon
python
## Code Before: from django.utils.translation import ugettext_lazy as _ from openstack_auth import utils import horizon from django.conf import settings class Admin(horizon.Dashboard): name = _("Admin") slug = "admin" if getattr(settings, 'POLICY_CHECK_FUNCTION', None): policy_rules = (('identity', 'admin_required'), ('image', 'context_is_admin'), ('volume', 'context_is_admin'), ('compute', 'context_is_admin'), ('network', 'context_is_admin'), ('orchestration', 'context_is_admin'), ('telemetry', 'context_is_admin'),) else: permissions = (tuple(utils.get_admin_permissions()),) horizon.register(Admin) ## Instruction: Remove broken telemetry policy check The reference to telemetry policy is no longer needed as well as broken causing the admin dashboard to show up inappropriately. Closes-Bug: #1643009 Change-Id: I07406f5d6c23b0fcc34df00a29b573ffc2c900e7 ## Code After: from django.utils.translation import ugettext_lazy as _ from openstack_auth import utils import horizon from django.conf import settings class Admin(horizon.Dashboard): name = _("Admin") slug = "admin" if getattr(settings, 'POLICY_CHECK_FUNCTION', None): policy_rules = (('identity', 'admin_required'), ('image', 'context_is_admin'), ('volume', 'context_is_admin'), ('compute', 'context_is_admin'), ('network', 'context_is_admin'), ('orchestration', 'context_is_admin'),) else: permissions = (tuple(utils.get_admin_permissions()),) horizon.register(Admin)
from django.utils.translation import ugettext_lazy as _ from openstack_auth import utils import horizon from django.conf import settings class Admin(horizon.Dashboard): name = _("Admin") slug = "admin" if getattr(settings, 'POLICY_CHECK_FUNCTION', None): policy_rules = (('identity', 'admin_required'), ('image', 'context_is_admin'), ('volume', 'context_is_admin'), ('compute', 'context_is_admin'), ('network', 'context_is_admin'), - ('orchestration', 'context_is_admin'), + ('orchestration', 'context_is_admin'),) ? + - ('telemetry', 'context_is_admin'),) else: permissions = (tuple(utils.get_admin_permissions()),) horizon.register(Admin)
3
0.115385
1
2
f87c337486d14650bb8268a6bf9b2a37487826da
doc-examples/src/main/java/arez/doc/examples/at_component_dependency/PersonViewModel.java
doc-examples/src/main/java/arez/doc/examples/at_component_dependency/PersonViewModel.java
package arez.doc.examples.at_component_dependency; import arez.annotations.ArezComponent; import arez.annotations.ComponentDependency; import arez.annotations.Observable; import javax.annotation.Nonnull; import javax.annotation.Nullable; @ArezComponent public abstract class PersonViewModel { @Nonnull private final Person _person; //DOC ELIDE START public PersonViewModel( @Nonnull final Person person ) { _person = person; } //DOC ELIDE END // Let imagine there is a lot more logic and state on the view model // to justify it's existence rather than just having view layer directly // accessing underlying entities @ComponentDependency @Nonnull public final Person getPerson() { // This reference is immutable and the network replication // layer is responsible for managing the lifecycle of person // component and may dispose it when the Person entity is deleted // on the server which should trigger this view model being disposed. return _person; } /** * The Job entity is likewise controlled by the server * and can be updated, removed on the server and replicated to the web * browser. In this scenario the current job is just removed from the * person view model. */ @ComponentDependency( action = ComponentDependency.Action.SET_NULL ) @Observable @Nullable public abstract Job getCurrentJob(); //DOC ELIDE START public abstract void setCurrentJob( @Nullable final Job currentJob ); //DOC ELIDE END }
package arez.doc.examples.at_component_dependency; import arez.annotations.ArezComponent; import arez.annotations.ComponentDependency; import arez.annotations.Observable; import javax.annotation.Nonnull; import javax.annotation.Nullable; @ArezComponent public abstract class PersonViewModel { // This reference is immutable and the network replication // layer is responsible for managing the lifecycle of person // component and may dispose it when the Person entity is deleted // on the server which should trigger this view model being disposed. @ComponentDependency @Nonnull final Person _person; //DOC ELIDE START public PersonViewModel( @Nonnull final Person person ) { _person = person; } //DOC ELIDE END // Let imagine there is a lot more logic and state on the view model // to justify it's existence rather than just having view layer directly // accessing underlying entities @Nonnull public final Person getPerson() { return _person; } /** * The Job entity is likewise controlled by the server * and can be updated, removed on the server and replicated to the web * browser. In this scenario the current job is just removed from the * person view model. */ @ComponentDependency( action = ComponentDependency.Action.SET_NULL ) @Observable @Nullable public abstract Job getCurrentJob(); //DOC ELIDE START public abstract void setCurrentJob( @Nullable final Job currentJob ); //DOC ELIDE END }
Move @ComponentDependency to the field as that is the latest recomendation
Move @ComponentDependency to the field as that is the latest recomendation
Java
apache-2.0
realityforge/arez,realityforge/arez,realityforge/arez
java
## Code Before: package arez.doc.examples.at_component_dependency; import arez.annotations.ArezComponent; import arez.annotations.ComponentDependency; import arez.annotations.Observable; import javax.annotation.Nonnull; import javax.annotation.Nullable; @ArezComponent public abstract class PersonViewModel { @Nonnull private final Person _person; //DOC ELIDE START public PersonViewModel( @Nonnull final Person person ) { _person = person; } //DOC ELIDE END // Let imagine there is a lot more logic and state on the view model // to justify it's existence rather than just having view layer directly // accessing underlying entities @ComponentDependency @Nonnull public final Person getPerson() { // This reference is immutable and the network replication // layer is responsible for managing the lifecycle of person // component and may dispose it when the Person entity is deleted // on the server which should trigger this view model being disposed. return _person; } /** * The Job entity is likewise controlled by the server * and can be updated, removed on the server and replicated to the web * browser. In this scenario the current job is just removed from the * person view model. */ @ComponentDependency( action = ComponentDependency.Action.SET_NULL ) @Observable @Nullable public abstract Job getCurrentJob(); //DOC ELIDE START public abstract void setCurrentJob( @Nullable final Job currentJob ); //DOC ELIDE END } ## Instruction: Move @ComponentDependency to the field as that is the latest recomendation ## Code After: package arez.doc.examples.at_component_dependency; import arez.annotations.ArezComponent; import arez.annotations.ComponentDependency; import arez.annotations.Observable; import javax.annotation.Nonnull; import javax.annotation.Nullable; @ArezComponent public abstract class PersonViewModel { // This reference is immutable and the network replication // layer is responsible for managing the lifecycle of person // component and may dispose it when the Person entity is deleted // on the server which should trigger this view model being disposed. @ComponentDependency @Nonnull final Person _person; //DOC ELIDE START public PersonViewModel( @Nonnull final Person person ) { _person = person; } //DOC ELIDE END // Let imagine there is a lot more logic and state on the view model // to justify it's existence rather than just having view layer directly // accessing underlying entities @Nonnull public final Person getPerson() { return _person; } /** * The Job entity is likewise controlled by the server * and can be updated, removed on the server and replicated to the web * browser. In this scenario the current job is just removed from the * person view model. */ @ComponentDependency( action = ComponentDependency.Action.SET_NULL ) @Observable @Nullable public abstract Job getCurrentJob(); //DOC ELIDE START public abstract void setCurrentJob( @Nullable final Job currentJob ); //DOC ELIDE END }
package arez.doc.examples.at_component_dependency; import arez.annotations.ArezComponent; import arez.annotations.ComponentDependency; import arez.annotations.Observable; import javax.annotation.Nonnull; import javax.annotation.Nullable; @ArezComponent public abstract class PersonViewModel { + // This reference is immutable and the network replication + // layer is responsible for managing the lifecycle of person + // component and may dispose it when the Person entity is deleted + // on the server which should trigger this view model being disposed. + @ComponentDependency @Nonnull - private final Person _person; ? -------- + final Person _person; //DOC ELIDE START public PersonViewModel( @Nonnull final Person person ) { _person = person; } //DOC ELIDE END // Let imagine there is a lot more logic and state on the view model // to justify it's existence rather than just having view layer directly // accessing underlying entities - @ComponentDependency @Nonnull public final Person getPerson() { - // This reference is immutable and the network replication - // layer is responsible for managing the lifecycle of person - // component and may dispose it when the Person entity is deleted - // on the server which should trigger this view model being disposed. return _person; } /** * The Job entity is likewise controlled by the server * and can be updated, removed on the server and replicated to the web * browser. In this scenario the current job is just removed from the * person view model. */ @ComponentDependency( action = ComponentDependency.Action.SET_NULL ) @Observable @Nullable public abstract Job getCurrentJob(); //DOC ELIDE START public abstract void setCurrentJob( @Nullable final Job currentJob ); //DOC ELIDE END }
12
0.230769
6
6
a5909a090e9fac73b2a4008f2c9bfa55aa58542e
app/controllers/application_controller.rb
app/controllers/application_controller.rb
class ApplicationController < ActionController::Base # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. protect_from_forgery with: :exception before_action :set_locale before_action :configure_permitted_parameters, if: :devise_controller? def default_url_options(options={}) { :locale => I18n.locale == I18n.default_locale ? nil : I18n.locale } end def configure_permitted_parameters devise_parameter_sanitizer.for(:sign_up) << [:nom, :prenom] end private def set_locale I18n.locale = params[:locale] || I18n.default_locale end end
class ApplicationController < ActionController::Base # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. protect_from_forgery with: :exception before_action :set_locale before_action :configure_permitted_parameters, if: :devise_controller? def default_url_options(options={}) { :locale => I18n.locale == I18n.default_locale ? nil : I18n.locale } end def configure_permitted_parameters devise_parameter_sanitizer.for(:sign_up) << [:nom, :prenom, :telephone] end private def set_locale I18n.locale = params[:locale] || I18n.default_locale end end
FIX : ajout du champ telephone dans les strong parameters du model User
FIX : ajout du champ telephone dans les strong parameters du model User
Ruby
mit
clervens/gestionDeLivraison,clervens/gestionDeLivraison,clervens/gestionDeLivraison
ruby
## Code Before: class ApplicationController < ActionController::Base # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. protect_from_forgery with: :exception before_action :set_locale before_action :configure_permitted_parameters, if: :devise_controller? def default_url_options(options={}) { :locale => I18n.locale == I18n.default_locale ? nil : I18n.locale } end def configure_permitted_parameters devise_parameter_sanitizer.for(:sign_up) << [:nom, :prenom] end private def set_locale I18n.locale = params[:locale] || I18n.default_locale end end ## Instruction: FIX : ajout du champ telephone dans les strong parameters du model User ## Code After: class ApplicationController < ActionController::Base # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. protect_from_forgery with: :exception before_action :set_locale before_action :configure_permitted_parameters, if: :devise_controller? def default_url_options(options={}) { :locale => I18n.locale == I18n.default_locale ? nil : I18n.locale } end def configure_permitted_parameters devise_parameter_sanitizer.for(:sign_up) << [:nom, :prenom, :telephone] end private def set_locale I18n.locale = params[:locale] || I18n.default_locale end end
class ApplicationController < ActionController::Base # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. protect_from_forgery with: :exception before_action :set_locale before_action :configure_permitted_parameters, if: :devise_controller? def default_url_options(options={}) { :locale => I18n.locale == I18n.default_locale ? nil : I18n.locale } end def configure_permitted_parameters - devise_parameter_sanitizer.for(:sign_up) << [:nom, :prenom] + devise_parameter_sanitizer.for(:sign_up) << [:nom, :prenom, :telephone] ? ++++++++++++ end private def set_locale I18n.locale = params[:locale] || I18n.default_locale end end
2
0.095238
1
1
2be77b1d24d315ea5968f0d1a35f13b61d16e2e0
timeline_fu.gemspec
timeline_fu.gemspec
$:.push File.expand_path("../lib", __FILE__) require "timeline_fu/version" Gem::Specification.new do |s| s.name = "timeline_fu" s.version = TimelineFu::VERSION s.authors = ["James Golick", "Mathieu Martin", "Francois Beausoleil"] s.email = "james@giraffesoft.ca" s.homepage = "http://github.com/giraffesoft/timeline_fu" s.summary = "Easily build timelines, much like GitHub's news feed" s.description = "Easily build timelines, much like GitHub's news feed" s.files = `git ls-files`.split("\n") s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } s.require_paths = ["lib"] s.has_rdoc = true s.extra_rdoc_files = ["README.rdoc"] s.rdoc_options = ["--charset=UTF-8"] s.add_runtime_dependency "activerecord" s.add_development_dependency "appraisal" s.add_development_dependency "logger" s.add_development_dependency "mocha" s.add_development_dependency "sqlite3" end
$:.push File.expand_path("../lib", __FILE__) require "timeline_fu/version" Gem::Specification.new do |s| s.name = "timeline_fu" s.version = TimelineFu::VERSION s.authors = ["James Golick", "Mathieu Martin", "Francois Beausoleil"] s.email = "james@giraffesoft.ca" s.homepage = "https://github.com/jamesgolick/timeline_fu" s.summary = "Easily build timelines, much like GitHub's news feed" s.description = "Easily build timelines, much like GitHub's news feed" s.files = `git ls-files`.split("\n") s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } s.require_paths = ["lib"] s.has_rdoc = true s.extra_rdoc_files = ["README.rdoc"] s.rdoc_options = ["--charset=UTF-8"] s.add_runtime_dependency "activerecord" s.add_development_dependency "appraisal" s.add_development_dependency "logger" s.add_development_dependency "mocha" s.add_development_dependency "sqlite3" end
Change homepage to correct one.
Change homepage to correct one.
Ruby
mit
openSUSE/timeline_fu,onedesign/timeline_fu
ruby
## Code Before: $:.push File.expand_path("../lib", __FILE__) require "timeline_fu/version" Gem::Specification.new do |s| s.name = "timeline_fu" s.version = TimelineFu::VERSION s.authors = ["James Golick", "Mathieu Martin", "Francois Beausoleil"] s.email = "james@giraffesoft.ca" s.homepage = "http://github.com/giraffesoft/timeline_fu" s.summary = "Easily build timelines, much like GitHub's news feed" s.description = "Easily build timelines, much like GitHub's news feed" s.files = `git ls-files`.split("\n") s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } s.require_paths = ["lib"] s.has_rdoc = true s.extra_rdoc_files = ["README.rdoc"] s.rdoc_options = ["--charset=UTF-8"] s.add_runtime_dependency "activerecord" s.add_development_dependency "appraisal" s.add_development_dependency "logger" s.add_development_dependency "mocha" s.add_development_dependency "sqlite3" end ## Instruction: Change homepage to correct one. ## Code After: $:.push File.expand_path("../lib", __FILE__) require "timeline_fu/version" Gem::Specification.new do |s| s.name = "timeline_fu" s.version = TimelineFu::VERSION s.authors = ["James Golick", "Mathieu Martin", "Francois Beausoleil"] s.email = "james@giraffesoft.ca" s.homepage = "https://github.com/jamesgolick/timeline_fu" s.summary = "Easily build timelines, much like GitHub's news feed" s.description = "Easily build timelines, much like GitHub's news feed" s.files = `git ls-files`.split("\n") s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } s.require_paths = ["lib"] s.has_rdoc = true s.extra_rdoc_files = ["README.rdoc"] s.rdoc_options = ["--charset=UTF-8"] s.add_runtime_dependency "activerecord" s.add_development_dependency "appraisal" s.add_development_dependency "logger" s.add_development_dependency "mocha" s.add_development_dependency "sqlite3" end
$:.push File.expand_path("../lib", __FILE__) require "timeline_fu/version" Gem::Specification.new do |s| s.name = "timeline_fu" s.version = TimelineFu::VERSION s.authors = ["James Golick", "Mathieu Martin", "Francois Beausoleil"] s.email = "james@giraffesoft.ca" - s.homepage = "http://github.com/giraffesoft/timeline_fu" ? ^^^ ^^ ^^ + s.homepage = "https://github.com/jamesgolick/timeline_fu" ? + ^ ^ + ^^^^ s.summary = "Easily build timelines, much like GitHub's news feed" s.description = "Easily build timelines, much like GitHub's news feed" s.files = `git ls-files`.split("\n") s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } s.require_paths = ["lib"] s.has_rdoc = true s.extra_rdoc_files = ["README.rdoc"] s.rdoc_options = ["--charset=UTF-8"] s.add_runtime_dependency "activerecord" s.add_development_dependency "appraisal" s.add_development_dependency "logger" s.add_development_dependency "mocha" s.add_development_dependency "sqlite3" end
2
0.071429
1
1
411d564900abdca805ec0d57671bf60f91817d02
react/components/NotificationsDropdown/components/Notification/components/NotificationObjectLink/index.js
react/components/NotificationsDropdown/components/Notification/components/NotificationObjectLink/index.js
import React from 'react'; import PropTypes from 'prop-types'; import Text from 'react/components/UI/Text'; import Truncate from 'react/components/UI/Truncate'; const NotificationObjectLink = ({ __typename, label, href, visibility, is_me, ...rest }) => { if (is_me) { return ( <Text display="inline" f={1}> you </Text> ); } return ( <Text display="inline" f={1} fontWeight="bold" color={__typename === 'Channel' ? `channel.${visibility}` : 'gray.base'} {...rest} > <a href={href}> <Truncate length={40}> {label} </Truncate> </a> </Text> ); }; NotificationObjectLink.propTypes = { __typename: PropTypes.string.isRequired, label: PropTypes.string.isRequired, href: PropTypes.string.isRequired, visibility: PropTypes.string, body: PropTypes.string, is_me: PropTypes.bool, }; NotificationObjectLink.defaultProps = { visibility: null, body: null, is_me: false, }; export default NotificationObjectLink;
import React from 'react'; import PropTypes from 'prop-types'; import { unescape } from 'underscore'; import Text from 'react/components/UI/Text'; import Truncate from 'react/components/UI/Truncate'; import LockIconWithBorder from 'react/components/UI/LockIconWithBorder'; const NotificationObjectLink = ({ __typename, label, href, visibility, is_me, ...rest }) => { if (is_me) { return ( <Text display="inline" f={1}> you </Text> ); } return ( <Text display="inline" f={1} fontWeight="bold" color={__typename === 'Channel' ? `channel.${visibility}` : 'gray.base'} {...rest} > <a href={href}> <Truncate length={40}> {unescape(label)} </Truncate> {visibility === 'private' && <LockIconWithBorder display="inline-flex" ml={2} /> } </a> </Text> ); }; NotificationObjectLink.propTypes = { __typename: PropTypes.string.isRequired, label: PropTypes.string.isRequired, href: PropTypes.string.isRequired, visibility: PropTypes.string, body: PropTypes.string, is_me: PropTypes.bool, }; NotificationObjectLink.defaultProps = { visibility: null, body: null, is_me: false, }; export default NotificationObjectLink;
Add lock icon to notification link
Add lock icon to notification link
JavaScript
mit
aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell
javascript
## Code Before: import React from 'react'; import PropTypes from 'prop-types'; import Text from 'react/components/UI/Text'; import Truncate from 'react/components/UI/Truncate'; const NotificationObjectLink = ({ __typename, label, href, visibility, is_me, ...rest }) => { if (is_me) { return ( <Text display="inline" f={1}> you </Text> ); } return ( <Text display="inline" f={1} fontWeight="bold" color={__typename === 'Channel' ? `channel.${visibility}` : 'gray.base'} {...rest} > <a href={href}> <Truncate length={40}> {label} </Truncate> </a> </Text> ); }; NotificationObjectLink.propTypes = { __typename: PropTypes.string.isRequired, label: PropTypes.string.isRequired, href: PropTypes.string.isRequired, visibility: PropTypes.string, body: PropTypes.string, is_me: PropTypes.bool, }; NotificationObjectLink.defaultProps = { visibility: null, body: null, is_me: false, }; export default NotificationObjectLink; ## Instruction: Add lock icon to notification link ## Code After: import React from 'react'; import PropTypes from 'prop-types'; import { unescape } from 'underscore'; import Text from 'react/components/UI/Text'; import Truncate from 'react/components/UI/Truncate'; import LockIconWithBorder from 'react/components/UI/LockIconWithBorder'; const NotificationObjectLink = ({ __typename, label, href, visibility, is_me, ...rest }) => { if (is_me) { return ( <Text display="inline" f={1}> you </Text> ); } return ( <Text display="inline" f={1} fontWeight="bold" color={__typename === 'Channel' ? `channel.${visibility}` : 'gray.base'} {...rest} > <a href={href}> <Truncate length={40}> {unescape(label)} </Truncate> {visibility === 'private' && <LockIconWithBorder display="inline-flex" ml={2} /> } </a> </Text> ); }; NotificationObjectLink.propTypes = { __typename: PropTypes.string.isRequired, label: PropTypes.string.isRequired, href: PropTypes.string.isRequired, visibility: PropTypes.string, body: PropTypes.string, is_me: PropTypes.bool, }; NotificationObjectLink.defaultProps = { visibility: null, body: null, is_me: false, }; export default NotificationObjectLink;
import React from 'react'; import PropTypes from 'prop-types'; + import { unescape } from 'underscore'; import Text from 'react/components/UI/Text'; import Truncate from 'react/components/UI/Truncate'; + import LockIconWithBorder from 'react/components/UI/LockIconWithBorder'; const NotificationObjectLink = ({ __typename, label, href, visibility, is_me, ...rest }) => { if (is_me) { return ( <Text display="inline" f={1}> you </Text> ); } return ( <Text display="inline" f={1} fontWeight="bold" color={__typename === 'Channel' ? `channel.${visibility}` : 'gray.base'} {...rest} > <a href={href}> <Truncate length={40}> - {label} + {unescape(label)} ? +++++++++ + </Truncate> + {visibility === 'private' && + <LockIconWithBorder display="inline-flex" ml={2} /> + } </a> </Text> ); }; NotificationObjectLink.propTypes = { __typename: PropTypes.string.isRequired, label: PropTypes.string.isRequired, href: PropTypes.string.isRequired, visibility: PropTypes.string, body: PropTypes.string, is_me: PropTypes.bool, }; NotificationObjectLink.defaultProps = { visibility: null, body: null, is_me: false, }; export default NotificationObjectLink;
7
0.14
6
1
f99e1f56728dfe4e46122eaace0aed406c2b38f2
README.md
README.md
A simple logger for Mongoid. ## Installation Add this line to your application's Gemfile: gem 'mongoid-clerk' And then execute: $ bundle Or install it yourself as: $ gem install mongoid-clerk ## Usage Include `Clerk::Logger` in your model, then log anything with `log()`. The first argument is the message and the second the level. You can add default fields to your log entry by adding `clerk_always_include` this method accepts an array of fields it should include, or a hash if you want to rename a field. Clerk adds a polymorphic relation to the model `log_items` so you can scope log entries on this model. `Clerk::Log` behaves like a regular mongoid model for easy access to your log entries. example model: class User include Clerk::Logger field :name field :address clerk_always_include :name, :address => :place def something log('Something went wrong!', :error) end end ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Added some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request
[![Build Status](https://secure.travis-ci.org/80beans/mongoid-clerk.png?branch=master)](http://travis-ci.org/80beans/mongoid-clerk) A simple logger for Mongoid. ## Installation Add this line to your application's Gemfile: gem 'mongoid-clerk' And then execute: $ bundle Or install it yourself as: $ gem install mongoid-clerk ## Usage Include `Clerk::Logger` in your model, then log anything with `log()`. The first argument is the message and the second the level. You can add default fields to your log entry by adding `clerk_always_include` this method accepts an array of fields it should include, or a hash if you want to rename a field. Clerk adds a polymorphic relation to the model `log_items` so you can scope log entries on this model. `Clerk::Log` behaves like a regular mongoid model for easy access to your log entries. example model: class User include Clerk::Logger field :name field :address clerk_always_include :name, :address => :place def something log('Something went wrong!', :error) end end ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Added some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request
Add build status to readme
Add build status to readme
Markdown
mit
80beans/mongoid-clerk
markdown
## Code Before: A simple logger for Mongoid. ## Installation Add this line to your application's Gemfile: gem 'mongoid-clerk' And then execute: $ bundle Or install it yourself as: $ gem install mongoid-clerk ## Usage Include `Clerk::Logger` in your model, then log anything with `log()`. The first argument is the message and the second the level. You can add default fields to your log entry by adding `clerk_always_include` this method accepts an array of fields it should include, or a hash if you want to rename a field. Clerk adds a polymorphic relation to the model `log_items` so you can scope log entries on this model. `Clerk::Log` behaves like a regular mongoid model for easy access to your log entries. example model: class User include Clerk::Logger field :name field :address clerk_always_include :name, :address => :place def something log('Something went wrong!', :error) end end ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Added some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request ## Instruction: Add build status to readme ## Code After: [![Build Status](https://secure.travis-ci.org/80beans/mongoid-clerk.png?branch=master)](http://travis-ci.org/80beans/mongoid-clerk) A simple logger for Mongoid. ## Installation Add this line to your application's Gemfile: gem 'mongoid-clerk' And then execute: $ bundle Or install it yourself as: $ gem install mongoid-clerk ## Usage Include `Clerk::Logger` in your model, then log anything with `log()`. The first argument is the message and the second the level. You can add default fields to your log entry by adding `clerk_always_include` this method accepts an array of fields it should include, or a hash if you want to rename a field. Clerk adds a polymorphic relation to the model `log_items` so you can scope log entries on this model. `Clerk::Log` behaves like a regular mongoid model for easy access to your log entries. example model: class User include Clerk::Logger field :name field :address clerk_always_include :name, :address => :place def something log('Something went wrong!', :error) end end ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Added some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request
+ + [![Build Status](https://secure.travis-ci.org/80beans/mongoid-clerk.png?branch=master)](http://travis-ci.org/80beans/mongoid-clerk) A simple logger for Mongoid. ## Installation Add this line to your application's Gemfile: gem 'mongoid-clerk' And then execute: $ bundle Or install it yourself as: $ gem install mongoid-clerk ## Usage Include `Clerk::Logger` in your model, then log anything with `log()`. The first argument is the message and the second the level. You can add default fields to your log entry by adding `clerk_always_include` this method accepts an array of fields it should include, or a hash if you want to rename a field. Clerk adds a polymorphic relation to the model `log_items` so you can scope log entries on this model. `Clerk::Log` behaves like a regular mongoid model for easy access to your log entries. example model: class User include Clerk::Logger field :name field :address clerk_always_include :name, :address => :place def something log('Something went wrong!', :error) end end ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Added some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request
2
0.038462
2
0
a4366662b0efc0e3ee9e55ab687853ad5eaa771b
spec/lita/builder_spec.rb
spec/lita/builder_spec.rb
require "spec_helper" describe Lita::Builder, lita: true do let(:robot) { instance_double("Lita::Robot") } subject { plugin.new(robot) } describe "#build_adapter" do let(:builder) do described_class.new(:test_adapter) do def run self.class.namespace end end end let(:plugin) { builder.build_adapter } it "builds an adapter" do expect(subject.run).to eq("test_adapter") end end describe "#build_handler" do builder = described_class.new(:test_handler) do route(/namespace/) { |response| response.reply(self.class.namespace) } end plugin = builder.build_handler describe plugin, lita_handler: true do before { allow(Lita).to receive(:handlers).and_return([plugin]) } it "builds a handler from a block" do send_message("namespace") expect(replies.last).to eq("test_handler") end end end end
require "spec_helper" describe Lita::Builder, lita: true do let(:robot) { instance_double("Lita::Robot") } subject { plugin.new(robot) } describe "#build_adapter" do let(:builder) do described_class.new(:test_adapter) do def run self.class.namespace end end end let(:plugin) { builder.build_adapter } it "builds an adapter" do expect(subject.run).to eq("test_adapter") end end describe "#build_handler" do builder = described_class.new(:test_handler) do route(/namespace/) { |response| response.reply(self.class.namespace) } end plugin = builder.build_handler describe plugin, lita_handler: true do before { registry.register_handler(plugin) } it "builds a handler from a block" do send_message("namespace") expect(replies.last).to eq("test_handler") end end end end
Use registry instead of stubbing the Lita.handlers.
Use registry instead of stubbing the Lita.handlers.
Ruby
mit
liamdawson/lita,mcgain/lita,jimmycuadra/lita,elia/lita,crimsonknave/lita,jaisonerick/lita,elia/lita,sadiqmmm/lita,jimmycuadra/lita,crimsonknave/lita,tristaneuan/lita,brodock/lita,natesholland/lita,chriswoodrich/lita,byroot/lita,sadiqmmm/lita,MatthewKrey/lita,natesholland/lita,liamdawson/lita,jaisonerick/lita,litaio/lita,MatthewKrey/lita,brodock/lita,byroot/lita,mcgain/lita,tristaneuan/lita,litaio/lita,chriswoodrich/lita
ruby
## Code Before: require "spec_helper" describe Lita::Builder, lita: true do let(:robot) { instance_double("Lita::Robot") } subject { plugin.new(robot) } describe "#build_adapter" do let(:builder) do described_class.new(:test_adapter) do def run self.class.namespace end end end let(:plugin) { builder.build_adapter } it "builds an adapter" do expect(subject.run).to eq("test_adapter") end end describe "#build_handler" do builder = described_class.new(:test_handler) do route(/namespace/) { |response| response.reply(self.class.namespace) } end plugin = builder.build_handler describe plugin, lita_handler: true do before { allow(Lita).to receive(:handlers).and_return([plugin]) } it "builds a handler from a block" do send_message("namespace") expect(replies.last).to eq("test_handler") end end end end ## Instruction: Use registry instead of stubbing the Lita.handlers. ## Code After: require "spec_helper" describe Lita::Builder, lita: true do let(:robot) { instance_double("Lita::Robot") } subject { plugin.new(robot) } describe "#build_adapter" do let(:builder) do described_class.new(:test_adapter) do def run self.class.namespace end end end let(:plugin) { builder.build_adapter } it "builds an adapter" do expect(subject.run).to eq("test_adapter") end end describe "#build_handler" do builder = described_class.new(:test_handler) do route(/namespace/) { |response| response.reply(self.class.namespace) } end plugin = builder.build_handler describe plugin, lita_handler: true do before { registry.register_handler(plugin) } it "builds a handler from a block" do send_message("namespace") expect(replies.last).to eq("test_handler") end end end end
require "spec_helper" describe Lita::Builder, lita: true do let(:robot) { instance_double("Lita::Robot") } subject { plugin.new(robot) } describe "#build_adapter" do let(:builder) do described_class.new(:test_adapter) do def run self.class.namespace end end end let(:plugin) { builder.build_adapter } it "builds an adapter" do expect(subject.run).to eq("test_adapter") end end describe "#build_handler" do builder = described_class.new(:test_handler) do route(/namespace/) { |response| response.reply(self.class.namespace) } end plugin = builder.build_handler describe plugin, lita_handler: true do - before { allow(Lita).to receive(:handlers).and_return([plugin]) } + before { registry.register_handler(plugin) } it "builds a handler from a block" do send_message("namespace") expect(replies.last).to eq("test_handler") end end end end
2
0.051282
1
1
cdcecaad78b8acf1c067c5eb631e6c3ae7167c2c
elasticsearch_dsl/__init__.py
elasticsearch_dsl/__init__.py
from .query import Q from .filter import F from .aggs import A from .function import SF from .search import Search from .field import * from .document import DocType from .mapping import Mapping from .index import Index from .analysis import analyzer, token_filter, char_filter, tokenizer VERSION = (0, 0, 4, 'dev') __version__ = VERSION __versionstr__ = '.'.join(map(str, VERSION))
from .query import Q from .filter import F from .aggs import A from .function import SF from .search import Search from .field import * from .document import DocType, MetaField from .mapping import Mapping from .index import Index from .analysis import analyzer, token_filter, char_filter, tokenizer VERSION = (0, 0, 4, 'dev') __version__ = VERSION __versionstr__ = '.'.join(map(str, VERSION))
Include MetaField in things importable from root
Include MetaField in things importable from root
Python
apache-2.0
sangheestyle/elasticsearch-dsl-py,3lnc/elasticsearch-dsl-py,elastic/elasticsearch-dsl-py,harshmaur/elasticsearch-dsl-py,solarissmoke/elasticsearch-dsl-py,Quiri/elasticsearch-dsl-py,harshit298/elasticsearch-dsl-py,f-santos/elasticsearch-dsl-py,reflection/elasticsearch-dsl-py,REVLWorld/elasticsearch-dsl-py,ziky90/elasticsearch-dsl-py,avishai-ish-shalom/elasticsearch-dsl-py,gkirkpatrick/elasticsearch-dsl-py,hampsterx/elasticsearch-dsl-py
python
## Code Before: from .query import Q from .filter import F from .aggs import A from .function import SF from .search import Search from .field import * from .document import DocType from .mapping import Mapping from .index import Index from .analysis import analyzer, token_filter, char_filter, tokenizer VERSION = (0, 0, 4, 'dev') __version__ = VERSION __versionstr__ = '.'.join(map(str, VERSION)) ## Instruction: Include MetaField in things importable from root ## Code After: from .query import Q from .filter import F from .aggs import A from .function import SF from .search import Search from .field import * from .document import DocType, MetaField from .mapping import Mapping from .index import Index from .analysis import analyzer, token_filter, char_filter, tokenizer VERSION = (0, 0, 4, 'dev') __version__ = VERSION __versionstr__ = '.'.join(map(str, VERSION))
from .query import Q from .filter import F from .aggs import A from .function import SF from .search import Search from .field import * - from .document import DocType + from .document import DocType, MetaField ? +++++++++++ from .mapping import Mapping from .index import Index from .analysis import analyzer, token_filter, char_filter, tokenizer VERSION = (0, 0, 4, 'dev') __version__ = VERSION __versionstr__ = '.'.join(map(str, VERSION))
2
0.142857
1
1
33ad64618459294272a7c5aa3bc995a1dda63f8b
README.md
README.md
[![Deploy to Azure](http://azuredeploy.net/deploybutton.png)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Flindydonna%2Fcodercards%2Fmaster%2Fazuredeploy.json)
+<a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Flindydonna%2Fcodercards%2Fmaster%2Fazuredeploy.json" target="_blank">![Deploy to Azure](http://azuredeploy.net/deploybutton.png)</a>
Update readme to open Deploy to Azure in new tab
Update readme to open Deploy to Azure in new tab
Markdown
mit
lindydonna/CoderCards,lindydonna/CoderCards,lindydonna/CoderCards
markdown
## Code Before: [![Deploy to Azure](http://azuredeploy.net/deploybutton.png)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Flindydonna%2Fcodercards%2Fmaster%2Fazuredeploy.json) ## Instruction: Update readme to open Deploy to Azure in new tab ## Code After: +<a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Flindydonna%2Fcodercards%2Fmaster%2Fazuredeploy.json" target="_blank">![Deploy to Azure](http://azuredeploy.net/deploybutton.png)</a>
+ +<a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Flindydonna%2Fcodercards%2Fmaster%2Fazuredeploy.json" target="_blank">![Deploy to Azure](http://azuredeploy.net/deploybutton.png)</a> - - [![Deploy to Azure](http://azuredeploy.net/deploybutton.png)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Flindydonna%2Fcodercards%2Fmaster%2Fazuredeploy.json)
3
1
1
2
9169b5de5d27e0a4123e126b9ee1b57948d33aca
.travis.yml
.travis.yml
sudo: required language: python services: - docker script: - bash scripts/build-push.sh
sudo: required language: python python: - "3.6" install: - pip install docker pytest services: - docker script: - bash scripts/test.sh deploy: provider: script script: bash scripts/build-push.sh on: branch: master
Make Travis deploy only on master and run the tests
:rocket: Make Travis deploy only on master and run the tests
YAML
apache-2.0
tiangolo/uwsgi-nginx-flask-docker,tiangolo/uwsgi-nginx-flask-docker,tiangolo/uwsgi-nginx-flask-docker
yaml
## Code Before: sudo: required language: python services: - docker script: - bash scripts/build-push.sh ## Instruction: :rocket: Make Travis deploy only on master and run the tests ## Code After: sudo: required language: python python: - "3.6" install: - pip install docker pytest services: - docker script: - bash scripts/test.sh deploy: provider: script script: bash scripts/build-push.sh on: branch: master
sudo: required language: python + + python: + - "3.6" + + install: + - pip install docker pytest services: - docker script: + - bash scripts/test.sh + + deploy: + provider: script - - bash scripts/build-push.sh ? ^ + script: bash scripts/build-push.sh ? ^^^^^^^^^ + on: + branch: master
14
1.555556
13
1
6cf0c73453dcf11d4719730a8361c2403103f543
app/assets/javascripts/admin/products/controllers/variant_units_controller.js.coffee
app/assets/javascripts/admin/products/controllers/variant_units_controller.js.coffee
angular.module("admin.products").controller "variantUnitsCtrl", ($scope, VariantUnitManager, $timeout, UnitPrices) -> $scope.unitName = (scale, type) -> VariantUnitManager.getUnitName(scale, type) $scope.$watchCollection "[unit_value_human, variant.price]", -> $scope.processUnitPrice() $scope.processUnitPrice = -> if ($scope.variant) price = $scope.variant.price scale = $scope.scale unit_type = angular.element("#product_variant_unit").val() if (unit_type != "items") $scope.updateValue() unit_value = $scope.unit_value else unit_value = 1 variant_unit_name = angular.element("#product_variant_unit_name").val() $scope.unit_price = UnitPrices.displayableUnitPrice(price, scale, unit_type, unit_value, variant_unit_name) $scope.scale = angular.element('#product_variant_unit_scale').val() $scope.updateValue = -> unit_value_human = angular.element('#unit_value_human').val() $scope.unit_value = unit_value_human * $scope.scale variant_unit_value = angular.element('#variant_unit_value').val() $scope.unit_value_human = variant_unit_value / $scope.scale $timeout -> $scope.processUnitPrice() $timeout -> $scope.updateValue()
angular.module("admin.products").controller "variantUnitsCtrl", ($scope, VariantUnitManager, $timeout, UnitPrices, unlocalizeCurrencyFilter) -> $scope.unitName = (scale, type) -> VariantUnitManager.getUnitName(scale, type) $scope.$watchCollection "[unit_value_human, variant.price]", -> $scope.processUnitPrice() $scope.processUnitPrice = -> if ($scope.variant) price = $scope.variant.price scale = $scope.scale unit_type = angular.element("#product_variant_unit").val() if (unit_type != "items") $scope.updateValue() unit_value = $scope.unit_value else unit_value = 1 variant_unit_name = angular.element("#product_variant_unit_name").val() $scope.unit_price = UnitPrices.displayableUnitPrice(price, scale, unit_type, unit_value, variant_unit_name) $scope.scale = angular.element('#product_variant_unit_scale').val() $scope.updateValue = -> unit_value_human = angular.element('#unit_value_human').val() $scope.unit_value = unlocalizeCurrencyFilter(unit_value_human) * $scope.scale variant_unit_value = angular.element('#variant_unit_value').val() $scope.unit_value_human = variant_unit_value / $scope.scale $timeout -> $scope.processUnitPrice() $timeout -> $scope.updateValue()
Use our unlocalizeCurrencyFilter to parse unit value field
Use our unlocalizeCurrencyFilter to parse unit value field - More tolerant (can handle `,` or `.` as decimal separator, remove thousands separator) to return a `number`
CoffeeScript
agpl-3.0
Matt-Yorkley/openfoodnetwork,Matt-Yorkley/openfoodnetwork,lin-d-hop/openfoodnetwork,lin-d-hop/openfoodnetwork,lin-d-hop/openfoodnetwork,mkllnk/openfoodnetwork,openfoodfoundation/openfoodnetwork,lin-d-hop/openfoodnetwork,openfoodfoundation/openfoodnetwork,mkllnk/openfoodnetwork,Matt-Yorkley/openfoodnetwork,openfoodfoundation/openfoodnetwork,mkllnk/openfoodnetwork,openfoodfoundation/openfoodnetwork,Matt-Yorkley/openfoodnetwork,mkllnk/openfoodnetwork
coffeescript
## Code Before: angular.module("admin.products").controller "variantUnitsCtrl", ($scope, VariantUnitManager, $timeout, UnitPrices) -> $scope.unitName = (scale, type) -> VariantUnitManager.getUnitName(scale, type) $scope.$watchCollection "[unit_value_human, variant.price]", -> $scope.processUnitPrice() $scope.processUnitPrice = -> if ($scope.variant) price = $scope.variant.price scale = $scope.scale unit_type = angular.element("#product_variant_unit").val() if (unit_type != "items") $scope.updateValue() unit_value = $scope.unit_value else unit_value = 1 variant_unit_name = angular.element("#product_variant_unit_name").val() $scope.unit_price = UnitPrices.displayableUnitPrice(price, scale, unit_type, unit_value, variant_unit_name) $scope.scale = angular.element('#product_variant_unit_scale').val() $scope.updateValue = -> unit_value_human = angular.element('#unit_value_human').val() $scope.unit_value = unit_value_human * $scope.scale variant_unit_value = angular.element('#variant_unit_value').val() $scope.unit_value_human = variant_unit_value / $scope.scale $timeout -> $scope.processUnitPrice() $timeout -> $scope.updateValue() ## Instruction: Use our unlocalizeCurrencyFilter to parse unit value field - More tolerant (can handle `,` or `.` as decimal separator, remove thousands separator) to return a `number` ## Code After: angular.module("admin.products").controller "variantUnitsCtrl", ($scope, VariantUnitManager, $timeout, UnitPrices, unlocalizeCurrencyFilter) -> $scope.unitName = (scale, type) -> VariantUnitManager.getUnitName(scale, type) $scope.$watchCollection "[unit_value_human, variant.price]", -> $scope.processUnitPrice() $scope.processUnitPrice = -> if ($scope.variant) price = $scope.variant.price scale = $scope.scale unit_type = angular.element("#product_variant_unit").val() if (unit_type != "items") $scope.updateValue() unit_value = $scope.unit_value else unit_value = 1 variant_unit_name = angular.element("#product_variant_unit_name").val() $scope.unit_price = UnitPrices.displayableUnitPrice(price, scale, unit_type, unit_value, variant_unit_name) $scope.scale = angular.element('#product_variant_unit_scale').val() $scope.updateValue = -> unit_value_human = angular.element('#unit_value_human').val() $scope.unit_value = unlocalizeCurrencyFilter(unit_value_human) * $scope.scale variant_unit_value = angular.element('#variant_unit_value').val() $scope.unit_value_human = variant_unit_value / $scope.scale $timeout -> $scope.processUnitPrice() $timeout -> $scope.updateValue()
- angular.module("admin.products").controller "variantUnitsCtrl", ($scope, VariantUnitManager, $timeout, UnitPrices) -> + angular.module("admin.products").controller "variantUnitsCtrl", ($scope, VariantUnitManager, $timeout, UnitPrices, unlocalizeCurrencyFilter) -> ? ++++++++++++++++++++++++++ $scope.unitName = (scale, type) -> VariantUnitManager.getUnitName(scale, type) $scope.$watchCollection "[unit_value_human, variant.price]", -> $scope.processUnitPrice() $scope.processUnitPrice = -> if ($scope.variant) price = $scope.variant.price scale = $scope.scale unit_type = angular.element("#product_variant_unit").val() if (unit_type != "items") $scope.updateValue() unit_value = $scope.unit_value else unit_value = 1 variant_unit_name = angular.element("#product_variant_unit_name").val() $scope.unit_price = UnitPrices.displayableUnitPrice(price, scale, unit_type, unit_value, variant_unit_name) $scope.scale = angular.element('#product_variant_unit_scale').val() $scope.updateValue = -> unit_value_human = angular.element('#unit_value_human').val() - $scope.unit_value = unit_value_human * $scope.scale + $scope.unit_value = unlocalizeCurrencyFilter(unit_value_human) * $scope.scale ? +++++++++++++++++++++++++ + variant_unit_value = angular.element('#variant_unit_value').val() $scope.unit_value_human = variant_unit_value / $scope.scale $timeout -> $scope.processUnitPrice() $timeout -> $scope.updateValue()
4
0.125
2
2
3f5bcd66d3372aeaa14387d917cbb7cec702b2b9
skyspark-scala/src/main/scala/com/github/dkanellis/skyspark/scala/api/algorithms/bnl/BlockNestedLoop.scala
skyspark-scala/src/main/scala/com/github/dkanellis/skyspark/scala/api/algorithms/bnl/BlockNestedLoop.scala
package com.github.dkanellis.skyspark.scala.api.algorithms.bnl import javax.annotation.concurrent.ThreadSafe import com.github.dkanellis.skyspark.scala.api.algorithms.{Point, SkylineAlgorithm} import org.apache.spark.rdd.RDD /** * A MapReduce based, block-nested loop algorithm (MR-BNL). * <p> * First we do the division job of the points to <Flag, Point> and then we merge the local skylines together and * calculate the total skyline set. * <p> * For more information read <i>Adapting Skyline Computation to the MapReduce Framework: Algorithms and Experiments</i> * by <i>Boliang Zhang, Shuigeng Zhou, Jihong Guan</i> * * @param divider The Division part of the algorithm * @param merger The Merging part of the algorithm */ @ThreadSafe class BlockNestedLoop private[bnl](private val divider: Divider, private val merger: Merger) extends SkylineAlgorithm { def this() = this(new BnlAlgorithm) override def computeSkylinePoints(points: RDD[Point]): RDD[Point] = { require(!points.isEmpty) val localSkylinesWithFlags = divider.divide(points) merger.merge(localSkylinesWithFlags) } private def this(bnlAlgorithm: BnlAlgorithm) = this(new Divider(bnlAlgorithm), new Merger(bnlAlgorithm)) }
package com.github.dkanellis.skyspark.scala.api.algorithms.bnl import javax.annotation.concurrent.ThreadSafe import com.github.dkanellis.skyspark.scala.api.algorithms.{Point, SkylineAlgorithm} import org.apache.spark.rdd.RDD /** * A MapReduce based, block-nested loop algorithm (MR-BNL). * <p> * First we do the division job of the points to <Flag, Point> and then we merge the local skylines together and * calculate the total skyline set. * <p> * For more information read <i>Adapting Skyline Computation to the MapReduce Framework: Algorithms and Experiments</i> * by <i>Boliang Zhang, Shuigeng Zhou, Jihong Guan</i> * * @param divider The Division part of the algorithm * @param merger The Merging part of the algorithm */ @ThreadSafe class BlockNestedLoop private[bnl](private val divider: Divider, private val merger: Merger) extends SkylineAlgorithm { private def this(bnlAlgorithm: BnlAlgorithm) = this(new Divider(bnlAlgorithm), new Merger(bnlAlgorithm)) def this() = this(new BnlAlgorithm) override def computeSkylinePoints(points: RDD[Point]): RDD[Point] = { require(!points.isEmpty) val localSkylinesWithFlags = divider.divide(points) merger.merge(localSkylinesWithFlags) } }
Fix wrong placement of constructor due to IntelliJ's code rearranging
Fix wrong placement of constructor due to IntelliJ's code rearranging
Scala
mit
AkiKanellis/SkySpark,dkanellis/SkySpark
scala
## Code Before: package com.github.dkanellis.skyspark.scala.api.algorithms.bnl import javax.annotation.concurrent.ThreadSafe import com.github.dkanellis.skyspark.scala.api.algorithms.{Point, SkylineAlgorithm} import org.apache.spark.rdd.RDD /** * A MapReduce based, block-nested loop algorithm (MR-BNL). * <p> * First we do the division job of the points to <Flag, Point> and then we merge the local skylines together and * calculate the total skyline set. * <p> * For more information read <i>Adapting Skyline Computation to the MapReduce Framework: Algorithms and Experiments</i> * by <i>Boliang Zhang, Shuigeng Zhou, Jihong Guan</i> * * @param divider The Division part of the algorithm * @param merger The Merging part of the algorithm */ @ThreadSafe class BlockNestedLoop private[bnl](private val divider: Divider, private val merger: Merger) extends SkylineAlgorithm { def this() = this(new BnlAlgorithm) override def computeSkylinePoints(points: RDD[Point]): RDD[Point] = { require(!points.isEmpty) val localSkylinesWithFlags = divider.divide(points) merger.merge(localSkylinesWithFlags) } private def this(bnlAlgorithm: BnlAlgorithm) = this(new Divider(bnlAlgorithm), new Merger(bnlAlgorithm)) } ## Instruction: Fix wrong placement of constructor due to IntelliJ's code rearranging ## Code After: package com.github.dkanellis.skyspark.scala.api.algorithms.bnl import javax.annotation.concurrent.ThreadSafe import com.github.dkanellis.skyspark.scala.api.algorithms.{Point, SkylineAlgorithm} import org.apache.spark.rdd.RDD /** * A MapReduce based, block-nested loop algorithm (MR-BNL). * <p> * First we do the division job of the points to <Flag, Point> and then we merge the local skylines together and * calculate the total skyline set. * <p> * For more information read <i>Adapting Skyline Computation to the MapReduce Framework: Algorithms and Experiments</i> * by <i>Boliang Zhang, Shuigeng Zhou, Jihong Guan</i> * * @param divider The Division part of the algorithm * @param merger The Merging part of the algorithm */ @ThreadSafe class BlockNestedLoop private[bnl](private val divider: Divider, private val merger: Merger) extends SkylineAlgorithm { private def this(bnlAlgorithm: BnlAlgorithm) = this(new Divider(bnlAlgorithm), new Merger(bnlAlgorithm)) def this() = this(new BnlAlgorithm) override def computeSkylinePoints(points: RDD[Point]): RDD[Point] = { require(!points.isEmpty) val localSkylinesWithFlags = divider.divide(points) merger.merge(localSkylinesWithFlags) } }
package com.github.dkanellis.skyspark.scala.api.algorithms.bnl import javax.annotation.concurrent.ThreadSafe import com.github.dkanellis.skyspark.scala.api.algorithms.{Point, SkylineAlgorithm} import org.apache.spark.rdd.RDD /** * A MapReduce based, block-nested loop algorithm (MR-BNL). * <p> * First we do the division job of the points to <Flag, Point> and then we merge the local skylines together and * calculate the total skyline set. * <p> * For more information read <i>Adapting Skyline Computation to the MapReduce Framework: Algorithms and Experiments</i> * by <i>Boliang Zhang, Shuigeng Zhou, Jihong Guan</i> * * @param divider The Division part of the algorithm * @param merger The Merging part of the algorithm */ @ThreadSafe class BlockNestedLoop private[bnl](private val divider: Divider, private val merger: Merger) extends SkylineAlgorithm { + private def this(bnlAlgorithm: BnlAlgorithm) = this(new Divider(bnlAlgorithm), new Merger(bnlAlgorithm)) + def this() = this(new BnlAlgorithm) override def computeSkylinePoints(points: RDD[Point]): RDD[Point] = { require(!points.isEmpty) val localSkylinesWithFlags = divider.divide(points) merger.merge(localSkylinesWithFlags) } - - private def this(bnlAlgorithm: BnlAlgorithm) = this(new Divider(bnlAlgorithm), new Merger(bnlAlgorithm)) }
4
0.117647
2
2
76df4116aaec99c285f9ab7bee45f253ce652b8d
lib/ModalFooter/examples/ModalFooterExample.js
lib/ModalFooter/examples/ModalFooterExample.js
/** * Modal: With ModalFooter component */ /* eslint-disable */ import React from 'react'; import ModalFooter from '@folio/stripes-components/lib/ModalFooter'; import Button from '@folio/stripes-components/lib/Button'; import Modal from '@folio/stripes-components/lib/Modal'; export default () => { const footer = ( <ModalFooter primaryButton={{ label: 'Save', onClick: () => alert('You clicked save'), }} secondaryButton={{ label: 'Cancel', onClick: () => alert('You clicked cancel'), }} /> ); return ( <Modal open={true} label="Modal with ModalFooter" footer={footer} > Modal Content </Modal> ); };
/** * Modal: With ModalFooter component */ /* eslint-disable */ import React from 'react'; import ModalFooter from '../ModalFooter'; import Button from '../../Button'; import Modal from '../../Modal'; export default () => { const footer = ( <ModalFooter primaryButton={{ label: 'Save', onClick: () => alert('You clicked save'), }} secondaryButton={{ label: 'Cancel', onClick: () => alert('You clicked cancel'), }} /> ); return ( <Modal open={true} label="Modal with ModalFooter" footer={footer} > Modal Content </Modal> ); };
Fix paths for ModalFooter story CSS
Fix paths for ModalFooter story CSS
JavaScript
apache-2.0
folio-org/stripes-components,folio-org/stripes-components
javascript
## Code Before: /** * Modal: With ModalFooter component */ /* eslint-disable */ import React from 'react'; import ModalFooter from '@folio/stripes-components/lib/ModalFooter'; import Button from '@folio/stripes-components/lib/Button'; import Modal from '@folio/stripes-components/lib/Modal'; export default () => { const footer = ( <ModalFooter primaryButton={{ label: 'Save', onClick: () => alert('You clicked save'), }} secondaryButton={{ label: 'Cancel', onClick: () => alert('You clicked cancel'), }} /> ); return ( <Modal open={true} label="Modal with ModalFooter" footer={footer} > Modal Content </Modal> ); }; ## Instruction: Fix paths for ModalFooter story CSS ## Code After: /** * Modal: With ModalFooter component */ /* eslint-disable */ import React from 'react'; import ModalFooter from '../ModalFooter'; import Button from '../../Button'; import Modal from '../../Modal'; export default () => { const footer = ( <ModalFooter primaryButton={{ label: 'Save', onClick: () => alert('You clicked save'), }} secondaryButton={{ label: 'Cancel', onClick: () => alert('You clicked cancel'), }} /> ); return ( <Modal open={true} label="Modal with ModalFooter" footer={footer} > Modal Content </Modal> ); };
/** * Modal: With ModalFooter component */ /* eslint-disable */ import React from 'react'; - import ModalFooter from '@folio/stripes-components/lib/ModalFooter'; - import Button from '@folio/stripes-components/lib/Button'; - import Modal from '@folio/stripes-components/lib/Modal'; + import ModalFooter from '../ModalFooter'; + import Button from '../../Button'; + import Modal from '../../Modal'; export default () => { const footer = ( <ModalFooter primaryButton={{ label: 'Save', onClick: () => alert('You clicked save'), }} secondaryButton={{ label: 'Cancel', onClick: () => alert('You clicked cancel'), }} /> ); return ( <Modal open={true} label="Modal with ModalFooter" footer={footer} > Modal Content </Modal> ); };
6
0.176471
3
3
9c2fff5aa24349712d2c0d54cc218e358199bd33
bootstrap.sh
bootstrap.sh
chsh -s $(which zsh) sh makesymlinks.sh
chsh -s $(which zsh) # Create necessary symlinks ./makesymlinks.sh
Use default shell to create symlinks
Use default shell to create symlinks
Shell
mit
sberrevoets/dotfiles,sberrevoets/dotfiles,sberrevoets/dotfiles,sberrevoets/dotfiles,sberrevoets/dotfiles
shell
## Code Before: chsh -s $(which zsh) sh makesymlinks.sh ## Instruction: Use default shell to create symlinks ## Code After: chsh -s $(which zsh) # Create necessary symlinks ./makesymlinks.sh
chsh -s $(which zsh) + # Create necessary symlinks - sh makesymlinks.sh ? ^^^ + ./makesymlinks.sh ? ^^
3
1
2
1
ce36d5107b937085b45374615c7cfc10621353ff
routes/companies.js
routes/companies.js
var express = require('express'); var router = express.Router(); var HttpError = require('./errors').HttpError; /* * GET / * [page = 0] * [key = ""]: on empty, it will search all company * Show 25 results per page */ router.get('/search', function(req, res, next) { var search = req.query.key || ""; var page = req.query.page || 0; var q; if (search == "") { q = {}; } else { q = {name: new RegExp("^" + search)}; } var collection = req.db.collection('companies'); collection.find(q).skip(25 * page).limit(25).toArray().then(function(results) { res.send(results); }).catch(function(err) { next(new HttpError("Internal Server Error", 500)); }); }); module.exports = router;
var express = require('express'); var router = express.Router(); var HttpError = require('./errors').HttpError; /* * GET / * [page = 0] * [key = ""]: on empty, it will search all company * Show 25 results per page */ router.get('/search', function(req, res, next) { var search = req.query.key || ""; var page = req.query.page || 0; var q; if (search == "") { q = {}; } else { q = { $or: [ {name: new RegExp("^" + search)}, {id: search}, ] }; } var collection = req.db.collection('companies'); collection.find(q).skip(25 * page).limit(25).toArray().then(function(results) { res.send(results); }).catch(function(err) { next(new HttpError("Internal Server Error", 500)); }); }); module.exports = router;
Enable searching the company id
Enable searching the company id
JavaScript
mit
mark86092/WorkTimeSurvey-backend
javascript
## Code Before: var express = require('express'); var router = express.Router(); var HttpError = require('./errors').HttpError; /* * GET / * [page = 0] * [key = ""]: on empty, it will search all company * Show 25 results per page */ router.get('/search', function(req, res, next) { var search = req.query.key || ""; var page = req.query.page || 0; var q; if (search == "") { q = {}; } else { q = {name: new RegExp("^" + search)}; } var collection = req.db.collection('companies'); collection.find(q).skip(25 * page).limit(25).toArray().then(function(results) { res.send(results); }).catch(function(err) { next(new HttpError("Internal Server Error", 500)); }); }); module.exports = router; ## Instruction: Enable searching the company id ## Code After: var express = require('express'); var router = express.Router(); var HttpError = require('./errors').HttpError; /* * GET / * [page = 0] * [key = ""]: on empty, it will search all company * Show 25 results per page */ router.get('/search', function(req, res, next) { var search = req.query.key || ""; var page = req.query.page || 0; var q; if (search == "") { q = {}; } else { q = { $or: [ {name: new RegExp("^" + search)}, {id: search}, ] }; } var collection = req.db.collection('companies'); collection.find(q).skip(25 * page).limit(25).toArray().then(function(results) { res.send(results); }).catch(function(err) { next(new HttpError("Internal Server Error", 500)); }); }); module.exports = router;
var express = require('express'); var router = express.Router(); var HttpError = require('./errors').HttpError; /* * GET / * [page = 0] * [key = ""]: on empty, it will search all company * Show 25 results per page */ router.get('/search', function(req, res, next) { var search = req.query.key || ""; var page = req.query.page || 0; var q; if (search == "") { q = {}; } else { + q = { + $or: [ - q = {name: new RegExp("^" + search)}; ? - ^ ^ + {name: new RegExp("^" + search)}, ? ^^^^^^ ^ + {id: search}, + ] + }; } var collection = req.db.collection('companies'); collection.find(q).skip(25 * page).limit(25).toArray().then(function(results) { res.send(results); }).catch(function(err) { next(new HttpError("Internal Server Error", 500)); }); }); module.exports = router;
7
0.225806
6
1
143a4682eb960d715153127382bc2d058929f97e
source/deployment_docs.rst
source/deployment_docs.rst
NSLS-II Deployment Documentation ******************************** This documentation describes how we deploying the "bluesky" software suite and associated configuration at NSLS-II. It is maintained as both an internal reference and a public guide for collaborators or potential collaborators who may be interested in our process. Components ========== .. toctree:: components/conda Deployment Procedures ===================== .. toctree:: deployment/releasing-software deployment/resyncing-conda deployment/updating-metapackages deployment/upgrading-beamlines Incident Reports ================ .. toctree:: :maxdepth: 1 incident-reports/2018-09-07-incompatible-qt-binaries.rst
NSLS-II Deployment Documentation ******************************** This documentation describes how we deploying the "bluesky" software suite and associated configuration at NSLS-II. It is maintained as both an internal reference and a public guide for collaborators or potential collaborators who may be interested in our process. Components ========== .. toctree:: components/conda components/ansible Deployment Procedures ===================== .. toctree:: deployment/releasing-software deployment/resyncing-conda deployment/updating-metapackages deployment/upgrading-beamlines Incident Reports ================ .. toctree:: :maxdepth: 1 incident-reports/2018-09-07-incompatible-qt-binaries.rst
Add a link to the ansible docs.
Add a link to the ansible docs.
reStructuredText
bsd-2-clause
NSLS-II/docs,NSLS-II/docs
restructuredtext
## Code Before: NSLS-II Deployment Documentation ******************************** This documentation describes how we deploying the "bluesky" software suite and associated configuration at NSLS-II. It is maintained as both an internal reference and a public guide for collaborators or potential collaborators who may be interested in our process. Components ========== .. toctree:: components/conda Deployment Procedures ===================== .. toctree:: deployment/releasing-software deployment/resyncing-conda deployment/updating-metapackages deployment/upgrading-beamlines Incident Reports ================ .. toctree:: :maxdepth: 1 incident-reports/2018-09-07-incompatible-qt-binaries.rst ## Instruction: Add a link to the ansible docs. ## Code After: NSLS-II Deployment Documentation ******************************** This documentation describes how we deploying the "bluesky" software suite and associated configuration at NSLS-II. It is maintained as both an internal reference and a public guide for collaborators or potential collaborators who may be interested in our process. Components ========== .. toctree:: components/conda components/ansible Deployment Procedures ===================== .. toctree:: deployment/releasing-software deployment/resyncing-conda deployment/updating-metapackages deployment/upgrading-beamlines Incident Reports ================ .. toctree:: :maxdepth: 1 incident-reports/2018-09-07-incompatible-qt-binaries.rst
NSLS-II Deployment Documentation ******************************** This documentation describes how we deploying the "bluesky" software suite and associated configuration at NSLS-II. It is maintained as both an internal reference and a public guide for collaborators or potential collaborators who may be interested in our process. Components ========== .. toctree:: components/conda + components/ansible Deployment Procedures ===================== .. toctree:: deployment/releasing-software deployment/resyncing-conda deployment/updating-metapackages deployment/upgrading-beamlines Incident Reports ================ .. toctree:: :maxdepth: 1 incident-reports/2018-09-07-incompatible-qt-binaries.rst
1
0.03125
1
0
e81a69b44a8a63e7cd4a85351686de4d26fc7345
log/tty_safe.go
log/tty_safe.go
// +build appengine package log import ( "io" ) func isatty(w io.Writer) bool { return false }
// +build appengine package log import ( "io" "gnd.la/internal" ) func isatty(w io.Writer) bool { if internal.InAppEngineDevServer() { return true } return false }
Add colored logging for GAE dev server
Add colored logging for GAE dev server
Go
mpl-2.0
rainycape/gondola,rainycape/gondola,rainycape/gondola,rainycape/gondola
go
## Code Before: // +build appengine package log import ( "io" ) func isatty(w io.Writer) bool { return false } ## Instruction: Add colored logging for GAE dev server ## Code After: // +build appengine package log import ( "io" "gnd.la/internal" ) func isatty(w io.Writer) bool { if internal.InAppEngineDevServer() { return true } return false }
// +build appengine package log import ( "io" + + "gnd.la/internal" ) func isatty(w io.Writer) bool { + if internal.InAppEngineDevServer() { + return true + } return false }
5
0.454545
5
0
56b41605b090ef652bf2c31ca8a74917899a178d
src/sass/_mentioner.scss
src/sass/_mentioner.scss
.mentioner { position: relative; } .mentioner__composer { border-radius: 3px; padding: 10px; background-color: #F5F5F5; outline: none; } .mentioner__dropdown { max-width: 250px; position: absolute; &--hidden { display: none; } }
.mentioner { position: relative; } .mentioner__composer { border-radius: 3px; padding: 10px; background-color: #F5F5F5; outline: none; } .mentioner__dropdown { max-width: 250px; position: absolute; z-index: 99999; &--hidden { display: none; } }
Add an absurdly high z-index for the dropdown
Add an absurdly high z-index for the dropdown
SCSS
mit
MediaSQ/jquery.mentioner,MediaSQ/jquery.mentioner,MediaSQ/jquery.mentioner
scss
## Code Before: .mentioner { position: relative; } .mentioner__composer { border-radius: 3px; padding: 10px; background-color: #F5F5F5; outline: none; } .mentioner__dropdown { max-width: 250px; position: absolute; &--hidden { display: none; } } ## Instruction: Add an absurdly high z-index for the dropdown ## Code After: .mentioner { position: relative; } .mentioner__composer { border-radius: 3px; padding: 10px; background-color: #F5F5F5; outline: none; } .mentioner__dropdown { max-width: 250px; position: absolute; z-index: 99999; &--hidden { display: none; } }
.mentioner { position: relative; } .mentioner__composer { border-radius: 3px; padding: 10px; background-color: #F5F5F5; outline: none; } .mentioner__dropdown { max-width: 250px; position: absolute; + z-index: 99999; &--hidden { display: none; } }
1
0.05
1
0
c6813f627f8facb973616f1cec551013b46ebb00
bin/check_it.c
bin/check_it.c
int main(int argc, char** argv) { struct passwd *passwd = getpwuid(getuid()); int errno = setreuid(geteuid(), geteuid()); // errno = execle("/usr/bin/id", (char *) 0, envp); if (errno == 0 && passwd != 0) { // CHECKIT_USER will contain the name of the user that invoked us. char user_evar[100]; snprintf(user_evar, 80, "CHECKIT_USER=%s", passwd->pw_name); // Use a nice clean PATH. char * envp[] = { "PATH=/bin:/usr/bin" , "HOME=/home2/ling572_00" , "JAVA_HOME=/usr/java/latest" , "JAVA_OPTS=-Xmx300m -Xms140m" , user_evar , (char *) 0 }; // Do it! errno = execve("/home2/ling572_00/Projects/CheckIt/bin/check_it.groovy", argv, envp); } printf("An error occured %d\n", errno); return errno; }
int main(int argc, char** argv) { struct passwd *passwd = getpwuid(getuid()); int errno = setreuid(geteuid(), geteuid()); // errno = execle("/usr/bin/id", (char *) 0, envp); if (errno == 0 && passwd != 0) { // CHECKIT_USER will contain the name of the user that invoked us. char user_evar[100]; snprintf(user_evar, 80, "CHECKIT_USER=%s", passwd->pw_name); // Use a nice clean PATH. char * envp[] = { "PATH=/bin:/usr/bin" , "HOME=/home2/ling572_00" , "JAVA_HOME=/usr/java/latest" , "JAVA_OPTS=-Xmx300m -Xms140m" , "LC_ALL=en_US.UTF-8" , user_evar , (char *) 0 }; // Do it! errno = execve("/home2/ling572_00/Projects/CheckIt/bin/check_it.groovy", argv, envp); } printf("An error occured %d\n", errno); return errno; }
Set LC_ALL to UTF-8 so that SSH is clean.
Set LC_ALL to UTF-8 so that SSH is clean.
C
agpl-3.0
jimwhite/CheckIt,jimwhite/CheckIt,jimwhite/CheckIt,jimwhite/CheckIt
c
## Code Before: int main(int argc, char** argv) { struct passwd *passwd = getpwuid(getuid()); int errno = setreuid(geteuid(), geteuid()); // errno = execle("/usr/bin/id", (char *) 0, envp); if (errno == 0 && passwd != 0) { // CHECKIT_USER will contain the name of the user that invoked us. char user_evar[100]; snprintf(user_evar, 80, "CHECKIT_USER=%s", passwd->pw_name); // Use a nice clean PATH. char * envp[] = { "PATH=/bin:/usr/bin" , "HOME=/home2/ling572_00" , "JAVA_HOME=/usr/java/latest" , "JAVA_OPTS=-Xmx300m -Xms140m" , user_evar , (char *) 0 }; // Do it! errno = execve("/home2/ling572_00/Projects/CheckIt/bin/check_it.groovy", argv, envp); } printf("An error occured %d\n", errno); return errno; } ## Instruction: Set LC_ALL to UTF-8 so that SSH is clean. ## Code After: int main(int argc, char** argv) { struct passwd *passwd = getpwuid(getuid()); int errno = setreuid(geteuid(), geteuid()); // errno = execle("/usr/bin/id", (char *) 0, envp); if (errno == 0 && passwd != 0) { // CHECKIT_USER will contain the name of the user that invoked us. char user_evar[100]; snprintf(user_evar, 80, "CHECKIT_USER=%s", passwd->pw_name); // Use a nice clean PATH. char * envp[] = { "PATH=/bin:/usr/bin" , "HOME=/home2/ling572_00" , "JAVA_HOME=/usr/java/latest" , "JAVA_OPTS=-Xmx300m -Xms140m" , "LC_ALL=en_US.UTF-8" , user_evar , (char *) 0 }; // Do it! errno = execve("/home2/ling572_00/Projects/CheckIt/bin/check_it.groovy", argv, envp); } printf("An error occured %d\n", errno); return errno; }
int main(int argc, char** argv) { struct passwd *passwd = getpwuid(getuid()); int errno = setreuid(geteuid(), geteuid()); // errno = execle("/usr/bin/id", (char *) 0, envp); if (errno == 0 && passwd != 0) { // CHECKIT_USER will contain the name of the user that invoked us. char user_evar[100]; snprintf(user_evar, 80, "CHECKIT_USER=%s", passwd->pw_name); // Use a nice clean PATH. char * envp[] = { "PATH=/bin:/usr/bin" , "HOME=/home2/ling572_00" , "JAVA_HOME=/usr/java/latest" , "JAVA_OPTS=-Xmx300m -Xms140m" + , "LC_ALL=en_US.UTF-8" , user_evar , (char *) 0 }; // Do it! errno = execve("/home2/ling572_00/Projects/CheckIt/bin/check_it.groovy", argv, envp); } printf("An error occured %d\n", errno); return errno; }
1
0.034483
1
0
ab5edd504789e8fad3dcf0f30b0fbec8608e2abe
django_nyt/urls.py
django_nyt/urls.py
from __future__ import absolute_import from __future__ import unicode_literals from django.conf.urls import patterns, url urlpatterns = patterns( '', url('^json/get/$', 'django_nyt.views.get_notifications', name='json_get'), url('^json/get/(?P<latest_id>\d+)/$', 'django_nyt.views.get_notifications', name='json_get'), url( '^json/mark-read/$', 'django_nyt.views.mark_read', name='json_mark_read_base'), url('^json/mark-read/(\d+)/$', 'django_nyt.views.mark_read', name='json_mark_read'), url( '^json/mark-read/(?P<id_lte>\d+)/(?P<id_gte>\d+)/$', 'django_nyt.views.mark_read', name='json_mark_read'), url( '^goto/(?P<notification_id>\d+)/$', 'django_nyt.views.goto', name='goto'), url('^goto/$', 'django_nyt.views.goto', name='goto_base'),) def get_pattern(app_name="nyt", namespace="nyt"): """Every url resolution takes place as "nyt:view_name". https://docs.djangoproject.com/en/dev/topics/http/urls/#topics-http-reversing-url-namespaces """ return urlpatterns, app_name, namespace
from __future__ import absolute_import from __future__ import unicode_literals from django import VERSION as DJANGO_VERSION from django.conf.urls import url urlpatterns = [ url('^json/get/$', 'django_nyt.views.get_notifications', name='json_get'), url('^json/get/(?P<latest_id>\d+)/$', 'django_nyt.views.get_notifications', name='json_get'), url('^json/mark-read/$', 'django_nyt.views.mark_read', name='json_mark_read_base'), url('^json/mark-read/(\d+)/$', 'django_nyt.views.mark_read', name='json_mark_read'), url('^json/mark-read/(?P<id_lte>\d+)/(?P<id_gte>\d+)/$', 'django_nyt.views.mark_read', name='json_mark_read'), url('^goto/(?P<notification_id>\d+)/$', 'django_nyt.views.goto', name='goto'), url('^goto/$', 'django_nyt.views.goto', name='goto_base'), ] if DJANGO_VERSION < (1, 8): from django.conf.urls import patterns urlpatterns = patterns('', *urlpatterns) def get_pattern(app_name="nyt", namespace="nyt"): """Every url resolution takes place as "nyt:view_name". https://docs.djangoproject.com/en/dev/topics/http/urls/#topics-http-reversing-url-namespaces """ return urlpatterns, app_name, namespace
Use list instead of patterns()
Use list instead of patterns()
Python
apache-2.0
benjaoming/django-nyt,benjaoming/django-nyt
python
## Code Before: from __future__ import absolute_import from __future__ import unicode_literals from django.conf.urls import patterns, url urlpatterns = patterns( '', url('^json/get/$', 'django_nyt.views.get_notifications', name='json_get'), url('^json/get/(?P<latest_id>\d+)/$', 'django_nyt.views.get_notifications', name='json_get'), url( '^json/mark-read/$', 'django_nyt.views.mark_read', name='json_mark_read_base'), url('^json/mark-read/(\d+)/$', 'django_nyt.views.mark_read', name='json_mark_read'), url( '^json/mark-read/(?P<id_lte>\d+)/(?P<id_gte>\d+)/$', 'django_nyt.views.mark_read', name='json_mark_read'), url( '^goto/(?P<notification_id>\d+)/$', 'django_nyt.views.goto', name='goto'), url('^goto/$', 'django_nyt.views.goto', name='goto_base'),) def get_pattern(app_name="nyt", namespace="nyt"): """Every url resolution takes place as "nyt:view_name". https://docs.djangoproject.com/en/dev/topics/http/urls/#topics-http-reversing-url-namespaces """ return urlpatterns, app_name, namespace ## Instruction: Use list instead of patterns() ## Code After: from __future__ import absolute_import from __future__ import unicode_literals from django import VERSION as DJANGO_VERSION from django.conf.urls import url urlpatterns = [ url('^json/get/$', 'django_nyt.views.get_notifications', name='json_get'), url('^json/get/(?P<latest_id>\d+)/$', 'django_nyt.views.get_notifications', name='json_get'), url('^json/mark-read/$', 'django_nyt.views.mark_read', name='json_mark_read_base'), url('^json/mark-read/(\d+)/$', 'django_nyt.views.mark_read', name='json_mark_read'), url('^json/mark-read/(?P<id_lte>\d+)/(?P<id_gte>\d+)/$', 'django_nyt.views.mark_read', name='json_mark_read'), url('^goto/(?P<notification_id>\d+)/$', 'django_nyt.views.goto', name='goto'), url('^goto/$', 'django_nyt.views.goto', name='goto_base'), ] if DJANGO_VERSION < (1, 8): from django.conf.urls import patterns urlpatterns = patterns('', *urlpatterns) def get_pattern(app_name="nyt", namespace="nyt"): """Every url resolution takes place as "nyt:view_name". https://docs.djangoproject.com/en/dev/topics/http/urls/#topics-http-reversing-url-namespaces """ return urlpatterns, app_name, namespace
from __future__ import absolute_import from __future__ import unicode_literals + from django import VERSION as DJANGO_VERSION - from django.conf.urls import patterns, url ? ---------- + from django.conf.urls import url - urlpatterns = patterns( + urlpatterns = [ - '', url('^json/get/$', 'django_nyt.views.get_notifications', ? ---- + url('^json/get/$', 'django_nyt.views.get_notifications', name='json_get'), ? ++++++++++++++++++ + url('^json/get/(?P<latest_id>\d+)/$', 'django_nyt.views.get_notifications', name='json_get'), - name='json_get'), url('^json/get/(?P<latest_id>\d+)/$', - 'django_nyt.views.get_notifications', name='json_get'), url( - '^json/mark-read/$', 'django_nyt.views.mark_read', - name='json_mark_read_base'), url('^json/mark-read/(\d+)/$', - 'django_nyt.views.mark_read', name='json_mark_read'), url( - '^json/mark-read/(?P<id_lte>\d+)/(?P<id_gte>\d+)/$', - 'django_nyt.views.mark_read', name='json_mark_read'), url( ? ^^^ ----- + url('^json/mark-read/$', 'django_nyt.views.mark_read', name='json_mark_read_base'), ? ^^^^^^^^^^^^^^^^^^^^^^^^ +++++ + url('^json/mark-read/(\d+)/$', 'django_nyt.views.mark_read', name='json_mark_read'), + url('^json/mark-read/(?P<id_lte>\d+)/(?P<id_gte>\d+)/$', 'django_nyt.views.mark_read', name='json_mark_read'), - '^goto/(?P<notification_id>\d+)/$', 'django_nyt.views.goto', name='goto'), ? ^^^^ + url('^goto/(?P<notification_id>\d+)/$', 'django_nyt.views.goto', name='goto'), ? ^^^^ - url('^goto/$', 'django_nyt.views.goto', name='goto_base'),) ? - + url('^goto/$', 'django_nyt.views.goto', name='goto_base'), + ] + + + if DJANGO_VERSION < (1, 8): + from django.conf.urls import patterns + urlpatterns = patterns('', *urlpatterns) def get_pattern(app_name="nyt", namespace="nyt"): """Every url resolution takes place as "nyt:view_name". https://docs.djangoproject.com/en/dev/topics/http/urls/#topics-http-reversing-url-namespaces """ return urlpatterns, app_name, namespace
28
1.217391
16
12
e7d4e043960c901a7f6eb854284b3ebb3f3f1e70
.travis.yml
.travis.yml
language: python python: - "2.7" addons: sauce_connect: true before_script: - python RunFlask.py & script: python test/travis-testcases.py branches: only: - master
language: python python: - "2.7" env: global: - secure: <%= ENV['SauceLogin'] %> - secure: <%= ENV['SauceAccessKey'] %> addons: sauce_connect: true before_script: - python RunFlask.py & script: python test/travis-testcases.py branches: only: - master
Add Sauce token using env variables
Add Sauce token using env variables
YAML
mit
harishvc/githubanalytics,harishvc/githubanalytics,harishvc/githubanalytics
yaml
## Code Before: language: python python: - "2.7" addons: sauce_connect: true before_script: - python RunFlask.py & script: python test/travis-testcases.py branches: only: - master ## Instruction: Add Sauce token using env variables ## Code After: language: python python: - "2.7" env: global: - secure: <%= ENV['SauceLogin'] %> - secure: <%= ENV['SauceAccessKey'] %> addons: sauce_connect: true before_script: - python RunFlask.py & script: python test/travis-testcases.py branches: only: - master
language: python python: - "2.7" + env: + global: + - secure: <%= ENV['SauceLogin'] %> + - secure: <%= ENV['SauceAccessKey'] %> addons: sauce_connect: true before_script: - python RunFlask.py & script: python test/travis-testcases.py branches: only: - master
4
0.363636
4
0
04efbd29d2a96d0506c5b83629d51eff3c10833e
src/js/components/Admin/ArticleImages/Row.js
src/js/components/Admin/ArticleImages/Row.js
import React from 'react' import { inject, observer } from 'mobx-react' import { IMAGE_BASE_URL } from '../../../constants' import RedButton from '../../Buttons/Red' @inject('articleImagesStore') @observer export default class Row extends React.Component { handleDelete() { let articleImageID = this.props.image.id this.props.articleImagesStore.delete(articleImageID) } render() { let image = this.props.image let thumbURL = IMAGE_BASE_URL + image.thumb let regularURL = IMAGE_BASE_URL + image.regular return ( <tr className='article-image'> <td> <img src={ thumbURL } /> </td> <td> <a href={ thumbURL }>{ thumbURL }</a> <br /> <br /> <a href={ regularURL }>{ regularURL }</a> </td> <td> <RedButton title='Delete' onClick={ this.handleDelete.bind(this) } /> </td> </tr> ) } } Row.propTypes = { image: React.PropTypes.object.isRequired }
import React from 'react' import { inject, observer } from 'mobx-react' import { IMAGE_BASE_URL } from '../../../constants' import RedButton from '../../Buttons/Red' @inject('articleImagesStore') @observer export default class Row extends React.Component { handleDelete() { let articleImageID = this.props.image.id this.props.articleImagesStore.delete(articleImageID) } render() { let image = this.props.image let thumbURL = IMAGE_BASE_URL + image.thumb let regularURL = IMAGE_BASE_URL + image.regular let originalURL = IMAGE_BASE_URL + image.original return ( <tr className='article-image'> <td> <img src={ thumbURL } /> </td> <td> <a href={ thumbURL }> Thumbnail URL </a> <br /> <a href={ regularURL }> Regular URL </a> <br /> <a href={ originalURL }> Original URL </a> </td> <td> <RedButton title='Delete' onClick={ this.handleDelete.bind(this) } /> </td> </tr> ) } } Row.propTypes = { image: React.PropTypes.object.isRequired }
Add original ArticleImage URL to admin panel
Add original ArticleImage URL to admin panel
JavaScript
mit
appdev-academy/appdev.academy-react,appdev-academy/appdev.academy-react,appdev-academy/appdev.academy-react
javascript
## Code Before: import React from 'react' import { inject, observer } from 'mobx-react' import { IMAGE_BASE_URL } from '../../../constants' import RedButton from '../../Buttons/Red' @inject('articleImagesStore') @observer export default class Row extends React.Component { handleDelete() { let articleImageID = this.props.image.id this.props.articleImagesStore.delete(articleImageID) } render() { let image = this.props.image let thumbURL = IMAGE_BASE_URL + image.thumb let regularURL = IMAGE_BASE_URL + image.regular return ( <tr className='article-image'> <td> <img src={ thumbURL } /> </td> <td> <a href={ thumbURL }>{ thumbURL }</a> <br /> <br /> <a href={ regularURL }>{ regularURL }</a> </td> <td> <RedButton title='Delete' onClick={ this.handleDelete.bind(this) } /> </td> </tr> ) } } Row.propTypes = { image: React.PropTypes.object.isRequired } ## Instruction: Add original ArticleImage URL to admin panel ## Code After: import React from 'react' import { inject, observer } from 'mobx-react' import { IMAGE_BASE_URL } from '../../../constants' import RedButton from '../../Buttons/Red' @inject('articleImagesStore') @observer export default class Row extends React.Component { handleDelete() { let articleImageID = this.props.image.id this.props.articleImagesStore.delete(articleImageID) } render() { let image = this.props.image let thumbURL = IMAGE_BASE_URL + image.thumb let regularURL = IMAGE_BASE_URL + image.regular let originalURL = IMAGE_BASE_URL + image.original return ( <tr className='article-image'> <td> <img src={ thumbURL } /> </td> <td> <a href={ thumbURL }> Thumbnail URL </a> <br /> <a href={ regularURL }> Regular URL </a> <br /> <a href={ originalURL }> Original URL </a> </td> <td> <RedButton title='Delete' onClick={ this.handleDelete.bind(this) } /> </td> </tr> ) } } Row.propTypes = { image: React.PropTypes.object.isRequired }
import React from 'react' import { inject, observer } from 'mobx-react' import { IMAGE_BASE_URL } from '../../../constants' import RedButton from '../../Buttons/Red' @inject('articleImagesStore') @observer export default class Row extends React.Component { handleDelete() { let articleImageID = this.props.image.id this.props.articleImagesStore.delete(articleImageID) } render() { let image = this.props.image let thumbURL = IMAGE_BASE_URL + image.thumb let regularURL = IMAGE_BASE_URL + image.regular + let originalURL = IMAGE_BASE_URL + image.original return ( <tr className='article-image'> <td> <img src={ thumbURL } /> </td> <td> - <a href={ thumbURL }>{ thumbURL }</a> ? - ^ - + <a href={ thumbURL }> Thumbnail URL </a> ? ^ +++++ <br /> + <a href={ regularURL }> Regular URL </a> <br /> - <a href={ regularURL }>{ regularURL }</a> ? ^ ^ -- - ^ ^ ^^ - + <a href={ originalURL }> Original URL </a> ? + ^ ^^^ + ^ ^^^ ^ </td> <td> <RedButton title='Delete' onClick={ this.handleDelete.bind(this) } /> </td> </tr> ) } } Row.propTypes = { image: React.PropTypes.object.isRequired }
6
0.133333
4
2
f062a7e0868ec8918767e32978a83c81c45a0c04
resolve/urls.js
resolve/urls.js
'use strict'; var stdin = process.openStdin(); var async = require('async'); var reachableUrl = require('reachable-url') if (require.main === module) { main(); } else { module.exports = resolveUrls; } function main() { stdin.setEncoding('utf8'); stdin.on('data', function(err, data) { if(err) { return console.error(err); } console.log(JSON.stringify(resolveUrls(JSON.parse(data)), null, 4)); }); } function resolveUrls(urls, cb) { async.mapLimit(urls, 20, resolveUrl, function(err, d) { if(err) { return cb(err); } cb(null, d.filter(id)); }); } function resolveUrl(d, cb) { reachableUrl(d.url).then(({ url }) => { d.url = url cb(null, d) }).catch(err => { console.error(err) cb(); }) } function id(a) {return a;}
'use strict'; var stdin = process.openStdin(); var async = require('async'); var reachableUrl = require('reachable-url') if (require.main === module) { main(); } else { module.exports = resolveUrls; } function main() { stdin.setEncoding('utf8'); stdin.on('data', function(err, data) { if(err) { return console.error(err); } console.log(JSON.stringify(resolveUrls(JSON.parse(data)), null, 4)); }); } function resolveUrls(urls, cb) { async.mapLimit(urls, 20, resolveUrl, function(err, d) { if(err) { return cb(err); } cb(null, d.filter(id)); }); } function resolveUrl(d, cb) { reachableUrl(d.url, { timeout: 10000 }).then(({ url }) => { d.url = url cb(null, d) }).catch(err => { console.error(err) cb(); }) } function id(a) {return a;}
Add a 10s timeout to reachable-url
chore: Add a 10s timeout to reachable-url
JavaScript
mit
bebraw/blog-utils
javascript
## Code Before: 'use strict'; var stdin = process.openStdin(); var async = require('async'); var reachableUrl = require('reachable-url') if (require.main === module) { main(); } else { module.exports = resolveUrls; } function main() { stdin.setEncoding('utf8'); stdin.on('data', function(err, data) { if(err) { return console.error(err); } console.log(JSON.stringify(resolveUrls(JSON.parse(data)), null, 4)); }); } function resolveUrls(urls, cb) { async.mapLimit(urls, 20, resolveUrl, function(err, d) { if(err) { return cb(err); } cb(null, d.filter(id)); }); } function resolveUrl(d, cb) { reachableUrl(d.url).then(({ url }) => { d.url = url cb(null, d) }).catch(err => { console.error(err) cb(); }) } function id(a) {return a;} ## Instruction: chore: Add a 10s timeout to reachable-url ## Code After: 'use strict'; var stdin = process.openStdin(); var async = require('async'); var reachableUrl = require('reachable-url') if (require.main === module) { main(); } else { module.exports = resolveUrls; } function main() { stdin.setEncoding('utf8'); stdin.on('data', function(err, data) { if(err) { return console.error(err); } console.log(JSON.stringify(resolveUrls(JSON.parse(data)), null, 4)); }); } function resolveUrls(urls, cb) { async.mapLimit(urls, 20, resolveUrl, function(err, d) { if(err) { return cb(err); } cb(null, d.filter(id)); }); } function resolveUrl(d, cb) { reachableUrl(d.url, { timeout: 10000 }).then(({ url }) => { d.url = url cb(null, d) }).catch(err => { console.error(err) cb(); }) } function id(a) {return a;}
'use strict'; var stdin = process.openStdin(); var async = require('async'); var reachableUrl = require('reachable-url') if (require.main === module) { main(); } else { module.exports = resolveUrls; } function main() { stdin.setEncoding('utf8'); stdin.on('data', function(err, data) { if(err) { return console.error(err); } console.log(JSON.stringify(resolveUrls(JSON.parse(data)), null, 4)); }); } function resolveUrls(urls, cb) { async.mapLimit(urls, 20, resolveUrl, function(err, d) { if(err) { return cb(err); } cb(null, d.filter(id)); }); } function resolveUrl(d, cb) { - reachableUrl(d.url).then(({ url }) => { + reachableUrl(d.url, { timeout: 10000 }).then(({ url }) => { ? ++++++++++++++++++++ d.url = url cb(null, d) }).catch(err => { console.error(err) cb(); }) } function id(a) {return a;}
2
0.041667
1
1
3c600608d3ebbae13738ee6b7361f5ef52a734e5
tests/cases/fourslash/completionEntryForImportName.ts
tests/cases/fourslash/completionEntryForImportName.ts
///<reference path="fourslash.ts" /> ////import /*1*/q = /*2*/ verifyIncompleteImport(); goTo.marker('2'); edit.insert("a."); verifyIncompleteImport(); function verifyIncompleteImport() { goTo.marker('1'); verify.completionListIsEmpty(); verify.quickInfoIs("import q"); }
///<reference path="fourslash.ts" /> ////import /*1*/ /*2*/ goTo.marker('1'); verify.completionListIsEmpty(); edit.insert('q'); verify.completionListIsEmpty(); verifyIncompleteImportName(); goTo.marker('2'); edit.insert(" = "); verifyIncompleteImportName(); goTo.marker("2"); edit.moveRight(" = ".length); edit.insert("a."); verifyIncompleteImportName(); function verifyIncompleteImportName() { goTo.marker('1'); verify.completionListIsEmpty(); verify.quickInfoIs("import q"); }
Test now covers completion entry at name of the import when there is no name and there is name
Test now covers completion entry at name of the import when there is no name and there is name
TypeScript
apache-2.0
Raynos/TypeScript,ionux/TypeScript,donaldpipowitch/TypeScript,synaptek/TypeScript,msynk/TypeScript,yortus/TypeScript,blakeembrey/TypeScript,mcanthony/TypeScript,nycdotnet/TypeScript,MartyIX/TypeScript,Microsoft/TypeScript,hoanhtien/TypeScript,Mqgh2013/TypeScript,vilic/TypeScript,RyanCavanaugh/TypeScript,jwbay/TypeScript,kingland/TypeScript,AbubakerB/TypeScript,msynk/TypeScript,thr0w/Thr0wScript,kpreisser/TypeScript,vilic/TypeScript,JohnZ622/TypeScript,chuckjaz/TypeScript,RReverser/TypeScript,samuelhorwitz/typescript,SmallAiTT/TypeScript,Mqgh2013/TypeScript,synaptek/TypeScript,yortus/TypeScript,jwbay/TypeScript,kitsonk/TypeScript,ziacik/TypeScript,microsoft/TypeScript,suto/TypeScript,weswigham/TypeScript,moander/TypeScript,nycdotnet/TypeScript,matthewjh/TypeScript,bpowers/TypeScript,OlegDokuka/TypeScript,kingland/TypeScript,ropik/TypeScript,chuckjaz/TypeScript,germ13/TypeScript,blakeembrey/TypeScript,MartyIX/TypeScript,erikmcc/TypeScript,erikmcc/TypeScript,mauricionr/TypeScript,shanexu/TypeScript,mcanthony/TypeScript,shanexu/TypeScript,SimoneGianni/TypeScript,pcan/TypeScript,samuelhorwitz/typescript,AbubakerB/TypeScript,Viromo/TypeScript,yortus/TypeScript,mauricionr/TypeScript,evgrud/TypeScript,evgrud/TypeScript,RyanCavanaugh/TypeScript,thr0w/Thr0wScript,tempbottle/TypeScript,Eyas/TypeScript,impinball/TypeScript,hoanhtien/TypeScript,Viromo/TypeScript,jwbay/TypeScript,gonifade/TypeScript,hoanhtien/TypeScript,matthewjh/TypeScript,thr0w/Thr0wScript,jbondc/TypeScript,jdavidberger/TypeScript,Eyas/TypeScript,OlegDokuka/TypeScript,mcanthony/TypeScript,chuckjaz/TypeScript,plantain-00/TypeScript,synaptek/TypeScript,abbasmhd/TypeScript,mihailik/TypeScript,nojvek/TypeScript,SaschaNaz/TypeScript,microsoft/TypeScript,shovon/TypeScript,Microsoft/TypeScript,yazeng/TypeScript,fdecampredon/jsx-typescript,donaldpipowitch/TypeScript,suto/TypeScript,mmoskal/TypeScript,tinganho/TypeScript,Mqgh2013/TypeScript,rgbkrk/TypeScript,ziacik/TypeScript,ropik/TypeScript,JohnZ622/TypeScript,ropik/TypeScript,fabioparra/TypeScript,ionux/TypeScript,plantain-00/TypeScript,jbondc/TypeScript,vilic/TypeScript,ZLJASON/TypeScript,tempbottle/TypeScript,webhost/TypeScript,SmallAiTT/TypeScript,sassson/TypeScript,TukekeSoft/TypeScript,ziacik/TypeScript,weswigham/TypeScript,DanielRosenwasser/TypeScript,pcan/TypeScript,minestarks/TypeScript,DLehenbauer/TypeScript,mihailik/TypeScript,MartyIX/TypeScript,minestarks/TypeScript,SimoneGianni/TypeScript,fdecampredon/jsx-typescript,jbondc/TypeScript,chocolatechipui/TypeScript,hitesh97/TypeScript,jdavidberger/TypeScript,mauricionr/TypeScript,ziacik/TypeScript,basarat/TypeScript,rgbkrk/TypeScript,enginekit/TypeScript,donaldpipowitch/TypeScript,kitsonk/TypeScript,progre/TypeScript,gdi2290/TypeScript,jamesrmccallum/TypeScript,moander/TypeScript,TukekeSoft/TypeScript,germ13/TypeScript,Eyas/TypeScript,fdecampredon/jsx-typescript,nagyistoce/TypeScript,DLehenbauer/TypeScript,samuelhorwitz/typescript,shanexu/TypeScript,shiftkey/TypeScript,basarat/TypeScript,RReverser/TypeScript,synaptek/TypeScript,AbubakerB/TypeScript,SmallAiTT/TypeScript,progre/TypeScript,jteplitz602/TypeScript,suto/TypeScript,DLehenbauer/TypeScript,Viromo/TypeScript,shiftkey/TypeScript,alexeagle/TypeScript,OlegDokuka/TypeScript,kitsonk/TypeScript,shanexu/TypeScript,yortus/TypeScript,weswigham/TypeScript,evgrud/TypeScript,erikmcc/TypeScript,mmoskal/TypeScript,mmoskal/TypeScript,yukulele/TypeScript,kpreisser/TypeScript,MartyIX/TypeScript,moander/TypeScript,nojvek/TypeScript,mszczepaniak/TypeScript,zhengbli/TypeScript,fabioparra/TypeScript,donaldpipowitch/TypeScript,nycdotnet/TypeScript,impinball/TypeScript,jamesrmccallum/TypeScript,enginekit/TypeScript,rodrigues-daniel/TypeScript,zmaruo/TypeScript,thr0w/Thr0wScript,ionux/TypeScript,JohnZ622/TypeScript,chuckjaz/TypeScript,Raynos/TypeScript,DanielRosenwasser/TypeScript,tempbottle/TypeScript,zhengbli/TypeScript,zhengbli/TypeScript,erikmcc/TypeScript,nojvek/TypeScript,kumikumi/TypeScript,mszczepaniak/TypeScript,impinball/TypeScript,rodrigues-daniel/TypeScript,kingland/TypeScript,kumikumi/TypeScript,shovon/TypeScript,progre/TypeScript,kimamula/TypeScript,kpreisser/TypeScript,shiftkey/TypeScript,HereSinceres/TypeScript,ZLJASON/TypeScript,TukekeSoft/TypeScript,plantain-00/TypeScript,fdecampredon/jsx-typescript,yukulele/TypeScript,abbasmhd/TypeScript,jeremyepling/TypeScript,germ13/TypeScript,gonifade/TypeScript,hitesh97/TypeScript,mauricionr/TypeScript,RyanCavanaugh/TypeScript,rodrigues-daniel/TypeScript,kimamula/TypeScript,nagyistoce/TypeScript,nycdotnet/TypeScript,Microsoft/TypeScript,DanielRosenwasser/TypeScript,RReverser/TypeScript,basarat/TypeScript,DanielRosenwasser/TypeScript,samuelhorwitz/typescript,zmaruo/TypeScript,SaschaNaz/TypeScript,evgrud/TypeScript,enginekit/TypeScript,Raynos/TypeScript,fabioparra/TypeScript,jamesrmccallum/TypeScript,chocolatechipui/TypeScript,mihailik/TypeScript,Raynos/TypeScript,HereSinceres/TypeScript,webhost/TypeScript,zmaruo/TypeScript,mmoskal/TypeScript,jdavidberger/TypeScript,jeremyepling/TypeScript,microsoft/TypeScript,basarat/TypeScript,nagyistoce/TypeScript,kimamula/TypeScript,DLehenbauer/TypeScript,plantain-00/TypeScript,jeremyepling/TypeScript,fearthecowboy/TypeScript,mcanthony/TypeScript,moander/TypeScript,matthewjh/TypeScript,Eyas/TypeScript,mihailik/TypeScript,bpowers/TypeScript,jwbay/TypeScript,shovon/TypeScript,yazeng/TypeScript,mszczepaniak/TypeScript,tinganho/TypeScript,JohnZ622/TypeScript,sassson/TypeScript,SaschaNaz/TypeScript,SimoneGianni/TypeScript,Viromo/TypeScript,alexeagle/TypeScript,jteplitz602/TypeScript,yazeng/TypeScript,blakeembrey/TypeScript,gonifade/TypeScript,yukulele/TypeScript,keir-rex/TypeScript,abbasmhd/TypeScript,keir-rex/TypeScript,vilic/TypeScript,billti/TypeScript,HereSinceres/TypeScript,minestarks/TypeScript,billti/TypeScript,alexeagle/TypeScript,kumikumi/TypeScript,fabioparra/TypeScript,rodrigues-daniel/TypeScript,bpowers/TypeScript,ZLJASON/TypeScript,kimamula/TypeScript,SaschaNaz/TypeScript,AbubakerB/TypeScript,fearthecowboy/TypeScript,chocolatechipui/TypeScript,hitesh97/TypeScript,pcan/TypeScript,tinganho/TypeScript,rgbkrk/TypeScript,billti/TypeScript,nojvek/TypeScript,blakeembrey/TypeScript,ropik/TypeScript,fearthecowboy/TypeScript,keir-rex/TypeScript,sassson/TypeScript,msynk/TypeScript,ionux/TypeScript,jteplitz602/TypeScript,webhost/TypeScript
typescript
## Code Before: ///<reference path="fourslash.ts" /> ////import /*1*/q = /*2*/ verifyIncompleteImport(); goTo.marker('2'); edit.insert("a."); verifyIncompleteImport(); function verifyIncompleteImport() { goTo.marker('1'); verify.completionListIsEmpty(); verify.quickInfoIs("import q"); } ## Instruction: Test now covers completion entry at name of the import when there is no name and there is name ## Code After: ///<reference path="fourslash.ts" /> ////import /*1*/ /*2*/ goTo.marker('1'); verify.completionListIsEmpty(); edit.insert('q'); verify.completionListIsEmpty(); verifyIncompleteImportName(); goTo.marker('2'); edit.insert(" = "); verifyIncompleteImportName(); goTo.marker("2"); edit.moveRight(" = ".length); edit.insert("a."); verifyIncompleteImportName(); function verifyIncompleteImportName() { goTo.marker('1'); verify.completionListIsEmpty(); verify.quickInfoIs("import q"); }
///<reference path="fourslash.ts" /> - ////import /*1*/q = /*2*/ ? --- + ////import /*1*/ /*2*/ + goTo.marker('1'); + verify.completionListIsEmpty(); + edit.insert('q'); + verify.completionListIsEmpty(); - verifyIncompleteImport(); + verifyIncompleteImportName(); ? ++++ + goTo.marker('2'); + edit.insert(" = "); + verifyIncompleteImportName(); + + goTo.marker("2"); + edit.moveRight(" = ".length); edit.insert("a."); - verifyIncompleteImport(); + verifyIncompleteImportName(); ? ++++ - function verifyIncompleteImport() { + function verifyIncompleteImportName() { ? ++++ goTo.marker('1'); verify.completionListIsEmpty(); verify.quickInfoIs("import q"); }
18
1.285714
14
4
8bdccafe644410fd1cedaed92f27418774163e3a
starter-kit/composer.json
starter-kit/composer.json
{ "name": "example/hello-world", "description": "Starter Kit application for MCP Panthor", "autoload": { "psr-4": { "ExampleApplication\\": "src" } }, "require": { "php": "~7.1", "ext-sodium": "~2.0 || ~7.2", "ql/mcp-panthor": "dev-master", "ql/mcp-common": "~2.0", "slim/slim": "~3.10", "symfony/config": "~4.0", "symfony/dotenv": "~4.0", "symfony/dependency-injection": "~4.0", "symfony/finder": "~4.0", "symfony/process": "~4.0", "symfony/proxy-manager-bridge": "~4.0", "symfony/yaml": "~4.0", "twig/twig": "~2.4" } }
{ "name": "example/hello-world", "description": "Starter Kit application for MCP Panthor", "autoload": { "psr-4": { "ExampleApplication\\": "src" } }, "require": { "php": "~7.1", "ext-sodium": "~2.0 || ~7.2", "ql/mcp-panthor": "~3.3", "ql/mcp-common": "~2.0", "slim/slim": "~3.10", "symfony/config": "~4.0", "symfony/dotenv": "~4.0", "symfony/dependency-injection": "~4.0", "symfony/finder": "~4.0", "symfony/process": "~4.0", "symfony/proxy-manager-bridge": "~4.0", "symfony/yaml": "~4.0", "twig/twig": "~2.4" } }
Update starter kit to new version 3.3
Update starter kit to new version 3.3
JSON
mit
quickenloans-mcp/mcp-panthor,quickenloans-mcp/mcp-panthor
json
## Code Before: { "name": "example/hello-world", "description": "Starter Kit application for MCP Panthor", "autoload": { "psr-4": { "ExampleApplication\\": "src" } }, "require": { "php": "~7.1", "ext-sodium": "~2.0 || ~7.2", "ql/mcp-panthor": "dev-master", "ql/mcp-common": "~2.0", "slim/slim": "~3.10", "symfony/config": "~4.0", "symfony/dotenv": "~4.0", "symfony/dependency-injection": "~4.0", "symfony/finder": "~4.0", "symfony/process": "~4.0", "symfony/proxy-manager-bridge": "~4.0", "symfony/yaml": "~4.0", "twig/twig": "~2.4" } } ## Instruction: Update starter kit to new version 3.3 ## Code After: { "name": "example/hello-world", "description": "Starter Kit application for MCP Panthor", "autoload": { "psr-4": { "ExampleApplication\\": "src" } }, "require": { "php": "~7.1", "ext-sodium": "~2.0 || ~7.2", "ql/mcp-panthor": "~3.3", "ql/mcp-common": "~2.0", "slim/slim": "~3.10", "symfony/config": "~4.0", "symfony/dotenv": "~4.0", "symfony/dependency-injection": "~4.0", "symfony/finder": "~4.0", "symfony/process": "~4.0", "symfony/proxy-manager-bridge": "~4.0", "symfony/yaml": "~4.0", "twig/twig": "~2.4" } }
{ "name": "example/hello-world", "description": "Starter Kit application for MCP Panthor", "autoload": { "psr-4": { "ExampleApplication\\": "src" } }, "require": { "php": "~7.1", "ext-sodium": "~2.0 || ~7.2", - "ql/mcp-panthor": "dev-master", ? ^^^^^^^^^^ + "ql/mcp-panthor": "~3.3", ? ^^^^ "ql/mcp-common": "~2.0", "slim/slim": "~3.10", "symfony/config": "~4.0", "symfony/dotenv": "~4.0", "symfony/dependency-injection": "~4.0", "symfony/finder": "~4.0", "symfony/process": "~4.0", "symfony/proxy-manager-bridge": "~4.0", "symfony/yaml": "~4.0", "twig/twig": "~2.4" } }
2
0.074074
1
1
728c8f4d336c992f5e441bb50e96702d618265ae
index.html
index.html
--- layout: archive author_profile: false --- {% include base_path %} <h3 class="archive__subtitle">{{ site.data.ui-text[site.locale].recent_posts }}</h3> {% for post in paginator.posts %} {% include archive-single.html %} {% endfor %} {% capture site_tags %}{% for tag in site.tags %}{{ tag | first }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %} {% assign tags = site_tags | split:',' | sort %} {% for tag in tags %} <a href="{{ site.baseurl }}/tags/{{ tag | slugify }}" class="tag" style="white-space: nowrap; font-size: {{ rel_tag_size }}em; padding: 0.6em;">{{ tag | replace: '-', ' ' }}</a> {% endfor %}
--- layout: archive author_profile: false --- {% include base_path %} <h3 class="archive__subtitle">{{ site.data.ui-text[site.locale].recent_posts }}</h3> {% for post in paginator.posts %} {% include archive-single.html %} {% endfor %} {% capture site_tags %}{% for tag in site.tags %}{{ tag | first }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %} {% assign tags = site_tags | split:',' | sort %} {% for tag in tags %} {% assign rel_tag_size = site.tags[tag].size | times: 4.0 | divided_by: tag_count | plus: 1 %} <a href="{{ site.baseurl }}/tags/{{ tag | slugify }}" class="tag" style="white-space: nowrap; font-size: {{ rel_tag_size }}em; padding: 0.6em;">{{ tag | replace: '-', ' ' }}</a> {% endfor %}
Change spacing of tags (as test)
Change spacing of tags (as test)
HTML
mit
jengalas/thegourmetmoose,jengalas/thegourmetmoose,jengalas/thegourmetmoose
html
## Code Before: --- layout: archive author_profile: false --- {% include base_path %} <h3 class="archive__subtitle">{{ site.data.ui-text[site.locale].recent_posts }}</h3> {% for post in paginator.posts %} {% include archive-single.html %} {% endfor %} {% capture site_tags %}{% for tag in site.tags %}{{ tag | first }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %} {% assign tags = site_tags | split:',' | sort %} {% for tag in tags %} <a href="{{ site.baseurl }}/tags/{{ tag | slugify }}" class="tag" style="white-space: nowrap; font-size: {{ rel_tag_size }}em; padding: 0.6em;">{{ tag | replace: '-', ' ' }}</a> {% endfor %} ## Instruction: Change spacing of tags (as test) ## Code After: --- layout: archive author_profile: false --- {% include base_path %} <h3 class="archive__subtitle">{{ site.data.ui-text[site.locale].recent_posts }}</h3> {% for post in paginator.posts %} {% include archive-single.html %} {% endfor %} {% capture site_tags %}{% for tag in site.tags %}{{ tag | first }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %} {% assign tags = site_tags | split:',' | sort %} {% for tag in tags %} {% assign rel_tag_size = site.tags[tag].size | times: 4.0 | divided_by: tag_count | plus: 1 %} <a href="{{ site.baseurl }}/tags/{{ tag | slugify }}" class="tag" style="white-space: nowrap; font-size: {{ rel_tag_size }}em; padding: 0.6em;">{{ tag | replace: '-', ' ' }}</a> {% endfor %}
--- layout: archive author_profile: false --- {% include base_path %} <h3 class="archive__subtitle">{{ site.data.ui-text[site.locale].recent_posts }}</h3> {% for post in paginator.posts %} {% include archive-single.html %} {% endfor %} {% capture site_tags %}{% for tag in site.tags %}{{ tag | first }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %} {% assign tags = site_tags | split:',' | sort %} {% for tag in tags %} + {% assign rel_tag_size = site.tags[tag].size | times: 4.0 | divided_by: tag_count | plus: 1 %} <a href="{{ site.baseurl }}/tags/{{ tag | slugify }}" class="tag" style="white-space: nowrap; font-size: {{ rel_tag_size }}em; padding: 0.6em;">{{ tag | replace: '-', ' ' }}</a> {% endfor %}
1
0.055556
1
0
555bf94cec62caf9f4f87e1bbd84e496e7acc2d8
app/assets/javascripts/controllers/submissions.js.coffee
app/assets/javascripts/controllers/submissions.js.coffee
window.App.pendingUploads = 0; window.App.successfulUploads = []; $ -> fetch_tree_for_path = (url) -> alert("Fetching!") success = (data) -> $("#tree-view").html(data) $.get url, null, success, 'html' $("#tree-view").on("click", "#tree-view td.node a", () -> fetch_tree_for_path($(this).data("url"))) fetch_tree_for_path("/repositories/test2/trees/master") window.App.functions.sendAddCommitRequest = (files, path) -> $("#main").append($("#commit-request-dialog")) action = gon.commit_request_path request = method: "add" request.files = ({id: file.id, to:[path, file.name].join("/")} for file in files) console.log(request) success = (data) -> $("#commit-request-dialog h1").text("Done!") $.ajax action, type: "POST", data: request, success: success
window.App.pendingUploads = 0; window.App.successfulUploads = []; $ -> # Fetches the tree for the given url and places it in the treeview fetch_tree_for_path = (url) -> internal_fetch = (url) -> $("#tree-view").html("Loading...") success = (data) -> $("#tree-view").html(data) $.get url, null, success, 'html' if $("#tree-view table") $("#tree-view table").slideUp("slow", internal_fetch(url)) else internal_fetch(url) # Catch all clicks for node links in the tree view and send the to the tree-fetcher $("#tree-view").on("click", "#tree-view td.node a", (event) -> event.preventDefault() fetch_tree_for_path($(this).data("url"))) # Fetch the first tree fetch_tree_for_path("/repositories/test2/trees/master") window.App.functions.sendAddCommitRequest = (files, path) -> $("#main").append($("#commit-request-dialog")) action = gon.commit_request_path request = method: "add" request.files = ({id: file.id, to:[path, file.name].join("/")} for file in files) console.log(request) success = (data) -> $("#commit-request-dialog h1").text("Done!") $.ajax action, type: "POST", data: request, success: success
Add event handling, prevent default behaviour of anchor tags
Add event handling, prevent default behaviour of anchor tags
CoffeeScript
agpl-3.0
water/mainline,water/mainline,water/mainline
coffeescript
## Code Before: window.App.pendingUploads = 0; window.App.successfulUploads = []; $ -> fetch_tree_for_path = (url) -> alert("Fetching!") success = (data) -> $("#tree-view").html(data) $.get url, null, success, 'html' $("#tree-view").on("click", "#tree-view td.node a", () -> fetch_tree_for_path($(this).data("url"))) fetch_tree_for_path("/repositories/test2/trees/master") window.App.functions.sendAddCommitRequest = (files, path) -> $("#main").append($("#commit-request-dialog")) action = gon.commit_request_path request = method: "add" request.files = ({id: file.id, to:[path, file.name].join("/")} for file in files) console.log(request) success = (data) -> $("#commit-request-dialog h1").text("Done!") $.ajax action, type: "POST", data: request, success: success ## Instruction: Add event handling, prevent default behaviour of anchor tags ## Code After: window.App.pendingUploads = 0; window.App.successfulUploads = []; $ -> # Fetches the tree for the given url and places it in the treeview fetch_tree_for_path = (url) -> internal_fetch = (url) -> $("#tree-view").html("Loading...") success = (data) -> $("#tree-view").html(data) $.get url, null, success, 'html' if $("#tree-view table") $("#tree-view table").slideUp("slow", internal_fetch(url)) else internal_fetch(url) # Catch all clicks for node links in the tree view and send the to the tree-fetcher $("#tree-view").on("click", "#tree-view td.node a", (event) -> event.preventDefault() fetch_tree_for_path($(this).data("url"))) # Fetch the first tree fetch_tree_for_path("/repositories/test2/trees/master") window.App.functions.sendAddCommitRequest = (files, path) -> $("#main").append($("#commit-request-dialog")) action = gon.commit_request_path request = method: "add" request.files = ({id: file.id, to:[path, file.name].join("/")} for file in files) console.log(request) success = (data) -> $("#commit-request-dialog h1").text("Done!") $.ajax action, type: "POST", data: request, success: success
window.App.pendingUploads = 0; window.App.successfulUploads = []; $ -> + # Fetches the tree for the given url and places it in the treeview fetch_tree_for_path = (url) -> - alert("Fetching!") + internal_fetch = (url) -> + $("#tree-view").html("Loading...") - success = (data) -> $("#tree-view").html(data) + success = (data) -> $("#tree-view").html(data) ? ++ - $.get url, null, success, 'html' + $.get url, null, success, 'html' ? ++ + + if $("#tree-view table") + $("#tree-view table").slideUp("slow", internal_fetch(url)) + else + internal_fetch(url) + + + # Catch all clicks for node links in the tree view and send the to the tree-fetcher $("#tree-view").on("click", "#tree-view td.node a", + (event) -> + event.preventDefault() - () -> fetch_tree_for_path($(this).data("url"))) ? -- -- + fetch_tree_for_path($(this).data("url"))) + + # Fetch the first tree fetch_tree_for_path("/repositories/test2/trees/master") window.App.functions.sendAddCommitRequest = (files, path) -> $("#main").append($("#commit-request-dialog")) action = gon.commit_request_path request = method: "add" request.files = ({id: file.id, to:[path, file.name].join("/")} for file in files) console.log(request) success = (data) -> $("#commit-request-dialog h1").text("Done!") $.ajax action, type: "POST", data: request, success: success
22
1
18
4
f961b7958e52016428baf8b360411e75e896f23f
update.php
update.php
<?php // Copyright 2015 Las Venturas Playground. All rights reserved. // Use of this source code is governed by the MIT license, a copy of which can // be found in the LICENSE file. // Run this command every minute through a cron-tab to enable auto-deploy of // Sonium. It builds upon the auto-deploy mechanism included in sa-mp.nl. $file = '/home/lvp/domains/sa-mp.nl/private_html/tools/auto-deploy/bot-sonium.push'; if (!file_exists($file)) exit; unlink($file); // Do not start pulling updates every minute if the |$file| becomes undeletable for some reason. // Instead, fail silently, at some point somebody might notice that auto-deploy failed. if (file_exists($file)) exit; $directory = __DIR__; $commands = [ 'git fetch --all', 'git reset --hard origin/master', 'git rev-parse HEAD > VERSION' ]; foreach ($commands as $command) echo shell_exec('cd ' . $directory . ' && ' . $command);
<?php // Copyright 2015 Las Venturas Playground. All rights reserved. // Use of this source code is governed by the MIT license, a copy of which can // be found in the LICENSE file. // Run this command every minute through a cron-tab to enable auto-deploy of // Sonium. It builds upon the auto-deploy mechanism included in sa-mp.nl. $file = '/home/lvp/domains/sa-mp.nl/private_html/tools/auto-deploy/bot-sonium.push'; if (!file_exists($file)) exit; unlink($file); // Do not start pulling updates every minute if the |$file| becomes undeletable for some reason. // Instead, fail silently, at some point somebody might notice that auto-deploy failed. if (file_exists($file)) exit; $directory = __DIR__; $commands = [ 'git fetch --all', 'git reset --hard origin/master', 'composer update', 'git rev-parse HEAD > VERSION' ]; foreach ($commands as $command) echo shell_exec('cd ' . $directory . ' && ' . $command);
Update composer when pulling in a new version
Update composer when pulling in a new version
PHP
mit
LVPlayground/bot-sonium
php
## Code Before: <?php // Copyright 2015 Las Venturas Playground. All rights reserved. // Use of this source code is governed by the MIT license, a copy of which can // be found in the LICENSE file. // Run this command every minute through a cron-tab to enable auto-deploy of // Sonium. It builds upon the auto-deploy mechanism included in sa-mp.nl. $file = '/home/lvp/domains/sa-mp.nl/private_html/tools/auto-deploy/bot-sonium.push'; if (!file_exists($file)) exit; unlink($file); // Do not start pulling updates every minute if the |$file| becomes undeletable for some reason. // Instead, fail silently, at some point somebody might notice that auto-deploy failed. if (file_exists($file)) exit; $directory = __DIR__; $commands = [ 'git fetch --all', 'git reset --hard origin/master', 'git rev-parse HEAD > VERSION' ]; foreach ($commands as $command) echo shell_exec('cd ' . $directory . ' && ' . $command); ## Instruction: Update composer when pulling in a new version ## Code After: <?php // Copyright 2015 Las Venturas Playground. All rights reserved. // Use of this source code is governed by the MIT license, a copy of which can // be found in the LICENSE file. // Run this command every minute through a cron-tab to enable auto-deploy of // Sonium. It builds upon the auto-deploy mechanism included in sa-mp.nl. $file = '/home/lvp/domains/sa-mp.nl/private_html/tools/auto-deploy/bot-sonium.push'; if (!file_exists($file)) exit; unlink($file); // Do not start pulling updates every minute if the |$file| becomes undeletable for some reason. // Instead, fail silently, at some point somebody might notice that auto-deploy failed. if (file_exists($file)) exit; $directory = __DIR__; $commands = [ 'git fetch --all', 'git reset --hard origin/master', 'composer update', 'git rev-parse HEAD > VERSION' ]; foreach ($commands as $command) echo shell_exec('cd ' . $directory . ' && ' . $command);
<?php // Copyright 2015 Las Venturas Playground. All rights reserved. // Use of this source code is governed by the MIT license, a copy of which can // be found in the LICENSE file. // Run this command every minute through a cron-tab to enable auto-deploy of // Sonium. It builds upon the auto-deploy mechanism included in sa-mp.nl. $file = '/home/lvp/domains/sa-mp.nl/private_html/tools/auto-deploy/bot-sonium.push'; if (!file_exists($file)) exit; unlink($file); // Do not start pulling updates every minute if the |$file| becomes undeletable for some reason. // Instead, fail silently, at some point somebody might notice that auto-deploy failed. if (file_exists($file)) exit; $directory = __DIR__; $commands = [ 'git fetch --all', 'git reset --hard origin/master', + 'composer update', 'git rev-parse HEAD > VERSION' ]; foreach ($commands as $command) echo shell_exec('cd ' . $directory . ' && ' . $command);
1
0.035714
1
0
5e2e0ec70234b9424a96cd5453bfd191b457bf9d
index.js
index.js
var fs = require('fs') , spawn = require('child_process').spawn module.exports = function(command) { var homePath = process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE fs.readFile(homePath+'/.ssh/config', 'utf8', function(err, data) { if (err) process.exit() var pattern = new RegExp("Host "+command, "g") , sshExist = data.match(pattern) if (sshExist) { console.log('SSH Host "'+command+'" found') spawn('ssh', [command], {stdio: 'inherit'}) } }) }
var fs = require('fs') , spawn = require('child_process').spawn module.exports = function(command) { var homePath = process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE fs.readFile(homePath+'/.ssh/config', 'utf8', function(err, data) { if (err) process.exit() var pattern = new RegExp("Host "+command, "g") , sshExist = data.match(pattern) if (sshExist) { console.log('Command not found: '+command) console.log('SSH Host "'+command+'" found') spawn('ssh', [command], {stdio: 'inherit'}) } }) }
Replace first command not found with node
Replace first command not found with node
JavaScript
mit
romainberger/127-ssh
javascript
## Code Before: var fs = require('fs') , spawn = require('child_process').spawn module.exports = function(command) { var homePath = process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE fs.readFile(homePath+'/.ssh/config', 'utf8', function(err, data) { if (err) process.exit() var pattern = new RegExp("Host "+command, "g") , sshExist = data.match(pattern) if (sshExist) { console.log('SSH Host "'+command+'" found') spawn('ssh', [command], {stdio: 'inherit'}) } }) } ## Instruction: Replace first command not found with node ## Code After: var fs = require('fs') , spawn = require('child_process').spawn module.exports = function(command) { var homePath = process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE fs.readFile(homePath+'/.ssh/config', 'utf8', function(err, data) { if (err) process.exit() var pattern = new RegExp("Host "+command, "g") , sshExist = data.match(pattern) if (sshExist) { console.log('Command not found: '+command) console.log('SSH Host "'+command+'" found') spawn('ssh', [command], {stdio: 'inherit'}) } }) }
var fs = require('fs') , spawn = require('child_process').spawn module.exports = function(command) { var homePath = process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE fs.readFile(homePath+'/.ssh/config', 'utf8', function(err, data) { if (err) process.exit() var pattern = new RegExp("Host "+command, "g") , sshExist = data.match(pattern) if (sshExist) { + console.log('Command not found: '+command) console.log('SSH Host "'+command+'" found') spawn('ssh', [command], {stdio: 'inherit'}) } }) }
1
0.055556
1
0
9103a5ccd8dd73f113c62aaba04b236599fdffc4
src/static/index.js
src/static/index.js
// Javasctipt file for index.html // sub-nav toggle // Toggle contents by clicking #sub-nav $(function (){ var subMenuChild = $('#sub-nav').children(); for (i = 0; i < subMenuChild.length; i++) { var item = $(subMenuChild[i]); item.on('click', function( event ) { event.preventDefault(); // Remove old context var selected = $('#sub-nav').children('.active').toggleClass('active'); $(selected.data().boundTo).collapse('toggle'); // Show selected context var boundContext = $(this).toggleClass('active').data().boundTo; $(boundContext).collapse('toggle'); }); } })
// Javasctipt file for index.html // sub-nav toggle // Toggle contents by clicking #sub-nav $(function (){ var subMenuChild = $('#sub-nav').children(); for (i = 0; i < subMenuChild.length; i++) { var item = $(subMenuChild[i]); item.on('click', function( event ) { event.preventDefault(); if ( $(this).hasClass('active') ) { // already actived return; } // Remove old context var selected = $('#sub-nav').children('.active'); selected.toggleClass('active'); $(selected.data().boundTo).collapse('toggle'); // Show selected context var boundContext = $(this).toggleClass('active').data().boundTo; $(boundContext).collapse('toggle'); }); } })
Fix clicking activated sub-menu will hide context
Fix clicking activated sub-menu will hide context
JavaScript
mit
Holi0317/sms-alumni-webpage,Holi0317/sms-alumni-webpage
javascript
## Code Before: // Javasctipt file for index.html // sub-nav toggle // Toggle contents by clicking #sub-nav $(function (){ var subMenuChild = $('#sub-nav').children(); for (i = 0; i < subMenuChild.length; i++) { var item = $(subMenuChild[i]); item.on('click', function( event ) { event.preventDefault(); // Remove old context var selected = $('#sub-nav').children('.active').toggleClass('active'); $(selected.data().boundTo).collapse('toggle'); // Show selected context var boundContext = $(this).toggleClass('active').data().boundTo; $(boundContext).collapse('toggle'); }); } }) ## Instruction: Fix clicking activated sub-menu will hide context ## Code After: // Javasctipt file for index.html // sub-nav toggle // Toggle contents by clicking #sub-nav $(function (){ var subMenuChild = $('#sub-nav').children(); for (i = 0; i < subMenuChild.length; i++) { var item = $(subMenuChild[i]); item.on('click', function( event ) { event.preventDefault(); if ( $(this).hasClass('active') ) { // already actived return; } // Remove old context var selected = $('#sub-nav').children('.active'); selected.toggleClass('active'); $(selected.data().boundTo).collapse('toggle'); // Show selected context var boundContext = $(this).toggleClass('active').data().boundTo; $(boundContext).collapse('toggle'); }); } })
// Javasctipt file for index.html // sub-nav toggle // Toggle contents by clicking #sub-nav $(function (){ var subMenuChild = $('#sub-nav').children(); for (i = 0; i < subMenuChild.length; i++) { var item = $(subMenuChild[i]); item.on('click', function( event ) { event.preventDefault(); + if ( $(this).hasClass('active') ) { + // already actived + return; + } // Remove old context - var selected = $('#sub-nav').children('.active').toggleClass('active'); ? ---------------------- + var selected = $('#sub-nav').children('.active'); + selected.toggleClass('active'); $(selected.data().boundTo).collapse('toggle'); // Show selected context var boundContext = $(this).toggleClass('active').data().boundTo; $(boundContext).collapse('toggle'); }); } })
7
0.333333
6
1
90e0cf5c23b14a96c5ffbe28e68b6e0ada7f389c
docker-util/run_tests.sh
docker-util/run_tests.sh
echo "Info for runtime config of tests in $(pwd)" echo "Bash at $(which bash)" echo "Maven at $(which mvn) with config $(mvn -version)" echo "Preparing test coverage reporting" curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter chmod +x ./cc-test-reporter echo "Will use CodeClimate's test reporter at $(pwd)/cc-test-reporter" echo "Set before-build notice" ./cc-test-reporter before-build PREFLIGHT="mvn -q dependency:go-offline" CMD="mvn clean install" echo "Test command = ${CMD}" set -x ${PREFLIGHT} bash -c "./docker-util/xvfb-run.sh -a ${CMD}" set +x echo "Finished running tests!" echo "Notifying CodeClimate of test build's end" JACOCO_SOURCE_PATH=src/main/java ./cc-test-reporter format-coverage target/site/jacoco/jacoco.xml --input-type jacoco ./cc-test-reporter upload-coverage -r 9791cde00c987e47a9082b96f73a2b4eb3590f308c501a3c61d34e0276c93ec1
echo "Info for runtime config of tests in $(pwd)" echo "Bash at $(which bash)" echo "Maven at $(which mvn) with config $(mvn -version)" echo "Preparing test coverage reporting" curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter chmod +x ./cc-test-reporter echo "Will use CodeClimate's test reporter at $(pwd)/cc-test-reporter" echo "Set before-build notice" ./cc-test-reporter before-build PREFLIGHT="mvn -q dependency:go-offline" CMD="mvn clean install" echo "Test command = ${CMD}" set -x ${PREFLIGHT} bash -c "./docker-util/xvfb-run.sh -a ${CMD}" set +x echo "Finished running tests!" echo "Notifying CodeClimate of test build's end" cd easyfxml JACOCO_SOURCE_PATH=src/main/java ./cc-test-reporter format-coverage target/site/jacoco/jacoco.xml --input-type jacoco ./cc-test-reporter upload-coverage -r 9791cde00c987e47a9082b96f73a2b4eb3590f308c501a3c61d34e0276c93ec1
Move to EasyFXML lib folder at the end of build to trigger coverage reports properly
Move to EasyFXML lib folder at the end of build to trigger coverage reports properly
Shell
apache-2.0
Tristan971/EasyFXML,Tristan971/EasyFXML
shell
## Code Before: echo "Info for runtime config of tests in $(pwd)" echo "Bash at $(which bash)" echo "Maven at $(which mvn) with config $(mvn -version)" echo "Preparing test coverage reporting" curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter chmod +x ./cc-test-reporter echo "Will use CodeClimate's test reporter at $(pwd)/cc-test-reporter" echo "Set before-build notice" ./cc-test-reporter before-build PREFLIGHT="mvn -q dependency:go-offline" CMD="mvn clean install" echo "Test command = ${CMD}" set -x ${PREFLIGHT} bash -c "./docker-util/xvfb-run.sh -a ${CMD}" set +x echo "Finished running tests!" echo "Notifying CodeClimate of test build's end" JACOCO_SOURCE_PATH=src/main/java ./cc-test-reporter format-coverage target/site/jacoco/jacoco.xml --input-type jacoco ./cc-test-reporter upload-coverage -r 9791cde00c987e47a9082b96f73a2b4eb3590f308c501a3c61d34e0276c93ec1 ## Instruction: Move to EasyFXML lib folder at the end of build to trigger coverage reports properly ## Code After: echo "Info for runtime config of tests in $(pwd)" echo "Bash at $(which bash)" echo "Maven at $(which mvn) with config $(mvn -version)" echo "Preparing test coverage reporting" curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter chmod +x ./cc-test-reporter echo "Will use CodeClimate's test reporter at $(pwd)/cc-test-reporter" echo "Set before-build notice" ./cc-test-reporter before-build PREFLIGHT="mvn -q dependency:go-offline" CMD="mvn clean install" echo "Test command = ${CMD}" set -x ${PREFLIGHT} bash -c "./docker-util/xvfb-run.sh -a ${CMD}" set +x echo "Finished running tests!" echo "Notifying CodeClimate of test build's end" cd easyfxml JACOCO_SOURCE_PATH=src/main/java ./cc-test-reporter format-coverage target/site/jacoco/jacoco.xml --input-type jacoco ./cc-test-reporter upload-coverage -r 9791cde00c987e47a9082b96f73a2b4eb3590f308c501a3c61d34e0276c93ec1
echo "Info for runtime config of tests in $(pwd)" echo "Bash at $(which bash)" echo "Maven at $(which mvn) with config $(mvn -version)" echo "Preparing test coverage reporting" curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter chmod +x ./cc-test-reporter echo "Will use CodeClimate's test reporter at $(pwd)/cc-test-reporter" echo "Set before-build notice" ./cc-test-reporter before-build PREFLIGHT="mvn -q dependency:go-offline" CMD="mvn clean install" echo "Test command = ${CMD}" set -x ${PREFLIGHT} bash -c "./docker-util/xvfb-run.sh -a ${CMD}" set +x echo "Finished running tests!" echo "Notifying CodeClimate of test build's end" + + cd easyfxml + JACOCO_SOURCE_PATH=src/main/java ./cc-test-reporter format-coverage target/site/jacoco/jacoco.xml --input-type jacoco ./cc-test-reporter upload-coverage -r 9791cde00c987e47a9082b96f73a2b4eb3590f308c501a3c61d34e0276c93ec1
3
0.111111
3
0
81fdd387737d25ccca7e6628497268f4e2a2415a
src/components/home/Ventures/index.module.css
src/components/home/Ventures/index.module.css
.root { padding: 56px 20px 168px; } .content { display: grid; grid-row-gap: 56px; max-width: 1184px; margin-right: auto; margin-left: auto; } .section { display: grid; grid-row-gap: 28px; } @media (min-width: 768px) { .root { padding: 112px 28px 224px; } .content { grid-template-columns: 1fr 1fr; grid-column-gap: 28px; grid-row-gap: 112px; } .header, .lookingFor, .helpingWith, .footer { grid-column: 2 / span 1; } .section { grid-row-gap: 56px; } .universe { grid-column: 1 / span 1; grid-row: 1 / span 3; } .portfolio { grid-column: 1 / span 2; grid-template-columns: 1fr 1fr; grid-column-gap: 28px; } .portfolioHeader { grid-column: 2 / span 1; } .portfolioContent { grid-column: 1 / span 2; } }
.root { padding: 56px 20px 168px; } .content { display: grid; grid-row-gap: 56px; max-width: 1184px; margin-right: auto; margin-left: auto; } .section { display: grid; grid-row-gap: 28px; } .footer { padding-top: 112px; } @media (min-width: 768px) { .root { padding: 112px 28px 224px; } .content { grid-template-columns: 1fr 1fr; grid-column-gap: 28px; grid-row-gap: 112px; } .header, .lookingFor, .helpingWith, .footer { grid-column: 2 / span 1; } .section { grid-row-gap: 56px; } .universe { grid-column: 1 / span 1; grid-row: 1 / span 3; } .portfolio { grid-column: 1 / span 2; grid-template-columns: 1fr 1fr; grid-column-gap: 28px; } .portfolioHeader { grid-column: 2 / span 1; } .portfolioContent { grid-column: 1 / span 2; } }
Fix ventures section footer top spacing
Fix ventures section footer top spacing
CSS
mit
subvisual/subvisual.co,subvisual/subvisual.co
css
## Code Before: .root { padding: 56px 20px 168px; } .content { display: grid; grid-row-gap: 56px; max-width: 1184px; margin-right: auto; margin-left: auto; } .section { display: grid; grid-row-gap: 28px; } @media (min-width: 768px) { .root { padding: 112px 28px 224px; } .content { grid-template-columns: 1fr 1fr; grid-column-gap: 28px; grid-row-gap: 112px; } .header, .lookingFor, .helpingWith, .footer { grid-column: 2 / span 1; } .section { grid-row-gap: 56px; } .universe { grid-column: 1 / span 1; grid-row: 1 / span 3; } .portfolio { grid-column: 1 / span 2; grid-template-columns: 1fr 1fr; grid-column-gap: 28px; } .portfolioHeader { grid-column: 2 / span 1; } .portfolioContent { grid-column: 1 / span 2; } } ## Instruction: Fix ventures section footer top spacing ## Code After: .root { padding: 56px 20px 168px; } .content { display: grid; grid-row-gap: 56px; max-width: 1184px; margin-right: auto; margin-left: auto; } .section { display: grid; grid-row-gap: 28px; } .footer { padding-top: 112px; } @media (min-width: 768px) { .root { padding: 112px 28px 224px; } .content { grid-template-columns: 1fr 1fr; grid-column-gap: 28px; grid-row-gap: 112px; } .header, .lookingFor, .helpingWith, .footer { grid-column: 2 / span 1; } .section { grid-row-gap: 56px; } .universe { grid-column: 1 / span 1; grid-row: 1 / span 3; } .portfolio { grid-column: 1 / span 2; grid-template-columns: 1fr 1fr; grid-column-gap: 28px; } .portfolioHeader { grid-column: 2 / span 1; } .portfolioContent { grid-column: 1 / span 2; } }
.root { padding: 56px 20px 168px; } .content { display: grid; grid-row-gap: 56px; max-width: 1184px; margin-right: auto; margin-left: auto; } .section { display: grid; grid-row-gap: 28px; + } + + .footer { + padding-top: 112px; } @media (min-width: 768px) { .root { padding: 112px 28px 224px; } .content { grid-template-columns: 1fr 1fr; grid-column-gap: 28px; grid-row-gap: 112px; } .header, .lookingFor, .helpingWith, .footer { grid-column: 2 / span 1; } .section { grid-row-gap: 56px; } .universe { grid-column: 1 / span 1; grid-row: 1 / span 3; } .portfolio { grid-column: 1 / span 2; grid-template-columns: 1fr 1fr; grid-column-gap: 28px; } .portfolioHeader { grid-column: 2 / span 1; } .portfolioContent { grid-column: 1 / span 2; } }
4
0.068966
4
0
cddcd2cb1389da8fbcf7d285941f8076e427b3dd
command.php
command.php
<?php if ( !defined( 'WP_CLI' ) ) return; require_once 'src/ViewOne/Environment.php'; global $argv; $env = $argv[1]; $config = array(); $config_path = getenv( 'HOME' ) . '/.wp-cli/config.yml'; if ( is_readable( $config_path ) ){ $configurator = \WP_CLI::get_configurator(); $configurator->merge_yml( $config_path ); list( $config, $extra_config ) = $configurator->to_array(); } if ( isset($config['color']) && $config['color'] === 'auto' ) { $colorize = !\cli\Shell::isPiped(); } else { $colorize = true; } if ( isset($config['quiet']) && $config['quiet'] ) $logger = new \WP_CLI\Loggers\Quiet; else $logger = new \WP_CLI\Loggers\Regular( $colorize ); \WP_CLI::set_logger( $logger ); try { $environment = new \ViewOne\Environment(); $environment->run($env); } catch (Exception $e) { \WP_CLI::error( $e->getMessage() ); }
<?php if ( !defined( 'WP_CLI' ) ) return; global $argv; $env = $argv[1]; $config = array(); $config_path = getenv( 'HOME' ) . '/.wp-cli/config.yml'; if ( is_readable( $config_path ) ){ $configurator = \WP_CLI::get_configurator(); $configurator->merge_yml( $config_path ); list( $config, $extra_config ) = $configurator->to_array(); } if ( isset($config['color']) && $config['color'] === 'auto' ) { $colorize = !\cli\Shell::isPiped(); } else { $colorize = true; } if ( isset($config['quiet']) && $config['quiet'] ) $logger = new \WP_CLI\Loggers\Quiet; else $logger = new \WP_CLI\Loggers\Regular( $colorize ); \WP_CLI::set_logger( $logger ); try { $environment = new \ViewOne\Environment(); $environment->run($env); } catch (Exception $e) { \WP_CLI::error( $e->getMessage() ); }
Revert "Add require for global installation"
Revert "Add require for global installation" This reverts commit 586d35539e88ce7ade09c8b38ae501e3b81c74d7.
PHP
mit
phillprice/wp-cli-environment,viewone/wp-cli-environment,phillprice/wp-cli-environment,phillprice/wp-cli-environment,viewone/wp-cli-environment
php
## Code Before: <?php if ( !defined( 'WP_CLI' ) ) return; require_once 'src/ViewOne/Environment.php'; global $argv; $env = $argv[1]; $config = array(); $config_path = getenv( 'HOME' ) . '/.wp-cli/config.yml'; if ( is_readable( $config_path ) ){ $configurator = \WP_CLI::get_configurator(); $configurator->merge_yml( $config_path ); list( $config, $extra_config ) = $configurator->to_array(); } if ( isset($config['color']) && $config['color'] === 'auto' ) { $colorize = !\cli\Shell::isPiped(); } else { $colorize = true; } if ( isset($config['quiet']) && $config['quiet'] ) $logger = new \WP_CLI\Loggers\Quiet; else $logger = new \WP_CLI\Loggers\Regular( $colorize ); \WP_CLI::set_logger( $logger ); try { $environment = new \ViewOne\Environment(); $environment->run($env); } catch (Exception $e) { \WP_CLI::error( $e->getMessage() ); } ## Instruction: Revert "Add require for global installation" This reverts commit 586d35539e88ce7ade09c8b38ae501e3b81c74d7. ## Code After: <?php if ( !defined( 'WP_CLI' ) ) return; global $argv; $env = $argv[1]; $config = array(); $config_path = getenv( 'HOME' ) . '/.wp-cli/config.yml'; if ( is_readable( $config_path ) ){ $configurator = \WP_CLI::get_configurator(); $configurator->merge_yml( $config_path ); list( $config, $extra_config ) = $configurator->to_array(); } if ( isset($config['color']) && $config['color'] === 'auto' ) { $colorize = !\cli\Shell::isPiped(); } else { $colorize = true; } if ( isset($config['quiet']) && $config['quiet'] ) $logger = new \WP_CLI\Loggers\Quiet; else $logger = new \WP_CLI\Loggers\Regular( $colorize ); \WP_CLI::set_logger( $logger ); try { $environment = new \ViewOne\Environment(); $environment->run($env); } catch (Exception $e) { \WP_CLI::error( $e->getMessage() ); }
<?php if ( !defined( 'WP_CLI' ) ) return; - - require_once 'src/ViewOne/Environment.php'; global $argv; $env = $argv[1]; $config = array(); $config_path = getenv( 'HOME' ) . '/.wp-cli/config.yml'; if ( is_readable( $config_path ) ){ $configurator = \WP_CLI::get_configurator(); $configurator->merge_yml( $config_path ); list( $config, $extra_config ) = $configurator->to_array(); } if ( isset($config['color']) && $config['color'] === 'auto' ) { $colorize = !\cli\Shell::isPiped(); } else { $colorize = true; } if ( isset($config['quiet']) && $config['quiet'] ) $logger = new \WP_CLI\Loggers\Quiet; else $logger = new \WP_CLI\Loggers\Regular( $colorize ); \WP_CLI::set_logger( $logger ); try { $environment = new \ViewOne\Environment(); $environment->run($env); } catch (Exception $e) { \WP_CLI::error( $e->getMessage() ); }
2
0.047619
0
2
d79f294856943a6729244fd4ff7652f70d4a09ae
lib/linux_admin/registration_system.rb
lib/linux_admin/registration_system.rb
class LinuxAdmin class RegistrationSystem < LinuxAdmin def self.registration_type(reload = false) return @registration_type if @registration_type && !reload @registration_type = registration_type_uncached end def self.method_missing(meth, *args, &block) if white_list_methods.include?(meth) r = self.registration_type.new raise NotImplementedError, "#{meth} not implemented for #{self.name}" unless r.respond_to?(meth) r.send(meth, *args, &block) else super end end def registered? false end private def self.registration_type_uncached if SubscriptionManager.new.registered? SubscriptionManager elsif Rhn.new.registered? Rhn else self end end private_class_method :registration_type_uncached def self.white_list_methods @white_list_methods ||= begin all_methods = RegistrationSystem.instance_methods(false) + Rhn.instance_methods(false) + SubscriptionManager.instance_methods(false) all_methods.uniq end end private_class_method :white_list_methods end end Dir.glob(File.join(File.dirname(__FILE__), "registration_system", "*.rb")).each { |f| require f }
class LinuxAdmin class RegistrationSystem < LinuxAdmin def self.registration_type(reload = false) return @registration_type if @registration_type && !reload @registration_type = registration_type_uncached end def self.method_missing(meth, *args, &block) if white_list_methods.include?(meth) r = self.registration_type.new raise NotImplementedError, "#{meth} not implemented for #{self.name}" unless r.respond_to?(meth) r.send(meth, *args, &block) else super end end def registered? false end private def self.registration_type_uncached if Rhn.new.registered? Rhn elsif SubscriptionManager.new.registered? SubscriptionManager else self end end private_class_method :registration_type_uncached def self.white_list_methods @white_list_methods ||= begin all_methods = RegistrationSystem.instance_methods(false) + Rhn.instance_methods(false) + SubscriptionManager.instance_methods(false) all_methods.uniq end end private_class_method :white_list_methods end end Dir.glob(File.join(File.dirname(__FILE__), "registration_system", "*.rb")).each { |f| require f }
Check if registered to RHN first to avoid false positives on SM
Check if registered to RHN first to avoid false positives on SM
Ruby
mit
ManageIQ/linux_admin,jrafanie/linux_admin,carbonin/linux_admin,kbrock/linux_admin
ruby
## Code Before: class LinuxAdmin class RegistrationSystem < LinuxAdmin def self.registration_type(reload = false) return @registration_type if @registration_type && !reload @registration_type = registration_type_uncached end def self.method_missing(meth, *args, &block) if white_list_methods.include?(meth) r = self.registration_type.new raise NotImplementedError, "#{meth} not implemented for #{self.name}" unless r.respond_to?(meth) r.send(meth, *args, &block) else super end end def registered? false end private def self.registration_type_uncached if SubscriptionManager.new.registered? SubscriptionManager elsif Rhn.new.registered? Rhn else self end end private_class_method :registration_type_uncached def self.white_list_methods @white_list_methods ||= begin all_methods = RegistrationSystem.instance_methods(false) + Rhn.instance_methods(false) + SubscriptionManager.instance_methods(false) all_methods.uniq end end private_class_method :white_list_methods end end Dir.glob(File.join(File.dirname(__FILE__), "registration_system", "*.rb")).each { |f| require f } ## Instruction: Check if registered to RHN first to avoid false positives on SM ## Code After: class LinuxAdmin class RegistrationSystem < LinuxAdmin def self.registration_type(reload = false) return @registration_type if @registration_type && !reload @registration_type = registration_type_uncached end def self.method_missing(meth, *args, &block) if white_list_methods.include?(meth) r = self.registration_type.new raise NotImplementedError, "#{meth} not implemented for #{self.name}" unless r.respond_to?(meth) r.send(meth, *args, &block) else super end end def registered? false end private def self.registration_type_uncached if Rhn.new.registered? Rhn elsif SubscriptionManager.new.registered? SubscriptionManager else self end end private_class_method :registration_type_uncached def self.white_list_methods @white_list_methods ||= begin all_methods = RegistrationSystem.instance_methods(false) + Rhn.instance_methods(false) + SubscriptionManager.instance_methods(false) all_methods.uniq end end private_class_method :white_list_methods end end Dir.glob(File.join(File.dirname(__FILE__), "registration_system", "*.rb")).each { |f| require f }
class LinuxAdmin class RegistrationSystem < LinuxAdmin def self.registration_type(reload = false) return @registration_type if @registration_type && !reload @registration_type = registration_type_uncached end def self.method_missing(meth, *args, &block) if white_list_methods.include?(meth) r = self.registration_type.new raise NotImplementedError, "#{meth} not implemented for #{self.name}" unless r.respond_to?(meth) r.send(meth, *args, &block) else super end end def registered? false end private def self.registration_type_uncached + if Rhn.new.registered? + Rhn - if SubscriptionManager.new.registered? + elsif SubscriptionManager.new.registered? ? +++ SubscriptionManager - elsif Rhn.new.registered? - Rhn else self end end private_class_method :registration_type_uncached def self.white_list_methods @white_list_methods ||= begin all_methods = RegistrationSystem.instance_methods(false) + Rhn.instance_methods(false) + SubscriptionManager.instance_methods(false) all_methods.uniq end end private_class_method :white_list_methods end end Dir.glob(File.join(File.dirname(__FILE__), "registration_system", "*.rb")).each { |f| require f }
6
0.133333
3
3
1eee5783b98e5ea36f06b6a89cb4ee256ae9ba36
releasenotes/source/ocata.rst
releasenotes/source/ocata.rst
=========================== Next release: Ocata release =========================== * The documentation sites ``developer.openstack.org`` and ``docs.openstack.org`` are now set up with ``https`` and links to pages have been changed to use ``https`` by default. Command-Line Interface Reference ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Removed the ``sahara`` client in favor of the ``openstack`` client. Configuration Reference ~~~~~~~~~~~~~~~~~~~~~~~ * Cleaned up content that is not directly configuration options. * Created a few vendor plug-in sections newly added for Ocata. Networking Guide ~~~~~~~~~~~~~~~~ * Made progress towards replacing all neutron client commands with OpenStack client equivalents. * Added routed provider networks. * Added VLAN trunking. * Added RFC 5737 and 3849 compliance policy. * Improved Open vSwitch HA DVR deployment. * Improved Quality of Service (QoS). * Improved service subnets. * Improved SR-IOV. * Improved MTU considerations. * Improved Load-Balancer-as-a-Service.
=========================== Next release: Ocata release =========================== * The documentation sites ``developer.openstack.org`` and ``docs.openstack.org`` are now set up with ``https`` and links to pages have been changed to use ``https`` by default. Administrator Guide ~~~~~~~~~~~~~~~~~~~ * Removed legacy commands in favor of the ``openstack`` client commands where equivalent functions existed. Legacy commands changed include ``nova``, ``neutron``, ``cinder``, ``glance``, and ``manila`` clients. * Updates to identity and compute content - PCI DSS v3.1 compliance, and Huge Page functionality, respectively. * Addressed technical debt: toctree positions, spelling, and grammar. Command-Line Interface Reference ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Removed the ``sahara`` client in favor of the ``openstack`` client. Configuration Reference ~~~~~~~~~~~~~~~~~~~~~~~ * Cleaned up content that is not directly configuration options. * Created a few vendor plug-in sections newly added for Ocata. End User Guide ~~~~~~~~~~~~~~ * Removed legacy commands in favor of the ``openstack`` client commands where equivalent functions existed. Legacy commands changed include ``nova``, ``neutron``, ``cinder``, ``glance``, and ``manila`` clients. * References to default flavors were removed. * Changes to swift content on ``.rlistings``, and neutron dnsmasq log file content. Networking Guide ~~~~~~~~~~~~~~~~ * Made progress towards replacing all neutron client commands with OpenStack client equivalents. * Added routed provider networks. * Added VLAN trunking. * Added RFC 5737 and 3849 compliance policy. * Improved Open vSwitch HA DVR deployment. * Improved Quality of Service (QoS). * Improved service subnets. * Improved SR-IOV. * Improved MTU considerations. * Improved Load-Balancer-as-a-Service.
Add in User Guides Release Notes for Ocata.
Add in User Guides Release Notes for Ocata. Release notes for both Admin and User Guides. Change-Id: Ieba7d8631dd0fd8fde10a42ad42369dfea354030
reStructuredText
apache-2.0
openstack/openstack-manuals,openstack/openstack-manuals,openstack/openstack-manuals,openstack/openstack-manuals
restructuredtext
## Code Before: =========================== Next release: Ocata release =========================== * The documentation sites ``developer.openstack.org`` and ``docs.openstack.org`` are now set up with ``https`` and links to pages have been changed to use ``https`` by default. Command-Line Interface Reference ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Removed the ``sahara`` client in favor of the ``openstack`` client. Configuration Reference ~~~~~~~~~~~~~~~~~~~~~~~ * Cleaned up content that is not directly configuration options. * Created a few vendor plug-in sections newly added for Ocata. Networking Guide ~~~~~~~~~~~~~~~~ * Made progress towards replacing all neutron client commands with OpenStack client equivalents. * Added routed provider networks. * Added VLAN trunking. * Added RFC 5737 and 3849 compliance policy. * Improved Open vSwitch HA DVR deployment. * Improved Quality of Service (QoS). * Improved service subnets. * Improved SR-IOV. * Improved MTU considerations. * Improved Load-Balancer-as-a-Service. ## Instruction: Add in User Guides Release Notes for Ocata. Release notes for both Admin and User Guides. Change-Id: Ieba7d8631dd0fd8fde10a42ad42369dfea354030 ## Code After: =========================== Next release: Ocata release =========================== * The documentation sites ``developer.openstack.org`` and ``docs.openstack.org`` are now set up with ``https`` and links to pages have been changed to use ``https`` by default. Administrator Guide ~~~~~~~~~~~~~~~~~~~ * Removed legacy commands in favor of the ``openstack`` client commands where equivalent functions existed. Legacy commands changed include ``nova``, ``neutron``, ``cinder``, ``glance``, and ``manila`` clients. * Updates to identity and compute content - PCI DSS v3.1 compliance, and Huge Page functionality, respectively. * Addressed technical debt: toctree positions, spelling, and grammar. Command-Line Interface Reference ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Removed the ``sahara`` client in favor of the ``openstack`` client. Configuration Reference ~~~~~~~~~~~~~~~~~~~~~~~ * Cleaned up content that is not directly configuration options. * Created a few vendor plug-in sections newly added for Ocata. End User Guide ~~~~~~~~~~~~~~ * Removed legacy commands in favor of the ``openstack`` client commands where equivalent functions existed. Legacy commands changed include ``nova``, ``neutron``, ``cinder``, ``glance``, and ``manila`` clients. * References to default flavors were removed. * Changes to swift content on ``.rlistings``, and neutron dnsmasq log file content. Networking Guide ~~~~~~~~~~~~~~~~ * Made progress towards replacing all neutron client commands with OpenStack client equivalents. * Added routed provider networks. * Added VLAN trunking. * Added RFC 5737 and 3849 compliance policy. * Improved Open vSwitch HA DVR deployment. * Improved Quality of Service (QoS). * Improved service subnets. * Improved SR-IOV. * Improved MTU considerations. * Improved Load-Balancer-as-a-Service.
=========================== Next release: Ocata release =========================== * The documentation sites ``developer.openstack.org`` and ``docs.openstack.org`` are now set up with ``https`` and links to pages have been changed to use ``https`` by default. + + Administrator Guide + ~~~~~~~~~~~~~~~~~~~ + + * Removed legacy commands in favor of the ``openstack`` client commands where + equivalent functions existed. Legacy commands changed include ``nova``, + ``neutron``, ``cinder``, ``glance``, and ``manila`` clients. + + * Updates to identity and compute content - PCI DSS v3.1 + compliance, and Huge Page functionality, respectively. + + * Addressed technical debt: toctree positions, spelling, and grammar. Command-Line Interface Reference ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Removed the ``sahara`` client in favor of the ``openstack`` client. Configuration Reference ~~~~~~~~~~~~~~~~~~~~~~~ * Cleaned up content that is not directly configuration options. * Created a few vendor plug-in sections newly added for Ocata. + + End User Guide + ~~~~~~~~~~~~~~ + + * Removed legacy commands in favor of the ``openstack`` client commands where + equivalent functions existed. Legacy commands changed include ``nova``, + ``neutron``, ``cinder``, ``glance``, and ``manila`` clients. + + * References to default flavors were removed. + + * Changes to swift content on ``.rlistings``, and neutron dnsmasq log file + content. Networking Guide ~~~~~~~~~~~~~~~~ * Made progress towards replacing all neutron client commands with OpenStack client equivalents. * Added routed provider networks. * Added VLAN trunking. * Added RFC 5737 and 3849 compliance policy. * Improved Open vSwitch HA DVR deployment. * Improved Quality of Service (QoS). * Improved service subnets. * Improved SR-IOV. * Improved MTU considerations. * Improved Load-Balancer-as-a-Service.
24
0.705882
24
0
08df5c9276e2677e67d89c573b7d015d976b4758
metadata/com.ml.proximitysensorfix.yml
metadata/com.ml.proximitysensorfix.yml
Categories: - System - Phone & SMS License: GPL-3.0-or-later AuthorName: Marco Lettieri AuthorEmail: m.lettieri@microbees.com AuthorWebSite: https://www.microbees.com/ SourceCode: https://github.com/marcolettieri/proximitycallfix IssueTracker: https://github.com/marcolettieri/proximitycallfix/issues AutoName: ProximitySensorFix RepoType: git Repo: https://github.com/marcolettieri/proximitycallfix Builds: - versionName: 1.0.4 versionCode: 26 commit: 1.0.4 subdir: app gradle: - yes AutoUpdateMode: Version %v UpdateCheckMode: Tags CurrentVersion: 1.0.4 CurrentVersionCode: 26
Categories: - System - Phone & SMS License: GPL-3.0-or-later AuthorName: Marco Lettieri AuthorEmail: m.lettieri@microbees.com AuthorWebSite: https://www.microbees.com/ SourceCode: https://github.com/marcolettieri/proximitycallfix IssueTracker: https://github.com/marcolettieri/proximitycallfix/issues AutoName: ProximitySensorFix RepoType: git Repo: https://github.com/marcolettieri/proximitycallfix Builds: - versionName: 1.0.4 versionCode: 26 commit: 1.0.4 subdir: app gradle: - yes - versionName: 1.0.5 versionCode: 27 commit: 1.0.5 subdir: app gradle: - yes AutoUpdateMode: Version %v UpdateCheckMode: Tags CurrentVersion: 1.0.5 CurrentVersionCode: 27
Update ProximitySensorFix to 1.0.5 (27)
Update ProximitySensorFix to 1.0.5 (27)
YAML
agpl-3.0
f-droid/fdroiddata,f-droid/fdroiddata
yaml
## Code Before: Categories: - System - Phone & SMS License: GPL-3.0-or-later AuthorName: Marco Lettieri AuthorEmail: m.lettieri@microbees.com AuthorWebSite: https://www.microbees.com/ SourceCode: https://github.com/marcolettieri/proximitycallfix IssueTracker: https://github.com/marcolettieri/proximitycallfix/issues AutoName: ProximitySensorFix RepoType: git Repo: https://github.com/marcolettieri/proximitycallfix Builds: - versionName: 1.0.4 versionCode: 26 commit: 1.0.4 subdir: app gradle: - yes AutoUpdateMode: Version %v UpdateCheckMode: Tags CurrentVersion: 1.0.4 CurrentVersionCode: 26 ## Instruction: Update ProximitySensorFix to 1.0.5 (27) ## Code After: Categories: - System - Phone & SMS License: GPL-3.0-or-later AuthorName: Marco Lettieri AuthorEmail: m.lettieri@microbees.com AuthorWebSite: https://www.microbees.com/ SourceCode: https://github.com/marcolettieri/proximitycallfix IssueTracker: https://github.com/marcolettieri/proximitycallfix/issues AutoName: ProximitySensorFix RepoType: git Repo: https://github.com/marcolettieri/proximitycallfix Builds: - versionName: 1.0.4 versionCode: 26 commit: 1.0.4 subdir: app gradle: - yes - versionName: 1.0.5 versionCode: 27 commit: 1.0.5 subdir: app gradle: - yes AutoUpdateMode: Version %v UpdateCheckMode: Tags CurrentVersion: 1.0.5 CurrentVersionCode: 27
Categories: - System - Phone & SMS License: GPL-3.0-or-later AuthorName: Marco Lettieri AuthorEmail: m.lettieri@microbees.com AuthorWebSite: https://www.microbees.com/ SourceCode: https://github.com/marcolettieri/proximitycallfix IssueTracker: https://github.com/marcolettieri/proximitycallfix/issues AutoName: ProximitySensorFix RepoType: git Repo: https://github.com/marcolettieri/proximitycallfix Builds: - versionName: 1.0.4 versionCode: 26 commit: 1.0.4 subdir: app gradle: - yes + - versionName: 1.0.5 + versionCode: 27 + commit: 1.0.5 + subdir: app + gradle: + - yes + AutoUpdateMode: Version %v UpdateCheckMode: Tags - CurrentVersion: 1.0.4 ? ^ + CurrentVersion: 1.0.5 ? ^ - CurrentVersionCode: 26 ? ^ + CurrentVersionCode: 27 ? ^
11
0.407407
9
2
edc3bbe603682c3fb15e12e2799f4a6e69b86b9e
extensions/markdown-language-features/src/features/documentSymbolProvider.ts
extensions/markdown-language-features/src/features/documentSymbolProvider.ts
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; import { MarkdownEngine } from '../markdownEngine'; import { TableOfContentsProvider } from '../tableOfContentsProvider'; export default class MDDocumentSymbolProvider implements vscode.DocumentSymbolProvider { constructor( private readonly engine: MarkdownEngine ) { } public async provideDocumentSymbols(document: vscode.TextDocument): Promise<vscode.SymbolInformation[]> { const toc = await new TableOfContentsProvider(this.engine, document).getToc(); return toc.map(entry => { return new vscode.SymbolInformation('#'.repeat(entry.level) + ' ' + entry.text, vscode.SymbolKind.Namespace, '', entry.location); }); } }
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; import { MarkdownEngine } from '../markdownEngine'; import { TableOfContentsProvider } from '../tableOfContentsProvider'; export default class MDDocumentSymbolProvider implements vscode.DocumentSymbolProvider { constructor( private readonly engine: MarkdownEngine ) { } public async provideDocumentSymbols(document: vscode.TextDocument): Promise<vscode.SymbolInformation[]> { const toc = await new TableOfContentsProvider(this.engine, document).getToc(); return toc.map(entry => { return new vscode.SymbolInformation('#'.repeat(entry.level) + ' ' + entry.text, vscode.SymbolKind.String, '', entry.location); }); } }
Use string symbol kind for markdown symbols
Use string symbol kind for markdown symbols
TypeScript
mit
mjbvz/vscode,the-ress/vscode,eamodio/vscode,cleidigh/vscode,Krzysztof-Cieslak/vscode,Krzysztof-Cieslak/vscode,microlv/vscode,microlv/vscode,microlv/vscode,microsoft/vscode,the-ress/vscode,rishii7/vscode,cleidigh/vscode,Microsoft/vscode,joaomoreno/vscode,hoovercj/vscode,hoovercj/vscode,hoovercj/vscode,hoovercj/vscode,0xmohit/vscode,Krzysztof-Cieslak/vscode,0xmohit/vscode,DustinCampbell/vscode,0xmohit/vscode,hoovercj/vscode,Microsoft/vscode,DustinCampbell/vscode,mjbvz/vscode,landonepps/vscode,the-ress/vscode,rishii7/vscode,microlv/vscode,Microsoft/vscode,rishii7/vscode,microlv/vscode,DustinCampbell/vscode,microsoft/vscode,cleidigh/vscode,joaomoreno/vscode,Microsoft/vscode,the-ress/vscode,microsoft/vscode,eamodio/vscode,eamodio/vscode,hoovercj/vscode,cleidigh/vscode,the-ress/vscode,DustinCampbell/vscode,landonepps/vscode,hoovercj/vscode,the-ress/vscode,Krzysztof-Cieslak/vscode,microsoft/vscode,Microsoft/vscode,0xmohit/vscode,0xmohit/vscode,Krzysztof-Cieslak/vscode,eamodio/vscode,the-ress/vscode,0xmohit/vscode,0xmohit/vscode,microsoft/vscode,0xmohit/vscode,eamodio/vscode,cleidigh/vscode,microsoft/vscode,Krzysztof-Cieslak/vscode,rishii7/vscode,microsoft/vscode,joaomoreno/vscode,Microsoft/vscode,hoovercj/vscode,cleidigh/vscode,rishii7/vscode,rishii7/vscode,joaomoreno/vscode,eamodio/vscode,the-ress/vscode,DustinCampbell/vscode,DustinCampbell/vscode,landonepps/vscode,joaomoreno/vscode,Krzysztof-Cieslak/vscode,landonepps/vscode,Krzysztof-Cieslak/vscode,cleidigh/vscode,DustinCampbell/vscode,microlv/vscode,DustinCampbell/vscode,landonepps/vscode,hoovercj/vscode,Krzysztof-Cieslak/vscode,0xmohit/vscode,0xmohit/vscode,the-ress/vscode,microlv/vscode,Microsoft/vscode,0xmohit/vscode,hoovercj/vscode,joaomoreno/vscode,mjbvz/vscode,hoovercj/vscode,Krzysztof-Cieslak/vscode,microsoft/vscode,Microsoft/vscode,rishii7/vscode,0xmohit/vscode,Microsoft/vscode,joaomoreno/vscode,microlv/vscode,the-ress/vscode,cleidigh/vscode,mjbvz/vscode,cleidigh/vscode,eamodio/vscode,eamodio/vscode,Krzysztof-Cieslak/vscode,0xmohit/vscode,joaomoreno/vscode,cleidigh/vscode,the-ress/vscode,microsoft/vscode,joaomoreno/vscode,mjbvz/vscode,microsoft/vscode,Microsoft/vscode,the-ress/vscode,mjbvz/vscode,rishii7/vscode,microlv/vscode,eamodio/vscode,mjbvz/vscode,microlv/vscode,eamodio/vscode,microlv/vscode,Krzysztof-Cieslak/vscode,cleidigh/vscode,microlv/vscode,Microsoft/vscode,rishii7/vscode,landonepps/vscode,rishii7/vscode,DustinCampbell/vscode,microlv/vscode,Microsoft/vscode,Krzysztof-Cieslak/vscode,hoovercj/vscode,the-ress/vscode,rishii7/vscode,mjbvz/vscode,microsoft/vscode,landonepps/vscode,mjbvz/vscode,microsoft/vscode,joaomoreno/vscode,joaomoreno/vscode,joaomoreno/vscode,Krzysztof-Cieslak/vscode,microsoft/vscode,DustinCampbell/vscode,joaomoreno/vscode,joaomoreno/vscode,landonepps/vscode,mjbvz/vscode,the-ress/vscode,the-ress/vscode,landonepps/vscode,rishii7/vscode,eamodio/vscode,landonepps/vscode,eamodio/vscode,landonepps/vscode,rishii7/vscode,hoovercj/vscode,cleidigh/vscode,eamodio/vscode,0xmohit/vscode,DustinCampbell/vscode,rishii7/vscode,mjbvz/vscode,Krzysztof-Cieslak/vscode,DustinCampbell/vscode,microsoft/vscode,microlv/vscode,landonepps/vscode,mjbvz/vscode,landonepps/vscode,DustinCampbell/vscode,mjbvz/vscode,0xmohit/vscode,hoovercj/vscode,microlv/vscode,0xmohit/vscode,eamodio/vscode,joaomoreno/vscode,microsoft/vscode,rishii7/vscode,cleidigh/vscode,microsoft/vscode,Krzysztof-Cieslak/vscode,joaomoreno/vscode,landonepps/vscode,cleidigh/vscode,hoovercj/vscode,joaomoreno/vscode,cleidigh/vscode,mjbvz/vscode,Microsoft/vscode,mjbvz/vscode,eamodio/vscode,microsoft/vscode,Microsoft/vscode,Microsoft/vscode,Microsoft/vscode,cleidigh/vscode,mjbvz/vscode,mjbvz/vscode,DustinCampbell/vscode,microlv/vscode,microlv/vscode,the-ress/vscode,DustinCampbell/vscode,cleidigh/vscode,0xmohit/vscode,rishii7/vscode,Microsoft/vscode,Krzysztof-Cieslak/vscode,hoovercj/vscode,hoovercj/vscode,eamodio/vscode,DustinCampbell/vscode,landonepps/vscode,rishii7/vscode,landonepps/vscode,DustinCampbell/vscode,landonepps/vscode,eamodio/vscode
typescript
## Code Before: /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; import { MarkdownEngine } from '../markdownEngine'; import { TableOfContentsProvider } from '../tableOfContentsProvider'; export default class MDDocumentSymbolProvider implements vscode.DocumentSymbolProvider { constructor( private readonly engine: MarkdownEngine ) { } public async provideDocumentSymbols(document: vscode.TextDocument): Promise<vscode.SymbolInformation[]> { const toc = await new TableOfContentsProvider(this.engine, document).getToc(); return toc.map(entry => { return new vscode.SymbolInformation('#'.repeat(entry.level) + ' ' + entry.text, vscode.SymbolKind.Namespace, '', entry.location); }); } } ## Instruction: Use string symbol kind for markdown symbols ## Code After: /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; import { MarkdownEngine } from '../markdownEngine'; import { TableOfContentsProvider } from '../tableOfContentsProvider'; export default class MDDocumentSymbolProvider implements vscode.DocumentSymbolProvider { constructor( private readonly engine: MarkdownEngine ) { } public async provideDocumentSymbols(document: vscode.TextDocument): Promise<vscode.SymbolInformation[]> { const toc = await new TableOfContentsProvider(this.engine, document).getToc(); return toc.map(entry => { return new vscode.SymbolInformation('#'.repeat(entry.level) + ' ' + entry.text, vscode.SymbolKind.String, '', entry.location); }); } }
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; - import { MarkdownEngine } from '../markdownEngine'; import { TableOfContentsProvider } from '../tableOfContentsProvider'; + export default class MDDocumentSymbolProvider implements vscode.DocumentSymbolProvider { constructor( private readonly engine: MarkdownEngine ) { } public async provideDocumentSymbols(document: vscode.TextDocument): Promise<vscode.SymbolInformation[]> { const toc = await new TableOfContentsProvider(this.engine, document).getToc(); return toc.map(entry => { - return new vscode.SymbolInformation('#'.repeat(entry.level) + ' ' + entry.text, vscode.SymbolKind.Namespace, '', entry.location); ? ^^^^^^^^^ + return new vscode.SymbolInformation('#'.repeat(entry.level) + ' ' + entry.text, vscode.SymbolKind.String, '', entry.location); ? ^^^^^^ }); } }
4
0.173913
2
2
7484a3027d4021f46520aeac04e83a50b850a400
_data/components/percentInput.yml
_data/components/percentInput.yml
directive : "o-percent-input" inheritedAttributes: [{ component: "FormDataComponent", path: "components/input/overview/api", attributes: ["attr", "label", "tooltip", "tooltip-position", "tooltip-show-delay", "automatic-binding", "automatic-registering", "data", "enabled", "required", "clear-button", "sql-type", "width", "read-only", "validators", "label-visible", "hide-required-marker"] },{ component: "o-integer-input", path: "components/input/integer/api", attributes: ["min", "max", "step", "grouping", "thousand-separator", "locale"] },{ component: "o-real-input", path: "components/input/real/api", attributes: ["min-decimal-digits", "max-decimal-digits", "decimal-separator"] }] inheritedOutputs: [{ component: "FormDataComponent", path: "components/input/overview/api", outputs: ["onChange", "onValueChange"] },{ component: "o-text-input", path: "components/input/text/api", outputs: [ "onFocus", "onBlur"] }]
directive : "o-percent-input" attributes: [{ name: "value-base", type: "1 | 100", default: "1", required: "", description: "Indicates whether de numeral system of the value received is 1 or 100" }] inheritedAttributes: [{ component: "FormDataComponent", path: "components/input/overview/api", attributes: ["attr", "label", "tooltip", "tooltip-position", "tooltip-show-delay", "automatic-binding", "automatic-registering", "data", "enabled", "required", "clear-button", "sql-type", "width", "read-only", "validators", "label-visible", "hide-required-marker"] },{ component: "o-integer-input", path: "components/input/integer/api", attributes: ["min", "max", "step", "grouping", "thousand-separator", "locale"] },{ component: "o-real-input", path: "components/input/real/api", attributes: ["min-decimal-digits", "max-decimal-digits", "decimal-separator"] }] inheritedOutputs: [{ component: "FormDataComponent", path: "components/input/overview/api", outputs: ["onChange", "onValueChange"] },{ component: "o-text-input", path: "components/input/text/api", outputs: [ "onFocus", "onBlur"] }]
Add `value-base` attribute to `o-percent-input` docs
Add `value-base` attribute to `o-percent-input` docs
YAML
mit
OntimizeWeb/docs,OntimizeWeb/docs,OntimizeWeb/docs,OntimizeWeb/docs
yaml
## Code Before: directive : "o-percent-input" inheritedAttributes: [{ component: "FormDataComponent", path: "components/input/overview/api", attributes: ["attr", "label", "tooltip", "tooltip-position", "tooltip-show-delay", "automatic-binding", "automatic-registering", "data", "enabled", "required", "clear-button", "sql-type", "width", "read-only", "validators", "label-visible", "hide-required-marker"] },{ component: "o-integer-input", path: "components/input/integer/api", attributes: ["min", "max", "step", "grouping", "thousand-separator", "locale"] },{ component: "o-real-input", path: "components/input/real/api", attributes: ["min-decimal-digits", "max-decimal-digits", "decimal-separator"] }] inheritedOutputs: [{ component: "FormDataComponent", path: "components/input/overview/api", outputs: ["onChange", "onValueChange"] },{ component: "o-text-input", path: "components/input/text/api", outputs: [ "onFocus", "onBlur"] }] ## Instruction: Add `value-base` attribute to `o-percent-input` docs ## Code After: directive : "o-percent-input" attributes: [{ name: "value-base", type: "1 | 100", default: "1", required: "", description: "Indicates whether de numeral system of the value received is 1 or 100" }] inheritedAttributes: [{ component: "FormDataComponent", path: "components/input/overview/api", attributes: ["attr", "label", "tooltip", "tooltip-position", "tooltip-show-delay", "automatic-binding", "automatic-registering", "data", "enabled", "required", "clear-button", "sql-type", "width", "read-only", "validators", "label-visible", "hide-required-marker"] },{ component: "o-integer-input", path: "components/input/integer/api", attributes: ["min", "max", "step", "grouping", "thousand-separator", "locale"] },{ component: "o-real-input", path: "components/input/real/api", attributes: ["min-decimal-digits", "max-decimal-digits", "decimal-separator"] }] inheritedOutputs: [{ component: "FormDataComponent", path: "components/input/overview/api", outputs: ["onChange", "onValueChange"] },{ component: "o-text-input", path: "components/input/text/api", outputs: [ "onFocus", "onBlur"] }]
directive : "o-percent-input" + + attributes: [{ + name: "value-base", + type: "1 | 100", + default: "1", + required: "", + description: "Indicates whether de numeral system of the value received is 1 or 100" + }] inheritedAttributes: [{ component: "FormDataComponent", path: "components/input/overview/api", attributes: ["attr", "label", "tooltip", "tooltip-position", "tooltip-show-delay", "automatic-binding", "automatic-registering", "data", "enabled", "required", "clear-button", "sql-type", "width", "read-only", "validators", "label-visible", "hide-required-marker"] },{ component: "o-integer-input", path: "components/input/integer/api", attributes: ["min", "max", "step", "grouping", "thousand-separator", "locale"] },{ component: "o-real-input", path: "components/input/real/api", attributes: ["min-decimal-digits", "max-decimal-digits", "decimal-separator"] }] inheritedOutputs: [{ component: "FormDataComponent", path: "components/input/overview/api", outputs: ["onChange", "onValueChange"] },{ component: "o-text-input", path: "components/input/text/api", outputs: [ "onFocus", "onBlur"] }]
8
0.296296
8
0
aa82189d0b21395d165f515a93a9fb9517c4beb9
mbc-logging-processor/tests/MBC_LoggingProcessorTest.php
mbc-logging-processor/tests/MBC_LoggingProcessorTest.php
<?php use DoSomething\MBC_LoggingGateway\MBC_LoggingGateway; // Including that file will also return the autoloader instance, so you can store // the return value of the include call in a variable and add more namespaces. // This can be useful for autoloading classes in a test suite, for example. // https://getcomposer.org/doc/01-basic-usage.md $loader = require_once __DIR__ . '/../vendor/autoload.php'; class MBC_LoggingGatewayTest extends PHPUnit_Framework_TestCase { public function setUp(){ } public function tearDown(){ } public function testLogUserImportFile() { date_default_timezone_set('America/New_York'); // Load Message Broker settings used mb mbp-user-import.php define('CONFIG_PATH', __DIR__ . '/../messagebroker-config'); require_once __DIR__ . '/../mbc-logging-gateway.config.inc'; // Create MBP_UserImport object to access findNextTargetFile() method for testing $messageBroker = new MessageBroker($credentials, $config); $mbcLoggingGateway = new MBC_LoggingGateway($messageBroker, $settings); list($endpoint, $cURLparameters, $post) = $mbcLoggingGateway->logUserImportFile($payloadDetails, $post); echo PHP_EOL . PHP_EOL; echo 'endpoint: ' . $endpoint, PHP_EOL; echo 'cURLparameters: ' . print_r($cURLparameters, TRUE), PHP_EOL; echo 'post: ' . print_r($post, TRUE), PHP_EOL; $this->assertTrue(TRUE); } }
<?php use DoSomething\MBC_LoggingGateway\MBC_LoggingGateway; // Including that file will also return the autoloader instance, so you can store // the return value of the include call in a variable and add more namespaces. // This can be useful for autoloading classes in a test suite, for example. // https://getcomposer.org/doc/01-basic-usage.md $loader = require_once __DIR__ . '/../vendor/autoload.php'; class MBC_LoggingProcessoryTest extends PHPUnit_Framework_TestCase { public function setUp(){ } public function tearDown(){ } public function testProcessLoggedEvents() { date_default_timezone_set('America/New_York'); // Load Message Broker settings used mb mbp-user-import.php define('CONFIG_PATH', __DIR__ . '/../messagebroker-config'); require_once __DIR__ . '/../mbc-logging-processor.config.inc'; // Create MBP_UserImport object to access findNextTargetFile() method for testing $messageBroker = new MessageBroker($credentials, $config); $mbcLoggingGateway = new MBC_LoggingProcessor($messageBroker, $settings); $this->assertTrue(TRUE); } }
Adjust test to be specific to mbc-logging-processor
Adjust test to be specific to mbc-logging-processor
PHP
mit
DoSomething/messagebroker-ds-PHP,DoSomething/MessageBroker-PHP,DoSomething/messagebroker-ds-PHP,DoSomething/MessageBroker-PHP
php
## Code Before: <?php use DoSomething\MBC_LoggingGateway\MBC_LoggingGateway; // Including that file will also return the autoloader instance, so you can store // the return value of the include call in a variable and add more namespaces. // This can be useful for autoloading classes in a test suite, for example. // https://getcomposer.org/doc/01-basic-usage.md $loader = require_once __DIR__ . '/../vendor/autoload.php'; class MBC_LoggingGatewayTest extends PHPUnit_Framework_TestCase { public function setUp(){ } public function tearDown(){ } public function testLogUserImportFile() { date_default_timezone_set('America/New_York'); // Load Message Broker settings used mb mbp-user-import.php define('CONFIG_PATH', __DIR__ . '/../messagebroker-config'); require_once __DIR__ . '/../mbc-logging-gateway.config.inc'; // Create MBP_UserImport object to access findNextTargetFile() method for testing $messageBroker = new MessageBroker($credentials, $config); $mbcLoggingGateway = new MBC_LoggingGateway($messageBroker, $settings); list($endpoint, $cURLparameters, $post) = $mbcLoggingGateway->logUserImportFile($payloadDetails, $post); echo PHP_EOL . PHP_EOL; echo 'endpoint: ' . $endpoint, PHP_EOL; echo 'cURLparameters: ' . print_r($cURLparameters, TRUE), PHP_EOL; echo 'post: ' . print_r($post, TRUE), PHP_EOL; $this->assertTrue(TRUE); } } ## Instruction: Adjust test to be specific to mbc-logging-processor ## Code After: <?php use DoSomething\MBC_LoggingGateway\MBC_LoggingGateway; // Including that file will also return the autoloader instance, so you can store // the return value of the include call in a variable and add more namespaces. // This can be useful for autoloading classes in a test suite, for example. // https://getcomposer.org/doc/01-basic-usage.md $loader = require_once __DIR__ . '/../vendor/autoload.php'; class MBC_LoggingProcessoryTest extends PHPUnit_Framework_TestCase { public function setUp(){ } public function tearDown(){ } public function testProcessLoggedEvents() { date_default_timezone_set('America/New_York'); // Load Message Broker settings used mb mbp-user-import.php define('CONFIG_PATH', __DIR__ . '/../messagebroker-config'); require_once __DIR__ . '/../mbc-logging-processor.config.inc'; // Create MBP_UserImport object to access findNextTargetFile() method for testing $messageBroker = new MessageBroker($credentials, $config); $mbcLoggingGateway = new MBC_LoggingProcessor($messageBroker, $settings); $this->assertTrue(TRUE); } }
<?php use DoSomething\MBC_LoggingGateway\MBC_LoggingGateway; // Including that file will also return the autoloader instance, so you can store // the return value of the include call in a variable and add more namespaces. // This can be useful for autoloading classes in a test suite, for example. // https://getcomposer.org/doc/01-basic-usage.md $loader = require_once __DIR__ . '/../vendor/autoload.php'; - class MBC_LoggingGatewayTest extends PHPUnit_Framework_TestCase { ? ^^^ ^^ + class MBC_LoggingProcessoryTest extends PHPUnit_Framework_TestCase { ? ^^^^ ^^^^ public function setUp(){ } public function tearDown(){ } - public function testLogUserImportFile() + public function testProcessLoggedEvents() { date_default_timezone_set('America/New_York'); // Load Message Broker settings used mb mbp-user-import.php define('CONFIG_PATH', __DIR__ . '/../messagebroker-config'); - require_once __DIR__ . '/../mbc-logging-gateway.config.inc'; ? ^^^ ^^^ + require_once __DIR__ . '/../mbc-logging-processor.config.inc'; ? ^^^^ ^^^^ // Create MBP_UserImport object to access findNextTargetFile() method for testing $messageBroker = new MessageBroker($credentials, $config); - $mbcLoggingGateway = new MBC_LoggingGateway($messageBroker, $settings); ? ^^^ ^^^ + $mbcLoggingGateway = new MBC_LoggingProcessor($messageBroker, $settings); ? ^^^^ ^^^^ - - list($endpoint, $cURLparameters, $post) = $mbcLoggingGateway->logUserImportFile($payloadDetails, $post); - echo PHP_EOL . PHP_EOL; - echo 'endpoint: ' . $endpoint, PHP_EOL; - echo 'cURLparameters: ' . print_r($cURLparameters, TRUE), PHP_EOL; - echo 'post: ' . print_r($post, TRUE), PHP_EOL; $this->assertTrue(TRUE); } }
14
0.368421
4
10
677df74bd47dc878e59c1c9ea01bf24fc81ce108
packages/size-limit/README.md
packages/size-limit/README.md
Core tool for [Size Limit] to load config and plugins. See Size Limit docs for more details. [Size Limit]: https://github.com/ai/size-limit/ <a href="https://evilmartians.com/?utm_source=size-limit"> <img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg" alt="Sponsored by Evil Martians" width="236" height="54"> </a>
<img src="https://ai.github.io/size-limit/logo.svg" align="right" alt="Size Limit logo by Anton Lovchikov" width="120" height="178"> Size Limit is a performance budget tool for JavaScript. It checks every commit on CI, calculates the real cost of your JS for end-users and throws an error if the cost exceeds the limit. * **ES modules** and **tree-shaking** support. * Add Size Limit to **Travis CI**, **Circle CI**, **GitHub Actions** or another CI system to know if a pull request adds a massive dependency. * **Modular** to fit different use cases: big JS applications that use their own bundler or small npm libraries with many files. * Can calculate **the time** it would take a browser to download and **execute** your JS. Time is a much more accurate and understandable metric compared to the size in bytes. * Calculations include **all dependencies and polyfills** used in your JS. <img src="./img/example.png" alt="Size Limit CLI" width="738"> With **[GitHub action]** Size Limit will post bundle size changes as a comment in pull request discussion. <img src="https://raw.githubusercontent.com/andresz1/size-limit-action/master/assets/pr.png" alt="Size Limit comment in pull request about bundle size changes" width="686" height="289"> See **[full docs](https://github.com/ai/size-limit/)** on GitHub. [GitHub action]: https://github.com/andresz1/size-limit-action
Improve size-limit npm package docs
Improve size-limit npm package docs
Markdown
mit
ai/size-limit,ai/size-limit
markdown
## Code Before: Core tool for [Size Limit] to load config and plugins. See Size Limit docs for more details. [Size Limit]: https://github.com/ai/size-limit/ <a href="https://evilmartians.com/?utm_source=size-limit"> <img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg" alt="Sponsored by Evil Martians" width="236" height="54"> </a> ## Instruction: Improve size-limit npm package docs ## Code After: <img src="https://ai.github.io/size-limit/logo.svg" align="right" alt="Size Limit logo by Anton Lovchikov" width="120" height="178"> Size Limit is a performance budget tool for JavaScript. It checks every commit on CI, calculates the real cost of your JS for end-users and throws an error if the cost exceeds the limit. * **ES modules** and **tree-shaking** support. * Add Size Limit to **Travis CI**, **Circle CI**, **GitHub Actions** or another CI system to know if a pull request adds a massive dependency. * **Modular** to fit different use cases: big JS applications that use their own bundler or small npm libraries with many files. * Can calculate **the time** it would take a browser to download and **execute** your JS. Time is a much more accurate and understandable metric compared to the size in bytes. * Calculations include **all dependencies and polyfills** used in your JS. <img src="./img/example.png" alt="Size Limit CLI" width="738"> With **[GitHub action]** Size Limit will post bundle size changes as a comment in pull request discussion. <img src="https://raw.githubusercontent.com/andresz1/size-limit-action/master/assets/pr.png" alt="Size Limit comment in pull request about bundle size changes" width="686" height="289"> See **[full docs](https://github.com/ai/size-limit/)** on GitHub. [GitHub action]: https://github.com/andresz1/size-limit-action
- Core tool for [Size Limit] to load config and plugins. + <img src="https://ai.github.io/size-limit/logo.svg" align="right" + alt="Size Limit logo by Anton Lovchikov" width="120" height="178"> - See Size Limit docs for more details. + Size Limit is a performance budget tool for JavaScript. It checks every commit + on CI, calculates the real cost of your JS for end-users and throws an error + if the cost exceeds the limit. - [Size Limit]: https://github.com/ai/size-limit/ + * **ES modules** and **tree-shaking** support. + * Add Size Limit to **Travis CI**, **Circle CI**, **GitHub Actions** + or another CI system to know if a pull request adds a massive dependency. + * **Modular** to fit different use cases: big JS applications + that use their own bundler or small npm libraries with many files. + * Can calculate **the time** it would take a browser + to download and **execute** your JS. Time is a much more accurate + and understandable metric compared to the size in bytes. + * Calculations include **all dependencies and polyfills** + used in your JS. - <a href="https://evilmartians.com/?utm_source=size-limit"> - <img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg" - alt="Sponsored by Evil Martians" width="236" height="54"> - </a> + <img src="./img/example.png" alt="Size Limit CLI" width="738"> + + With **[GitHub action]** Size Limit will post bundle size changes as a comment + in pull request discussion. + + <img src="https://raw.githubusercontent.com/andresz1/size-limit-action/master/assets/pr.png" + alt="Size Limit comment in pull request about bundle size changes" + width="686" height="289"> + + See **[full docs](https://github.com/ai/size-limit/)** on GitHub. + + [GitHub action]: https://github.com/andresz1/size-limit-action
34
3.090909
27
7
6e1f372b2be12037bffa492f74f7310d95ba35cb
.travis.yml
.travis.yml
sudo: required services: - docker language: go env: - TEST_SUITE=run-tests-local-process ARANGODB=arangodb:3.1 - TEST_SUITE=run-tests-docker ARANGODB=arangodb:3.1 - TEST_SUITE=run-tests-local-process ARANGODB=arangodb/arangodb:latest - TEST_SUITE=run-tests-docker ARANGODB=arangodb/arangodb:latest - TEST_SUITE=run-tests-local-process ARANGODB=arangodb/arangodb-preview:latest - TEST_SUITE=run-tests-docker ARANGODB=arangodb/arangodb-preview:latest script: make $TEST_SUITE # Install Docker CE before_install: - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" - sudo apt-get update - sudo apt-get -y install docker-ce
sudo: required services: - docker language: go env: - TEST_SUITE=run-tests-local-process ARANGODB=arangodb:3.1 - TEST_SUITE=run-tests-docker ARANGODB=arangodb:3.1 - TEST_SUITE=run-tests-local-process ARANGODB=arangodb/arangodb:latest - TEST_SUITE=run-tests-docker ARANGODB=arangodb/arangodb:latest - TEST_SUITE=run-tests-local-process ARANGODB=arangodb/arangodb-preview:latest - TEST_SUITE=run-tests-docker ARANGODB=arangodb/arangodb-preview:latest script: make $TEST_SUITE # 3.1 cluster startup is not always a success, causing lots of false positive. matrix: allow_failures: - env: TEST_SUITE=run-tests-local-process ARANGODB=arangodb:3.1 - env: TEST_SUITE=run-tests-docker ARANGODB=arangodb:3.1 # Install Docker CE before_install: - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" - sudo apt-get update - sudo apt-get -y install docker-ce
Allow for failures in 3.1 because of startup issues under load
Allow for failures in 3.1 because of startup issues under load
YAML
apache-2.0
arangodb-helper/arangodb,arangodb-helper/arangodb
yaml
## Code Before: sudo: required services: - docker language: go env: - TEST_SUITE=run-tests-local-process ARANGODB=arangodb:3.1 - TEST_SUITE=run-tests-docker ARANGODB=arangodb:3.1 - TEST_SUITE=run-tests-local-process ARANGODB=arangodb/arangodb:latest - TEST_SUITE=run-tests-docker ARANGODB=arangodb/arangodb:latest - TEST_SUITE=run-tests-local-process ARANGODB=arangodb/arangodb-preview:latest - TEST_SUITE=run-tests-docker ARANGODB=arangodb/arangodb-preview:latest script: make $TEST_SUITE # Install Docker CE before_install: - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" - sudo apt-get update - sudo apt-get -y install docker-ce ## Instruction: Allow for failures in 3.1 because of startup issues under load ## Code After: sudo: required services: - docker language: go env: - TEST_SUITE=run-tests-local-process ARANGODB=arangodb:3.1 - TEST_SUITE=run-tests-docker ARANGODB=arangodb:3.1 - TEST_SUITE=run-tests-local-process ARANGODB=arangodb/arangodb:latest - TEST_SUITE=run-tests-docker ARANGODB=arangodb/arangodb:latest - TEST_SUITE=run-tests-local-process ARANGODB=arangodb/arangodb-preview:latest - TEST_SUITE=run-tests-docker ARANGODB=arangodb/arangodb-preview:latest script: make $TEST_SUITE # 3.1 cluster startup is not always a success, causing lots of false positive. matrix: allow_failures: - env: TEST_SUITE=run-tests-local-process ARANGODB=arangodb:3.1 - env: TEST_SUITE=run-tests-docker ARANGODB=arangodb:3.1 # Install Docker CE before_install: - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" - sudo apt-get update - sudo apt-get -y install docker-ce
sudo: required services: - docker language: go env: - TEST_SUITE=run-tests-local-process ARANGODB=arangodb:3.1 - TEST_SUITE=run-tests-docker ARANGODB=arangodb:3.1 - TEST_SUITE=run-tests-local-process ARANGODB=arangodb/arangodb:latest - TEST_SUITE=run-tests-docker ARANGODB=arangodb/arangodb:latest - TEST_SUITE=run-tests-local-process ARANGODB=arangodb/arangodb-preview:latest - TEST_SUITE=run-tests-docker ARANGODB=arangodb/arangodb-preview:latest script: make $TEST_SUITE + # 3.1 cluster startup is not always a success, causing lots of false positive. + matrix: + allow_failures: + - env: TEST_SUITE=run-tests-local-process ARANGODB=arangodb:3.1 + - env: TEST_SUITE=run-tests-docker ARANGODB=arangodb:3.1 + # Install Docker CE before_install: - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" - sudo apt-get update - sudo apt-get -y install docker-ce
6
0.26087
6
0
b12e902b51f5ed836d33319326949568f9d61415
lib/praxis/tasks/api_docs.rb
lib/praxis/tasks/api_docs.rb
namespace :praxis do desc "Generate API docs (JSON definitions) for a Praxis App" task :api_docs => [:environment] do |t, args| require 'fileutils' Praxis::Blueprint.caching_enabled = false generator = Praxis::RestfulDocGenerator.new(Dir.pwd) end desc "API Documenation Browser" desc "API Documentation Browser" task :doc_browser => [:api_docs] do public_folder = File.expand_path("../../../", __FILE__) + "/api_browser/app" app = Rack::Builder.new do map "/docs" do # application JSON docs use Rack::Static, urls: [""], root: File.join(Dir.pwd, Praxis::RestfulDocGenerator::API_DOCS_DIRNAME) end map "/" do # Assets mapping use Rack::Static, urls: [""], root: public_folder, index: "index.html" end run lambda { |env| [404, {'Content-Type' => 'text/plain'}, ['Not Found']] } end Rack::Server.start app: app, Port: 4567 end end
namespace :praxis do desc "Generate API docs (JSON definitions) for a Praxis App" task :api_docs => [:environment] do |t, args| require 'fileutils' Praxis::Blueprint.caching_enabled = false generator = Praxis::RestfulDocGenerator.new(Dir.pwd) end desc "API Documentation Browser" task :doc_browser => [:api_docs] do |t, args| public_folder = File.expand_path("../../../", __FILE__) + "/api_browser/app" app = Rack::Builder.new do map "/docs" do # application JSON docs use Rack::Static, urls: [""], root: File.join(Dir.pwd, Praxis::RestfulDocGenerator::API_DOCS_DIRNAME) end map "/" do # Assets mapping use Rack::Static, urls: [""], root: public_folder, index: "index.html" end run lambda { |env| [404, {'Content-Type' => 'text/plain'}, ['Not Found']] } end port = args[:port] || 4567 Rack::Server.start app: app, port: port end end
Add 'port' argument to doc_browser rake task.
Add 'port' argument to doc_browser rake task. Closes #75
Ruby
mit
justingaylor/praxis,praxis/praxis,Thann/praxis,gampleman/praxis,rightscale/praxis,Thann/praxis,blanquer/praxis,blanquer/praxis,Thann/praxis,smcgivern/praxis,rightscale/praxis,gampleman/praxis,rightscale/praxis,tony-spataro-rs/praxis,smcgivern/praxis,justingaylor/praxis,tony-spataro-rs/praxis,gampleman/praxis,smcgivern/praxis,tony-spataro-rs/praxis
ruby
## Code Before: namespace :praxis do desc "Generate API docs (JSON definitions) for a Praxis App" task :api_docs => [:environment] do |t, args| require 'fileutils' Praxis::Blueprint.caching_enabled = false generator = Praxis::RestfulDocGenerator.new(Dir.pwd) end desc "API Documenation Browser" desc "API Documentation Browser" task :doc_browser => [:api_docs] do public_folder = File.expand_path("../../../", __FILE__) + "/api_browser/app" app = Rack::Builder.new do map "/docs" do # application JSON docs use Rack::Static, urls: [""], root: File.join(Dir.pwd, Praxis::RestfulDocGenerator::API_DOCS_DIRNAME) end map "/" do # Assets mapping use Rack::Static, urls: [""], root: public_folder, index: "index.html" end run lambda { |env| [404, {'Content-Type' => 'text/plain'}, ['Not Found']] } end Rack::Server.start app: app, Port: 4567 end end ## Instruction: Add 'port' argument to doc_browser rake task. Closes #75 ## Code After: namespace :praxis do desc "Generate API docs (JSON definitions) for a Praxis App" task :api_docs => [:environment] do |t, args| require 'fileutils' Praxis::Blueprint.caching_enabled = false generator = Praxis::RestfulDocGenerator.new(Dir.pwd) end desc "API Documentation Browser" task :doc_browser => [:api_docs] do |t, args| public_folder = File.expand_path("../../../", __FILE__) + "/api_browser/app" app = Rack::Builder.new do map "/docs" do # application JSON docs use Rack::Static, urls: [""], root: File.join(Dir.pwd, Praxis::RestfulDocGenerator::API_DOCS_DIRNAME) end map "/" do # Assets mapping use Rack::Static, urls: [""], root: public_folder, index: "index.html" end run lambda { |env| [404, {'Content-Type' => 'text/plain'}, ['Not Found']] } end port = args[:port] || 4567 Rack::Server.start app: app, port: port end end
namespace :praxis do desc "Generate API docs (JSON definitions) for a Praxis App" task :api_docs => [:environment] do |t, args| require 'fileutils' Praxis::Blueprint.caching_enabled = false generator = Praxis::RestfulDocGenerator.new(Dir.pwd) end - desc "API Documenation Browser" desc "API Documentation Browser" - task :doc_browser => [:api_docs] do + task :doc_browser => [:api_docs] do |t, args| ? ++++++++++ public_folder = File.expand_path("../../../", __FILE__) + "/api_browser/app" app = Rack::Builder.new do map "/docs" do # application JSON docs use Rack::Static, urls: [""], root: File.join(Dir.pwd, Praxis::RestfulDocGenerator::API_DOCS_DIRNAME) end map "/" do # Assets mapping use Rack::Static, urls: [""], root: public_folder, index: "index.html" end run lambda { |env| [404, {'Content-Type' => 'text/plain'}, ['Not Found']] } end + port = args[:port] || 4567 - Rack::Server.start app: app, Port: 4567 ? ^ ^^^^ + Rack::Server.start app: app, port: port ? ^ ^^^^ end + end
7
0.259259
4
3
2608d6eb43912628f362bfaeab871cd0878a449e
javascript30/01-drum-kit/main.js
javascript30/01-drum-kit/main.js
window.addEventListener('keydown', function(e) { let audio = document.querySelector(`audio[data-key='${e.keyCode}']`) let key = document.querySelector(`.key[data-key='${e.keyCode}']`) if (!audio) return audio.currentTime = 0 audio.play() key.classList.add('playing') })
window.addEventListener('keydown', function(e) { let audio = document.querySelector(`audio[data-key='${e.keyCode}']`) let key = document.querySelector(`.key[data-key='${e.keyCode}']`) if (!audio) return audio.currentTime = 0 audio.play() key.classList.add('playing') }) function removeTransition(e) { if (e.propertyName !== 'transform') this.classList.remove('playing') } let keys = document.querySelectorAll('.key') keys.forEach(key => key.addEventListener('transitionend', removeTransition))
Add transitionend event to remove playing class
Add transitionend event to remove playing class
JavaScript
mit
stivaliserna/scripts,stivaliserna/scripts
javascript
## Code Before: window.addEventListener('keydown', function(e) { let audio = document.querySelector(`audio[data-key='${e.keyCode}']`) let key = document.querySelector(`.key[data-key='${e.keyCode}']`) if (!audio) return audio.currentTime = 0 audio.play() key.classList.add('playing') }) ## Instruction: Add transitionend event to remove playing class ## Code After: window.addEventListener('keydown', function(e) { let audio = document.querySelector(`audio[data-key='${e.keyCode}']`) let key = document.querySelector(`.key[data-key='${e.keyCode}']`) if (!audio) return audio.currentTime = 0 audio.play() key.classList.add('playing') }) function removeTransition(e) { if (e.propertyName !== 'transform') this.classList.remove('playing') } let keys = document.querySelectorAll('.key') keys.forEach(key => key.addEventListener('transitionend', removeTransition))
window.addEventListener('keydown', function(e) { let audio = document.querySelector(`audio[data-key='${e.keyCode}']`) let key = document.querySelector(`.key[data-key='${e.keyCode}']`) if (!audio) return audio.currentTime = 0 audio.play() key.classList.add('playing') }) + + function removeTransition(e) { + if (e.propertyName !== 'transform') + this.classList.remove('playing') + } + + let keys = document.querySelectorAll('.key') + keys.forEach(key => key.addEventListener('transitionend', removeTransition))
8
1
8
0
828215d3de3ddd2febdd190de067b0f6e5c2e9e1
query/migrations/0017_auto_20160224_1306.py
query/migrations/0017_auto_20160224_1306.py
from __future__ import unicode_literals from django.db import models, migrations from query.operations import engine_specific class Migration(migrations.Migration): dependencies = [ ('query', '0016_auto_20160203_1324'), ] operations = [ engine_specific(('mysql',), migrations.RunSQL( 'alter table query_term modify word varchar(200) character set utf8 collate utf8_bin;', 'alter table query_term modify word varchar(200) character set utf8 collate utf8_general_ci;' ) ), ]
from __future__ import unicode_literals from django.db import models, migrations from query.operations import engine_specific class Migration(migrations.Migration): dependencies = [ ('query', '0016_auto_20160203_1324'), ] operations = [ engine_specific(('mysql',), migrations.RunSQL( sql='alter table query_term modify word varchar(200) character set utf8 collate utf8_bin;', reverse_sql='alter table query_term modify word varchar(200) character set utf8 collate utf8_general_ci;' ) ), ]
Use named arguments for RunSQL
Use named arguments for RunSQL
Python
apache-2.0
UUDigitalHumanitieslab/texcavator,UUDigitalHumanitieslab/texcavator,UUDigitalHumanitieslab/texcavator
python
## Code Before: from __future__ import unicode_literals from django.db import models, migrations from query.operations import engine_specific class Migration(migrations.Migration): dependencies = [ ('query', '0016_auto_20160203_1324'), ] operations = [ engine_specific(('mysql',), migrations.RunSQL( 'alter table query_term modify word varchar(200) character set utf8 collate utf8_bin;', 'alter table query_term modify word varchar(200) character set utf8 collate utf8_general_ci;' ) ), ] ## Instruction: Use named arguments for RunSQL ## Code After: from __future__ import unicode_literals from django.db import models, migrations from query.operations import engine_specific class Migration(migrations.Migration): dependencies = [ ('query', '0016_auto_20160203_1324'), ] operations = [ engine_specific(('mysql',), migrations.RunSQL( sql='alter table query_term modify word varchar(200) character set utf8 collate utf8_bin;', reverse_sql='alter table query_term modify word varchar(200) character set utf8 collate utf8_general_ci;' ) ), ]
from __future__ import unicode_literals from django.db import models, migrations from query.operations import engine_specific class Migration(migrations.Migration): dependencies = [ ('query', '0016_auto_20160203_1324'), ] operations = [ engine_specific(('mysql',), migrations.RunSQL( - 'alter table query_term modify word varchar(200) character set utf8 collate utf8_bin;', + sql='alter table query_term modify word varchar(200) character set utf8 collate utf8_bin;', ? ++++ - 'alter table query_term modify word varchar(200) character set utf8 collate utf8_general_ci;' + reverse_sql='alter table query_term modify word varchar(200) character set utf8 collate utf8_general_ci;' ? ++++++++++++ ) ), ]
4
0.190476
2
2
2cebf5c5a5d0c42f9f522ec7b5b5e40b3dcd0824
app/models/mesh_term.rb
app/models/mesh_term.rb
class MeshTerm < ActiveRecord::Base def self.populate_from_file(data=ClinicalTrials::FileManager.default_mesh_terms) puts "about to populate table of mesh terms..." data.each_line{|line| line_array=line.split(' ') tree=line_array.first qualifier=tree.split('.').first desc=line_array[1] term=line_array.last if !qualifier.nil? new(:qualifier=>qualifier, :tree_number=>tree, :description=>desc, :mesh_term=>term, ).save! end } end end
class MeshTerm < ActiveRecord::Base def self.populate_from_file(file_name=ClinicalTrials::FileManager.default_mesh_terms) puts "about to populate table of mesh terms..." File.open(file_name).each_line{|line| line_array=line.split(' ') tree=line_array.first qualifier=tree.split('.').first desc=line_array[1] term=line.split(/\t/).last if !qualifier.nil? new(:qualifier=>qualifier, :tree_number=>tree, :description=>desc, :mesh_term=>term, ).save! end } end end
Fix bug in MeshTerm - if the term was more than one word, it was only getting the last word and saving that to the table. Changed it so that it saves the entire term.
aact-348: Fix bug in MeshTerm - if the term was more than one word, it was only getting the last word and saving that to the table. Changed it so that it saves the entire term.
Ruby
mit
tibbs001/aact-1,ctti-clinicaltrials/aact,ctti-clinicaltrials/aact,tibbs001/aact-1,ctti-clinicaltrials/aact,tibbs001/aact-1
ruby
## Code Before: class MeshTerm < ActiveRecord::Base def self.populate_from_file(data=ClinicalTrials::FileManager.default_mesh_terms) puts "about to populate table of mesh terms..." data.each_line{|line| line_array=line.split(' ') tree=line_array.first qualifier=tree.split('.').first desc=line_array[1] term=line_array.last if !qualifier.nil? new(:qualifier=>qualifier, :tree_number=>tree, :description=>desc, :mesh_term=>term, ).save! end } end end ## Instruction: aact-348: Fix bug in MeshTerm - if the term was more than one word, it was only getting the last word and saving that to the table. Changed it so that it saves the entire term. ## Code After: class MeshTerm < ActiveRecord::Base def self.populate_from_file(file_name=ClinicalTrials::FileManager.default_mesh_terms) puts "about to populate table of mesh terms..." File.open(file_name).each_line{|line| line_array=line.split(' ') tree=line_array.first qualifier=tree.split('.').first desc=line_array[1] term=line.split(/\t/).last if !qualifier.nil? new(:qualifier=>qualifier, :tree_number=>tree, :description=>desc, :mesh_term=>term, ).save! end } end end
class MeshTerm < ActiveRecord::Base - def self.populate_from_file(data=ClinicalTrials::FileManager.default_mesh_terms) ? ^ ^^ + def self.populate_from_file(file_name=ClinicalTrials::FileManager.default_mesh_terms) ? ^^^^^^ ^^ puts "about to populate table of mesh terms..." - data.each_line{|line| + File.open(file_name).each_line{|line| line_array=line.split(' ') tree=line_array.first qualifier=tree.split('.').first desc=line_array[1] - term=line_array.last + term=line.split(/\t/).last if !qualifier.nil? new(:qualifier=>qualifier, :tree_number=>tree, :description=>desc, :mesh_term=>term, ).save! end } end end
6
0.315789
3
3
497d92f27b6e960f43fa0d0a4fa7bb9af1012607
spec/pidgin2adium/tag_balancer_spec.rb
spec/pidgin2adium/tag_balancer_spec.rb
describe Pidgin2Adium::TagBalancer do describe "text without tags" do it "should be left untouched" do text = "Foo bar baz, this is my excellent test text!" Pidgin2Adium::TagBalancer.new(text).balance.should == text end end describe "text with tags" do it "should be balanced correctly" do unbalanced = '<p><b>this is unbalanced!' balanced = "<p><b>this is unbalanced!</b></p>" Pidgin2Adium::TagBalancer.new(unbalanced).balance.should == balanced end end end
describe Pidgin2Adium::TagBalancer do describe 'text without tags' do it 'is left untouched' do text = 'foo!' Pidgin2Adium::TagBalancer.new(text).balance.should == text end end describe 'text with tags' do it 'is balanced correctly' do unbalanced = '<p><b>this is unbalanced!' balanced = '<p><b>this is unbalanced!</b></p>' Pidgin2Adium::TagBalancer.new(unbalanced).balance.should == balanced end end end
Remove shoulds from test descriptions
Remove shoulds from test descriptions
Ruby
mit
gabebw/pidgin2adium,gabebw/pipio,gabebw/pidgin2adium
ruby
## Code Before: describe Pidgin2Adium::TagBalancer do describe "text without tags" do it "should be left untouched" do text = "Foo bar baz, this is my excellent test text!" Pidgin2Adium::TagBalancer.new(text).balance.should == text end end describe "text with tags" do it "should be balanced correctly" do unbalanced = '<p><b>this is unbalanced!' balanced = "<p><b>this is unbalanced!</b></p>" Pidgin2Adium::TagBalancer.new(unbalanced).balance.should == balanced end end end ## Instruction: Remove shoulds from test descriptions ## Code After: describe Pidgin2Adium::TagBalancer do describe 'text without tags' do it 'is left untouched' do text = 'foo!' Pidgin2Adium::TagBalancer.new(text).balance.should == text end end describe 'text with tags' do it 'is balanced correctly' do unbalanced = '<p><b>this is unbalanced!' balanced = '<p><b>this is unbalanced!</b></p>' Pidgin2Adium::TagBalancer.new(unbalanced).balance.should == balanced end end end
describe Pidgin2Adium::TagBalancer do - describe "text without tags" do ? ^ ^ + describe 'text without tags' do ? ^ ^ - it "should be left untouched" do ? ^ -------- ^ + it 'is left untouched' do ? ^^ ^ - text = "Foo bar baz, this is my excellent test text!" + text = 'foo!' Pidgin2Adium::TagBalancer.new(text).balance.should == text end end - describe "text with tags" do ? ^ ^ + describe 'text with tags' do ? ^ ^ - it "should be balanced correctly" do ? ^ -------- ^ + it 'is balanced correctly' do ? ^^ ^ unbalanced = '<p><b>this is unbalanced!' - balanced = "<p><b>this is unbalanced!</b></p>" ? -- ^ ^ + balanced = '<p><b>this is unbalanced!</b></p>' ? ^ ^ Pidgin2Adium::TagBalancer.new(unbalanced).balance.should == balanced end end end
12
0.75
6
6
48aeee69053d73941ed3eafecbc389448fc35339
Casks/diskmaker-x.rb
Casks/diskmaker-x.rb
cask 'diskmaker-x' do version :latest sha256 :no_check url 'http://diskmakerx.com/downloads/DiskMaker_X.dmg' name 'DiskMaker X' homepage 'http://diskmakerx.com/' license :gratis app 'DiskMaker X 5.app' end
cask 'diskmaker-x' do version '5.0.3' sha256 '040a21bdef0c2682c518a9e9572f7547b5f1fb02b8930a8a084ae85b12e70518' url "http://diskmakerx.com/downloads/DiskMaker_X_#{version.no_dots}.dmg" appcast 'http://diskmakerx.com/feed/', checkpoint: '65c41b1c32cf72f4cccd0f467d903ed768dedc407936bf1a64ec90764deb7da1' name 'DiskMaker X' homepage 'http://diskmakerx.com/' license :gratis app "DiskMaker X #{version.major}.app" end
Update Diskmaker X to v5.0.3
Update Diskmaker X to v5.0.3 Turns Diskmaker X back into a versioned cask. The author of Diskmaker reached out to us and has re-uploaded the versioned downloads for us to use. Thanks @diskmakerx! For more information about this commit please check the discussion related to the versioning of Diskmaker in this pull request: https://github.com/caskroom/homebrew-cask/pull/17519
Ruby
bsd-2-clause
Saklad5/homebrew-cask,lantrix/homebrew-cask,samdoran/homebrew-cask,FinalDes/homebrew-cask,Gasol/homebrew-cask,sgnh/homebrew-cask,decrement/homebrew-cask,chadcatlett/caskroom-homebrew-cask,squid314/homebrew-cask,jedahan/homebrew-cask,howie/homebrew-cask,hovancik/homebrew-cask,howie/homebrew-cask,hristozov/homebrew-cask,reitermarkus/homebrew-cask,ksato9700/homebrew-cask,daften/homebrew-cask,kkdd/homebrew-cask,julionc/homebrew-cask,linc01n/homebrew-cask,malob/homebrew-cask,paour/homebrew-cask,yutarody/homebrew-cask,wickles/homebrew-cask,winkelsdorf/homebrew-cask,xyb/homebrew-cask,0rax/homebrew-cask,exherb/homebrew-cask,inz/homebrew-cask,mjgardner/homebrew-cask,joshka/homebrew-cask,joschi/homebrew-cask,lukeadams/homebrew-cask,jmeridth/homebrew-cask,sjackman/homebrew-cask,FranklinChen/homebrew-cask,jgarber623/homebrew-cask,usami-k/homebrew-cask,mchlrmrz/homebrew-cask,rogeriopradoj/homebrew-cask,greg5green/homebrew-cask,winkelsdorf/homebrew-cask,amatos/homebrew-cask,cblecker/homebrew-cask,cfillion/homebrew-cask,colindean/homebrew-cask,boecko/homebrew-cask,caskroom/homebrew-cask,jiashuw/homebrew-cask,ebraminio/homebrew-cask,kassi/homebrew-cask,shorshe/homebrew-cask,Keloran/homebrew-cask,josa42/homebrew-cask,kamilboratynski/homebrew-cask,miguelfrde/homebrew-cask,MircoT/homebrew-cask,janlugt/homebrew-cask,okket/homebrew-cask,stigkj/homebrew-caskroom-cask,andrewdisley/homebrew-cask,asins/homebrew-cask,leipert/homebrew-cask,troyxmccall/homebrew-cask,mishari/homebrew-cask,yumitsu/homebrew-cask,kesara/homebrew-cask,zerrot/homebrew-cask,mattrobenolt/homebrew-cask,dictcp/homebrew-cask,hovancik/homebrew-cask,cobyism/homebrew-cask,kteru/homebrew-cask,arronmabrey/homebrew-cask,perfide/homebrew-cask,My2ndAngelic/homebrew-cask,lcasey001/homebrew-cask,stonehippo/homebrew-cask,0rax/homebrew-cask,yuhki50/homebrew-cask,JosephViolago/homebrew-cask,farmerchris/homebrew-cask,syscrusher/homebrew-cask,schneidmaster/homebrew-cask,haha1903/homebrew-cask,sohtsuka/homebrew-cask,tjnycum/homebrew-cask,coeligena/homebrew-customized,cliffcotino/homebrew-cask,kesara/homebrew-cask,exherb/homebrew-cask,xcezx/homebrew-cask,KosherBacon/homebrew-cask,xtian/homebrew-cask,claui/homebrew-cask,KosherBacon/homebrew-cask,13k/homebrew-cask,shoichiaizawa/homebrew-cask,artdevjs/homebrew-cask,pacav69/homebrew-cask,flaviocamilo/homebrew-cask,xyb/homebrew-cask,Amorymeltzer/homebrew-cask,yutarody/homebrew-cask,BenjaminHCCarr/homebrew-cask,renaudguerin/homebrew-cask,franklouwers/homebrew-cask,opsdev-ws/homebrew-cask,gyndav/homebrew-cask,cliffcotino/homebrew-cask,slack4u/homebrew-cask,miccal/homebrew-cask,victorpopkov/homebrew-cask,forevergenin/homebrew-cask,andrewdisley/homebrew-cask,elnappo/homebrew-cask,hyuna917/homebrew-cask,koenrh/homebrew-cask,kTitan/homebrew-cask,boecko/homebrew-cask,lucasmezencio/homebrew-cask,josa42/homebrew-cask,jacobbednarz/homebrew-cask,ywfwj2008/homebrew-cask,6uclz1/homebrew-cask,tjnycum/homebrew-cask,tangestani/homebrew-cask,JosephViolago/homebrew-cask,morganestes/homebrew-cask,sanyer/homebrew-cask,miccal/homebrew-cask,jconley/homebrew-cask,phpwutz/homebrew-cask,jawshooah/homebrew-cask,imgarylai/homebrew-cask,Amorymeltzer/homebrew-cask,seanorama/homebrew-cask,renard/homebrew-cask,MerelyAPseudonym/homebrew-cask,yumitsu/homebrew-cask,cprecioso/homebrew-cask,moimikey/homebrew-cask,deiga/homebrew-cask,andyli/homebrew-cask,sgnh/homebrew-cask,Labutin/homebrew-cask,tan9/homebrew-cask,forevergenin/homebrew-cask,fharbe/homebrew-cask,Ephemera/homebrew-cask,julionc/homebrew-cask,Saklad5/homebrew-cask,bcomnes/homebrew-cask,sjackman/homebrew-cask,m3nu/homebrew-cask,jellyfishcoder/homebrew-cask,mattrobenolt/homebrew-cask,shoichiaizawa/homebrew-cask,diogodamiani/homebrew-cask,Ketouem/homebrew-cask,n8henrie/homebrew-cask,sscotth/homebrew-cask,mhubig/homebrew-cask,samnung/homebrew-cask,stephenwade/homebrew-cask,claui/homebrew-cask,markthetech/homebrew-cask,hakamadare/homebrew-cask,flaviocamilo/homebrew-cask,devmynd/homebrew-cask,sscotth/homebrew-cask,gerrypower/homebrew-cask,blogabe/homebrew-cask,hristozov/homebrew-cask,fanquake/homebrew-cask,FredLackeyOfficial/homebrew-cask,adrianchia/homebrew-cask,rajiv/homebrew-cask,decrement/homebrew-cask,reelsense/homebrew-cask,scribblemaniac/homebrew-cask,wKovacs64/homebrew-cask,hellosky806/homebrew-cask,klane/homebrew-cask,chadcatlett/caskroom-homebrew-cask,dictcp/homebrew-cask,gabrielizaias/homebrew-cask,onlynone/homebrew-cask,jbeagley52/homebrew-cask,moogar0880/homebrew-cask,gilesdring/homebrew-cask,andyli/homebrew-cask,toonetown/homebrew-cask,JikkuJose/homebrew-cask,jasmas/homebrew-cask,esebastian/homebrew-cask,nrlquaker/homebrew-cask,neverfox/homebrew-cask,schneidmaster/homebrew-cask,puffdad/homebrew-cask,mjdescy/homebrew-cask,nathanielvarona/homebrew-cask,mazehall/homebrew-cask,jconley/homebrew-cask,xakraz/homebrew-cask,markhuber/homebrew-cask,giannitm/homebrew-cask,colindunn/homebrew-cask,jedahan/homebrew-cask,wmorin/homebrew-cask,sscotth/homebrew-cask,syscrusher/homebrew-cask,chrisfinazzo/homebrew-cask,MoOx/homebrew-cask,scottsuch/homebrew-cask,jellyfishcoder/homebrew-cask,tyage/homebrew-cask,patresi/homebrew-cask,daften/homebrew-cask,mahori/homebrew-cask,stigkj/homebrew-caskroom-cask,imgarylai/homebrew-cask,Bombenleger/homebrew-cask,muan/homebrew-cask,retrography/homebrew-cask,cfillion/homebrew-cask,klane/homebrew-cask,athrunsun/homebrew-cask,hakamadare/homebrew-cask,robertgzr/homebrew-cask,chuanxd/homebrew-cask,skatsuta/homebrew-cask,wastrachan/homebrew-cask,blainesch/homebrew-cask,alexg0/homebrew-cask,muan/homebrew-cask,bosr/homebrew-cask,onlynone/homebrew-cask,lukasbestle/homebrew-cask,jaredsampson/homebrew-cask,bric3/homebrew-cask,blainesch/homebrew-cask,mchlrmrz/homebrew-cask,samdoran/homebrew-cask,ebraminio/homebrew-cask,rogeriopradoj/homebrew-cask,thomanq/homebrew-cask,vigosan/homebrew-cask,sohtsuka/homebrew-cask,ninjahoahong/homebrew-cask,nathanielvarona/homebrew-cask,dcondrey/homebrew-cask,timsutton/homebrew-cask,antogg/homebrew-cask,MircoT/homebrew-cask,danielbayley/homebrew-cask,adrianchia/homebrew-cask,wmorin/homebrew-cask,Amorymeltzer/homebrew-cask,cprecioso/homebrew-cask,mchlrmrz/homebrew-cask,jaredsampson/homebrew-cask,xyb/homebrew-cask,joshka/homebrew-cask,bdhess/homebrew-cask,malob/homebrew-cask,pacav69/homebrew-cask,victorpopkov/homebrew-cask,riyad/homebrew-cask,chrisfinazzo/homebrew-cask,alexg0/homebrew-cask,moimikey/homebrew-cask,Ngrd/homebrew-cask,tangestani/homebrew-cask,michelegera/homebrew-cask,ninjahoahong/homebrew-cask,yurikoles/homebrew-cask,uetchy/homebrew-cask,danielbayley/homebrew-cask,stonehippo/homebrew-cask,uetchy/homebrew-cask,tsparber/homebrew-cask,zmwangx/homebrew-cask,optikfluffel/homebrew-cask,skatsuta/homebrew-cask,markthetech/homebrew-cask,deiga/homebrew-cask,mikem/homebrew-cask,asbachb/homebrew-cask,jbeagley52/homebrew-cask,deanmorin/homebrew-cask,vitorgalvao/homebrew-cask,aguynamedryan/homebrew-cask,tjt263/homebrew-cask,wickedsp1d3r/homebrew-cask,Ephemera/homebrew-cask,bric3/homebrew-cask,fharbe/homebrew-cask,BenjaminHCCarr/homebrew-cask,cblecker/homebrew-cask,reitermarkus/homebrew-cask,guerrero/homebrew-cask,kpearson/homebrew-cask,usami-k/homebrew-cask,scottsuch/homebrew-cask,diguage/homebrew-cask,robertgzr/homebrew-cask,yuhki50/homebrew-cask,lukeadams/homebrew-cask,mjgardner/homebrew-cask,claui/homebrew-cask,yurikoles/homebrew-cask,ksylvan/homebrew-cask,malford/homebrew-cask,RJHsiao/homebrew-cask,Labutin/homebrew-cask,FranklinChen/homebrew-cask,shonjir/homebrew-cask,antogg/homebrew-cask,otaran/homebrew-cask,franklouwers/homebrew-cask,JikkuJose/homebrew-cask,puffdad/homebrew-cask,bosr/homebrew-cask,gerrypower/homebrew-cask,shonjir/homebrew-cask,jacobbednarz/homebrew-cask,mrmachine/homebrew-cask,troyxmccall/homebrew-cask,kingthorin/homebrew-cask,chrisfinazzo/homebrew-cask,codeurge/homebrew-cask,mauricerkelly/homebrew-cask,vigosan/homebrew-cask,jasmas/homebrew-cask,asins/homebrew-cask,Cottser/homebrew-cask,bric3/homebrew-cask,riyad/homebrew-cask,vin047/homebrew-cask,johndbritton/homebrew-cask,tjnycum/homebrew-cask,kronicd/homebrew-cask,yutarody/homebrew-cask,mwean/homebrew-cask,jalaziz/homebrew-cask,sosedoff/homebrew-cask,afh/homebrew-cask,jgarber623/homebrew-cask,athrunsun/homebrew-cask,winkelsdorf/homebrew-cask,dvdoliveira/homebrew-cask,cblecker/homebrew-cask,Ngrd/homebrew-cask,moimikey/homebrew-cask,tsparber/homebrew-cask,phpwutz/homebrew-cask,m3nu/homebrew-cask,nrlquaker/homebrew-cask,colindunn/homebrew-cask,xight/homebrew-cask,AnastasiaSulyagina/homebrew-cask,y00rb/homebrew-cask,stonehippo/homebrew-cask,jeroenj/homebrew-cask,JacopKane/homebrew-cask,xight/homebrew-cask,seanzxx/homebrew-cask,patresi/homebrew-cask,farmerchris/homebrew-cask,gmkey/homebrew-cask,dvdoliveira/homebrew-cask,jalaziz/homebrew-cask,cobyism/homebrew-cask,ianyh/homebrew-cask,rajiv/homebrew-cask,ianyh/homebrew-cask,lucasmezencio/homebrew-cask,diguage/homebrew-cask,doits/homebrew-cask,JacopKane/homebrew-cask,xtian/homebrew-cask,Ketouem/homebrew-cask,jeanregisser/homebrew-cask,jpmat296/homebrew-cask,singingwolfboy/homebrew-cask,scottsuch/homebrew-cask,0xadada/homebrew-cask,mlocher/homebrew-cask,andrewdisley/homebrew-cask,optikfluffel/homebrew-cask,morganestes/homebrew-cask,slack4u/homebrew-cask,xcezx/homebrew-cask,kamilboratynski/homebrew-cask,neverfox/homebrew-cask,pkq/homebrew-cask,hyuna917/homebrew-cask,shonjir/homebrew-cask,mattrobenolt/homebrew-cask,n0ts/homebrew-cask,psibre/homebrew-cask,gmkey/homebrew-cask,samshadwell/homebrew-cask,hanxue/caskroom,deanmorin/homebrew-cask,mahori/homebrew-cask,hellosky806/homebrew-cask,antogg/homebrew-cask,jgarber623/homebrew-cask,mjdescy/homebrew-cask,alebcay/homebrew-cask,sanchezm/homebrew-cask,doits/homebrew-cask,dcondrey/homebrew-cask,zmwangx/homebrew-cask,MichaelPei/homebrew-cask,sebcode/homebrew-cask,renaudguerin/homebrew-cask,mathbunnyru/homebrew-cask,zerrot/homebrew-cask,FredLackeyOfficial/homebrew-cask,maxnordlund/homebrew-cask,sebcode/homebrew-cask,artdevjs/homebrew-cask,JacopKane/homebrew-cask,kongslund/homebrew-cask,gyndav/homebrew-cask,larseggert/homebrew-cask,y00rb/homebrew-cask,inz/homebrew-cask,0xadada/homebrew-cask,markhuber/homebrew-cask,yurikoles/homebrew-cask,rogeriopradoj/homebrew-cask,gabrielizaias/homebrew-cask,nathancahill/homebrew-cask,kongslund/homebrew-cask,arronmabrey/homebrew-cask,caskroom/homebrew-cask,mishari/homebrew-cask,feigaochn/homebrew-cask,ptb/homebrew-cask,thehunmonkgroup/homebrew-cask,mathbunnyru/homebrew-cask,a1russell/homebrew-cask,joschi/homebrew-cask,kingthorin/homebrew-cask,jalaziz/homebrew-cask,tolbkni/homebrew-cask,wickedsp1d3r/homebrew-cask,leipert/homebrew-cask,jpmat296/homebrew-cask,paour/homebrew-cask,tedski/homebrew-cask,joschi/homebrew-cask,mazehall/homebrew-cask,nshemonsky/homebrew-cask,tangestani/homebrew-cask,stephenwade/homebrew-cask,adrianchia/homebrew-cask,blogabe/homebrew-cask,MoOx/homebrew-cask,optikfluffel/homebrew-cask,lumaxis/homebrew-cask,nathanielvarona/homebrew-cask,gilesdring/homebrew-cask,johnjelinek/homebrew-cask,theoriginalgri/homebrew-cask,chuanxd/homebrew-cask,alexg0/homebrew-cask,paour/homebrew-cask,michelegera/homebrew-cask,goxberry/homebrew-cask,mjgardner/homebrew-cask,toonetown/homebrew-cask,okket/homebrew-cask,mathbunnyru/homebrew-cask,fanquake/homebrew-cask,esebastian/homebrew-cask,uetchy/homebrew-cask,lumaxis/homebrew-cask,wmorin/homebrew-cask,Bombenleger/homebrew-cask,Gasol/homebrew-cask,SentinelWarren/homebrew-cask,imgarylai/homebrew-cask,BenjaminHCCarr/homebrew-cask,kesara/homebrew-cask,devmynd/homebrew-cask,13k/homebrew-cask,casidiablo/homebrew-cask,samnung/homebrew-cask,bcomnes/homebrew-cask,xight/homebrew-cask,sanyer/homebrew-cask,jangalinski/homebrew-cask,casidiablo/homebrew-cask,lifepillar/homebrew-cask,sanchezm/homebrew-cask,larseggert/homebrew-cask,alebcay/homebrew-cask,tolbkni/homebrew-cask,danielbayley/homebrew-cask,tan9/homebrew-cask,ksylvan/homebrew-cask,singingwolfboy/homebrew-cask,alebcay/homebrew-cask,wKovacs64/homebrew-cask,tedski/homebrew-cask,My2ndAngelic/homebrew-cask,deiga/homebrew-cask,sanyer/homebrew-cask,Keloran/homebrew-cask,moogar0880/homebrew-cask,psibre/homebrew-cask,jawshooah/homebrew-cask,mlocher/homebrew-cask,giannitm/homebrew-cask,thii/homebrew-cask,anbotero/homebrew-cask,Ephemera/homebrew-cask,kpearson/homebrew-cask,xakraz/homebrew-cask,a1russell/homebrew-cask,hanxue/caskroom,mhubig/homebrew-cask,inta/homebrew-cask,diogodamiani/homebrew-cask,samshadwell/homebrew-cask,a1russell/homebrew-cask,m3nu/homebrew-cask,gyndav/homebrew-cask,thomanq/homebrew-cask,retrography/homebrew-cask,pkq/homebrew-cask,stephenwade/homebrew-cask,julionc/homebrew-cask,lukasbestle/homebrew-cask,malford/homebrew-cask,cobyism/homebrew-cask,vin047/homebrew-cask,josa42/homebrew-cask,reelsense/homebrew-cask,guerrero/homebrew-cask,reitermarkus/homebrew-cask,MichaelPei/homebrew-cask,seanzxx/homebrew-cask,bdhess/homebrew-cask,jangalinski/homebrew-cask,perfide/homebrew-cask,jmeridth/homebrew-cask,lcasey001/homebrew-cask,elnappo/homebrew-cask,kronicd/homebrew-cask,nshemonsky/homebrew-cask,coeligena/homebrew-customized,ericbn/homebrew-cask,johnjelinek/homebrew-cask,lifepillar/homebrew-cask,mahori/homebrew-cask,kteru/homebrew-cask,n8henrie/homebrew-cask,mwean/homebrew-cask,ywfwj2008/homebrew-cask,FinalDes/homebrew-cask,renard/homebrew-cask,nrlquaker/homebrew-cask,goxberry/homebrew-cask,timsutton/homebrew-cask,ksato9700/homebrew-cask,mrmachine/homebrew-cask,scribblemaniac/homebrew-cask,joshka/homebrew-cask,miccal/homebrew-cask,haha1903/homebrew-cask,squid314/homebrew-cask,6uclz1/homebrew-cask,shorshe/homebrew-cask,AnastasiaSulyagina/homebrew-cask,ptb/homebrew-cask,elyscape/homebrew-cask,feigaochn/homebrew-cask,wastrachan/homebrew-cask,coeligena/homebrew-customized,otaran/homebrew-cask,koenrh/homebrew-cask,anbotero/homebrew-cask,esebastian/homebrew-cask,kkdd/homebrew-cask,ericbn/homebrew-cask,thii/homebrew-cask,kTitan/homebrew-cask,wickles/homebrew-cask,JosephViolago/homebrew-cask,malob/homebrew-cask,jeanregisser/homebrew-cask,blogabe/homebrew-cask,opsdev-ws/homebrew-cask,codeurge/homebrew-cask,mikem/homebrew-cask,kingthorin/homebrew-cask,singingwolfboy/homebrew-cask,SentinelWarren/homebrew-cask,pkq/homebrew-cask,kassi/homebrew-cask,afh/homebrew-cask,linc01n/homebrew-cask,maxnordlund/homebrew-cask,nathancahill/homebrew-cask,MerelyAPseudonym/homebrew-cask,neverfox/homebrew-cask,hanxue/caskroom,sosedoff/homebrew-cask,rajiv/homebrew-cask,greg5green/homebrew-cask,tyage/homebrew-cask,thehunmonkgroup/homebrew-cask,RJHsiao/homebrew-cask,johndbritton/homebrew-cask,scribblemaniac/homebrew-cask,miguelfrde/homebrew-cask,vitorgalvao/homebrew-cask,elyscape/homebrew-cask,tjt263/homebrew-cask,theoriginalgri/homebrew-cask,lantrix/homebrew-cask,janlugt/homebrew-cask,mauricerkelly/homebrew-cask,asbachb/homebrew-cask,ericbn/homebrew-cask,aguynamedryan/homebrew-cask,jiashuw/homebrew-cask,jeroenj/homebrew-cask,amatos/homebrew-cask,Cottser/homebrew-cask,dictcp/homebrew-cask,colindean/homebrew-cask,timsutton/homebrew-cask,seanorama/homebrew-cask,n0ts/homebrew-cask,inta/homebrew-cask,shoichiaizawa/homebrew-cask
ruby
## Code Before: cask 'diskmaker-x' do version :latest sha256 :no_check url 'http://diskmakerx.com/downloads/DiskMaker_X.dmg' name 'DiskMaker X' homepage 'http://diskmakerx.com/' license :gratis app 'DiskMaker X 5.app' end ## Instruction: Update Diskmaker X to v5.0.3 Turns Diskmaker X back into a versioned cask. The author of Diskmaker reached out to us and has re-uploaded the versioned downloads for us to use. Thanks @diskmakerx! For more information about this commit please check the discussion related to the versioning of Diskmaker in this pull request: https://github.com/caskroom/homebrew-cask/pull/17519 ## Code After: cask 'diskmaker-x' do version '5.0.3' sha256 '040a21bdef0c2682c518a9e9572f7547b5f1fb02b8930a8a084ae85b12e70518' url "http://diskmakerx.com/downloads/DiskMaker_X_#{version.no_dots}.dmg" appcast 'http://diskmakerx.com/feed/', checkpoint: '65c41b1c32cf72f4cccd0f467d903ed768dedc407936bf1a64ec90764deb7da1' name 'DiskMaker X' homepage 'http://diskmakerx.com/' license :gratis app "DiskMaker X #{version.major}.app" end
cask 'diskmaker-x' do - version :latest - sha256 :no_check + version '5.0.3' + sha256 '040a21bdef0c2682c518a9e9572f7547b5f1fb02b8930a8a084ae85b12e70518' - url 'http://diskmakerx.com/downloads/DiskMaker_X.dmg' ? ^ ^ + url "http://diskmakerx.com/downloads/DiskMaker_X_#{version.no_dots}.dmg" ? ^ +++++++++++++++++++ ^ + appcast 'http://diskmakerx.com/feed/', + checkpoint: '65c41b1c32cf72f4cccd0f467d903ed768dedc407936bf1a64ec90764deb7da1' name 'DiskMaker X' homepage 'http://diskmakerx.com/' license :gratis - app 'DiskMaker X 5.app' + app "DiskMaker X #{version.major}.app" end
10
0.909091
6
4
8f9c6f062ee9e0046cc799014b74a64102b73bfc
src/enfa_graph.cpp
src/enfa_graph.cpp
namespace tinygrep { namespace enfa { std::string EpsilonNFA::to_graph() const { return ""; } } // namespace enfa } // namespace tinygrep
namespace tinygrep { namespace enfa { // The default scale of a generated graph. const unsigned int DEFAULT_PNG_SIZE = 10; const std::string LABEL_BEGIN = " [label=\"", LABEL_END = "\"]", EDGE_ARROW = " -> ", STATE_PREFIX = "q", ENDLINE = ";\n"; std::string EpsilonNFA::to_graph() const { const unsigned int png_size = DEFAULT_PNG_SIZE; std::stringstream output; output << "digraph epsilon_nfa {\n" << "rankdir=LR; size=\"" << png_size << "," << png_size << "\"" << ENDLINE; // add start state output << "foo [style = invis]" << ENDLINE; output << "node [shape = circle]; " << STATE_PREFIX << start_state_ << ENDLINE; output << "foo" << EDGE_ARROW << STATE_PREFIX << start_state_ << LABEL_BEGIN << "start" << LABEL_END << ENDLINE; // add accepting state output << "node [shape = doublecircle]; " << STATE_PREFIX << accept_state_ << ENDLINE; // add remaining states output << "node [shape = circle]" << ENDLINE; // add transitions for (state_type from = 0; from < state_count_; from++) { // epsilon-transitions for (state_type to : epsilon_transitions_[from]) { output << STATE_PREFIX << from << EDGE_ARROW << STATE_PREFIX << to << LABEL_BEGIN << LABEL_END << ENDLINE; } // literal-transitions for (Transition transition : literal_transitions_[from]) { output << STATE_PREFIX << from << EDGE_ARROW << STATE_PREFIX << transition.target << LABEL_BEGIN << transition.literal << LABEL_END << ENDLINE; } } output << "}\n"; return output.str(); } } // namespace enfa } // namespace tinygrep
Complete function for parsing epsilon-NFA -> .gv file.
Complete function for parsing epsilon-NFA -> .gv file.
C++
mit
grawies/tiny-grep,samuelz/tiny-grep
c++
## Code Before: namespace tinygrep { namespace enfa { std::string EpsilonNFA::to_graph() const { return ""; } } // namespace enfa } // namespace tinygrep ## Instruction: Complete function for parsing epsilon-NFA -> .gv file. ## Code After: namespace tinygrep { namespace enfa { // The default scale of a generated graph. const unsigned int DEFAULT_PNG_SIZE = 10; const std::string LABEL_BEGIN = " [label=\"", LABEL_END = "\"]", EDGE_ARROW = " -> ", STATE_PREFIX = "q", ENDLINE = ";\n"; std::string EpsilonNFA::to_graph() const { const unsigned int png_size = DEFAULT_PNG_SIZE; std::stringstream output; output << "digraph epsilon_nfa {\n" << "rankdir=LR; size=\"" << png_size << "," << png_size << "\"" << ENDLINE; // add start state output << "foo [style = invis]" << ENDLINE; output << "node [shape = circle]; " << STATE_PREFIX << start_state_ << ENDLINE; output << "foo" << EDGE_ARROW << STATE_PREFIX << start_state_ << LABEL_BEGIN << "start" << LABEL_END << ENDLINE; // add accepting state output << "node [shape = doublecircle]; " << STATE_PREFIX << accept_state_ << ENDLINE; // add remaining states output << "node [shape = circle]" << ENDLINE; // add transitions for (state_type from = 0; from < state_count_; from++) { // epsilon-transitions for (state_type to : epsilon_transitions_[from]) { output << STATE_PREFIX << from << EDGE_ARROW << STATE_PREFIX << to << LABEL_BEGIN << LABEL_END << ENDLINE; } // literal-transitions for (Transition transition : literal_transitions_[from]) { output << STATE_PREFIX << from << EDGE_ARROW << STATE_PREFIX << transition.target << LABEL_BEGIN << transition.literal << LABEL_END << ENDLINE; } } output << "}\n"; return output.str(); } } // namespace enfa } // namespace tinygrep
namespace tinygrep { namespace enfa { + // The default scale of a generated graph. + const unsigned int DEFAULT_PNG_SIZE = 10; + const std::string LABEL_BEGIN = " [label=\"", + LABEL_END = "\"]", + EDGE_ARROW = " -> ", + STATE_PREFIX = "q", + ENDLINE = ";\n"; + std::string EpsilonNFA::to_graph() const { - return ""; + const unsigned int png_size = DEFAULT_PNG_SIZE; + std::stringstream output; + output << "digraph epsilon_nfa {\n" + << "rankdir=LR; size=\"" + << png_size << "," << png_size << "\"" + << ENDLINE; + // add start state + output << "foo [style = invis]" + << ENDLINE; + output << "node [shape = circle]; " + << STATE_PREFIX << start_state_ + << ENDLINE; + output << "foo" << EDGE_ARROW + << STATE_PREFIX << start_state_ + << LABEL_BEGIN << "start" << LABEL_END + << ENDLINE; + // add accepting state + output << "node [shape = doublecircle]; " + << STATE_PREFIX << accept_state_ + << ENDLINE; + // add remaining states + output << "node [shape = circle]" + << ENDLINE; + // add transitions + for (state_type from = 0; from < state_count_; from++) { + // epsilon-transitions + for (state_type to : epsilon_transitions_[from]) { + output << STATE_PREFIX << from + << EDGE_ARROW + << STATE_PREFIX << to + << LABEL_BEGIN << LABEL_END + << ENDLINE; + } + // literal-transitions + for (Transition transition : literal_transitions_[from]) { + output << STATE_PREFIX << from + << EDGE_ARROW + << STATE_PREFIX << transition.target + << LABEL_BEGIN << transition.literal << LABEL_END + << ENDLINE; + } + } + output << "}\n"; + return output.str(); } } // namespace enfa } // namespace tinygrep
53
4.416667
52
1
2b930f547ffcc34eda7125b2053a336c2f51cf77
pkg/compiler_unsupported/pubspec.yaml
pkg/compiler_unsupported/pubspec.yaml
name: compiler_unsupported version: 0.7.1 author: Dart2js Team <compiler-dev@dartlang.org> homepage: http://www.dartlang.org description: > This is an unsupported copy of the dart2js source. The API of this package can and will change in unpredictable and incompatible ways. environment: sdk: ">=1.0.0 <2.0.0"
name: compiler_unsupported version: 0.7.2 author: Dart2js Team <compiler-dev@dartlang.org> homepage: http://www.dartlang.org description: > This is an unsupported copy of the dart2js source. The API of this package can and will change in unpredictable and incompatible ways. This release tracks the 1.6.0-dev.1.2 dart2js version. environment: sdk: ">=1.0.0 <2.0.0"
Upgrade the compiler_unsupported package to be based off the 1.6.0-dev.1.2 release; publish the package.
Upgrade the compiler_unsupported package to be based off the 1.6.0-dev.1.2 release; publish the package. R=scheglov@google.com Review URL: https://codereview.chromium.org//376063002 git-svn-id: c93d8a2297af3b929165606efe145742a534bc71@38085 260f80e4-7a28-3924-810f-c04153c831b5
YAML
bsd-3-clause
dart-archive/dart-sdk,dart-lang/sdk,dart-lang/sdk,dartino/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-archive/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dart-lang/sdk
yaml
## Code Before: name: compiler_unsupported version: 0.7.1 author: Dart2js Team <compiler-dev@dartlang.org> homepage: http://www.dartlang.org description: > This is an unsupported copy of the dart2js source. The API of this package can and will change in unpredictable and incompatible ways. environment: sdk: ">=1.0.0 <2.0.0" ## Instruction: Upgrade the compiler_unsupported package to be based off the 1.6.0-dev.1.2 release; publish the package. R=scheglov@google.com Review URL: https://codereview.chromium.org//376063002 git-svn-id: c93d8a2297af3b929165606efe145742a534bc71@38085 260f80e4-7a28-3924-810f-c04153c831b5 ## Code After: name: compiler_unsupported version: 0.7.2 author: Dart2js Team <compiler-dev@dartlang.org> homepage: http://www.dartlang.org description: > This is an unsupported copy of the dart2js source. The API of this package can and will change in unpredictable and incompatible ways. This release tracks the 1.6.0-dev.1.2 dart2js version. environment: sdk: ">=1.0.0 <2.0.0"
name: compiler_unsupported - version: 0.7.1 ? ^ + version: 0.7.2 ? ^ author: Dart2js Team <compiler-dev@dartlang.org> homepage: http://www.dartlang.org description: > This is an unsupported copy of the dart2js source. The API of this package - can and will change in unpredictable and incompatible ways. + can and will change in unpredictable and incompatible ways. This release ? +++++++++++++ + tracks the 1.6.0-dev.1.2 dart2js version. environment: sdk: ">=1.0.0 <2.0.0"
5
0.555556
3
2
d9d1a7042c015570f7f00ab79c8361cd62c0e9c4
regexp_parser.gemspec
regexp_parser.gemspec
$:.unshift File.join(File.dirname(__FILE__), 'lib') require 'regexp_parser/version' Gem::Specification.new do |gem| gem.name = 'regexp_parser' gem.version = ::Regexp::Parser::VERSION gem.summary = "Scanner, lexer, parser for ruby's regular expressions" gem.description = 'A library for tokenizing, lexing, and parsing Ruby regular expressions.' gem.homepage = 'https://github.com/ammar/regexp_parser' if gem.respond_to?(:metadata) gem.metadata = { 'issue_tracker' => 'https://github.com/ammar/regexp_parser/issues' } end gem.authors = ['Ammar Ali'] gem.email = ['ammarabuali@gmail.com'] gem.license = 'MIT' gem.require_paths = ['lib'] gem.files = Dir.glob('{lib,spec}/**/*.rb') + Dir.glob('lib/**/*.rl') + Dir.glob('lib/**/*.yml') + %w(Gemfile Rakefile LICENSE README.md CHANGELOG.md regexp_parser.gemspec) gem.test_files = Dir.glob('spec/**/*.rb') gem.rdoc_options = ["--inline-source", "--charset=UTF-8"] gem.platform = Gem::Platform::RUBY gem.required_ruby_version = '>= 2.0.0' end
$:.unshift File.join(File.dirname(__FILE__), 'lib') require 'regexp_parser/version' Gem::Specification.new do |gem| gem.name = 'regexp_parser' gem.version = ::Regexp::Parser::VERSION gem.summary = "Scanner, lexer, parser for ruby's regular expressions" gem.description = 'A library for tokenizing, lexing, and parsing Ruby regular expressions.' gem.homepage = 'https://github.com/ammar/regexp_parser' if gem.respond_to?(:metadata) gem.metadata = { 'issue_tracker' => 'https://github.com/ammar/regexp_parser/issues' } end gem.authors = ['Ammar Ali'] gem.email = ['ammarabuali@gmail.com'] gem.license = 'MIT' gem.require_paths = ['lib'] gem.files = Dir.glob('{lib,spec}/**/*.rb') + Dir.glob('lib/**/*.rl') + Dir.glob('lib/**/*.yml') + %w(Gemfile Rakefile LICENSE README.md CHANGELOG.md regexp_parser.gemspec) gem.rdoc_options = ["--inline-source", "--charset=UTF-8"] gem.platform = Gem::Platform::RUBY gem.required_ruby_version = '>= 2.0.0' end
Remove deprecated `test_files` from gemspec
Remove deprecated `test_files` from gemspec
Ruby
mit
ammar/regexp_parser,ammar/regexp_parser
ruby
## Code Before: $:.unshift File.join(File.dirname(__FILE__), 'lib') require 'regexp_parser/version' Gem::Specification.new do |gem| gem.name = 'regexp_parser' gem.version = ::Regexp::Parser::VERSION gem.summary = "Scanner, lexer, parser for ruby's regular expressions" gem.description = 'A library for tokenizing, lexing, and parsing Ruby regular expressions.' gem.homepage = 'https://github.com/ammar/regexp_parser' if gem.respond_to?(:metadata) gem.metadata = { 'issue_tracker' => 'https://github.com/ammar/regexp_parser/issues' } end gem.authors = ['Ammar Ali'] gem.email = ['ammarabuali@gmail.com'] gem.license = 'MIT' gem.require_paths = ['lib'] gem.files = Dir.glob('{lib,spec}/**/*.rb') + Dir.glob('lib/**/*.rl') + Dir.glob('lib/**/*.yml') + %w(Gemfile Rakefile LICENSE README.md CHANGELOG.md regexp_parser.gemspec) gem.test_files = Dir.glob('spec/**/*.rb') gem.rdoc_options = ["--inline-source", "--charset=UTF-8"] gem.platform = Gem::Platform::RUBY gem.required_ruby_version = '>= 2.0.0' end ## Instruction: Remove deprecated `test_files` from gemspec ## Code After: $:.unshift File.join(File.dirname(__FILE__), 'lib') require 'regexp_parser/version' Gem::Specification.new do |gem| gem.name = 'regexp_parser' gem.version = ::Regexp::Parser::VERSION gem.summary = "Scanner, lexer, parser for ruby's regular expressions" gem.description = 'A library for tokenizing, lexing, and parsing Ruby regular expressions.' gem.homepage = 'https://github.com/ammar/regexp_parser' if gem.respond_to?(:metadata) gem.metadata = { 'issue_tracker' => 'https://github.com/ammar/regexp_parser/issues' } end gem.authors = ['Ammar Ali'] gem.email = ['ammarabuali@gmail.com'] gem.license = 'MIT' gem.require_paths = ['lib'] gem.files = Dir.glob('{lib,spec}/**/*.rb') + Dir.glob('lib/**/*.rl') + Dir.glob('lib/**/*.yml') + %w(Gemfile Rakefile LICENSE README.md CHANGELOG.md regexp_parser.gemspec) gem.rdoc_options = ["--inline-source", "--charset=UTF-8"] gem.platform = Gem::Platform::RUBY gem.required_ruby_version = '>= 2.0.0' end
$:.unshift File.join(File.dirname(__FILE__), 'lib') require 'regexp_parser/version' Gem::Specification.new do |gem| gem.name = 'regexp_parser' gem.version = ::Regexp::Parser::VERSION gem.summary = "Scanner, lexer, parser for ruby's regular expressions" gem.description = 'A library for tokenizing, lexing, and parsing Ruby regular expressions.' gem.homepage = 'https://github.com/ammar/regexp_parser' if gem.respond_to?(:metadata) gem.metadata = { 'issue_tracker' => 'https://github.com/ammar/regexp_parser/issues' } end gem.authors = ['Ammar Ali'] gem.email = ['ammarabuali@gmail.com'] gem.license = 'MIT' gem.require_paths = ['lib'] gem.files = Dir.glob('{lib,spec}/**/*.rb') + Dir.glob('lib/**/*.rl') + Dir.glob('lib/**/*.yml') + %w(Gemfile Rakefile LICENSE README.md CHANGELOG.md regexp_parser.gemspec) - gem.test_files = Dir.glob('spec/**/*.rb') - gem.rdoc_options = ["--inline-source", "--charset=UTF-8"] gem.platform = Gem::Platform::RUBY gem.required_ruby_version = '>= 2.0.0' end
2
0.055556
0
2
a829a44606a1daf593ff190248a1f8723b4db150
src/ghighlighter/models/highlights.go
src/ghighlighter/models/highlights.go
package models import ( "path" "io/ioutil" "os" "encoding/json" "ghighlighter/utils" ) type GhHighlights struct { items []GhHighlight } func (m *GhHighlights) GetAll() []GhHighlight { m.Read() return m.items } func highlightsFilePath() string { return path.Join(utils.DataDir(), "highlights.json") } func (m *GhHighlights) Read() { data, error := ioutil.ReadFile(highlightsFilePath()) if error != nil && !os.IsExist(error) { m.Write() m.Read() } var tmpItems []GhHighlight json.Unmarshal(data, &tmpItems) m.items = make([]GhHighlight, len(tmpItems)) for _, highlight := range tmpItems { m.items = append(m.items, highlight) } } func (m *GhHighlights) Write() { if m.items == nil { m.items = make([]GhHighlight, 0) } data, error := json.Marshal(m.items) if error != nil { return } error = ioutil.WriteFile(highlightsFilePath(), data, 0755) } func Highlights() *GhHighlights { highlights := &GhHighlights{} highlights.Read() return highlights }
package models import ( "path" "io/ioutil" "os" "encoding/json" "ghighlighter/utils" ) type GhHighlights struct { Items []GhHighlight } func highlightsFilePath() string { return path.Join(utils.DataDir(), "highlights.json") } func (m *GhHighlights) Read() { data, error := ioutil.ReadFile(highlightsFilePath()) if error != nil && !os.IsExist(error) { m.Write() m.Read() } var tmpItems []GhHighlight json.Unmarshal(data, &tmpItems) for _, highlight := range tmpItems { m.Items = append(m.Items, highlight) } } func (m *GhHighlights) Write() { if m.Items == nil { m.Items = make([]GhHighlight, 0) } data, error := json.Marshal(m.Items) if error != nil { return } error = ioutil.WriteFile(highlightsFilePath(), data, 0755) } func Highlights() *GhHighlights { highlights := &GhHighlights{} highlights.Read() return highlights }
Remove Highlights.GetAll and make Items public
Remove Highlights.GetAll and make Items public
Go
mit
chdorner/ghighlighter
go
## Code Before: package models import ( "path" "io/ioutil" "os" "encoding/json" "ghighlighter/utils" ) type GhHighlights struct { items []GhHighlight } func (m *GhHighlights) GetAll() []GhHighlight { m.Read() return m.items } func highlightsFilePath() string { return path.Join(utils.DataDir(), "highlights.json") } func (m *GhHighlights) Read() { data, error := ioutil.ReadFile(highlightsFilePath()) if error != nil && !os.IsExist(error) { m.Write() m.Read() } var tmpItems []GhHighlight json.Unmarshal(data, &tmpItems) m.items = make([]GhHighlight, len(tmpItems)) for _, highlight := range tmpItems { m.items = append(m.items, highlight) } } func (m *GhHighlights) Write() { if m.items == nil { m.items = make([]GhHighlight, 0) } data, error := json.Marshal(m.items) if error != nil { return } error = ioutil.WriteFile(highlightsFilePath(), data, 0755) } func Highlights() *GhHighlights { highlights := &GhHighlights{} highlights.Read() return highlights } ## Instruction: Remove Highlights.GetAll and make Items public ## Code After: package models import ( "path" "io/ioutil" "os" "encoding/json" "ghighlighter/utils" ) type GhHighlights struct { Items []GhHighlight } func highlightsFilePath() string { return path.Join(utils.DataDir(), "highlights.json") } func (m *GhHighlights) Read() { data, error := ioutil.ReadFile(highlightsFilePath()) if error != nil && !os.IsExist(error) { m.Write() m.Read() } var tmpItems []GhHighlight json.Unmarshal(data, &tmpItems) for _, highlight := range tmpItems { m.Items = append(m.Items, highlight) } } func (m *GhHighlights) Write() { if m.Items == nil { m.Items = make([]GhHighlight, 0) } data, error := json.Marshal(m.Items) if error != nil { return } error = ioutil.WriteFile(highlightsFilePath(), data, 0755) } func Highlights() *GhHighlights { highlights := &GhHighlights{} highlights.Read() return highlights }
package models import ( "path" "io/ioutil" "os" "encoding/json" "ghighlighter/utils" ) type GhHighlights struct { - items []GhHighlight ? ^ + Items []GhHighlight ? ^ - } - - func (m *GhHighlights) GetAll() []GhHighlight { - m.Read() - return m.items } func highlightsFilePath() string { return path.Join(utils.DataDir(), "highlights.json") } func (m *GhHighlights) Read() { data, error := ioutil.ReadFile(highlightsFilePath()) if error != nil && !os.IsExist(error) { m.Write() m.Read() } var tmpItems []GhHighlight json.Unmarshal(data, &tmpItems) - m.items = make([]GhHighlight, len(tmpItems)) for _, highlight := range tmpItems { - m.items = append(m.items, highlight) ? ^ ^ + m.Items = append(m.Items, highlight) ? ^ ^ } } func (m *GhHighlights) Write() { - if m.items == nil { ? ^ + if m.Items == nil { ? ^ - m.items = make([]GhHighlight, 0) ? ^ + m.Items = make([]GhHighlight, 0) ? ^ } - data, error := json.Marshal(m.items) ? ^ + data, error := json.Marshal(m.Items) ? ^ if error != nil { return } error = ioutil.WriteFile(highlightsFilePath(), data, 0755) } func Highlights() *GhHighlights { highlights := &GhHighlights{} highlights.Read() return highlights }
16
0.285714
5
11
961966c88180269f694c0919dc6996453efda206
app/controllers/application_controller.rb
app/controllers/application_controller.rb
class ApplicationController < ActionController::Base include GDS::SSO::ControllerMethods protect_from_forgery before_filter :authenticate_user! before_filter :require_signin_permission! before_filter :set_current_user_in_thread # the user_signed_in? if here is needed becaue otherwise we require an admin user # on the OmniAuth callback controller action, which is exceeding lethal before_filter :ensure_user_is_admin!, :except => [:show, :create, :index, :new], :if => :user_signed_in? skip_before_filter :ensure_user_is_admin!, :if => lambda { |c| c.controller_name == "authentications" } include NestedFormHelper def ensure_user_is_admin! unless current_user.is_admin? render :text => "You must be a need-o-tron admin to use this application", :status => :forbidden return false end end protected def set_current_user_in_thread if user_signed_in? Thread.current[:current_user] = current_user params[:_signed_in_user] = current_user.name end end end
class ApplicationController < ActionController::Base include GDS::SSO::ControllerMethods protect_from_forgery before_filter :authenticate_user! before_filter :require_signin_permission! before_filter :set_current_user_in_thread # the user_signed_in? if here is needed becaue otherwise we require an admin user # on the OmniAuth callback controller action, which is exceeding lethal before_filter :ensure_user_is_admin!, :except => [:show, :create, :index, :new], :if => :user_signed_in? skip_before_filter :ensure_user_is_admin!, :if => lambda { |c| c.controller_name == "authentications" } include NestedFormHelper def ensure_user_is_admin! unless current_user.is_admin? render :text => "You must be a need-o-tron admin to do admin things in this application", :status => :forbidden return false end end protected def set_current_user_in_thread if user_signed_in? Thread.current[:current_user] = current_user params[:_signed_in_user] = current_user.name end end end
Tweak "you must be an admin" message
Tweak "you must be an admin" message
Ruby
mit
gds-attic/need-o-tron,gds-attic/need-o-tron,gds-attic/need-o-tron
ruby
## Code Before: class ApplicationController < ActionController::Base include GDS::SSO::ControllerMethods protect_from_forgery before_filter :authenticate_user! before_filter :require_signin_permission! before_filter :set_current_user_in_thread # the user_signed_in? if here is needed becaue otherwise we require an admin user # on the OmniAuth callback controller action, which is exceeding lethal before_filter :ensure_user_is_admin!, :except => [:show, :create, :index, :new], :if => :user_signed_in? skip_before_filter :ensure_user_is_admin!, :if => lambda { |c| c.controller_name == "authentications" } include NestedFormHelper def ensure_user_is_admin! unless current_user.is_admin? render :text => "You must be a need-o-tron admin to use this application", :status => :forbidden return false end end protected def set_current_user_in_thread if user_signed_in? Thread.current[:current_user] = current_user params[:_signed_in_user] = current_user.name end end end ## Instruction: Tweak "you must be an admin" message ## Code After: class ApplicationController < ActionController::Base include GDS::SSO::ControllerMethods protect_from_forgery before_filter :authenticate_user! before_filter :require_signin_permission! before_filter :set_current_user_in_thread # the user_signed_in? if here is needed becaue otherwise we require an admin user # on the OmniAuth callback controller action, which is exceeding lethal before_filter :ensure_user_is_admin!, :except => [:show, :create, :index, :new], :if => :user_signed_in? skip_before_filter :ensure_user_is_admin!, :if => lambda { |c| c.controller_name == "authentications" } include NestedFormHelper def ensure_user_is_admin! unless current_user.is_admin? render :text => "You must be a need-o-tron admin to do admin things in this application", :status => :forbidden return false end end protected def set_current_user_in_thread if user_signed_in? Thread.current[:current_user] = current_user params[:_signed_in_user] = current_user.name end end end
class ApplicationController < ActionController::Base include GDS::SSO::ControllerMethods protect_from_forgery before_filter :authenticate_user! before_filter :require_signin_permission! before_filter :set_current_user_in_thread # the user_signed_in? if here is needed becaue otherwise we require an admin user # on the OmniAuth callback controller action, which is exceeding lethal before_filter :ensure_user_is_admin!, :except => [:show, :create, :index, :new], :if => :user_signed_in? skip_before_filter :ensure_user_is_admin!, :if => lambda { |c| c.controller_name == "authentications" } include NestedFormHelper def ensure_user_is_admin! unless current_user.is_admin? - render :text => "You must be a need-o-tron admin to use this application", :status => :forbidden ? ^ ^ + render :text => "You must be a need-o-tron admin to do admin things in this application", :status => :forbidden ? ^^^^^^^^^^^^^^ ^^^ return false end end protected def set_current_user_in_thread if user_signed_in? Thread.current[:current_user] = current_user params[:_signed_in_user] = current_user.name end end end
2
0.066667
1
1
9624d24022187523a09e2b207c7687ee600cf565
train-the-trainers/mr-robots-netflix-n-hack/week-3/recognizing-fake-websites-and-phishing-scams/provision.sh
train-the-trainers/mr-robots-netflix-n-hack/week-3/recognizing-fake-websites-and-phishing-scams/provision.sh
apt update apt install --yes python3 python3-pip python3-venv unzip \ xfce4 firefox \ ettercap-graphical git clone --depth 1 https://github.com/trustedsec/social-engineer-toolkit.git set/ chown -R vagrant:vagrant set cd set pip3 install -r requirements.txt pip3 install pipx sudo --login -u vagrant pipx install mitmproxy mkdir /tmp/evilginx2 wget --quiet -O /tmp/evilginx2/evilginx2.zip \ https://github.com/kgretzky/evilginx2/releases/download/2.3.0/evilginx_linux_x86_2.3.0.zip unzip -d /tmp/evilginx2 /tmp/evilginx2/evilginx2.zip # Execute in external `bash` process as install script not executable. bash /tmp/evilginx2/install.sh && chmod a+x /usr/local/bin/evilginx rm -rf /tmp/evilginx2
apt update apt install --yes python3 python3-pip python3-venv unzip \ xfce4 firefox \ ettercap-graphical git clone --depth 1 https://github.com/trustedsec/social-engineer-toolkit.git set/ chown -R vagrant:vagrant set cd set pip3 install -r requirements.txt cd - pip3 install pipx sudo --login -u vagrant pipx install mitmproxy mkdir /tmp/evilginx2 wget --quiet -O /tmp/evilginx2/evilginx2.zip \ https://github.com/kgretzky/evilginx2/releases/download/2.3.0/evilginx_linux_x86_2.3.0.zip unzip -d /tmp/evilginx2 /tmp/evilginx2/evilginx2.zip cd /tmp/evilginx2 # Run external `bash` process since install script is not executable. bash /tmp/evilginx2/install.sh && chmod a+x /usr/local/bin/evilginx cd - rm -rf /tmp/evilginx2
Fix installation errors for Evilginx2.
Fix installation errors for Evilginx2.
Shell
unlicense
AnarchoTechNYC/meta,AnarchoTechNYC/meta,AnarchoTechNYC/meta
shell
## Code Before: apt update apt install --yes python3 python3-pip python3-venv unzip \ xfce4 firefox \ ettercap-graphical git clone --depth 1 https://github.com/trustedsec/social-engineer-toolkit.git set/ chown -R vagrant:vagrant set cd set pip3 install -r requirements.txt pip3 install pipx sudo --login -u vagrant pipx install mitmproxy mkdir /tmp/evilginx2 wget --quiet -O /tmp/evilginx2/evilginx2.zip \ https://github.com/kgretzky/evilginx2/releases/download/2.3.0/evilginx_linux_x86_2.3.0.zip unzip -d /tmp/evilginx2 /tmp/evilginx2/evilginx2.zip # Execute in external `bash` process as install script not executable. bash /tmp/evilginx2/install.sh && chmod a+x /usr/local/bin/evilginx rm -rf /tmp/evilginx2 ## Instruction: Fix installation errors for Evilginx2. ## Code After: apt update apt install --yes python3 python3-pip python3-venv unzip \ xfce4 firefox \ ettercap-graphical git clone --depth 1 https://github.com/trustedsec/social-engineer-toolkit.git set/ chown -R vagrant:vagrant set cd set pip3 install -r requirements.txt cd - pip3 install pipx sudo --login -u vagrant pipx install mitmproxy mkdir /tmp/evilginx2 wget --quiet -O /tmp/evilginx2/evilginx2.zip \ https://github.com/kgretzky/evilginx2/releases/download/2.3.0/evilginx_linux_x86_2.3.0.zip unzip -d /tmp/evilginx2 /tmp/evilginx2/evilginx2.zip cd /tmp/evilginx2 # Run external `bash` process since install script is not executable. bash /tmp/evilginx2/install.sh && chmod a+x /usr/local/bin/evilginx cd - rm -rf /tmp/evilginx2
apt update apt install --yes python3 python3-pip python3-venv unzip \ xfce4 firefox \ ettercap-graphical git clone --depth 1 https://github.com/trustedsec/social-engineer-toolkit.git set/ chown -R vagrant:vagrant set cd set pip3 install -r requirements.txt + cd - pip3 install pipx sudo --login -u vagrant pipx install mitmproxy mkdir /tmp/evilginx2 wget --quiet -O /tmp/evilginx2/evilginx2.zip \ https://github.com/kgretzky/evilginx2/releases/download/2.3.0/evilginx_linux_x86_2.3.0.zip unzip -d /tmp/evilginx2 /tmp/evilginx2/evilginx2.zip + cd /tmp/evilginx2 - # Execute in external `bash` process as install script not executable. ? ^^^^ ---- - + # Run external `bash` process since install script is not executable. ? ^ ++++ +++ bash /tmp/evilginx2/install.sh && chmod a+x /usr/local/bin/evilginx + cd - rm -rf /tmp/evilginx2
5
0.238095
4
1
8dd41fab9a43ef43d5f2dc27e11bdbda3c23bc56
soapbox/tests/urls.py
soapbox/tests/urls.py
from django.conf.urls import patterns, url from django.views.generic import TemplateView urlpatterns = patterns( '', url(r'^$', TemplateView.as_view( template_name='soapboxtest/test_success.html')), url(r'^foo/$', TemplateView.as_view( template_name='soapboxtest/test_success.html')), url(r'^foo/bar/$', TemplateView.as_view( template_name='soapboxtest/test_success.html')), url(r'^foo/bar/baz/$', TemplateView.as_view( template_name='soapboxtest/test_context_processor.html')), url(r'^fail/$', TemplateView.as_view( template_name='soapboxtest/test_fail_syntax.html')), url(r'^bad-url-var/$', TemplateView.as_view( template_name='soapboxtest/test_bad_variable.html')), )
from django.conf.urls import url from django.views.generic import TemplateView urlpatterns = [ url(r'^$', TemplateView.as_view( template_name='soapboxtest/test_success.html')), url(r'^foo/$', TemplateView.as_view( template_name='soapboxtest/test_success.html')), url(r'^foo/bar/$', TemplateView.as_view( template_name='soapboxtest/test_success.html')), url(r'^foo/bar/baz/$', TemplateView.as_view( template_name='soapboxtest/test_context_processor.html')), url(r'^fail/$', TemplateView.as_view( template_name='soapboxtest/test_fail_syntax.html')), url(r'^bad-url-var/$', TemplateView.as_view( template_name='soapboxtest/test_bad_variable.html')), ]
Stop using patterns() in the test URLs.
Stop using patterns() in the test URLs.
Python
bsd-3-clause
ubernostrum/django-soapbox,ubernostrum/django-soapbox
python
## Code Before: from django.conf.urls import patterns, url from django.views.generic import TemplateView urlpatterns = patterns( '', url(r'^$', TemplateView.as_view( template_name='soapboxtest/test_success.html')), url(r'^foo/$', TemplateView.as_view( template_name='soapboxtest/test_success.html')), url(r'^foo/bar/$', TemplateView.as_view( template_name='soapboxtest/test_success.html')), url(r'^foo/bar/baz/$', TemplateView.as_view( template_name='soapboxtest/test_context_processor.html')), url(r'^fail/$', TemplateView.as_view( template_name='soapboxtest/test_fail_syntax.html')), url(r'^bad-url-var/$', TemplateView.as_view( template_name='soapboxtest/test_bad_variable.html')), ) ## Instruction: Stop using patterns() in the test URLs. ## Code After: from django.conf.urls import url from django.views.generic import TemplateView urlpatterns = [ url(r'^$', TemplateView.as_view( template_name='soapboxtest/test_success.html')), url(r'^foo/$', TemplateView.as_view( template_name='soapboxtest/test_success.html')), url(r'^foo/bar/$', TemplateView.as_view( template_name='soapboxtest/test_success.html')), url(r'^foo/bar/baz/$', TemplateView.as_view( template_name='soapboxtest/test_context_processor.html')), url(r'^fail/$', TemplateView.as_view( template_name='soapboxtest/test_fail_syntax.html')), url(r'^bad-url-var/$', TemplateView.as_view( template_name='soapboxtest/test_bad_variable.html')), ]
- from django.conf.urls import patterns, url ? ---------- + from django.conf.urls import url from django.views.generic import TemplateView + urlpatterns = [ - urlpatterns = patterns( - '', url(r'^$', TemplateView.as_view( template_name='soapboxtest/test_success.html')), url(r'^foo/$', TemplateView.as_view( template_name='soapboxtest/test_success.html')), url(r'^foo/bar/$', TemplateView.as_view( template_name='soapboxtest/test_success.html')), url(r'^foo/bar/baz/$', TemplateView.as_view( template_name='soapboxtest/test_context_processor.html')), url(r'^fail/$', TemplateView.as_view( template_name='soapboxtest/test_fail_syntax.html')), url(r'^bad-url-var/$', TemplateView.as_view( template_name='soapboxtest/test_bad_variable.html')), - ) + ]
7
0.28
3
4
ec422fd4080b7b5e21415c32c0615c5afc109695
egpath/src/stm32/hal/tim/instances-f3.go
egpath/src/stm32/hal/tim/instances-f3.go
// +build f030x6 package tim import ( "unsafe" "stm32/hal/raw/mmap" ) //emgo:const var ( // Advanced-control timers. TIM1 = (*Periph)(unsafe.Pointer(mmap.TIM1_BASE)) // General-purpose timers. TIM3 = (*Periph)(unsafe.Pointer(mmap.TIM3_BASE)) // General-purpose timers (1-channel). TIM14 = (*Periph)(unsafe.Pointer(mmap.TIM14_BASE)) // General-purpose timers (1-channel with complementary output). TIM16 = (*Periph)(unsafe.Pointer(mmap.TIM16_BASE)) TIM17 = (*Periph)(unsafe.Pointer(mmap.TIM17_BASE)) )
// +build f303xe package tim import ( "unsafe" "stm32/hal/raw/mmap" ) //emgo:const var ( // Advanced-control timers. TIM1 = (*Periph)(unsafe.Pointer(mmap.TIM1_BASE)) TIM8 = (*Periph)(unsafe.Pointer(mmap.TIM8_BASE)) TIM20 = (*Periph)(unsafe.Pointer(mmap.TIM20_BASE)) // General-purpose timers. TIM2 = (*Periph)(unsafe.Pointer(mmap.TIM2_BASE)) // 32-bit TIM3 = (*Periph)(unsafe.Pointer(mmap.TIM3_BASE)) TIM4 = (*Periph)(unsafe.Pointer(mmap.TIM4_BASE)) // Basic timers. TIM6 = (*Periph)(unsafe.Pointer(mmap.TIM6_BASE)) TIM7 = (*Periph)(unsafe.Pointer(mmap.TIM7_BASE)) // General-purpose timers (1-channel). TIM16 = (*Periph)(unsafe.Pointer(mmap.TIM15_BASE)) TIM17 = (*Periph)(unsafe.Pointer(mmap.TIM17_BASE)) // General-purpose timers (2-channel). TIM15 = (*Periph)(unsafe.Pointer(mmap.TIM15_BASE)) )
Fix timer instances for F3.
stm32/hal/tim: Fix timer instances for F3.
Go
bsd-3-clause
ziutek/emgo,ziutek/emgo,ziutek/emgo,ziutek/emgo
go
## Code Before: // +build f030x6 package tim import ( "unsafe" "stm32/hal/raw/mmap" ) //emgo:const var ( // Advanced-control timers. TIM1 = (*Periph)(unsafe.Pointer(mmap.TIM1_BASE)) // General-purpose timers. TIM3 = (*Periph)(unsafe.Pointer(mmap.TIM3_BASE)) // General-purpose timers (1-channel). TIM14 = (*Periph)(unsafe.Pointer(mmap.TIM14_BASE)) // General-purpose timers (1-channel with complementary output). TIM16 = (*Periph)(unsafe.Pointer(mmap.TIM16_BASE)) TIM17 = (*Periph)(unsafe.Pointer(mmap.TIM17_BASE)) ) ## Instruction: stm32/hal/tim: Fix timer instances for F3. ## Code After: // +build f303xe package tim import ( "unsafe" "stm32/hal/raw/mmap" ) //emgo:const var ( // Advanced-control timers. TIM1 = (*Periph)(unsafe.Pointer(mmap.TIM1_BASE)) TIM8 = (*Periph)(unsafe.Pointer(mmap.TIM8_BASE)) TIM20 = (*Periph)(unsafe.Pointer(mmap.TIM20_BASE)) // General-purpose timers. TIM2 = (*Periph)(unsafe.Pointer(mmap.TIM2_BASE)) // 32-bit TIM3 = (*Periph)(unsafe.Pointer(mmap.TIM3_BASE)) TIM4 = (*Periph)(unsafe.Pointer(mmap.TIM4_BASE)) // Basic timers. TIM6 = (*Periph)(unsafe.Pointer(mmap.TIM6_BASE)) TIM7 = (*Periph)(unsafe.Pointer(mmap.TIM7_BASE)) // General-purpose timers (1-channel). TIM16 = (*Periph)(unsafe.Pointer(mmap.TIM15_BASE)) TIM17 = (*Periph)(unsafe.Pointer(mmap.TIM17_BASE)) // General-purpose timers (2-channel). TIM15 = (*Periph)(unsafe.Pointer(mmap.TIM15_BASE)) )
- // +build f030x6 ? - ^ + // +build f303xe ? + ^ package tim import ( "unsafe" "stm32/hal/raw/mmap" ) //emgo:const var ( // Advanced-control timers. - TIM1 = (*Periph)(unsafe.Pointer(mmap.TIM1_BASE)) + TIM1 = (*Periph)(unsafe.Pointer(mmap.TIM1_BASE)) ? + + TIM8 = (*Periph)(unsafe.Pointer(mmap.TIM8_BASE)) + TIM20 = (*Periph)(unsafe.Pointer(mmap.TIM20_BASE)) // General-purpose timers. + TIM2 = (*Periph)(unsafe.Pointer(mmap.TIM2_BASE)) // 32-bit - TIM3 = (*Periph)(unsafe.Pointer(mmap.TIM3_BASE)) + TIM3 = (*Periph)(unsafe.Pointer(mmap.TIM3_BASE)) ? + + TIM4 = (*Periph)(unsafe.Pointer(mmap.TIM4_BASE)) + + // Basic timers. + TIM6 = (*Periph)(unsafe.Pointer(mmap.TIM6_BASE)) + TIM7 = (*Periph)(unsafe.Pointer(mmap.TIM7_BASE)) // General-purpose timers (1-channel). - TIM14 = (*Periph)(unsafe.Pointer(mmap.TIM14_BASE)) ? ^ ^ + TIM16 = (*Periph)(unsafe.Pointer(mmap.TIM15_BASE)) ? ^ ^ + TIM17 = (*Periph)(unsafe.Pointer(mmap.TIM17_BASE)) - // General-purpose timers (1-channel with complementary output). + // General-purpose timers (2-channel). - TIM16 = (*Periph)(unsafe.Pointer(mmap.TIM16_BASE)) ? ^ ^ + TIM15 = (*Periph)(unsafe.Pointer(mmap.TIM15_BASE)) ? ^ ^ - TIM17 = (*Periph)(unsafe.Pointer(mmap.TIM17_BASE)) )
22
0.88
15
7
daab7129e4be35bcdb791a70aea438d933125f14
package.json
package.json
{ "name": "NestLog", "version": "1.0.0", "main": "server.js", "engines": { "node": "0.10.x" }, "dependencies": { } }
{ "name": "NestLog", "version": "1.0.0", "main": "server.js", "engines": { "node": "0.10.x" }, "dependencies": { "async": "^0.9.0", "bcrypt-nodejs": "latest", "body-parser": "~1.0.0", "connect-flash": "~0.1.1", "connect-mongo": "^0.4.1", "cookie-parser": "~1.0.0", "ejs": "~0.8.5", "express": "~4.0.0", "express-session": "~1.0.0", "follow-redirects": "0.0.3", "method-override": "~1.0.0", "mongoose": "~3.8.1", "morgan": "~1.0.0", "newrelic": "^1.14.1", "passport": "~0.1.17", "passport-google-oauth": "~0.1.5", "passport-nest": "^1.0.0" } }
Add back all npm modules
Add back all npm modules
JSON
mit
tjeffree/nestlog
json
## Code Before: { "name": "NestLog", "version": "1.0.0", "main": "server.js", "engines": { "node": "0.10.x" }, "dependencies": { } } ## Instruction: Add back all npm modules ## Code After: { "name": "NestLog", "version": "1.0.0", "main": "server.js", "engines": { "node": "0.10.x" }, "dependencies": { "async": "^0.9.0", "bcrypt-nodejs": "latest", "body-parser": "~1.0.0", "connect-flash": "~0.1.1", "connect-mongo": "^0.4.1", "cookie-parser": "~1.0.0", "ejs": "~0.8.5", "express": "~4.0.0", "express-session": "~1.0.0", "follow-redirects": "0.0.3", "method-override": "~1.0.0", "mongoose": "~3.8.1", "morgan": "~1.0.0", "newrelic": "^1.14.1", "passport": "~0.1.17", "passport-google-oauth": "~0.1.5", "passport-nest": "^1.0.0" } }
{ "name": "NestLog", "version": "1.0.0", "main": "server.js", "engines": { "node": "0.10.x" }, "dependencies": { + "async": "^0.9.0", + "bcrypt-nodejs": "latest", + "body-parser": "~1.0.0", + "connect-flash": "~0.1.1", + "connect-mongo": "^0.4.1", + "cookie-parser": "~1.0.0", + "ejs": "~0.8.5", + "express": "~4.0.0", + "express-session": "~1.0.0", + "follow-redirects": "0.0.3", + "method-override": "~1.0.0", + "mongoose": "~3.8.1", + "morgan": "~1.0.0", + "newrelic": "^1.14.1", + "passport": "~0.1.17", + "passport-google-oauth": "~0.1.5", + "passport-nest": "^1.0.0" } }
17
1.7
17
0
6344c26c189bc15a0bc0c2e873957f4f3aa45041
.travis.yml
.travis.yml
language: python sudo: false dist: xenial cache: pip: true directories: - $HOME/.cache/pypoetry install: - curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python - source $HOME/.poetry/env - poetry install script: - poetry run pytest --benchmark-enable --minecraft-latest --minecraft-snapshot - poetry run black --check nbtlib tests examples jobs: include: - python: 3.8 - stage: publish python: 3.8 if: tag IS present script: - poetry build - poetry publish --username="__token__" --password="$PYPI_TOKEN"
language: python dist: focal cache: pip: true directories: - $HOME/.cache/pypoetry install: - curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python - source $HOME/.poetry/env - poetry install script: - poetry run pytest --benchmark-enable --minecraft-latest --minecraft-snapshot - poetry run black --check nbtlib tests examples jobs: include: - python: 3.8 - stage: publish python: 3.8 if: tag IS present script: - poetry build - poetry publish --username="__token__" --password="$PYPI_TOKEN"
Change dist and poetry install url
Change dist and poetry install url
YAML
mit
vberlier/nbtlib
yaml
## Code Before: language: python sudo: false dist: xenial cache: pip: true directories: - $HOME/.cache/pypoetry install: - curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python - source $HOME/.poetry/env - poetry install script: - poetry run pytest --benchmark-enable --minecraft-latest --minecraft-snapshot - poetry run black --check nbtlib tests examples jobs: include: - python: 3.8 - stage: publish python: 3.8 if: tag IS present script: - poetry build - poetry publish --username="__token__" --password="$PYPI_TOKEN" ## Instruction: Change dist and poetry install url ## Code After: language: python dist: focal cache: pip: true directories: - $HOME/.cache/pypoetry install: - curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python - source $HOME/.poetry/env - poetry install script: - poetry run pytest --benchmark-enable --minecraft-latest --minecraft-snapshot - poetry run black --check nbtlib tests examples jobs: include: - python: 3.8 - stage: publish python: 3.8 if: tag IS present script: - poetry build - poetry publish --username="__token__" --password="$PYPI_TOKEN"
language: python + dist: focal - sudo: false - dist: xenial cache: pip: true directories: - $HOME/.cache/pypoetry install: - - curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python ? ---- ^ + - curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python ? ^ ++++++ + + - source $HOME/.poetry/env - poetry install script: - poetry run pytest --benchmark-enable --minecraft-latest --minecraft-snapshot - poetry run black --check nbtlib tests examples jobs: include: - python: 3.8 - stage: publish python: 3.8 if: tag IS present script: - poetry build - poetry publish --username="__token__" --password="$PYPI_TOKEN"
5
0.172414
2
3
78ab81bed45fae94bca24e547f02af79ae2c819d
.travis.yml
.travis.yml
language: objective-c osx_image: xcode8 xcode_project: RxBluetoothKit.xcodeproj xcode_sdk: iphonesimulator10.0 before_install: - brew update - brew outdated carthage || brew upgrade carthage before_script: - carthage checkout --no-use-binaries - travis_retry carthage build --platform iOS,macOS script: - set -o pipefail && xcodebuild test -verbose -scheme "RxBluetoothKit iOS" -destination "platform=iOS Simulator,OS=10.0,name=iPhone 7 Plus" ONLY_ACTIVE_ARCH=NO | xcpretty - set -o pipefail && xcodebuild test -verbose -scheme "RxBluetoothKit macOS" ONLY_ACTIVE_ARCH=NO | xcpretty after_success: - sleep 5 # https://github.com/travis-ci/travis-ci/issues/4725
language: objective-c osx_image: xcode8 xcode_project: RxBluetoothKit.xcodeproj xcode_sdk: iphonesimulator10.0 before_install: - brew update - brew outdated carthage || brew upgrade carthage before_script: - carthage checkout --no-use-binaries - travis_retry carthage build --platform iOS,macOS script: - set -o pipefail && xcodebuild test -verbose -scheme "RxBluetoothKit iOS" -destination "platform=iOS Simulator,OS=10.0,name=iPhone 7 Plus" ONLY_ACTIVE_ARCH=NO | xcpretty - sleep 5 - set -o pipefail && xcodebuild test -verbose -scheme "RxBluetoothKit macOS" ONLY_ACTIVE_ARCH=NO | xcpretty after_success: - sleep 5 # https://github.com/travis-ci/travis-ci/issues/4725
Add sleep 5 between tests
Add sleep 5 between tests
YAML
apache-2.0
Polidea/RxBluetoothKit,Fitbit/RxBluetoothKit,Polidea/RxBluetoothKit,Fitbit/RxBluetoothKit,Fitbit/RxBluetoothKit,Polidea/RxBluetoothKit
yaml
## Code Before: language: objective-c osx_image: xcode8 xcode_project: RxBluetoothKit.xcodeproj xcode_sdk: iphonesimulator10.0 before_install: - brew update - brew outdated carthage || brew upgrade carthage before_script: - carthage checkout --no-use-binaries - travis_retry carthage build --platform iOS,macOS script: - set -o pipefail && xcodebuild test -verbose -scheme "RxBluetoothKit iOS" -destination "platform=iOS Simulator,OS=10.0,name=iPhone 7 Plus" ONLY_ACTIVE_ARCH=NO | xcpretty - set -o pipefail && xcodebuild test -verbose -scheme "RxBluetoothKit macOS" ONLY_ACTIVE_ARCH=NO | xcpretty after_success: - sleep 5 # https://github.com/travis-ci/travis-ci/issues/4725 ## Instruction: Add sleep 5 between tests ## Code After: language: objective-c osx_image: xcode8 xcode_project: RxBluetoothKit.xcodeproj xcode_sdk: iphonesimulator10.0 before_install: - brew update - brew outdated carthage || brew upgrade carthage before_script: - carthage checkout --no-use-binaries - travis_retry carthage build --platform iOS,macOS script: - set -o pipefail && xcodebuild test -verbose -scheme "RxBluetoothKit iOS" -destination "platform=iOS Simulator,OS=10.0,name=iPhone 7 Plus" ONLY_ACTIVE_ARCH=NO | xcpretty - sleep 5 - set -o pipefail && xcodebuild test -verbose -scheme "RxBluetoothKit macOS" ONLY_ACTIVE_ARCH=NO | xcpretty after_success: - sleep 5 # https://github.com/travis-ci/travis-ci/issues/4725
language: objective-c osx_image: xcode8 xcode_project: RxBluetoothKit.xcodeproj xcode_sdk: iphonesimulator10.0 before_install: - brew update - brew outdated carthage || brew upgrade carthage before_script: - carthage checkout --no-use-binaries - travis_retry carthage build --platform iOS,macOS script: - set -o pipefail && xcodebuild test -verbose -scheme "RxBluetoothKit iOS" -destination "platform=iOS Simulator,OS=10.0,name=iPhone 7 Plus" ONLY_ACTIVE_ARCH=NO | xcpretty + - sleep 5 - set -o pipefail && xcodebuild test -verbose -scheme "RxBluetoothKit macOS" ONLY_ACTIVE_ARCH=NO | xcpretty after_success: - sleep 5 # https://github.com/travis-ci/travis-ci/issues/4725
1
0.058824
1
0
7f57954f839fa845c7727a34d35ada069ffae2ff
app/models/text.rb
app/models/text.rb
require 'open3' class Text < ApplicationRecord belongs_to :audio searchkick callbacks: false, searchable: %i[text], settings: { analysis: { filter: { spanish_stop: { type: 'stop', stopwords: '_spanish_' } }, analyzer: { rebuilt_spanish: { tokenizer: 'standard', filter: %w[asciifolding spanish_stop] } } } } # Class methods class << self def bulk_insert(audio_id, text) Text.where(audio_id: audio_id).destroy_all saved_lines = 0 text.each_line do |line| time, text = line.split('|') text.strip! time = time.to_i if time > 0 && time < 7500 && text.length > 4 Text.create(audio_id: audio_id, time: time, text: text) saved_lines += 1 end end saved_lines end def speech_to_text(audio_id) audio = Audio.find(audio_id) return unless md = audio.url.match(%r((/\d{4}/[^\/]+\.mp3))) mp3_file = "#{Rails.application.config.x.audios_root}#{md[1]}" cmd = "#{Rails.application.config.x.speech_to_text_cmd} #{mp3_file}" puts "Audio: #{audio.id}, cmd: #{cmd}" Open3.popen3(cmd) do |_stdin, stdout, _stderr, wait_thr| saved_lines = bulk_insert(audio.id, stdout) exit_status = wait_thr.value puts("Status: #{exit_status}, created #{saved_lines} text lines.") end end end end
class Text < ApplicationRecord belongs_to :audio searchkick searchable: %i[text], settings: { analysis: { filter: { spanish_stop: { type: 'stop', stopwords: '_spanish_' } }, analyzer: { rebuilt_spanish: { tokenizer: 'standard', filter: %w[asciifolding spanish_stop] } } } } end
Enable index callbacks in Text
Enable index callbacks in Text
Ruby
mit
jschwindt/Venganzas-del-Pasado,jschwindt/Venganzas-del-Pasado,jschwindt/Venganzas-del-Pasado,jschwindt/Venganzas-del-Pasado
ruby
## Code Before: require 'open3' class Text < ApplicationRecord belongs_to :audio searchkick callbacks: false, searchable: %i[text], settings: { analysis: { filter: { spanish_stop: { type: 'stop', stopwords: '_spanish_' } }, analyzer: { rebuilt_spanish: { tokenizer: 'standard', filter: %w[asciifolding spanish_stop] } } } } # Class methods class << self def bulk_insert(audio_id, text) Text.where(audio_id: audio_id).destroy_all saved_lines = 0 text.each_line do |line| time, text = line.split('|') text.strip! time = time.to_i if time > 0 && time < 7500 && text.length > 4 Text.create(audio_id: audio_id, time: time, text: text) saved_lines += 1 end end saved_lines end def speech_to_text(audio_id) audio = Audio.find(audio_id) return unless md = audio.url.match(%r((/\d{4}/[^\/]+\.mp3))) mp3_file = "#{Rails.application.config.x.audios_root}#{md[1]}" cmd = "#{Rails.application.config.x.speech_to_text_cmd} #{mp3_file}" puts "Audio: #{audio.id}, cmd: #{cmd}" Open3.popen3(cmd) do |_stdin, stdout, _stderr, wait_thr| saved_lines = bulk_insert(audio.id, stdout) exit_status = wait_thr.value puts("Status: #{exit_status}, created #{saved_lines} text lines.") end end end end ## Instruction: Enable index callbacks in Text ## Code After: class Text < ApplicationRecord belongs_to :audio searchkick searchable: %i[text], settings: { analysis: { filter: { spanish_stop: { type: 'stop', stopwords: '_spanish_' } }, analyzer: { rebuilt_spanish: { tokenizer: 'standard', filter: %w[asciifolding spanish_stop] } } } } end
- require 'open3' - class Text < ApplicationRecord belongs_to :audio - searchkick callbacks: false, searchable: %i[text], settings: { ? ------------------ + searchkick searchable: %i[text], settings: { analysis: { filter: { spanish_stop: { type: 'stop', stopwords: '_spanish_' } }, analyzer: { rebuilt_spanish: { tokenizer: 'standard', filter: %w[asciifolding spanish_stop] } } } } - # Class methods - class << self - def bulk_insert(audio_id, text) - Text.where(audio_id: audio_id).destroy_all - saved_lines = 0 - text.each_line do |line| - time, text = line.split('|') - text.strip! - time = time.to_i - if time > 0 && time < 7500 && text.length > 4 - Text.create(audio_id: audio_id, time: time, text: text) - saved_lines += 1 - end - end - saved_lines - end - - def speech_to_text(audio_id) - audio = Audio.find(audio_id) - return unless md = audio.url.match(%r((/\d{4}/[^\/]+\.mp3))) - - mp3_file = "#{Rails.application.config.x.audios_root}#{md[1]}" - cmd = "#{Rails.application.config.x.speech_to_text_cmd} #{mp3_file}" - puts "Audio: #{audio.id}, cmd: #{cmd}" - Open3.popen3(cmd) do |_stdin, stdout, _stderr, wait_thr| - saved_lines = bulk_insert(audio.id, stdout) - exit_status = wait_thr.value - puts("Status: #{exit_status}, created #{saved_lines} text lines.") - end - end - end end
35
0.648148
1
34
0aa1fb5d7f4eca6423a7d4b5cdd166bf29f48423
ordering/__init__.py
ordering/__init__.py
from fractions import Fraction class Ordering: _start = object() _end = object() def __init__(self): self._labels = { self._start: Fraction(0), self._end: Fraction(1) } self._successors = { self._start: self._end } self._predecessors = { self._end: self._start } def insert_after(self, existing_item, new_item): self._labels[new_item] = (self._labels[existing_item] + self._labels[self._successors[existing_item]]) / 2 self._successors[new_item] = self._successors[existing_item] self._predecessors[new_item] = existing_item self._predecessors[self._successors[existing_item]] = new_item self._successors[existing_item] = new_item def insert_before(self, existing_item, new_item): self.insert_after(self._predecessors[existing_item], new_item) def insert_start(self, new_item): self.insert_after(self._start, new_item) def insert_end(self, new_item): self.insert_before(self._end, new_item) def compare(self, left_item, right_item): return self._labels[left_item] < self._labels[right_item]
from fractions import Fraction from functools import total_ordering class Ordering: _start = object() _end = object() def __init__(self): self._labels = { self._start: Fraction(0), self._end: Fraction(1) } self._successors = { self._start: self._end } self._predecessors = { self._end: self._start } def insert_after(self, existing_item, new_item): self._labels[new_item] = (self._labels[existing_item] + self._labels[self._successors[existing_item]]) / 2 self._successors[new_item] = self._successors[existing_item] self._predecessors[new_item] = existing_item self._predecessors[self._successors[existing_item]] = new_item self._successors[existing_item] = new_item return OrderingItem(self, new_item) def insert_before(self, existing_item, new_item): return self.insert_after(self._predecessors[existing_item], new_item) def insert_start(self, new_item): return self.insert_after(self._start, new_item) def insert_end(self, new_item): return self.insert_before(self._end, new_item) def compare(self, left_item, right_item): return self._labels[left_item] < self._labels[right_item] @total_ordering class OrderingItem: def __init__(self, ordering, item): self.ordering = ordering self.item = item def __lt__(self, other): return self.ordering.compare(self.item, other.item)
Add class representing an element in the ordering
Add class representing an element in the ordering
Python
mit
madman-bob/python-order-maintenance
python
## Code Before: from fractions import Fraction class Ordering: _start = object() _end = object() def __init__(self): self._labels = { self._start: Fraction(0), self._end: Fraction(1) } self._successors = { self._start: self._end } self._predecessors = { self._end: self._start } def insert_after(self, existing_item, new_item): self._labels[new_item] = (self._labels[existing_item] + self._labels[self._successors[existing_item]]) / 2 self._successors[new_item] = self._successors[existing_item] self._predecessors[new_item] = existing_item self._predecessors[self._successors[existing_item]] = new_item self._successors[existing_item] = new_item def insert_before(self, existing_item, new_item): self.insert_after(self._predecessors[existing_item], new_item) def insert_start(self, new_item): self.insert_after(self._start, new_item) def insert_end(self, new_item): self.insert_before(self._end, new_item) def compare(self, left_item, right_item): return self._labels[left_item] < self._labels[right_item] ## Instruction: Add class representing an element in the ordering ## Code After: from fractions import Fraction from functools import total_ordering class Ordering: _start = object() _end = object() def __init__(self): self._labels = { self._start: Fraction(0), self._end: Fraction(1) } self._successors = { self._start: self._end } self._predecessors = { self._end: self._start } def insert_after(self, existing_item, new_item): self._labels[new_item] = (self._labels[existing_item] + self._labels[self._successors[existing_item]]) / 2 self._successors[new_item] = self._successors[existing_item] self._predecessors[new_item] = existing_item self._predecessors[self._successors[existing_item]] = new_item self._successors[existing_item] = new_item return OrderingItem(self, new_item) def insert_before(self, existing_item, new_item): return self.insert_after(self._predecessors[existing_item], new_item) def insert_start(self, new_item): return self.insert_after(self._start, new_item) def insert_end(self, new_item): return self.insert_before(self._end, new_item) def compare(self, left_item, right_item): return self._labels[left_item] < self._labels[right_item] @total_ordering class OrderingItem: def __init__(self, ordering, item): self.ordering = ordering self.item = item def __lt__(self, other): return self.ordering.compare(self.item, other.item)
from fractions import Fraction + from functools import total_ordering class Ordering: _start = object() _end = object() def __init__(self): self._labels = { self._start: Fraction(0), self._end: Fraction(1) } self._successors = { self._start: self._end } self._predecessors = { self._end: self._start } def insert_after(self, existing_item, new_item): self._labels[new_item] = (self._labels[existing_item] + self._labels[self._successors[existing_item]]) / 2 self._successors[new_item] = self._successors[existing_item] self._predecessors[new_item] = existing_item self._predecessors[self._successors[existing_item]] = new_item self._successors[existing_item] = new_item + return OrderingItem(self, new_item) + def insert_before(self, existing_item, new_item): - self.insert_after(self._predecessors[existing_item], new_item) + return self.insert_after(self._predecessors[existing_item], new_item) ? +++++++ def insert_start(self, new_item): - self.insert_after(self._start, new_item) + return self.insert_after(self._start, new_item) ? +++++++ def insert_end(self, new_item): - self.insert_before(self._end, new_item) + return self.insert_before(self._end, new_item) ? +++++++ def compare(self, left_item, right_item): return self._labels[left_item] < self._labels[right_item] + + + @total_ordering + class OrderingItem: + def __init__(self, ordering, item): + self.ordering = ordering + self.item = item + + def __lt__(self, other): + return self.ordering.compare(self.item, other.item)
19
0.5
16
3
959aeed788cae24ed1b390a32950fc92da0e7961
.fixtures.yml
.fixtures.yml
fixtures: repositories: concat: https://github.com/puppetlabs/puppetlabs-concat.git stdlib: https://github.com/puppetlabs/puppetlabs-stdlib.git selinux_core: repo: https://github.com/puppetlabs/puppetlabs-selinux_core.git puppet_version: ">= 6.0.0"
fixtures: repositories: stdlib: https://github.com/puppetlabs/puppetlabs-stdlib.git selinux_core: repo: https://github.com/puppetlabs/puppetlabs-selinux_core.git puppet_version: ">= 6.0.0"
Remove concat as a fixture
Remove concat as a fixture 7c8bf65243d71f2c083ee5412dcee50e9789a580 removed the use of this module. It's not listed as a dependency either so it can be safely removed as a fixture.
YAML
apache-2.0
vchepkov/puppet-selinux,vchepkov/puppet-selinux,vchepkov/puppet-selinux,jfryman/puppet-selinux
yaml
## Code Before: fixtures: repositories: concat: https://github.com/puppetlabs/puppetlabs-concat.git stdlib: https://github.com/puppetlabs/puppetlabs-stdlib.git selinux_core: repo: https://github.com/puppetlabs/puppetlabs-selinux_core.git puppet_version: ">= 6.0.0" ## Instruction: Remove concat as a fixture 7c8bf65243d71f2c083ee5412dcee50e9789a580 removed the use of this module. It's not listed as a dependency either so it can be safely removed as a fixture. ## Code After: fixtures: repositories: stdlib: https://github.com/puppetlabs/puppetlabs-stdlib.git selinux_core: repo: https://github.com/puppetlabs/puppetlabs-selinux_core.git puppet_version: ">= 6.0.0"
fixtures: repositories: - concat: https://github.com/puppetlabs/puppetlabs-concat.git stdlib: https://github.com/puppetlabs/puppetlabs-stdlib.git selinux_core: repo: https://github.com/puppetlabs/puppetlabs-selinux_core.git puppet_version: ">= 6.0.0"
1
0.142857
0
1
bae548e654f7db6164848e02f8690cb5a03130c9
.travis.yml
.travis.yml
language: erlang otp_release: - 23.3.1 - 22.3.4 - 21.3.8.1 - 20.3.8 branches: only: - master before_install: - wget https://s3.amazonaws.com/rebar3/rebar3 - chmod +x rebar3 script: "make travis"
language: erlang otp_release: - 23.3.1 - 22.3.4 branches: only: - master before_install: - wget https://s3.amazonaws.com/rebar3/rebar3 - chmod +x rebar3 script: "make travis"
Remove older versions from Travis, don't want to fix this.
Remove older versions from Travis, don't want to fix this. Keep on receiving 'escript: exception error: undefined function rebar3:main/1' in Travis scripts.
YAML
mit
ostinelli/syn
yaml
## Code Before: language: erlang otp_release: - 23.3.1 - 22.3.4 - 21.3.8.1 - 20.3.8 branches: only: - master before_install: - wget https://s3.amazonaws.com/rebar3/rebar3 - chmod +x rebar3 script: "make travis" ## Instruction: Remove older versions from Travis, don't want to fix this. Keep on receiving 'escript: exception error: undefined function rebar3:main/1' in Travis scripts. ## Code After: language: erlang otp_release: - 23.3.1 - 22.3.4 branches: only: - master before_install: - wget https://s3.amazonaws.com/rebar3/rebar3 - chmod +x rebar3 script: "make travis"
language: erlang otp_release: - 23.3.1 - 22.3.4 - - 21.3.8.1 - - 20.3.8 branches: only: - master before_install: - wget https://s3.amazonaws.com/rebar3/rebar3 - chmod +x rebar3 script: "make travis"
2
0.117647
0
2
f0c92700ada903c3884c59fe46ab20327a43e449
content/seq-drafts/life/_meta.yaml
content/seq-drafts/life/_meta.yaml
--- photographs: - slug: '001' occurred_at: '2018-09-22T16:12:00Z' title: Snowy Trail description: | A path through green trees covered by the season's first snow. In practice, this text needs to be a bit longer to be more representative of what we can expect out of a real story. And let's add even a few more words on here just to make sure that it's fleshed out in a way that we might really reasonably expect because I tend to be a wordy writer. original_image_url: https://www.dropbox.com/s/lw8djlr7jl516sh/L2018-09-22%2B01.jpg?dl=1
--- photographs: - slug: '001' occurred_at: '2018-09-22T16:12:00Z' title: Snowy Trail description: | A path through green trees covered by the season's <a href="">first snow</a>. In practice, this text needs to be a bit longer to be more representative of what we can expect out of a real story. And let's add even a few more words on here just to make sure that it's fleshed out in a way that we might really reasonably expect because I tend to be a wordy writer. original_image_url: https://www.dropbox.com/s/lw8djlr7jl516sh/L2018-09-22%2B01.jpg?dl=1
Add link for good measure
Add link for good measure
YAML
mit
brandur/sorg,brandur/sorg,brandur/sorg,brandur/sorg,brandur/sorg
yaml
## Code Before: --- photographs: - slug: '001' occurred_at: '2018-09-22T16:12:00Z' title: Snowy Trail description: | A path through green trees covered by the season's first snow. In practice, this text needs to be a bit longer to be more representative of what we can expect out of a real story. And let's add even a few more words on here just to make sure that it's fleshed out in a way that we might really reasonably expect because I tend to be a wordy writer. original_image_url: https://www.dropbox.com/s/lw8djlr7jl516sh/L2018-09-22%2B01.jpg?dl=1 ## Instruction: Add link for good measure ## Code After: --- photographs: - slug: '001' occurred_at: '2018-09-22T16:12:00Z' title: Snowy Trail description: | A path through green trees covered by the season's <a href="">first snow</a>. In practice, this text needs to be a bit longer to be more representative of what we can expect out of a real story. And let's add even a few more words on here just to make sure that it's fleshed out in a way that we might really reasonably expect because I tend to be a wordy writer. original_image_url: https://www.dropbox.com/s/lw8djlr7jl516sh/L2018-09-22%2B01.jpg?dl=1
--- photographs: - slug: '001' occurred_at: '2018-09-22T16:12:00Z' title: Snowy Trail description: | - A path through green trees covered by the season's first snow. + A path through green trees covered by the season's <a href="">first snow</a>. ? +++++++++++ ++++ In practice, this text needs to be a bit longer to be more representative of what we can expect out of a real story. And let's add even a few more words on here just to make sure that it's fleshed out in a way that we might really reasonably expect because I tend to be a wordy writer. original_image_url: https://www.dropbox.com/s/lw8djlr7jl516sh/L2018-09-22%2B01.jpg?dl=1
2
0.2
1
1
2ef0571e5468ac72f712a69180fa5dc18652e8d7
app/applier.py
app/applier.py
import random from collections import namedtuple Rule = namedtuple('Rule', ['changes', 'environments']) sonorization = Rule({'p': 'b', 't': 'd', 'ʈ': 'ɖ', 'c':'ɟ', 'k': 'g', 'q': 'ɢ'}, ['^.', 'V.V']) rules = [sonorization] words = ['potato', 'tobado', 'tabasco'] def choose_rule(words, rules): '''Returns a sound change rule from rules applicable to the given word list.''' filtered_rules = filter_rules_by_phonemes(words, rules) filtered_rules = filter_rules_by_environments(words, filtered_rules) # selected_rule = random.choice(filtered_rules) def filter_rules_by_phonemes(words, rules): '''Returns a list of rules which contain phonemes that are present in the given word list. ''' pass def filter_rules_by_environments(words, rules): '''Returns a list of rules which apply to at least one word in the given word list, taking into account the environments in which the rule applies. ''' pass if __name__ == '__main__': choose_rule(words, rules)
import random from collections import namedtuple Rule = namedtuple('Rule', ['changes', 'environments']) sonorization = Rule({'p': 'b', 't': 'd', 'ʈ': 'ɖ', 'c':'ɟ', 'k': 'g', 'q': 'ɢ'}, ['^.', 'V.V']) rules = [sonorization] words = ['potato', 'tobado', 'tabasco'] def choose_rule(words, rules): '''Returns a sound change rule from rules applicable to the given word list.''' filtered_rules = filter_rules_by_phonemes(words, rules) # filtered_rules = filter_rules_by_environments(words, filtered_rules) # selected_rule = random.choice(filtered_rules) def intersecting(set_1, set_2): '''Return true if the intersection of the two sets isn't empty, false otherwise. ''' return (len(set_1.intersection(set_2)) != 0) def filter_rules_by_phonemes(words, rules): '''Returns a list of rules which contain phonemes that are present in the given word list. ''' word_phonemes = set(''.join(words)) return [rule for rule in rules if intersecting(word_phonemes, set(rule.changes.keys()))] def filter_rules_by_environments(words, rules): '''Returns a list of rules which apply to at least one word in the given word list, taking into account the environments in which the rule applies. ''' pass if __name__ == '__main__': choose_rule(words, rules)
Implement rule filtering by phoneme.
Implement rule filtering by phoneme.
Python
mit
kdelwat/LangEvolve,kdelwat/LangEvolve,kdelwat/LangEvolve
python
## Code Before: import random from collections import namedtuple Rule = namedtuple('Rule', ['changes', 'environments']) sonorization = Rule({'p': 'b', 't': 'd', 'ʈ': 'ɖ', 'c':'ɟ', 'k': 'g', 'q': 'ɢ'}, ['^.', 'V.V']) rules = [sonorization] words = ['potato', 'tobado', 'tabasco'] def choose_rule(words, rules): '''Returns a sound change rule from rules applicable to the given word list.''' filtered_rules = filter_rules_by_phonemes(words, rules) filtered_rules = filter_rules_by_environments(words, filtered_rules) # selected_rule = random.choice(filtered_rules) def filter_rules_by_phonemes(words, rules): '''Returns a list of rules which contain phonemes that are present in the given word list. ''' pass def filter_rules_by_environments(words, rules): '''Returns a list of rules which apply to at least one word in the given word list, taking into account the environments in which the rule applies. ''' pass if __name__ == '__main__': choose_rule(words, rules) ## Instruction: Implement rule filtering by phoneme. ## Code After: import random from collections import namedtuple Rule = namedtuple('Rule', ['changes', 'environments']) sonorization = Rule({'p': 'b', 't': 'd', 'ʈ': 'ɖ', 'c':'ɟ', 'k': 'g', 'q': 'ɢ'}, ['^.', 'V.V']) rules = [sonorization] words = ['potato', 'tobado', 'tabasco'] def choose_rule(words, rules): '''Returns a sound change rule from rules applicable to the given word list.''' filtered_rules = filter_rules_by_phonemes(words, rules) # filtered_rules = filter_rules_by_environments(words, filtered_rules) # selected_rule = random.choice(filtered_rules) def intersecting(set_1, set_2): '''Return true if the intersection of the two sets isn't empty, false otherwise. ''' return (len(set_1.intersection(set_2)) != 0) def filter_rules_by_phonemes(words, rules): '''Returns a list of rules which contain phonemes that are present in the given word list. ''' word_phonemes = set(''.join(words)) return [rule for rule in rules if intersecting(word_phonemes, set(rule.changes.keys()))] def filter_rules_by_environments(words, rules): '''Returns a list of rules which apply to at least one word in the given word list, taking into account the environments in which the rule applies. ''' pass if __name__ == '__main__': choose_rule(words, rules)
import random from collections import namedtuple Rule = namedtuple('Rule', ['changes', 'environments']) sonorization = Rule({'p': 'b', 't': 'd', 'ʈ': 'ɖ', 'c':'ɟ', 'k': 'g', 'q': 'ɢ'}, ['^.', 'V.V']) rules = [sonorization] words = ['potato', 'tobado', 'tabasco'] def choose_rule(words, rules): '''Returns a sound change rule from rules applicable to the given word list.''' filtered_rules = filter_rules_by_phonemes(words, rules) - filtered_rules = filter_rules_by_environments(words, filtered_rules) + # filtered_rules = filter_rules_by_environments(words, filtered_rules) ? ++ # selected_rule = random.choice(filtered_rules) + + def intersecting(set_1, set_2): + '''Return true if the intersection of the two sets isn't empty, false + otherwise. + ''' + return (len(set_1.intersection(set_2)) != 0) def filter_rules_by_phonemes(words, rules): '''Returns a list of rules which contain phonemes that are present in the given word list. ''' - pass + word_phonemes = set(''.join(words)) + + return [rule for rule in rules if intersecting(word_phonemes, + set(rule.changes.keys()))] def filter_rules_by_environments(words, rules): '''Returns a list of rules which apply to at least one word in the given word list, taking into account the environments in which the rule applies. ''' pass if __name__ == '__main__': choose_rule(words, rules)
13
0.382353
11
2
0dcac87cb91ebe96eaf476cc512e85c63f19c112
imports/startup/server/fixtures.js
imports/startup/server/fixtures.js
import { Meteor } from 'meteor/meteor'; import { Places } from '../../api/places/places.js'; // If the database is empty on server start, create some sample data. Meteor.startup(() => { Places.remove({}); if (Places.find().count() === 0) { const data = [ { name: 'Pike Island', lat: 44.892222, long: -93.165278, }, { name: 'Fort Snelling', lat: 44.892778, long: -93.180556, }, ]; data.forEach((place) => { Places.insert(place); }); } });
import { Meteor } from 'meteor/meteor'; import { Places } from '../../api/places/places.js'; import _ from 'lodash'; // If the database is empty on server start, create some sample data. Meteor.startup(() => { Places.remove({}); if (Places.find().count() === 0) { const data = [ { name: 'Pike Island', lat: 44.892222, long: -93.165278, }, { name: 'Fort Snelling', lat: 44.892778, long: -93.180556, }, ]; data.forEach((place) => { place.slug = _.kebabCase(place.name); Places.insert(place); }); } });
Create a slug for each place
Create a slug for each place This gives us a URL for the route
JavaScript
mit
scimusmn/map-stories,scimusmn/map-stories
javascript
## Code Before: import { Meteor } from 'meteor/meteor'; import { Places } from '../../api/places/places.js'; // If the database is empty on server start, create some sample data. Meteor.startup(() => { Places.remove({}); if (Places.find().count() === 0) { const data = [ { name: 'Pike Island', lat: 44.892222, long: -93.165278, }, { name: 'Fort Snelling', lat: 44.892778, long: -93.180556, }, ]; data.forEach((place) => { Places.insert(place); }); } }); ## Instruction: Create a slug for each place This gives us a URL for the route ## Code After: import { Meteor } from 'meteor/meteor'; import { Places } from '../../api/places/places.js'; import _ from 'lodash'; // If the database is empty on server start, create some sample data. Meteor.startup(() => { Places.remove({}); if (Places.find().count() === 0) { const data = [ { name: 'Pike Island', lat: 44.892222, long: -93.165278, }, { name: 'Fort Snelling', lat: 44.892778, long: -93.180556, }, ]; data.forEach((place) => { place.slug = _.kebabCase(place.name); Places.insert(place); }); } });
import { Meteor } from 'meteor/meteor'; import { Places } from '../../api/places/places.js'; + import _ from 'lodash'; // If the database is empty on server start, create some sample data. Meteor.startup(() => { Places.remove({}); if (Places.find().count() === 0) { + const data = [ { name: 'Pike Island', lat: 44.892222, long: -93.165278, }, { name: 'Fort Snelling', lat: 44.892778, long: -93.180556, }, ]; data.forEach((place) => { + place.slug = _.kebabCase(place.name); Places.insert(place); - }); } });
4
0.153846
3
1
e97d8f618b36b9fae05f9ad60ed6a54af3107a8c
doc/user_guide/docs/installation.md
doc/user_guide/docs/installation.md
Currently supported platforms are Linux Ubuntu and Mac OS X. ### Ubuntu ``` sh wget https://github.com/BioDynaMo/biodynamo/releases/download/v0.1.0/biodynamo_0.1.0_amd64.snap sudo snap install --dangerous --classic biodynamo_0.1.0_amd64.snap ``` ### Mac OS ``` sh brew install Biodynamo/biodynamo/biodynamo ```
Currently supported platforms are Linux Ubuntu and Mac OS X. ### Ubuntu ``` sh wget https://github.com/BioDynaMo/biodynamo/releases/download/v0.1.0/biodynamo_0.1.0_amd64.snap sudo snap install --dangerous --classic biodynamo_0.1.0_amd64.snap ``` ### Mac OS ``` sh brew install Biodynamo/biodynamo/biodynamo ``` ## Development Version If you want to make changes to BioDynaMo itself, then you need to install the development version. ### Ubuntu ```sh git clone https://github.com/BioDynaMo/biodynamo cd biodynamo sudo script/install_prerequesites_ubuntu_16.04.sh # source biodynamo environment . /opt/biodynamo/biodynamo_dev.env mkdir build && cd build cmake .. && make -j4 sudo make install ```
Add documentation on how to install the development version on Ubuntu
Add documentation on how to install the development version on Ubuntu
Markdown
apache-2.0
BioDynaMo/biodynamo,BioDynaMo/biodynamo,BioDynaMo/biodynamo,BioDynaMo/biodynamo
markdown
## Code Before: Currently supported platforms are Linux Ubuntu and Mac OS X. ### Ubuntu ``` sh wget https://github.com/BioDynaMo/biodynamo/releases/download/v0.1.0/biodynamo_0.1.0_amd64.snap sudo snap install --dangerous --classic biodynamo_0.1.0_amd64.snap ``` ### Mac OS ``` sh brew install Biodynamo/biodynamo/biodynamo ``` ## Instruction: Add documentation on how to install the development version on Ubuntu ## Code After: Currently supported platforms are Linux Ubuntu and Mac OS X. ### Ubuntu ``` sh wget https://github.com/BioDynaMo/biodynamo/releases/download/v0.1.0/biodynamo_0.1.0_amd64.snap sudo snap install --dangerous --classic biodynamo_0.1.0_amd64.snap ``` ### Mac OS ``` sh brew install Biodynamo/biodynamo/biodynamo ``` ## Development Version If you want to make changes to BioDynaMo itself, then you need to install the development version. ### Ubuntu ```sh git clone https://github.com/BioDynaMo/biodynamo cd biodynamo sudo script/install_prerequesites_ubuntu_16.04.sh # source biodynamo environment . /opt/biodynamo/biodynamo_dev.env mkdir build && cd build cmake .. && make -j4 sudo make install ```
Currently supported platforms are Linux Ubuntu and Mac OS X. ### Ubuntu ``` sh wget https://github.com/BioDynaMo/biodynamo/releases/download/v0.1.0/biodynamo_0.1.0_amd64.snap sudo snap install --dangerous --classic biodynamo_0.1.0_amd64.snap ``` ### Mac OS ``` sh brew install Biodynamo/biodynamo/biodynamo ``` + + + ## Development Version + + If you want to make changes to BioDynaMo itself, then you need to install the + development version. + + ### Ubuntu + + ```sh + git clone https://github.com/BioDynaMo/biodynamo + cd biodynamo + + sudo script/install_prerequesites_ubuntu_16.04.sh + + # source biodynamo environment + . /opt/biodynamo/biodynamo_dev.env + + mkdir build && cd build + cmake .. && make -j4 + sudo make install + ```
22
1.466667
22
0