repo_name stringlengths 5 92 | path stringlengths 4 232 | copies stringclasses 19
values | size stringlengths 4 7 | content stringlengths 721 1.04M | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 15 997 | alpha_frac float64 0.25 0.97 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
eHealthAfrica/rapidsms_textit | rapidsms_textit/tests/test_views.py | 1 | 2493 | from __future__ import print_function, unicode_literals
import json
import logging
import mock
from django.core.urlresolvers import reverse
from .utils import TextItTest
logger = logging.getLogger(__name__)
class TextItViewTest(TextItTest):
disable_phases = True
def send_to_view(self, data):
""... | bsd-3-clause | 7,159,265,041,052,526,000 | 37.353846 | 98 | 0.60369 | false |
afomm/autotest-docker | dockertest/subtestbase.py | 1 | 8725 | """
Adapt/extend autotest.client.test.test for Docker test sub-framework
Implement docker subtest base to avoid circular dependences in dockertest core
modules.
"""
# Pylint runs from a different directory, it's fine to import this way
# pylint: disable=W0403
import logging
import traceback
from xceptions import Dock... | gpl-2.0 | -758,189,259,401,791,900 | 33.760956 | 79 | 0.56894 | false |
mwaskom/lyman | lyman/frontend.py | 1 | 14777 | """Forward facing lyman tools with information about ecosystem."""
import os
import os.path as op
import tempfile
import re
import sys
import imp
import shutil
from textwrap import dedent
import yaml
import numpy as np
import nipype
from traits.api import (HasTraits, Str, Bool, Float, Int,
Tup... | bsd-3-clause | 1,358,385,128,766,538,500 | 30.984848 | 79 | 0.61589 | false |
anneline/Bika-LIMS | bika/lims/utils/analysisrequest.py | 1 | 4343 | from Products.CMFCore.utils import getToolByName
from bika.lims.interfaces import ISample
from bika.lims.utils import tmpID
from bika.lims.utils.sample import create_sample
from bika.lims.utils.samplepartition import create_samplepartition
from bika.lims.workflow import doActionFor
from Products.CMFPlone.utils import _... | agpl-3.0 | -847,201,544,666,750,600 | 36.439655 | 81 | 0.617776 | false |
benschneider/Generic-Sweepscript | GsweepI1I1.py | 1 | 6469 | '''
Generic Sweep script
(currently setup for no more than 3 dims)
20/10/2015
- B
'''
#import numpy as np
from time import time, sleep
from parsers import copy_file
from ramp_mod import ramp
from DataStorer import DataStoreSP # , DataStore2Vec, DataStore11Vec
# Drivers
from dummydriver import instrument as dummy
from... | gpl-2.0 | -669,917,950,247,425,500 | 28.013453 | 78 | 0.609059 | false |
NicoVarg99/daf-recipes | ckan/ckan/ckan/ckan/tests/legacy/models/test_revision.py | 2 | 1565 | # encoding: utf-8
import datetime
from nose.tools import assert_equal
from ckan.tests.legacy import *
import ckan.model as model
# NB Lots of revision tests are part of vdm. No need to repeat those here.
class TestRevision:
@classmethod
def setup_class(cls):
# Create a test package
rev = mo... | gpl-3.0 | 6,738,866,383,545,032,000 | 33.021739 | 75 | 0.582748 | false |
feedhq/feedhq | feedhq/feeds/management/commands/add_missing.py | 1 | 1240 | from django.conf import settings
from . import SentryCommand
from ...models import enqueue_favicon, Feed, UniqueFeed
class Command(SentryCommand):
"""Updates the users' feeds"""
def handle_sentry(self, *args, **kwargs):
missing = Feed.objects.raw(
"""
select f.id, f.url
... | bsd-3-clause | -4,859,175,894,789,571,000 | 30 | 72 | 0.472581 | false |
N07070/TelegramDTCBot | main.py | 1 | 1648 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import telebot # https://github.com/eternnoir/pyTelegramBotAPI
import random
from token_file import token_var
from DTCScrapper import DTCScrapper
TOKEN = token_var
bot = telebot.TeleBot(TOKEN)
about_text_bot = "Hey !\nI am a telegram bot built by @n07070. I'm open source on... | gpl-3.0 | -7,595,758,703,366,299,000 | 28.428571 | 183 | 0.589806 | false |
stormi/tsunami | src/secondaires/rapport/commandes/rapport/editer.py | 1 | 3588 | # -*-coding:Utf-8 -*
# Copyright (c) 2012 LE GOFF Vincent
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# l... | bsd-3-clause | -8,267,727,388,092,427,000 | 45.467532 | 79 | 0.661543 | false |
barbieauglend/Learning_python | Lvl02/WordGuess/WordGuess2.py | 1 | 1661 | # python 3.5
import getpass
from random import shuffle
def player_one():
docs = open('GPL.txt').read().split()
shuffle(docs)
wort = docs[1]
return wort
player_input = input('1 or 2 players?: ')
player = int(player_input)
word = ''
while word == '':
if player == 1:
while len(word) < 3:
... | unlicense | 817,038,441,491,924,100 | 24.553846 | 79 | 0.53221 | false |
jgrantdev/AoC2015 | day6/day6puzzle1.py | 1 | 3295 | def main():
input_file_name = "day6input.txt"
with open(input_file_name) as input_file:
lines = input_file.readlines()
grid_width = 1000
grid_height = 1000
light_grid = LightGrid(grid_width, grid_height)
for line in lines:
command, top_left, bottom_right = parse_command(line)
... | mit | -5,473,235,493,828,304,000 | 32.969072 | 89 | 0.575417 | false |
automl/HPOlib | HPOlib/wrapping.py | 2 | 24657 | ##
# wrapping: A program making it easy to use hyperparameter
# optimization software.
# Copyright (C) 2013 Katharina Eggensperger and Matthias Feurer
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Found... | gpl-3.0 | 1,399,030,148,345,264,600 | 41.148718 | 116 | 0.583769 | false |
tri2sing/PyOO | patterns/command/invokers.py | 1 | 1312 | '''
Created on Nov 29, 2015
@author: Sameer Adhikari
'''
# Classes the initiate the chain that leads to the receivers doing their work.
# These classes are only aware that they have to invoke the abstract command.
# These classes have no visibility into how the commands connects to receivers.
class ToolbarButton(obj... | gpl-2.0 | 8,838,153,321,956,066,000 | 31.8 | 81 | 0.653963 | false |
benschneider/sideprojects1 | hdf5_to_mtx/load_S1_511_shot.py | 1 | 1651 | import numpy as np
from parsers import load_hdf5, dim
from parsers import savemtx, make_header
# import matplotlib.pyplot as plt
# from changeaxis import interp_y
# from scipy.constants import Boltzmann as Kb
# from scipy.constants import h , e, pi
filein = "S1_511_shot_100mV_4924_5217MHz"
folder = "hdf5s//09//Data_0... | gpl-2.0 | -2,156,807,183,853,500,700 | 28.482143 | 64 | 0.591763 | false |
vied12/superdesk | server/superdesk/io/zczc.py | 1 | 3409 | # -*- coding: utf-8; -*-
#
# This file is part of Superdesk.
#
# Copyright 2013, 2014 Sourcefabric z.u. and contributors.
#
# For the full copyright and license information, please see the
# AUTHORS and LICENSE files distributed with this source code, or
# at https://www.sourcefabric.org/superdesk/license*.
from super... | agpl-3.0 | 6,435,283,647,622,846,000 | 33.434343 | 102 | 0.485186 | false |
CDIPS-AI-2017/pensieve | pensieve/json_dump.py | 1 | 3188 | import json
import os
from datetime import datetime
CONCEPT_MAP = {'people': 'Person',
'places': 'Place',
'things': 'Thing',
'activities': 'Activity',
'times': 'Time',
'mood_words': 'Mood'}
def dump_mem_to_json(mem_dict, save=None):
"""
... | apache-2.0 | -978,367,820,116,201,100 | 37.409639 | 99 | 0.395859 | false |
minggli/chatbot | chatbot/settings.py | 1 | 6860 | """
settings
a repository to configure various parts of the app
"""
import os
import sys
import json
import configparser
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
sys.setrecursionlimit(30000)
def build_config(filename):
"""create a configparser object and write a ini file."""
config = configparser.C... | mit | -400,032,840,587,508,350 | 29.087719 | 76 | 0.529883 | false |
yeiniel/aurora | aurora/webapp/testing.py | 1 | 6684 | # Copyright (c) 2011, Yeiniel Suarez Sosa.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of condi... | bsd-3-clause | 5,616,323,407,553,251,000 | 41.310127 | 79 | 0.710952 | false |
cdw/d10_workloops | img_ave/mat_and_dir.py | 1 | 1311 | #!/usr/bin/env python
# encoding: utf-8
"""
mat_and_dir.py - reorganize directories and read in .MAT files
Let's be honest here, this is storage for stuff we don't need in
fn_parse_and_sort.
Created by Dave Williams on 2014-11-03
"""
import os
from scipy.io import loadmat
from fn_parse_and_sort import chchdir
## Po... | mit | -5,131,101,391,298,932,000 | 28.133333 | 77 | 0.652174 | false |
david-hoffman/scripts | movie_converter.py | 1 | 1698 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# movie_converter.py
"""
Convert from shitty amira format to clean format
Copyright David Hoffman, 2019
"""
import cv2
import glob
import dask
import os
new_ext = "_conv.mpg"
def update_path(path):
return path.replace(".mpg", new_ext)
@dask.delayed
def convert_fi... | apache-2.0 | 8,498,430,353,338,681,000 | 22.260274 | 95 | 0.59364 | false |
DeppSRL/open_bilanci | bilanci_project/bilanci/management/commands/context.py | 1 | 12555 | # coding=utf-8
import logging
from optparse import make_option
from pprint import pprint
import re
import numpy
import math
from django.conf import settings
from django.core.management import BaseCommand
from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned
from bilanci.utils.comuni import FL... | mit | 1,785,778,014,623,933,000 | 37.048485 | 162 | 0.542174 | false |
dtnaylor/web-profiler | webloader/curl_loader.py | 1 | 4321 | import os
import logging
import traceback
import shlex
import subprocess
import string
from collections import defaultdict
from loader import Loader, LoadResult, Timeout, TimeoutError
CURL = '/usr/bin/env curl'
class CurlLoader(Loader):
'''Subclass of :class:`Loader` that loads pages using curl.
.. note:... | mit | 2,313,424,952,162,075,000 | 45.462366 | 148 | 0.601481 | false |
rwl/PyCIM | CIM15/IEC61970/Informative/InfAssets/SubstationAsset.py | 1 | 1963 | # Copyright (C) 2010-2011 Richard Lincoln
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish... | mit | 3,252,123,477,085,998,600 | 44.651163 | 158 | 0.720326 | false |
openstack/ironic | ironic/drivers/modules/fake.py | 1 | 12056 | # -*- encoding: utf-8 -*-
#
# Copyright 2013 Hewlett-Packard Development Company, L.P.
#
# 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/licenses/LICENSE-2.0
#
# ... | apache-2.0 | 637,479,506,789,311,900 | 30.560209 | 79 | 0.616871 | false |
jbogaardt/chainladder-python | examples/plot_voting_chainladder.py | 1 | 1193 | """
==========================
Voting Chainladder Example
==========================
This example demonstrates how you can can use the Voting Chainladder method.
"""
import numpy as np
import pandas as pd
import chainladder as cl
# Load the data
raa = cl.load_sample('raa')
cl_ult = cl.Chainladder().fit(raa).ultimate_... | mit | -1,812,801,947,728,713,000 | 28.825 | 79 | 0.658005 | false |
mitodl/ccxcon | courses/models_test.py | 1 | 2788 | """
Tests for Models
"""
import json
from django.test import TestCase
from django.contrib.auth.models import User
from .factories import CourseFactory, ModuleFactory
from courses.models import Course, Module, UserInfo
# pylint: disable=no-self-use
class CourseTests(TestCase):
"""
Tests for Course
"""
... | agpl-3.0 | 3,154,952,932,236,635,600 | 29.977778 | 97 | 0.602582 | false |
brianmckenna/sci-wms | wmsrest/views.py | 1 | 4583 | # -*- coding: utf-8 -*-
from rest_framework.views import APIView
from rest_framework.permissions import IsAuthenticatedOrReadOnly
from wms.models import Dataset, Layer, VirtualLayer, Variable
from wmsrest.serializers import DatasetSerializer, SGridDatasetSerializer, UGridDatasetSerializer, RGridDatasetSerializer, Layer... | gpl-3.0 | -4,777,197,042,386,780,000 | 36.876033 | 182 | 0.690814 | false |
uclapi/uclapi | backend/uclapi/timetable/migrations/0010_auto_20190220_1835.py | 1 | 3406 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.18 on 2019-02-20 18:35
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('timetable', '0009_coursea_courseb'),
]
operations = [
migrations.AlterFiel... | mit | 4,278,143,463,914,907,600 | 31.438095 | 61 | 0.551674 | false |
hanlind/nova | nova/conf/cells.py | 1 | 15948 | # Copyright 2015 OpenStack Foundation
# All Rights Reserved.
#
# 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/licenses/LICENSE-2.0
#
# Unless requ... | apache-2.0 | 7,724,184,318,643,564,000 | 29.319392 | 78 | 0.713632 | false |
AlexanderSavelyev/rdkit | rdkit/Chem/test_list.py | 1 | 2106 |
tests=[
("python","UnitTestChem.py",{}),
("python","UnitTestChemv2.py",{}),
("python","UnitTestChemAtom.py",{}),
("python","UnitTestChemBond.py",{}),
("python","UnitTestChemSmarts.py",{}),
("python","UnitTestFragmentDescriptors.py",{}),
("python","UnitTestGraphDescriptors.2.py",{}),
("python","UnitTest... | bsd-3-clause | -6,715,822,941,456,160,000 | 32.967742 | 57 | 0.583571 | false |
bjamesv/pyweatherviz | daily_json_to_dict.py | 1 | 4201 | import api_info
from dateutil.parser import parse
import requests
import json
import pandas as pd
import logging
map_ghcn_by_date_tuple = {}
#dictionary, caching fully downloaded/parsed GHCN in memory
def get_ncei_daily_climate_dicts( date_start, date_xend):
"""
obtain daily Global Historical Climatology Net... | gpl-3.0 | 8,346,215,010,290,300,000 | 40.594059 | 101 | 0.620567 | false |
ContinuumIO/dask | dask/dataframe/optimize.py | 2 | 4215 | """ Dataframe optimizations """
import operator
from dask.base import tokenize
from ..optimization import cull, fuse
from .. import config, core
from ..highlevelgraph import HighLevelGraph
from ..utils import ensure_dict
from ..blockwise import optimize_blockwise, fuse_roots, Blockwise
def optimize(dsk, keys, **kwar... | bsd-3-clause | 241,666,005,083,893,500 | 33.268293 | 88 | 0.551601 | false |
HonzaKral/warehouse | warehouse/packaging/models.py | 1 | 12439 | # 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/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Li... | apache-2.0 | 3,921,414,559,749,365,000 | 29.045894 | 81 | 0.614438 | false |
Wintermute0110/plugin.program.advanced.MAME.launcher | dev-graphics/test_generate_fanart.py | 1 | 5637 | #!/usr/bin/python
#
#
from PIL import Image
from PIL import ImageFont
from PIL import ImageDraw
#
# Scales and centers img into a box of size (box_x_size, box_y_size).
# Scaling keeps original img aspect ratio.
# Returns an image of size (box_x_size, box_y_size)
#
def PIL_resize_proportional(img, layout, dic_key, CAN... | gpl-2.0 | -9,040,719,822,525,605,000 | 43.738095 | 95 | 0.604932 | false |
abreen/socrates.py | logisim/subcircuit.py | 1 | 8875 | from logisim.util import num_rotations
from logisim.errors import NoValueGivenError
from logisim.debug import narrate, suppress_narration
from logisim.location import Location
from logisim.component import Component
from logisim.pins import InputPin, OutputPin
class Subcircuit(Component):
def __init__(self, circu... | gpl-2.0 | 3,178,043,507,803,182,600 | 30.810036 | 79 | 0.586479 | false |
muchu1983/104_cameo | cameo/utility.py | 1 | 31383 | # -*- coding: utf-8 -*-
"""
Copyright (C) 2015, MuChu Hsu
Contributed by Muchu Hsu (muchu1983@gmail.com)
This file is part of BSD license
<https://opensource.org/licenses/BSD-3-Clause>
"""
import os
import re
import json
import time
import datetime
import dateparser
import pkg_resources
import shutil
import smtplib
im... | bsd-3-clause | -676,311,704,294,043,800 | 57.577947 | 170 | 0.555873 | false |
tcyb/nextgen4b | nextgen4b/process/sites.py | 1 | 2110 | from Bio import SeqIO
import yaml
import sys
import os
def replace_deletions(word, seq, idxs, del_letter='d'):
"""
Replace any '-' in word with del_letter if the nucleotides next to it in
seq are not '-'.
"""
new_word = [c for c in word]
for i, letter in enumerate(word):
# assume we're... | mit | 9,148,165,284,312,616,000 | 29.157143 | 79 | 0.569668 | false |
DmitrySPetrov/simulation_g11 | l07/21.py | 1 | 1146 | # Задача №2:
# Сформировать словарь, ключами которого являются квадраты чисел с шагом 0.01,
# а значениями - кубический корень из ключа
#
# Вариант решения №1, через цикл for
#
# =!!= Запускать с помощью Python3 =!!=
# Печатать словарь будем функцией pprint
from pprint import pprint
# Количество элементов
N = 50
# С... | mit | -4,652,178,838,154,709,000 | 22.741935 | 78 | 0.69837 | false |
eikonomega/file-comparison-panda | file_comparison_panda/file_comparison_panda.py | 1 | 5939 | """
The file_comparison module exists to easily compare the contents of two
files. The functionality of this module is currently limited to CSV files.
"""
import csv
from file_comparison_exceptions import (
UnsupportedFileType, FileDoesNotExist, PermissionDeniedOnFile)
from os import unsetenv
SUPPORTED_FILE_T... | mit | -991,835,789,728,919,200 | 30.595745 | 80 | 0.597407 | false |
jacquerie/invenio-grobid | setup.py | 1 | 4073 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2015 CERN.
#
# Invenio is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later... | gpl-2.0 | -4,932,404,915,475,860,000 | 30.091603 | 76 | 0.632212 | false |
lych0317/CNBlogs_server | CNBlogs/Protocol/SearchBlogProtocol.py | 1 | 2678 | #!/usr/local/bin/python
# -*- coding:utf8 -*-
__author__ = 'liyc'
import urllib2
import re
from bs4 import BeautifulSoup
def search_blog_keyword_page(keyword, page="0"):
url = "http://zzk.cnblogs.com/s?t=b&dateMin=2013-01-01"
if keyword:
url = url + "&w=" + keyword
if page:
url = url + "&... | apache-2.0 | -4,214,701,241,209,484,300 | 28.428571 | 81 | 0.509709 | false |
herereadthis/django_project | polls/admin.py | 1 | 1075 | from django.contrib import admin
from polls.models import Choice, Poll
# Register your models here.
# customize the admin form by creating a model admin object, then pass it
# as the second argument to admin.site.register()
# inline: you can do TabularInline (saves space) or StackedInline
class ChoiceInline(admin.Ta... | mit | 1,060,910,523,673,767,200 | 28.054054 | 73 | 0.612093 | false |
dantkz/spatial-transformer-tensorflow | example_affine.py | 1 | 2113 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# 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/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -6,119,487,510,610,097,000 | 34.216667 | 83 | 0.684808 | false |
who-emro/meerkat_api | meerkat_api/config.py | 1 | 1303 | """
config.py
Configuration and settings
"""
from os import getenv
class Config(object):
DEBUG = True
TESTING = False
PRODUCTION = False
# Global stuff
SQLALCHEMY_DATABASE_URI = getenv("SQLALCHEMY_DATABASE_URI", 'postgresql+psycopg2://postgres:postgres@db/meerkat_db')
API_KEY = "test-api"
... | mit | 3,249,643,469,962,440,700 | 25.591837 | 120 | 0.650038 | false |
brunoripa/NoseGAE | nosegae.py | 1 | 13539 | import os
import logging
import sys
import tempfile
from nose.plugins.base import Plugin
from nose.case import FunctionTestCase
# Solution from
# http://stackoverflow.com/questions/17583443/what-is-the-correct-way-to-share-package-version-with-setup-py-and-the-package
from pkg_resources import get_distribution, Distri... | bsd-2-clause | 754,867,155,543,483,600 | 44.432886 | 124 | 0.601152 | false |
google/turbinia | turbinia/workers/fsstat.py | 1 | 1589 | # -*- coding: utf-8 -*-
# Copyright 2021 Google Inc.
#
# 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/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | apache-2.0 | -2,246,638,979,258,569,000 | 32.125 | 79 | 0.723096 | false |
bitmovin/bitmovin-python | bitmovin/resources/models/outputs/generic_s3_output.py | 1 | 2304 | from bitmovin.utils import Serializable
from bitmovin.resources.enums import S3SignatureVersion
from . import AbstractOutput
class GenericS3Output(AbstractOutput, Serializable):
def __init__(self, access_key, secret_key, bucket_name, host, port=None, signature_version=None, ssl=None, id_=None, custom_data=None,
... | unlicense | -5,036,721,332,386,152,000 | 38.724138 | 141 | 0.648003 | false |
XiangyuQin/WeChat-Controller | code/testdecode.py | 1 | 18959 | # -*- coding:utf-8 -*-
#!/usr/bin/env python
__all__ = ['weChatController']
import cookielib
import urllib2
import urllib
import urlparse
import json
import poster
import hashlib
import time
import random
import sys
import os
import traceback
from cStringIO import StringIO
import tornado
import tornado.escape
from b... | apache-2.0 | -3,363,681,692,529,769,500 | 36.066225 | 140 | 0.510631 | false |
jaeilepp/eggie | mne/io/kit/kit.py | 2 | 28437 | """Conversion tool from SQD to FIF
RawKIT class is adapted from Denis Engemann et al.'s mne_bti2fiff.py
"""
# Author: Teon Brooks <teon@nyu.edu>
#
# License: BSD (3-clause)
import os
from os import SEEK_CUR
from struct import unpack
import time
import numpy as np
from scipy import linalg
from ..pick import pick_t... | bsd-2-clause | 406,977,401,301,382,140 | 40.574561 | 79 | 0.540001 | false |
JackWalpole/finite_strain | ellipsoid_visualisation.py | 1 | 1324 | #!/usr/bin/env python
"""Visualise finite strian ellipsoids"""
import numpy as np
from mayavi.api import Engine
from mayavi.sources.api import ParametricSurface
from mayavi.modules.api import Surface
from mayavi import mlab
def gen_ellipsoid(position,shape,orientation):
"""given the existence of a scene genera... | mit | -7,504,901,609,433,819,000 | 23.090909 | 95 | 0.699396 | false |
fabiocorneti/django-easytree | easytree/forms.py | 1 | 4661 | from django import forms
from django.utils.translation import ugettext_lazy as _
from easytree import utils
from easytree.exceptions import EasyTreeException
pos_map = {
'first-sibling': _('First sibling'),
'left': _('Previous sibling'),
'right': _('Next sibling'),
'last-sibling': _('Last sibling'),
... | bsd-3-clause | -2,380,818,350,016,450,000 | 39.181034 | 125 | 0.566831 | false |
meithan/NFL_website | cgi-bin/QueryPage.py | 1 | 4651 | #!/usr/bin/env python
# Convenience script to issue MySQL queries to the DB
import cgi, cgitb
import sys
cgitb.enable()
from common import *
# =====================================
def showBadLogin():
print '<br><strong>You must have the proper credentials to access this page!</strong>'
print '</body></html... | gpl-3.0 | -4,550,998,764,767,151,000 | 31.760563 | 118 | 0.57622 | false |
traxex33/Twitter-Analysis | junk/mineTweets.py | 1 | 2336 | import tweepy
import json
from tweepy import OAuthHandler
from tweepy import Stream
from liveListener import Listener
class TweetMiner:
def __init__(self, config_fname='config'):
self._readdetails(config_fname)
self._authenticate()
def mine(self):
self.state = None
while self.... | mit | -6,225,401,496,223,295,000 | 39.275862 | 101 | 0.606592 | false |
frRoy/Benchmarklib | benchmarklib/charts/tests/test_views.py | 1 | 1353 | from test_plus.test import TestCase
from django.test import Client
# from unittest import skip
class Testnew_chart(TestCase):
def setUp(self):
self.client = Client()
# self.client.login(username='fred', password='secret')
def test_charts_renders_new_charts(self):
response = self.clie... | bsd-3-clause | 2,509,228,727,055,043,600 | 34.605263 | 77 | 0.66371 | false |
pmav99/praktoras | utils/service_discovery/config_stores.py | 1 | 2131 | # (C) Fractal Industries, Inc. 2016
# (C) Datadog, Inc. 2010-2016
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
# project
from utils.service_discovery.abstract_config_store import AbstractConfigStore
from utils.service_discovery.abstract_config_store import CONFIG_FROM_AUTOCONF, CONFIG_FR... | bsd-3-clause | -2,290,798,264,232,469,200 | 35.741379 | 164 | 0.679493 | false |
henriquegemignani/randovania | randovania/games/prime/patcher_file_lib/hint_formatters.py | 1 | 3971 | import typing
from randovania.game_description import node_search
from randovania.game_description.area import Area
from randovania.game_description.game_patches import GamePatches
from randovania.game_description.hint import Hint, HintLocationPrecision, RelativeDataArea, HintRelativeAreaName
from randovania.game_desc... | gpl-3.0 | -1,242,443,017,889,526,800 | 44.125 | 122 | 0.674893 | false |
digibyte/digibyte | test/functional/p2p_fingerprint.py | 1 | 5905 | #!/usr/bin/env python3
# Copyright (c) 2009-2019 The Bitcoin Core developers
# Copyright (c) 2014-2019 The DigiByte Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test various fingerprinting protections.
If a s... | mit | 5,094,438,436,305,804,000 | 37.848684 | 79 | 0.659949 | false |
vlimant/IntelROCCS | Monitor/plotFromPickle.py | 1 | 21846 | #!/usr/bin/python
'''==============================================================================
This script reads information from the pickle caches and directly
makes plots
=============================================================================='''
import os, sys
import re, glob, subprocess, tim... | mit | 1,943,402,565,564,367,600 | 36.927083 | 151 | 0.564039 | false |
relekang/accio | accio/webhooks/tests.py | 1 | 1727 | import pytest
@pytest.fixture
def push_based_project(accio_project):
accio_project.deploy_on = 'push'
accio_project.save()
return accio_project
@pytest.fixture
def status_based_project(accio_project):
accio_project.deploy_on = 'status'
accio_project.save()
return accio_project
@pytest.mark... | mit | -6,829,933,572,956,118,000 | 33.54 | 98 | 0.7348 | false |
opensource-expert/customers-formula | customers/customers_passwords.py | 1 | 4681 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# vim: set ft=python:
#
# python password generator for customers
#
# Depend: pwqgen
#
# Usage:
# ./customers_passwords.py customers_top pillarpath/to/customers.sls pillarpath/user_passwords.yaml
#
# Output: Int, the number of created passwords in pillarpath/user_passwords.sls... | gpl-3.0 | -1,138,239,243,298,611,100 | 26.511765 | 100 | 0.598888 | false |
rickypc/dotfiles | .rflint.d/table.py | 1 | 3998 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Robot Lint Rules - Lint rules for Robot Framework data files.
# Copyright (c) 2014, 2015, 2016 Richard Huang <rickypc@users.noreply.github.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero Gen... | mit | -4,098,794,181,597,314,600 | 32.316667 | 84 | 0.612806 | false |
IntelLabs/hpat | docs/source/buildscripts/user_guide_gen.py | 1 | 12520 | # -*- coding: utf-8 -*-
# *****************************************************************************
# Copyright (c) 2020, Intel Corporation All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# ... | bsd-2-clause | 2,918,795,782,654,178,000 | 43.714286 | 120 | 0.610304 | false |
jpruf/building-permits-geo | pipeline/tasks/convert_to_dict.py | 1 | 1327 | import os
import csv
import json
TSV_FOLDER = "../data/tsv/"
FIELDNAMES = ("tract", "apn", "issue_date", "final_date", "lot", "permit_number", "owner",
"contractor", "applicant", "location", "approval_status", "sub_code",
"sub_code_description", "work_code", "work_code_description", "census... | mit | 3,859,655,520,245,001,700 | 39.242424 | 92 | 0.600603 | false |
ymap/aioredis | tests/connection_commands_test.py | 1 | 3447 | import pytest
import asyncio
from aioredis import ConnectionClosedError, ReplyError
from aioredis.pool import ConnectionsPool
from aioredis import Redis
@pytest.mark.run_loop
async def test_repr(create_redis, loop, server):
redis = await create_redis(
server.tcp_address, db=1, loop=loop)
assert repr(... | mit | -7,592,511,956,837,837,000 | 28.211864 | 79 | 0.660865 | false |
chrys87/speech-bridge | src/speechbridge/core/settingsManager.py | 1 | 4438 | #!/bin/python
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
import importlib.util
import os
import __main__
from configparser import ConfigParser
from core import environment
from core import inputEvent
from core.settings import settings
from core import debug
class... | lgpl-3.0 | 4,906,282,375,151,863,000 | 40.092593 | 169 | 0.616043 | false |
hughsons/saltwaterfish | admin/views.py | 1 | 28274 | from django.http import *
from forms import UploadForm
from django import template
from django.template.loader import get_template
from django.template import Context, RequestContext
from django.utils.decorators import method_decorator
from django.shortcuts import render_to_response
from django.contrib.auth import auth... | bsd-3-clause | -3,690,833,010,790,051,300 | 41.326347 | 266 | 0.592594 | false |
wingtk/icbuild | icbuild/modtypes/msvc.py | 1 | 3122 | # icbuild - a tool to ease building collections of source packages
# Copyright (C) 2015 Ignacio Casal Quinteiro
#
# msvc.py: msvc module type definitions.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Softwar... | gpl-2.0 | 1,607,374,235,951,469,600 | 34.078652 | 87 | 0.68802 | false |
MarinusVL/scRNApipe | setup.py | 1 | 1056 | import os
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='scRNApipe',
version='0.1.0',
description='Package for analysing scRNA-seq in Transcript Tag Counting data.',
long_description=read('README.md'),
author='Stavr... | mit | 4,567,553,069,334,808,000 | 35.413793 | 122 | 0.631629 | false |
catalpainternational/OIPA | OIPA/api/v2/resources/advanced_resources.py | 1 | 7277 | from builtins import object
from tastypie.resources import ModelResource
from geodata.models import Country, Region, City
from indicator.models import Indicator
from tastypie import fields
from tastypie.serializers import Serializer
class IndicatorFiltersResource(ModelResource):
name = fields.CharField(attribut... | agpl-3.0 | 8,310,001,698,274,749,000 | 36.127551 | 126 | 0.600797 | false |
zaitcev/swift-lfs | test/probe/common.py | 1 | 7421 | # Copyright (c) 2010-2012 OpenStack, LLC.
#
# 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/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | apache-2.0 | 5,316,278,556,826,849,000 | 35.377451 | 79 | 0.538741 | false |
gitcoinco/web | app/grants/tests/test_views.py | 1 | 1226 | import json
from django.urls import reverse
from grants.models import Grant, GrantCategory, GrantType
from grants.views import basic_grant_categories
from test_plus.test import TestCase
class GrantsViewResponsesTests(TestCase):
# def test_not_authorized(self):
# response = self.client.post(reverse('gran... | agpl-3.0 | -8,922,970,137,816,865,000 | 29.65 | 101 | 0.650897 | false |
dhylands/bioloid3 | bioloid/bus.py | 1 | 9709 | """This module provides the Bus class which knows how to talk to Bioloid
devices, and the BusError exception which is raised when an error is
enountered.
"""
import pyb
from bioloid import packet
from bioloid.dump_mem import dump_mem
from bioloid.log import log
class BusError(Exception):
"""Exception whic... | mit | 4,271,133,406,594,132,500 | 36.77821 | 108 | 0.576475 | false |
takearest118/coconut | models/notification.py | 1 | 1240 | # -*- coding: utf-8 -*-
from bson import ObjectId
from enum import Enum
from models.base import BaseModel
class NotificationModel(BaseModel):
MONGO_COLLECTION = 'notification'
def __init__(self, *args, **kwargs):
super(NotificationModel, self).__init__(*args, **kwargs)
@property
def specif... | gpl-3.0 | -7,735,690,550,109,456,000 | 23.8 | 68 | 0.400806 | false |
ocefpaf/ulmo | ulmo/cuahsi/wof/core.py | 1 | 11413 | """
ulmo.wof.core
~~~~~~~~~~~~~
This module provides direct access to `CUAHSI WaterOneFlow`_ web services.
.. _CUAHSI WaterOneFlow: http://his.cuahsi.org/wofws.html
"""
from future import standard_library
standard_library.install_aliases()
from builtins import str
import io
import suds.client
import... | bsd-3-clause | 6,928,622,012,715,005,000 | 37.819728 | 98 | 0.651625 | false |
ic-hep/DIRAC | ConfigurationSystem/Client/Helpers/Registry.py | 1 | 11267 | """ Helper for /Registry section
"""
from DIRAC import S_OK, S_ERROR
from DIRAC.ConfigurationSystem.Client.Config import gConfig
from DIRAC.ConfigurationSystem.Client.Helpers.CSGlobals import getVO
__RCSID__ = "$Id$"
# pylint: disable=missing-docstring
gBaseRegistrySection = "/Registry"
def getUsernameForDN( dn, u... | gpl-3.0 | 7,613,487,152,467,321,000 | 33.35061 | 113 | 0.665838 | false |
frank2/paranoia | lib/base/event.py | 1 | 2058 | #!/usr/bin/env python
import inspect
from paranoia.base.paranoia_agent import ParanoiaAgent, ParanoiaError
__all__ = ['get_event_base', 'EventError', 'Event', 'InstantiateEvent'
,'SetPropertyEvent', 'NewAddressEvent', 'NewShiftEvent', 'NewSizeEvent'
,'SetValueEvent', 'DeclareSubregionEvent', 'M... | gpl-3.0 | -8,133,959,076,121,812,000 | 27.191781 | 82 | 0.674441 | false |
peterbrittain/asciimatics | samples/treeview.py | 1 | 2992 | #!/usr/bin/env python3
from asciimatics.event import KeyboardEvent
from asciimatics.widgets import Frame, Layout, FileBrowser, Widget, Label, PopUpDialog, Text, \
Divider
from asciimatics.scene import Scene
from asciimatics.screen import Screen
from asciimatics.exceptions import ResizeScreenError, StopApplication
... | apache-2.0 | 4,689,903,952,881,384,000 | 35.048193 | 98 | 0.602273 | false |
simbtrix/screenmix | screenmix/ackModel/ack.py | 1 | 1349 | '''
Created on 01.08.2016
@author: mkennert
'''
from kivy.properties import ObjectProperty
from kivy.uix.gridlayout import GridLayout
from ackModel.ackRect import AckRect
class Ack(GridLayout):
'''
ack contains all acks from the different shapes. it manage which ack-should
show in th... | gpl-3.0 | -1,378,046,519,291,623,700 | 27.326087 | 79 | 0.535211 | false |
Matoking/pastebin-django | home/tests.py | 1 | 7947 | from pastebin.testcase import CacheAwareTestCase
from freezegun import freeze_time
from django.core.urlresolvers import reverse
@freeze_time("2015-01-01")
class LatestPastesTests(CacheAwareTestCase):
def test_latest_pastes_empty(self):
"""
Test that latest pastes shows the "no pastes uploaded" me... | unlicense | 1,292,723,512,337,146,600 | 47.760736 | 89 | 0.423682 | false |
davecroll/data-tasks | datatasks/sources/DatabaseSource.py | 1 | 1161 | # datatasks\sources\DatabaseSource.py
import os
from collections import OrderedDict
from datatasks.db.DatabaseFactory import DatabaseFactory
from datatasks.utils import convert_to_primary_datatypes
from .DataSource import DataSource
class DatabaseSource(DataSource):
"""
Inherits RecordList and is capable of... | mit | 1,022,893,840,000,731,100 | 32.171429 | 78 | 0.660637 | false |
sfu-natlang/HMM-Aligner | src/models/Old/IBM1WithAlignmentType.py | 1 | 5456 | # -*- coding: utf-8 -*-
#
# IBM model 1 with alignment type implementation of HMM Aligner
# Simon Fraser University
# NLP Lab
#
# This is the implementation of IBM model 1 word aligner with alignment type.
#
from collections import defaultdict
from loggers import logging
from models.IBM1Base import AlignmentModelBase ... | mit | -7,192,015,633,586,471,000 | 37.422535 | 79 | 0.559751 | false |
SMMAR11/smmarbsence | app/forms/admin.py | 1 | 4838 | # coding: utf-8
# Imports
from app.models import *
from django import forms
from django.contrib.admin.widgets import FilteredSelectMultiple
class FGroupeUtilisateur(forms.ModelForm) :
# Champ
util = forms.ModelMultipleChoiceField(
label = 'Utilisateurs composant le groupe',
queryset = TUtilis... | gpl-3.0 | 1,337,630,901,324,975,600 | 33.248227 | 116 | 0.612676 | false |
Gram21/ctfcode | pwnit.py | 1 | 4547 | #!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
# Python exploit template.
#
# Author: Jan Keim aka Gram21, Gramarye
from pwn import *
####################################
# Target System #
####################################
# Server Connection
target = "localhost"
port = 1337
# Process Connec... | mit | -3,380,402,577,287,018,500 | 23.058201 | 72 | 0.553992 | false |
frankyrumple/ope | laptop_credential/winsys/tests/test_fs/test_filepath.py | 2 | 6889 | import os
import filecmp
import shutil
import tempfile
import unittest as unittest0
try:
unittest0.skipUnless
unittest0.skip
except AttributeError:
import unittest2 as unittest
else:
unittest = unittest0
del unittest0
import uuid
import win32file
from winsys import fs
from winsys.tests import utils
def _test... | mit | -304,891,808,880,446,500 | 32.280193 | 110 | 0.533749 | false |
informatik-mannheim/Moduro-CC3D | Simulation/Steppable/ModuroSteppable.py | 1 | 1244 | # Copyright 2016 the original author or authors.
#
# 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/licenses/LICENSE-2.0
#
# Unless required by applicable... | apache-2.0 | -3,116,914,015,083,291,600 | 34.542857 | 76 | 0.694534 | false |
jbogers/amino-epg-grabber | src/AminoEPGGrabber.py | 1 | 27978 | #!/usr/bin/env python
"""
A XMLTV compatible EPG grabber for the Amino EPG.
The grabber should function for any provider that supplies IPTV from Glashart Media.
"""
# Set program version
VERSION = "v0.5"
from datetime import datetime, date, timedelta
from lxml import etree
import pytz
import httplib
... | gpl-3.0 | 2,449,852,546,226,054,700 | 41.109399 | 128 | 0.501358 | false |
jkoelker/investing | picloud/magicformula/predict.py | 1 | 3948 | #!/usr/bin/env python
import argparse
import sys
import MySQLdb
import pandas as pd
import twitter
def publish_to_twitter(df, prefix='MF', api=None, **kwargs):
if api is None:
api = twitter.Api(**kwargs)
msg = ' '.join(['$%s' % s for s in df.T.index])
msg = '%s: %s' % (prefix, msg)
if len(... | mit | 5,124,949,464,170,065,000 | 32.457627 | 79 | 0.526342 | false |
mucximilian/gimpmaps | gimprenderer/sketching/geometry.py | 1 | 17067 | '''
Created on Jun 11, 2015
@author: mucx
# TO DO:
- Adding classes:
- Point?
- Polygon
- Multipolygon support
'''
from __future__ import division
from abc import ABCMeta, abstractmethod
import math
import sys
class Geometry(object):
"""
An abstract class defining the base geometry object... | gpl-2.0 | 3,766,000,800,359,044,000 | 30.089253 | 84 | 0.457315 | false |
chrsrds/scikit-learn | examples/model_selection/plot_grid_search_digits.py | 7 | 2706 | """
============================================================
Parameter estimation using grid search with cross-validation
============================================================
This examples shows how a classifier is optimized by cross-validation,
which is done using the :class:`sklearn.model_selection.GridS... | bsd-3-clause | 537,184,166,535,805,440 | 33.692308 | 78 | 0.656689 | false |
lekston/ardupilot | libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py | 1 | 38099 | #!/usr/bin/env python
'''
setup board.h for chibios
'''
import argparse, sys, fnmatch, os, dma_resolver, shlex, pickle
import shutil
parser = argparse.ArgumentParser("chibios_pins.py")
parser.add_argument(
'-D', '--outdir', type=str, default=None, help='Output directory')
parser.add_argument(
'hwdef', type=st... | gpl-3.0 | 4,494,559,686,549,286,400 | 32.65636 | 118 | 0.526785 | false |
TresysTechnology/setools | setoolsgui/rolemodel.py | 1 | 2087 | # Copyright 2016, Tresys Technology, LLC
#
# This file is part of SETools.
#
# SETools is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation, either version 2.1 of
# the License, or (at your option) any later ... | lgpl-2.1 | -2,426,512,159,329,464,300 | 28.814286 | 74 | 0.638237 | false |
Weihonghao/ECM | Vpy34/lib/python3.5/site-packages/theano/gof/tests/test_toolbox.py | 2 | 2301 | from __future__ import absolute_import, print_function, division
from theano.gof.graph import Variable, Apply
from theano.gof.type import Type
from theano.gof.op import Op
from theano.gof.fg import FunctionGraph
from theano.gof.toolbox import NodeFinder
def as_variable(x):
assert isinstance(x, Variable)
ret... | agpl-3.0 | -5,614,573,700,113,669,000 | 25.147727 | 73 | 0.571491 | false |
davidfischer/rpc4django | docs/conf.py | 2 | 6764 | # -*- coding: utf-8 -*-
#
# RPC4Django documentation build configuration file, created by
# sphinx-quickstart on Sat Apr 17 14:31:28 2010.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# ... | bsd-3-clause | -7,409,543,119,766,741,000 | 31.363636 | 80 | 0.713779 | false |
c-square/homework | Licență/Anul III/CN/gauss/scripts/deploy.py | 1 | 1156 | #! /usr/bin/env python
""" Deploys a .pth file in site-packages for easy importing """
import distutils.sysconfig
import os
def deploy():
"""Deploy gauss"""
site = distutils.sysconfig.get_python_lib()
pth = os.path.join(site, 'gauss.pth')
if os.path.exists(pth):
print("[i] Module already exis... | mit | 3,215,219,101,553,088,000 | 30.243243 | 77 | 0.553633 | false |
jolyonb/edx-platform | lms/djangoapps/discussion/rest_api/tests/test_api.py | 1 | 128040 | """
Tests for Discussion API internal interface
"""
import itertools
from datetime import datetime, timedelta
from urllib import urlencode
from urlparse import parse_qs, urlparse, urlunparse
import ddt
import httpretty
import mock
from django.core.exceptions import ValidationError
from django.test.client import Reques... | agpl-3.0 | 4,310,273,995,939,487,000 | 39.28949 | 120 | 0.568971 | false |
ehabkost/virt-test | qemu/tests/usb_hotplug.py | 1 | 1705 | import logging, re, uuid
from autotest.client.shared import error
from autotest.client import utils
@error.context_aware
def run_usb_hotplug(test, params, env):
"""
Test usb hotplug
@param test: kvm test object
@param params: Dictionary with the test parameters
@param env: Dictionary with test env... | gpl-2.0 | 3,051,980,685,977,966,000 | 32.431373 | 71 | 0.659824 | false |
ivmech/iviny-scope | lib/xlsxwriter/test/comparison/test_chart_column07.py | 1 | 2108 | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013, John McNamara, jmcnamara@cpan.org
#
import unittest
import os
from ...workbook import Workbook
from ..helperfunctions import _compare_xlsx_files
class TestCompareXLSXFiles(unittest.TestC... | gpl-3.0 | 3,955,221,327,216,043,000 | 25.024691 | 79 | 0.486243 | false |
shaneoc/atom | atom/router/directory.py | 1 | 1333 |
class Directory(object):
def __init__(self, router):
self.router = router
def start(self):
db = self.router.database
db.execute(
'CREATE TABLE IF NOT EXISTS users (' +
'id INTEGER PRIMARY KEY, name TEXT, password TEXT)')
db.execute(
'INSE... | mit | 6,492,416,664,778,558,000 | 24.653846 | 79 | 0.543136 | false |
bokeh/bokeh | examples/app/fourier_animated.py | 1 | 6647 | ''' Show a streaming, updating representation of Fourier Series.
The example was inspired by `this video`_.
Use the ``bokeh serve`` command to run the example by executing:
bokeh serve fourier_animated.py
at your command prompt. Then navigate to the URL
http://localhost:5006/fourier_animated
in your brows... | bsd-3-clause | 8,983,696,342,426,303,000 | 32.235 | 114 | 0.574846 | false |
mposner/pychess | board.py | 1 | 5063 | # pychess
# mposner 11/23/14
from piece import Piece
from piece_attributes import PieceType, Color
from utils import isValidPosition
class Board:
"""Represents a chess board"""
def __init__(self):
"""Initialize a new chess board"""
self.makeNewPieces()
def __str__(self):
result = " " + 33*"="... | gpl-2.0 | -1,243,340,808,460,693,000 | 26.818681 | 69 | 0.633419 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.