seed
stringlengths
1
14k
source
stringclasses
2 values
article.measure_ego() article.save() except ValueError, e: article = None form._errors["url"] = form.error_class([str(e)]) # If no URL submitted, just set up a blank form
ise-uiuc/Magicoder-OSS-Instruct-75K
var dictionary = originalDictionary try Self.consumeAndValidateTypeFor(dictionary: &dictionary, parentPropertyName: parentPropertyName)
ise-uiuc/Magicoder-OSS-Instruct-75K
* Calculates and returns the maximum TPDUSize. This is equal to 2^(maxTPDUSizeParam) * * @param maxTPDUSizeParam * the size parameter * @return the maximum TPDU size */ public static int getMaxTPDUSize(int maxTPDUSizeParam) { if (maxTPDUSizeParam < 7 || maxTPDUSizeParam > 16) { throw new IllegalArgumentException("maxTPDUSizeParam is out of bound"); }
ise-uiuc/Magicoder-OSS-Instruct-75K
/** * A sql aggregation value object containing all the necessary information to build a sql aggregation. */ public class SqlAggregation { private final String fieldName; private final SqlAggFunction sqlAggFunction; /** * Constructor. *
ise-uiuc/Magicoder-OSS-Instruct-75K
"fid_USBHUB_Device" / Int32ul, "fid_DeviceDescription" / WString ) @declare(guid=guid("7426a56b-e2d5-4b30-bdef-b31815c1a74a"), event_id=119, version=0) class Microsoft_Windows_USB_USBHUB_119_0(Etw): pattern = Struct( "fid_USBHUB_HC" / Int8sl, "fid_USBHUB_Device" / Int32ul,
ise-uiuc/Magicoder-OSS-Instruct-75K
use rust_gpiozero::*;
ise-uiuc/Magicoder-OSS-Instruct-75K
#[cfg(test)] mod test { use super::specs::*; use super::*; #[test] fn test_bounds() { let mut vals = vec![16, 45, 45, 45, 82];
ise-uiuc/Magicoder-OSS-Instruct-75K
# Close MySQL connection before starting eggnog-mapper because it may run for days resulting in "MySQL server has gone away" error connection.close() # run eggnog-mapper for all proteins eggnog_outfile = self.run_eggnog_mapper() # TODO: remove mockup and uncomment run_eggnog_mapper call if commented out
ise-uiuc/Magicoder-OSS-Instruct-75K
user_instance = authenticate(email=form_data.username, password=<PASSWORD>, db=db) if user_instance:
ise-uiuc/Magicoder-OSS-Instruct-75K
api_version=API_VERSION) id_field = "template_id"
ise-uiuc/Magicoder-OSS-Instruct-75K
// export const array, list, collection, items, vector, tuple, set // or n
ise-uiuc/Magicoder-OSS-Instruct-75K
app = Sanic(__name__) @app.get("/<name>") async def handler(request: Request, name: str) -> HTTPResponse: return text(f"Hi {name}") # DO NOT DO THIS # @app.on_response # async def cors(_, resp): # resp.headers["Access-Control-Allow-Origin"] = "*"
ise-uiuc/Magicoder-OSS-Instruct-75K
""" Tests get_on_demand_scan_result method of PolarisClient when valid values are provided """ from rubrik_polaris.sonar.scan import get_on_demand_scan_result
ise-uiuc/Magicoder-OSS-Instruct-75K
#problem4_a) 24 #problem4_b) 6 #problem4_c) 1.5 #problem4_d) 5 # #PART 3: Programming #Write a script that asks the user to type in 3 different numbers. #If the user types 3 different numbers the script should then print out the #largest of the 3 numbers. #If they don't, it should print a message telling them they didn't follow
ise-uiuc/Magicoder-OSS-Instruct-75K
if let Some(last) = s.split_whitespace().last() { last.len() as i32 } else { 0 } } // string #[test] fn test1_58() { assert_eq!(length_of_last_word("Hello World".to_string()), 5);
ise-uiuc/Magicoder-OSS-Instruct-75K
<reponame>DPNT-Sourcecode/CHK-hbjk01<filename>virtualenv/Lib/site-packages/tdl/queue/abstractions/response/fatal_error_response.py<gh_stars>0
ise-uiuc/Magicoder-OSS-Instruct-75K
case opcode::push_8: co.stack.push< char >( ip.read< char >() ); break; // ... case opcode::absolute_jump: ip = ip.read< std::uint32_t >(); break; case opcode::relative_jump_if_false: { std::int32_t offset = ip.read< std::int32_t >(); if( !co.stack.pop< std::uint8_t >() ) {
ise-uiuc/Magicoder-OSS-Instruct-75K
""" @Time : 2022/1/11 14:30 @Auth : 吕伟康 @File :matplotlib_widget.py """ # -*- coding: utf-8 -*- """ @Time : 2021/12/15 10:52
ise-uiuc/Magicoder-OSS-Instruct-75K
output_path = os.path.join(output_dir,imgpath.split('/')[-1]) cv2.imwrite(os.path.join(output_dir, imgpath.split('/')[-1]), im) return if __name__ == "__main__": gpus = tf.config.experimental.list_physical_devices('GPU') for gpu in gpus: print(gpu) tf.config.experimental.set_memory_growth(gpu, True)
ise-uiuc/Magicoder-OSS-Instruct-75K
{ encoding: 'utf8', }, (e, out, err) => { if (out) { const versions = { local: manifest.version.trim().match(/^(\d+).(\d+).(\d+)/),
ise-uiuc/Magicoder-OSS-Instruct-75K
private String user; private String password; @Bean public LdapContextSource contextSource () { System.out.println("getting contextSource begin"); LdapContextSource contextSource= new LdapContextSource(); contextSource.setUrl(env.getRequiredProperty("ldap.url")); basePath = env.getRequiredProperty("ldap.base");
ise-uiuc/Magicoder-OSS-Instruct-75K
K1(new BigDecimal("2.72"), new BigDecimal("12.04")), K2(new BigDecimal("12.05"), new BigDecimal("20.23")), K3(new BigDecimal("20.28"), new BigDecimal("32.42")), K4(new BigDecimal("32.44"), new BigDecimal("54.08")), K5(new BigDecimal("54.31"), new BigDecimal("100.21")); private final BigDecimal min; private final BigDecimal max; private Category(BigDecimal min, BigDecimal max) { this.min = min; this.max = max; } public BigDecimal getMax() {
ise-uiuc/Magicoder-OSS-Instruct-75K
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers // Copyright (c) 2018-2020, The TurtleCoin Developers // Copyright (c) 2020, TRRXITTE inc. development Team // // Please see the included LICENSE file for more information. #include "StringInputStream.h" #include <string.h>
ise-uiuc/Magicoder-OSS-Instruct-75K
MAX_TRANSACTION_SIZE_IN_BYTES = 4096 SCRIPT_HASH_LENGTH = 32
ise-uiuc/Magicoder-OSS-Instruct-75K
private final boolean saveToFS; private final int maxCacheSize; public String saveStorage(Update update, Storage storage) throws IOException { String storageIdentifier = getStorageIdentifierByUUID(UUID.randomUUID().toString().substring(0, 8)); if (saveToFS) {
ise-uiuc/Magicoder-OSS-Instruct-75K
"mean": unumpy.nominal_values(quantity.value).tolist(), "std_dev": unumpy.std_devs(quantity.value).tolist(), "units": qs[0]['units'], "title": quantity._symbol_type.display_names[0]} doc[symbol.name] = sub_doc doc.update({"task_id": item["task_id"], "pretty_formula": item["pretty_formula"]}) return jsanitize(doc, strict=True) def update_targets(self, items): self.propstore.update(items) # This is a PITA, but right now there's no way to get this data from the
ise-uiuc/Magicoder-OSS-Instruct-75K
internal interface ICollectionParser { object Parse(string argName, IReadOnlyList<string> values);
ise-uiuc/Magicoder-OSS-Instruct-75K
// } // // //} //
ise-uiuc/Magicoder-OSS-Instruct-75K
sudo cp -ar ./BlackEyeSecurity /usr/share/ echo "[i] Installation sucessful." echo "[i] Making BlackEyeSecurity executable..." sudo mv /usr/share/BlackEyeSecurity/main.py /usr/share/BlackEyeSecurity/bes sudo chmod +x /usr/share/BlackEyeSecurity/bes sudo ln -s /usr/share/BlackEyeSecurity/bes /usr/bin/bes || echo "[i] Link already seems to exist." else sudo cp -ar ./BlackEyeSecurity /usr/share/ echo "[i] Installation sucessful." echo "[i] Making BlackEyeSecurity executable..." sudo mv /usr/share/BlackEyeSecurity/main.py /usr/share/BlackEyeSecurity/bes sudo chmod +x /usr/share/BlackEyeSecurity/bes sudo ln -s /usr/share/BlackEyeSecurity/bes /usr/bin/bes || echo "[i] Link already seems to exist." fi
ise-uiuc/Magicoder-OSS-Instruct-75K
<gh_stars>0 from django.contrib import admin from django.urls import include, path from django.conf import settings from django.conf.urls.static import static urlpatterns = [ path('admin/', admin.site.urls),
ise-uiuc/Magicoder-OSS-Instruct-75K
for (int i = 0, n = items.size(); i < n; ++i) { if (!(items[i] == col.items[i])) { return false; } } return true; } }
ise-uiuc/Magicoder-OSS-Instruct-75K
<td> <span>81</span> </td> <td>
ise-uiuc/Magicoder-OSS-Instruct-75K
) urlpatterns = [ url(r'^show/$', show, name='carton-tests-show'), url(r'^add/$', add, name='carton-tests-add'), url(r'^remove/$', remove, name='carton-tests-remove'), url(r'^remove-single/$', remove_single, name='carton-tests-remove-single'), url(r'^clear/$', clear, name='carton-tests-clear'), url(r'^set-quantity/$', set_quantity, name='carton-tests-set-quantity'), ]
ise-uiuc/Magicoder-OSS-Instruct-75K
PARTITIONS = GENERAL_PARTITIONS + GPU_PARTITIONS ACTIVE_JOB_STATES = ["RUNNING", "COMPLETING"] FINISHED_JOB_STATES = ["COMPLETED", "NODE_FAIL", "TIMEOUT", "FAILED", "CANCELLED"] JOB_STATES = ACTIVE_JOB_STATES + FINISHED_JOB_STATES def node2int(node): """custom function to convert nodename to int this one removes all chars from names like node1-001-01""" return int(''.join(filter(lambda x: x.isdigit(), node)))
ise-uiuc/Magicoder-OSS-Instruct-75K
void InitializeListControl(ModuleTags permissions, Int32 idCommunity, Boolean fromRecycleBin = false, Boolean fromOrganization = false); } }
ise-uiuc/Magicoder-OSS-Instruct-75K
function dock-wipe-all() { # Wipe all (default) app icons from the Dock # This is only really useful when setting up a new Mac, or if you don’t use # the Dock to launch apps. defaults write com.apple.dock persistent-apps -array }
ise-uiuc/Magicoder-OSS-Instruct-75K
<?php namespace App\Http\Controllers; use Illuminate\Foundation\Bus\DispatchesJobs; use Illuminate\Routing\Controller as BaseController; use Illuminate\Foundation\Validation\ValidatesRequests; use Illuminate\Foundation\Auth\Access\AuthorizesRequests; class Controller extends BaseController { use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
ise-uiuc/Magicoder-OSS-Instruct-75K
@dataclass class Tool: """An arbitrary tool used in a nox configuration.
ise-uiuc/Magicoder-OSS-Instruct-75K
void Write(short data); void Write(ushort data); void Write(string data); void Write(byte[] data); void Write(byte[] data, int index, int count);
ise-uiuc/Magicoder-OSS-Instruct-75K
_fakeAsync.Isolate(() => { var testing = AsyncMethodWithSingleDelay(); _fakeAsync.Tick(TimeSpan.FromDays(365.4 * 100)); return testing; }); Assert.Equal(new DateTime(2020, 9, 30).AddDays(365.4 * 100).ToUniversalTime(), _fakeAsync.UtcNow); }
ise-uiuc/Magicoder-OSS-Instruct-75K
make -j8
ise-uiuc/Magicoder-OSS-Instruct-75K
Returns: joined_array(complex): An complex-valued array of shape (batch_size, N, N, 1) """ joined_array = array[:, :, :, 0] + 1j * array[:, :, :, 1] return joined_array
ise-uiuc/Magicoder-OSS-Instruct-75K
id = id.replace("(", "_").replace(")", "_").replace("/", "_") return id def _get_name(site: dict) -> str: return site["providerName"]
ise-uiuc/Magicoder-OSS-Instruct-75K
from unet3d.config import load_config from unet3d.model import get_model logger = utils.get_logger('UNet3DPredictor') def _get_predictor(model, loader, output_file, config): predictor_config = config.get('predictor', {}) class_name = predictor_config.get('name', 'StandardPredictor') m = importlib.import_module('unet3d.predictor') predictor_class = getattr(m, class_name) # model: UNet3D, loader: test_loader, output_file: data.h5, config: config.yaml return predictor_class(model, loader, output_file, config, **predictor_config)
ise-uiuc/Magicoder-OSS-Instruct-75K
'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Framework :: Django', 'Framework :: Django :: 2.0', ], )
ise-uiuc/Magicoder-OSS-Instruct-75K
declare(strict_types=1); namespace SetBased\Stratum\SqlitePdo\Test; /** * Test cases for inserting a row. */
ise-uiuc/Magicoder-OSS-Instruct-75K
@property def raw_dictionary(self): return self._raw @property def title(self): return self._title @property def abstract(self): return self._abstract
ise-uiuc/Magicoder-OSS-Instruct-75K
Izračunaj. @repeat(5)@ @center@ @number1@ @hspacept(3)@ @sign@ @hspacept(3)@ @number2@ @hspacept(3)@ = @hspacept(3)@ @lib.check_number(value,60)@ @vspace@ @/repeat@
ise-uiuc/Magicoder-OSS-Instruct-75K
# Or, for i <= k < j: # # arr[k] > arr[k + 1] when k is even, and # arr[k] < arr[k + 1] when k is odd. # # # # # Example 1: # # Input: arr = [9,4,2,10,7,8,8,1,9] # Output: 5
ise-uiuc/Magicoder-OSS-Instruct-75K
"lat": location.get("lat"), "lon": location.get("lon"), }, "unit": "m", } } ], } example = es.search(index="geo_placename", body=query, size=examples_count) return [places.Place(e["_id"], e["_source"]) for e in example["hits"]["hits"]] def get_attribute(self, attr): """
ise-uiuc/Magicoder-OSS-Instruct-75K
import unittest import random import math from pyneval.model.euclidean_point import EuclideanPoint,Line def rand(k):
ise-uiuc/Magicoder-OSS-Instruct-75K
# Copyright 2021 The Cirq Developers # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. from typing import Sequence, Optional, Union, Collection
ise-uiuc/Magicoder-OSS-Instruct-75K
def money_precision_at_k(y_pred: pd.Series, y_true: pd.Series, item_price, k=5): y_pred = y_pred.swifter.progress_bar(False).apply(pd.Series) user_filter = ~(y_true.swifter.progress_bar(False).apply(len) < k) y_pred = y_pred.loc[user_filter] y_true = y_true.loc[user_filter]
ise-uiuc/Magicoder-OSS-Instruct-75K
<reponame>Dhanya-Tomsher/lootah <?php // “Do. Or do not. There is no try.” — Yoda
ise-uiuc/Magicoder-OSS-Instruct-75K
from .Error import debugPrint, printTraceBack localData = local() async def get(url, proxy=None, headers=None, byte=None, timeout: int = 15): global localData
ise-uiuc/Magicoder-OSS-Instruct-75K
from muttlib.dbconn import SqlServerClient
ise-uiuc/Magicoder-OSS-Instruct-75K
res = packet.wire_format if res is not None: return res.encode() return None
ise-uiuc/Magicoder-OSS-Instruct-75K
self.assertEqual(expected, self.mock_client.mock_calls) def test_creds(self): dns_test_common.write({ "corenetworks_username": API_USER, "corenetworks_password": <PASSWORD> }, self.config.corenetworks_credentials) self.auth.perform([self.achall]) expected = [ mock.call.add_txt_record(DOMAIN, "_acme-challenge." + DOMAIN, mock.ANY, mock.ANY) ]
ise-uiuc/Magicoder-OSS-Instruct-75K
@endforeach </ul> </div> </div> @if (count($errors) > 0) <ul class="alert alert-danger"> @foreach ($errors->all() as $error) <li> {{ $error }} </li> @endforeach </ul> @endif
ise-uiuc/Magicoder-OSS-Instruct-75K
select(getTestCategory), ), showVrnBtn$: currentTest$.pipe( select(getTestCategory), select(showVrnButton), ), showManoeuvresPassCertNumber$: currentTest$.pipe( select(getTestCategory),
ise-uiuc/Magicoder-OSS-Instruct-75K
<name>hbase.coprocessor.regionserver.classes</name> <value>org.apache.hadoop.hbase.security.access.AccessController</value> </property> EOF sed -i -e '/<configuration>/r proxy-config.xml' "${GPHD_ROOT}/hadoop/etc/hadoop/core-site.xml" "${GPHD_ROOT}/hbase/conf/hbase-site.xml" rm proxy-config.xml
ise-uiuc/Magicoder-OSS-Instruct-75K
:param column_name: Column name. :param kwargs: Provide any kwargs that `pd.to_datetime` can take. :returns: A pandas DataFrame with updated datetime data. """ # noqa: E501 df[column_name] = pd.to_datetime(df[column_name], **kwargs) return df
ise-uiuc/Magicoder-OSS-Instruct-75K
import boto3 def get_sentiment(text, language_code='en'): """Get sentiment. Inspects text and returns an inference of the prevailing sentiment (positive, neutral, mixed, or negative).
ise-uiuc/Magicoder-OSS-Instruct-75K
def compute_config(self):
ise-uiuc/Magicoder-OSS-Instruct-75K
{ std::cout << std::endl << "----- COMPARISON -----" << std::endl;
ise-uiuc/Magicoder-OSS-Instruct-75K
* are met: * * - Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
ise-uiuc/Magicoder-OSS-Instruct-75K
OpenLieroX - FontGenerator by <NAME>, <NAME> Code under LGPL ( 15-05-2007 )
ise-uiuc/Magicoder-OSS-Instruct-75K
url: response.body.html_url, title: response.body.title, description: response.body.body, open: response.body.state === 'open', owner, repo, type: 'issue', }; } catch (error) {
ise-uiuc/Magicoder-OSS-Instruct-75K
ridges_refine.append(ridge) peaks_refine.append(peak) return peaks_refine, ridges_refine def ridges_detection(cwt2d, vec): n_rows = cwt2d.shape[0] n_cols = cwt2d.shape[1] local_max = local_extreme(cwt2d, np.greater, axis=1, order=1) ridges = [] rows_init = np.array(range(1, 6)) cols_small_peaks = np.where(np.sum(local_max[rows_init, :], axis=0) > 0)[0] for col in cols_small_peaks: best_rows = rows_init[np.where(local_max[rows_init, col])[0]] rows, cols = ridge_detection(local_max, best_rows[0], col, n_rows, n_cols, True, True)
ise-uiuc/Magicoder-OSS-Instruct-75K
fi fi } posix_mode_disable() { if posix_mode_is_on; then echo "INFO: Bash POSIX mode is ON; turning it off" 1>&2 set +o posix fi }
ise-uiuc/Magicoder-OSS-Instruct-75K
/** *
ise-uiuc/Magicoder-OSS-Instruct-75K
} """ """ class Planets(PlayerUI): def __init__(self, action, **kwargs): super().__init__(**kwargs) if not self.player(): return # Planets filter filters = ['My Planets', 'Team planets', 'Neutral Planets', 'Enemy Planets', 'Uninhabited Planets', 'All Planets', 'All Suns'] for f in filters: self.options_planets_filter.append(f)
ise-uiuc/Magicoder-OSS-Instruct-75K
RequiredMods = new List<Type>() { typeof(Mods.ModsList.UnreleasedContentMod) }; PilotInfo = new PilotCardInfo ( "Bo-K<NAME>",
ise-uiuc/Magicoder-OSS-Instruct-75K
INDEX_URL = urls.reverse('horizon:admin:goals:index') DETAILS_VIEW = 'horizon:admin:goals:detail' class GoalsTest(test.BaseAdminViewTests): @mock.patch.object(api.watcher.Goal, 'list') def test_index(self, mock_list): mock_list.return_value = self.goals.list() res = self.client.get(INDEX_URL) self.assertTemplateUsed(res, 'infra_optim/goals/index.html') goals = res.context['goals_table'].data self.assertCountEqual(goals, self.goals.list())
ise-uiuc/Magicoder-OSS-Instruct-75K
<filename>ClassWorks/Lessons3/Tuples.py a = (1, 2, 3, 4, 5)
ise-uiuc/Magicoder-OSS-Instruct-75K
def unloadModel(self, model_name): response_future = self.stub.Unload.future(worker_pb2.ModelManageRequest(model_name=model_name)) response = response_future.result() if response.model_status == worker_pb2.ModelManageResponse.Status.UNLOADED: return True
ise-uiuc/Magicoder-OSS-Instruct-75K
from django.core.exceptions import ImproperlyConfigured, PermissionDenied, ValidationError, NON_FIELD_ERRORS from django.core.urlresolvers import reverse from django.db.models.fields.related import ManyToManyRel from django.http import HttpResponse, HttpResponseServerError from django.template.defaultfilters import capfirst, linebreaksbr from django.utils import six from django.utils.encoding import force_text, smart_text from django.utils.html import conditional_escape, format_html from django.utils.safestring import mark_safe from django.utils.translation import ugettext_lazy as _
ise-uiuc/Magicoder-OSS-Instruct-75K
ENG_B2_3 = 'eng_b2_3_button' ENG_B11_1 = 'eng_b11_1_button' ENG_B11_2 = 'eng_b11_2_button' ENG_B12_1 = 'eng_b12_1_button'
ise-uiuc/Magicoder-OSS-Instruct-75K
if isinstance(struc, pyxtal): struc = struc.to_ase() if not isinstance(struc, Atoms): raise NotImplementedError("only support ASE atoms object") self.structure = struc self.folder = path if not os.path.exists(self.folder): os.makedirs(self.folder)
ise-uiuc/Magicoder-OSS-Instruct-75K
void Void(); } }
ise-uiuc/Magicoder-OSS-Instruct-75K
n1 = float(input("Digite um número: ")) n2 = float(input("Digite outro: ")) m = (n1 + n2) / 2 print('{:.2f}'.format(m))
ise-uiuc/Magicoder-OSS-Instruct-75K
__uri__ = "https://github.com/Netflix-Skunkworks/historical" __version__ = "0.4.10" __author__ = "The Historical developers" __email__ = "<EMAIL>" __license__ = "Apache License, Version 2.0" __copyright__ = f"Copyright 2017 {__author__}"
ise-uiuc/Magicoder-OSS-Instruct-75K
public class HBaseInterfaceAudienceSpark extends HBaseInterfaceAudience { //https://github.com/apache/hbase/blob/e6e52cd80f4ba26b196e2d20cd84ba167b303475/hbase-common/src/main/java/org/apache/hadoop/hbase/HBaseInterfaceAudience.java public static final String SPARK = "Spark"; }
ise-uiuc/Magicoder-OSS-Instruct-75K
.get(artController.findAllByUser) // don't allow posts to artbyuser because that's inappropriate // All art, as posted, requires a user as a field and, as such, all posted art
ise-uiuc/Magicoder-OSS-Instruct-75K
try: status = api.get_status(parent_tweet_id, tweet_mode="extended")
ise-uiuc/Magicoder-OSS-Instruct-75K
--algorithm curl \ --eval_episodes 100 \ --seed 0
ise-uiuc/Magicoder-OSS-Instruct-75K
from fastapi_websocket_pubsub import PubSubEndpoint import asyncio import os from starlette.websockets import WebSocket import uvicorn from fastapi import FastAPI from fastapi.routing import APIRouter PORT = int(os.environ.get("PORT") or "8000")
ise-uiuc/Magicoder-OSS-Instruct-75K
DecodeAndroidManifestPath = ReslovePath(TestDirUnZipXmlPath, 'AndroidManifest_Decode.xml') InjectMsfSmaliPath = ReslovePath(TestDirMsfUnSmaliPath, 'classes') AppLauncherActivity, MoveAppLauncherActivityClassPath, InjectAppLauncherActivitSmaliPath = Inject.GetInjectAppLauncherActivitFile(appdexpath=TestDirAppUnSmaliPath, androidmanifestfile=DecodeAndroidManifestPath) VARS = Inject.RandomMsfSmali(msfsmalipath=InjectMsfSmaliPath) i = 0 while True: ChangeCode = Inject.InjectMsf2SmaliFile(vars=VARS, injectapplauncheractivitsmalipath=InjectAppLauncherActivitSmaliPath) if ChangeCode == False and i == 0: Print.PrintError(f'不能在`{InjectAppLauncherActivitSmaliPath}`中找到App默认启动组件`.method public onCreate()V`, 无法将Msf注入App! 请分析此文件逻辑,找到默认启动组件所在的smali文件. 请参考`https://github.com/cleverbao/520apkhook/issues/1`.') Print.PrintInfo(f'是否找到App默认启动组件? 输入`n/N`退出程序.\n') SmaliPath = Print.PrintInput(f'Input').strip()
ise-uiuc/Magicoder-OSS-Instruct-75K
#include <iostream> #include <fstream> #include <cmath> #include <algorithm> #include <vector> #include <set> #include <map> #include <stack> #include <queue> #include <cstdlib> #include <cstdio> #include <string> #include <utility> #include <iomanip>
ise-uiuc/Magicoder-OSS-Instruct-75K
if self._lvl >= LOGLEVEL.WARN: print("{}--:\033[95m Warning\033[0m :--- {}".format(datetime.datetime.now().strftime("t:%S.%f"), text)) def info(self, text): # Green if self._lvl >= LOGLEVEL.INFO: print("{}--:\033[92m Info\033[0m :--- {}".format(datetime.datetime.now().strftime("t:%S.%f"), text)) def debug(self, text): # Yellow if self._lvl >= LOGLEVEL.DEBUG: print("{}--:\033[93m Debug\033[0m :--- {}".format(datetime.datetime.now().strftime("t:%S.%f"), text)) def blue(self, text): # Blue if self._lvl >= LOGLEVEL.DEBUG: print("{}--:\033[94m Debug\033[0m :--- {}".format(datetime.datetime.now().strftime("t:%S.%f"), text))
ise-uiuc/Magicoder-OSS-Instruct-75K
export default PageNotFound;
ise-uiuc/Magicoder-OSS-Instruct-75K
* @param res * @param sigService */ export async function listSigs( req: Request, res: Response, sigService: ISigService ) { // Gather paginate query.
ise-uiuc/Magicoder-OSS-Instruct-75K
body = { 'values': values } col = 'C' row = 1
ise-uiuc/Magicoder-OSS-Instruct-75K
PENDING_CONFIRM = 1 PENDING_CANCEL = 2 CANCELED = 3 CONFIRMED = 4 FAILED = 5
ise-uiuc/Magicoder-OSS-Instruct-75K
return True except AssertionError as ex: print(ex) return False
ise-uiuc/Magicoder-OSS-Instruct-75K
<div class="container"> <div class="service_area"> <div style="position: relative; height: 400vh;margin-top: 2em;"> <iframe src="/assets/web/viewer.html?file=<?= $pdffile ?>" type="application/pdf" frameborder="0" marginheight="0;" style="position: absolute; height: 1000vh; width: 100%; margin:0 auto; overflow: scroll; -webkit-box-pack: center; -webkit-box-align: center; display: -webkit-box;"> </iframe> </div> </div> </div> </section>
ise-uiuc/Magicoder-OSS-Instruct-75K
num //= g if possible: return [num, den] else: return ["Impossible"]
ise-uiuc/Magicoder-OSS-Instruct-75K
setBangs(newBangs); setUnsavedChanges(true); }; return ( <tr> <td><input type="text" value={bang} onChange={bangChanged} style={bangCss} /></td> <td><input type="text" value={bangInfo.url} onChange={urlChanged} /></td> <td><button type="button" title="Trash" onClick={trashBtnlicked}>🗑</button></td> </tr> ); }
ise-uiuc/Magicoder-OSS-Instruct-75K
#include "ddd.h"
ise-uiuc/Magicoder-OSS-Instruct-75K
fi $CXX $CXXFLAGS -I. -O3 -g0 -DLDID_NOSMIME -DLDID_NOPLIST -c -o ldid.o ldid.cpp $CC $CFLAGS -I. -O3 -g0 -DLDID_NOSMIME -DLDID_NOPLIST -c -o lookup2.o lookup2.c $CXX $CXXFLAGS -I. -O3 -g0 -o ldid ldid.o lookup2.o $LDFLAGS mkdir -p $PREFIX/bin cp ldid $PREFIX/bin
ise-uiuc/Magicoder-OSS-Instruct-75K