seed stringlengths 1 14k | source stringclasses 2
values |
|---|---|
else:
z = {"user_id": user_id}
phr = {**z, **content}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
args = sys.argv[1:]
os.system('python -O -m spanningtree.csv_experiment_statistics ' +
| ise-uiuc/Magicoder-OSS-Instruct-75K |
.read()
.unwrap()
.sorted_tvu_peers(stakingUtils::staked_nodes_at_epoch(&bank, bank_epoch).as_ref());
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<reponame>Evil1991/bitrixdock<filename>www/html/bitrix/wizards/bitrix/demo/modules/iblock/lang/en/public/e-store/books/.section.php<gh_stars>0
<?
$MESS ['DEMO_IBLOCK_ESTORE_BOOKS_SECTION_NAME'] = "Demo Bookstore";
?> | ise-uiuc/Magicoder-OSS-Instruct-75K |
'''
# Path of the invariants file to be parsed.
filepath = ""
# String used to match entry separating lines in the invariants file.
separator_str = ""
def __init__(self, filepath):
'''
Return a InvariantParser object which is set to parse the file located at
*filepath*.
'... | ise-uiuc/Magicoder-OSS-Instruct-75K |
}
return $result;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def _create_fake_data(self):
# Create fake data
pass
def _get_tokens(self):
response = self.request(type="mutation",
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# flake8: noqa: F401,F402
from . import errors, events, relation, testing
from .relation import EndpointWrapper
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def dropEvent(self, event) -> None:
"""Overrides :meth:`QtWidgets.QMainWindow.dropEvent`."""
self.app.plot(file=self._drag_drop_root, block=False)
event.accept()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
List<RoomHygieneGradeInfo> getRoomHygieneGradeListByBuilds(List<String> build);
int updateRoomHygieneGrade(@Param("roomRecordId") int roomRecodrId, @Param("record") float record, @Param("recordTime")Date recordTime);
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
model_config.model(*model_config.model_args)
param_names = [
k for k in list(model_tape.keys()) if k not in model_config.observed_data
]
traces_as_list = [traces[k] for k in param_names]
initial_shape = traces_as_list[0].shape[:2] # [num_results x num_chains]
flattened_traces = [np.reshape(v, [-1] ... | ise-uiuc/Magicoder-OSS-Instruct-75K |
export declare function isString(x: any): x is string;
export declare function isEmpty(x: any): boolean;
export declare function isPlainObject(x: any): boolean;
export declare function isFunction(x: any): x is Function;
export declare function toArray<T>(x: T | T[]): T[];
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
#[macro_export]
macro_rules! clog {
($target:ident, $lvl:expr, $($arg:tt)+) => ({
log::log!(target: log_target!($target), $lvl, $($arg)*);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public:
std::uint16_t VertexCount;
std::uint16_t VertexOffset;
std::uint16_t PrimitiveCount;
std::uint16_t StartIndex;
};
} // namespace Pomdog
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# Keys
key_dictionary = {
'sector': 'Keys method',
'variable': 'dictionary'
}
print(key_dictionary.keys())
# Values
value_dictionary = {
'sector': 'Values method',
'variable': 'dictionary'
}
print(value_dictionary.values())
| ise-uiuc/Magicoder-OSS-Instruct-75K |
eval_epochs = 5
measurement.train(train_epochs, eval_epochs)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from typing import Mapping
from tensorflow_federated.python.core.impl.types import placements
def convert_cardinalities_dict_to_string_keyed(
cardinalities: Mapping[placements.PlacementLiteral,
int]) -> Mapping[str, int]:
"""Ensures incoming cardinalities dict is formatted correctly.... | ise-uiuc/Magicoder-OSS-Instruct-75K |
if (id_set != nullptr)
delete id_set;
id_set = new_ids;
bool people_changed =false;
lastPersonCount = numPeopleInFrame;
if (numPeopleInFrame != prevPeopleInFrame || totalPersonIncrements != prevPeopleTotal)
{
prevPeopleInFrame = numPeopleInFra... | ise-uiuc/Magicoder-OSS-Instruct-75K |
if(!getSharedPreferences(context).contains(preferenceName))
throw new SharedPreferenceNotFoundException(preferenceName + " does not exist");
}
public static void setString(Context context, String preferenceName, String value) {
getSharedPreferences(context).edit().putString(preferen... | ise-uiuc/Magicoder-OSS-Instruct-75K |
}
if (sscanf(argv[2], "%u", &NodeNum) == 0){
printf("Usage: ./proxy <path> <number>\n");
return -1;
}
LocalNode** local_nodes = new LocalNode* [NodeNum];
pipe_main_child[0] = open(argv[1], O_RDONLY);
if(!pipe_main_child[0]) {perror("Open ERROR"); fflush(stderr);}
for (int i = 0; i < NodeNum; i++)... | ise-uiuc/Magicoder-OSS-Instruct-75K |
@pytest.fixture(autouse=True)
def enable_db_access_for_all_tests(db): # pylint: disable=unused-argument
pass
| ise-uiuc/Magicoder-OSS-Instruct-75K |
* limitations under the License.
*/
package com.example.android.architecture.blueprints.todoapp.addedittask;
import static com.example.android.architecture.blueprints.todoapp.addedittask.AddEditTaskInjector.createController;
import static com.example.android.architecture.blueprints.todoapp.addedittask.effecthandlers... | ise-uiuc/Magicoder-OSS-Instruct-75K |
this->_last.previous = &this->_first;
this->_length = (size_t)0;
}
virtual ~custom_linked_list() { this->clear(); }
| ise-uiuc/Magicoder-OSS-Instruct-75K |
urlpatterns = [
path('image/', ImageView.as_view()),
]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
input SearchFilter {
category: [CategoryFilter!]
recipe: [RecipeFilter!]
}
extend type Query {
autocomplete(query: String!, type: SearchDataType!): [String!]!
search(
| ise-uiuc/Magicoder-OSS-Instruct-75K |
field=models.URLField(default='', help_text='Link to useful app resources'),
preserve_default=False,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
it('does not render label', () => {
const { container } = render(<ScannerDisabledRepositoryBadge scannerDisabled={false} />);
expect(container).toBeEmptyDOMElement();
});
it('displays tooltip', async () => {
render(<ScannerDisabledRepositoryBadge scannerDisabled withTooltip />);
expect(screen.ge... | ise-uiuc/Magicoder-OSS-Instruct-75K |
import { LastFmImplementation } from '@infrastructure/service/artist/lastFm/LastFmImplementation'
import { FindArtistsMBIDUseCase } from '@useCase/findArtistsMBID/findArtistsMBIDUseCase'
import { FindImageUseCase } from '@useCase/findImage/findImageUseCase'
const START_ARRAY = 0
const ARRAY_LEN = 3
@Injectable()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
OrderCell(order: CompletedOrder.sampleOrders[1])
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def test_isolated_labels(adata_batch):
#adata = adata_factory(pca=True, n_top_genes=2000, neighbors=True)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"barrier_source": barrier_source,
"barrier_priorities": barrier_priorities,
"economic_assessment_impact": economic_assessment_impact,
"economic_assessment_rating": economic_assessment_rating,
"resolvability_assessment_effort": assessment_effort_to_resolve,
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
#include <cstring>
using namespace std;
string sum (string a, string b)
{
string tmp;
int flag = 0;
int al = a.length(), bl = b.length();
for (int i = al - 1, j = bl - 1; i >= 0 || j >= 0; i--, j--)
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import os
import json
import time
from selenium import webdriver
# from .crawler.media import login
from .crawler.media import getpages
# from .crawler.media import getcomments
# from .crawler.crawler.spiders.profil import launch
# from webdriver_manager.chrome import ChromeDriverManager
username = 'jawherbouhouch75... | ise-uiuc/Magicoder-OSS-Instruct-75K |
wol_data = wol_data.first()
send_magic_packet(wol_data.mac, ip_address=wol_data.ip, port=wol_data.port)
return "Отправил"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
private ActorIdentity _centerActor;
private ActorChannelConfiguration _channelConfiguration;
public CenterActorDirectoryConfiguration()
{
}
public ActorIdentity CenterActor { get { return _centerActor; } }
public ActorChannelConfiguration ChannelConfiguration { ... | ise-uiuc/Magicoder-OSS-Instruct-75K |
limitations under the License.
*/
import Foundation
| ise-uiuc/Magicoder-OSS-Instruct-75K |
onView.addSubview(self)
}
func setText(text: String){
textLabel.text = text
setNeedsLayout()
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public func performLayout(inOrigin origin: CGPoint, width: CGFloat) -> CGFloat {
// selfHeight is sub's height
let horizontalBounds = CGRect(origin: origin, size: CGSize(width: width, height: 0))
let (x1, selfWidth) = horizontalLayout(rule: h, inBounds: horizontalBounds)
let selfX = ... | ise-uiuc/Magicoder-OSS-Instruct-75K |
'intermediate_certificates': 'intermediateCertificates'
}
self._certificate = None
self._public_key = None
self._intermediate_certificates = None
@property
def certificate(self):
"""
**[Required]** Gets the certificate of this X509FederationRequest.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
admin.site.register(Project, ProjectAdmin)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{
logger_.LogError("failed to set wakeup option");
return false;
}
delayMicroseconds(kSettingSleep.count());
if (esp_light_sleep_start() != ESP_OK)
{
logger_.LogError("failed to start light sleep");
return false;
}
return true;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
static let macAddress = "macAddress"
}
init(signalStrength: Int, name: String, macAddress: String) {
self.signalStrength = signalStrength
self.name = name
self.macAddress = macAddress
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<filename>app/Models/Games/Player.php
<?php
namespace App\Models\Games;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.windowSize = 100 | ise-uiuc/Magicoder-OSS-Instruct-75K |
Returns:
NumPy array (m, ) of predictions. Values are 0 or 1.
"""
Y_predicted = predict(X, W1, B1, W2, B2)
accuracy = np.mean(Y_predicted == Y)
return accuracy
| ise-uiuc/Magicoder-OSS-Instruct-75K |
fetchAccessTokenWithPath("oauth/access_token", method: "POST", requestToken: requestToken, success: { (accessToken: BDBOAuth1Credential!) -> Void in
self.currentAccount({ (user: User) -> () in
User.currentUser = user
self.loginSuccess?()
}... | ise-uiuc/Magicoder-OSS-Instruct-75K |
global nextGeneration
| ise-uiuc/Magicoder-OSS-Instruct-75K |
const FamiliaMembro = (props: IFamiliaMembro) => {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{
auto listBuilder = builder.initStructList(3);
listBuilder[0].setTextField("structlist 1");
listBuilder[1].setTextField("structlist 2");
listBuilder[2].setTextField("structlist 3");
| ise-uiuc/Magicoder-OSS-Instruct-75K |
</input>
<output>
<port id="1" precision="FP32">
<dim>1</dim>
| ise-uiuc/Magicoder-OSS-Instruct-75K |
//
// AppDelegate.swift
// Douyu
//
// Created by Max on 2019/11/4.
// Copyright © 2019 Max. All rights reserved.
//
| ise-uiuc/Magicoder-OSS-Instruct-75K |
void UiSceneCreator::CreateControllers() {
// Controllers are only visible on Android.
auto root = std::make_unique<UiElement>();
root->SetName(kControllerRoot);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
bool Reader::has(const llvm::Instruction &CurInstruction) const {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
fn default() -> Self {
Projects {
path: project_dirs().data_dir().join("zorgit-projects"),
pull_requests: PullRequests::default(),
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
impl Error {
/// Return the kind of this error.
pub fn kind(&self) -> &ErrorKind {
&self.kind
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def optimize_random_skater():
print('Available optimizers...')
print([o.__name__ for o in OPTIMIZERS])
start_time = time.time()
optimizer = random.choice(OPTIMIZERS)
f = random.choice(SKATERS_R1+SKATERS_R2+SKATERS_R3)
k = random.choice([1,2,3,5,8,13,21])
n_trials = random.choice([15,50])
| ise-uiuc/Magicoder-OSS-Instruct-75K |
python_requires='>=3.6.0',
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@Component
public class ApiNettyServer {
| ise-uiuc/Magicoder-OSS-Instruct-75K |
int len = strlen(trainingFile);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
class AutoOffsetReset(str, Enum):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@if (Session::has('alert-success'))
<div class="alert alert-success alert-dismissible" style="margin-top: 10px; margin-bottom: -10px;">
<a href=""><button type="button" class="close" data-dismiss="alert">×</button></a>
{{Session::get('alert-success')}}
</div>
@endif
</section>
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
class YamboSpectra():
"""
Class to show optical absorption spectra
"""
| ise-uiuc/Magicoder-OSS-Instruct-75K |
///
/// The reader is implemented as two `u64` fast field.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# Code Review - Static Analysis
htmlhint *.html
stylelint "css/*.css"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
vca_host=os.environ.get('VCA_HOST'),
vca_secret=os.environ.get('VCA_SECRET'),
osm_version='releasefive-daily'):
self.net = DCNetwork(monitor=False, enable_learning=True)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
shaderResourceViewDesc.Texture1DArray.MostDetailedMip = 0; //from most detailed...
shaderResourceViewDesc.Texture1DArray.MipLevels = -1; //...to least detailed
}
else
{
shaderResourceViewDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE1D;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
static var allTests = [
("testEqualToOperator", testEqualToOperator),
("testApproximatelyEqualToOperator", testApproximatelyEqualToOperator),
("testIsApproximatelyEqualToWithin", testIsApproximatelyEqualToWithin)
]
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"Topic :: Scientific/Engineering :: GIS",
"Topic :: Software Development :: Libraries :: Python Modules",
],
zip_safe=False,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
adjacent_diff = multi_pitch[..., 1:] - multi_pitch[..., :-1]
# Flip the differentials so negative become positive and vise-versa
adjacent_diff = -1 * adjacent_diff
# Combine the previous observations into a single representation
offsets = np.concatenate([adjacent_diff, last_frame], axis=-1)
#... | ise-uiuc/Magicoder-OSS-Instruct-75K |
public String toSQLExpression(){
return constraint.toSQLExpression();
}
public String toString(){
return "M("+constraint.toString()+")";
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
with open(tweet_file, 'r') as fin:
for line in fin:
tweet = json.loads(line)
if 'text' in tweet:
parsed_tweets.append(tweet)
return parsed_tweets
def readSentimentFile(filename='AFINN-111.txt'):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.user.save()
self.flash(self._("Your profile image has been deleted"), category="info")
fmt = self.request.form.get("fmt", "html")
if fmt=="html":
url = self.url_for("profile", username = self.user.username)
return redirect(url)
else:
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
/// public class MouseController {
/// public event EventHandler<MessageEvent> MouseUp;
///
/// public void ProcessMessage (Message msg)
/// {
/// switch (msg.Id) {
/// case MessageId.MouseUp: {
/// EventHandler<MessageEvent> handler = MouseUp;
/// if (handler != null) {
/// handler (new... | ise-uiuc/Magicoder-OSS-Instruct-75K |
component: PrintLayoutComponent,
children: [
{ path: 'invoice/:invoiceIds', component: InvoiceComponent }
]
},
{
path: 'export',
component: PrintLayoutComponent,
children: [
{ path: 'invoice', component: InvoiceComponent }
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Input: S = "3z4"
Output: ["3z4","3Z4"]
Example 3:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
pub use task::DockerTask;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import tarfile
import os
src = "/imatge/lpanagiotis/projects/saliency/epic-kitchens/object_detection_images"
dst = "/imatge/lpanagiotis/work/Epic-Kitchens/object_detection_images"
# Folder Structure corresponds to : train/test -> person -> videos
for x in ["train", "test"]:
print("Now extracting frames for {}".... | ise-uiuc/Magicoder-OSS-Instruct-75K |
"""
Run methods to setup the object.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
this.borrowedFieldConfig = borrowedFieldConfig;
this.attributeMap = attributeMap;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<reponame>jmealo/habitat-plans
pkg_name=multirun
pkg_origin=jarvus
pkg_version="0.3.2"
pkg_maintainer="<NAME> <<EMAIL>>"
pkg_license=("MIT")
pkg_source="https://github.com/nicolas-van/${pkg_name}/archive/${pkg_version}.tar.gz"
pkg_shasum="fb408c23feee4f11b85f91fd22276efe5993af4e28aef2b695342b540706fcd0"
pkg_deps=(core/... | ise-uiuc/Magicoder-OSS-Instruct-75K |
from __future__ import unicode_literals
from django.db import migrations, models
from decimal import Decimal
import django.core.validators
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.attributes.append(Attribute("lateralVelocityFactor","number","Wind speed scaling factor for the lateral wind velocity",default=0.0))
self.attributes.append(Attribute("verticalVelocityFactor","number","Wind speed scaling factor for the vertical wind velocity",default=0.0)) | ise-uiuc/Magicoder-OSS-Instruct-75K |
def __init__(self,
generator_expression = "Adder([One(),Multiplier([Constant(200),Channel(data.shape[1],data.shape[0])]),TimePoint(data.shape[1],data.shape[0])])",
**kwargs):
super(ExchangeDataNode, self).__init__(*kwargs)
self.set_permanent_attributes(ts_generato... | ise-uiuc/Magicoder-OSS-Instruct-75K |
/**
* @param array $regexps
* @param mixed $testedObject
* @param bool $result
*
* @dataProvider provideTestData
*/
public function testTest(array $regexps, $testedObject, bool $result): void
{
$filter = new RegexpFilter($regexps);
$testResult = $filter->test(... | ise-uiuc/Magicoder-OSS-Instruct-75K |
from .rouge import ROUGEScorer
from .bleu.bleu import BLEUScorer
from .meteor.meteor import METEORScorer
from .cider.cider import Cider
from .ciderd.ciderd import CiderD
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<gh_stars>1-10
using System.Threading.Tasks;
using Abp.Application.Services;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
for (auto & vec : data) {
vec.resize(world.GetSize());
}
}
BoxInterface()
: doc("emp_base")
, div_pop("div_pop"), div_stats("div_stats"), div_controls("div_controls"), div_vis("div_vis")
, pop_canvas(400, 400, "pop_canvas"), org_canvas(800, 800, "org_canvas")... | ise-uiuc/Magicoder-OSS-Instruct-75K |
verbose_name = 'Координатор'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Change Rocket League player names using rattletrap.
Default Behavior:
After loading the .REPLAY passed as CLI argument;
This script uses rattletrap to convert that replay to a minified JSON file.
Changes all player names in a rocket league replay to:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return this.wasTextBrewsterfied === other.wasTextBrewsterfied
&& this.originalText === other.originalText
&& this.originalTextSentimentScore === other.originalTextSentimentScore
&& this.brewsterfiedText === other.brewsterfiedText;
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
request.addfinalizer(fin)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
dependencies = [
('newsletter', '0001_initial'),
]
operations = [
migrations.RenameModel(
old_name='Newsletter',
new_name='Subscriber',
),
]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
/// The object types and IDs of the related resources.
public var data: [BuildIndividualTestersLinkagesResponse.Data]
/// Navigational links including the self-link and links to the related data.
public var links: PagedDocumentLinks
/// Paging information.
public var meta: PagingInformation?
}... | ise-uiuc/Magicoder-OSS-Instruct-75K |
]
axis.xaxis.set_ticklabels(self.oaxis_xticklabels)
else:
axis.set_xticks([])
# draw bar
axis.fill_between(
x=[
self.group_bins[0, c... | ise-uiuc/Magicoder-OSS-Instruct-75K |
return dt
except ValueError:
continue
raise ValueError('Invalid format for date: "%s".' % string)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if __name__ == '__main__':
mp.freeze_support()
main()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
with EventProcessor() as event_processor:
event_processor.process_event_queue()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
},
};
export default Phone;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
state=EXEC_STATE_MANUAL,
)
payload_to_send = {**self.payload, **data}
token = self.create_service_user()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the F... | ise-uiuc/Magicoder-OSS-Instruct-75K |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.