seed
stringlengths
1
14k
source
stringclasses
2 values
protocol k { typealias n }
ise-uiuc/Magicoder-OSS-Instruct-75K
SingletonLazyCreator AddCreator(SingletonId id) { SingletonLazyCreator creator;
ise-uiuc/Magicoder-OSS-Instruct-75K
{ using System.Collections.Generic; using Model4You.Web.ViewModels.Home.ContactView; public class IndexViewModel { public IEnumerable<ContactFormDataView> AnsweredQuestions { get; set; }
ise-uiuc/Magicoder-OSS-Instruct-75K
PATH="/sbin:/bin:/usr/sbin:/usr/bin" test -x $DAEMON || exit 0 . /lib/lsb/init-functions d_start () { log_daemon_msg "Starting system $daemon_NAME Daemon" start-stop-daemon --start --background --pidfile $daemon_PID --make-pidfile --startas /bin/bash -- -c "exec $DAEMON >> $daemon_LOG 2>&1" log_end_msg $? } d_s...
ise-uiuc/Magicoder-OSS-Instruct-75K
layout(location = 0) in vec2 position; layout(location = 0) out vec2 tex_coords;
ise-uiuc/Magicoder-OSS-Instruct-75K
pub use pokemon_description::*;
ise-uiuc/Magicoder-OSS-Instruct-75K
WIKIPEDIA["wrongurl"] = ("http://ebay.com", WIKIPEDIA_DEFAULTS[1], WIKIPEDIA_DEFAULTS[2], wikibrowser.SiteLayoutError) WIKIPEDIA["nologin"] = (WIKIPEDIA_DEFAULTS[0], "", "", wikibrowser.BadLoginError) WIKIPEDIA["useronly"] = (WIKIPEDIA_DEFAULTS[0], WIKIPEDIA_DEFAULTS[1], "", ...
ise-uiuc/Magicoder-OSS-Instruct-75K
from .group import * from .props import * from .balls import * from .object import * from .buttons import * from .entities import *
ise-uiuc/Magicoder-OSS-Instruct-75K
*/ int KthSmallestElement(Node *root, int &K) { if(root == NULL) return -1;
ise-uiuc/Magicoder-OSS-Instruct-75K
for f in $*;do s=`head -3 $f | fgrep comment | sed 's/^comment triangclean //'` if [ -n "$s" ]; then echo "$f : $s" fi done
ise-uiuc/Magicoder-OSS-Instruct-75K
@property def last_recv_time(self) -> float: return self._last_recv_time async def listen_for_user_stream(self, ev_loop: asyncio.BaseEventLoop, output: asyncio.Queue): while True:
ise-uiuc/Magicoder-OSS-Instruct-75K
observations element that have this flag set otherwise the next observation is asynchronous. This argument is optional and defaults to False. """ is_synchronous: bool = False
ise-uiuc/Magicoder-OSS-Instruct-75K
def test_match_invalid(self): assert _search_broker_id([]) is None assert _search_broker_id(['broker_id=123534']) is None assert _search_broker_id(['xbroker.id=1', 'broker.id=12f3534']) is None assert _search_broker_id(['bruker.id=123534', 'boker.id=123534']) is None
ise-uiuc/Magicoder-OSS-Instruct-75K
client.send(data) client.close()
ise-uiuc/Magicoder-OSS-Instruct-75K
@Override public String getWordRaw() { return getLine().getRaw().substring(s, e); } }
ise-uiuc/Magicoder-OSS-Instruct-75K
net = cv2.dnn.readNetFromTorch(args["model"]) #reading the image and resizing it to 600px
ise-uiuc/Magicoder-OSS-Instruct-75K
def iter_examples(): example_dir = pathlib.Path(__file__).parent.absolute() for fp in example_dir.iterdir(): if fp.name.startswith("_") or fp.suffix != ".py": continue yield fp
ise-uiuc/Magicoder-OSS-Instruct-75K
) viable_windows = self.get_window_property( connection,
ise-uiuc/Magicoder-OSS-Instruct-75K
return np.array(results) def calc_dlgagedeep(self, track, deep=0.1): I = interp1d(track["_eep"], track["_lgage"], kind="linear", bounds_error=False, fill_value=-np.inf)
ise-uiuc/Magicoder-OSS-Instruct-75K
return { onClick: () => { dispatch(A.createOpenNavAction(ownProps.target)); } }; } class NavLinkClass extends React.Component<NavLinkProps & ConnectedEvents> { public render(): JSX.Element { const { target, disable, text, title, extraClass, onClick } = this.props; let clas...
ise-uiuc/Magicoder-OSS-Instruct-75K
return np.exp(g(theta, x)) fac = lambda x: np.math.factorial(x)
ise-uiuc/Magicoder-OSS-Instruct-75K
targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. // Targets can depend on other targets in this package, and on products in packages this package depends on. .target( name: "EWV", dependencies: []), ...
ise-uiuc/Magicoder-OSS-Instruct-75K
def test_float_precision(): """Test whether ``float_precision`` keywork is working. """ js.safe_dump({"value": 1.23456789}, path_json, indent_format=False, float_precision=2, enable_verbose=False) try:
ise-uiuc/Magicoder-OSS-Instruct-75K
return; } local_sender.send(buffer[0]).unwrap(); } }); } else if matches.occurrences_of("print_serial") > 0 { let (sender, reciever) = gameboy.create_serial_channels(); thread::spawn(move || { loop { let data = reciever.recv().unwrap(); sender.send(0xFF).unwrap();
ise-uiuc/Magicoder-OSS-Instruct-75K
try: discord.fetch_guilds() #로그인정보을 가져와라 except: return redirect(url_for("logout")) #못가져오면 로그아웃 user = discord.fetch_user() return render_template('form/1.html', user=user) else: #로그인이 안되어있는가? return redirect(url_for("login")) else: if discord.authorized: #로그인이 되어있는가 try:
ise-uiuc/Magicoder-OSS-Instruct-75K
{ byte[] keyBytes = Encoding.ASCII.GetBytes(keyString); return new SymmetricSecurityKey(keyBytes); } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
* @author <NAME> on 2019/3/10 15:53 **/ public class BreakSingletonTest { @SneakyThrows
ise-uiuc/Magicoder-OSS-Instruct-75K
G.zero_grad() g_loss.backward() g_optimizer.step() if (i+1) % 300 == 0: print("Epoch {}/{}, Step: {}/{}, d_loss: {}, g_loss: {}, D(x): {}, D(G(z)): {}". format(epoch, num_epochs, i+1, 600, d_loss.data[0], g_loss.data[0], real_score.data.mean(), fake_score.dat...
ise-uiuc/Magicoder-OSS-Instruct-75K
dummy_task = DummyOperator(task_id='dummy_task') # Task 2 commands = """ sh /usr/local/hades/command.sh;
ise-uiuc/Magicoder-OSS-Instruct-75K
ff = np.zeros_like(rx) im = ax.imshow(ff, cmap='gray', origin='lower', interpolation='none', extent=[FOVmin, FOVmax, FOVmin, FOVmax]) xx = np.array([0,1,2,3]) for i in range(4): ax.plot(xx, 4*[i],...
ise-uiuc/Magicoder-OSS-Instruct-75K
def add(self, value: int): if None is self.root: self.root = BinaryTreeNode(value) else: self.root.add(value) pass def search(self, value: int) -> Optional[int]:
ise-uiuc/Magicoder-OSS-Instruct-75K
from ._ESS import essLocalDimEst as ess_py from ._mada import mada as mada_py from ._corint import corint as corint_py
ise-uiuc/Magicoder-OSS-Instruct-75K
// 'element-highlight': false, // 'position': 'x*y'
ise-uiuc/Magicoder-OSS-Instruct-75K
n_samples = 5 n_classes = 7 mu = 0.02 self.hparams = Container(n_classes=n_classes, n_features=n_features, n_samples=n_samples, mu=mu) self.w = torch.randn(n_features, n_classes, r...
ise-uiuc/Magicoder-OSS-Instruct-75K
:type day: str or :class:`DayOfWeek <azure.mgmt.logic.models.DayOfWeek>` :param occurrence: The occurrence. :type occurrence: int """ _attribute_map = { 'day': {'key': 'day', 'type': 'DayOfWeek'}, 'occurrence': {'key': 'occurrence', 'type': 'int'}, } def __init__(self, day...
ise-uiuc/Magicoder-OSS-Instruct-75K
//</SnippetNavigationWindowCODEBEHIND>
ise-uiuc/Magicoder-OSS-Instruct-75K
public synchronized Y get(T key) { return map.get(key); } public synchronized boolean containsKey(T key) { return this.map.containsKey(key); }
ise-uiuc/Magicoder-OSS-Instruct-75K
use alfresco; END
ise-uiuc/Magicoder-OSS-Instruct-75K
} public run(matches: Match[]): string { let wins = 0; for (let match of matches) { match.homeTeam === this._team && match.winCode === MatchResult.HOME_WIN && wins++; match.awayTeam === this._team && match.winCode === MatchResult.AWAY_WIN && wins++; } ret...
ise-uiuc/Magicoder-OSS-Instruct-75K
microseconds_since_file_time_epoch = int(file_time) / FILE_TIME_MICROSECOND return FILE_TIME_EPOCH + datetime.timedelta(microseconds=microseconds_since_file_time_epoch)
ise-uiuc/Magicoder-OSS-Instruct-75K
"type": "image", "shape": [1, 3, 416, 416], "layout": ["N", "H", "W", "C"], "color_format": "BGR", } }], "outputs": [{
ise-uiuc/Magicoder-OSS-Instruct-75K
FLOOR(0.3) as floor1, FLOOR(-0.8) as floor2, FLOOR(10) as floor3,
ise-uiuc/Magicoder-OSS-Instruct-75K
if with_note: random_note = note_obj.get_random_note() + " " else: random_note = "" random_mode = self.get_random_mode_type() random_result = random_note + random_mode output.append(random_result) return output
ise-uiuc/Magicoder-OSS-Instruct-75K
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; import com.zensar.config.ClientConfiguration; @RestController public class...
ise-uiuc/Magicoder-OSS-Instruct-75K
util::create_dir_or_error(&output_dir.join(config_path))?; let _ = fs::File::create(output_dir.join(config_path).join("some_file"))?; assert!(generator .generate_from_descriptor_set(&descriptor_set) .is_err()); Ok(()) } #[test] fn renders_output_for_e...
ise-uiuc/Magicoder-OSS-Instruct-75K
BiLinearNode tempNode = new BiLinearNode(element); Iterator iterator = list.iterator(); while (iterator.hasNext()) { if (tempNode.compareTo((BiLinearNode) iterator.next()) == 0) {
ise-uiuc/Magicoder-OSS-Instruct-75K
class Mention(commands.Cog): def __init__(self, client): self.client = client @commands.Cog.listener() @commands.guild_only() async def on_message(self, message: discord.Message): """Sends a message with the guild's bot prefix""" if "purge" in message.content: retur...
ise-uiuc/Magicoder-OSS-Instruct-75K
<reponame>Hansin1997/weibo-analyst from weibo import * from config import *
ise-uiuc/Magicoder-OSS-Instruct-75K
return s def trim_space(s): left = 0 right = len(s)-1 while left<=right and s[left]==" ": left += 1 while left<right and s[right]==" ": right -= 1 output = []
ise-uiuc/Magicoder-OSS-Instruct-75K
this._statements = statements; this._closeBraceToken = closeBraceToken; this._kind = SyntaxKind.BlockStatement; } public get openBraceToken (){return this._openBraceToken;} public get statements (){return this._statements;} public get closeBraceToken ...
ise-uiuc/Magicoder-OSS-Instruct-75K
unique_ids = dict(unique_ids)
ise-uiuc/Magicoder-OSS-Instruct-75K
void client::sendData(){ current_date_time = QDateTime::currentDateTime(); QString str_date_time = current_date_time.toString("yyyy-MM-dd hh:mm:ss"); QByteArray dd = ui->lineEdit_3->text().toLatin1(); cSocket->write(dd); cSocket->flush(); ui->textBrowser->append("You "+str_date_time+"\n"+dd); ...
ise-uiuc/Magicoder-OSS-Instruct-75K
DragFinish(HANDLE) DragQueryFileW(HANDLE, u32, PSTR, u32) -> u32 DragQueryPoint(HANDLE, PVOID) -> BOOL SHAddToRecentDocs(u32, PCVOID) SHCreateItemFromParsingName(PCSTR, PVOID, PCVOID, *mut PVOID) -> HRES Shell_NotifyIconW(u32, PVOID) -> BOOL
ise-uiuc/Magicoder-OSS-Instruct-75K
if(n==1): return 1 if(n==2): return 1 else: return k*rabbit_pairs(n-2,k)+rabbit_pairs(n-1,k) def main(): with open('datasets/rosalind_fib.txt') as input_data: n,k=map(int,input_data.read().strip().split())
ise-uiuc/Magicoder-OSS-Instruct-75K
func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
ise-uiuc/Magicoder-OSS-Instruct-75K
public var scrollToFragment: String? public lazy var url: URL? = { let escapedTitle = self.title.wikipediaURLEncodedString() let urlString = "https://" + self.language.code + ".wikipedia.org/wiki/" + escapedTitle let url = URL(string: urlString) return url }() ...
ise-uiuc/Magicoder-OSS-Instruct-75K
<?php elseif ($this->session->userdata('user_profil_kode') == 6) : ?> <script src="<?= base_url() ?>assets/js/keuangan/script.js"></script>
ise-uiuc/Magicoder-OSS-Instruct-75K
}, [onScroll, bScroll]); useEffect(() => { if(!bScroll || !onPullUp) return; bScroll.on('scrollEnd', () => { if(bScroll.y <= bScroll.maxScrollY + 100){ onPullUp(bScroll.y); } }); return () => bScroll.off('scrollEnd')
ise-uiuc/Magicoder-OSS-Instruct-75K
from .views import ( product_orders_modal, make_product_purchase, allocate_product_to_order,
ise-uiuc/Magicoder-OSS-Instruct-75K
else { frm.lblTheftTime.Text = ""; frm.lblTheftDuration.Text = ""; } frm.lblTheftOrdinal.Text = Ordinal.ToString(); frm.lstTheftEvents.Items.Clear(); if (Event != null)
ise-uiuc/Magicoder-OSS-Instruct-75K
except asyncio.TimeoutError as exception: _LOGGER.error( "Timeout error fetching information from %s - %s", url, exception, )
ise-uiuc/Magicoder-OSS-Instruct-75K
{ text: '<NAME>', id: 'list-02' }, { text: 'Bugatti Veyron Super Sport', id: 'list-03' }, { text: 'SSC Ultimate Aero', id: 'list-04' },
ise-uiuc/Magicoder-OSS-Instruct-75K
d = np.random.multivariate_normal([20, 70], [[35, 10], [10, 35]], size=1000) X = np.concatenate((a, b, c, d), axis=0) np.random.shuffle(X) pi, m, S, clss, bic = gmm(X, 4) print(pi) print(m)
ise-uiuc/Magicoder-OSS-Instruct-75K
this.student.addProductor(this.studentProduction) this.scientist.addProductor(this.scientistProduction) this.university.togableProductions = [ new TogableProduction("Generate Studentes", [this.studentProduction]), new TogableProduction("Generate Scientist", [this.scientistProduction]) ]
ise-uiuc/Magicoder-OSS-Instruct-75K
SAVE_FOLDER = '../../../projects' SQLALCHEMY_TRACK_MODIFICATIONS = 'False'
ise-uiuc/Magicoder-OSS-Instruct-75K
brute.append(HNF) HNF = [] else: HNF.append([int(i) for i in line.strip().split()])
ise-uiuc/Magicoder-OSS-Instruct-75K
>>> x = np.linspace(0, 1, 1001) >>> fd = skfda.FDataGrid([np.ones(len(x)), x], x) >>> fd2 = skfda.FDataGrid([2*np.ones(len(x)), np.cos(x)], x) >>> >>> skfda.misc.metrics.angular_distance(fd, fd2).round(2) array([ 0. , 0.22]) """ def __call__( self,
ise-uiuc/Magicoder-OSS-Instruct-75K
$this->view->contacttags = $this->tagModel->fetchAllTags(); $this->view->groups = $this->groupModel->fetchAll(); }
ise-uiuc/Magicoder-OSS-Instruct-75K
selection.index(before: i) } } extension Sampling: RandomAccessCollection where Selection: RandomAccessCollection {}
ise-uiuc/Magicoder-OSS-Instruct-75K
<filename>217. Contains Duplicate.py<gh_stars>1-10
ise-uiuc/Magicoder-OSS-Instruct-75K
from rest_framework_simplejwt.state import User
ise-uiuc/Magicoder-OSS-Instruct-75K
let mut sink = world.write_resource::<AudioSink>(); sink.set_volume(mus_vol as f32 / 10.0); mus_vol_text.text = mus_vol.to_string(); Some(mus_vol as f32 / 10.0) } else { None } } else { None }
ise-uiuc/Magicoder-OSS-Instruct-75K
print('Starts with x and has one y') else: print('No matching') #No matching
ise-uiuc/Magicoder-OSS-Instruct-75K
} else { lastErrorStacktrace = null; } } public Throwable getLastError() { return lastError; } public String getLastErrorMessage()
ise-uiuc/Magicoder-OSS-Instruct-75K
<gh_stars>0 <div class="topMenuWrap"> <div class="container topMenu"> <div class="nav no-print"> <?php $htmlMenu = frontMenu(); echo $htmlMenu; ?> </div>
ise-uiuc/Magicoder-OSS-Instruct-75K
common_path = os.path.dirname(os.path.commonprefix(all_files)) context = context or determine_context(common_path, all_files)
ise-uiuc/Magicoder-OSS-Instruct-75K
except KeyError: second_num = 0
ise-uiuc/Magicoder-OSS-Instruct-75K
import math def get_size(rscript):
ise-uiuc/Magicoder-OSS-Instruct-75K
cell.configure() cell.taskNameLabel.text = task.name cell.descriptionLabel.text = task.taskDescription cell.notificationLabel.text = task.notificationDate cell.notificationLabel.layer.cornerRadius = 6 cell.backgroundColor = task.backgr...
ise-uiuc/Magicoder-OSS-Instruct-75K
# [Import start] from flask import Blueprint, jsonify # [Import end] app = Blueprint( 'hoge', __name__, url_prefix='/hoge' )
ise-uiuc/Magicoder-OSS-Instruct-75K
#ifndef BOOST_GRAPH_EXCEPTION_HPP #define BOOST_GRAPH_EXCEPTION_HPP #include <stdexcept> #include <string> namespace boost { struct BOOST_SYMBOL_VISIBLE bad_graph : public std::invalid_argument { bad_graph(const std::string& what_arg) : std::invalid_argument(what_arg) {}
ise-uiuc/Magicoder-OSS-Instruct-75K
class TestNumpyLinalg(TestEnv): def test_linalg_norm0(self): self.run_test("def linalg_norm0(x): from numpy.linalg import norm ; return norm(x)", numpy.arange(6.), linalg_norm0=[NDArray[float,:]]) def test_linalg_norm1(self): self.run_test("def linalg_norm1(x): from numpy.linalg import norm ; ...
ise-uiuc/Magicoder-OSS-Instruct-75K
// Adapted from Ember-preprints. const defaultFilters = { 'Open Science Framework': 'OSF', 'Cognitive Sciences ePrint Archive': 'Cogprints', OSF: 'OSF', 'Research Papers in Economics': 'RePEc', }; /** * filterReplace helper. Replaces long provider names without messing with search filter logic *
ise-uiuc/Magicoder-OSS-Instruct-75K
import { store } from "@/states/store"; import { AppContextProvider } from "@/app/contexts/AppContext"; import { isClientSide } from "@/app/isClientSide"; import { SEOMetaTags } from "@/app/components/SEOMetaTags"; import { AppInitializer } from "@/app/components/AppInitializer"; import "./globals.css";
ise-uiuc/Magicoder-OSS-Instruct-75K
// At this point, if "alive_ == true" then tasks_pool_ cannot be empty (the lock was reacquired before evaluating the predicate). if(alive_) { task = tasks_pool_.front(); tasks_pool_.pop(); lk.unlock(); ++running_tasks...
ise-uiuc/Magicoder-OSS-Instruct-75K
/// - Returns: Destination view controller private func instantiateVC(for path: String) -> UIViewController? { let storyboard = UIStoryboard(name: path, bundle: nil) return storyboard.instantiateInitialViewController() } } // MARK: - RouterProtocol extension Router: RouterProtocol { public func destination<T...
ise-uiuc/Magicoder-OSS-Instruct-75K
θ [4.0, 8.0] bands['theta'] α1 [7.0, 10.0] bands['alpha1'] α2 [10.0, 13.0] bands['alpha2'] α [7.0, 13.0] bands['alpha'] μ [8.0, 13.0] band['mu'] β [13.0, 25.0] bands['beta'] γ ...
ise-uiuc/Magicoder-OSS-Instruct-75K
# Make sure LLNMS has been installed if [ "$LLNMS_HOME" = "" ]; then LLNMS_HOME="/var/tmp/llnms" fi # Initialize ANSI . test/bash/unit_test/unit_test_utilities.sh # Filename variable FILENAME="TEST_llnms_register_asset_scanner.sh"
ise-uiuc/Magicoder-OSS-Instruct-75K
context: Context) throws -> MapCursor<RowCursor, Self> {
ise-uiuc/Magicoder-OSS-Instruct-75K
The top_hits aggregator can effectively be used to group result sets by certain fields via a bucket aggregator. One or more bucket aggregators determines by which properties a result set get sliced into. [More information](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-...
ise-uiuc/Magicoder-OSS-Instruct-75K
galera.append(teste) print(galera[:]) " another way" galera2 = [['joão', 19], ['Ana', 33], ['Joaquim', 13], ['Maria', 45]] print(galera2[0]) # desse modo eu mostro apenas o elemento 0 da principal lista
ise-uiuc/Magicoder-OSS-Instruct-75K
def input(self, symbol): # print symbol + "- - " + self.state try:
ise-uiuc/Magicoder-OSS-Instruct-75K
return 0 else: return n + vsota(n-1) print(vsota(1000))
ise-uiuc/Magicoder-OSS-Instruct-75K
.. }, .. }, .. } if *key == self.switch_key => { match self.first_active { true => { self.second.match_view(&self.first.camera()); ...
ise-uiuc/Magicoder-OSS-Instruct-75K
tags = conduct_api_call(cl, ListRepositoryTags, "get", params).json["tags"] repo_ref = registry_model.lookup_repository(repo_namespace, repo_name) history, _ = registry_model.list_repository_tag_history(repo_ref) assert len(tags) == len(history)
ise-uiuc/Magicoder-OSS-Instruct-75K
=========================== --- Logistic Regression --- Test ACC: 0.973336304219 [[9131 80] [ 279 3974]] ------ Random Forest ------ Test Acc: 0.982174688057 [[9176 35] [ 205 4048]] =========================== [UPPER] UP Class ===========================
ise-uiuc/Magicoder-OSS-Instruct-75K
export * from './InputFieldTooltip' export * from './ButtonTooltip'
ise-uiuc/Magicoder-OSS-Instruct-75K
pub mod assets;
ise-uiuc/Magicoder-OSS-Instruct-75K
# display precision, recall and f1-score on train/test set print("train : "+ str(precision_recall_fscore_support(y_train, train_p,average = "macro"))) print("test : "+ str(precision_recall_fscore_support(y_test, test_p,average = "macro"))) import matplotlib.pyplot as plt plt.plot(cl.losses_) plt.show()
ise-uiuc/Magicoder-OSS-Instruct-75K
.OrderByDescending(x => x.Points) .ThenBy(x => x.Name).ToList();
ise-uiuc/Magicoder-OSS-Instruct-75K