seed
stringlengths
1
14k
source
stringclasses
2 values
fn find_videos(api: &Client, token: &AccessToken, query: &str) -> api::Result<Collection<Video>> { api.call(Some(token), video::Search::new() .q(query) .adult(false) .count(30)) } fn main() { let args = App::new("videos")
ise-uiuc/Magicoder-OSS-Instruct-75K
net_copy = [] for l in range(len(net_object.net)): net_copy.append({'w': net_object.net[l]['w'].tolist()}) with open(path, 'w') as file:
ise-uiuc/Magicoder-OSS-Instruct-75K
_search_input_field_css = ".search-input" _resource_action_menu_id = "table-item-dropdown_{0}" # resource id or name if no id required _more_actions_button_id = "more-actions-btn" _select_all_items_tableview_checkbox_id = "select-all-items-tableview" def goto_dashboard_via_icon(self): self...
ise-uiuc/Magicoder-OSS-Instruct-75K
from zfnew import GetInfo, Login base_url = '学校教务系统的主页url' lgn = Login(base_url=base_url) lgn.login('账号', '密码') cookies = lgn.cookies # cookies获取方法 person = GetInfo(base_url=base_url, cookies=cookies) message = person.get_message() print(message)
ise-uiuc/Magicoder-OSS-Instruct-75K
# %% export angles to file ang_pix = np.stack([A_ang_pix, B_ang_pix],1) filename = 'angles2' functions.export_bz2(filename, ang_pix) # %% print(np.degrees(B_ang_pix[0]*B_img.shape[1])) # %%
ise-uiuc/Magicoder-OSS-Instruct-75K
return generatePolicy(principalId, userDetails, 'Allow', event['methodArn'])
ise-uiuc/Magicoder-OSS-Instruct-75K
{ view.WindowIsSet += View_WindowIsSet; } static void View_WindowIsSet(Windows.UI.Core.CoreWindow coreWindow) { // you can subscribe to CoreWindow events here } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
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, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governin...
ise-uiuc/Magicoder-OSS-Instruct-75K
else: raise Http404("Course not found: {}.".format(unicode(course_key)))
ise-uiuc/Magicoder-OSS-Instruct-75K
import Foundation public enum CastAppIdentifier: String { case defaultMediaPlayer = "CC1AD845" case youTube = "YouTube" } public final class CastApp: NSObject {
ise-uiuc/Magicoder-OSS-Instruct-75K
dose1_ny_progress_bar = ProgressBar( NY_BAR_X, DOSE1_BAR_Y, BAR_WIDTH, BAR_HEIGHT, 1.0, bar_color=0x999999, outline_color=0x000000, ) dose1_us_progress_bar = ProgressBar(
ise-uiuc/Magicoder-OSS-Instruct-75K
try: vault = easy_server.VaultFile(vault_file) except easy_server.VaultFileException as exc: print("Error: {}".format(exc)) return 1 for nick in vault.nicknames: print("Secrets for nickname {}:".format(nick)) pprint(vault.get_secrets(nick)) return 0
ise-uiuc/Magicoder-OSS-Instruct-75K
def ti_results(): """Test fixture to read Dataframe.""" df_path = Path(TEST_DATA_PATH).joinpath("ti_results.df.pkl") return pd.read_pickle(df_path) def test_extract_options(ti_results): """Test extracting select list options from data.""" output = get_ti_select_options(ti_results) check.equal(...
ise-uiuc/Magicoder-OSS-Instruct-75K
title, text = XmlParser.parse_article(filename) intro, unnamed_sections, named_sections = TextParser.parse_text(text)
ise-uiuc/Magicoder-OSS-Instruct-75K
Z = z; } } }
ise-uiuc/Magicoder-OSS-Instruct-75K
$host = 'https://dwz.cn';
ise-uiuc/Magicoder-OSS-Instruct-75K
import UIKit import DZNEmptyDataSet // MARK: DZNEmptyDataSetSource
ise-uiuc/Magicoder-OSS-Instruct-75K
(None, None) => line .split(' ') .map(::std::borrow::ToOwned::to_owned)
ise-uiuc/Magicoder-OSS-Instruct-75K
holder.img.setVisibility(View.GONE); holder.video_post.setVideoURI(Uri.parse(data.img)); holder.linearLayout_play.setOnClickListener(v -> { Intent i=new Intent(context, VideoPlayerActivity.class); i.putExtra(L...
ise-uiuc/Magicoder-OSS-Instruct-75K
use par_trie::ParTrie; const WORDS: &[&str; 20] = &[ "the", "them", "code", "coder", "coding", "crap", "help", "heft", "apple", "hello",
ise-uiuc/Magicoder-OSS-Instruct-75K
padding:2em; text-align:center; } div.pass_failimage_display_div img { display:block; border-radius:2em; margin:auto; } div.thermometer-div { border-r...
ise-uiuc/Magicoder-OSS-Instruct-75K
func width() -> Double { return myWidth } func area() -> Double { return self.height() * self.width() } }
ise-uiuc/Magicoder-OSS-Instruct-75K
} else { $("#userlevelDiscApply").attr('disabled', false);
ise-uiuc/Magicoder-OSS-Instruct-75K
// All rights reserved. // See LICENSE file for license details. #include <ugcs/vsm/cucs_processor.h>
ise-uiuc/Magicoder-OSS-Instruct-75K
from . import expert
ise-uiuc/Magicoder-OSS-Instruct-75K
time,
ise-uiuc/Magicoder-OSS-Instruct-75K
use jvm_object::JvmObject; use rand::{thread_rng, Rng}; #[derive(PartialEq, Default, Serialize, Deserialize, Debug, Clone)] pub struct Heap { objects: HashMap<u64, JvmObject>,
ise-uiuc/Magicoder-OSS-Instruct-75K
throwScope.assertNoException(); throwException(&state, throwScope, createDOMException(state, WTFMove(exception))); } static EncodedJSValue throwTypeError(JSC::ExecState& state, JSC::ThrowScope& scope, const String& errorMessage) { return throwVMTypeError(&state, scope, errorMessage); } static void app...
ise-uiuc/Magicoder-OSS-Instruct-75K
multi[i+j] += (ord(num1[-i-1]) - ord('0')) * (ord(num2[-j-1]) - ord('0')) # multi is in reverse order # handle ans[i] >= 10 carry = 0 for i in range(n1 + n2): multi[i] += carry carry, multi[i] = divmod(multi[i], 10) # handle leadi...
ise-uiuc/Magicoder-OSS-Instruct-75K
boolean isOn(); }
ise-uiuc/Magicoder-OSS-Instruct-75K
class VideoPluginModel(CMSPlugin): video_url = EmbedVideoField() max_width = models.IntegerField(blank=True, null=True, help_text="in px")
ise-uiuc/Magicoder-OSS-Instruct-75K
pins: list[Pin] def __post_init__(self): "Create a dictionary so we can access pins by short name" self.pin_dict = {} for f in self.pins: self.pin_dict[f.short_name] = f
ise-uiuc/Magicoder-OSS-Instruct-75K
return Unit::YEAR; default: throw vega::Exception(std::string("Unknown age unit: ") + c); } }
ise-uiuc/Magicoder-OSS-Instruct-75K
for voice in sorted(response["voices"], key=lambda voice: voice["name"]): print(f"- {voice['name']}")
ise-uiuc/Magicoder-OSS-Instruct-75K
return tf.random_normal(
ise-uiuc/Magicoder-OSS-Instruct-75K
self.has_prev = bool(self.page) self.next_page = None if not self.has_next else self.page+1 # href='{{=URL(vars=dict(page=paginater.next_page))}}' self.next_url = URL(args=self._request.args, vars=dict(self._old_vars + {'page':self.next_page}.items())) self.prev_page = None if not se...
ise-uiuc/Magicoder-OSS-Instruct-75K
// modification, are permitted provided that the following conditions // 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
ise-uiuc/Magicoder-OSS-Instruct-75K
password="<PASSWORD>(1<PASSWORD>,20,sha512)$8a062c206755a51e$df13c5122a621a9de3a64d39f26460f175076ca0"
ise-uiuc/Magicoder-OSS-Instruct-75K
"""Attempts to locate a cached version of 'calendar_id'. If none is found, attempts to load from disk. """ calendar_id = calendar_id or Calendar._DEFAULT_CALENDAR_ID if not Calendar._cache.has_key(calendar_id): cal = Calendar(calendar_id) Calendar._cache[calendar_id] = cal return Cal...
ise-uiuc/Magicoder-OSS-Instruct-75K
pelem->SetDoubleAttribute("V", ORG_V); pelem->SetDoubleAttribute("H", ORG_H); pelem->SetDoubleAttribute("D", ORG_D); root->LinkEndChild(pelem); pelem = new TiXmlElement("dimensions"); pelem->SetAttribute("DIM_V", DIM_V);
ise-uiuc/Magicoder-OSS-Instruct-75K
'This controls how many times a token can be changed by the optimizer.', lower_bound=1) flags.DEFINE_string( 'embeddings_file', None, 'The path to a tsv file containing embeddings.\n' 'Vectors have a corresponding token in vocab_file on the same line number.') flags.DEFINE_string( 'vocab_file', None...
ise-uiuc/Magicoder-OSS-Instruct-75K
var method: String { return "GET" } }
ise-uiuc/Magicoder-OSS-Instruct-75K
<reponame>jpdarricarrere/Trabalho_Eng_Software from enum import Enum class TipoBike(Enum): urbana = 'urbana' transporte = 'transporte' corrida = 'corrida'
ise-uiuc/Magicoder-OSS-Instruct-75K
expected = ['materialSampleID', 'principalInvestigator', 'locality', 'phylum', 'decimalLatitude', 'decimalLongitude', 'coordinateUncertaintyInMeters',
ise-uiuc/Magicoder-OSS-Instruct-75K
lowerb = (self.i1, self.i2, self.i3) upperb = (self.i4, self.i5, self.i6) mask = cv.inRange(hsv, lowerb, upperb)
ise-uiuc/Magicoder-OSS-Instruct-75K
} CheckResources(); string value; if (localizedStrings.TryGetValue(key, out value)) { return value.Trim();
ise-uiuc/Magicoder-OSS-Instruct-75K
//Check error MOUCA_PRE_CONDITION(nbComponents > 0); MOUCA_PRE_CONDITION(formatType < Type::NbTypes); MOUCA_PRE_CONDITION(componentUsage < ComponentUsage::NbUsages);
ise-uiuc/Magicoder-OSS-Instruct-75K
): """Make default networks used by TD3.""" action_size = np.prod(environment_spec.actions.shape, dtype=int) def _policy_fn(obs, is_training=False, key=None): del is_training del key return hk.Sequential( [
ise-uiuc/Magicoder-OSS-Instruct-75K
log = logging.getLogger() log.info(f"Starting run: '{' '.join(sys.argv)}'") PlasterCommand.subcommand("gen", "plaster.gen.gen_main.GenApp") PlasterCommand.subcommand("run", "plaster.run.run_main.RunApp") PlasterCommand.subcommand("run_notebook", "pla...
ise-uiuc/Magicoder-OSS-Instruct-75K
rm dist/* python3 setup.py bdist_wheel --universal
ise-uiuc/Magicoder-OSS-Instruct-75K
globals.mainwindow.title(window_text) #Set window name to default. def CheckForTextChanges(): if globals.tobject.GetText() != globals.tobject.loadedtext: window_title = globals.mainwindow.title() if not globals.checked_text: globals.mainwindow.title("*" + window_title) ...
ise-uiuc/Magicoder-OSS-Instruct-75K
DEVELOPMENT_MODE_NAME = "dev"
ise-uiuc/Magicoder-OSS-Instruct-75K
'''Process dictionary and call particular methods to set self.xml The dictionary should contains a flat key:value structure. Which kind of XML component an dictionary item address is controlled by the corresponding key in following class constants:
ise-uiuc/Magicoder-OSS-Instruct-75K
} private class SomeGenericScreen<T1, T2> : AppScreen { private readonly Window window;
ise-uiuc/Magicoder-OSS-Instruct-75K
return tokenlist def __get_next_char(self): """Returns the next character in the statement, unless the last character has already been processed, in which case, the empty string is returned. """ if self.__column < len(self.__stmt): next_char = se...
ise-uiuc/Magicoder-OSS-Instruct-75K
// PhotoAsset+URL.swift
ise-uiuc/Magicoder-OSS-Instruct-75K
for (int i = 0; i < 100000; i++) { a.Warn("aaa,%s", "bbb"); } //CLog4CXX b("test2"); //b.DEBUG("bbbbbb"); return 0;
ise-uiuc/Magicoder-OSS-Instruct-75K
* Proxy settings. */ private final Proxy proxy = new Proxy(); public Proxy getProxy() { return this.proxy;
ise-uiuc/Magicoder-OSS-Instruct-75K
minHeight: string; private _initWinHeight: number = 0; ngOnInit() { Observable.fromEvent(window, 'resize') .debounceTime(200) .subscribe(event => this._resizeFn(event) ); this._initWinHeight = window.innerHeight; this._resizeFn(null);
ise-uiuc/Magicoder-OSS-Instruct-75K
dividend -= temp to_return += i i <<= 1 temp <<= 1 if not sign: to_return = -to_return return min(max(INT_MIN, to_return), INT_MAX)
ise-uiuc/Magicoder-OSS-Instruct-75K
if (!$succes) { return 'la ricerca non è andata a buon fine'; } //variabili necessare alla form di filtraggio avanzato $categorie = Category::all();
ise-uiuc/Magicoder-OSS-Instruct-75K
self.reduce(event: event, state: &newState) return newState }, feedback: newSideEffects) return system } func send(_ event: Event) { inputEvent.onNext(event) } func initialState() -> State! {
ise-uiuc/Magicoder-OSS-Instruct-75K
self._full_name = item.text() self._getFullName(ind) return self._full_name def _getFullName(self, ind): ind_par = self._si_model.parent(ind) if(ind_par.column() == -1):
ise-uiuc/Magicoder-OSS-Instruct-75K
response[headers.ACCESS_CONTROL_MAX_AGE] = "86400" if allow_credentials: response[headers.ACCESS_CONTROL_ALLOW_CREDENTIALS] = 'true' return response return wrapped
ise-uiuc/Magicoder-OSS-Instruct-75K
# Adding 8 shares to the order modify_message = Message(2, MessageType.MODIFY, 1, -8, 10, 1) orderbook.send(modify_message) # Ordering has changed modified_order = orderbook.bid_book[10][1] self.assertEqual(modified_order.id, 1) self.assertEqual(modified_order.qt...
ise-uiuc/Magicoder-OSS-Instruct-75K
pseudoQueue.enqueue(1) pseudoQueue.enqueue(2) pseudoQueue.enqueue(3) pseudoQueue.dequeue() print(pseudoQueue.peek())
ise-uiuc/Magicoder-OSS-Instruct-75K
if __name__ == '__main__': raio = float(input('Informe o raio: ')) area = circulo(raio) print(f'Area {area}')
ise-uiuc/Magicoder-OSS-Instruct-75K
this.touchEnd = true; } event.target.complete(); this.ratingList = [...this.ratingList, ...res]; }); } getRatingList(ratingOffset: number, name?: string) {
ise-uiuc/Magicoder-OSS-Instruct-75K
url = q.get(timeout = 2) index += 1 r = requests.get(url, headers = headers, timeout = 5) html = str(r.content, encoding="utf-8").replace("\n", "").replace(" ", "").replace('<span class="yd-kw-suffix">[英语单词大全]</span>', "") words = re.findall('<div class="caption"><h3 style="margin-top: 10px;"...
ise-uiuc/Magicoder-OSS-Instruct-75K
public static void nglDrawElementsInstancedARB(int mode, int count, int type, long indices, int primcount) { long __functionAddress = GL.getCapabilities().glDrawElementsInstancedARB; if ( CHECKS ) checkFunctionAddress(__functionAddress); callPV(__functionAddress, mode, count, type, indices, primcount); } /...
ise-uiuc/Magicoder-OSS-Instruct-75K
""" Vote counter by <NAME> This work is distributed AS IS. It is up to you to determine if it is useful and safe. In particular, NO WARRANTY is expressed or implied. I permanently give everyone the rights to use, modify, copy, distribute, re-distribute, and perform this work, and all derived works, to the exte...
ise-uiuc/Magicoder-OSS-Instruct-75K
('movie', '0002_auto_20200717_1039'), ] operations = [ migrations.RemoveField( model_name='show', name='plot',
ise-uiuc/Magicoder-OSS-Instruct-75K
PROJECT_HOME=/root/projects/spadger/ cd ${PROJECT_HOME}/src LOGFILE=${PROJECT_HOME}/logs/django.log
ise-uiuc/Magicoder-OSS-Instruct-75K
// PSLaunch // // Created by Jose Ponce on 9/12/16. // Copyright © 2016 http://www.poncesolutions.com All rights reserved. // Nothing was customized on this file. This as Xcode creates the application import UIKit @UIApplicationMain
ise-uiuc/Magicoder-OSS-Instruct-75K
"reboot") sudo shutdown -r now ;; *) echo "Keine zulässige Operation angegeben" echo "Die Operationen sind: shutdown, reboot" ;; esac
ise-uiuc/Magicoder-OSS-Instruct-75K
""" class Datafile(Plugin, Sequence): """Template Toolkit Plugin which reads a datafile and constructs a list object containing hashes representing records in the file. """ def __init__(self, context, filename, params=None): Plugin.__init__(self)
ise-uiuc/Magicoder-OSS-Instruct-75K
answers.append(impact_factor[s[p]]) break else: raise Exception('Unexpected error') return answers
ise-uiuc/Magicoder-OSS-Instruct-75K
@JsonAnySetter public void setAdditionalProperty(String name, Object value) { this.additionalProperties.put(name, value); } @Override public String toString() { return new ToStringBuilder(this).append("firstName", firstName).append("middleName", middleName).append("lastName", lastN...
ise-uiuc/Magicoder-OSS-Instruct-75K
using MonoGame.Aseprite.ContentPipeline.Serialization; namespace MonoGame.Aseprite.ContentPipeline.Models { /// <summary>
ise-uiuc/Magicoder-OSS-Instruct-75K
<!-- input: search field --> <form action="@Url.Action("search", "misc")" class="header-search pull-right">
ise-uiuc/Magicoder-OSS-Instruct-75K
setup(
ise-uiuc/Magicoder-OSS-Instruct-75K
# write permission verify_command(['enable', 'monitor', 'Blammo'], config, 'me', zonebot.commands.Denied) verify_command(['disable', 'monitor', 'Blammo'], config, 'me', zonebot.commands.Denied) # unknown command, never allowed verify_command(['something', 'else'], config, 'me', zonebot.commands.Unk...
ise-uiuc/Magicoder-OSS-Instruct-75K
assert_arrays_equal(sig.array_annotations['anno1'], np.array([23])) assert_arrays_equal(sig.array_annotations['anno2'], np.array(['A'])) self.assertIsInstance(sig.array_annotations, ArrayDict) def test_IrregularlySampledSignal_different_lens_ValueError(self): times = [1.1, 1.5, 1.7]...
ise-uiuc/Magicoder-OSS-Instruct-75K
// // Copyright (c) 2009, Tweak Software // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // * Redistributions of source code must retain the above // copyright notice, th...
ise-uiuc/Magicoder-OSS-Instruct-75K
dfs(is_connected,visited,j); } } } for i in 0..n { if !visited[i] { dfs(&is_connected, &mut visited, i);
ise-uiuc/Magicoder-OSS-Instruct-75K
externalId=external_id,
ise-uiuc/Magicoder-OSS-Instruct-75K
# admin.site.register(Kayit)
ise-uiuc/Magicoder-OSS-Instruct-75K
let package = Package(
ise-uiuc/Magicoder-OSS-Instruct-75K
def request_to_csv(xml_file_name, csv_file_name, report='{http://www.caiso.com/soa/OASISReport_v1.xsd}'): caiso_report = report # Parse the xml file tree = ET.parse(xml_file_name) root = tree.getroot() # Open the csv file for writing, appending if it already exists if os.path.isfile(csv_file_n...
ise-uiuc/Magicoder-OSS-Instruct-75K
}; } pub trait UseEffect<P> where P: Platform + ?Sized, { fn use_effect<F>(&mut self, key: Key, conditions: Option<Key>, effect: F) where F: FnOnce(&EffectLink<P>) + 'static; } #[macro_export]
ise-uiuc/Magicoder-OSS-Instruct-75K
} ClusterCounts clusterSizeCounts = mapClusterSizes(clusters); PValues pvals = initializePValues(clusterSizeCounts); long p = 0, e = 0, v = 0;
ise-uiuc/Magicoder-OSS-Instruct-75K
print('\tpubs => %d' % pubs.count())
ise-uiuc/Magicoder-OSS-Instruct-75K
Subclass of StackedLearner intended for regression tasks. Same as the super class, but has a default regression-specific aggregator (`RidgeRegressionLearner`). """ def __init__(self, learners, aggregate=RidgeRegressionLearner(), k=5, preprocessors=None): super().__init__(le...
ise-uiuc/Magicoder-OSS-Instruct-75K
const res = except(ys, comparer)(xs); const it = res[Symbol.iterator](); hasNext(it, 2); noNext(it); });
ise-uiuc/Magicoder-OSS-Instruct-75K
faiss.write_index(index, outfile) if __name__ == '__main__': import argparse a = argparse.ArgumentParser() a.add_argument('outfile', type=str, help='output file') args = a.parse_args() main(args.outfile)
ise-uiuc/Magicoder-OSS-Instruct-75K
# (4) Enter the number of experiments to sample N_EXPERIMENTS = 50 # (5) Hyper-parameters. For each hyperparam, enter the function that you want the random-search to sample from. # For each experiment, a set of hyperparameters will be sampled using these functions # Examples: # int: np.random.randint(l...
ise-uiuc/Magicoder-OSS-Instruct-75K
import pika import os import amqp import msgpack import msgpack_numpy as m import sys ###establishing connection and declaring the queue amqp_url = amqp.key #print(amqp_url); url = os.environ.get('CLOUDAMQP_URL',amqp_url) params = pika.URLParameters(url) params.socket_timeout = 15
ise-uiuc/Magicoder-OSS-Instruct-75K
if tag in query.tags: return True else: return False def get_all_queries_by_names(queries): return db.session.query(Query).filter(Query.name.in_(queries)).all()
ise-uiuc/Magicoder-OSS-Instruct-75K
} public function setTestimonials(Request $request){ $testimonials = Testimonial::first(); $testimonials->testimonial =$request->input('testimonial'); $testimonials->update(); return response()->json([ 'status'=>200, ]); } public function setAppoinments(Requ...
ise-uiuc/Magicoder-OSS-Instruct-75K
} extension StarWarsEndpoint { /// Returns the endpoint url. var url: String {
ise-uiuc/Magicoder-OSS-Instruct-75K