index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
96,460
y3rsh/discuss
refs/heads/master
/tests/test_max_repeating_chars.py
import pytest import max_repeating_chars from typing import Tuple LONG_SAME_CHAR = "mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm...
{"/tests/test_max_repeating_chars.py": ["/max_repeating_chars.py"]}
96,469
VladX09/mind-mapper
refs/heads/master
/mind_mapper/utils.py
import os from importlib import resources as importlib_resources import yaml from loguru import logger def load(path): if os.path.exists(path): path = os.path.abspath(path) logger.debug("Loading from '{}'", path) with open(path) as fp: return yaml.full_load(fp) package, ...
{"/mind_mapper/cli.py": ["/mind_mapper/__init__.py", "/mind_mapper/use_cases.py"], "/mind_mapper/styler.py": ["/mind_mapper/__init__.py", "/mind_mapper/models.py"], "/mind_mapper/parser.py": ["/mind_mapper/__init__.py", "/mind_mapper/models.py"], "/mind_mapper/use_cases.py": ["/mind_mapper/__init__.py"]}
96,470
VladX09/mind-mapper
refs/heads/master
/mind_mapper/schemas.py
import schema as sc AttrsSchema = sc.Schema({sc.Optional(str): sc.Or(str, int, float, bool)}) RecordSchema = sc.Schema({ str: sc.Or(None, list), sc.Optional("attrs", default={}): AttrsSchema, }) RootSchema = sc.Schema({"root": str, sc.Optional("attrs"): AttrsSchema}) MapSchema = sc.Schema([sc.Or(RecordSchema, ...
{"/mind_mapper/cli.py": ["/mind_mapper/__init__.py", "/mind_mapper/use_cases.py"], "/mind_mapper/styler.py": ["/mind_mapper/__init__.py", "/mind_mapper/models.py"], "/mind_mapper/parser.py": ["/mind_mapper/__init__.py", "/mind_mapper/models.py"], "/mind_mapper/use_cases.py": ["/mind_mapper/__init__.py"]}
96,471
VladX09/mind-mapper
refs/heads/master
/mind_mapper/__init__.py
import sys from loguru import logger log_msg_format = ("{time:YYYY-MM-DD HH:mm:ss} | <level>{level}</level>" " | <c>{name}</c>:<c>{function}</c>:<c>{line}</c> - <level>{message}</level>") logger.remove(0) # Remove default stderr handler to prevent output doubling logger.add(sys.stdout, format=log_...
{"/mind_mapper/cli.py": ["/mind_mapper/__init__.py", "/mind_mapper/use_cases.py"], "/mind_mapper/styler.py": ["/mind_mapper/__init__.py", "/mind_mapper/models.py"], "/mind_mapper/parser.py": ["/mind_mapper/__init__.py", "/mind_mapper/models.py"], "/mind_mapper/use_cases.py": ["/mind_mapper/__init__.py"]}
96,472
VladX09/mind-mapper
refs/heads/master
/mind_mapper/cli.py
import click from loguru import logger from . import utils from .use_cases import render_map @click.command() @click.argument("map_path", type=click.Path(exists=True, readable=True, resolve_path=True)) @click.argument("output_path", type=click.Path(writable=True, resolve_path=True)) @click.option("-t", ...
{"/mind_mapper/cli.py": ["/mind_mapper/__init__.py", "/mind_mapper/use_cases.py"], "/mind_mapper/styler.py": ["/mind_mapper/__init__.py", "/mind_mapper/models.py"], "/mind_mapper/parser.py": ["/mind_mapper/__init__.py", "/mind_mapper/models.py"], "/mind_mapper/use_cases.py": ["/mind_mapper/__init__.py"]}
96,473
VladX09/mind-mapper
refs/heads/master
/mind_mapper/styler.py
import abc import re import typing as t import schema as sc from loguru import logger from . import schemas from .models import MindMap, Node NODE_PLACEHOLDER = "NODE" class StyleParsingError(Exception): pass class Predicate(abc.ABC): @abc.abstractmethod def __call__(self, node: Node) -> bool: ...
{"/mind_mapper/cli.py": ["/mind_mapper/__init__.py", "/mind_mapper/use_cases.py"], "/mind_mapper/styler.py": ["/mind_mapper/__init__.py", "/mind_mapper/models.py"], "/mind_mapper/parser.py": ["/mind_mapper/__init__.py", "/mind_mapper/models.py"], "/mind_mapper/use_cases.py": ["/mind_mapper/__init__.py"]}
96,474
VladX09/mind-mapper
refs/heads/master
/mind_mapper/parser.py
import typing as t import schema as sc from loguru import logger from . import schemas from .models import MindMap, Node class ParsingError(Exception): pass class Parser: """Parses YAML map description to lists of nodes and edges. Tracks node parent, children, depth and initial styles. """ de...
{"/mind_mapper/cli.py": ["/mind_mapper/__init__.py", "/mind_mapper/use_cases.py"], "/mind_mapper/styler.py": ["/mind_mapper/__init__.py", "/mind_mapper/models.py"], "/mind_mapper/parser.py": ["/mind_mapper/__init__.py", "/mind_mapper/models.py"], "/mind_mapper/use_cases.py": ["/mind_mapper/__init__.py"]}
96,475
VladX09/mind-mapper
refs/heads/master
/mind_mapper/use_cases.py
import typing as t import pydot from . import parser, styler def render_map(map_raw: t.List[t.Dict[str, t.Any]], styles_raw: t.Dict[str, t.Dict], output_path: str, program: str, output_format: str): map_parser = parser.Parser() mind_map = map_parser.parse_map(map_raw) styles = styler.par...
{"/mind_mapper/cli.py": ["/mind_mapper/__init__.py", "/mind_mapper/use_cases.py"], "/mind_mapper/styler.py": ["/mind_mapper/__init__.py", "/mind_mapper/models.py"], "/mind_mapper/parser.py": ["/mind_mapper/__init__.py", "/mind_mapper/models.py"], "/mind_mapper/use_cases.py": ["/mind_mapper/__init__.py"]}
96,476
VladX09/mind-mapper
refs/heads/master
/mind_mapper/models.py
import typing as t import pydot class Node(pydot.Node): def __init__(self, name: str, parent: "Node", children: t.Optional[t.List["Node"]] = None, **init_attrs): super().__init__(name=self.hash_name(name), label=name) self.parent = parent self.depth: int = parent.depth + 1 if parent else ...
{"/mind_mapper/cli.py": ["/mind_mapper/__init__.py", "/mind_mapper/use_cases.py"], "/mind_mapper/styler.py": ["/mind_mapper/__init__.py", "/mind_mapper/models.py"], "/mind_mapper/parser.py": ["/mind_mapper/__init__.py", "/mind_mapper/models.py"], "/mind_mapper/use_cases.py": ["/mind_mapper/__init__.py"]}
96,477
VladX09/mind-mapper
refs/heads/master
/setup.py
import os from setuptools import find_packages, setup def parse_requirements(requirements_file: str): requirements_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), requirements_file) with open(requirements_path, "r") as fp: return list(fp.readlines()) setup( name="mind-mapper", ...
{"/mind_mapper/cli.py": ["/mind_mapper/__init__.py", "/mind_mapper/use_cases.py"], "/mind_mapper/styler.py": ["/mind_mapper/__init__.py", "/mind_mapper/models.py"], "/mind_mapper/parser.py": ["/mind_mapper/__init__.py", "/mind_mapper/models.py"], "/mind_mapper/use_cases.py": ["/mind_mapper/__init__.py"]}
96,484
MagGeo/MagGeo
refs/heads/master
/utilities/gg_to_geo.py
import numpy as np """ Compute geocentric colatitude and radius from geodetic colatitude and height. Parameters ---------- h : ndarray, shape (...) Altitude in kilometers. gdcolat : ndarray, shape (...) Geodetic colatitude Returns ------- radius : ndarray, shape (...) Geocentric radius in kilometers. theta : ndarr...
{"/utilities/MagGeoFunctions.py": ["/utilities/gg_to_geo.py", "/utilities/auxiliaryfunctions.py"], "/utilities/row_handler.py": ["/utilities/MagGeoFunctions.py", "/utilities/gg_to_geo.py"], "/MagGeo_main.py": ["/utilities/MagGeoFunctions.py"]}
96,485
MagGeo/MagGeo
refs/heads/master
/utilities/MagGeoFunctions.py
import warnings warnings.filterwarnings('ignore', message='Could not import Cartopy package. Plotting data on maps is not available in chaosmagpy') import sys, os import chaosmagpy as cp import pandas as pd from viresclient import SwarmRequest import utilities from utilities.gg_to_geo import gg_to_geo from utilities...
{"/utilities/MagGeoFunctions.py": ["/utilities/gg_to_geo.py", "/utilities/auxiliaryfunctions.py"], "/utilities/row_handler.py": ["/utilities/MagGeoFunctions.py", "/utilities/gg_to_geo.py"], "/MagGeo_main.py": ["/utilities/MagGeoFunctions.py"]}
96,486
MagGeo/MagGeo
refs/heads/master
/utilities/row_handler.py
import warnings warnings.filterwarnings('ignore', message='Could not import Cartopy package. Plotting data on maps is not available in chaosmagpy') import pandas as pd import numpy as np import sys, os import chaosmagpy as cp from pathlib import Path from tqdm import tqdm import utilities from utilities.MagGeoFunction...
{"/utilities/MagGeoFunctions.py": ["/utilities/gg_to_geo.py", "/utilities/auxiliaryfunctions.py"], "/utilities/row_handler.py": ["/utilities/MagGeoFunctions.py", "/utilities/gg_to_geo.py"], "/MagGeo_main.py": ["/utilities/MagGeoFunctions.py"]}
96,487
MagGeo/MagGeo
refs/heads/master
/utilities/auxiliaryfunctions.py
import numpy as np import pandas as pd def distance_to_GPS(s_lat, s_lng, e_lat, e_lng): # approximate radius of earth in km R = 6373.0 s_lat = s_lat*(np.pi)/180.0 s_lng = np.deg2rad(s_lng) e_lat = np.deg2rad(e_lat) e_lng = np.deg2rad(e_lng) ...
{"/utilities/MagGeoFunctions.py": ["/utilities/gg_to_geo.py", "/utilities/auxiliaryfunctions.py"], "/utilities/row_handler.py": ["/utilities/MagGeoFunctions.py", "/utilities/gg_to_geo.py"], "/MagGeo_main.py": ["/utilities/MagGeoFunctions.py"]}
96,488
MagGeo/MagGeo
refs/heads/master
/MagGeo_main.py
""" Core MagGeo_Sequential Model Created on Thur Feb 17, 22 @author: Fernando Benitez-Paez """ import datetime as dt from datetime import timedelta import sys,os from matplotlib.pyplot import pause import pandas as pd import numpy as np from tqdm import tqdm import click from yaml import load, SafeLoader from virescl...
{"/utilities/MagGeoFunctions.py": ["/utilities/gg_to_geo.py", "/utilities/auxiliaryfunctions.py"], "/utilities/row_handler.py": ["/utilities/MagGeoFunctions.py", "/utilities/gg_to_geo.py"], "/MagGeo_main.py": ["/utilities/MagGeoFunctions.py"]}
96,490
Allen517/alp-baselines
refs/heads/master
/eval/eval.py
# -*- coding=UTF-8 -*-\n from __future__ import print_function import numpy as np import random from collections import defaultdict import json import re import sys,os BASE_DIR = os.path.dirname(os.path.abspath(__file__))#存放c.py所在的绝对路径 sys.path.append(BASE_DIR) from eval.measures import * class Eval(object): d...
{"/eval/eval.py": ["/eval/measures.py"], "/eval/eval_ione.py": ["/eval/eval.py"], "/fruip/fruip.py": ["/utils/graphx.py"], "/eval/eval_crossmna.py": ["/eval/eval.py"], "/eval_mna.py": ["/eval/eval_mna.py", "/eval/measures.py"], "/mna/MNA.py": ["/utils/utils.py"], "/eval/eval_mna.py": ["/eval/eval.py", "/utils/graphx.py...
96,491
Allen517/alp-baselines
refs/heads/master
/eval/eval_ione.py
from __future__ import print_function import sys,os BASE_DIR = os.path.dirname(os.path.abspath(__file__))#存放c.py所在的绝对路径 sys.path.append(BASE_DIR) from eval.eval import * class Eval_IONE(Eval): def __init__(self): super(Eval_IONE, self).__init__() def _read_model(self, filepath): return Non...
{"/eval/eval.py": ["/eval/measures.py"], "/eval/eval_ione.py": ["/eval/eval.py"], "/fruip/fruip.py": ["/utils/graphx.py"], "/eval/eval_crossmna.py": ["/eval/eval.py"], "/eval_mna.py": ["/eval/eval_mna.py", "/eval/measures.py"], "/mna/MNA.py": ["/utils/utils.py"], "/eval/eval_mna.py": ["/eval/eval.py", "/utils/graphx.py...
96,492
Allen517/alp-baselines
refs/heads/master
/final/final.py
from __future__ import print_function import scipy.sparse as sp import numpy as np import time from scipy.sparse.linalg import norm import sys ''' Description: The algorithm is the generalized attributed network alignment algorithm. The algorithm can handle the cases no matter node attributes and/or edge at...
{"/eval/eval.py": ["/eval/measures.py"], "/eval/eval_ione.py": ["/eval/eval.py"], "/fruip/fruip.py": ["/utils/graphx.py"], "/eval/eval_crossmna.py": ["/eval/eval.py"], "/eval_mna.py": ["/eval/eval_mna.py", "/eval/measures.py"], "/mna/MNA.py": ["/utils/utils.py"], "/eval/eval_mna.py": ["/eval/eval.py", "/utils/graphx.py...
96,493
Allen517/alp-baselines
refs/heads/master
/fruip/fruip.py
# -*- coding:utf8 -*- from __future__ import print_function import numpy as np from collections import defaultdict from utils.graphx import * import sys class FRUIP(object): def __init__(self, graph, embed_files, linkage_file): self.emb = dict() self.look_up = dict() self.look_back = dict() self.graph = g...
{"/eval/eval.py": ["/eval/measures.py"], "/eval/eval_ione.py": ["/eval/eval.py"], "/fruip/fruip.py": ["/utils/graphx.py"], "/eval/eval_crossmna.py": ["/eval/eval.py"], "/eval_mna.py": ["/eval/eval_mna.py", "/eval/measures.py"], "/mna/MNA.py": ["/utils/utils.py"], "/eval/eval_mna.py": ["/eval/eval.py", "/utils/graphx.py...
96,494
Allen517/alp-baselines
refs/heads/master
/eval/eval_crossmna.py
from __future__ import print_function import sys,os BASE_DIR = os.path.dirname(os.path.abspath(__file__))#存放c.py所在的绝对路径 sys.path.append(BASE_DIR) from eval.eval import * import re class Eval_CrossMNA(Eval): def __init__(self): super(Eval_CrossMNA, self).__init__() # def _read_model(self, filepath)...
{"/eval/eval.py": ["/eval/measures.py"], "/eval/eval_ione.py": ["/eval/eval.py"], "/fruip/fruip.py": ["/utils/graphx.py"], "/eval/eval_crossmna.py": ["/eval/eval.py"], "/eval_mna.py": ["/eval/eval_mna.py", "/eval/measures.py"], "/mna/MNA.py": ["/utils/utils.py"], "/eval/eval_mna.py": ["/eval/eval.py", "/utils/graphx.py...
96,495
Allen517/alp-baselines
refs/heads/master
/eval_mna.py
# -*- coding=UTF-8 -*-\n from eval.eval_mna import Eval_MNA from eval.measures import * import ast from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter def str2bool(v): if isinstance(v, bool): return v if v.lower() in ('yes', 'true', 't', 'y', '1'): return True elif v.lower() ...
{"/eval/eval.py": ["/eval/measures.py"], "/eval/eval_ione.py": ["/eval/eval.py"], "/fruip/fruip.py": ["/utils/graphx.py"], "/eval/eval_crossmna.py": ["/eval/eval.py"], "/eval_mna.py": ["/eval/eval_mna.py", "/eval/measures.py"], "/mna/MNA.py": ["/utils/utils.py"], "/eval/eval_mna.py": ["/eval/eval.py", "/utils/graphx.py...
96,496
Allen517/alp-baselines
refs/heads/master
/mna/MNA.py
from __future__ import print_function import os from collections import defaultdict import numpy as np import random from sklearn import svm from sklearn.externals import joblib from utils.utils import * from utils.LogHandler import LogHandler class _MNA(object): def __init__(self, graph, attr_file, anchorfile,...
{"/eval/eval.py": ["/eval/measures.py"], "/eval/eval_ione.py": ["/eval/eval.py"], "/fruip/fruip.py": ["/utils/graphx.py"], "/eval/eval_crossmna.py": ["/eval/eval.py"], "/eval_mna.py": ["/eval/eval_mna.py", "/eval/measures.py"], "/mna/MNA.py": ["/utils/utils.py"], "/eval/eval_mna.py": ["/eval/eval.py", "/utils/graphx.py...
96,497
Allen517/alp-baselines
refs/heads/master
/regal/config.py
import numpy as np class RepMethod(): def __init__(self, align_info = None, p=None, k=10, max_layer=None, alpha = 0.1, num_buckets = None, normalize = True, gammastruc = 1, ...
{"/eval/eval.py": ["/eval/measures.py"], "/eval/eval_ione.py": ["/eval/eval.py"], "/fruip/fruip.py": ["/utils/graphx.py"], "/eval/eval_crossmna.py": ["/eval/eval.py"], "/eval_mna.py": ["/eval/eval_mna.py", "/eval/measures.py"], "/mna/MNA.py": ["/utils/utils.py"], "/eval/eval_mna.py": ["/eval/eval.py", "/utils/graphx.py...
96,498
Allen517/alp-baselines
refs/heads/master
/utils/graphx.py
from __future__ import print_function """Graph utilities.""" # from time import time import os from collections import defaultdict __author__ = "WANG Yongqing" __email__ = "wangyongqing@ict.ac.cn" class GraphX(object): def __init__(self): self.G = defaultdict(dict) self.nodes = set() se...
{"/eval/eval.py": ["/eval/measures.py"], "/eval/eval_ione.py": ["/eval/eval.py"], "/fruip/fruip.py": ["/utils/graphx.py"], "/eval/eval_crossmna.py": ["/eval/eval.py"], "/eval_mna.py": ["/eval/eval_mna.py", "/eval/measures.py"], "/mna/MNA.py": ["/utils/utils.py"], "/eval/eval_mna.py": ["/eval/eval.py", "/utils/graphx.py...
96,499
Allen517/alp-baselines
refs/heads/master
/eval/eval_mna.py
from __future__ import print_function import sys,os BASE_DIR = os.path.dirname(os.path.abspath(__file__))#存放c.py所在的绝对路径 sys.path.append(BASE_DIR) from eval.eval import * from utils.graphx import * from collections import defaultdict from sklearn import svm from sklearn.externals import joblib class Eval_MNA(Eval): ...
{"/eval/eval.py": ["/eval/measures.py"], "/eval/eval_ione.py": ["/eval/eval.py"], "/fruip/fruip.py": ["/utils/graphx.py"], "/eval/eval_crossmna.py": ["/eval/eval.py"], "/eval_mna.py": ["/eval/eval_mna.py", "/eval/measures.py"], "/mna/MNA.py": ["/utils/utils.py"], "/eval/eval_mna.py": ["/eval/eval.py", "/utils/graphx.py...
96,500
Allen517/alp-baselines
refs/heads/master
/utils/utils.py
from __future__ import print_function import numpy as np import pickle as pkl import networkx as nx import scipy.sparse as sp import random from collections import defaultdict from scipy.sparse.linalg.eigen.arpack import eigsh import os,sys def load_train_valid_labels(filename, lookups, valid_prop, delimiter=','): ...
{"/eval/eval.py": ["/eval/measures.py"], "/eval/eval_ione.py": ["/eval/eval.py"], "/fruip/fruip.py": ["/utils/graphx.py"], "/eval/eval_crossmna.py": ["/eval/eval.py"], "/eval_mna.py": ["/eval/eval_mna.py", "/eval/measures.py"], "/mna/MNA.py": ["/utils/utils.py"], "/eval/eval_mna.py": ["/eval/eval.py", "/utils/graphx.py...
96,501
Allen517/alp-baselines
refs/heads/master
/eval/measures.py
from __future__ import print_function import sys,os BASE_DIR = os.path.dirname(os.path.abspath(__file__))#存放c.py所在的绝对路径 sys.path.append(BASE_DIR) import numpy as np def hamming_distance(vec1, vec2): res = np.where(vec1*vec2<0, np.ones(vec1.shape), np.zeros(vec1.shape)) return np.sum(res) def dot_distance(v...
{"/eval/eval.py": ["/eval/measures.py"], "/eval/eval_ione.py": ["/eval/eval.py"], "/fruip/fruip.py": ["/utils/graphx.py"], "/eval/eval_crossmna.py": ["/eval/eval.py"], "/eval_mna.py": ["/eval/eval_mna.py", "/eval/measures.py"], "/mna/MNA.py": ["/utils/utils.py"], "/eval/eval_mna.py": ["/eval/eval.py", "/utils/graphx.py...
96,502
Allen517/alp-baselines
refs/heads/master
/eval_pale.py
# -*- coding=UTF-8 -*-\n from eval.eval_pale import Eval_PALE from eval.measures import * from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter def parse_args(): parser = ArgumentParser(formatter_class=ArgumentDefaultsHelpFormatter , conflict_handler='resolve') parser....
{"/eval/eval.py": ["/eval/measures.py"], "/eval/eval_ione.py": ["/eval/eval.py"], "/fruip/fruip.py": ["/utils/graphx.py"], "/eval/eval_crossmna.py": ["/eval/eval.py"], "/eval_mna.py": ["/eval/eval_mna.py", "/eval/measures.py"], "/mna/MNA.py": ["/utils/utils.py"], "/eval/eval_mna.py": ["/eval/eval.py", "/utils/graphx.py...
96,503
Allen517/alp-baselines
refs/heads/master
/pale/pale.py
# -*- coding:utf8 -*- from __future__ import print_function import random import tensorflow as tf import numpy as np import sys,os from collections import defaultdict from utils.LogHandler import LogHandler from utils.utils import load_train_valid_labels, batch_iter, valid_iter, read_embeddings class PALE(object): ...
{"/eval/eval.py": ["/eval/measures.py"], "/eval/eval_ione.py": ["/eval/eval.py"], "/fruip/fruip.py": ["/utils/graphx.py"], "/eval/eval_crossmna.py": ["/eval/eval.py"], "/eval_mna.py": ["/eval/eval_mna.py", "/eval/measures.py"], "/mna/MNA.py": ["/utils/utils.py"], "/eval/eval_mna.py": ["/eval/eval.py", "/utils/graphx.py...
96,504
Allen517/alp-baselines
refs/heads/master
/crossmna/crossmna.py
# -*- coding:utf8 -*- from __future__ import print_function import random import math import numpy as np from collections import defaultdict from utils.LogHandler import LogHandler from utils.utils import * import os import re class _CROSSMNA(object): def __init__(self, layer_graphs, anchor_file, lr=.001, nd_re...
{"/eval/eval.py": ["/eval/measures.py"], "/eval/eval_ione.py": ["/eval/eval.py"], "/fruip/fruip.py": ["/utils/graphx.py"], "/eval/eval_crossmna.py": ["/eval/eval.py"], "/eval_mna.py": ["/eval/eval_mna.py", "/eval/measures.py"], "/mna/MNA.py": ["/utils/utils.py"], "/eval/eval_mna.py": ["/eval/eval.py", "/utils/graphx.py...
96,505
Allen517/alp-baselines
refs/heads/master
/regal/regal.py
import numpy as np import argparse import networkx as nx import time import os import sys try: import cPickle as pickle except ImportError: import pickle from scipy.sparse import csr_matrix import xnetmf from config import * def parse_args(): parser = argparse.ArgumentParser(description="Run REGAL.") pa...
{"/eval/eval.py": ["/eval/measures.py"], "/eval/eval_ione.py": ["/eval/eval.py"], "/fruip/fruip.py": ["/utils/graphx.py"], "/eval/eval_crossmna.py": ["/eval/eval.py"], "/eval_mna.py": ["/eval/eval_mna.py", "/eval/measures.py"], "/mna/MNA.py": ["/utils/utils.py"], "/eval/eval_mna.py": ["/eval/eval.py", "/utils/graphx.py...
96,506
Allen517/alp-baselines
refs/heads/master
/eval_regal.py
# -*- coding=UTF-8 -*-\n from eval.eval_regal import Eval_REGAL from eval.measures import * from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter def parse_args(): parser = ArgumentParser(formatter_class=ArgumentDefaultsHelpFormatter , conflict_handler='resolve') parse...
{"/eval/eval.py": ["/eval/measures.py"], "/eval/eval_ione.py": ["/eval/eval.py"], "/fruip/fruip.py": ["/utils/graphx.py"], "/eval/eval_crossmna.py": ["/eval/eval.py"], "/eval_mna.py": ["/eval/eval_mna.py", "/eval/measures.py"], "/mna/MNA.py": ["/utils/utils.py"], "/eval/eval_mna.py": ["/eval/eval.py", "/utils/graphx.py...
96,507
Allen517/alp-baselines
refs/heads/master
/eval/eval_pale.py
from __future__ import print_function import sys,os BASE_DIR = os.path.dirname(os.path.abspath(__file__))#存放c.py所在的绝对路径 sys.path.append(BASE_DIR) from eval.eval import * class Eval_PALE(Eval): def __init__(self, model_type): super(Eval_PALE, self).__init__() assert model_type in {'lin', 'mlp'},...
{"/eval/eval.py": ["/eval/measures.py"], "/eval/eval_ione.py": ["/eval/eval.py"], "/fruip/fruip.py": ["/utils/graphx.py"], "/eval/eval_crossmna.py": ["/eval/eval.py"], "/eval_mna.py": ["/eval/eval_mna.py", "/eval/measures.py"], "/mna/MNA.py": ["/utils/utils.py"], "/eval/eval_mna.py": ["/eval/eval.py", "/utils/graphx.py...
96,508
Allen517/alp-baselines
refs/heads/master
/net_embed/ffvm.py
# -*- coding:utf8 -*- from __future__ import print_function import random import math import numpy as np from collections import defaultdict from utils.LogHandler import LogHandler import os class _FFVM(object): def __init__(self, graph, lr=.001, rep_size=128, batch_size=100, negative_ratio=5, order=3, table_si...
{"/eval/eval.py": ["/eval/measures.py"], "/eval/eval_ione.py": ["/eval/eval.py"], "/fruip/fruip.py": ["/utils/graphx.py"], "/eval/eval_crossmna.py": ["/eval/eval.py"], "/eval_mna.py": ["/eval/eval_mna.py", "/eval/measures.py"], "/mna/MNA.py": ["/utils/utils.py"], "/eval/eval_mna.py": ["/eval/eval.py", "/utils/graphx.py...
96,509
Allen517/alp-baselines
refs/heads/master
/alp_main.py
from __future__ import print_function import numpy as np import random from collections import defaultdict from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter from pale.pale import * from mna.MNA import * from utils.graphx import * from utils.graph import * from utils.utils import * from fruip.fruip imp...
{"/eval/eval.py": ["/eval/measures.py"], "/eval/eval_ione.py": ["/eval/eval.py"], "/fruip/fruip.py": ["/utils/graphx.py"], "/eval/eval_crossmna.py": ["/eval/eval.py"], "/eval_mna.py": ["/eval/eval_mna.py", "/eval/measures.py"], "/mna/MNA.py": ["/utils/utils.py"], "/eval/eval_mna.py": ["/eval/eval.py", "/utils/graphx.py...
96,510
joacof98/knapsack-genetic-algorithm
refs/heads/master
/knapsack_evolution.py
from genetic_solution import * from functools import partial from collections import namedtuple import time ''' This is an example of solution for the knapsack problem using the genetic algorithm. ''' Thing = namedtuple('Thing', ['name', 'value', 'weight']) things_example = [ Thing('Laptop', 500, 2200), Thing(...
{"/knapsack_evolution.py": ["/genetic_solution.py"]}
96,511
joacof98/knapsack-genetic-algorithm
refs/heads/master
/genetic_solution.py
from random import choices, randint, randrange, random # Generates a list with the genes, for example [0, 1, 0 ,0 ,1, 0. . .] def generate_genome(length: int): return choices([0, 1], k=length) # Create a population represented with a lot of genomes def generate_population(size: int, genome_length: int): ...
{"/knapsack_evolution.py": ["/genetic_solution.py"]}
96,512
dlclgnss/baemin-for-office-worker
refs/heads/master
/partner/views.py
from django.shortcuts import render,redirect,get_object_or_404 from django.contrib.auth.models import User from django.contrib.auth import authenticate,login,logout from .forms import PartnerForm,MenuForm from .models import Partner,Menu #기본페이지 (로그인한 업체정보를 보여준다.) def index(request): if request.method == 'POST': ...
{"/partner/views.py": ["/partner/models.py"], "/client/views.py": ["/partner/models.py"]}
96,513
dlclgnss/baemin-for-office-worker
refs/heads/master
/partner/models.py
from django.db import models from django.contrib.auth.models import User class Partner(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) name = models.CharField(max_length=50, verbose_name='업체명') contact = models.CharField(max_length=50, verbose_name='연락처') address = models.C...
{"/partner/views.py": ["/partner/models.py"], "/client/views.py": ["/partner/models.py"]}
96,514
dlclgnss/baemin-for-office-worker
refs/heads/master
/client/views.py
from django.shortcuts import render from partner.models import Partner #다른쪽 모델을 가져올때 # Create your views here. def index(request): partner_list=Partner.objects.all() ctx={ 'partner_list':partner_list } return render(request,'main.html',ctx)
{"/partner/views.py": ["/partner/models.py"], "/client/views.py": ["/partner/models.py"]}
96,515
siwanghu/Face
refs/heads/master
/train_face.py
# -*- coding: utf-8 -*- """ Created on Tue Mar 13 16:01:54 2018 @author: siwanghu """ import tensorflow as tf import data_307 import sys def weight_variable(shape): initial = tf.truncated_normal(shape, stddev = 0.1) return tf.Variable(initial) def bias_variable(shape): initial = tf.constant(0.1, shape = ...
{"/train_face.py": ["/data_307.py"], "/use_face.py": ["/data_307.py"]}
96,516
siwanghu/Face
refs/heads/master
/data_307.py
# -*- coding: utf-8 -*- """ Created on Tue Mar 13 16:01:54 2018 @author: siwanghu """ import random import cv2 import numpy size=64 husiwang="./data/husiwang/" #100000 liuhao="./data/liuhao/" #010000 lumengjie="./data/lumengjie/" #001000 pengsurong="./data/pengsurong/" #000100 liqiang="./data/liqia...
{"/train_face.py": ["/data_307.py"], "/use_face.py": ["/data_307.py"]}
96,517
siwanghu/Face
refs/heads/master
/CNN/att_orl.py
# -*- coding: utf-8 -*- """ Created on Sun Apr 8 17:32:53 2018 @author: siwanghu """ import cv2 import os import glob import random import numpy classs=40 #图像类别 trainNum=8 #每个人训练集图片张数 att_faces=".\\att_faces" #图片保存路径 ba...
{"/train_face.py": ["/data_307.py"], "/use_face.py": ["/data_307.py"]}
96,518
siwanghu/Face
refs/heads/master
/camera.py
# -*- coding: utf-8 -*- """ Created on Tue Mar 13 12:17:07 2018 @author: siwanghu """ import cv2 import dlib import os import sys save_dir = "./data/test" if not os.path.exists(save_dir): os.makedirs(save_dir) index,count=0,100 camera = cv2.VideoCapture(1) detector = dlib.get_frontal_face_detector() while(True...
{"/train_face.py": ["/data_307.py"], "/use_face.py": ["/data_307.py"]}
96,519
siwanghu/Face
refs/heads/master
/PCA/PCA.py
# -*- coding: utf-8 -*- """ Created on Sun Apr 8 15:13:42 2018 @author: siwanghu """ import cv2 import glob import random import numpy as np att_faces=".\\backup" #图片保存路径 trainNum=5 #每个人训练集图片张数 feature=50 #PCA特征分解取值个数 def loadATTData(): x_train,y_train,x_test,y_test=[],[],[],[] ...
{"/train_face.py": ["/data_307.py"], "/use_face.py": ["/data_307.py"]}
96,520
siwanghu/Face
refs/heads/master
/use_face.py
# -*- coding: utf-8 -*- """ Created on Wed Mar 14 13:57:33 2018 @author: siwanghu """ import tensorflow as tf import data_307 import sys import cv2 import dlib def weight_variable(shape): initial = tf.truncated_normal(shape, stddev = 0.1) return tf.Variable(initial) def bias_variable(shape): initial = tf...
{"/train_face.py": ["/data_307.py"], "/use_face.py": ["/data_307.py"]}
96,521
GCLemon/Altseed2
refs/heads/master
/scripts/bindings/graphics.py
from . import CppBindingGenerator as cbg import ctypes from .common import * from .math import * from .io import * DeviceType = cbg.Enum('LLGI', 'DeviceType') TextureBase = cbg.Class('Altseed', 'TextureBase', cbg.CacheMode.ThreadSafeCache) with TextureBase as class_: class_.brief = cbg.D...
{"/scripts/bindings/sound.py": ["/scripts/bindings/common.py"], "/scripts/bindings/tool.py": ["/scripts/bindings/common.py", "/scripts/bindings/graphics.py"], "/scripts/bindings/core.py": ["/scripts/bindings/common.py"], "/scripts/bindings/io.py": ["/scripts/bindings/common.py"], "/scripts/bindings/physics.py": ["/scri...
96,522
GCLemon/Altseed2
refs/heads/master
/scripts/bindings/window.py
from . import CppBindingGenerator as cbg from .math import Vector2I import ctypes import sys Window = cbg.Class('Altseed', 'Window') with Window as class_: class_.is_public = False class_.is_Sealed = True with class_.add_func('GetInstance') as func: func.brief = cbg.Description() func.brie...
{"/scripts/bindings/sound.py": ["/scripts/bindings/common.py"], "/scripts/bindings/tool.py": ["/scripts/bindings/common.py", "/scripts/bindings/graphics.py"], "/scripts/bindings/core.py": ["/scripts/bindings/common.py"], "/scripts/bindings/io.py": ["/scripts/bindings/common.py"], "/scripts/bindings/physics.py": ["/scri...
96,523
GCLemon/Altseed2
refs/heads/master
/scripts/bindings/sound.py
from . import CppBindingGenerator as cbg import ctypes from .common import * FFTWindow = cbg.Enum('Altseed', 'FFTWindow') with FFTWindow as enum: enum.brief = cbg.Description() enum.brief.add('ja', '音のスペクトル解析に使用する窓関数') enum.add('Rectangular') enum.add('Triangle') enum.add('Hamming') enum.add('...
{"/scripts/bindings/sound.py": ["/scripts/bindings/common.py"], "/scripts/bindings/tool.py": ["/scripts/bindings/common.py", "/scripts/bindings/graphics.py"], "/scripts/bindings/core.py": ["/scripts/bindings/common.py"], "/scripts/bindings/io.py": ["/scripts/bindings/common.py"], "/scripts/bindings/physics.py": ["/scri...
96,524
GCLemon/Altseed2
refs/heads/master
/scripts/bindings/define.py
from . import CppBindingGenerator as cbg import ctypes import sys from .io import * from .input import * from .graphics import * from .core import * from .sound import * from .math import * from .logger import * from .tool import * from .window import * from .physics import * # サポートされない型 # u16string は const char16_t...
{"/scripts/bindings/sound.py": ["/scripts/bindings/common.py"], "/scripts/bindings/tool.py": ["/scripts/bindings/common.py", "/scripts/bindings/graphics.py"], "/scripts/bindings/core.py": ["/scripts/bindings/common.py"], "/scripts/bindings/io.py": ["/scripts/bindings/common.py"], "/scripts/bindings/physics.py": ["/scri...
96,525
GCLemon/Altseed2
refs/heads/master
/scripts/bindings/tool.py
from . import CppBindingGenerator as cbg import ctypes from .math import Vector2F, Vector4F from .common import * from .graphics import * ToolDir = cbg.Enum('Altseed', 'ToolDir') with ToolDir as enum_: enum_.brief = cbg.Description() enum_.brief.add('ja', 'ツール機能で使用する方向') enum_.add('None', -1) with enu...
{"/scripts/bindings/sound.py": ["/scripts/bindings/common.py"], "/scripts/bindings/tool.py": ["/scripts/bindings/common.py", "/scripts/bindings/graphics.py"], "/scripts/bindings/core.py": ["/scripts/bindings/common.py"], "/scripts/bindings/io.py": ["/scripts/bindings/common.py"], "/scripts/bindings/physics.py": ["/scri...
96,526
GCLemon/Altseed2
refs/heads/master
/scripts/bindings/common.py
from . import CppBindingGenerator as cbg from .math import * import ctypes VoidPtr = cbg.Class('Altseed', 'VoidPtr') SeekOrigin = cbg.Enum('Altseed', 'SeekOrigin') with SeekOrigin as enum_: enum_.brief = cbg.Description() enum_.brief.add('ja', '') enum_.add('Begin') enum_.add('Current') enum_.add...
{"/scripts/bindings/sound.py": ["/scripts/bindings/common.py"], "/scripts/bindings/tool.py": ["/scripts/bindings/common.py", "/scripts/bindings/graphics.py"], "/scripts/bindings/core.py": ["/scripts/bindings/common.py"], "/scripts/bindings/io.py": ["/scripts/bindings/common.py"], "/scripts/bindings/physics.py": ["/scri...
96,527
GCLemon/Altseed2
refs/heads/master
/scripts/bindings/core.py
from . import CppBindingGenerator as cbg import ctypes import sys from .common import * GraphicsDeviceType = cbg.Enum('Altseed', 'GraphicsDeviceType') with GraphicsDeviceType as enum_: enum_.brief = cbg.Description() enum_.brief.add('ja', '描画方法を表します。') with enum_.add('Default') as v: v.brief = cbg...
{"/scripts/bindings/sound.py": ["/scripts/bindings/common.py"], "/scripts/bindings/tool.py": ["/scripts/bindings/common.py", "/scripts/bindings/graphics.py"], "/scripts/bindings/core.py": ["/scripts/bindings/common.py"], "/scripts/bindings/io.py": ["/scripts/bindings/common.py"], "/scripts/bindings/physics.py": ["/scri...
96,528
GCLemon/Altseed2
refs/heads/master
/scripts/bindings/io.py
from . import CppBindingGenerator as cbg import ctypes import sys from .common import * StaticFile = cbg.Class('Altseed', 'StaticFile', cbg.CacheMode.ThreadSafeCache) with StaticFile as class_: class_.brief = cbg.Description() class_.brief.add('ja', '一度でファイルを読み取るクラス') class_.SerializeType = cbg.SerializeT...
{"/scripts/bindings/sound.py": ["/scripts/bindings/common.py"], "/scripts/bindings/tool.py": ["/scripts/bindings/common.py", "/scripts/bindings/graphics.py"], "/scripts/bindings/core.py": ["/scripts/bindings/common.py"], "/scripts/bindings/io.py": ["/scripts/bindings/common.py"], "/scripts/bindings/physics.py": ["/scri...
96,529
GCLemon/Altseed2
refs/heads/master
/scripts/bindings/input.py
from . import CppBindingGenerator as cbg import ctypes from .common import * from .math import * ButtonState = cbg.Enum('Altseed', 'ButtonState') with ButtonState as enum: enum.brief = cbg.Description() enum.brief.add('ja', 'ボタンの押下状態を表します。') with enum.add('Free', 0) as v: v.brief = cbg.Descriptio...
{"/scripts/bindings/sound.py": ["/scripts/bindings/common.py"], "/scripts/bindings/tool.py": ["/scripts/bindings/common.py", "/scripts/bindings/graphics.py"], "/scripts/bindings/core.py": ["/scripts/bindings/common.py"], "/scripts/bindings/io.py": ["/scripts/bindings/common.py"], "/scripts/bindings/physics.py": ["/scri...
96,530
GCLemon/Altseed2
refs/heads/master
/scripts/bindings/physics.py
from . import CppBindingGenerator as cbg import ctypes import sys from .common import * Collider = cbg.Class('Altseed', 'Collider') with Collider as class_: with class_.add_constructor() as func_: func_.is_public = False class_.brief = cbg.Description() class_.brief.add('ja', 'コライダの抽象基本クラスです') ...
{"/scripts/bindings/sound.py": ["/scripts/bindings/common.py"], "/scripts/bindings/tool.py": ["/scripts/bindings/common.py", "/scripts/bindings/graphics.py"], "/scripts/bindings/core.py": ["/scripts/bindings/common.py"], "/scripts/bindings/io.py": ["/scripts/bindings/common.py"], "/scripts/bindings/physics.py": ["/scri...
96,555
DrewCrossan/firstTimeTesting
refs/heads/main
/tests/calculator_test.py
# tests/calculator_test.py import unittest from src.calculator import * #add, divide, exponent2, multiply, subtract, exponent2, exponent3, exponent4, square_root, volume class TestCalculator(unittest.TestCase): # NEW def test_add(self): # NEW self.assertEqual(5, add(2, 3)) def test_subtract(self)...
{"/tests/calculator_test.py": ["/src/calculator.py"]}
96,556
DrewCrossan/firstTimeTesting
refs/heads/main
/src/calculator.py
def add(first_number, second_number): return first_number + second_number def subtract(first_number, second_number): return first_number - second_number def divide(first_number, second_number): return first_number / second_number def multiply(first_number, second_number): return first_number * sec...
{"/tests/calculator_test.py": ["/src/calculator.py"]}
96,557
itactuk/isc-206-septiembre-2019
refs/heads/master
/EstructurasDeControl/EjemploWhile.py
# Un programa que sume n cantidad de numeros. El usuario debe de digitar n n = int(input("Digite cantidad de numeros a sumar: ")) i = 0 acc = 0 # while CONDICION: # INSTRUCCIONES_A_REPETIR # INSTRUCCIONES_A_REPETIR # INSTRUCCIONES_A_REPETIR while i < n: i += 1 # i = i + 1 x = float(input("Digite x: "...
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,558
itactuk/isc-206-septiembre-2019
refs/heads/master
/Introduccion/obtener_coordenadas.py
import pyautogui, time while True: print(pyautogui.position()) time.sleep(1)
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,559
itactuk/isc-206-septiembre-2019
refs/heads/master
/Operadores/EjemploOperadoresAsignacion.py
precio = 2 # asigna 2 a la variable print(precio) precio += 3 # es equivalente a hacer precio = precio + 3 print(precio) precio-=4 print(precio) precio*=2 print(precio) precio**=2 print(precio) precio%=2 print(precio)
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,560
itactuk/isc-206-septiembre-2019
refs/heads/master
/EstructurasDeControl/EjemploFor.py
# for VARIABLE_ITERACION in RANGO_STRING_O_LISTA: # INSTRUCCIONES_A_REPETIR # INSTRUCCIONES_A_REPETIR # INSTRUCCIONES_A_REPETIR # El for puede iterar sobre rangos, listas, strings, o diccionarios # Sintaxis para RANGO: # for VARIABLE_ITERACION in range(INICIO, FIN, INCREMENTO): # INSTRUCCIONES_A_REPETIR # I...
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,561
itactuk/isc-206-septiembre-2019
refs/heads/master
/FuncionesIntro/test_libreria_ecuaciones.py
import unittest import FuncionesIntro.libreria_ecuaciones as lib class MiPrueba(unittest.TestCase): def test_prueba_ecuacion_primerg(self): resultado = lib.raices_eq_primer_grado(4,2) self.assertEqual(-0.5, resultado) def test_prueba_cuad(self): x1, x2 = lib.raices_eq_cuadratica(2,9,1...
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,562
itactuk/isc-206-septiembre-2019
refs/heads/master
/Parcial1/P2.py
num1 = int(input("Ingrese el primer número ")) num2 = int(input("Ingrese el segundo número ")) while num2 != 0: resto = num2 num2 = num1 % num2 num1 = resto print("El MCD es : ", num1)
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,563
itactuk/isc-206-septiembre-2019
refs/heads/master
/EntradaSalida/EjemploEntradaSalida.py
# Haremos un programa que le pide al usuario la velocidad incial, la velocidad final y el tiempo # para calcular la aceleracion en dicho lapso velocidad_inicial = "10" # esto es un ejemplo mas visual para que vean la conversion de string a float velocidad_inicial = float(velocidad_inicial) velocidad_inicial = float(...
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,564
itactuk/isc-206-septiembre-2019
refs/heads/master
/Torneo/primo_ejemplo.py
def es_primo(n): for i in range(2, n): if n % i == 0: return False return True def halla_factor_primo_mas_grande(numero): maximo = 1 for i in range(1, numero+1): if numero % i == 0 and es_primo(i): maximo = i return maximo def main(): print(halla_factor...
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,565
itactuk/isc-206-septiembre-2019
refs/heads/master
/Ajedrez/TableroLibreria.py
class Tablero: def __init__(self): cantidad_columnas = 8 cantidad_filas = 8 self.casillas = [] for i in range(cantidad_columnas): self.casillas[i] = [] for j in range(cantidad_filas): self.casillas[i].append(None)
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,566
itactuk/isc-206-septiembre-2019
refs/heads/master
/Archivos/CargaUnaVariableDeArchivo.py
import pickle with open("mivar.pickle", "rb") as archivo: lista_estudiante = pickle.load(archivo) print(lista_estudiante)
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,567
itactuk/isc-206-septiembre-2019
refs/heads/master
/Introduccion/Ejemplo.py
# Este es un ejemplo # Esto modificando el archivo # otro cambio
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,568
itactuk/isc-206-septiembre-2019
refs/heads/master
/Ajedrez/PiezasLibreria.py
from enum import Enum from Ajedrez.TableroLibreria import Tablero class ColorPieza(Enum): BLANCAS = 0 NEGRAS = 0 class Pieza: def __init__(self, color: ColorPieza): self.color = color class Torre(Pieza): @staticmethod def es_jugada_valida(tablero: Tablero, columna_actual: int, fila_ac...
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,569
itactuk/isc-206-septiembre-2019
refs/heads/master
/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py
import unittest import Repaso.ContarNumeroEstringCuyoTamanoSea1eroUltimo as fun # Hacer un problema que cuente cuantos elementos en una lista tienen un tamano menor que 20 # y su segundo caracter es igual igual al primero class PruebaEje(unittest.TestCase): def test_vacio(self): entrada = ["afadf", "fadfs...
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,570
itactuk/isc-206-septiembre-2019
refs/heads/master
/EstructurasDeControl/EjemploForMultiplicacionHastaSalida.py
# Hacer un programa que pueda multiplicar los numeros digitados por el usuario hasta que el usuario digite salida entrada = "" resultado = 1 while entrada != "salida": entrada = input("Digite un numero para multiplicar o escriba salida para salir del programa: ") entrada = entrada.strip() # esto quita los esp...
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,571
itactuk/isc-206-septiembre-2019
refs/heads/master
/Archivos/EscribirEnArchivo.py
# Crearnos un programa que cree un archivo # Si usamos with no tenemos que cerrar el archivo # esta es la manera recomendable with open("mi_archivo.txt", "w") as f: f.write("Hola\nQue hacehjklhkljhkjl?") for i in range(1000): f.write(f"{i}\t\n") with open("mi_archivo.csv", "w") as f: f.write(f"...
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,572
itactuk/isc-206-septiembre-2019
refs/heads/master
/EstructurasDeControl/EjemploForSumaPares.py
# Programa que suma los numeros pares digitados que se encuentran en un rango digitado por el usuario v_inicial = int(input("Digite rango inferior: ")) v_final = int(input("Digite rango superior (no inclusive): ")) acumulador = 0 if v_inicial % 2 == 1: v_inicial += 1 for i in range(v_inicial, v_final, 2): a...
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,573
itactuk/isc-206-septiembre-2019
refs/heads/master
/EstructurasDeControl/EjemploForTriangulo.py
# Escribe un programa que dibuje el patrón de abajo. La cantidad de líneas debe de ser proporcionada por el usuario y puede variar entre una corrida y otra. # * # ** # *** linea = int(input("Digite cantidad lineas: ")) for linea_actual in range(linea): for j in range(linea - 1 - linea_actual): print(' ...
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,574
itactuk/isc-206-septiembre-2019
refs/heads/master
/EstructurasDeControl/EjemploForDiccionario.py
# Este es un ejemplo para iterar sobre un diccionario diccionario_matricula_nombre={ "20160716": "Alexandra", "20160261": "Roniell", "20151753": "Stanly" } for matricula, nombre in diccionario_matricula_nombre.items(): print(f"Matricula: {matricula} - Nombre: {nombre}")
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,575
itactuk/isc-206-septiembre-2019
refs/heads/master
/EstructurasDeControl/EjemploSwitch.py
# Programa que lea del usuario el mes en formato numerico y le diga al usuario cual es el nombre del mes # Ejemplo: # El usuario digita 1 # El programa le debe decir: "Enero" diccionario_meses = { 1: "Enero", 2: "Febrero", 3: "Marzo", 4: "Abril", 5: "Mayo", 6: "Junio", 7: "Julio", 8: "...
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,576
itactuk/isc-206-septiembre-2019
refs/heads/master
/Secuencias/test_secuencias.py
import unittest import Secuencias.EjemploContarComoYHolas as hola class MisPruebas(unittest.TestCase): def test_indice_lista(self): # esto tambien funciona para tuplas lista = [1,3,5,-2] self.assertEqual(-2, lista[3]) def test_indice_negativo(self): # esto tambien funciona para...
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,577
itactuk/isc-206-septiembre-2019
refs/heads/master
/Torneo/Multiplos35suma.py
def suma_multiplos_3_5(limite=1000): suma = 0 for i in range(limite): if i % 3 == 0 or i % 5 == 0: suma += i return suma print(suma_multiplos_3_5(1000))
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,578
itactuk/isc-206-septiembre-2019
refs/heads/master
/FuncionesIntro/EjemploAnotacionesDeTipo.py
from typing import Tuple def raices_eq_cuadratica(a: float,b: float,c: float) -> Tuple[float, float]: """ Esta funcion resuelve una ecuacion de la forma ax^2+bx+c=0 :param a: coeficiente de x^2 :param b: coeficiente de x :param c: alone :return: tupla con ambas raices """ x1 = (-b + (b...
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,579
itactuk/isc-206-septiembre-2019
refs/heads/master
/Operadores/EjemplosOperadoresAritmeticos.py
# suma + resultado = 12 + 3 print('Resultado suma:') print(resultado) print(f'Resultado suma:{resultado}') # resta - print('Resultado resta:') print(5-7) # multiplicacion print(4*3) # division print(3/4) # exponenciacion print(5**2) # concatenacion (suma de strings +) nombre = "Alexandra" apellido = "Rosario" nom...
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,580
itactuk/isc-206-septiembre-2019
refs/heads/master
/FuncionesIntro/EjemploParametroTamVariable.py
# ENTRADA: 3, 4, 5, 6 # SALIDA: 7, 8, 9 from typing import List def suma_primer_valor_al_resto(valor_a_sumar: float, *valores) -> List: lista_res = [] for v in valores: lista_res.append(v + valor_a_sumar) # Append agrega un elemento a la lista return lista_res # El parametro de tamano variable ...
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,581
itactuk/isc-206-septiembre-2019
refs/heads/master
/FuncionesIntro/EjemploUsandoLibreriaNuestra.py
import FuncionesIntro.libreria_ecuaciones as eq while True: print("Menu: ") print("1. Ec cuadratica ") print("2. Ec 1er grado ") print("3. Salir del programa") opcion = input("Digite opcion: ").strip() if opcion == '1': a = float(input("a: ")) b = float(input("b: ")) c =...
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,582
itactuk/isc-206-septiembre-2019
refs/heads/master
/EstructurasDeControl/EjemploForString.py
# Escribe un programa que cuente la cantidad de espacios que tiene el texto digitado por el usuario # Hola como estas. Yo bien texto = input("Escriba el texto para contar espacios: ") acc = 0 for caracter in texto: if caracter == ' ': acc += 1 print(f"Cantidad de espacios: {acc}")
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,583
itactuk/isc-206-septiembre-2019
refs/heads/master
/EstructurasDeControl/EjemploIf.py
# Sintaxis de if # if CONDICION: # INSTRUCCIONES # # Sintaxis de if ... else # if CONDICION: # INSTRUCCIONES_IF # Solo se van a ejecutar si CONDICION es TRUE # else: # INSTRUCCIONES_ELSE # Solo se van a ejecutar si CONDICION es FALSE # Sintaxis de if ... elif ... else # if CONDICION: # INSTRUCCIONES_IF # So...
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,584
itactuk/isc-206-septiembre-2019
refs/heads/master
/EstructurasDeControl/EjemploForListaContinue.py
# Programa que solo imprime numeros pares de una lista lista = [1, 2, 3, 4, 8, 19, 20] for elemento in lista: if elemento % 2 == 0: print(elemento) ## haciendo lo mismo con el continue for elemento in lista: if elemento % 2 != 0: continue print(elemento)
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,585
itactuk/isc-206-septiembre-2019
refs/heads/master
/Parcial1/P3.py
cal_a_puntos = { 'A': 4, 'B': 3, 'C': 2, 'D': 1, 'F': 0 } total_puntos = 0 total_creditos = 0 while True: calificacion = input("Digite calificación: ") calificacion = calificacion.upper().strip() if calificacion in cal_a_puntos: puntos = cal_a_puntos[calificacion] else: ...
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,586
itactuk/isc-206-septiembre-2019
refs/heads/master
/Operadores/EjemploOperadoresBinarios.py
# & y binaria print(bin(0b100 & 0b110)) # 0b100 # | o binaria (o inclusiva) print(bin(0b100 | 0b110)) # 0b110 # ^ xor binario (o exclusiva) print(bin(0b100 ^ 0b110)) # 0b010 # 0b10 es equivalente # ~ complemento a uno ~(x+1) print(bin(~0b100)) # -0b101 # << rodamiento de bits hachia la izquierda print(bin(0b100 << 3)...
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,587
itactuk/isc-206-septiembre-2019
refs/heads/master
/EstructurasDeControl/EjemploForImprimeDatosDistintos.py
# Ejemplo for que imprime información distinta caracteres_posibles = "qwertyuiopasdfghjklzxcvbnm" for c1 in caracteres_posibles: print(f"Se imprimiran todas las combinaciones que empiezan con {c1}") for c2 in caracteres_posibles: print(c1 + c2) for i in range(0, 10): print("Maxy" + str(i))
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,588
itactuk/isc-206-septiembre-2019
refs/heads/master
/Archivos/LeerDeArchivo.py
# Estoy leyendo el archivo y sumando todos los numeros a partir de la linea 2 with open("mi_archivo.txt", "r") as f: contenido_archivo = f.read() # Lee todo el contenido print(contenido_archivo) # Imprime todo el contenido # Empezare a procesar la informacion lineas = contenido_archivo.split('\n') ...
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,589
itactuk/isc-206-septiembre-2019
refs/heads/master
/Ajedrez/Juego.py
from .TableroLibreria import Tablero mi_tablero = Tablero() def main(): turno_jugador_blancas = True jugador_blancas = input("Digite nombre jugador blancas: ") jugador_negras = input("Digite nombre jugador negras: ") colocar_fichas_en_posicion_inicial(mi_tablero) while True: imprime_table...
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,590
itactuk/isc-206-septiembre-2019
refs/heads/master
/FuncionesIntro/libreria_ecuaciones.py
from typing import Tuple def main(): print(raices_eq_cuadratica(2, 3, 5)) print("Hola") def raices_eq_cuadratica(a: float,b: float,c: float) -> Tuple[float, float]: """ Esta funcion resuelve una ecuacion de la forma ax^2+bx+c=0 :param a: coeficiente de x^2 :param b: coeficiente de x :para...
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,591
itactuk/isc-206-septiembre-2019
refs/heads/master
/Secuencias/EjemploContarComoYHolas.py
from typing import Dict def contar_como_holas(texto: str) -> Dict[str, int]: holas = texto.count("holas") como = texto.count("como") d = {'holas': holas, 'como': como} return d def extrae_nombre_funcion(texto: str): resultado = [] indice_par = texto.find('(') indice_par+=1 texto_aux =...
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,592
itactuk/isc-206-septiembre-2019
refs/heads/master
/Operadores/EjemploOperadoresPertenenciaEIdentidad.py
# in # not in # in se utiliza para ver si un elemento se encuentra en una lista nombre = "Stanley" listado_estudiantes = ["Stanley", "Daniel", "Maxy", "Lia", "Alexandra"] print(nombre in listado_estudiantes) # la pregunta es: el nombre se encuentra en el listado print(nombre not in listado_estudiantes) # False print("...
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,593
itactuk/isc-206-septiembre-2019
refs/heads/master
/Operadores/ejemploOperadoresLogicos.py
# Nada mas sobre valores booleanos (True o False) edad_rango_menor = 18 edad_rango_mayor = 30 edad_stanley = 22 # and print(True and False) # False print(edad_stanley >= edad_rango_menor and edad_stanley <= edad_rango_mayor) # True. El and se usa para rangos # or print(True or False) # True print(edad_stanley < ...
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,594
itactuk/isc-206-septiembre-2019
refs/heads/master
/Operadores/EjemploOperadoresComparacion.py
# Todos estos operadores es para hacer preguntas # devuelven True o False solamente # determinar si son iguales == se usan dos signos de igual print('print(3 == 2)') print(3 == 2) son_iguales = 3 == 2 print('print(son_iguales)') print(son_iguales) print('print(2 == 2)') print(2 == 2) print('hola2' == 'hols') print('...
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,595
itactuk/isc-206-septiembre-2019
refs/heads/master
/Introduccion/EjemploPyautogui.py
import pyautogui pyautogui.click(100, 100, duration=1) pyautogui.moveTo(10,10,duration=2)
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,596
itactuk/isc-206-septiembre-2019
refs/heads/master
/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py
from typing import List # Hacer un problema que cuente cuantos elementos en una lista tienen un tamano menor que 20 # y su segundo caracter es igual igual al primero def contar(lista: List[str]) -> int: contador = 0 for elemento in lista: if len(elemento) < 20 and elemento[0]==elemento[1]: ...
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,597
itactuk/isc-206-septiembre-2019
refs/heads/master
/Torneo/test_primo_ejemplo.py
import unittest import Torneo.primo_ejemplo as p class PruebaPrimo(unittest.TestCase): def test_ejemplo(self): entrada = 13195 salida = 29 self.assertEqual(salida, p.halla_factor_primo_mas_grande(entrada))
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...
96,598
itactuk/isc-206-septiembre-2019
refs/heads/master
/Parcial1/P1.py
xf = float(input("xf: ")) x0 = float(input("x0: ")) tf = float(input("tf: ")) t0 = float(input("t0: ")) v = (xf - x0) / (tf - t0) print(f"La velocidad es {v}")
{"/FuncionesIntro/test_libreria_ecuaciones.py": ["/FuncionesIntro/libreria_ecuaciones.py"], "/Ajedrez/PiezasLibreria.py": ["/Ajedrez/TableroLibreria.py"], "/Repaso/test_ContarNumeroEstringCuyoTamanoSea1eroUltimo.py": ["/Repaso/ContarNumeroEstringCuyoTamanoSea1eroUltimo.py"], "/Secuencias/test_secuencias.py": ["/Secuenc...