seed
stringlengths
1
14k
source
stringclasses
2 values
f[2] = (1 + 3*pi2)*cos(z)*sin(x)*sin(y);
ise-uiuc/Magicoder-OSS-Instruct-75K
cout << "rows count = " << rows.size() << endl; for(auto &id: rows) { cout << id << endl; } } // same statement, other bound values // SELECT doctor_id // FROM visits // WHERE LENGTH(patient_name) > 11
ise-uiuc/Magicoder-OSS-Instruct-75K
typedef boost::asio::io_service ios_type; typedef boost::asio::io_service::work work_type; typedef boost::ptr_vector<ios_type> io_services_type; typedef boost::ptr_vector<work_type> works_type; private: io_services_type m_io_services; works_type m_works;
ise-uiuc/Magicoder-OSS-Instruct-75K
$theme = $themeManager->getTheme(); $manifestManager = new PtPwaManifestManager(new PtPwaManifest()); $manifest = $manifestManager->getManifest(); $logoMsg = ''; $hamburgerLogoMsg = ''; $appIconMsg = ''; if (!empty($_POST['save'])) { if (!empty($_FILES['logo']['name'])) { ...
ise-uiuc/Magicoder-OSS-Instruct-75K
// MVVM-RxSwift-snapKitTests // // Created by GoEun Jeong on 2021/04/30. // import Combine import Foundation import Moya @testable import SwiftUI3_0 class MockNetworkingAPI: NetworkingService { func getBeerFromJson(_ api: BeerAPI) -> [Beer] { let bundlePath = Bundle.main.path(forResource: "Stub", ofTyp...
ise-uiuc/Magicoder-OSS-Instruct-75K
#endregion #region Set and Get Direction /// <summary> /// Set and Get Direction /// </summary> /// <param name="direction"></param> public void setDirection(Vector2 direction) { this.Direction = direction; setDelta(direction - this.StartPosition); } public Vecto...
ise-uiuc/Magicoder-OSS-Instruct-75K
tft.fill(TFT.BLACK) testfillcircles(10, TFT.BLUE) testdrawcircles(10, TFT.WHITE) time.sleep_ms(500) testroundrects() time.sleep_ms(500)
ise-uiuc/Magicoder-OSS-Instruct-75K
<filename>Rosalind/perm.py # Enumerating Gene Orders # rosalind.info/problems/perm import sys
ise-uiuc/Magicoder-OSS-Instruct-75K
finish() }) } expect("`x` is eventually-fulfilled") { finish in let future = Future<Int, MyError>.eventuallySuccessfull().map { return $0 } future.on(success: { ...
ise-uiuc/Magicoder-OSS-Instruct-75K
set -e
ise-uiuc/Magicoder-OSS-Instruct-75K
// Constants.swift // FilmInspector
ise-uiuc/Magicoder-OSS-Instruct-75K
example_insert = """ INSERT INTO titanic (Survived, PClass, Name, Sex, Age, Siblings_Spouses_Aboard, Parents_Children_Aboard, Fare) VALUES """ + str(titanic[0]) print(example_insert)
ise-uiuc/Magicoder-OSS-Instruct-75K
@register_classification_loss_fn(name="binary_cross_entropy") class ClsBinaryCrossEntropy(BaseCriteria): """Binary CE for classification tasks""" def __init__(self, opts, *args, **kwargs) -> None:
ise-uiuc/Magicoder-OSS-Instruct-75K
struct ParticleEmitter { std::vector<Particle> particles;
ise-uiuc/Magicoder-OSS-Instruct-75K
} // namespace chrgfx
ise-uiuc/Magicoder-OSS-Instruct-75K
global img_lbl global imagem root.filename = filedialog.askopenfilename(initialdir = "/Aulas-Tkinter", title = "Selecionar Arquivo", filetypes = (("png files", "*.png"), ("all files", "*.*"))) lbl = Label(root, text = root.filename).pack() imagem = ImageTk.PhotoImage(Image.open(root.filename))
ise-uiuc/Magicoder-OSS-Instruct-75K
key = random_str()
ise-uiuc/Magicoder-OSS-Instruct-75K
d = dict(self.__dict__) del d['logger']
ise-uiuc/Magicoder-OSS-Instruct-75K
<gh_stars>0 # =============================================================================== # Copyright 2018 ross # # 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/l...
ise-uiuc/Magicoder-OSS-Instruct-75K
then echo 'Code contains compiler warnings' ${ANALYZE_CMD} exit 1 fi # Run unit tests dart -c --package-root=build/test/packages \ build/test/all_tests.dart # Run integration tests test/integration/run_tests.sh
ise-uiuc/Magicoder-OSS-Instruct-75K
const int topSectorSplitsByLatitude = splitsParameters._x;
ise-uiuc/Magicoder-OSS-Instruct-75K
sheet.Frequency_Cap_Unlimited AS frequencyCapUnlimited, sheet.Frequency_Cap_Time_Unit AS frequencyCapTimeUnit,
ise-uiuc/Magicoder-OSS-Instruct-75K
use TenantCloud\BetterReflection\Relocated\PHPStan\Type\ObjectType; use TenantCloud\BetterReflection\Relocated\PHPStan\Type\Type;
ise-uiuc/Magicoder-OSS-Instruct-75K
* 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.
ise-uiuc/Magicoder-OSS-Instruct-75K
Descriptor(crate::descriptor::error::Error), /// Error that can be returned to fail the validation of an address AddressValidator(crate::wallet::address_validator::AddressValidatorError), /// Encoding error Encode(bitcoin::consensus::encode::Error), /// Miniscript error Miniscript(miniscript...
ise-uiuc/Magicoder-OSS-Instruct-75K
/** JSP tag that expands the list of options * of a select with all the records of a given table. */ public class select extends TagSupport { Connection con; String sSelectedCode="0"; String sTableName=""; String sFieldName=""; String sCodeName="";
ise-uiuc/Magicoder-OSS-Instruct-75K
class User(BaseModel): id:str username:str bot:bool class Ready(BaseModel): version:str session_id:str user: User shard:list[int]
ise-uiuc/Magicoder-OSS-Instruct-75K
await Tournament.create(name="1") await Tournament.create(name="3") rows_affected = await Tournament.all().update(name="2") self.assertEqual(rows_affected, 2) tournament = await Tournament.first() self.assertEqual(tournament.name, "2") async def test_update_relation...
ise-uiuc/Magicoder-OSS-Instruct-75K
/// Base setup call (from the constructors) /// </summary> /// <param name="blog"></param> private void Setup(IBlog blog) { // Start a new instance of the session helper pointing at the http context session this.blog = blog; // Set the blog context ...
ise-uiuc/Magicoder-OSS-Instruct-75K
<!-- Date & Time Picker JS --> <script src="{{ asset('canvas/js/components/moment.js') }}"></script> <script src="{{ asset('canvas/demos/travel/js/datepicker.js') }}"></script> <!-- Footer Scripts
ise-uiuc/Magicoder-OSS-Instruct-75K
m_threshold.push_back(item); } m_numOutThresholds.m_threshold = delays.back(); m_numOutThresholds.m_number = 0; }
ise-uiuc/Magicoder-OSS-Instruct-75K
print(db.cursor().execute("SELECT * FROM USERPASSWORDS").fetchall()) #print(db.cursor().execute("SELECT * FROM USERNAMES").fetchmany(2)) #print(db.cursor().execute("SELECT * FROM USERNAMES").fetchone()) db.commit();db.close()
ise-uiuc/Magicoder-OSS-Instruct-75K
class Timer: def __init__(self): self._start_time = None self._stop_time = None
ise-uiuc/Magicoder-OSS-Instruct-75K
def plot_ers(ers, tx1, tx2): """ Plot ERs visually when debugging. """ start, end, er_dict, tx1_dict, tx2_dict = [], [], {}, {}, {} for er in ers: start.append(er.start) end.append(er.end) g_start = min(start) g_end = max(end)
ise-uiuc/Magicoder-OSS-Instruct-75K
void Update() { transform.Rotate(Vector3.forward * angularVelocity * Time.deltaTime); } void OnCollisionEnter2D(Collision2D other) { if (other.gameObject.layer != LayerMask.NameToLayer(playerLayer))
ise-uiuc/Magicoder-OSS-Instruct-75K
Should return "20 8 5 19 21 14 19 5 20 19 5 20 19 1 20 20 23 5 12 22 5 15 3 12 15 3 11" (as a string) """ def alphabet_position(text): alphabet = 'abcdefghijklmnopqrstuvwxyz' return ' '.join(str(alphabet.find(char)+1) for char in text.casefold() if char in alphabet)
ise-uiuc/Magicoder-OSS-Instruct-75K
exec "$@"
ise-uiuc/Magicoder-OSS-Instruct-75K
from src.prep_data import main as prep_data from src.run_sims import run_aggressive_sim, run_conservative_sim from src.regression import make_and_run_model as run_model from src.coupled import make_and_run_model as run_coupled __author__ = '<NAME>' logger = logging.getLogger(__name__) if __name__ == '__...
ise-uiuc/Magicoder-OSS-Instruct-75K
string, tags=bleach_whitelist.markdown_tags, attributes=bleach_whitelist.markdown_attrs, styles=bleach_whitelist.all_styles, )
ise-uiuc/Magicoder-OSS-Instruct-75K
end_time = timezone.now() return response
ise-uiuc/Magicoder-OSS-Instruct-75K
), "Você está usando nlp.pipe envolvido em uma lista (list)?" __msg__.good(
ise-uiuc/Magicoder-OSS-Instruct-75K
return wrappedLinksOutput; } }
ise-uiuc/Magicoder-OSS-Instruct-75K
name in ['In', 'Out', 'get_ipython', 'exit', 'quit'] or name.startswith('_') )
ise-uiuc/Magicoder-OSS-Instruct-75K
export class HubView extends Controls.BaseControl { private grid: Grids.Grid; private menuBar: Menus.MenuBar; constructor() { super();
ise-uiuc/Magicoder-OSS-Instruct-75K
shifted_bbox = bbox.get_shifted_box() # compare
ise-uiuc/Magicoder-OSS-Instruct-75K
redirectTo: string | null | undefined, defaultRedirect: string | '/' | undefined, fallback: null | Fallback | undefined, debug: boolean | undefined, passRouteProps: boolean | string[] | undefined, rest: [] | null | undefined; } const WiseRouter: React.FC<WiseRouterProps> = (props) => {
ise-uiuc/Magicoder-OSS-Instruct-75K
def __init__(self): super().__init__() self.reload_confirm_nxos = r'.*This command will reboot the system[\n\r]*Do you want to continue\?\s*\(y/n\)\s*\[n\]\s*$'
ise-uiuc/Magicoder-OSS-Instruct-75K
use serde_json::Value; #[derive(Clone, Debug, Serialize, Deserialize)] pub struct ExitStatus { #[serde(rename = "exitTime")] exit_time: String, #[serde(rename = "statusCode")]
ise-uiuc/Magicoder-OSS-Instruct-75K
typedef rect_tt< int, 2 > rect2i_t; typedef rect_tt< float, 2 > rect2f_t; };
ise-uiuc/Magicoder-OSS-Instruct-75K
def redirect_url(): return request.args.get('next') or \ request.referrer or \ url_for('index') @app.route("/") def allLogs(): logItem = dbCollection.find() return render_template('index.html', mode="get", logs=logItem, t=title, h=heading)
ise-uiuc/Magicoder-OSS-Instruct-75K
("sessions", AggregateFunction("countIf", [UUID(), UInt(8)])), ("users", AggregateFunction("uniqIf", [UUID(), UInt(8)])), ("sessions_crashed", AggregateFunction("countIf", [UUID(), UInt(8)]),), ("sessions_abnormal", AggregateFunction("countIf", [UUID(), UInt(8)]),), ("sessions_er...
ise-uiuc/Magicoder-OSS-Instruct-75K
suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(TestRedisDB)) suite.addTest(unittest.makeSuite(TestLazyDB)) suite.addTest(unittest.makeSuite(TestVoidDB)) return suite
ise-uiuc/Magicoder-OSS-Instruct-75K
###########N \033[38;5;208m+ooooooooo. :ooooooooossssssssssssss+\e[39m\e[49m y######### ###########s \033[38;5;208m+ooooooooo. :ooooooooossssssssssssss+\e[39m\e[49m -######### ###########: \033[38;5;208m+ooooooooo. :ooooooooo: :sssssssss+\e[39m\e[49m N########...
ise-uiuc/Magicoder-OSS-Instruct-75K
change_id=dict(required=True, type='str'), branch=dict(required=False, default=None, type='str'), patchset_rev=dict(required=False, default=None, type='str') ) ) result = resolve_dep(module.params['host'], module.params['change_id'], ...
ise-uiuc/Magicoder-OSS-Instruct-75K
from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class Scope(object): READ = 'read' WRITE = 'write'
ise-uiuc/Magicoder-OSS-Instruct-75K
self.dontstrip[role] = {} for ts in list_from_csv(v): ts = ts.strip()
ise-uiuc/Magicoder-OSS-Instruct-75K
file_name = file_name[:max_path] return file_name
ise-uiuc/Magicoder-OSS-Instruct-75K
parser.add_argument('--label_map', type=str, default='data/mscoco_label_map.pbtxt', help='label map file') parser.add_argument('--model_dir', type=str, default='faster_rcnn_inception_resnet_v2_atrous_coco_2018_01_28', help='model directory') args = parser.parse_args() MODEL_DIR = args.model_dir # Path to frozen detecti...
ise-uiuc/Magicoder-OSS-Instruct-75K
--do_finetuning \
ise-uiuc/Magicoder-OSS-Instruct-75K
return self._num_samples
ise-uiuc/Magicoder-OSS-Instruct-75K
################### # Set Subroutines # ################### # Some of these lo
ise-uiuc/Magicoder-OSS-Instruct-75K
'username': 'test', 'password': '<PASSWORD>', 'database': 'jardin_test', 'host': 'localhost', 'port': 1234 } } LOG_LEVEL = logging.INFO
ise-uiuc/Magicoder-OSS-Instruct-75K
#region Public Methods
ise-uiuc/Magicoder-OSS-Instruct-75K
out_array[ylo:yhi, xlo:xhi] = in_array[ymin:ymax, xmin:xmax] return out_array
ise-uiuc/Magicoder-OSS-Instruct-75K
You can use the statistics such as mean, median or max of each column to fill the missing value or replace outlier.
ise-uiuc/Magicoder-OSS-Instruct-75K
amount = amount * INTERVALS[unit] for i in range(len(NAMES)-1, -1, -1): a = amount // INTERVALS[i] if a > 0: result.append( (a, NAMES[i][1 % a]) ) amount -= a * INTERVALS[i] return result if __name__ == "__main__": import doctest
ise-uiuc/Magicoder-OSS-Instruct-75K
<reponame>MateuszMazurkiewiczWaw/IntelligentTraderReactFlask<gh_stars>0 import { MdiReactIconComponentType } from './dist/typings'; declare const AndroidMessagesIcon: MdiReactIconComponentType; export default AndroidMessagesIcon;
ise-uiuc/Magicoder-OSS-Instruct-75K
correct_prediction = (predicted == target).type_as(target).sum().item() acc = round(correct_prediction*100/target.size(0), decimal_precision) return acc
ise-uiuc/Magicoder-OSS-Instruct-75K
def init(self): """ Init style manager """ self.loadStyleSheet(self.styles_path)
ise-uiuc/Magicoder-OSS-Instruct-75K
[TestMethod] public void when_calling_resolve_bug_the_bug_should_get_a_comment() { int bugId = 26; string resolution = "FIXED"; string expectedComment = $"Resolution has changed to {resolution} by VersionOne"; _client.ResolveBug(bugId , resolutio...
ise-uiuc/Magicoder-OSS-Instruct-75K
namespace app\models; use Yii; use yii\base\Model; use yii\data\ActiveDataProvider;
ise-uiuc/Magicoder-OSS-Instruct-75K
using Avalonia.Controls.Shapes; using Avalonia.Layout; using Avalonia.Media; using Xunit; #if AVALONIA_SKIA namespace Avalonia.Skia.RenderTests #else namespace Avalonia.Direct2D1.RenderTests.Shapes #endif { using System.Threading.Tasks; using Avalonia.Collections;
ise-uiuc/Magicoder-OSS-Instruct-75K
def pausePlotToLoadImage(self): # matplotlib needs to be paused for a fraction of a second plt.pause(0.001) # in order to fully load image. def closeImage(self): plt.close()
ise-uiuc/Magicoder-OSS-Instruct-75K
Assertions.assertThat(contributor1.getId()).isEqualTo(1L); Assertions.assertThat(contributor1.getDisplayName()).isEqualTo("<NAME>"); Assertions.assertThat(contributor1.getNames()) .containsExactlyInAnyOrder("Max", "<NAME>", "Mustermann"); Assertions.assertThat(contributor1.getEmails())
ise-uiuc/Magicoder-OSS-Instruct-75K
Returns ------- fsdict : dict dict of FrameSlice instances See also -------- FrameSlice Notes ----- Ignores epoch with a state of 0.
ise-uiuc/Magicoder-OSS-Instruct-75K
if not a==b: ind=1 # carrying the passing of status down to the test for the rest if ind==0 and passing==0: passing=0 else: passing=1 # printing output result if passing==0:
ise-uiuc/Magicoder-OSS-Instruct-75K
w // self.model.patch_size[0],
ise-uiuc/Magicoder-OSS-Instruct-75K
#this line is tricky, watch out! print "If I add %d, %d, and %d I get %d." % (my_age, my_height, my_weight, my_age + my_height + my_weight) print "In the next line we will use just %r to enter the variables using a 'format string'" print "%r, if I add %r, %r, and %r I get %r." % (my_name, my_age, my_height, my_weight,...
ise-uiuc/Magicoder-OSS-Instruct-75K
from gooey.gui.util.filedrop import FileDrop from gooey.util.functional import merge from gooey.gui.components.mouse import notifyMouseEvent class TextInput(wx.Panel): def __init__(self, parent, *args, **kwargs): super(TextInput, self).__init__(parent)
ise-uiuc/Magicoder-OSS-Instruct-75K
from lib.response import OkResponse from tests.commands.commands_test_base import CommandsTestBase
ise-uiuc/Magicoder-OSS-Instruct-75K
class SecurityItem(Item): # define the fields for your item here like: # name = scrapy.Field() source_url = Field()
ise-uiuc/Magicoder-OSS-Instruct-75K
] color = '#af3ecf' def __init__(self, params): super().__init__(params) def setupInputs(self): return self.input(0) def doStuff(self, inputData): time.sleep(10)
ise-uiuc/Magicoder-OSS-Instruct-75K
if __name__ == "__main__": a = argparse.ArgumentParser() a.add_argument("--image", help="path to image") a.add_argument("--image_url", help="url to image") a.add_argument("--model") args = a.parse_args() if args.image is None and args.image_url is None: a.print_help() sys.exit...
ise-uiuc/Magicoder-OSS-Instruct-75K
import com.xiaowangzi.yygh.common.result.Result;
ise-uiuc/Magicoder-OSS-Instruct-75K
anch_from = len( sourceLayer.anchors ) anch_into = len( targetLayer.anchors ) if anch_into != 0: print "- Cleaning out anchors in target layer" sourceLayer.setAnchors_( None )
ise-uiuc/Magicoder-OSS-Instruct-75K
n2 = Node(2, None) n1.next = n2
ise-uiuc/Magicoder-OSS-Instruct-75K
<?php namespace App\Http\Controllers; use App\User; use App\Attorney; use App\UserMessages; use App\AttorneyMessages; use Illuminate\Http\Request; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Auth;
ise-uiuc/Magicoder-OSS-Instruct-75K
/** * Created by jiangyu on 15/9/30. */ public interface OnRecyclerViewItemClickListener { void onItemClick(ViewGroup parent, View view, int position); }
ise-uiuc/Magicoder-OSS-Instruct-75K
#! /usr/bin/env bash set -e export MONGODB_URI=mongodb://root:example@localhost:27017/meeting_room_booking_service
ise-uiuc/Magicoder-OSS-Instruct-75K
new_filtered_means, new_filtered_covariances = (kf.filter_update(means, covariances, measurement)) means, covariances = new_filtered_means, new_filtered_covariances t = t + 1.0 # print(means[:3]); return means[:3]
ise-uiuc/Magicoder-OSS-Instruct-75K
keywords='python telegram-client telegram-client-api asyncio async-telegram-client' 'bot bot-framework telegram aioteleclient', classifiers=[ 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 3',
ise-uiuc/Magicoder-OSS-Instruct-75K
if ((encounteredMap.get(currentConnection.variable) ?? 0) > maxCycles) { return true; } encounteredMap.set( currentConnection.variable, (encounteredMap.get(currentConnection.variable) ?? 0) + 1 ); currentConnection = currentConnection.prevConnection;
ise-uiuc/Magicoder-OSS-Instruct-75K
@discardableResult func debugDetail() -> URLRequest { print(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>") print(self.url ?? "No URL") print(self.allHTTPHeaderFields ?? "No headers") print(self.httpMethod ?? "No httpMethod") if let data = self.httpBody {
ise-uiuc/Magicoder-OSS-Instruct-75K
# Clean default BIP44 derivation indexes/paths bip44_hdwallet.clean_derivation() # Derivation from Ethereum BIP44 derivation path bip44_derivation: BIP44Derivation = BIP44Derivation( cryptocurrency=EthereumMainnet, account=0, change=False, address=account_index ) # Drive Ethereum BIP44...
ise-uiuc/Magicoder-OSS-Instruct-75K
let temperature = Temperature(fahrenheitValue: 32) expect(formatter.stringFromTemperature(temperature)) == "0°"
ise-uiuc/Magicoder-OSS-Instruct-75K
package_categories = package_categories.strip('"[],').split('","') package['topicCategories'] = ';'.join(package_categories) result.append(package) return result result = export_group_and_tags(packages) assert len(result) == 12 assert result[8]['topic'] == 'BusinessU...
ise-uiuc/Magicoder-OSS-Instruct-75K
for d in items: value.append(str(int(round(math.sqrt(2*c*float(d)/h))))) print ','.join(value)
ise-uiuc/Magicoder-OSS-Instruct-75K
self.assertIsNone(galaxy.sectors[dagudashaag.name].rimward, "Nothing should be rimward of Dagudashaag") self.assertIsNone(galaxy.sectors[dagudashaag.name].spinward, "Nothing should be spinward of Dagudashaag") self.assertEqual(galaxy.sectors[core.name], galaxy.sectors[dagudashaag.name].trailing,...
ise-uiuc/Magicoder-OSS-Instruct-75K
from ..settings.config import ma class CardSchema(ma.Schema): class Meta: fields = ('uid', 'active', 'deleted', 'createAt', 'updateAt', 'num_card', 'name', 'date_valid', 'cod_security') card_schema = CardSchema() cards_schema = CardSchema(many=True)
ise-uiuc/Magicoder-OSS-Instruct-75K
wr.WriteVersion(maxVersion) END Externalize;
ise-uiuc/Magicoder-OSS-Instruct-75K