code stringlengths 2 1.05M | repo_name stringlengths 5 104 | path stringlengths 4 251 | language stringclasses 1
value | license stringclasses 15
values | size int32 2 1.05M |
|---|---|---|---|---|---|
import syntax_test
class TestMarkdownLight(syntax_test.SyntaxTestCase):
def setUp(self):
super().setUp()
self.set_syntax_file("Packages/MarkdownLight/MarkdownLight.tmLanguage")
def check_default(self, patterns):
self.check_in_single_scope(patterns, 'text')
def test_simple_text(sel... | bbtfr/MarkdownLight | tests/test_markdown_light.py | Python | mit | 22,066 |
# -*- coding: utf-8 -*-
from sympy import Symbol
from sympy.matrices import Matrix, MatrixSymbol
from copy import copy
from itertools import permutations
from sympy.core.basic import Basic
"""
Module "arraypy" describes tensor and it's bases - Multidimentional arrays.
Module consists of Arraypy class, TensorArray cla... | AunShiLord/Tensor-analysis | build/lib/tensor-analysis/arraypy.py | Python | mit | 47,289 |
import pygame
from OpenGL.GL import *
def MTL(filename):
contents = {}
mtl = None
for line in open(filename, "r"):
if line.startswith('#'): continue
values = line.split()
if not values: continue
if values[0] == 'newmtl':
mtl = contents[values[1]] = {}
eli... | alexus37/AugmentedRealityChess | pythonAnimations/OBJViewer/objloader.py | Python | mit | 3,873 |
import datetime
import json
import urllib
from django.conf import settings
from django.contrib.auth.decorators import user_passes_test
from django.core.urlresolvers import reverse
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render_to_response
from django.template import Requ... | lakiw/cripts | cripts/datasets/views.py | Python | mit | 4,737 |
"""Package entry point."""
import importlib
import os
import sys
from gitman.cli import main
# Declare itself as package if needed for better debugging support
# pylint: disable=multiple-imports,wrong-import-position,redefined-builtin,used-before-assignment
if __name__ == '__main__' and __package__ is None: # prag... | jacebrowning/gdm | gitman/__main__.py | Python | mit | 590 |
"""
__MT_pre__match_contains.py_____________________________________________________
Automatically generated AToM3 syntactic object (DO NOT MODIFY DIRECTLY)
Author: gehan
Modified: Sun Feb 15 10:22:14 2015
________________________________________________________________________________
"""
from ASGNode import *
from ... | levilucio/SyVOLT | UMLRT2Kiltera_MM/MT_pre__match_contains.py | Python | mit | 4,951 |
'''Contains the Core classes of the PEATSA command line tool'''
import ProteinDesignTool, Data, Exceptions, PEATSAParallel
| dmnfarrell/peat | PEATSA/Core/__init__.py | Python | mit | 123 |
from fuzzywuzzy import process
def dictionary_match(item, dictionary,
allow_low_match=False, low_match_threshold=90):
if item in dictionary:
return item, 100
matched_item, score = process.extractOne(item, dictionary)
if score < low_match_threshold and not allow_low_match:
... | rouzazari/fuzzyflask | app/main/datatools.py | Python | mit | 388 |
"""
Testing sampling
----------------
testing functions which helps in spatial sampling
"""
#import networkx as nx
#from scipy.sparse import coo_matrix
#from pySpatialTools.utils.artificial_data import\
# generate_random_relations_cutoffs
import numpy as np
from pySpatialTools.Sampling.sampling_from_space import ... | tgquintela/pySpatialTools | pySpatialTools/tests/test_sampling.py | Python | mit | 2,210 |
# The MIT License (MIT)
#
# Copyright (c) 2015 Georg Schäfer
#
# 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, mod... | Berling/project-zombye-exporter | io_exporter_zombye/export_zmdl.py | Python | mit | 8,360 |
#! /usr/bin/env python
from sys import argv
script, q1, q2, k = argv
fw = open('c.txt', 'w+')
for docid in range(1,192):
filename = 'data/' + str(docid) + '.txt'
fr = open(filename)
string = fr.read()
pp1 = []
pp2 = []
l = []
position = 0
for token in string.split():
if token == q1:
pp1.append(position... | fortesit/search-engine | posting-list-search-k-distanced-words.py | Python | mit | 663 |
import collections
from supriya.enums import CalculationRate
from supriya.synthdefs import MultiOutUGen
class XFadeRotate(MultiOutUGen):
"""
::
>>> source = supriya.ugens.In.ar(bus=0)
>>> xfade_rotate = supriya.ugens.XFadeRotate.ar(
... n=0,
... source=source,
... | josiah-wolf-oberholtzer/supriya | dev/etc/pending_ugens/XFadeRotate.py | Python | mit | 3,541 |
from unit_tests.util import *
from unit_tests.AmqpTestCase import AmqpTestCase
from host.implant.Worker import Worker
class TestWorker(AmqpTestCase):
"""
Tests the functionality of the Worker class to process AMQP messages.
"""
def __init__(self):
self.worker = None
def setup(self):
... | orlade/microsimmer | unit_tests/test_host/test_implant/TestWorker.py | Python | mit | 994 |
import os
import socket
import sys
from binascii import hexlify, unhexlify
from multiprocessing import current_process
from threading import current_thread, enumerate
import traceback
import shared
from debug import logger
import queues
import shutdown
def powQueueSize():
curWorkerQueue = queues.workerQueue.qsize... | hb9kns/PyBitmessage | src/helper_generic.py | Python | mit | 2,946 |
#Faça um programa que receba dois números inteiros e gere os números inteiros que estão no intervalo compreendido por eles.
a=int(input('valor incial'))
print (a)
b=int(input('valor final'))
print (b)
while a<b:
print(a)
a=a+1
| erikaklein/algoritmo---programas-em-Python | GerarNumeroNoIntervalo.py | Python | mit | 251 |
def get_attendance_records(file_path):
attendance_file = open(file_path,'r')
lines = attendance_file.readlines()
attendance_file.close()
header = lines[0]
attendance_records = lines[1:]
return attendance_records
def convert_attendance_record_to_bools(sessions):
sessions_bool = []
for... | pathespe/MarkerBot | tests/resources/session_6.py | Python | mit | 2,838 |
#!/usr/bin/env python
#
# Build QT5 webengine
#
import os
import sys
import xsysroot
if __name__ == '__main__':
# You want to be careful to enable a debug build. libQtWebengine.so takes 817MB :-)
debug_build=False
build_mode='release' if not debug_build else 'debug'
# We need a xsysroot profile wit... | skarbat/picute | piwebengine.py | Python | mit | 2,940 |
import json
from datetime import datetime
from django.conf import settings
from django.core.paginator import Paginator
import requests
from rest_framework import generics
from rest_framework import views
from rest_framework.pagination import PaginationSerializer
from rest_framework.renderers import BrowsableAPIRender... | rodxavier/open-pse-initiative | django_project/api/views/quotes_views.py | Python | mit | 7,113 |
# --------------------------------------------------------
# Fast R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick
# --------------------------------------------------------
import os
from os.path import join as pjoin
import numpy as np
from dis... | yuxng/Deep_ISM | FCN/lib/setup.py | Python | mit | 5,133 |
#!/usr/bin/env python
#coding: utf-8
# The MIT License
#
# Copyright (c) 2009-2011 the bpython authors.
#
# 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 witho... | hirochachacha/apython | bpython/interpreter.py | Python | mit | 12,791 |
from putlocker import Putlocker
putlocker = Putlocker()
series = putlocker.search('Gold Rush')
serie = series[0]
print(serie.getName())
print(serie.getImageUrl())
print(serie.url)
print('-' * 80)
seasons = serie.getSeasons()
season = seasons[0]
episodes = season.getEpisodes()
for episode in episodes:
print(episod... | tomsik68/kodi-putlocker-tvshows | examples/putlockertest.py | Python | mit | 357 |
'''
Created by auto_sdk on 2014-12-17 17:22:51
'''
from top.api.base import RestApi
class ItempropsGetRequest(RestApi):
def __init__(self,domain='gw.api.taobao.com',port=80):
RestApi.__init__(self,domain, port)
self.attr_keys = None
self.child_path = None
self.cid = None
self.fields = None
self.... | CooperLuan/devops.notes | taobao/top/api/rest/ItempropsGetRequest.py | Python | mit | 606 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from collections import namedtuple
from os import getcwd, fdopen, fstat as stat
from time import ctime, time
from ..fdbus_h import *
from ..exceptions.exceptions import *
# a client name/id field (i.e. a process name or identifier/pid)
fdobj = namedtuple('File_Descriptor... | tijko/fdbus | fdbus/fdobjects/fdobjects.py | Python | mit | 7,510 |
#!/usr/bin/python
import random, re
import anydbm
import os, sys
from flask import Flask, render_template, request, make_response
app = Flask(__name__)
IGNORED = 'ignored'
INTERESTING = 'interesting'
PENDING_FILES = set()
WAV_DIR = 'static/wav'
IGNORED_WAV_DIRS = ('doc-kiwi',
'doc-morepork', 'r... | douglasbagnall/sonograms | server.py | Python | mit | 8,302 |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-09-18 07:14
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('api', '0004_auto_20170824_0954'),
]
operations = [
migrations.AddField(
... | hotfix-project/hotfix-api | api/migrations/0005_patch_md5sum.py | Python | mit | 456 |
"""Wraps the riemann_pb2_py2 and riemann_pb2_py3 modules"""
import sys
__all__ = ['Event', 'Msg', 'Query', 'Attribute']
if sys.version_info >= (3,):
from riemann_client.riemann_py3_pb2 import (Event, Msg, Query, Attribute)
else:
from riemann_client.riemann_py2_pb2 import (Event, Msg, Query, Attribute)
| borntyping/python-riemann-client | riemann_client/riemann_pb2.py | Python | mit | 314 |
# -*- coding: utf-8-unix; mode: python -*-
"""Module to assist to make HTML.
This module provides class that assist to make HTML.
Author: 2011 IMAI Toshiyuki
Copyright (c) 2011 IMAI Toshiyuki
This software is released under the MIT License.
http://opensource.org/licenses/mit-license.php
Class:
HTML -- Assist t... | imait/HtmlDocument | for_python2.x/htmldocument.py | Python | mit | 46,242 |
import sys
import pdb
import psycopg2
from sqlalchemy import create_engine
from sqlalchemy.pool import NullPool
from datetime import datetime, date, timedelta
from datetime import time as dttime
from collections import deque, defaultdict
from dateutil.parser import parse as dateparse
from scorpionsql.settings import ... | sirrice/scorpionsql | scorpionsql/db.py | Python | mit | 2,428 |
import re
import maya.cmds as cmds
import maya.OpenMaya as om
import cross3d
from collections import OrderedDict
from cross3d.abstract.abstractscenemodel import AbstractSceneModel
resolutionAttr = 'resolution'
#------------------------------------------------------------------------
class MayaSceneModel... | blurstudio/cross3d | cross3d/maya/mayascenemodel.py | Python | mit | 17,183 |
from annoying.decorators import ajax_request, render_to
from blogs.views import blog_list
from django.db.models import Count
from django.http import HttpResponseRedirect, HttpResponseBadRequest
from snipts.utils import get_lexers_list
from taggit.models import Tag
@render_to('homepage.html')
def homepage(request):
... | nicksergeant/snipt | views.py | Python | mit | 1,815 |
#!/usr/bin/env python
# Jonas Schnelli, 2013
# make sure the Digitalgold-Qt.app contains the right plist (including the right version)
# fix made because of serval bugs in Qt mac deployment (https://bugreports.qt-project.org/browse/QTBUG-21267)
from string import Template
from datetime import date
bitcoinDir = "./";
... | Userperson321/DigitalGold | share/qt/clean_mac_info_plist.py | Python | mit | 903 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from apps.decorators import on_command
from apps.slackutils import isNumber
from time import localtime, strftime
import json
CACHE_DEFAULT_URL = './apps/memo_cache/memo_cache.json'
@on_command(['!메모삭제', '!ㅁㅁㅅㅈ', '!aatw'])
def run(robot, channel, tokens, ... | dgu-dna/DNA-Bot | apps/delete_memo.py | Python | mit | 1,080 |
"""SoCo (Sonos Controller) is a simple library to control Sonos speakers."""
# There is no need for all strings here to be unicode, and Py2 cannot import
# modules with unicode names so do not use from __future__ import
# unicode_literals
# https://github.com/SoCo/SoCo/issues/98
#
import logging
from .core import S... | petteraas/SoCo | soco/__init__.py | Python | mit | 1,156 |
# -*- encoding: utf-8 -*-
"""
Групповое присваивание
"""
v = ('a', 'b', 'e')
(x, y, z) = v
print x
print y
print z
| h4/fuit-webdev | examples/lesson2/3.1/2.2.4.py | Python | mit | 180 |
# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-10-12 07:26
from __future__ import unicode_literals
from django.db import migrations
postgres_view_create = """
CREATE OR REPLACE VIEW all_records AS
SELECT records.extent::text AS extent, records.api_id, records.identifier, records.language, record... | geometalab/G4SE-Compass | compass-api/G4SE/api/migrations/0009_drop_obsolete_view_20161012_0726.py | Python | mit | 2,178 |
from fuzzysearch.common import Match
from fuzzysearch.compat import xrange
from fuzzysearch.search_exact import search_exact
__all__ = ['find_near_matches_levenshtein_ngrams']
def _expand(subsequence, sequence, max_l_dist):
"""Expand a partial match of a Levenstein search.
An expansion must begin at the be... | taleinat/fuzzysearch | src/fuzzysearch/levenshtein_ngram.py | Python | mit | 7,129 |
import sys
from ctypes import *
sys.path.insert(0,'..')
import pymunk
sendbody_lib = windll.LoadLibrary("sendbody.dll")
cpBody = pymunk._chipmunk.cpBody
mass_sum = sendbody_lib.mass_sum
mass_sum.restype = c_double
mass_sum.argtypes = [c_int, POINTER(POINTER(cpBody))]
b1 = pymunk.Body(1, 1)
b2 = py... | viblo/pymunk | dump/sendbody.py | Python | mit | 475 |
from datetime import date
from monthdelta import MonthDelta as monthdelta
from optparse import make_option
from django.core.management.base import NoArgsCommand, BaseCommand
import dateutil.parser
from django_pjm import models
class Command(BaseCommand):
help = "Imports PJM load values."
args = ''
opti... | chrisspen/django-pjm | django_pjm/management/commands/import_pjm_loads.py | Python | mit | 1,807 |
#example
from kivy.base import runTouchApp
from kivy.lang import Builder
from kivy.garden.light_indicator import Light_indicator
from kivy.uix.button import Button
# LOAD KV UIX
runTouchApp(Builder.load_file('example.kv'))
| CAES-Python/CAES_Kivy_Garden | garden.light_indicator/example.py | Python | mit | 229 |
from slacker.postpone import Slacker
| kmike/tornado-slacker | slacker/__init__.py | Python | mit | 37 |
from Constants import *
from LoewnerRunFactory import LoewnerRunFactory
from prompt_toolkit import PromptSession
from os import popen
from numpy import arange, linspace
from InterfaceMode import *
class CommandLineInterface:
def __init__(self):
# Create a dictionary of input-function pairs
self.b... | ucapdak/loewner | main/PythonTools/Interface.py | Python | mit | 7,161 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
def swap_elements(_list, to_index, from_index):
_list[to_index], _list[from_index] = _list[from_index], _list[to_index]
def selection_sort(_list):
_list = _list[:]
list_length = len(_list)
for i in range(list_length):
least = i
for j in range... | Fe-Nik-S/Examples | python/algorithms/sorting/algorithms.py | Python | mit | 719 |
from flask import Flask, jsonify
from backend.settings import ProdConfig
from backend.api import api
from backend.extensions import mail, cors
def create_app(config_object=ProdConfig):
app = Flask(__name__)
app.config.from_object(config_object)
register_extensions(app)
register_blueprints(app)
ret... | TornikeNatsvlishvili/writing.skivri.ge | backend/backend/app.py | Python | mit | 502 |
# Function displays the hand of a player
import sys
import os
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
####################### MODULE VARIABLES ###################################
this = sys.modules[__name__]
this.parDir = os.path.abspath(os.pardir)
this.imgPath = os.path.join(this.parDir,"img... | matteobe/ChinesePoker | src/displayGame.py | Python | mit | 1,149 |
#!../../../../virtualenv/bin/python3
# -*- coding: utf-8 -*-
# NB: The shebang line above assumes you've installed a python virtual environment alongside your working copy of the
# <4most-4gp-scripts> git repository. It also only works if you invoke this python script from the directory where it
# is located. If these... | dcf21/4most-4gp-scripts | src/scripts/test_cannon/merge_cannon_runs.py | Python | mit | 7,641 |
class EventHook(object):
"""
Basic "event system" from:
http://www.voidspace.org.uk/python/weblog/arch_d7_2007_02_03.shtml#e616
"""
def __init__(self):
self.__handlers = []
def __iadd__(self, handler):
self.__handlers.append(handler)
return self
def __is... | fugwenna/bunkbot | src/core/event_hook.py | Python | mit | 537 |
"""
These Meta-Features apply an aggregate function to
:class:`~revscoring.Datasource` that return lists of values.
.. autoclass revscoring.features.meta.aggregators.sum
.. autoclass revscoring.features.meta.aggregators.len
.. autoclass revscoring.features.meta.aggregators.max
.. autoclass revscoring.features.meta.... | yafeunteun/wikipedia-spam-classifier | revscoring/revscoring/features/meta/aggregators.py | Python | mit | 2,017 |
"""Project metadata
"""
__title__ = 'Flask-AutoFixture'
__summary__ = 'Flask extension for recording JSON fixtures right from your test suite'
__url__ = 'https://github.com/janukobytsch/flask-autofixture'
__version__ = '0.2.3'
__install_requires__ = ['flask']
__tests_require__ = []
__author__ = 'Janusch Jacoby'
__e... | janukobytsch/flask-autofixture | flask_autofixture/__meta__.py | Python | mit | 382 |
import os
def root_dir():
"""
:return: root folder path
"""
return os.path.dirname(os.path.abspath(__file__))
def db_path(db_name):
if db_name == 'forecast':
return os.path.join(root_dir(), "data", "forecast.sqlite")
else:
return None
| JavierGarciaD/banking | definitions.py | Python | mit | 279 |
"""
The MIT License (MIT)
Copyright (c) 2014 - 2015 Jos "Zarthus" Ahrens and contributors
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 rig... | Zarthus/Reconcile | modules/topic.py | Python | mit | 2,286 |
from setuptools import setup, find_packages
import re
import os
cwd = os.path.dirname(os.path.abspath(__file__))
# obtain version
with open(os.path.join(cwd, "screenconnect", "__init__.py")) as f:
version = re.search(r"__version__\s+=\s+\"(.*)\"", f.read()).group(1)
# obtain long description (readme file)
wit... | jacobeturpin/python-screenconnect | setup.py | Python | mit | 1,497 |
from flask import Blueprint, render_template, request, make_response, jsonify
import os
import vayu.core.local_utils as lutils
import vayu.core.fabric_scripts.utils as futils
from vayu.core.constants.model import machine_info
from vayu.core.VayuException import VayuException
import vayu.core.constants.local as constant... | akshayarora2009/vayu | vayu/routes/projects.py | Python | mit | 7,845 |
color = [
'#6699cc',
'#66cc99',
'#9966cc',
'#99cc66',
'#cc6699',
'#cc9966',
'#99ccff',
'#99ffcc',
'#ccff99',
'#cc99ff',
'#ff99cc',
'#ffcc99',
]
def safe(name):
return re.sub(r'[/.:]', '_', name)
| ktonon/GameSoup | script/common.py | Python | mit | 248 |
import networkx as nx
import numpy as np
import igraph
import config
def correctLastCharCR(inText):#
""" if the last letter of the nick is '\\' replace it by 'CR'
for example rohan\ becomes rohanCR
to avoid complications in nx because of the special char '\\'
Args:
inText (str): input ... | rohangoel96/IRCLogParser | IRCLogParser/lib/util.py | Python | mit | 6,615 |
import collections
import numpy as np
import theano
import theano.tensor as TT
import rllab.misc.logger as logger
from rllab.algos.batch_polopt import BatchPolopt, BatchSampler
from rllab.algos.npo import NPO
from rllab.misc import ext
from rllab.misc.overrides import overrides
from rllab.sampler import parallel_samp... | florensacc/snn4hrl | algos/npo_snn_rewards.py | Python | mit | 16,007 |
""" Handlers for sequencing project information.
"""
import json
import string
import traceback
import tornado.web
import dateutil.parser
import datetime
import requests
import re
import paramiko
import base64
import urllib
import os
import logging
from itertools import ifilter
from collections import defaultdict
fr... | kate-v-stepanova/genomics-status | status/projects.py | Python | mit | 36,140 |
import itertools, sys
from pycket import config
from pycket import values
from pycket import vector as values_vector
from pycket.arity import Arity
from pycket.base import SingleResultMixin, UnhashableType
from pycket.cont import continuation, label
from pycket.error import SchemeException
from pycket.prims.expose imp... | pycket/pycket | pycket/values_struct.py | Python | mit | 55,181 |
#
# This file is part of m.css.
#
# Copyright © 2017, 2018, 2019, 2020, 2021, 2022
# Vladimír Vondruš <mosra@centrum.cz>
#
# 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 Softwar... | mosra/m.css | plugins/m/test/test_gl.py | Python | mit | 1,575 |
#!/usr/bin/env python
# Copyright (c) 2005 Gavin E. Crooks <gec@threeplusone.com>
#
# This software is distributed under the MIT Open Source License.
# <http://www.opensource.org/licenses/mit-license.html>
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and as... | go-bears/Final-Project | weblogo-3.4_rd/corebio/seq_io/intelligenetics_io.py | Python | mit | 6,081 |
# -*- coding: utf-8 -*-
# python-holidays
# ---------------
# A fast, efficient Python library for generating country, province and state
# specific sets of holidays on the fly. It aims to make determining whether a
# specific date is a holiday as fast and flexible as possible.
#
# Authors: dr-prodigy <maurizio.... | ryanss/holidays.py | test/countries/test_nicaragua.py | Python | mit | 1,698 |
import json
import os
import re
from codecs import open as open_n_decode
from json_tools import field_by_path, list_field_paths, prepare
# 网上抄的函数,用来合成json,结果还算可靠尼玛呢坑死我了
def add_value(dict_obj, path, value):
obj = dict_obj
for i, v in enumerate(path):
if i + 1 == len(path):
if not isinstan... | ProjectSky/FrackinUniverse-sChinese-Project | script/tools/patch_tool.py | Python | mit | 6,836 |
from urllib2 import Request, urlopen, URLError
import json
print("Test")
class api():
def __init__(self):
print("test1")
def GetTopStories(self):
try:
stories = self.GetURL('https://hacker-news.firebaseio.com/v0/topstories.json')
return stories
except URLError... | OompahLoompah/HackerWatch | HackerWatch/api.py | Python | mit | 1,718 |
# -*- coding: utf-8 -*-
"""
Created on Tue Jun 28 13:18:34 2016
@author: okada
"""
import unittest
import os
import sys
import test_utils
import subprocess
class TestSet(unittest.TestCase):
CURRENT = os.path.abspath(os.path.dirname(__file__) + "/../")
dataset = CURRENT + "/dataset/qc/"
REF = CURRENT + "... | Genomon-Project/paplot | tests/python/test_qc.py | Python | mit | 8,792 |
"""
Interact with the world:
- swing the arm, sneak, sprint, jump with a horse, leave the bed
- look around
- dig/place/use blocks
- use the held (active) item
- use/attack entities
- steer vehicles
- edit and sign books
By default, the client sends swing and look packets like the vanilla client.
This can be disabled ... | luken/SpockBot | spockbot/plugins/helpers/interact.py | Python | mit | 9,523 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2016 Jérémie DECOCK (http://www.jdhp.org)
# 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 witho... | jeremiedecock/snippets | python/tkinter/python3/animation_canvas_update_shapes_instances_coords.py | Python | mit | 2,095 |
"""
The Plaid API
The Plaid REST API. Please see https://plaid.com/docs/api for more details. # noqa: E501
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from plaid.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal... | plaid/plaid-python | plaid/model/link_token_create_request_update.py | Python | mit | 6,717 |
#!/usr/bin/env python3
"""Play a web stream.
ffmpeg-python (https://github.com/kkroening/ffmpeg-python) has to be installed.
If you don't know a stream URL, try http://icecast.spc.org:8000/longplayer
(see https://longplayer.org/ for a description).
"""
import argparse
import queue
import sys
import ffmpeg
import so... | spatialaudio/python-sounddevice | examples/play_stream.py | Python | mit | 3,596 |
__author__ = 'mori.yuichiro'
import unittest
import os
from flock import SimpleFileLock
class SimpleFileLockTest(unittest.TestCase):
def setup(self):
pass
def teardown(self):
pass
def test_lock(self):
path = 'test/test_lock'
a_lock = SimpleFileLock(path)
b_loc... | ymorired/s4backup | test/flock_test.py | Python | mit | 585 |
import os
from django.conf import settings
from django.conf.urls import url
from . import views
app_name = 'url_shortener'
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^(?P<alias>[a-zA-Z0-9-_]+)$', views.redirect, name='alias'),
url(r'^(?P<alias>[a-zA-Z0-9-_]+)(?P<extra>/.*)$', views.redi... | smtchahal/url-shortener | url_shortener/urls.py | Python | mit | 655 |
#!/usr/bin/env python
import ConfigParser
class ConfigDictionary:
def __init__(self, configfile='./etc/example.ini'):
self.localconfig = ConfigParser.RawConfigParser()
self.localconfig.read(configfile)
self.router_ip_dict = {}
self.router_loc_dict = {}
router_items = self... | job/pypeer | lib/pypeer/ConfigDictionary.py | Python | mit | 1,699 |
from SimpleCV import ImageSet
img_set = ImageSet(".")
for img in img_set:
oldname = img.filename
newname = oldname[0:-3] + 'jpg'
print 'Converting ' + oldname + ' to ' + newname
img.save(newname)
| vizcacha/practicalcv | chapter3/converting_set.py | Python | mit | 214 |
# -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.binance import binance
class binancecoinm(binance):
def describe(self):
return self.deep_extend(super(binancecoinm... | ccxt/ccxt | python/ccxt/binancecoinm.py | Python | mit | 1,253 |
#!/usr/bin/env python
#
# Author: Veronica G. Vergara L.
#
#
from .scheduler_factory import SchedulerFactory
from .jobLauncher_factory import JobLauncherFactory
from abc import abstractmethod, ABCMeta
import os
import shutil
class BaseMachine(metaclass=ABCMeta):
""" BaseMachine represents a compute resourc... | verolero86/ooh-py | base_machine.py | Python | mit | 7,770 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
PHOTOMETRYDEMO - model.py
the data model
Created on Tue Sep 23 12:09:45 2014
@author: rafik
"""
import os
import math
import numpy as np
import scipy as sp
import scipy.ndimage.interpolation
import pyfits
class Model(object):
def __init__(self):
self... | RafiKueng/SteMM | model.py | Python | mit | 12,007 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
####################################################################################################################################################################################################################################
############################################... | dimtion/jml | outputFiles/statistics/archives/ourIA/improved_closest_v2.py/0.6/10/player1.py | Python | mit | 11,253 |
# Copyright (c) 2013-2021 khal contributors
#
# 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, publi... | pimutils/khal | khal/settings/utils.py | Python | mit | 8,737 |
def es_vocal(letra):
if letra in 'aeiou':
return True
else:
return False
def contar_vocales_y_consonantes(palabra):
cuenta_vocal = 0
cuenta_consonante = 0
for letra in palabra:
if es_vocal(letra):
cuenta_vocal += 1
else:
cuenta_consonante += 1
return (cuenta_vocal, cuenta_consonante)
palabra = raw... | csaldias/python-usm | Ejercicios progra.usm.cl/Parte 2/7- Procesamiento de Texto/vocales_consonantes.py | Python | mit | 466 |
import logging
import time
import requests
__author__ = "Mark Ruys"
__copyright__ = "Copyright 2017, Mark Ruys"
__license__ = "MIT"
__email__ = "mark@paracas.nl"
class PVOutputApi:
def __init__(self, system_id, api_key):
self.m_system_id = system_id
self.m_api_key = api_key
def add_status(se... | markruys/gw2pvo | gw2pvo/pvo_api.py | Python | mit | 3,200 |
# coding: utf-8
from websocket import create_connection
def ws_handler():
ws = create_connection("ws://localhost:8000/echo")
try:
# ws.send("Hello, world")
while 1:
result = ws.recv()
print(result)
except:
pass
finally:
ws.close()
# with crea... | fpagyu/glory | pi/client.py | Python | mit | 500 |
# -*- coding: utf-8 -*-
"""
Created on Tue Jul 07 13:58:49 2015
@author: Wasit
"""
import serial
import re
import datetime
#ser = serial.Serial('/dev/tty.usbserial', 9600)
#ser = serial.Serial('COM7', 9600)
#ser = serial.Serial(0) # open first serial port
ser=None
for i in xrange(10):
try:
ser = serial.Se... | wasit7/tutorials | arduino_python/02_python_serial/readUno.py | Python | mit | 669 |
from django.test import TestCase
from django.contrib.auth.models import Permission, User
from django.core.urlresolvers import reverse
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from getyourdata.te... | sakset/getyourdata | getyourdata/organization/tests.py | Python | mit | 28,360 |
# pylint: disable=I0011,C0301
from __future__ import absolute_import, unicode_literals
import os
from setuptools import find_packages, setup
from namespaced_session import __version__
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
README = readme.read()
# allow setup.py to be run fr... | ckot/django-namespaced-session | setup.py | Python | mit | 1,469 |
# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-05-08 21:17
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cms', '0003_auto_20160508_2115'),
]
operations = [
migrations.AlterField(
... | porimol/django-blog | cms/migrations/0004_auto_20160508_2117.py | Python | mit | 468 |
#
#
# bignum.py
#
# This file is copied from python-deuscoinlib.
#
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
"""Bignum routines"""
from __future__ import absolute_import, division, print_function, unicode_literals
im... | deuscoin-org/deuscoin-core | qa/rpc-tests/test_framework/bignum.py | Python | mit | 1,997 |
# -*- coding: utf-8 -*-
# pylint: skip-file
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ----------------------------------------... | mitdbg/modeldb | client/verta/docs/conf.py | Python | mit | 6,368 |
import os.path
import json
class Tag:
def __init__(self, tag, title, icon):
self.tag = tag
self.title = title
self.icon = icon
class SiteConfig:
def __init__(self, site_dir):
self.site_dir = site_dir
config_file_name = os.path.join(self.site_dir, "config.js")
if not os.path.exists(confi... | andrewstephens75/gensite | gensite/siteconfig.py | Python | mit | 1,317 |
import _plotly_utils.basevalidators
class ShowlegendValidator(_plotly_utils.basevalidators.BooleanValidator):
def __init__(self, plotly_name="showlegend", parent_name="scattermapbox", **kwargs):
super(ShowlegendValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_... | plotly/plotly.py | packages/python/plotly/plotly/validators/scattermapbox/_showlegend.py | Python | mit | 413 |
# datasets_handler.py
# dataset handling file
import pandas as pd
from .utils import html2text
from .locate_datasets import __items_dict, __docs_dict, __get_data_folder_path
items = __items_dict()
docs = __docs_dict()
# make dataframe layout (of __datasets_desc()) terminal-friendly
pd.set_option('display.max_rows', ... | iamaziz/PyDataset | pydataset/datasets_handler.py | Python | mit | 1,747 |
import time, types, os, sys, signal
import multiprocessing
"""
This class is simple enough to allow workers which take incomming log lines and do things with them.
I really dont know what people will want to do with there logs and how they will want to output them
but this is where they will be able to control the out... | wojons/transcribe | helpers/workerBase.py | Python | mit | 4,287 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Scan all relayr resources of a given user via the relayr API.
This should be useful for finding out IDs for all devices of your
account, see which devices are connected to which apps, or which
channels are open on a device, etc.
All that is needed is a relayr access ... | relayr/python-sdk | demos/relayr_inventory.py | Python | mit | 4,257 |
#!/usr/bin/env python
import urllib
import urllib2
import json
import hashlib
import datetime
from collections import OrderedDict
AUTH_REQUIRETOKEN = "/auth/requiretoken"
BASEURL = "http://api.shapelink.com"
class ShapelinkException( Exception ):
pass
SHAPELINK_METHODS = {
'get_token' : {
're... | peterstark72/shapelink | shapelink.py | Python | mit | 7,087 |
"""Signal handling for core app."""
from __future__ import absolute_import
import logging
from corsheaders import signals
from django.dispatch import Signal
from django.db.models import Q
from future.backports.urllib.parse import urlparse
from readthedocs.projects.models import Project, Domain
log = logging.getLo... | pombredanne/readthedocs.org | readthedocs/core/signals.py | Python | mit | 1,987 |
#!/usr/bin/env python3
#import pype
import sys
from pype.pipeline import *
for fname in sys.argv[1:]:
Pipeline(source=fname)
| 207leftovers/cs207project | pype/driver.py | Python | mit | 130 |
from axiom.dependency import installOn
from axiom.scheduler import SubScheduler
from xquotient.mimestorage import IncomingMIMEMessageStorer
from axiom.test.historic.stubloader import saveStub
msg = """\
Received: from psmtp.com ([64.18.1.159] helo=psmtp.com)
by divmod.com with ESMTP (Quotient beta 28 (0.9.2+bu... | twisted/quotient | xquotient/test/historic/stub_message5to6.py | Python | mit | 2,332 |
from django.conf.urls import patterns, include, url
from django.contrib import admin
from application.crud import views
urlpatterns = patterns(
'',
url(r'^admin/', include(admin.site.urls)),
url(r'^_ah/', include('djangae.urls')),
url(r'^$', views.ItemCreateView.as_view(), name='index'),
)
| davide-ceretti/DEPRECATED-googleappengine-djangae-skeleton | application/application/urls.py | Python | mit | 309 |
import os
import sys
import django
from django.conf import settings
def runtests():
settings_file = 'django_ethereum_events.settings.test'
if not settings.configured:
os.environ.setdefault('DJANGO_SETTINGS_MODULE', settings_file)
django.setup()
from django.test.runner import DiscoverRunner
... | artemistomaras/django-ethereum-events | runtests.py | Python | mit | 570 |
from django.db.backends.postgresql.creation import * # NOQA
| ringly/django-postgres-dbdefaults | postgresql_dbdefaults/creation.py | Python | mit | 61 |
from db import get_engines,get_sessions,Song,Track,Note
from iter import TimeIterator
from utils import Counter
from sqlalchemy.orm import sessionmaker
from preference_rules import *
import music21,sys
from optparse import OptionParser
from multiprocessing import Process,Queue
class ChordSpan(object):
"""
A ... | jasonsbrooks/ARTIST | src/artist_generator/analyze/chords.py | Python | mit | 10,666 |
# 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... | rwl/PyCIM | CIM14/IEC61970/Protection/SynchrocheckRelay.py | Python | mit | 2,666 |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | Azure/azure-sdk-for-python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/operations/_snapshots_operations.py | Python | mit | 46,204 |