seed
stringlengths
1
14k
source
stringclasses
2 values
public String preLogin(HttpServletRequest request) {
ise-uiuc/Magicoder-OSS-Instruct-75K
// if we find an infinite loop, we want to disconnect and provide an error if(!checkForInfiniteLoops()) { ofLogError("ofxSoundObject") << "There's an infinite loop in your chain of ofxSoundObjects"; disconnect(); } return soundObject; } //-------------------------------------------------------------- void ofxS...
ise-uiuc/Magicoder-OSS-Instruct-75K
import BigInt public enum DownloadBalanceOperationError: Error { case responseParsing } public class DownloadBalanceOperation: AsynchronousOperation { public var address: String public var balance: BigInt? public init(address: String) {
ise-uiuc/Magicoder-OSS-Instruct-75K
export * from './graphql-codegen.plugin';
ise-uiuc/Magicoder-OSS-Instruct-75K
* */ @Repository public interface AssetRepository extends JpaRepository<Asset, String>, JpaSpecificationExecutor<Asset> { }
ise-uiuc/Magicoder-OSS-Instruct-75K
def __str__(self): data = [self.address, self.name, self.owner, self.kind, self.note] return ';'.join(data) __repr__ = __str__ def main(): '''Entry point''' args = docopt(__doc__, version='0.0.1')
ise-uiuc/Magicoder-OSS-Instruct-75K
<reponame>lloydlentz/newcomputer<gh_stars>0 find /Users/cledwyn/Downloads/* -mtime +7 -exec rm -f {} \;
ise-uiuc/Magicoder-OSS-Instruct-75K
return 1; return (self.leftChild.getLeafCount() if self.leftChild is not None else 0) +\ (self.rightChild.getLeafCount() if self.rightChild is not None else 0);
ise-uiuc/Magicoder-OSS-Instruct-75K
Some(&payer.pubkey()), ); transaction.sign( &[&payer, &memory_keypair, &user_accounts_owner], recent_blockhash, ); assert!(banks_client.process_transaction(transaction).await.is_ok()); }
ise-uiuc/Magicoder-OSS-Instruct-75K
{ "name": "image-name-without-extension",
ise-uiuc/Magicoder-OSS-Instruct-75K
self.recording['frames'][self.frame]['joysticks'][1]['axes'][0] * self.compensation) if self.recording['frames'][self.frame]['joysticks'][2]['buttons'][1] and not self.recording['frames'][self.frame - 1]['joysticks'][2]['buttons'][1]: self.arm.actuate_claw() if self...
ise-uiuc/Magicoder-OSS-Instruct-75K
/// </summary> public WindowsServiceInstaller() {
ise-uiuc/Magicoder-OSS-Instruct-75K
def __len__(self): return len(self.fullname())
ise-uiuc/Magicoder-OSS-Instruct-75K
then echo "[+] Added symlink for TCPSocket.cpp at: ${CURR_DIR}/os-lib/mbed-os/features/netsocket/TCPSocket.cpp" else echo "[-] ERROR: Failed to add symlink for TCPSocket.cpp at: ${CURR_DIR}/os-lib/mbed-os/features/netsocket/TCPSocket.cpp" fi # symlinks for for instrumented serial to measure IO cycels # add to...
ise-uiuc/Magicoder-OSS-Instruct-75K
utils.exec_sed_command(old_list, new_list, os.path.join(cur_model_path, "scripts/run_train.sh")) old_list = ["with open(cache_path, \\\"wb\\\")", "pickle.dump"] new_list = ["\\# with open(cache_path, \\\"wb\\\")", "\\# pickle.dump"] utils.exec_sed_command(old_list, new_list, os.path.join(cur_model_path,...
ise-uiuc/Magicoder-OSS-Instruct-75K
declare function take<T>(n: number, iterable: Wrappable<T>): IterableIterator<T>; declare function take<T>(n: number): (iterable: Wrappable<T>) => IterableIterator<T>; export { take };
ise-uiuc/Magicoder-OSS-Instruct-75K
{-Math.Sin((x_axis_rotation * 3.14159f / 180.0f)), Math.Cos((x_axis_rotation * 3.14159f / 180.0f)) } };
ise-uiuc/Magicoder-OSS-Instruct-75K
this.id = id; }
ise-uiuc/Magicoder-OSS-Instruct-75K
] } public var viewModifiers: [AnyViewModifying.Type] { [ GaugeModifier.self, MetricCard.self, Card.self, ] }
ise-uiuc/Magicoder-OSS-Instruct-75K
public void Execute(string enumItem, string enumType) { this.shopBallMenu.Print(); this.shopBallMenu.RunChoice(); } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
export { RestaurantInfo } from './RestaurantInfo';
ise-uiuc/Magicoder-OSS-Instruct-75K
describe('screen: TransactionDetails/MsgVerifyInvariant', () => { it('matches snapshot', () => { const message = new MsgVerifyInvariant({ category: 'crisis', type: 'MsgVerifyInvariant', sender: 'sender', invariantModuleName: 'invariantModuleName', invariantRoute: 'invariantRoute', ...
ise-uiuc/Magicoder-OSS-Instruct-75K
# def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right from local_packages.binary_tree import TreeNode class Solution: def sumNumbers(self, root: TreeNode) -> int: # Recursive helper to pass down the parent's value
ise-uiuc/Magicoder-OSS-Instruct-75K
let window = UIWindow(frame: UIScreen.main.bounds) window.makeKeyAndVisible() window.rootViewController = navigationController _ = messagesViewController.view } override func tearDown() { messagesViewController = nil navigationController = nil apiClientFa...
ise-uiuc/Magicoder-OSS-Instruct-75K
Profile=np.load('./GPR_Modelling/Profile_TunnelLining/TunnelLining_Iter_%s.npy'%iteration) ProfileGain=T_PowerGain.tpowGain(Profile,np.arange(7000)/4,0.9) ProfileGain=skimage.transform.resize(ProfileGain,(512,512),mode='edge') ProfileGain=DataNormalized.DataNormalized(ProfileGain)/255 ...
ise-uiuc/Magicoder-OSS-Instruct-75K
class Key(models.Model): key_ref = models.UUIDField(primary_key=True) key = models.CharField(max_length=512) init_vector = models.CharField(max_length=512) expire_date = models.DateTimeField() created = models.DateTimeField(auto_now_add=True) def __str__(self): return str(self.key_ref)
ise-uiuc/Magicoder-OSS-Instruct-75K
"/ws/**" )); } protected abstract Trie<String> createTrie();
ise-uiuc/Magicoder-OSS-Instruct-75K
def done(title, dest, downloaded): playing = xbmc.Player().isPlaying() text = xbmcgui.Window(10000).getProperty('SF-DOWNLOADED') if len(text) > 0: text += '[CR]' if downloaded: text += '%s : %s' % (dest.rsplit(os.sep)[-1], '[COLOR forestgreen]Download succeeded[/COLOR]')
ise-uiuc/Magicoder-OSS-Instruct-75K
BUILD_VER="${LATEST_TAG}+${SHORT_SHA}"
ise-uiuc/Magicoder-OSS-Instruct-75K
/// Логика взаимодействия для MangaForm.xaml
ise-uiuc/Magicoder-OSS-Instruct-75K
// Copyright © 2020 SparkLone. All rights reserved. // import SwiftUI struct PreviewsList: View { @State private var starred: [PreviewHolder.Type] = [] @State private var general: [PreviewHolder.Type] = [] var body: some View {
ise-uiuc/Magicoder-OSS-Instruct-75K
tracer = {"games":"Overwatch", "hero":"Tracer", "userNum":8888} testdb.games.insert(tracer) for doc in testdb.games.find(): print(doc)
ise-uiuc/Magicoder-OSS-Instruct-75K
self.remove_tag(self.main_content, 'div', attrs={'class': 'contentRatingWidget'}) self.remove_tag(self.main_content, 'div', attrs={'class': 'widget article__fromTopic topics'}) self.remove_tag(self.main_content, 'div', attrs={'class': 'nocontent'}) super(InfoQExtractor, self).cleanup()
ise-uiuc/Magicoder-OSS-Instruct-75K
requires.append('aiohttp>=3.6.0,<4.0.0') elif major == 2 and minor <= 6:
ise-uiuc/Magicoder-OSS-Instruct-75K
T WriteState(); void ReadState(T memento); } }
ise-uiuc/Magicoder-OSS-Instruct-75K
print(f"The highest score in the class is: {max_score} at position {max_index}") max(student_scores) min(student_scores)
ise-uiuc/Magicoder-OSS-Instruct-75K
class d:C
ise-uiuc/Magicoder-OSS-Instruct-75K
) -> Option<ScatterRecord> { None } fn scattering_pdf(&self, _: &Ray, _: &HitRecord, _: &Ray) -> FSize { 1.0 } fn has_alpha(&self) -> bool { true }
ise-uiuc/Magicoder-OSS-Instruct-75K
from .response import BoltResponse
ise-uiuc/Magicoder-OSS-Instruct-75K
<gh_stars>0 <?php echo view('users/templates/header'); echo view('users/templates/aside');
ise-uiuc/Magicoder-OSS-Instruct-75K
voxels_per_side = 31 ampal_1ubq = ampal.load_pdb(str(test_file)) for atom in ampal_1ubq.get_atoms(): if not cfds.default_atom_filter(atom): del atom.parent.atoms[atom.res_label] del atom with tempfile.TemporaryDirectory() as tmpdir: # Obtain atom encoder: ...
ise-uiuc/Magicoder-OSS-Instruct-75K
migrations.AddField( model_name='transactionmetrix', name='only_rfid_upc_num', field=models.PositiveIntegerField(default=0), ), ]
ise-uiuc/Magicoder-OSS-Instruct-75K
<filename>Launcher/Program.cs using System.Diagnostics; using System.IO; namespace Launcher { class Program {
ise-uiuc/Magicoder-OSS-Instruct-75K
def read(self, **kwargs) -> str: reply, status_code = self.visalib.read(self.session) return reply def write(self, message: str, **kwargs) -> Tuple[int, STATUS_CODE]: self.visalib.write(self.session, message) return len(message), constants.StatusCode.success
ise-uiuc/Magicoder-OSS-Instruct-75K
if (self.request.get('_method') == 'DELETE'): return self.delete() s = json.dumps(self.handle_upload(), separators=(',',':')) redirect = self.request.get('redirect') if redirect: return self.redirect(str( redirect.replace('%s', urllib.quote(s, ''),...
ise-uiuc/Magicoder-OSS-Instruct-75K
the logic provided in the `start` function """
ise-uiuc/Magicoder-OSS-Instruct-75K
valor = int(input('Qual valor você quer sacar: R$')) while True:
ise-uiuc/Magicoder-OSS-Instruct-75K
MethodTerminal = NewType("MethodTerminal", ET.Element) WhileLoop = NewType("WhileLoop", ET.Element) Terminal = NewType("Terminal", ET.Element) PairedConfigurableMethodCall = NewType("PairedConfigurableMethodCall",ET.Element) SequenceNode = NewType("PairedConfigurableMethodCall",ET.Element)
ise-uiuc/Magicoder-OSS-Instruct-75K
from ..generics import DeleteAction from ..register import register_action @register_action("topic.delete") class TopicDelete(DeleteAction): """ Action to delete simple topics that can be shown in the agenda. """
ise-uiuc/Magicoder-OSS-Instruct-75K
"coverartmime"]: del(comments[key]) if config.getboolean("editing", "save_to_songs"): email = email or const.EMAIL rating = self("~#rating") if rating != RATINGS.default: comments["rating:" + email] = str(rating) ...
ise-uiuc/Magicoder-OSS-Instruct-75K
for port in ports: p = c << pad if port.orientation == 0: p.x = port.x + pad_port_spacing p.y = port.y c.add(connect_electrical_shortest_path(port, p.ports["W"])) elif port.orientation == 180: p.x = port.x - pad_port_spacing p.y = ...
ise-uiuc/Magicoder-OSS-Instruct-75K
* specific language governing permissions and limitations * under the License. */ package pathstore.client; import com.datastax.driver.core.*;
ise-uiuc/Magicoder-OSS-Instruct-75K
{ // This script allows you to translate the current GameObject relative to the camera public class LeanTranslate : MonoBehaviour { [Tooltip("Ignore fingers with StartedOverGui?")] public bool IgnoreStartedOverGui = true; [Tooltip("Ignore fingers with IsOverGui?")] public bool IgnoreIsOverGui; [Tooltip("...
ise-uiuc/Magicoder-OSS-Instruct-75K
@param[in] server - the server instance """ def createModuleInstance(server): return Net(server) def importCLI(parent): """ Import a CLI instance to main CLI """ netcli = cli.CLI(parent) return netcli
ise-uiuc/Magicoder-OSS-Instruct-75K
namespace demofw { namespace glfw { MouseProvider::MouseProvider(GLFWwindow* window) : mWindow(window)
ise-uiuc/Magicoder-OSS-Instruct-75K
String, ForeignKey("users.username", ondelete="CASCADE"), nullable=False ) user = relationship("User") class User(Base):
ise-uiuc/Magicoder-OSS-Instruct-75K
done #node server.js http://127.0.0.1:10000
ise-uiuc/Magicoder-OSS-Instruct-75K
<table class="table table-striped"> <thead> <tr> <th></th> <th>タイトル</th> <th>価格</th> <th>発売日</th> <th>出版社</th> <th>著者</th> </tr> </thead> <tbody> @foreach (var ...
ise-uiuc/Magicoder-OSS-Instruct-75K
assert df['text'].tolist()[:2] == ['Some cool data', 'Even more cool data'] # Note that NaN != NaN, so we can do this assertion instead assert pd.isna(df['text'].tolist()[2]) def test_make_df_2(pg_conn):
ise-uiuc/Magicoder-OSS-Instruct-75K
prefix = p.encode_into_pdu(encode_state) encode_state = encode_state._replace(coded_message=prefix)
ise-uiuc/Magicoder-OSS-Instruct-75K
<a class="btn pink xlrg" data-transition="slide" data-inline="true" href="nearme.html">Vouchers near me</a> </div> <? //endif;?> <div class="foot-surr"> <div class="foot"> <div class="foot-inner"> <a class="btn blue ou...
ise-uiuc/Magicoder-OSS-Instruct-75K
return in_s, in_s_S, netG, netS def draw_concat(Gs, masks, reals, NoiseAmp, in_s, mode, opt): ''' :param Gs: [G0] :param mask: [down scaled _mask] :param reals: [image pyramid] only used to represent the image shape :param NoiseAmp: [1] :param in_s: all zeros [1, 3, 26, 26] :param mode...
ise-uiuc/Magicoder-OSS-Instruct-75K
''' @Author: AnakinJiang @Email: <EMAIL>9 AT gmail.com @Descripttion: requests测试demo @Date: 2019-08-27 15:37:14 @LastEditors: AnakinJiang @LastEditTime: 2019-08-27 16:55:06 ''' import requests def get_test():
ise-uiuc/Magicoder-OSS-Instruct-75K
export * from './JsonArray' export * from './JsonType'
ise-uiuc/Magicoder-OSS-Instruct-75K
urlpatterns = patterns('mtracker', #url(r'^$', 'main.views.index', name='index'), url(r'^admin/', include(admin.site.urls)), url(r'^documentation/$', 'docs.views.docs_readme', name='docs_main'), (r'^bad/$', bad), ) urlpatterns += patterns('', url(r'', include('mturk.api.urls')), url(r'', inc...
ise-uiuc/Magicoder-OSS-Instruct-75K
import { Entity, EntityBuilder, Record } from 'src/utilities/entity'
ise-uiuc/Magicoder-OSS-Instruct-75K
it('default comparator', () => { expect(Array.from(untilUnchange(init, callback))).toMatchSnapshot() }) it('custom comparator', () => { expect(Array.from(untilUnchange(init, callback, equal))).toMatchSnapshot() })
ise-uiuc/Magicoder-OSS-Instruct-75K
<div class="form-group"> <label for="pwd">Mật Khẩu Mới: </label> <input type="password" class="form-control" id="pass_new" name="pass_new" id="pwd"> </div> <div class="form-group"> <label for="pwd">Nhập Lại Mật Khẩu: </label> <input type="p...
ise-uiuc/Magicoder-OSS-Instruct-75K
total_steps = len(train_dataloader) * n_epochs optimizer = AdamW(model.parameters(), lr=lr) scheduler = get_linear_schedule_with_warmup(optimizer, num_warmup_steps = 0, num_training_steps = total_steps) model.zero_grad() ...
ise-uiuc/Magicoder-OSS-Instruct-75K
# Copyright and Distribution # # Part of SimplePyGA: Simple Genetic Algorithms in Python # Copyright (c) 2016 <NAME> (<EMAIL>) # Released under The MIT License # See LICENSE file in top-level package folder # #-----------------------------------------------------------------------
ise-uiuc/Magicoder-OSS-Instruct-75K
from . import LossType def create_loss(config: yacs.config.CfgNode) -> nn.Module: loss_name = config.train.loss if loss_name == LossType.L1.name: return nn.L1Loss(reduction='mean') elif loss_name == LossType.L2.name:
ise-uiuc/Magicoder-OSS-Instruct-75K
def find_card_name(im, debug): """Detects the name of the card by OCR (Optical Character Recognition).
ise-uiuc/Magicoder-OSS-Instruct-75K
COALESCE(json_agg( CASE WHEN schedules.weekday <> 2 THEN NULL::json ELSE json_build_object('schedule_id', schedules.scid, 'start_hour', schedules.start_hour, 'end_hour', schedules.end_hour, 'duration', sc...
ise-uiuc/Magicoder-OSS-Instruct-75K
echo 'OK'; }
ise-uiuc/Magicoder-OSS-Instruct-75K
/** * This is a extension for Images or Links input. */ class ImagesLinks extends InlineAdapter { /** inline {@inheritdoc} */
ise-uiuc/Magicoder-OSS-Instruct-75K
self.setExpanded(False) def changeColor(self): self.layer.new_colormap() def _on_colormap_change(self, event): self.layer._node.cmap = self.layer.colormap
ise-uiuc/Magicoder-OSS-Instruct-75K
# https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html # SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later # @file typemap.py # @author <NAME> # @date 2015-07-06 """
ise-uiuc/Magicoder-OSS-Instruct-75K
url = "https://api.thingspeak.com/apps/thingtweet/1/statuses/update?api_key=7DNNLMJWMEY6XNJP&status=Code%20works%0ADo%20NOT%20touch%20it" return urequests.post(url).text if __name__ == '__main__': ConnectWIFI('Columbia University','') # connect esp8266 to a router print(SendTweet())
ise-uiuc/Magicoder-OSS-Instruct-75K
import sqlite3 import tkinter as tk import pandas as pd #---------------------------------------------- #Para criação do banco de dados retira o comentário (#) da linha 9 à 23 somente a primeira vez que rodar o cód, #depois, basta comentar novamente. #Criando o Banco de Dados # conexao = sqlite3.connect('Clientes.db'...
ise-uiuc/Magicoder-OSS-Instruct-75K
logger.error("", e); } } catch (Exception e) { } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
n=len(A) tmp=[bin(a)[2:].zfill(16) for a in A] one={} for i,a in enumerate(zip(*tmp)): one[i]=set([i for i,v in enumerate(list(a)) if v=='1']) Venn = collections.defaultdict(list) cnt = 0 for j in range(len(one)): if len(one...
ise-uiuc/Magicoder-OSS-Instruct-75K
return lambda input_str: list(map(output_type, input_str.split(",")))
ise-uiuc/Magicoder-OSS-Instruct-75K
'NAME': 'quickdb', 'USER': 'sonarsource', 'PASSWORD': '<PASSWORD>', # Noncompliant 'HOST': 'localhost', 'PORT': '5432' } }
ise-uiuc/Magicoder-OSS-Instruct-75K
[0, 1], [1, 0], [1, 1] ], dtype=np.float32) Y_train = np.array([
ise-uiuc/Magicoder-OSS-Instruct-75K
return False # main function that runs the entire game as instructed def main(): # scores to be displayed at the end c_score = 0 u_score = 0
ise-uiuc/Magicoder-OSS-Instruct-75K
Input: haystack = "aaaaa", needle = "bba" Output: -1 Example 3: Input: haystack = "", needle = "" Output: 0 Constraints: 0 <= haystack.length, needle.length <= 5 * 104 haystack and needle consist of only lower-case English characters. """
ise-uiuc/Magicoder-OSS-Instruct-75K
cp -v arch/x86_64/boot/bzImage $BOOT/vmlinuz-$VER cp -v System.map $BOOT/System.map-$VER cp -v vmlinux $BOOT/vmlinux-$VER cp -v .config $BOOT/config-$VER cp -v Module.symvers $BOOT/Module.symvers-$VER echo "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-" echo "-=-=-=- DONE installed kernel:[$VER] -=-=-=-" e...
ise-uiuc/Magicoder-OSS-Instruct-75K
'childs' => array(
ise-uiuc/Magicoder-OSS-Instruct-75K
4、局部敏感哈希(LSH):这类算法将特征变换的方面与其他算法相结合。 """ df2 = spark.createDataFrame([(0.5, 0.3),(0.5, 0.7)], ["values1", "values2"])
ise-uiuc/Magicoder-OSS-Instruct-75K
return result class GenerateBasedKruskalRST: def __init__(self, stpg): self.stpg = stpg
ise-uiuc/Magicoder-OSS-Instruct-75K
import matplotlib as mpl import matplotlib.pyplot as plt import glob import re import copy def relu(x): y=copy.deepcopy(x); y[y<0]*=0.1;
ise-uiuc/Magicoder-OSS-Instruct-75K
cardinality = torch.sum(output + target) dice_score = (2.0 * intersection + smooth) / (cardinality + smooth).clamp_min(eps) # print('dice_score', dice_score) return dice_score
ise-uiuc/Magicoder-OSS-Instruct-75K
ipList = re.findall('[0-9]+(?:\.[0-9]+){3}', line) # get the first one ip = ipList[0] ipDic[ip] = ipDic.get(ip, 0) + 1 cmdToRun = "" cmdToLog = "" for ipKey in sorted(ipDic, key=ipDic.get, reverse=True): if ipDic[ipKey] > maxAllowedErrors: if ipKey in ipWhiteL...
ise-uiuc/Magicoder-OSS-Instruct-75K
unsigned mIndicesBuffer = 0;
ise-uiuc/Magicoder-OSS-Instruct-75K
var separator = "" for _ in 0...separatedByNewLines { separator += "\n" } scopedContent += indentedLines.joined(separator: separator) scopedContent += "\n\(scopeType.close)" return self + scopedContent } }
ise-uiuc/Magicoder-OSS-Instruct-75K
var queryWithParametersIn = "|>SELECT * FROM dbo.Foo WHERE Id IN @Ids"; } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
raise EnvironmentError('Environment variable CONSUMER_KEY not found. How to run: \ $ CONSUMER_KEY=<your consumer key> python test.py') with open(os.path.abspath('privatekey.pem')) as f: private_key = f.read() client = PrivateApp(private_key, consumer_key) print('Instance created:', client)
ise-uiuc/Magicoder-OSS-Instruct-75K
return result def dict_to_dot(obj: Dict[str, dict]) -> Dict[str, Any]: """Convert dot notation to a dict. For example: {"token": {"pos": True, "_": {"xyz": True }}} becomes {"token.pos": True, "token._.xyz": True}. values (Dict[str, dict]): The dict to convert. RETURNS (Dict[str, Any]): The key/v...
ise-uiuc/Magicoder-OSS-Instruct-75K
ood_label = np.ones(len(ood_out)) ind_label = np.zeros(len(ind_out)) val_out = np.concatenate((ind_out, ood_out)) val_label = np.concatenate((ind_label, ood_label)) print('Measuring metrics...') #AUROC
ise-uiuc/Magicoder-OSS-Instruct-75K
# Botの起動とDiscordサーバーへの接続 client.run(token)
ise-uiuc/Magicoder-OSS-Instruct-75K