seed
stringlengths
1
14k
source
stringclasses
2 values
public static class GameAnalyticsWrapper
ise-uiuc/Magicoder-OSS-Instruct-75K
from flyingpigeon.log import init_process_logger from flyingpigeon.utils import rename_complexinputs from flyingpigeon import eodata from flyingpigeon.config import cache_path from datetime import datetime as dt from datetime import timedelta, time from tempfile import mkstemp import zipfile
ise-uiuc/Magicoder-OSS-Instruct-75K
id: Types.Scalars['UUID']; token: Types.Scalars['String']; }>; export type VerifyEmailMutation = { __typename?: 'Mutation', verifyEmail: { __typename?: 'VerifyEmailPayload', success: boolean | null, query: { __typename?: 'Query', currentUser: { __typename?: 'User', id: any, isVerified: boolean } | null } | null } | null }; export const VerifyEmailDocument = gql` mutation VerifyEmail($id: UUID!, $token: String!) {
ise-uiuc/Magicoder-OSS-Instruct-75K
"""Support for the Airzone diagnostics.""" from __future__ import annotations from typing import Any
ise-uiuc/Magicoder-OSS-Instruct-75K
))}
ise-uiuc/Magicoder-OSS-Instruct-75K
// 手札のn番目にカードをセット void Hands::setCard(int n, Card* card) {
ise-uiuc/Magicoder-OSS-Instruct-75K
pub const ONE_EIGHTH: f64 = 1.0 / 8.0; pub const ONE_TWELTH: f64 = 1.0 / 12.0; pub const ONE_TWENTY_FOURTH: f64 = 1.0 / 24.0; pub const TWO_THIRDS: f64 = 2.0 / 3.0; pub const THREE_HALVES: f64 = 3.0 / 2.0; pub const THREE_FIFTHS: f64 = 3.0 / 5.0; pub const SIX_FIFTHS: f64 = 6.0 / 5.0; pub const NINE_FIFTHS: f64 = 9.0 / 5.0; pub const TWELVE_FIFTHS: f64 = 12.0 / 5.0; pub const TWENTY_ONE_FIFTHS: f64 = 21.0 / 5.0; pub const TWENTY_SEVEN_FIFTHS: f64 = 27.0 / 5.0; pub const NINETEEN_OVER_360: f64 = 19.0 / 360.0;
ise-uiuc/Magicoder-OSS-Instruct-75K
if (ui.rootCertsControl->getFilename().isEmpty()) { QMessageBox::warning(this, "Error", "ルート証明書の指定は必須です。");
ise-uiuc/Magicoder-OSS-Instruct-75K
{ path: '/', name: 'Cesium', component: Cesium,
ise-uiuc/Magicoder-OSS-Instruct-75K
def main():
ise-uiuc/Magicoder-OSS-Instruct-75K
application = create_app()
ise-uiuc/Magicoder-OSS-Instruct-75K
*/ private function add( RequestInterface $request, ResponseInterface $response = null ) { $this->transactions[] = [ 'request' => $request, 'sent_request' => clone $request, 'response' => $response ]; if (count($this->transactions) > $this->limit) { array_shift($this->transactions); }
ise-uiuc/Magicoder-OSS-Instruct-75K
use Illuminate\Database\Seeder; use Faker\Generator as Faker; use App\Dish; class DishesTableSeeder extends Seeder { /** * Run the database seeds. * * @return void */ public function run(Faker $faker) {
ise-uiuc/Magicoder-OSS-Instruct-75K
# combine the tag_dummy one-hot encoding table to original movie files movie = pd.concat([movie, pd.DataFrame(tag_dummy)], 1) movie_col.extend(['tag' + str(i) for i in range(len(tag_table))]) movie.columns = movie_col movie = movie.drop('tag', 1) return movie
ise-uiuc/Magicoder-OSS-Instruct-75K
pp.277-280, 2003. Example -------
ise-uiuc/Magicoder-OSS-Instruct-75K
Adds a timedelta of +3 to localize to GMT-3 and a timedelta of -30min for the reminder. Args: dt_object(datetime.datetime): A datetime object. Returns: datetime.datetime: A datetime object localized and buffered. """ return dt_object + timedelta(hours=3) - timedelta(minutes=30)
ise-uiuc/Magicoder-OSS-Instruct-75K
return tmp; }
ise-uiuc/Magicoder-OSS-Instruct-75K
.withParams( ) .withMethod("POST") .responseSingle(false, Format.JSON) ); }
ise-uiuc/Magicoder-OSS-Instruct-75K
env = input('Load environment variables? (y/n): ').lower() options = ['y', 'n'] if env in options: if env == 'n': email = input('Email: ') password = input('Password: ') if email and password: client = SendBot(email, password, max_tries=100) # Sets active status
ise-uiuc/Magicoder-OSS-Instruct-75K
void SessionOrganizer::printSessionOrganiser ( char * filename) { a_star->printConference( filename); } double SessionOrganizer::scoreOrganization() {
ise-uiuc/Magicoder-OSS-Instruct-75K
public Pair<Integer, Integer> getBoundingBox(MemberSelectTree tree) { String name = tree.getIdentifier().toString(); int startOffset = content.indexOf(name, getEndOffset(tree.getExpression(), tree)); return Pair.of(startOffset, startOffset + name.length()); } public Pair<Integer, Integer> getBoundingBox(VariableTree tree) { String name = tree.getName().toString();
ise-uiuc/Magicoder-OSS-Instruct-75K
private static long test(YouTubeDownloader youTubeDownloader) { long startTime = System.currentTimeMillis(); // 第一次加装 youTubeDownloader.renderPopularVideos(); youTubeDownloader.renderVideoPage("catzzzzzzzzz"); // 第二次加载 proxy读缓存 class 从新加载 youTubeDownloader.renderPopularVideos(); youTubeDownloader.renderVideoPage("dancesvideoo"); youTubeDownloader.renderVideoPage("catzzzzzzzzz"); youTubeDownloader.renderVideoPage("someothervid");
ise-uiuc/Magicoder-OSS-Instruct-75K
} protected void showToast(String str) { showToast(str, Gravity.BOTTOM|Gravity.CENTER, 0, 30); } public void doStartActivity(Intent intent) { startActivity(intent);
ise-uiuc/Magicoder-OSS-Instruct-75K
mod utils;
ise-uiuc/Magicoder-OSS-Instruct-75K
.. _unicode: https://docs.python.org/2/library/functions.html#unicode ''' html_theme = 'sphinx_rtd_theme' html_theme_options = { "collapse_navigation": False, } html_last_updated_fmt = '%Y %b %d'
ise-uiuc/Magicoder-OSS-Instruct-75K
[JsonProperty(PropertyName = "judgeType")] public JudgeType JudgeType { get; set; } = JudgeType.ProgramJudge;
ise-uiuc/Magicoder-OSS-Instruct-75K
format.Name != Jpeg)) { return new ValidationResult(AcceptedFormatsMessage); } return ValidationResult.Success; } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
a.sort() print a print bisect.bisect_left(a, 5) print bisect.bisect_right(a, 5)
ise-uiuc/Magicoder-OSS-Instruct-75K
i++; } else if (i < n-1 && outcome[i] == 1 && outcome[i + 1] == 0) { count += 2; i++; } else {
ise-uiuc/Magicoder-OSS-Instruct-75K
edit->setPlainText("Hello"); SECTION("indent from beginning of line") { QTest::keyClick(edit, Qt::Key_Tab); REQUIRE(edit->toPlainText() == QString(" Hello")); }
ise-uiuc/Magicoder-OSS-Instruct-75K
with patch.dict(win_path.__salt__, dunder_salt), \ patch.dict(win_path.__opts__, dunder_opts): ret = win_path.exists(NAME) add_mock.assert_called_once_with(NAME, index=None, rehash=False) self.assert_called_once(rehash_mock) self.assertDictEqual( ret,
ise-uiuc/Magicoder-OSS-Instruct-75K
{ class CompileAsset : IAssetTransformer { public CompileAsset(ICompiler compiler, IDirectory rootDirectory) { this.compiler = compiler; this.rootDirectory = rootDirectory; } readonly ICompiler compiler; readonly IDirectory rootDirectory; public Func<Stream> Transform(Func<Stream> openSourceStream, IAsset asset) { return delegate
ise-uiuc/Magicoder-OSS-Instruct-75K
# TODO some errors would be best logged but kept non-fatal to still # fetch the most data possible. # Have an option for that. self.exception = sys.exc_info() await self.close()
ise-uiuc/Magicoder-OSS-Instruct-75K
use std::error; use std::convert::From; use std::str; use base64; #[derive(Debug,Eq, PartialEq, Hash, Copy, Clone)] pub enum CryptoProviderError { InvalidKey, UnimplementedAlgorithm, ValidationError,
ise-uiuc/Magicoder-OSS-Instruct-75K
You can also launch a set of production like applications * applications.wsgi -- A wsgi server * applications.celery -- A celery worker {usage} Options: -h | --help Shows this documentation <utility> The name of the utility to run """ import sys
ise-uiuc/Magicoder-OSS-Instruct-75K
func a{ struct Q<S:a protocol b{func g:b{{} }}enum b
ise-uiuc/Magicoder-OSS-Instruct-75K
tail = tmp; } c.pop(); if (tmp->next != nullptr) { c.push(tmp->next); } }
ise-uiuc/Magicoder-OSS-Instruct-75K
objs_from_test_wallet = [i for i in r.list()] assert len(objs_from_test_wallet) == 10 for o in objs_from_test_wallet: obj = j.data.serializers.json.loads(o) if obj["addr"] == "something:5": assert obj["name"] == "myuser_5" if obj["addr"] == "something:4": assert obj["name"] == "myuser_4" if obj["addr"] == "something:3": assert obj["name"] == "myuser_3" obj_id_3 = obj["id"] if obj["addr"] == "something:2":
ise-uiuc/Magicoder-OSS-Instruct-75K
}; export const fr: T.Labels = { days: ["Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam"], months: [ "Janvier", "Fevrier", "Mars", "Avril", "Mai",
ise-uiuc/Magicoder-OSS-Instruct-75K
from textacy.preprocessing import normalize_unicode # type: ignore from textdatasetcleaner.exceptions import TDCValueError from textdatasetcleaner.processors.base import BaseProcessor class NormalizeUnicodeProcessor(BaseProcessor):
ise-uiuc/Magicoder-OSS-Instruct-75K
from logging import getLogger from openprocurement.api.views.award_document import TenderAwardDocumentResource from openprocurement.api.utils import opresource LOGGER = getLogger(__name__)
ise-uiuc/Magicoder-OSS-Instruct-75K
import com.se21.calbot.repositories.TokensRepository; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest;
ise-uiuc/Magicoder-OSS-Instruct-75K
public class CustomResourceOwnerPasswordValidator : IResourceOwnerPasswordValidator { private readonly IUserRepository _userRepository; public CustomResourceOwnerPasswordValidator(IUserRepository userRepository) { _userRepository = userRepository; }
ise-uiuc/Magicoder-OSS-Instruct-75K
:param launcher: a Launcher object to manage jobs :type: SmartSim.Launcher """
ise-uiuc/Magicoder-OSS-Instruct-75K
crypto_news_df = data_pull(date_var) write_df(crypto_news_df, date_var)
ise-uiuc/Magicoder-OSS-Instruct-75K
"Environment :: No Input/Output (Daemon)", "Intended Audience :: System Administrators", "Natural Language :: English", "Topic :: Internet", "Topic :: Security", ], long_description=long_description, long_description_content_type='text/markdown', zip_safe=True)
ise-uiuc/Magicoder-OSS-Instruct-75K
sudo $SCRIPT_DIR/enable-ssh-for-image.sh $SCRIPT_DIR/../raspios/$RPI_OS.img fi docker build --target dockerpi-vm -t nesto/dockerpi "$SCRIPT_DIR/.."
ise-uiuc/Magicoder-OSS-Instruct-75K
].iter() { let str = r.0; let val = Rank(r.1); assert_eq!(val, str.parse().unwrap()); assert_eq!(val, serde_yaml::from_str(&str).unwrap()); assert_eq!(str, val.to_string()); } } #[test]
ise-uiuc/Magicoder-OSS-Instruct-75K
app = Flask(__name__) @app.route('/') def hello_world(): return render_template("hello.tpl", name="tiger")
ise-uiuc/Magicoder-OSS-Instruct-75K
if let Some(ll) = code_line_length(&line) { match current.as_mut() { Some(b) => { b.height += 1; b.width = b.width.max(ll); } None => { current = Some(CodeBlock { start: idx, height: 1, width: ll, }); } } } else if let Some(c) = current.take() {
ise-uiuc/Magicoder-OSS-Instruct-75K
<gh_stars>0 from config import sys_config import os #请在sudo命令和python3.5的环境下执行 #将server包以及model包添加到python环境当中 with open('/usr/local/lib/python3.5/dist-packages/JudgePath.pth','w') as file: file.write(sys_config['model']+'\n') file.write(sys_config['server']+'\n')
ise-uiuc/Magicoder-OSS-Instruct-75K
"""Stops the output displaying on the terminal """ global nullOutput nullOutput = open(os.devnull, 'w') sys.stdout = nullOutput # Restore
ise-uiuc/Magicoder-OSS-Instruct-75K
args = parser.parse_args()
ise-uiuc/Magicoder-OSS-Instruct-75K
// // implementations // template <class T> inline from_python<T>::from_python(PyObject* source) : base(source) { }
ise-uiuc/Magicoder-OSS-Instruct-75K
file_url = 'https://raw.githubusercontent.com/fivethirtyeight/data/master/avengers/avengers.csv' response = requests.get(file_url) file.write(response.text) with open('avengers.csv', 'r') as file: data_frame = pandas.read_csv(file)
ise-uiuc/Magicoder-OSS-Instruct-75K
# limitations under the License. from lib.actions import OrionBaseAction
ise-uiuc/Magicoder-OSS-Instruct-75K
VCS_SCHEMES = [ 'git', 'git+https', 'git+ssh', 'git+git', 'hg+http', 'hg+https', 'hg+static-http', 'hg+ssh', 'svn', 'svn+svn', 'svn+http', 'svn+https', 'svn+ssh',
ise-uiuc/Magicoder-OSS-Instruct-75K
def _encode_ens_contract(params: EnsContractParams) -> str: contract = EthereumContract(address=params.address, abi=params.abi, deployed_block=0) return contract.encode(method_name=params.method_name, arguments=params.arguments) def _decode_ens_contract(params: EnsContractParams, result_encoded: Any) -> ChecksumEthAddress: contract = EthereumContract(address=params.address, abi=params.abi, deployed_block=0) result = contract.decode( # pylint: disable=E1136 result=result_encoded, method_name=params.method_name,
ise-uiuc/Magicoder-OSS-Instruct-75K
import ddt from config_models.models import cache # cors_csrf is not in CMS' INSTALLED_APPS so these imports will error during test collection if settings.ROOT_URLCONF == 'lms.urls':
ise-uiuc/Magicoder-OSS-Instruct-75K
tfile.close() os.close(saved_stdout_fd)
ise-uiuc/Magicoder-OSS-Instruct-75K
UNIQUE(component, supplier) );"#; pub const DROP: &'static str = r#"DROP TABLE "Warehouse";"#; pub const fn new( uuid: Uuid, component: Uuid,
ise-uiuc/Magicoder-OSS-Instruct-75K
accessibilityIgnoresInvertColors = true } } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } override public var image: UIImage? { didSet { super.image = image updateLockScreenCoverArtwork(image: image)
ise-uiuc/Magicoder-OSS-Instruct-75K
""" Test the AerisWeather.custom_endpoint method """ try: awx = AerisWeather(app_id=app_id, client_id=client_id, client_secret=client_secret)
ise-uiuc/Magicoder-OSS-Instruct-75K
# making the legend show plt.legend() # adding a grid plt.grid(True,color='k') plt.show()
ise-uiuc/Magicoder-OSS-Instruct-75K
def set_session(session): sessions[request._get_current_object()] = session def create_session(response, data=None): current_session = get_session() if current_session: current_session.data.update(data or {})
ise-uiuc/Magicoder-OSS-Instruct-75K
UploadedFile, id=file_id )
ise-uiuc/Magicoder-OSS-Instruct-75K
] ) )
ise-uiuc/Magicoder-OSS-Instruct-75K
reducers: { updateChip(state: any, newChip: any) { if (newChip === undefined) { newChip = state; } return newChip; }, setRemaining(state: any, payload: any) { return { ...state, remaining: payload }; },
ise-uiuc/Magicoder-OSS-Instruct-75K
export * from './secretManagement.service';
ise-uiuc/Magicoder-OSS-Instruct-75K
* Copyright 2011 <NAME> <<EMAIL>> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS,
ise-uiuc/Magicoder-OSS-Instruct-75K
template <typename ObjInputIt, typename IdOutputIt>
ise-uiuc/Magicoder-OSS-Instruct-75K
dashboard._active_view = bnac class evt: geometry = dict(x0=1, x1=2, y0=3, y1=4, type="rect") t = bnac.get_selection_geometry_callback(dashboard) t(evt) assert self.result.equals(df.query("1<=a<=2 and 3<=b<=4"))
ise-uiuc/Magicoder-OSS-Instruct-75K
models.CASCADE, verbose_name=pgettext_lazy("ok:redirects", 'site') ) old_path = models.CharField( pgettext_lazy("ok:redirects", 'redirect from'), max_length=250, db_index=True, help_text=pgettext_lazy(
ise-uiuc/Magicoder-OSS-Instruct-75K
class Meta: table_name = "bilibili_users"
ise-uiuc/Magicoder-OSS-Instruct-75K
extension control_msgs { /// ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== public struct SingleJointPositionAction: Message { public static var md5sum: String = "c4a786b7d53e5d0983decf967a5a779e" public static var datatype = "control_msgs/SingleJointPositionAction" public static var definition = """ # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== SingleJointPositionActionGoal action_goal SingleJointPositionActionResult action_result SingleJointPositionActionFeedback action_feedback
ise-uiuc/Magicoder-OSS-Instruct-75K
@dp.callback_query_handler(calendar_cb.filter(), state=Menus.calendar) async def calendar_selection(callback_query: CallbackQuery, callback_data: dict, state: FSMContext):
ise-uiuc/Magicoder-OSS-Instruct-75K
class ViberBotResourceTest { }
ise-uiuc/Magicoder-OSS-Instruct-75K
def test_oxide_no_device(make_edalize_test): tf = make_edalize_test("oxide", param_types=[]) with pytest.raises(RuntimeError) as e: tf.backend.configure()
ise-uiuc/Magicoder-OSS-Instruct-75K
private initializeModels(targetCulture, options); }
ise-uiuc/Magicoder-OSS-Instruct-75K
let signature: String // base64 let pubKey: String // base64 let deviceId: String // uuid } fileprivate struct AuthUser: Codable { let userId: String let created: Date let lastAccess: Date let clientToken: String let token: String
ise-uiuc/Magicoder-OSS-Instruct-75K
cd ~/intel/vtune_amplifier source amplxe-vars.sh echo # Change directory back to projects working directory echo "Changing back to project root dir" cd $1 echo # Make RRT Project
ise-uiuc/Magicoder-OSS-Instruct-75K
for (int i = 0; i < coordinateArray.Length; i++) dict.Add(coordinateArray[i], colorArray[i]); return new BitmapPixelChanges(dict); } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
mw24.go_popup() nhis.once_go() safedriving.go()
ise-uiuc/Magicoder-OSS-Instruct-75K
uint n7 = g.AddNode("7"); g.LinkDirectional(n0, n1); g.LinkDirectional(n0, n5); g.LinkDirectional(n0, n3); g.LinkDirectional(n1, n2); g.LinkDirectional(n1, n4); g.LinkDirectional(n2, n3); g.LinkDirectional(n5, n6); g.LinkDirectional(n5, n7); g.LinkDirectional(n6, n3);
ise-uiuc/Magicoder-OSS-Instruct-75K
assert_eq!( client .latest_epoch_change_li() .unwrap() .ledger_info() .epoch(), curr_epoch ); } // bring back dead validator with waypoint let waypoint_epoch_2 = Waypoint::new_epoch_boundary(client.latest_epoch_change_li().unwrap().ledger_info()) .unwrap(); let (mut node_config, _) = load_node_config(&env.validator_swarm, 3);
ise-uiuc/Magicoder-OSS-Instruct-75K
return _getTraitMap() != null; }
ise-uiuc/Magicoder-OSS-Instruct-75K
with open("data.sample2.txt", "r") as fh: board = fh.readlines() board = [i.rstrip() for i in board] do_it_parallel(board)
ise-uiuc/Magicoder-OSS-Instruct-75K
logger::debug(FMT_STRING("Target Actor Graph Name is {}."), graph_name); auto this_AGObj = OHAF_datahandler->LookUpAGObjByName(graph_name); if (!this_AGObj) { logger::debug("Not Matching AnimGraph Type Found For Effect Target!"); return EventResult::kContinue; } //----------------------------------------------------------------------------------------- //----------------------Check Effect Type--------------------------------------------------
ise-uiuc/Magicoder-OSS-Instruct-75K
model_name='stats', name='no_of_not_verified_not_590', field=models.IntegerField(default=0), ), ]
ise-uiuc/Magicoder-OSS-Instruct-75K
// Put the code you want to measure the time of here. } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
msg = obj.send() print(obj) # take xor of previous result and the current message result = result ^ int(msg) receiver_s.close() return result def main(): r = peq_test_receiver(10, 4444) print(r)
ise-uiuc/Magicoder-OSS-Instruct-75K
return resource def prov_result_to_host_data(self, prov_result): """Transform provisioning result to needed host data.""" result = {} result["id"] = prov_result.get("name") result["name"] = prov_result.get("name") result["addresses"] = [prov_result.get("ip")] result["fault"] = {} result["status"] = STATUS_ACTIVE
ise-uiuc/Magicoder-OSS-Instruct-75K
x = int(instList[i+1][2], 16) if regs[0] & x != x:
ise-uiuc/Magicoder-OSS-Instruct-75K
COMMAND="${@}"
ise-uiuc/Magicoder-OSS-Instruct-75K
def __init__(self, station_to, belong_to): self._station_to = station_to self._belong_to = belong_to @property def station_to(self): """which station an edge link to""" return self._station_to
ise-uiuc/Magicoder-OSS-Instruct-75K
total = 0 string_sum = "" for c in a_string: total += int(c) if c == (a_string[len(a_string) - 1]): string_sum += c break temp = c + "+" string_sum += temp result = [string_sum, total] print result
ise-uiuc/Magicoder-OSS-Instruct-75K
xticklabels=self.matrix.shape[0]//10, yticklabels=self.matrix.shape[1]//10, ax=ax) ax.invert_yaxis() ax.set_title(self.label) ax.set_xlabel("query index") ax.set_ylabel("reference index") plt.show() class NoWindow(BaseWindow): label = "no window"
ise-uiuc/Magicoder-OSS-Instruct-75K
for s in list(self.subsets):
ise-uiuc/Magicoder-OSS-Instruct-75K
import lombok.Data; import java.util.ArrayList;
ise-uiuc/Magicoder-OSS-Instruct-75K
* 修改时间 */ private Date updatetime; }
ise-uiuc/Magicoder-OSS-Instruct-75K