seed stringlengths 1 14k | source stringclasses 2
values |
|---|---|
xs = []
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
}
#[test]
fn test_ms() {
let ms = seconds(0.324);
assert_eq!(ms.to_string().as_str(), "324.0ms");
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
with open(file_path, "r") as f:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if self._thread_id != self._get_thread_id():
raise RuntimeError(
"%s objects created in a "
"thread can only be used in that same thread. The object "
"with %s was created in thread id %s and this is "
"thread id %s."
% ... | ise-uiuc/Magicoder-OSS-Instruct-75K |
return sqrt(meanSquareLevel) // RMS
}
return nil
}
func getOutputForChannel(_ channel: Int) -> Double? {
// valid channel
guard channel < channels.count else { return nil }
| ise-uiuc/Magicoder-OSS-Instruct-75K |
get_access_token="https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=$app_id&secret=$app_secret"
access_token=`curl -s ${get_access_token} | sed -e 's/[{}]//g' | awk -F : '{print $2}' | cut -d , -f 1 | sed -e 's/"//g'`
get_material_count=https://api.weixin.qq.com/cgi-bin/material/get_materialcou... | ise-uiuc/Magicoder-OSS-Instruct-75K |
.from(Mailbox::new(None, Address::new(from, host)?))
| ise-uiuc/Magicoder-OSS-Instruct-75K |
from .backend import Backend
from .dataset_ycb import YCB
from .dataset_generic import GenericDataset
__all__ = (
'GenericDataset',
'YCB',
'Backend'
) | ise-uiuc/Magicoder-OSS-Instruct-75K |
Route::resource('citas', 'CitasController');
//Route::resource('contactos', 'ContactosController');
Route::resource('citas.contactos', 'ContactosController');
Route::resource('contactos', 'ContactosController');
Route::get('citas/{citas}/add', ['uses' => 'CitasController@addContactos', 'as' => 'citas.ad... | ise-uiuc/Magicoder-OSS-Instruct-75K |
@attr.s(slots=True)
class GlobalExclusions():
excluded_anatomy: Set[str] = attr.ib(default=attr.Factory(set))
excluded_chemicals: Set[str] = attr.ib(default=attr.Factory(set))
excluded_compounds: Set[str] = attr.ib(default=attr.Factory(set))
excluded_diseases: Set[str] = attr.ib(default=attr.Factory(se... | ise-uiuc/Magicoder-OSS-Instruct-75K |
}
//---- scan for commas ----
j = 0;
p = ptr;
while (p != NULL) {
p = strchr (p, ',');
if (p != NULL) {
j++;
p++;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"scriptVersion": model.script_version,
"cookie": model.cookie,
"0": "series",
"1": maker.name,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidRegistry;
public class BlockFluidContent extends BlockFluidBase {
private FluidRepresentation fluidRepresentation;
public BlockFluidContent(FluidRepresentation fluidRepresentation) {
super(fluidRepresentation.getUnlocalizedN... | ise-uiuc/Magicoder-OSS-Instruct-75K |
import { App } from './app';
import { Gateway } from './websocket';
import { Config } from './helper/config';
function normalizePort(port: number): number {
if(port >= 1 && port <= 65535) return port;
throw new Error(`Invalid port! (${port})`);
}
(async (): Promise<void> => {
Logger.preinit.info(`Constructing ap... | ise-uiuc/Magicoder-OSS-Instruct-75K |
#[cfg(feature = "battle_fuse")]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
GRAFANA_VERSION=$(cat grafana-version.txt)
INFLUXDB_VERSION=$(cat influxdb-version.txt)
ANSIBLE_VERSION=$(cat ansible-version.txt)
VERSION_DESCRIPTION="Built from $BASE_BOX_VERSION - $UBUNTU_VERSION - and provisioned with InfluxDB $INFLUXDB_VERSION, Grafana $GRAFANA_VERSION and Ansible $ANSIBLE_VERSION."
| ise-uiuc/Magicoder-OSS-Instruct-75K |
set -e
rm -rf ../layer
mkdir -p ../layer
| ise-uiuc/Magicoder-OSS-Instruct-75K |
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this cod... | ise-uiuc/Magicoder-OSS-Instruct-75K |
def debug(string):
return "\n>>> {}".format(string)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# postorder = [9,15,7,20,3]
# Return the following binary tree:
#
| ise-uiuc/Magicoder-OSS-Instruct-75K |
('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='fullstack.Person')),
],
),
]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
BYOMBatchBuildStack(
app,
"BYOMBatchBuildStack",
description=(
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self.assertIsNotNone(labels)
self.assertIn('logistic', predictions)
self.assertTrue(isinstance(config, run_config.RunConfig))
return {}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
__all__ = [
"NistschemaSvIvListShortMinLength5",
]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
logger.info(url)
self.assertEqual(isinstance(url, str), True)
def test_get_metadata(self):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
[print(i) for i in sorted(file_extensions_list)]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
raise ex.InvalidDataException(_("Manila url must not be empty"))
url = urlparse.urlparse(url)
if url.scheme != "manila":
raise ex.InvalidDataException(_("Manila url scheme must be"
" 'manila'"))
if not uuidutils.is_uuid_like(url... | ise-uiuc/Magicoder-OSS-Instruct-75K |
errors {
EOF(expected:String, got:String, exit_code:Option<String>) {
description("End of filestream (usually stdout) occurred, most probably\
because the process terminated")
display("EOF (End of File): Expected {} but got EOF after readi... | ise-uiuc/Magicoder-OSS-Instruct-75K |
"""
if self.version >= 2:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
typeof(SmartContractExecutionAElfModule),
typeof(KernelCoreTestAElfModule),
typeof(SmartContractTestAElfModule)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
pub fn set_start_date(mut self, input: std::option::Option<std::string::String>) -> Self {
self.inner = self.inner.set_start_date(input);
self
}
/// <p>The end date for the forecast. Specify the date using this format: yyyy-MM-dd'T'HH:mm:ss
/// (ISO 8601... | ise-uiuc/Magicoder-OSS-Instruct-75K |
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be use... | ise-uiuc/Magicoder-OSS-Instruct-75K |
# ------------------------------------------------------------------
# Component 1 - Ram
# to convert freestream static to stagnation quantities
# instantiate
ram = SUAVE.Components.Energy.Converters.Ram()
ram.tag = 'ram'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# If either of the AWS credentials variables were provided, validate them
if [ -n "${AWS_ACCESS_KEY_ID}${AWS_SECRET_ACCESS_KEY}" ]; then
if [ -z "${AWS_ACCESS_KEY_ID}" -o -z "${AWS_SECRET_ACCESS_KEY}" ]; then
| ise-uiuc/Magicoder-OSS-Instruct-75K |
maintainer='<NAME>',
maintainer_email='<EMAIL>',
packages=['genderizer'],
package_data={'genderizer': ['data/*']},
platforms='any') | ise-uiuc/Magicoder-OSS-Instruct-75K |
mod totp;
pub use hotp::HOTP;
pub use totp::TOTP;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
access_token = jwt.encode(
{
"iat": datetime.utcnow(),
"exp": datetime.utcnow() + timedelta(minutes=60),
"user_id": str(user.id),
},
| ise-uiuc/Magicoder-OSS-Instruct-75K |
Predicate predicate(2, compared, CompareType::EQUAL);
std::vector<Predicate> predicates;
predicates.push_back(predicate);
auto it = dup_2.find(col2[i]);
if (it == dup_2.end()) EXPECT_EQ(1, 0);
EXPECT_EQ(it->second, db.get()->scan(predicates, *index_vectors));
}
std::map<std::string, int> d... | ise-uiuc/Magicoder-OSS-Instruct-75K |
// Do super
self.init(title: title, message: message, preferredStyle: preferredStyle)
// Add actions
addAction(UIAlertAction(title: actionButtonTitle, style: .default) { _ in actionProc() })
addAction(UIAlertAction(title: cancelButtonTitle, style: .default) { _ in cancelProc() })
| ise-uiuc/Magicoder-OSS-Instruct-75K |
keychain_mask: Option<&SecretKey>,
args: &IssueInvoiceTxArgs,
use_test_rng: bool,
| ise-uiuc/Magicoder-OSS-Instruct-75K |
encoding: 'utf-8'
});
expect(actual).toBe(newContent);
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# Train
| ise-uiuc/Magicoder-OSS-Instruct-75K |
super.tearDown()
}
func testExample() {
// Use recording to get started writing UI tests.
// Use XCTAssert and related functions to verify your tests produce the correct results.
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
return NULL;
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
#!/bin/bash
# packages = postfix
echo "inet_interfaces = all" > /etc/postfix/main.cf
systemctl enable postfix
systemctl start postfix
| ise-uiuc/Magicoder-OSS-Instruct-75K |
height: 60,
attrs: {
circle: { fill: '#FE854F', strokeWidth: 6, stroke: '#4B4A67' },
| ise-uiuc/Magicoder-OSS-Instruct-75K |
if index < 0 {
// Positive Int must be usize
let index = usize::try_from(-index).map_err(|_| Error::Fatal)?;
match captures.len().checked_sub(index) {
Some(0) | None => Ok(Value::convert(interp, None:... | ise-uiuc/Magicoder-OSS-Instruct-75K |
class AmendmentNodeEncoder(AmendmentEncoder, NodeEncoder):
pass
class FSWriteContent:
"""This writer places the contents in the file system """
def __init__(self, path):
self.path = path
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import lombok.Data;
@Data
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def __init__(self, token=None, **kwargs):
pass
def update(self):
pass
#property
def list(self):
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def convert_time(t):
minutes = np.floor((t/3600.0) * 60)
seconds = np.ceil(((t/3600.0) * 60 - minutes) * 60)
if (minutes >= 1):
minutes = np.floor(t/60.0)
seconds = np.ceil((t/60.0 - minutes) * 60)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
tmp.copy('./test/fixtures/todomvc-ng2-deprecated/', tmpFolder);
let ls = shell(
'node',
['../bin/index-cli.js', '-p', './tsconfig.doc.json', '-d', 'documentation'],
{ cwd: tmpFolder }
| ise-uiuc/Magicoder-OSS-Instruct-75K |
sudo apt-get install -y python3-pip
sudo apt-get install -y python3-dev
sudo apt-get install -y python3-pip
sudo apt-get install -y python3-setuptools
sudo apt-get install -y python3-distutils
#sudo apt-get install -y libgtk2.0-dev
#sudo apt-get install -y libssl-dev
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{
$personal_access_token = $this->user->currentAccessToken();
$personal_access_token->delete();
}
public function response(): object
{
$obj = new stdClass();
$obj->access_token = $this->token;
$obj->token_type = 'Bearer';
$obj->user = $this->user;
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
self.assertEqual(rotate_word.rotate('abc', 27), 'bcd')
self.assertEqual(rotate_word.rotate('abc', -1), 'zab')
self.assertEqual(rotate_word.rotate('ABC', 1), 'bcd')
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<filename>setup.py
# coding: utf-8
from setuptools import setup, find_packages
| ise-uiuc/Magicoder-OSS-Instruct-75K |
} else {
unreachable!("Unexpected result from key value operation")
}
}
.boxed();
self.state = BuilderState::Executing(future);
self.poll(cx)
}
}
}
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# imdb_id
if video.imdb_id and self.imdb_id == video.imdb_id:
matches.add('imdb_id')
# name
matches |= guess_matches(video, guessit(self.name, {'type': self.type, 'single_value': True}))
return matches
class LegendasTVProvider(_LegendasTVProvider):
... | ise-uiuc/Magicoder-OSS-Instruct-75K |
while read line
do
let line_number=line_number+1
if [ $line_number -eq 234 ];
then
# Parse the 3rd token that has the nTuplesSubmitted value.
if [ "$ntuples_submitted_previous_token" == "" ];
| ise-uiuc/Magicoder-OSS-Instruct-75K |
public var tab: TabSelection
public var publishableKey: PublishableKey
public var profile: Profile
public var integrationStatus: IntegrationStatus
public var requests: Set<Request>
public var token: Token?
public init(map: MapState, trip: Trip?, selectedOrderId: Order.ID? = nil, places: PlacesSummary? ... | ise-uiuc/Magicoder-OSS-Instruct-75K |
opacity: ${({ disabled }) => (disabled ? 0.5 : 1)};
`;
export const ButtonText = styled(Text)`
font-size: ${({ theme }) => theme.metrics.largeSize}px;
color: ${({ theme }) => theme.colors.buttonText};
font-family: CircularStd-Black;
text-transform: uppercase;
text-align: center;
letter-spacing: 1px;
`;
| ise-uiuc/Magicoder-OSS-Instruct-75K |
usage() {
echo "USAGE: release.sh [version] [msg...]"
exit 1
}
command -v goreleaser >/dev/null 2>&1 || { echo "Required: goreleaser. Install it https://github.com/goreleaser/goreleaser. Aborting." >&2; exit 1; }
| ise-uiuc/Magicoder-OSS-Instruct-75K |
declare const _default: ApplyStylesModifier;
export default _default;
//# sourceMappingURL=applyStyles.d.ts.map | ise-uiuc/Magicoder-OSS-Instruct-75K |
gc.collect()
ff = time.time()
print(f'finshed svd features for param_all: {ff-ss:.2f} seconds')
## Merge to basic dataframes
train_lsa_df.drop(['param_all'], axis=1, inplace=True)
test_lsa_df.drop(['param_all'], axis=1, inplace=True)
## Load preprocessed data
train_v3 = pd.re... | ise-uiuc/Magicoder-OSS-Instruct-75K |
text = f.read()
text = text.replace(find,replace)
with open(sys.argv[3],"w") as f:
f.write(text)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
long = int
from io import StringIO
import queue
| ise-uiuc/Magicoder-OSS-Instruct-75K |
using System.Web;
namespace MercadoTechV2.Models
{
public class Veiculo
{
[Key]
public int Id { get; set; }
public string Placa { get; set; } = "";
public int? Cor { get; set; }
public virtual int? ModeloFK { get; set; }
[JsonIgnore]
[ForeignKey("ModeloFK... | ise-uiuc/Magicoder-OSS-Instruct-75K |
}
/**
* Call a custom upload handler.
*
* @param string|null $driver
* @return mixed
*/
public function handler($driver = null)
{
return $this->driver($driver);
}
/**
* {@inheritdoc}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def ptree(dir_path):
print(dir_path)
p = Path(dir_path)
if p.is_dir():
for line in tree(p):
print(line)
def tree(dir_path: Path, prefix: str = ""):
# prefix components:
| ise-uiuc/Magicoder-OSS-Instruct-75K |
{
public function profile(User $user) {
$user_attendance = Attendance::where('attendance_id', Auth::id())->get();
return view('admin.user.profile', compact('user', 'user_attendance'));
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
@six.add_metaclass(abc.ABCMeta)
class GenericPublisher(Publisher.Publisher):
def __init__(self, config):
self.graphite_host = config.get('graphite_host', DEFAULT_GRAPHITE_HOST)
self.graphite_port = config.get('graphite_port', DEFAULT_GRAPHITE_PORT)
self.graphite_context_header = config.ge... | ise-uiuc/Magicoder-OSS-Instruct-75K |
public class ShouldBeEnumerableTypeScenarios
{
| ise-uiuc/Magicoder-OSS-Instruct-75K |
"""
__implementation__ = 'parallel_reset.ts'
| ise-uiuc/Magicoder-OSS-Instruct-75K |
self
) -> typing.Optional[typing.Dict[Lemma, float]]:
"""
Get the *node weights* for initializing the use of the
[*Personalized PageRank*](https://derwen.ai/docs/ptr/glossary/#personalized-pagerank)
algorithm.
| ise-uiuc/Magicoder-OSS-Instruct-75K |
version = "1.0.10.dev0"
| ise-uiuc/Magicoder-OSS-Instruct-75K |
let mut st = State {
file, dummy,
de: Dedup::new(nargs),
stack: vec![],
heap: (0..nargs).map(StackRef::Expr).collect(),
| ise-uiuc/Magicoder-OSS-Instruct-75K |
def forward(self, x):
x = self.conv1(x)
x = self.conv2(x)
x = self.fc(x)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
docker build -t febs-server-test . | ise-uiuc/Magicoder-OSS-Instruct-75K |
<gh_stars>0
from SpacerCorePy import * | ise-uiuc/Magicoder-OSS-Instruct-75K |
# get the ratios for the overview or the aggregated results for the middle view
def get_ratios(id1, id2, direction, ops, bins=1, bins_col=1, jsonit=True):
hashname = create_hashname(id1, id2, bins, bins_col, direction, ops)
json_ratios = get_diff_cache(hashname)
if json_ratios is None:
#we calcula... | ise-uiuc/Magicoder-OSS-Instruct-75K |
tabooset = 1
if tabooflag != 1:
morpheme.append(token.surface)
if tabooset != 1:
morpheme.insert(0,0)
return morpheme
def wakati(title):
t=Tokenizer()
morpheme=[]
for token in t.tokenize(title):
morpheme.append(token.surface... | ise-uiuc/Magicoder-OSS-Instruct-75K |
def __init__(self, data):
self.auth_required = data['auth_required']
self.secret_key = data['secret_key']
request_obj = data['request_obj']
| ise-uiuc/Magicoder-OSS-Instruct-75K |
export function fileToReadable(file: string[][]): Readable {
return Readable.from(file.map((row) => row.join(',')).join('\n'));
}
| ise-uiuc/Magicoder-OSS-Instruct-75K |
count_true("in_residence"),
self,
),
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
":line_up" => {
self.scroll -= 1;
AppStateCmdResult::Keep
}
":open_stay" => {
match open::that(&Conf::default_location()) {
Ok(exit_status) => {
info!("open returned with exit_st... | ise-uiuc/Magicoder-OSS-Instruct-75K |
<reponame>rishabmenon/PyNimbus<filename>PyNimbus/nhcoutlooks.py<gh_stars>0
#!/usr/bin/env python3
| ise-uiuc/Magicoder-OSS-Instruct-75K |
await GET($"/project/doc/{escaped}?routing={escaped}")
.Fluent(c => c.Get<Project>(urlId, s=>s.Routing(urlId)))
.Request(c => c.Get<Project>(new GetRequest<Project>(urlId) { Routing = urlId }))
.FluentAsync(c => c.GetAsync<Project>(urlId, s=>s.Routing(urlId)))
.RequestAsync(c => c.GetAsync<Project>(n... | ise-uiuc/Magicoder-OSS-Instruct-75K |
self.createTree()
self.cm = cm.ConnectionManager(self.master, self.c_path, self)
def buildTree(self):
# 1. Start with defining lowest hierarchy, this is a hack and not suitable to all specchio implementations!
| ise-uiuc/Magicoder-OSS-Instruct-75K |
private function createRequest()
{
$request = new ListKeysRequest();
$request->type = $this->namespace->getBucketType();
$request->bucket = $this->namespace->getBucketName();
| ise-uiuc/Magicoder-OSS-Instruct-75K |
# if you wish to accept the SSPL and proceed with MongoDB deployment.
self.accept_sspl_license: MongoDbSsplLicenseAcceptance = MongoDbSsplLicenseAcceptance.USER_REJECTS_SSPL
config: AppConfig = AppConfig()
| ise-uiuc/Magicoder-OSS-Instruct-75K |
}
`}</style>
<rect className="cls-1" width="115" height="46" rx="6.98" />
<rect className="cls-2" y="69" width="184" height="46" rx="6.98" />
<rect className="cls-3" x="92" y="138" width="34.48" height="46" rx="6.98... | ise-uiuc/Magicoder-OSS-Instruct-75K |
return lags_per_service
def _get_minimal_resolution(self):
minimas_to_consider = [pd.Timedelta(1, unit = 's')]
for service_name, metric_vals in self.other_service_metric_vals.items():
if metric_vals.shape[0] > 0:
other_service_metric_vals_min_resolution = min(... | ise-uiuc/Magicoder-OSS-Instruct-75K |
When left index surpasses right index, stop iterating and move on to next value.
Can only calculate sums when current value is not positive. This is because three positive values can't sum to 0.
:type nums: List[int]
:rtype: List[List[int]]
"""
triplets = []
num... | ise-uiuc/Magicoder-OSS-Instruct-75K |
else:
return interpolate_channels(d, self.channels)[0]
| ise-uiuc/Magicoder-OSS-Instruct-75K |
content = itemgetter(*kl[:-2])(card)
pic = content['pic'] + '@64w_36h_1c.jpg'
content['pic'] = pic
| ise-uiuc/Magicoder-OSS-Instruct-75K |
// Register nav menus.
register_nav_menus( array(
'primary' => esc_html__( 'Primary Menu', 'company-elite' ),
'footer' => esc_html__( 'Footer Menu', 'company-elite' ),
'social' => esc_html__( 'Social Menu', 'company-elite' ),
) );
| ise-uiuc/Magicoder-OSS-Instruct-75K |
<gh_stars>1-10
"""Define all Palo Alto Networks actions."""
| ise-uiuc/Magicoder-OSS-Instruct-75K |
tests += MasterMixologistTests.allTests()
XCTMain(tests)
| ise-uiuc/Magicoder-OSS-Instruct-75K |
import uuid
except ImportError:
uuid = None
def read_file_as_json(file_path):
"""Reads the entire file as a JSON value and return it.
@param file_path: the path to the file to read
@type file_path: str
| ise-uiuc/Magicoder-OSS-Instruct-75K |
String::from(NAME_ENTRY_POINT_NAME),
Vec::new(),
String::cl_type(),
EntryPointAccess::Public,
EntryPointType::Contract,
)
}
| 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.