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
# Test which PDB entries error on PDB/mmCIF parsers # Writes output to a file labelled with the week import os from datetime import datetime from math import ceil from Bio.PDB import PDBList from Bio.PDB.PDBParser import PDBParser from Bio.PDB.MMCIFParser import MMCIFParser start = datetime.now() basedir = "." pdbl =...
jgreener64/pdb-benchmarks
checkwholepdb/checkwholepdb.py
Python
mit
2,107
import rosbag from sensor_msgs.msg import PointCloud2 def pc_filter(topic, datatype, md5sum, msg_def, header): if datatype == 'sensor_msgs/PointCloud2': return True return False class MockCamera(object): """A MockCamera reads saved point clouds. """ def __init__(self): pass ...
hcrlab/access_teleop
cse481wi18/perception/src/perception/mock_camera.py
Python
mit
858
''' Contains Vmstat() class Typical contents of vmstat file:: nr_free_pages 1757414 nr_inactive_anon 2604 nr_active_anon 528697 nr_inactive_file 841209 nr_active_file 382447 nr_unevictable 7836 nr_mlock 7837 nr_anon_pages 534070 nr_mapped 76013 nr_file_pages 1228693 nr_dirty 21 nr_...
eccles/lnxproc
lnxproc/vmstat.py
Python
mit
3,041
# -*- coding: utf-8 -*- """ The output tab for the main toolbar @author: Chris Scott """ from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals import os import shutil import subprocess import copy import logging import math import functools import dateti...
chrisdjscott/Atoman
atoman/gui/outputDialog.py
Python
mit
83,383
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. import logging import os import pkg_resources import sys import ConfigParser from paste.deploy import loadapp, loadwsgi SERVER = loadwsgi.SERVER from gunicorn.app.base import Application fr...
pschanely/gunicorn
gunicorn/app/pasterapp.py
Python
mit
5,258
#!/usr/bin/env python from flask import Flask, jsonify, request, abort, render_template app = Flask(__name__) @app.route("/",methods=['GET']) def index(): if request.method == 'GET': return render_template('index.html') else: abort(400) @app.route("/devices",methods=['GET']) def devices(): if request.m...
mattiasgiese/squeezie
app/master.py
Python
mit
476
''' Stores syntax file from last activated view and reuses this for a new view. @author: Oktay Acikalin <ok@ryotic.de> @license: MIT (http://www.opensource.org/licenses/mit-license.php) @since: 2011-03-05 @todo: Remove odd workaround below when/if "on_deactivated", "on_new" and "on_activated" events get fire...
nashby/sublime_config
new_file_syntax.py
Python
mit
1,254
import numpy as np from Other_samples.testCases import * from Other_samples.Gradient_check.gc_utils import sigmoid, relu, dictionary_to_vector, vector_to_dictionary, \ gradients_to_vector def forward_propagation(x, theta): """ Implement the linear forward propagation (compute J) presented in Figure 1 (J(...
adexin/Python-Machine-Learning-Samples
Other_samples/Gradient_check/gradient_check.py
Python
mit
7,033
"""Axis class and associated.""" # --- import -------------------------------------------------------------------------------------- import re import numexpr import operator import functools import numpy as np from .. import exceptions as wt_exceptions from .. import kit as wt_kit from .. import units as wt_units...
wright-group/WrightTools
WrightTools/data/_axis.py
Python
mit
6,659
# -*- coding: utf-8 -*- # # Speedcurve.py documentation build configuration file, created by # sphinx-quickstart on Mon Nov 16 12:29:28 2015. # # 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....
itsmemattchung/speedcurve.py
docs/conf.py
Python
mit
9,566
import asyncio import collections import logging import aiohttp import typing from lbry import utils from lbry.conf import Config from lbry.extras import system_info ANALYTICS_ENDPOINT = 'https://api.segment.io/v1' ANALYTICS_TOKEN = 'Ax5LZzR1o3q3Z3WjATASDwR5rKyHH0qOIRIbLmMXn2H=' # Things We Track SERVER_STARTUP = 'Se...
lbryio/lbry
lbry/lbry/extras/daemon/analytics.py
Python
mit
8,491
"""KDE of Temps.""" import calendar from datetime import date, datetime import pandas as pd from pyiem.plot.util import fitbox from pyiem.plot import figure from pyiem.util import get_autoplot_context, get_sqlalchemy_conn from pyiem.exceptions import NoDataFound from matplotlib.ticker import MaxNLocator from scipy.sta...
akrherz/iem
htdocs/plotting/auto/scripts200/p215.py
Python
mit
7,271
from django.contrib import admin from pieces.models import ( PieceTag, Piece, Venue, Study, Keyword, PieceToStudyAssociation) # {{{ studies class KeywordInline(admin.TabularInline): model = Keyword extra = 10 class StudyAdmin(admin.ModelAdmin): list_display = ("id", "name", "st...
inducer/codery
pieces/admin.py
Python
mit
1,253
# Copyright (C) 2010-2013 Claudio Guarnieri. # Copyright (C) 2014-2016 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import os import logging import datetime import re import dateutil.parser from lib.cuckoo.common.abstrac...
mburakergenc/Malware-Detection-using-Machine-Learning
cuckoo/modules/processing/platform/linux.py
Python
mit
4,175
# coding=utf-8 """ An API used by the UI and RESTful API. """ from bson import ObjectId __author__ = 'tmetsch' import collections import json import pika import pika.exceptions as pikaex import uuid from suricate.data import object_store from suricate.data import streaming TEMPLATE = ''' % if len(error.strip()) >...
tmetsch/suricate
suricate/ui/api.py
Python
mit
13,237
# -*- coding: utf-8 -*- import vim import itertools as it from orgmode._vim import echom, ORGMODE, apply_count, repeat, realign_tags from orgmode import settings from orgmode.liborgmode.base import Direction from orgmode.menu import Submenu, ActionEntry from orgmode.keybinding import Keybinding, Plug from orgmode.exc...
lucianp/dotfiles
link/.vim/ftplugin/orgmode/plugins/Todo.py
Python
mit
12,249
import yaml import os from ..boids import Boids from nose.tools import assert_equal import random import numpy as np from unittest.mock import patch import unittest.mock as mock def test_Boids(): flock = Boids(boid_number=10,move_to_middle_strength=0.1,alert_distance=100,formation_flying_distance=900,formation_fly...
GarlandDA/bad-boids
bad_boids/test/test_boids.py
Python
mit
5,230
from django.conf.urls import url, include from django.contrib import admin from django.conf import settings from django.conf.urls.static import static from api.views import router urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^', include(router.urls)), url(r'^ui/', include('ui.urls', namespace...
TangentMicroServices/BuildService
buildservice/urls.py
Python
mit
697
# # $Id: build_ansi.py 9736 2011-06-20 16:49:22Z ahartvigsen $ # # Proprietary and confidential. # Copyright $Date:: 2011#$ Perfect Search Corporation. # All rights reserved. # import unittest, os, sys, StringIO from textui.prompt import * from nose.tools import istest, nottest from nose.plugins.attrib import...
perfectsearch/sandman
test/buildscripts/textui_prompt_test.py
Python
mit
6,007
import sys; import os sys.path.insert(0, os.path.abspath('..')) sys.path.insert(0, os.path.abspath('.')) from flask import Flask, render_template, request, redirect import subprocess from Utils import subprocess_helpers from Utils.DataSource import * app = Flask(__name__) dataSource = DataSource() def launch_prepr...
beallej/event-detection
WebApp/EventDetectionWeb.py
Python
mit
2,619
import pygame from pygame.locals import * import constants as c class Enemy: def __init__(self, x, y, health, movement_pattern, direction, img): self.x = x self.y = y self.health = health self.movement_pattern = movement_pattern self.direction = direction ...
naomi-/exploration
Enemy.py
Python
mit
1,023
import os from angular_flask import app from flask.ext.restless import APIManager from flask.ext.mongoengine import MongoEngine app.config["MONGODB_SETTINGS"] = {'DB':os.environ.get('MONGODB_DB'),"host":os.environ.get('MONGODB_URI')} mongo_db = MongoEngine(app) api_manager = APIManager(app)
ascension/angular-flask-mongo
angular_flask/core.py
Python
mit
298
import asyncio try: from unittest.mock import Mock, create_autospec except ImportError: from mock import Mock, create_autospec from uuid import uuid4 from functools import wraps from copy import copy from unittest import TestCase as unittestTestCase from zeroservices.exceptions import ServiceUnavailable from...
Lothiraldan/ZeroServices
tests/utils.py
Python
mit
3,193
""" The classes `Token` and `Nonterm` can be subclassed and enriched with docstrings indicating the intended grammar, and will then be used in the parsing as part of the abstract syntax tree that is constructed in the process. """ from __future__ import annotations class Symbol: pass class Nonterm(Symbol): ...
sprymix/parsing
parsing/ast.py
Python
mit
7,301
from distutils.dir_util import copy_tree, remove_tree import os import shutil def _copy_function(source, destination): print('Bootstrapping project at %s' % destination) copy_tree(source, destination) def create_app(): cwd = os.getcwd() game_logic_path = os.path.join(cwd, 'game_logic') game_app_...
kollad/turbo-ninja
tools/bootstrap.py
Python
mit
1,403
from tc_python.arule import ARule from t_core.messages import Packet from HA import HA from HAb import HAb from HTopClass2TableLHS import HTopClass2TableLHS from HTopClass2TableRHS import HTopClass2TableRHS r1 = ARule(HTopClass2TableLHS(), HTopClass2TableRHS()) p = Packet() p.graph = HA() p1 = r1.packet_in(p...
levilucio/SyVOLT
t_core/main.py
Python
mit
589
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import deserialize from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import InstanceResource from twilio.base...
tysonholub/twilio-python
twilio/rest/video/v1/room/room_participant/room_participant_subscribed_track.py
Python
mit
15,072
############################################################################### # Name: __init__.py # # Purpose: Put the src package in the Editra packages namespace # # Author: Cody Precord <cprecord@editra.org> ...
ktan2020/legacy-automation
win/Lib/site-packages/wx-3.0-msw/wx/tools/Editra/__init__.py
Python
mit
756
"""Interface to rpy2.glm Copyright 2012 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ import rpy2.robjects as robjects r = robjects.r def linear_model(model, print_flag=True): """Submits model to r.lm and returns the result.""" model = r(model) res = r.lm(model) if print...
MaciCrowell/TCGA_DataScience
glm.py
Python
mit
2,658
""" General functions for HTML manipulation, backported from Py3. Note that this uses Python 2.7 code with the corresponding Python 3 module names and locations. """ from __future__ import unicode_literals _escape_map = {ord('&'): '&amp;', ord('<'): '&lt;', ord('>'): '&gt;'} _escape_map_full = {ord('&'): '&amp;', or...
thonkify/thonkify
src/lib/future/backports/html/__init__.py
Python
mit
924
# ============================================================================= # Federal University of Rio Grande do Sul (UFRGS) # Connectionist Artificial Intelligence Laboratory (LIAC) # Renato de Pontes Pereira - renato.ppontes@gmail.com # ============================================================================...
renatopp/psi-robotics
psi/engine/camera.py
Python
mit
2,961
#! /usr/bin/python # Joe Deller 2014 # Using for loops # Level : Beginner # Uses : Libraries, variables, operators, loops # Loops are a very important part of programming # The for loop is a very common loop # It counts from a starting number to a finishing number # It normally counts up in ones, but you can count u...
joedeller/pymine
forloop.py
Python
mit
1,535
# import .1dslicefrom3d import artistools.makemodel.botyanski2017
lukeshingles/artistools
artistools/makemodel/__init__.py
Python
mit
65
from .Confusion_MI import* from .Cov_Mat import * from .SaveLoadModel import *
L-F-A/Machine-Learning
General/__init__.py
Python
mit
79
""" This is part of the MSS Python's module. Source: https://github.com/BoboTiG/python-mss """ import platform from typing import TYPE_CHECKING from .exception import ScreenShotError if TYPE_CHECKING: from typing import Any # noqa from .base import MSSBase # noqa def mss(**kwargs): # type: (Any) ->...
BoboTiG/python-mss
mss/factory.py
Python
mit
1,032
#!/usr/bin/env python # -*- coding: utf-8 -*- try: from functools import reduce # noqa except Exception: pass try: from .tornado_handler import TornadoHandler # noqa except ImportError: pass from .environmentdump import EnvironmentDump # noqa from .healthcheck import HealthCheck # noqa
ateliedocodigo/py-healthcheck
healthcheck/__init__.py
Python
mit
310
#!/usr/bin/env python3 import threading def worker(): print('new worker') for i in range(8): threading.Thread(target = worker).start()
dubrayn/dubrayn.github.io
examples/threading/example0.py
Python
mit
143
class Solution: def decodeString(self, s: str) -> str: St = [] num = 0 curr = '' for c in s: if c.isdigit(): num = num*10 + int(c) elif c == '[': St.append([num, curr]) num = 0 curr = '' ...
jiadaizhao/LeetCode
0301-0400/0394-Decode String/0394-Decode String.py
Python
mit
1,173
# Copyright (C) 2013-2015 MetaMorph Software, Inc # Permission is hereby granted, free of charge, to any person obtaining a # copy of this data, including any software or models in source or binary # form, as well as any drawings, specifications, and documentation # (collectively "the Data"), to deal in the Data ...
pombredanne/metamorphosys-desktop
metamorphosys/META/src/Python27Packages/py_modelica/py_modelica/modelica_simulation_tools/tool_base.py
Python
mit
12,494
# -*- coding: utf-8 -*- """ formlayout ========== Module creating Qt form dialogs/layouts to edit various type of parameters formlayout License Agreement (MIT License) ------------------------------------------ Copyright (c) 2009 Pierre Raybaut Permission is hereby granted, free of charge, to any person obtaining ...
chilleo/ALPHA
raxmlOutputWindows/matplotlibCustomBackend/customFormlayout.py
Python
mit
20,667
"""A parser for axfs file system images""" from stat import * import zlib from . import * from ..io import * from ..util import * AxfsHeader = Struct('AxfsHeader', [ ('magic', Struct.STR % 4), ('signature', Struct.STR % 16), ('digest', Struct.STR % 40), ('blockSize', Struct.INT32), ('files', Struct.INT64), ('s...
ma1co/fwtool.py
fwtool/archive/axfs.py
Python
mit
3,572
#from django.contrib import admin
wapcaplet/vittles
nutrition/admin.py
Python
mit
35
from rest_framework import status from rest_framework.reverse import reverse from rest_framework.test import APITestCase from restapi.models.web_radio import WebRadio class TestGetDetails(APITestCase): def setUp(self): super(TestGetDetails, self).setUp() self.webradio = WebRadio.objects.create(n...
Sispheor/piclodio3
back/tests/test_views/test_web_radio_views/test_get_details.py
Python
mit
785
# python3 import queue class Edge: def __init__(self, u, v, capacity): self.u = u self.v = v self.capacity = capacity self.flow = 0 # This class implements a bit unusual scheme for storing edges of the graph, # in order to retrieve the backward edge for a given edge quickly. clas...
oy-vey/algorithms-and-data-structures
5-AdvancedAlgorithmsAndComplexity/Week1/evacuation/evacuation.py
Python
mit
3,343
''' David Rodriguez Goal: Continuously looping while to perform valve actions at specified times, introduce substance at a specific ratio based on flow data, recording and saving flow data, and actuating a flush at a specified time. Inputs: A schedule of events based on entered times. Outputs: Sequence of e...
dotsonlab/AWSC-Toilet
flow.py
Python
mit
2,391
from .company import Company from .contact import Contact from .deal import Deal from .note import Note from .requester import Requester class AgileCRM: def __init__(self, domain, email, api_key): requester = Requester(domain, email, api_key) self.contact = Contact(requester=requester) se...
rahmonov/agile-crm-python
agilecrm/client.py
Python
mit
454
import re import datetime import logging log = logging.getLogger(__name__) class Marker(object): __slots__ = ['line_start', 'line_end', 'expires'] def __init__(self, lineno): self.line_start = lineno self.line_end = lineno self.expires = None def __str__(self): if self.l...
jimmyshen/sunset
sunset/parser.py
Python
mit
2,091
# -*- coding: utf-8 -*- """Qurawl Main""" #### from __future__ import absolute_import from __future__ import unicode_literals import itertools as it import random as rand import difflib as diff #### import common.debugit as debugit import qurawl.regparse as rp from qurawl.level import * from qurawl.items import * ...
yipyip/Qurawl
qurawl/qurawl.py
Python
mit
5,127
import _plotly_utils.basevalidators class NticksValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__( self, plotly_name="nticks", parent_name="funnel.marker.colorbar", **kwargs ): super(NticksValidator, self).__init__( plotly_name=plotly_name, parent_n...
plotly/plotly.py
packages/python/plotly/plotly/validators/funnel/marker/colorbar/_nticks.py
Python
mit
466
#------------------------------------------------------------------------------- # Name: presupuesto parcial#1 # Author: programar # # Creado: 12/11/2015 # Copyright: (c) programar 2015 # Licence: <your licence 1.1> #------------------------------------------------------------------------------- im...
rubbenrc/uip-prog3
parcial/presupuesto_parcial.py
Python
mit
2,452
# -*- coding: utf-8 -*- # # fmap documentation build configuration file, created by # sphinx-quickstart on Mon Apr 11 21:30:39 2016. # # 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. # # All ...
mbodenhamer/fmap
docs/conf.py
Python
mit
9,309
""" niascape.usecase.postcount 投稿件数ユースケース """ import niascape from niascape.repository import postcount from niascape.utility.database import get_db def day(option: dict) -> list: with get_db(niascape.ini['database']) as db: # type: ignore # XXX セクションぶっこむとmypyさんにおこられ 辞書化すべきか return postcount.day(db, **option) ...
ayziao/niascape
niascape/usecase/postcount.py
Python
mit
1,264
# Refer to the following link for help: # http://docs.gunicorn.org/en/latest/settings.html command = '/home/lucas/www/reddit.lucasou.com/reddit-env/bin/gunicorn' pythonpath = '/home/lucas/www/reddit.lucasou.com/reddit-env/flask_reddit' bind = '127.0.0.1:8040' workers = 1 user = 'lucas' accesslog = '/home/lucas/logs/red...
codelucas/flask_reddit
server/gunicorn_config.py
Python
mit
425
import sys, getopt import errno import os.path import epub import lxml from bs4 import BeautifulSoup class EPubToTxtParser: # Epub parsing specific code def get_linear_items_data( self, in_file_name ): book_items = [] book = epub.open_epub( in_file_name ) for item_id, linear in book.op...
jorisvanzundert/sfsf
sfsf/epub_to_txt_parser.py
Python
mit
3,042
import matplotlib.pyplot as plt import matplotlib.animation as animation import numpy as np # from sympy import * from src import jeffery_model as jm DoubleletStrength = np.array((1, 0, 0)) alpha = 1 B = np.array((0, 1, 0)) lbd = (alpha ** 2 - 1) / (alpha ** 2 + 1) x, y = np.meshgrid(np.linspace(-1, 1, 100), np.linspa...
pcmagic/stokes_flow
try_code/contourAnimation.py
Python
mit
1,468
""" Design a data structure that supports the following two operations: void addWord(word) bool search(word) search(word) can search a literal word or a regular expression string containing only letters a-z or .. A . means it can represent any one letter. For example: addWord("bad") addWord("dad") ...
ufjfeng/leetcode-jf-soln
python/211_add_and_search_word-data_structure_design.py
Python
mit
2,445
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Qcloud COS SDK for Python 3 documentation build configuration file, created by # cookiecutter pipproject # # 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 # autog...
su27/qcloud_cos_py3
docs/source/conf.py
Python
mit
9,669
import feedparser import logging from rss import sources from util import date, dict_tool, tags log = logging.getLogger('app') def parse_feed_by_name(name): feed_params = sources.get_source(name) if not feed_params: raise ValueError('There is no feed with name %s' % name) source_name = feed_par...
andre487/news487
collector/rss/reader.py
Python
mit
2,757
from setuptools import setup setup(name='pyyaxml', version='0.6.7', description='Python API to Yandex.XML', url='https://github.com/dbf256/py-ya-xml', author='Alexey Moskvin', author_email='dbf256@gmail.com', license='MIT', packages=['pyyaxml'], install_requires=[ ...
dbf256/py-ya-xml
setup.py
Python
mit
362
#! /usr/bin/python3 """ Broadcast a message, with or without a price. Multiple messages per block are allowed. Bets are be made on the 'timestamp' field, and not the block index. An address is a feed of broadcasts. Feeds may be locked with a broadcast whose text field is identical to ‘lock’ (case insensitive). Bets ...
Bluejudy/bluejudyd
lib/broadcast.py
Python
mit
13,387
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.test import TestCase, RequestFactory from django.contrib.auth import get_user_model, authenticate from django.contrib.auth.models import AnonymousUser import json import status from tiny_rest.views import APIView from tiny_rest.authorization ...
allisson/django-tiny-rest
tiny_rest/tests/test_authorization.py
Python
mit
3,377
# 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 ...
AutorestCI/azure-sdk-for-python
azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/operations/availability_sets_operations.py
Python
mit
17,248
# NOTE: This example uses the next generation Twilio helper library - for more # information on how to download and install this version, visit # https://www.twilio.com/docs/libraries/python import os from twilio.rest import Client # Your Account Sid and Auth Token from twilio.com/user/account # To set up environmenta...
TwilioDevEd/api-snippets
notifications/rest/credentials/update-credential/update-credential.7.x.py
Python
mit
707
print 'abc' + '123' print 'Hi' * 5
rahulbohra/Python-Basic
7_first-string-operators.py
Python
mit
35
import numpy as np import tensorflow as tf import os def get_inputs(split, config): split_dir = config['split_dir'] data_dir = config['data_dir'] dataset = config['dataset'] split_file = os.path.join(split_dir, dataset, split + '.lst') filename_queue = get_filename_queue(split_file, os.path.join(d...
LMescheder/AdversarialVariationalBayes
avb/inputs.py
Python
mit
4,913
# GONZO: A PYTHON SCRIPT TO RECORD PHP ERRORS INTO MONGO # Michael Vendivel - vendivel@gmail.com import subprocess import datetime from pymongo import MongoClient # where's the log file filename = '/path/to/php/logs.log' # set up mongo client client = MongoClient('mongo.server.address', 27017) # which DB db = clien...
mven/gonzo.py
gonzo.py
Python
mit
888
import os import pickle import numpy as np from tqdm import tqdm class SumTree: def __init__(self, capacity): self.capacity = capacity self.tree = np.zeros(2 * capacity - 1, dtype=np.float32) self.data = np.empty(capacity, dtype=object) self.head = 0 @property def total_p...
akshaykurmi/reinforcement-learning
atari_breakout/per.py
Python
mit
4,539
import sys import os import csv from datetime import datetime, timedelta import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from matplotlib.dates import drange from matplotlib.patches import Rectangle import scenario_factory # http://www.javascripter.net/faq/hextorgb.htm PRIM...
ambimanus/appsim
analyze-headless.py
Python
mit
16,543
#!/usr/bin/env python """ The MIT License (MIT) Copyright (c) 2017 LeanIX GmbH 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,...
leanix/leanix-sdk-python
src/leanix/models/ServiceHasResource.py
Python
mit
2,033
# Generated by Django 2.1.8 on 2019-04-05 07:11 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('mainapp', '0022_auto_20190404_1605'), ] operations = [ migrations.AlterField( model_name='historicalpaper', name='ref...
meine-stadt-transparent/meine-stadt-transparent
mainapp/migrations/0023_auto_20190405_0911.py
Python
mit
612
import sklearn.cross_validation as cv import sklearn.dummy as dummy from sklearn.mixture import GMM from sklearn.hmm import GMMHMM from sklearn import linear_model, naive_bayes import collections import itertools import pandas as pd from testResults import TestResults from counters import * import utils as utils cla...
phihes/sds-models
sdsModels/models.py
Python
mit
12,892
# -*- coding: utf-8 -*- from f6a_tw_crawler.constants import * import unittest import logging def setup(): pass def teardown(): pass
chhsiao1981/f6a_tw_crawler
tests/__init__.py
Python
mit
147
# 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/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/models/_models.py
Python
mit
674,347
# -*- coding: utf-8 -*- """ Plugins related to folders and paths """ from hyde.plugin import Plugin from hyde.fs import Folder class FlattenerPlugin(Plugin): """ The plugin class for flattening nested folders. """ def __init__(self, site): super(FlattenerPlugin, self).__init__(site) def b...
stiell/hyde
hyde/ext/plugins/folders.py
Python
mit
1,263
from django.db import models from django.contrib.auth.models import User class Post(models.Model): title = models.CharField(max_length=255) body = models.TextField() user = models.ForeignKey(User)
erkarl/browl-api
apps/posts/models.py
Python
mit
211
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('builds', '0010_merge'), ] operations = [ migrations.AlterField( model_name='project', name='approved...
frigg/frigg-hq
frigg/builds/migrations/0011_auto_20150223_0442.py
Python
mit
444
from kazoo.exceptions import NoNodeError from sys import maxsize from .mutex import Mutex from .internals import LockDriver from .utils import lazyproperty READ_LOCK_NAME = "__READ__" WRITE_LOCK_NAME = "__WRIT__" class _LockDriver(LockDriver): def sort_key(self, string, _lock_name): string = super(_LockD...
pseudomuto/kazurator
kazurator/read_write_lock.py
Python
mit
3,177
""" You are given an array of desired filenames in the order of their creation. Since two files cannot have equal names, the one which comes later will have an addition to its name in a form of (k), where k is the smallest positive integer such that the obtained name is not used yet. Return an array of names that will...
coingraham/codefights
python/fileNaming/fileNaming.py
Python
mit
1,136
from distutils.core import setup setup( name = "nip", version = "0.1a1", py_modules = [ "nip", ], scripts = [ "bin/nip", ], author = "Brian Rosner", author_email = "brosner@gmail.com", description = "nip is environment isolation and installation for Node.js", lo...
brosner/nip
setup.py
Python
mit
461
import unittest from allergies import Allergies # Python 2/3 compatibility if not hasattr(unittest.TestCase, 'assertCountEqual'): unittest.TestCase.assertCountEqual = unittest.TestCase.assertItemsEqual # Tests adapted from `problem-specifications//canonical-data.json` @ v1.0.0 class AllergiesTests(unittest.Tes...
pheanex/xpython
exercises/allergies/allergies_test.py
Python
mit
2,509
import numpy import argparse import time import mido import colorsys import gitgrid.gridcontroller import gitgrid.utils.utils args = gitgrid.utils.utils.controller_args() tmp = gitgrid.gridcontroller.create(args.controller, args.input, args.output) def toggle(x, y, Message): curr = tmp.lights[x, y, :] / 255. ...
RocketScienceAbteilung/git-grid
experiments/buttons.py
Python
mit
766
import RPi.GPIO as gpio from datetime import datetime import time import controller gpio.setmode(gpio.BOARD) # switch_pins = [10, 40, 38] switch = 10 gpio.setup(switch, gpio.OUT, initial=False) # gpio.setup(switch_pins, gpio.OUT, initial=False) def switch_on(): gpio.output(switch, True) print "Oven switched ON a...
emgreen33/easy_bake
oven.py
Python
mit
583
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: ai ts=4 sts=4 et sw=4 nu from __future__ import (unicode_literals, absolute_import, division, print_function) import logging from django.http import Http404 from django.shortcuts import render from django.contrib.auth.decorators import login...
yeleman/snisi
snisi_trachoma/views.py
Python
mit
6,715
import os import codecs, re, time, string, logging, math from operator import itemgetter from nltk import FreqDist from nltk.corpus import stopwords import textmining from scipy import spatial from . import filehandler def most_frequent_terms(*args): tdm = textmining.TermDocumentMatrix(simple_tokenize_remove_our_s...
c4fcm/DataBasic
databasic/logic/tfidfanalysis.py
Python
mit
4,459
#!/usr/bin/env python # Copyright (c) 2008 Aldo Cortesi # Copyright (c) 2011 Mounier Florian # Copyright (c) 2012 dmpayton # Copyright (c) 2014 Sean Vig # Copyright (c) 2014 roger # Copyright (c) 2014 Pedro Algarvio # Copyright (c) 2014-2015 Tycho Andersen # # Permission is hereby granted, free of charge, to any perso...
de-vri-es/qtile
setup.py
Python
mit
5,466
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ ('user', '0002_auto_20150703_0836'), ] operations = [ migrations.AlterField( mode...
28harishkumar/Social-website-django
user/migrations/0003_auto_20150703_0843.py
Python
mit
485
from django.db import models from django.contrib.postgres.fields.jsonb import JSONField class Supplier(models.Model): name = models.CharField(max_length=50) tax_id = models.CharField(max_length=10) def __str__(self): return self.name class Bargain(models.Model): sku = models.CharField(max_l...
sebastian-code/jsonb-test
jsonb/emporium/models.py
Python
mit
986
# !/usr/bin python """ # # data-collect.py contain the python program to gather Metrics from vROps. Before you run this script # set-config.py should be run once to set the environment # Author Sajal Debnath <sdebnath@vmware.com> # """ # Importing the Modules import nagini import requests #import pprint import json ...
sajaldebnath/vrops-metric-collection
metric-collection.py
Python
mit
4,525
from mapwidgets.widgets import GooglePointFieldWidget from miot.models import PointOfInterest, Page, Profile from django import forms class PointOfInterestForm(forms.ModelForm): '''The form for a point of interest.''' class Meta: model = PointOfInterest fields = ("name", "featured_image", "posi...
Ishydo/miot
miot/forms.py
Python
mit
791
from __future__ import absolute_import from werkzeug.exceptions import ServiceUnavailable, NotFound from r5d4.flask_redis import get_conf_db def publish_transaction(channel, tr_type, payload): conf_db = get_conf_db() if tr_type not in ["insert", "delete"]: raise ValueError("Unknown transaction type", ...
practo/r5d4
r5d4/publisher.py
Python
mit
1,023
import _plotly_utils.basevalidators class TicksuffixValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="ticksuffix", parent_name="densitymapbox.colorbar", **kwargs ): super(TicksuffixValidator, self).__init__( plotly_name=plotly_name, ...
plotly/python-api
packages/python/plotly/plotly/validators/densitymapbox/colorbar/_ticksuffix.py
Python
mit
485
# coding: utf-8 """ Utilities for dealing with text encodings """ #----------------------------------------------------------------------------- # Copyright (C) 2008-2012 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as part...
mattvonrocketstein/smash
smashlib/ipy3x/utils/encoding.py
Python
mit
2,881
import numpy as np import scipy.interpolate as interp import warnings from astropy.io import fits def concentration(radii, phot, eta_radius=0.2, eta_radius_factor=1.5, interp_kind='linear', add_zero=False): """ Calculates the concentration parameter C = 5 * log10(r_80 / r2_0) Inputs: radii -- 1d a...
astronomeralex/morphology-software
morphology.py
Python
mit
3,255
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Project.url' db.add_column(u'core_project', 'url', self.gf('django.db....
ngageoint/gamification-server
gamification/core/migrations/0007_auto__add_field_project_url.py
Python
mit
10,068
from django.contrib import admin from courses.models import Course, Instructor, Page, Enrollment class CourseAdmin(admin.ModelAdmin): list_display = ['title', 'instructor', 'language', 'popularity', 'is_public', 'deleted'] prepopulated_fields = { 'slug': ('title', ) } def queryset(self, request...
Uberlearner/uberlearner
uberlearner/courses/admin.py
Python
mit
848
"""JSON implementations of relationship searches.""" # pylint: disable=no-init # Numerous classes don't require __init__. # pylint: disable=too-many-public-methods,too-few-public-methods # Number of methods are defined in specification # pylint: disable=protected-access # Access to protected methods allowe...
mitsei/dlkit
dlkit/json_/relationship/searches.py
Python
mit
11,651
from staffjoy.resource import Resource class ChompTask(Resource): PATH = "internal/tasking/chomp/{schedule_id}" ENVELOPE = None ID_NAME = "schedule_id"
Staffjoy/client_python
staffjoy/resources/chomp_task.py
Python
mit
166
from ctypes import Structure, c_int16, c_uint16 class Filter(Structure): """ Represents a Fixture filter """ _fields_ = [("categoryBits", c_uint16), ("maskBits", c_uint16), ("groupIndex", c_int16)] def __init__(self, categoryBits=0x1, maskBits=0xFFFF...
cloew/NytramBox2D
nytram_box2d/engine/filter.py
Python
mit
503
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Category', fields=[ ('id', models.AutoField(pri...
sorz/isi
store/category/migrations/0001_initial.py
Python
mit
1,172
# -*- encoding: utf-8 -*- __author__ = 'ray' __date__ = '2/27/15' from flask import jsonify, abort from flask.views import MethodView from ..models import ThemeModel class ThemeView(MethodView): """ Theme View Retrieve description of a list of available themes. :param theme_model: A theme model that ...
Kotaimen/stonemason
stonemason/service/tileserver/themes/views.py
Python
mit
1,132