index int64 0 10k | blob_id stringlengths 40 40 | step-1 stringlengths 0 305k | step-2 stringlengths 6 1.1M ⌀ | step-3 stringlengths 15 1.23M ⌀ | step-4 stringlengths 23 1.34M ⌀ | step-5 stringlengths 55 1.2M ⌀ | step-ids sequencelengths 1 5 |
|---|---|---|---|---|---|---|---|
0 | aff1a9263e183610f403a4d6a7f27b45eacb7ff2 | <mask token>
| <mask token>
print(name * 1000)
| name = 'valentina '
print(name * 1000)
| name='valentina '
print(name*1000)
| null | [
0,
1,
2,
3
] |
1 | eabf06481509962652812af67ad59da5cfe30fae | <mask token>
| <mask token>
__all__ = ('__title__', '__summary__', '__version__', '__author__',
'__license__', '__copyright__')
__title__ = 'mupub'
__summary__ = 'Musical score publishing utility for the Mutopia Project'
<mask token>
__version__ = '1.0.8'
__author__ = 'Glen Larsen, Chris Sawer'
__author_email__ = 'glenl.glx@gmail... | <mask token>
__all__ = ('__title__', '__summary__', '__version__', '__author__',
'__license__', '__copyright__')
__title__ = 'mupub'
__summary__ = 'Musical score publishing utility for the Mutopia Project'
<mask token>
__version__ = '1.0.8'
__author__ = 'Glen Larsen, Chris Sawer'
__author_email__ = 'glenl.glx@gmail... | """ mupub module.
"""
__all__ = (
'__title__', '__summary__', '__version__',
'__author__', '__license__', '__copyright__',
)
__title__ = 'mupub'
__summary__ = 'Musical score publishing utility for the Mutopia Project'
"""Versioning:
This utility follows a MAJOR . MINOR . EDIT format. Upon a major
release, t... | null | [
0,
1,
2,
3
] |
2 | 54f0ed5f705d5ada28721301f297b2b0058773ad | <mask token>
class _GenericBot:
<mask token>
def __init__(self, pos, inventory=None):
"""Initialize with an empty inventory.
inventory is a dictionary. If None, an empty one will be used."""
if inventory is None:
self._inventory = {}
else:
self._invent... | <mask token>
class _GenericBot:
<mask token>
def __init__(self, pos, inventory=None):
"""Initialize with an empty inventory.
inventory is a dictionary. If None, an empty one will be used."""
if inventory is None:
self._inventory = {}
else:
self._invent... | <mask token>
class _Vec3(Vec3):
"""A Vec3 that is hashable. Everything in this program should use this
class."""
def __hash__(self):
"""Return the hash."""
return hash((self.x, self.y, self.z))
def clone(self):
"""Return a clone."""
return _Vec3(self.x, self.y, self.z... | <mask token>
class _Vec3(Vec3):
"""A Vec3 that is hashable. Everything in this program should use this
class."""
def __hash__(self):
"""Return the hash."""
return hash((self.x, self.y, self.z))
def clone(self):
"""Return a clone."""
return _Vec3(self.x, self.y, self.z... | """Module for the bot"""
from copy import deepcopy
from time import sleep
import mcpi.minecraft as minecraft
from mcpi.vec3 import Vec3
import mcpi.block as block
from search import SearchProblem, astar, bfs
from singleton import singleton
_AIR = block.AIR.id
_WATER = block.WATER.id
_LAVA = block.LAVA.id
_BEDROCK =... | [
48,
54,
69,
73,
79
] |
3 | 45969b346d6d5cbdef2f5d2f74270cf12024072d | <mask token>
| <mask token>
class Migration(migrations.Migration):
<mask token>
<mask token>
| <mask token>
class Migration(migrations.Migration):
dependencies = [('search', '0003_auto_20230209_1441')]
operations = [migrations.CreateModel(name='SearchSettings', fields=[(
'id', models.AutoField(auto_created=True, primary_key=True,
serialize=False, verbose_name='ID'))], options={'permissi... | from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [('search', '0003_auto_20230209_1441')]
operations = [migrations.CreateModel(name='SearchSettings', fields=[(
'id', models.AutoField(auto_created=True, primary_key=True,
serialize=False, verbose_name... | # Generated by Django 4.1.9 on 2023-06-29 16:11
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("search", "0003_auto_20230209_1441"),
]
operations = [
migrations.CreateModel(
name="SearchSettings",
fields=[
... | [
0,
1,
2,
3,
4
] |
4 | 3fbf1768a2fe78df591c49490dfce5fb374e7fc2 | from functools import wraps
import os
def restoring_chdir(fn):
#XXX:dc: This would be better off in a neutral module
@wraps(fn)
def decorator(*args, **kw):
try:
path = os.getcwd()
return fn(*args, **kw)
finally:
os.chdir(path)
return decorator
clas... | null | null | null | null | [
0
] |
5 | 67b967b688aeac1270eee836e0f6e6b3555b933e | <mask token>
| <mask token>
if u_avg < u_bat_min:
print('proper shut down of the machine due to low battery')
else:
print('tout va bien dormez braves gens')
| <mask token>
pidcmes = Pidcmes()
u_bat_min = 3.7
n_moy = 20
stop_run = False
u_avg = pidcmes.get_tension(n_moy)
if u_avg < u_bat_min:
print('proper shut down of the machine due to low battery')
else:
print('tout va bien dormez braves gens')
| <mask token>
import time
import datetime as dt
from subprocess import call
from pidcmes_lib import Pidcmes
pidcmes = Pidcmes()
u_bat_min = 3.7
n_moy = 20
stop_run = False
u_avg = pidcmes.get_tension(n_moy)
if u_avg < u_bat_min:
print('proper shut down of the machine due to low battery')
else:
print('tout va bie... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
This program is run at regular intervals to check the battery charge status of the uninterruptible power supply.
In our case, it is a LiPo battery with a nominal voltage of 3.7 volts. By setting the voltage for the
Raspberry PI shutdown procedure at 3.7 V,we ensure th... | [
0,
1,
2,
3,
4
] |
6 | c59707ba07c1659d94684c54cdd7bb2658cba935 | <mask token>
class H2OBaseCrossValidator(six.with_metaclass(ABCMeta)):
<mask token>
<mask token>
def split(self, frame, y=None):
"""Generate indices to split data into training and test.
Parameters
----------
frame : ``H2OFrame``
The h2o frame to split
... | <mask token>
class H2OBaseCrossValidator(six.with_metaclass(ABCMeta)):
<mask token>
<mask token>
def split(self, frame, y=None):
"""Generate indices to split data into training and test.
Parameters
----------
frame : ``H2OFrame``
The h2o frame to split
... | <mask token>
class H2OBaseCrossValidator(six.with_metaclass(ABCMeta)):
<mask token>
def __init__(self):
pass
def split(self, frame, y=None):
"""Generate indices to split data into training and test.
Parameters
----------
frame : ``H2OFrame``
The h2o ... | <mask token>
def _build_repr(self):
cls = self.__class__
init = getattr(cls.__init__, 'deprecated_original', cls.__init__)
init_signature = signature(init)
if init is object.__init__:
args = []
else:
args = sorted([p.name for p in init_signature.parameters.values() if
p... | from __future__ import division, print_function, absolute_import
import numbers
import warnings
from abc import ABCMeta, abstractmethod
import numpy as np
from .base import check_frame
from skutil.base import overrides
from sklearn.externals import six
from sklearn.base import _pprint
from sklearn.utils.fixes import si... | [
33,
35,
36,
43,
47
] |
7 | 41cfd558824b6561114a48a694b1e6e6a7cb8c05 | <mask token>
| <mask token>
def app(page):
if not login_status():
title_container = st.empty()
remail_input_container = st.empty()
rpw_input_container = st.empty()
rregister_button_container = st.empty()
email = remail_input_container.text_input('Email ')
password = rpw_input_cont... | import streamlit as st
from streamlit.components.v1 import components
from streamlit.report_thread import get_report_ctx
from util.session import *
from multipage import MultiPage
from pages import register
def app(page):
if not login_status():
title_container = st.empty()
remail_input_container =... | import streamlit as st
from streamlit.components.v1 import components
from streamlit.report_thread import get_report_ctx
from util.session import *
from multipage import MultiPage
from pages import register
def app(page):
if not login_status():
title_container = st.empty()
remail_input_container = ... | null | [
0,
1,
2,
3
] |
8 | f2bb44600f011a205c71985ad94c18f7e058634f | <mask token>
def from_url(url: str) ->Image.Image:
api_response = requests.get(url).content
response_bytes = BytesIO(api_response)
return Image.open(response_bytes)
def from_file(path: str) ->Union[Image.Image, None]:
if os.path.exists(path):
return Image.open(path)
else:
return ... | <mask token>
def get_img_from_file_or_url(img_format: str='JPEG') ->Callable[[str, str],
Image.Image]:
def _apply(filepath: str, url: str) ->Image.Image:
img = from_file(filepath)
if img is None:
img = from_url(url)
img.save(filepath, img_format)
return img.con... | <mask token>
def get_img_from_file_or_url(img_format: str='JPEG') ->Callable[[str, str],
Image.Image]:
def _apply(filepath: str, url: str) ->Image.Image:
img = from_file(filepath)
if img is None:
img = from_url(url)
img.save(filepath, img_format)
return img.con... | import os
import requests
from PIL import Image
from io import BytesIO
import csv
from typing import Iterable, List, Tuple, Dict, Callable, Union, Collection
def get_img_from_file_or_url(img_format: str='JPEG') ->Callable[[str, str],
Image.Image]:
def _apply(filepath: str, url: str) ->Image.Image:
im... | import os
import requests
from PIL import Image
from io import BytesIO
import csv
from typing import Iterable, List, Tuple, Dict, Callable, Union, Collection
# pull the image from the api endpoint and save it if we don't have it, else load it from disk
def get_img_from_file_or_url(img_format: str = 'JPEG') -> Callabl... | [
2,
3,
4,
5,
6
] |
9 | 302605d8bb45b1529742bf9441d476f0276085b9 | "<mask token>\n\n\nclass MyMainWindow(QMainWindow):\n <mask token>\n\n def initUI(self):\n (...TRUNCATED) | "<mask token>\n\n\nclass MyMainWindow(QMainWindow):\n\n def __init__(self):\n super().__in(...TRUNCATED) | "<mask token>\n\n\nclass MyMainWindow(QMainWindow):\n\n def __init__(self):\n super().__in(...TRUNCATED) | "import sys\nfrom PyQt5.QtWidgets import QMainWindow, QWidget, QHBoxLayout, QVBoxLayout, QFrame, QSp(...TRUNCATED) | "import sys\nfrom PyQt5.QtWidgets import (QMainWindow, QWidget, QHBoxLayout, QVBoxLayout, QFrame,\n (...TRUNCATED) | [
12,
14,
15,
17,
18
] |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 12