repo_name stringlengths 6 90 | path stringlengths 4 230 | copies stringlengths 1 4 | size stringlengths 4 7 | content stringlengths 734 985k | license stringclasses 15
values | hash int64 -9,223,303,126,770,100,000 9,223,233,360B | line_mean float64 3.79 99.6 | line_max int64 19 999 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 8.06 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
foolcage/fooltrader | fooltrader/api/esapi/esapi.py | 1 | 7447 | # -*- coding: utf-8 -*-
import math
from elasticsearch_dsl import Search
from fooltrader import es_client
from fooltrader.api.technical import to_security_item
from fooltrader.contract.data_contract import KDATA_STOCK_COL, KDATA_FUTURE_COL, KDATA_INDEX_COL, \
KDATA_COMMON_COL
from fooltrader.contract.es_contract ... | mit | 6,537,020,302,235,993,000 | 37.378238 | 119 | 0.611179 | false | 3.297863 | false | false | false |
Cisco-Talos/pyrebox | generic_unpacker/memory_dump.py | 2 | 7425 | # -------------------------------------------------------------------------------
#
# Copyright (C) 2018 Cisco Talos Security Intelligence and Research Group
#
# PyREBox: Python scriptable Reverse Engineering Sandbox
# Author: Xabier Ugarte-Pedrero
#
# This program is free software; you can redistribute it and/... | gpl-2.0 | 4,720,621,674,455,177,000 | 44 | 111 | 0.471111 | false | 4.827698 | false | false | false |
cyanfish/heltour | heltour/tournament/views.py | 1 | 104942 | from collections import defaultdict
from datetime import timedelta
from icalendar import Calendar, Event
import itertools
import json
import math
import re
import reversion
from .decorators import cached_as
from django.core.mail.message import EmailMessage
from django.db.models.query import Prefetch
from django.http.... | mit | -4,076,985,527,493,128,000 | 44.906387 | 164 | 0.552924 | false | 4.079854 | false | false | false |
WISVCH/szp4 | settings.py | 1 | 3505 | # Django settings for szp4 project.
import os
TEMPLATE_DEBUG = DEBUG = False
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
MANAGERS = ADMINS
SECRET_KEY = ''
# Local time zone for this installation. Choices can be found here:
# http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-T... | gpl-3.0 | 7,503,308,302,970,362,000 | 31.757009 | 94 | 0.734665 | false | 3.558376 | false | false | false |
sudhanshuptl/Machine-Learning | Kaggle/Titanic/MySVMPredicter.py | 1 | 4429 |
import csv
import numpy as np
from sklearn.svm import SVC
import datetime
import matplotlib.pyplot as plt
# Data Files
Test_file_name='test.csv'
Train_File_name='train.csv'
#Create Dataset
def parse_csv(datafile):
data=[]
with open(datafile,'rb') as sd:
r=csv.DictReader(sd)
for line in r:
... | gpl-2.0 | -5,512,432,004,022,041,000 | 26.509317 | 77 | 0.538496 | false | 3.457455 | false | false | false |
blooparksystems/website | website_seo_blog/models/website_blog.py | 1 | 6396 | # -*- coding: utf-8 -*-
##############################################################################
#
# Odoo, an open source suite of business apps
# This module copyright (C) 2015 bloopark systems (<http://bloopark.de>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... | agpl-3.0 | 846,086,995,318,537,900 | 34.731844 | 106 | 0.601001 | false | 3.807143 | false | false | false |
echinopsii/net.echinopsii.ariane.community.core.injector | messaging/src/test/resources/InjectorUIIntegrationTest.py | 1 | 8652 | import uuid
import pika
import json
from pprint import pprint
__author__ = 'mffrench'
class Requestor(object):
def __init__(self, connection_, requestQ_):
self.connection = connection_
self.channel = self.connection.channel()
self.requestQ = requestQ_
self.channel.queue_declare(qu... | agpl-3.0 | 6,587,681,071,784,369,000 | 50.505952 | 191 | 0.589806 | false | 4.041102 | false | false | false |
crf1111/Bio-Informatics-Learning | Bio-StrongHold/src/Finding_a_Protein_Motif.py | 1 | 1375 | # allows use of Python3.X print functionality
from __future__ import print_function
import re # for regex functions
import sys
import os
# need regex for N-glycosylation motif
# N{any but P}[S or T]{any but P}
# parentheses and '?=' allow for overlapping
motif = re.compile('(?=N[^P][ST][^P])')
# loop through protein... | mit | 7,214,292,008,074,038,000 | 29.577778 | 83 | 0.622545 | false | 3.345499 | false | false | false |
havrlant/fca-search | src/preprocess/file_handlers.py | 1 | 1291 | from other.constants import TEMP_FOLDER, PDFTOTEXT
from common.io import downloadFile, readfile
import xml.etree.ElementTree as etree
import os
from glob import glob
import shutil
from common.string import normalizePDF
class FileHandlers:
def PDF(self, url, enc = 'UTF-8'):
tempfile = TEMP_FOLDER + "temp."
pdfde... | bsd-2-clause | 6,148,717,976,200,704,000 | 24.84 | 70 | 0.669249 | false | 2.940774 | false | false | false |
openstack-packages/DLRN | dlrn/tests/test_user.py | 2 | 6374 | # -*- coding: utf-8 -*-
# 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, softw... | apache-2.0 | 6,416,193,748,017,277,000 | 36.494118 | 75 | 0.601977 | false | 3.682265 | true | false | false |
outini/python-pylls | setup.py | 1 | 2242 | #
# Cachet API python client and interface (python-pylls)
#
# Copyright (C) 2017 Denis Pompilio (jawa) <denis.pompilio@gmail.com>
#
# This file is part of python-pylls
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as p... | gpl-2.0 | 394,285,991,571,764,740 | 39.035714 | 79 | 0.619536 | false | 3.832479 | false | false | false |
BradNeuberg/cloudless | src/annotate/train/scripts/populate_db.py | 1 | 3401 | import argparse
import glob
import os
import shutil
from osgeo import gdal
from PIL import Image as pImage
import numpy as np
from django.apps import apps
from django.conf import settings
def import_images(dirname, chunk_size=256):
"""
Given a directory with a bunch of raw geotiffs in it,
cut them up in... | apache-2.0 | -1,917,378,989,271,464,700 | 32.019417 | 91 | 0.620994 | false | 3.621938 | false | false | false |
SpaceGroupUCL/qgisSpaceSyntaxToolkit | esstoolkit/external/networkx/classes/tests/test_graph.py | 1 | 26391 | import pickle
import gc
import networkx as nx
from networkx.testing.utils import (
assert_graphs_equal,
assert_edges_equal,
assert_nodes_equal,
)
import pytest
class BaseGraphTester:
""" Tests for data-structure independent graph class features."""
def test_contains(self):
G = self.K3
... | gpl-3.0 | 349,448,969,258,902,660 | 31.865504 | 88 | 0.485999 | false | 3.113982 | true | false | false |
huard/scipy-work | scipy/sparse/linalg/isolve/tests/test_iterative.py | 1 | 6137 | #!/usr/bin/env python
""" Test functions for the sparse.linalg.isolve module
"""
from numpy.testing import *
from numpy import zeros, ones, arange, array, abs, max
from scipy.linalg import norm
from scipy.sparse import spdiags, csr_matrix
from scipy.sparse.linalg.interface import LinearOperator
from scipy.sparse.lin... | bsd-3-clause | -1,551,695,358,209,006,600 | 29.685 | 122 | 0.533974 | false | 3.094806 | true | false | false |
aranchelk/headmouse | headmouse/output_drivers/arduino_serial.py | 1 | 2478 | #!/usr/bin/env python
#coding=utf8
'''
Write to stdin to serial
'''
from __future__ import print_function
import logging
import serial
import time
import sys, os
sys.path.append(os.path.dirname(os.path.realpath(__file__)) + "/..")
import util
import filters
logger = logging.getLogger(__name__)
SERIAL_COMMAND_BUFFER... | bsd-3-clause | -4,986,427,297,092,866,000 | 21.944444 | 76 | 0.576271 | false | 3.601744 | false | false | false |
IBM-Security/ibmsecurity | ibmsecurity/isam/base/sysaccount/groups.py | 1 | 2147 | import logging
import ibmsecurity.utilities.tools
import os.path
logger = logging.getLogger(__name__)
def get_all(isamAppliance, check_mode=False, force=False):
"""
Get information on existing groups
"""
return isamAppliance.invoke_get("Retrieving groups", "/sysaccount/groups/v1")
def get(isamAppli... | apache-2.0 | 4,807,412,656,502,291,000 | 27.25 | 104 | 0.614811 | false | 3.714533 | false | false | false |
infirit/blueman | blueman/gui/CommonUi.py | 2 | 2778 | from datetime import datetime
from gettext import gettext as _
from typing import Optional, overload, TYPE_CHECKING
from blueman.Constants import WEBSITE, VERSION
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk
if TYPE_CHECKING:
from typing_extensions import Literal
class ErrorDialog(G... | gpl-3.0 | -1,097,908,535,438,888,100 | 35.486842 | 118 | 0.618464 | false | 3.624837 | false | false | false |
intel-analytics/BigDL | pyspark/bigdl/nn/layer.py | 3 | 218997 | #
# Copyright 2016 The BigDL 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 law or agreed to in ... | apache-2.0 | 2,630,445,777,216,268,300 | 36.751595 | 329 | 0.569031 | false | 4.287082 | false | false | false |
robertdfrench/psychic-disco | psychic_disco/rest_resource.py | 1 | 2287 | import psychic_disco.api_gateway_config as agc
from psychic_disco.rest_method import RestMethod
class RestResource(object):
def __init__(self, path):
self.path = path
self.aws_id = None
self.api = None
self.methods = dict()
self.console = agc.console
@property
def ... | mit | -8,626,688,205,763,188,000 | 31.211268 | 77 | 0.559248 | false | 3.963605 | false | false | false |
willingc/vms | vms/shift/tests/test_shiftHours.py | 1 | 5687 | from django.contrib.staticfiles.testing import LiveServerTestCase
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
from pom.pages.completedShiftsPage import CompletedShiftsPage
from pom.pages.authenticationPage import AuthenticationPage
from shift.models import VolunteerSh... | gpl-2.0 | -5,841,099,310,031,428,000 | 39.333333 | 96 | 0.668191 | false | 3.638516 | true | false | false |
dermoth/gramps | gramps/gen/utils/string.py | 6 | 3017 | #
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2009 Gary Burton
# Copyright (C) 2011 Tim G L Lyons
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published ... | gpl-2.0 | -6,220,679,814,580,821,000 | 37.679487 | 79 | 0.581041 | false | 4.144231 | false | false | false |
a-slide/pycl | pycltools/pycltools.py | 1 | 91328 | # -*- coding: utf-8 -*-
# Strandard library imports
import os
import shutil
import sys
import gzip
import warnings
import time
import random
from collections import OrderedDict, namedtuple, defaultdict, Counter
from subprocess import Popen, PIPE
import bisect
import itertools
import zipfile
import tempfile
import glob... | gpl-3.0 | 3,303,549,552,781,433,300 | 30.394981 | 138 | 0.529191 | false | 3.995625 | false | false | false |
anryko/ansible | lib/ansible/modules/network/f5/bigip_device_traffic_group.py | 38 | 21569 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2017, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 | -8,097,240,518,862,735,000 | 31.096726 | 118 | 0.605638 | false | 4.148682 | false | false | false |
aartek/trikatuka-tool | User.py | 1 | 2433 | import webbrowser
import requests
from Playlist import Playlist
import AppContext
import uuid
__all__ = ['User']
class User:
def __init__(self):
self._set_initial_params()
def _set_initial_params(self):
self.access_token = None
self.user_id = None
self.name = None
self... | gpl-2.0 | 5,774,842,630,444,355,000 | 37.015625 | 241 | 0.628853 | false | 3.760433 | false | false | false |
balena/xray | test/scm/svn/framework.py | 1 | 1262 | from config import *
import subprocess, os, urllib
def _command(executable, *args):
params = [executable]+[a for a in args]
subprocess.check_call(params)
def svnadmin(*args):
_command('svnadmin', *args)
def svn(*args):
_command('svn', *args)
def rmdir_rf(dir):
subprocess.check_call... | gpl-2.0 | 2,690,685,639,711,401,500 | 25.434783 | 72 | 0.606973 | false | 3.365333 | false | false | false |
joeyli/qemu-acpitad | tests/qemu-iotests/qed.py | 248 | 7194 | #!/usr/bin/env python
#
# Tool to manipulate QED image files
#
# Copyright (C) 2010 IBM, Corp.
#
# Authors:
# Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
#
# This work is licensed under the terms of the GNU GPL, version 2 or later.
# See the COPYING file in the top-level directory.
import sys
import struct
import r... | gpl-2.0 | -498,082,471,374,941,800 | 29.612766 | 103 | 0.60759 | false | 3.098191 | false | false | false |
jlmdegoede/Invoicegen | invoicegen/settings.py | 1 | 4612 | """
Django settings for Invoicegen project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)... | gpl-3.0 | 5,627,933,352,203,788,000 | 26.295858 | 97 | 0.678664 | false | 3.408721 | false | false | false |
dankilman/pysource | pysource/client.py | 1 | 2392 | # Copyright 2014 Dan Kilman
#
# 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, softw... | apache-2.0 | -8,951,122,687,443,813,000 | 30.473684 | 74 | 0.676003 | false | 4.047377 | false | false | false |
Patreon/cartographer | cartographer/serializers/jsonapi_serializer.py | 1 | 8067 | import importlib
from collections import deque
from cartographer.utils.version import get_default_version, JSONAPIVersion
class JSONAPISerializer(object):
def resource_id(self):
"""Override this in a subclass to return a unique id string"""
raise NotImplementedError()
@classmethod
def re... | apache-2.0 | -1,657,397,850,117,270,300 | 33.622318 | 96 | 0.594645 | false | 4.293241 | false | false | false |
jotomicron/MOSSy | mossy/plugins/concept_comparers.py | 1 | 11720 | from mossy import sql, utils
from mossy.parse_config import plugin
def table_column_from_ic(ic):
sql.assert_identifier(ic)
if ic != "extrinsic":
table = "intrinsic_ic"
column = ic
else:
table = "extrinsic_ic"
column = "ic"
return table, column
class ArgSingl... | gpl-2.0 | -540,558,464,470,705,540 | 33.369501 | 80 | 0.550085 | false | 3.901465 | false | false | false |
MrKiven/REST_ARCH | rest_arch/skt/config.py | 1 | 6938 | # -*- coding: utf-8 -*-
import sys
import yaml
import logging
from .consts import (
ARCH_CONFIG_PATH,
APP_CONFIG_PATH,
APP_TYPE_BARE,
HUSKAR_CACHE_DIR,
DEFAULT_APP_PORT,
DEFAULT_WORKER_CLASS,
DEFAULT_WORKER_NUMBER_DEV,
DEFAULT_WORKER_NUMBER_PROD,
ENV_DEV
)
import rest_arch
from .ex... | mit | 6,746,746,111,900,326,000 | 24.985019 | 76 | 0.588354 | false | 3.720107 | true | false | false |
LudoSapiens/Dev | Tools/BS/BuildSystem/Defaults/Env.py | 1 | 2451 | # =============================================================================
# Copyright (c) 2006, Ludo Sapiens Inc.
# All rights reserved.
#
# These coded instructions, statements, and computer programs contain
# unpublished, proprietary information and are protected by Federal copyright
# law. They may not b... | mit | -6,716,483,127,064,432,000 | 37.904762 | 79 | 0.69849 | false | 4.277487 | false | false | false |
thekerrlab/netpyne | netpyne/analysis/traces.py | 1 | 16730 | """
analysis/spikes.py
Functions to plot and analyze traces-related results
Contributors: salvadordura@gmail.com
"""
from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals
from __future__ import absolute_import
from builtins import range
from builtins import str... | mit | -4,144,241,743,582,962,000 | 45.34349 | 153 | 0.502869 | false | 3.95228 | false | false | false |
FRC-RS/FRS | leaderboard/models.py | 1 | 3381 | from typing import List, Tuple, TypeVar, Dict
from django.db import models
from django_mysql.models import Model as MySqlModel
from polymorphic.models import PolymorphicModel
from TBAW.models import Team, ScoringModel2016, ScoringModel2015, RankingModel, Alliance, ScoringModel, Event, Match
Number = TypeVar('Number'... | mit | 6,259,083,881,579,435,000 | 32.81 | 116 | 0.62171 | false | 3.723568 | false | false | false |
skyfielders/python-skyfield | skyfield/data/iers.py | 1 | 2091 | """Parse data files from the International Earth Rotation Service.
See:
https://datacenter.iers.org/eop.php
ftp://cddis.gsfc.nasa.gov/pub/products/iers/readme.finals2000A
"""
import numpy as np
from ..constants import DAY_S
inf = float('inf')
# This regular expression must remain a plain string; attempting to
# com... | mit | -3,188,369,011,952,438,000 | 33.278689 | 72 | 0.625538 | false | 2.856557 | false | false | false |
coherence-project/Coherence | coherence/upnp/core/ssdp.py | 1 | 12293 | # Licensed under the MIT license
# http://opensource.org/licenses/mit-license.php
# Copyright 2005, Tim Potter <tpot@samba.org>
# Copyright 2006 John-Mark Gurney <gurney_j@resnet.uroegon.edu>
# Copyright (C) 2006 Fluendo, S.A. (www.fluendo.com).
# Copyright 2006,2007,2008,2009 Frank Scholz <coherence@beebits.net>
# Co... | mit | 7,454,950,417,682,753,000 | 38.783172 | 80 | 0.551045 | false | 3.959098 | false | false | false |
facoy/facoy | Evaluation/SEParser_soup.py | 1 | 7864 | # import Jsoup
from urllib import quote, quote_plus
#from org.jsoup import Jsoup
import requests
#from BeautifulSoup import BeautifulSoup
from bs4 import BeautifulSoup
from urlparse import urljoin
def html(html):
return [BeautifulSoup(html, "html.parser")]
class AbstractParser:
def __init__(self):
#self.url = u... | apache-2.0 | -8,991,019,506,875,609,000 | 28.901141 | 210 | 0.65412 | false | 2.890114 | false | false | false |
lock8/django-rest-framework-jwt-refresh-token | refreshtoken/serializers.py | 1 | 1782 | from django.utils.translation import ugettext as _
from rest_framework import exceptions, serializers
from .models import RefreshToken
class RefreshTokenSerializer(serializers.ModelSerializer):
"""
Serializer for refresh tokens (Not RefreshJWTToken)
"""
user = serializers.PrimaryKeyRelatedField(
... | mit | -8,216,683,518,976,734,000 | 32 | 78 | 0.654321 | false | 4.466165 | false | false | false |
atantet/ergoPack | example/numericalFP/vsNoise.py | 1 | 5900 | import os
import numpy as np
import matplotlib.pyplot as plt
import ergoPlot
# Get model
model = 'Hopf'
gam = 1.
beta = 0.5
epsRng = np.arange(.05, 2.05, .05)
#muRng = np.array([0., 5.])
muRng = np.array([0.])
# Grid definition
dim = 2
nx0 = 200
nSTD = 5
# Number of eigenvalues
nev = 21
#nev = 201
nevPlot = 6
# Dir... | gpl-3.0 | -4,215,769,241,259,390,000 | 37.562092 | 108 | 0.544237 | false | 2.710152 | false | false | false |
asamended/python-asamended | asamended/uscode/client.py | 1 | 3518 | import os
import urllib
import urlparse
import logging
import requests
from tater.utils import CachedAttr
from asamended.config import logging
from asamended.uscode.search import SearchResult
logging.basicConfig(level=logging.DEBUG)
class UserKeyRequired(Exception):
pass
class Client(object):
def __in... | bsd-3-clause | 5,735,651,366,240,734,000 | 30.702703 | 82 | 0.58158 | false | 3.891593 | false | false | false |
devlin85/p2pool | p2pool/bitcoin/networks/terracoin.py | 1 | 1118 | import os
import platform
from twisted.internet import defer
from .. import data, helper
from p2pool.util import pack
P2P_PREFIX = '42babe56'.decode('hex')
P2P_PORT = 13333
ADDRESS_VERSION = 0
RPC_PORT = 13332
RPC_CHECK = defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
'terracoinaddress' in (y... | gpl-3.0 | 1,171,865,793,624,958,000 | 38.928571 | 280 | 0.703041 | false | 2.934383 | false | true | false |
juliatem/aiohttp | tests/test_web_application.py | 1 | 5156 | import asyncio
from unittest import mock
import pytest
from aiohttp import helpers, log, web
from aiohttp.abc import AbstractRouter
def test_app_ctor(loop):
app = web.Application(loop=loop)
assert loop is app.loop
assert app.logger is log.web_logger
def test_app_call():
app = web.Application()
... | apache-2.0 | 6,870,678,680,033,439,000 | 23.093458 | 67 | 0.642164 | false | 3.560773 | true | false | false |
nhoffman/opiates | opiate/containers.py | 1 | 10617 | import sys
import pprint
from itertools import chain
from collections import OrderedDict
import logging
log = logging.getLogger(__name__)
from __init__ import CONTROL_NAMES, SAMPLE_PREP_NAMES
control_ids = set(i for i,n in CONTROL_NAMES)
outcomes = {True: 'ok', False: 'FAIL', None: '-'}
import calculations
from calc... | gpl-3.0 | -4,603,119,188,904,529,400 | 33.583062 | 116 | 0.577564 | false | 3.96009 | true | false | false |
chengdujin/newsman | newsman/watchdog/clean_memory.py | 1 | 3413 | #!/usr/bin/env python
#-*- coding: utf-8 -*-
"""
daily work, clean expired items and its place in queues in memory
"""
__author__ = 'chengdujin'
__contact__ = 'chengdujin@gmail.com'
__created__ = 'Aug. 22, 2013'
from bson.objectid import ObjectId
import cleaner
from newsman.config.settings import Collection, db
from ... | agpl-3.0 | -3,352,863,724,450,085,000 | 28.938596 | 72 | 0.528567 | false | 4.063095 | false | false | false |
david30907d/feedback_django | spirit/user/models.py | 6 | 2371 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
from django.contrib.auth.models import AbstractUser
from ..core.utils.timezone import TIME... | mit | 7,616,826,820,657,215,000 | 39.87931 | 103 | 0.648671 | false | 4.256732 | false | false | false |
c3nav/c3nav | src/c3nav/mapdata/render/engines/__init__.py | 1 | 1249 | from django.conf import settings
from django.core import checks
from c3nav.mapdata.render.engines.base import register_engine, get_engine, get_engine_filetypes # noqa
from c3nav.mapdata.render.engines.blender import BlenderEngine # noqa
from c3nav.mapdata.render.engines.openscadold import OldOpenSCADEngine # noqa
f... | apache-2.0 | 1,055,001,400,484,696,600 | 38.03125 | 103 | 0.730184 | false | 3.479109 | false | false | false |
jtoppins/beaker | Server/bkr/server/activity.py | 1 | 12561 |
# 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 Foundation; either version 2 of the License, or
# (at your option) any later version.
from sqlalchemy.orm import contains_eager
from flask import request, j... | gpl-2.0 | 8,340,313,542,460,697,000 | 40.04902 | 88 | 0.640315 | false | 4.072957 | false | false | false |
PrieureDeSion/intelligent-agents | Breakout.py | 1 | 4064 | #from __future__ import print_function
import gym
import numpy as np
import tensorflow as tf
import tensorflow.contrib.slim as slim
import tflearn
import matplotlib.pyplot as plt
'''
Action Space is Discrete(4):
0 -
1 -
2 -
3 -
Observation Space is Box(210,160,3):
The screen is 210*160 pixels in size
The las... | gpl-3.0 | 4,420,712,462,823,794,700 | 31.007874 | 145 | 0.690699 | false | 2.878187 | false | false | false |
tiagofrepereira2012/bob.ip.base | bob/ip/base/test/test_gaussian.py | 2 | 3112 | #!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Laurent El Shafey <Laurent.El-Shafey@idiap.ch>
# Sun Jul 22 19:34:20 2012 +0200
#
# Copyright (C) 2011-2014 Idiap Research Institute, Martigny, Switzerland
"""Tests the Gaussian
"""
import numpy
import math
import nose.tools
import bob.ip.base
import bob.sp
im... | bsd-3-clause | -48,192,379,946,144,790 | 30.434343 | 138 | 0.648779 | false | 2.485623 | true | false | false |
atulmishra-one/repose-academy | gallery/views.py | 1 | 1577 | # -*- coding: utf-8 -*-
# Copyright (c) Zbigniew Siciarz 2012-2016.
from __future__ import unicode_literals
from django.views.generic import ListView, DetailView, MonthArchiveView
from .models import Gallery, Photo
class StaffAccessMixin(object):
"""
Allow staff members to see all galleries, including draf... | apache-2.0 | 3,797,252,458,790,639,600 | 25.728814 | 89 | 0.684211 | false | 3.592255 | false | false | false |
Brainiq7/Ananse | ananse_dl/extractor/ellentv.py | 22 | 2493 | # coding: utf-8
from __future__ import unicode_literals
import re
import json
from .common import InfoExtractor
from ..utils import (
ExtractorError,
parse_iso8601,
)
class EllenTVIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?ellentv\.com/videos/(?P<id>[a-z0-9_-]+)'
_TEST = {
'url': '... | unlicense | -5,369,487,841,315,199,000 | 30.556962 | 99 | 0.553149 | false | 3.355316 | false | false | false |
theetcher/fxpt | fxpt/fx_utils/message_box.py | 1 | 3681 | import sys
import traceback
from fxpt.qt.pyside import QtWidgets
DEFAULT_WIDTH = 500
BTN_OK = QtWidgets.QMessageBox.Ok
BTN_OPEN = QtWidgets.QMessageBox.Open
BTN_SAVE = QtWidgets.QMessageBox.Save
BTN_CANCEL = QtWidgets.QMessageBox.Cancel
BTN_CLOSE = QtWidgets.QMessageBox.Close
BTN_DISCARD = QtWidgets.QMessageBox.Disc... | mit | -6,995,247,793,457,590,000 | 23.871622 | 112 | 0.666667 | false | 3.850418 | false | false | false |
raiden-network/raiden | raiden/transfer/mediated_transfer/mediation_fee.py | 1 | 10396 | from bisect import bisect, bisect_right
from copy import copy
from dataclasses import dataclass, field
from fractions import Fraction
from typing import List, Optional, Sequence, Tuple, TypeVar, Union
from raiden.exceptions import UndefinedMediationFee
from raiden.transfer.architecture import State
from raiden.utils.t... | mit | -1,671,365,608,067,206,100 | 33.885906 | 98 | 0.634379 | false | 3.423115 | false | false | false |
epsy/sigtools | sigtools/sphinxext.py | 1 | 3856 | # sigtools - Collection of Python modules for manipulating function signatures
# Copyright (c) 2013-2015 Yann Kaiser
#
# 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, inc... | mit | 8,984,747,128,478,793,000 | 34.376147 | 79 | 0.676867 | false | 4.141783 | false | false | false |
gajim/gajim | gajim/gtk/assistant.py | 1 | 8768 | # This file is part of Gajim.
#
# Gajim 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; version 3 only.
#
# Gajim is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the... | gpl-3.0 | -7,740,827,704,019,272,000 | 30.768116 | 78 | 0.593522 | false | 3.78094 | false | false | false |
django-bmf/django-bmf | djangobmf/contrib/accounting/migrations/0001_version_0_2_5.py | 2 | 6260 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.db.models.deletion
import djangobmf.fields
from django.conf import settings
import djangobmf.fields.workflow
import djangobmf.contrib.accounting.workflows
class Migration(migrations.Migration):
... | bsd-3-clause | 7,141,881,957,070,914,000 | 70.136364 | 309 | 0.629233 | false | 3.959519 | false | false | false |
grap/OCB | addons/web_graph/__openerp__.py | 65 | 2181 | {
'name': 'Graph Views',
'category': 'Hidden',
'description': """
Graph Views for Web Client.
===========================
* Parse a <graph> view but allows changing dynamically the presentation
* Graph Types: pie, lines, areas, bars, radar
* Stacked/Not Stacked for areas and bars
* Legends:... | agpl-3.0 | 1,785,047,345,906,910,500 | 36.603448 | 83 | 0.599725 | false | 2.904128 | false | false | false |
smeerten/ssnake | src/spectrumFrame.py | 1 | 21976 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2016 - 2020 Bas van Meerten and Wouter Franssen
# This file is part of ssNake.
#
# ssNake 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 vers... | gpl-3.0 | 8,860,133,649,190,792,000 | 40.384181 | 155 | 0.503117 | false | 3.920607 | false | false | false |
bkmeneguello/code-services-api | mock-server.py | 1 | 2932 | #!/usr/bin/python
from flask import Flask, request, render_template
from flask_restful import Resource, Api
from md5 import md5
from copy import deepcopy
projects_data = [
{
'id': md5('sample').hexdigest(),
'url': '/projects/' + md5('sample').hexdigest(),
'name': 'sample',
'resources': [
{
... | gpl-2.0 | -1,943,447,573,276,408,600 | 22.269841 | 110 | 0.61221 | false | 3.298088 | false | false | false |
eallik/spinoff | spinoff/actor/util.py | 1 | 3236 | from __future__ import print_function
from weakref import WeakValueDictionary
from twisted.internet.defer import Deferred, CancelledError
from spinoff.util.pattern_matching import IN
from spinoff.util.logging import log, dbg
class Container(object):
"""Holds and helps manage a set of subordinate actors.
C... | bsd-2-clause | -2,592,821,584,815,427,600 | 29.528302 | 123 | 0.588072 | false | 3.941535 | false | false | false |
roelvv/pyrax | pyrax/identity/rax_identity.py | 12 | 9999 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from six.moves import configparser as ConfigParser
import pyrax
from ..base_identity import BaseIdentity
from ..base_identity import User
from ..cloudnetworks import CloudNetworkClient
from .. import exceptions as exc
from .. import utils as utils
AUTH_... | apache-2.0 | -2,253,636,839,899,947,500 | 38.678571 | 79 | 0.611661 | false | 4.308057 | false | false | false |
birdland/dlkit-doc | dlkit/type/primitives.py | 1 | 3987 |
from ..osid import markers as osid_markers
class Type(osid_markers.OsidPrimitive):
"""The Type is a form of identifier that is primarily used to identify interface specifications.
The ``Type`` differs from ``Id`` in that it offers display
information and ``Types`` may be arranged in hierarchies to indic... | mit | 7,691,685,857,850,039,000 | 26.881119 | 100 | 0.638826 | false | 4.561785 | false | false | false |
schristakidis/p2ner | p2ner/components/plugin/remoteproducerui/remoteproducerui/rproducerui.py | 1 | 5500 | import os, sys
# Copyright 2012 Loris Corazza, Sakis Christakidis
#
# 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 req... | apache-2.0 | -8,620,492,585,948,166,000 | 29.726257 | 100 | 0.629818 | false | 3.900709 | false | false | false |
LonamiWebs/Telethon | tests/telethon/extensions/test_html.py | 2 | 2337 | """
Tests for `telethon.extensions.html`.
"""
from telethon.extensions import html
from telethon.tl.types import MessageEntityBold, MessageEntityItalic, MessageEntityTextUrl
def test_entity_edges():
"""
Test that entities at the edges (start and end) don't crash.
"""
text = 'Hello, world'
entities... | mit | -3,818,154,664,347,666,000 | 34.369231 | 103 | 0.680296 | false | 3.542373 | true | false | false |
eestay/edx-platform | common/test/acceptance/pages/studio/settings.py | 16 | 2936 | """
Course Schedule and Details Settings page.
"""
from bok_choy.promise import EmptyPromise
from .course_page import CoursePage
from .utils import press_the_notification_button
class SettingsPage(CoursePage):
"""
Course Schedule and Details Settings page.
"""
url_path = "settings/details"
def ... | agpl-3.0 | 1,820,166,408,815,304,000 | 30.234043 | 78 | 0.599796 | false | 4.47561 | false | false | false |
StefQM/facedetect | facedetect/trackers.py | 1 | 6223 | import cv2
import rects
import lines
import utils
class Face(object):
"""Data on facial features: face, eyes, nose, mouth."""
def __init__(self):
self.faceRect = None
self.leftEyeRect = None
self.rightEyeRect = None
self.noseRect = None
self.mouthRect = None
... | mit | 2,848,245,581,153,804,000 | 38.636943 | 118 | 0.554716 | false | 3.742032 | false | false | false |
gwpy/gwsumm | gwsumm/triggers.py | 1 | 14700 | # -*- coding: utf-8 -*-
# Copyright (C) Duncan Macleod (2013)
#
# This file is part of GWSumm.
#
# GWSumm 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 3 of the License, or
# (at your option) ... | gpl-3.0 | 1,541,810,805,593,931,800 | 31.09607 | 79 | 0.577211 | false | 3.793548 | true | false | false |
mrworf/multiremote | docs/setup.py | 1 | 12540 | # This file is part of multiRemote.
#
# multiRemote 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 version.
#
# multiRemote is distributed in t... | gpl-2.0 | 8,627,143,812,570,614,000 | 32.351064 | 177 | 0.61252 | false | 3.696934 | false | false | false |
jamesyonan/brenda | brenda/work.py | 1 | 3070 | # Brenda -- Blender render tool for Amazon Web Services
# Copyright (C) 2013 James Yonan <james@openvpn.net>
#
# 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 Foundation, either version 3 of the License, or... | gpl-3.0 | -4,705,768,290,347,889,000 | 31.659574 | 71 | 0.55798 | false | 3.549133 | false | false | false |
daviferreira/leticiastallone.com | leticiastallone/blog/migrations/0004_auto__del_field_post_created.py | 1 | 1112 | # -*- 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):
# Deleting field 'Post.created'
db.delete_column(u'blog_post', 'created')
def backwards(self, orm):
... | mit | -6,726,415,584,872,451,000 | 32.727273 | 114 | 0.56295 | false | 3.808219 | false | false | false |
hillwithsmallfields/qs | financial/diff_sheet.py | 1 | 7375 | #!/usr/bin/python3
import csv
import os
# import csv_sheet
import base_sheet
import canonical_sheet
import named_column_sheet
import qsutils
class diff_sheet(base_sheet.base_sheet):
"""A sheet representing the timeline of differences between columns in
two input sheets (or they could be the same sheet).... | gpl-3.0 | 6,616,363,862,912,054,000 | 39.300546 | 125 | 0.51661 | false | 3.863279 | false | false | false |
bireme/api-nlm | src/Harvesting.py | 1 | 3739 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
# =========================================================================
#
# Copyright © 2016 BIREME/PAHO/WHO
#
# This file is part of API-NLM.
#
# API-NLM is free software: you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Pu... | lgpl-2.1 | 8,716,916,324,890,072,000 | 30.411765 | 76 | 0.512841 | false | 4.719697 | false | false | false |
SamR1/FitTrackee | fittrackee/tests/application/test_config.py | 1 | 2431 | import os
from flask import Flask
class TestDevelopmentConfig:
def test_debug_is_enabled(self, app: Flask) -> None:
app.config.from_object('fittrackee.config.DevelopmentConfig')
assert app.config['DEBUG']
def test_testing_is_disabled(self, app: Flask) -> None:
app.config.from_object... | gpl-3.0 | 4,867,804,412,233,160,000 | 29.3875 | 71 | 0.657754 | false | 3.61756 | true | false | false |
mike-lawrence/pytracker | pytracker/calibrationChild.py | 1 | 15492 | # class dummyQTo:
# def empty(self):
# return True
# class dummyQFrom:
# def put(self,message):
# print message
# qTo = dummyQTo()
# qFrom = dummyQFrom()
# viewingDistance = 100
# stimDisplayWidth = 100
# stimDisplayRes = (2560,1440)
# stimDisplayPosition = (-2560,0)
# mirrorDisplayPosition = (0,0)
# calibratio... | gpl-3.0 | 8,050,677,555,579,848,000 | 43.265714 | 222 | 0.717661 | false | 2.886529 | false | false | false |
DanielSlater/AlphaToe | techniques/monte_carlo_uct_with_value.py | 1 | 3564 | import collections
import random
import math
from techniques.monte_carlo import _upper_confidence_bounds
def monte_carlo_tree_search_uct_with_value(game_spec, board_state, side, number_of_samples, value_func,
value_weighting):
"""Evaluate the best from the current boar... | mit | 8,142,853,520,383,123,000 | 44.113924 | 119 | 0.583895 | false | 4.351648 | false | false | false |
zrhans/python | exemplos/diveintopythonzh-cn-5.4b/py/builddialectexamples.py | 4 | 1090 | """Build examples of output of dialect module
This script is used during the build process of "Dive Into Python"
(http://diveintopython.org/) to create examples of the output of the
code in chapter 4 (dialect.py and BaseHTMLProcessor.py).
It takes one argument, the source HTML file to translate. It outputs
chef.html... | gpl-2.0 | -819,895,340,915,398,900 | 33.0625 | 83 | 0.721101 | false | 3.253731 | false | false | false |
thobbs/phpcassa | doc/conf.py | 2 | 5054 | # -*- coding: utf-8 -*-
#
# PyMongo documentation build configuration file
#
# This file is execfile()d with the current directory set to its containing dir.
import sys
import os
sys.path.append(os.path.abspath('..'))
# -- General configuration -----------------------------------------------------
# Add any Sphinx e... | mit | -3,080,067,422,053,625,000 | 31.606452 | 80 | 0.695291 | false | 3.746479 | true | false | false |
Sanji-IO/sanji-gps | tests/test_e2e/view_gps.py | 2 | 2737 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
import logging
from time import sleep
from sanji.core import Sanji
from sanji.connection.mqtt import Mqtt
REQ_RESOURCE = "/system/gps"
MANUAL_TEST = 0
class View(Sanji):
# This function will be executed after registered.
def run(self):
for count in x... | gpl-2.0 | 7,222,387,483,224,980,000 | 31.975904 | 79 | 0.508951 | false | 4.001462 | true | false | false |
mvaled/sentry | src/sentry/south_migrations/0250_auto__add_unique_userreport_project_event_id.py | 1 | 74978 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
if not db.dry_run:
UserReport = orm['sentry.UserReport']
... | bsd-3-clause | -3,422,734,612,903,823,000 | 35.78999 | 99 | 0.395956 | false | 4.71293 | false | false | false |
abrahamrhoffman/MUTATE | mutate/visualize.py | 1 | 3028 | import pygraphviz as pgv
import pandas as pd
class Visualize(object):
'''
Mutate Visualization: Using PyGraphViz and Dot Syntax
'''
def __init__(self, GENOME):
self.nodes, self.connections = GENOME
def create(self,simple=True):
'''
Create a directed graph from a Genome (Ge... | mit | 8,896,797,598,881,249,000 | 42.884058 | 102 | 0.584544 | false | 4.108548 | false | false | false |
JurassicWordExcel/core | wizards/com/sun/star/wizards/common/XMLHelper.py | 11 | 1381 | #
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# This file incorporates work covered by the following license noti... | mpl-2.0 | 283,762,838,278,924,830 | 39.617647 | 70 | 0.68139 | false | 3.857542 | false | false | false |
bast/cubicle | cubicle.py | 1 | 3009 | #!/usr/bin/env python
import sys
import string
from optparse import OptionParser
#-------------------------------------------------------------------------------
def parse_args(argv):
usage = '''
%prog: utility to add/subtract/scale cube files
example: ./%prog --calc="0.5*example.cube -0.5*example.c... | bsd-3-clause | -5,794,446,872,518,844,000 | 25.866071 | 80 | 0.432037 | false | 3.784906 | false | false | false |
florentx/stringformat | stringformat_lite.py | 1 | 7405 | # -*- coding: utf-8 -*-
"""Advanced string formatting for Python >= 2.4.
An implementation of the advanced string formatting (PEP 3101).
CAUTION: this module is a stripped version, without strict error checking.
Author: Florent Xicluna
"""
import re
if hasattr(str, 'partition'):
def partition(s, sep):
... | bsd-3-clause | 779,086,076,484,613,800 | 31.621145 | 79 | 0.512897 | false | 3.674938 | false | false | false |
hujiang001/iot-X | iotx/sdk/device_side/python/example/device_add.py | 1 | 1396 | #!usr/bin/env python
#-*-coding=utf8-*-
import sys
sys.path.append("../../python")
import iotxSDK as iotx
user = {
'name':'hujiang',
'pwd':'iotx',
'userDefArea':{'tel':'010-12345678','addr':'BeiJing,China'}
}
device = {
'name':"hujiang's room",
'descr... | mit | -922,423,362,167,362,700 | 30.431818 | 90 | 0.55644 | false | 3.126697 | false | true | false |
souravbadami/oppia | core/storage/suggestion/gae_models_test.py | 1 | 18056 | # coding: utf-8
#
# Copyright 2018 The Oppia 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 requi... | apache-2.0 | -4,484,220,116,351,754,000 | 44.711392 | 80 | 0.631535 | false | 3.976217 | true | false | false |
ViderumGlobal/ckanext-tayside | ckanext/tayside/logic/action/get.py | 1 | 3272 | from ckan.logic.action import get as get_core
from ckan.plugins import toolkit
import ckan.lib.helpers as h
@toolkit.side_effect_free
def package_show(context, data_dict):
''' This action is overriden so that the extra field "theme" is added.
This is needed because when a dataset is exposed to DCAT it needs t... | agpl-3.0 | -840,209,963,715,794,600 | 33.808511 | 79 | 0.569071 | false | 4.265971 | false | false | false |
sense5/crcompare | crcompare_py3.py | 1 | 6723 | #!/usr/bin/env python
'''
#App Name: crcompare.py
#Version: 1.0
#Author: ray.h(torkuu@gmail.com)
#Compile_Env: python 3.3.2
#Last_Modify: 20140114.1723
'''
import re
import copy
class getallcontent:
#Variable Defination Area
def __init__(self):
self.result = []
pass
def txtfile(self, fil... | apache-2.0 | 7,103,176,863,616,180,000 | 33.30102 | 169 | 0.551986 | false | 3.622306 | false | false | false |
digital-fabulism/consectetur | fraser/fraser/settings/base.py | 1 | 2953 | """
Django settings for fraser project.
Generated by 'django-admin startproject' using Django 1.8.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build paths i... | mit | -868,915,419,272,570,800 | 23.815126 | 106 | 0.67423 | false | 3.32545 | false | false | false |
takumakanari/climson | climson/climson.py | 1 | 2388 | #!/usr/bin/env python
# -*- encoding:utf-8 -*-
from __future__ import absolute_import
import argparse
import inspect
__all__ = [
'ClimsonException',
'ValidateError',
'BaseCommand',
'add',
'make_option'
]
class ClimsonException(Exception):
pass
class ValidateError(ClimsonException):
def... | mit | -6,629,885,819,391,615,000 | 22.184466 | 75 | 0.596315 | false | 3.973378 | false | false | false |
davelab6/nototools | nototools/generate_website_2_data.py | 1 | 45199 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
#
# Copyright 2015 Google Inc. 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.... | apache-2.0 | -789,213,678,566,967,300 | 34.144635 | 126 | 0.631029 | false | 3.268441 | false | false | false |
barfle/scalextric | test/motor-wp.py | 1 | 3538 | #!/usr/bin/env python2.7
# Python 2.7 version by Alex Eames of http://RasPi.TV
# functionally similar to the Gertboard motor test by
# Gert Jan van Loo & Myra VanInwegen
# Use at your own risk - I'm pretty sure the code is harmless, check it yourself
# This is the WiringPi for Python version which uses hardware PWM
... | bsd-3-clause | -9,107,699,714,717,644,000 | 40.623529 | 80 | 0.600057 | false | 3.693111 | false | false | false |
breandan/java-algebra-system | examples/solvablepolynomial.py | 3 | 2525 | #
# jython examples for jas.
# $Id$
#
from java.lang import System
from jas import SolvableRing, SolvPolyRing, PolyRing, SolvableIdeal
from jas import QQ, Quat
# WA_32 solvable polynomial example
p = PolyRing(QQ(),"a,b,e1,e2,e3");
#is automatic: [one,a,b,e1,e2,e3] = p.gens();
relations = [e3, e1, e1*e3 - e1,
... | gpl-2.0 | -2,075,485,353,236,305,000 | 19.2 | 67 | 0.567921 | false | 2.03958 | false | false | false |
brainwane/zulip | zerver/webhooks/travis/view.py | 3 | 1986 | # Webhooks for external integrations.
from typing import Dict
from django.http import HttpRequest, HttpResponse
from zerver.decorator import api_key_only_webhook_view
from zerver.lib.request import REQ, has_request_variables
from zerver.lib.response import json_success
from zerver.lib.validator import check_bool, che... | apache-2.0 | -892,001,586,338,539,800 | 34.464286 | 92 | 0.635952 | false | 3.848837 | false | false | false |
BoldingBruggeman/gotm | gui.py/util/xml2nml.py | 1 | 3905 | #!/usr/bin/python
import sys, os, os.path
gotmguiroot = os.path.join(os.path.dirname(os.path.realpath(__file__)),'..')
sys.path.append(gotmguiroot)
import core.common,core.scenario
def main():
copydata = not core.common.getSwitchArgument('-nd')
comments = not core.common.getSwitchArgument('-nc')
# Check... | gpl-2.0 | -1,440,257,372,885,748,000 | 38.444444 | 170 | 0.633291 | false | 4.136653 | false | false | false |
lucaskolstad/rBCM | rBCM/partitioning.py | 1 | 1362 | """Robust Bayesian Committee Machine Regression"""
import numpy as np
from sklearn.cluster import Birch
def birch_cluster_partitioning(X, points_per_expert):
"""Return a list of lists each containing a partition of the indices of the
data to be fit that is generated by splitting along clusters found via
... | bsd-3-clause | 5,378,372,410,241,089,000 | 30.674419 | 79 | 0.671072 | false | 3.556136 | false | false | false |
darkenk/vixl | tools/generate_simulator_traces.py | 2 | 7159 | #!/usr/bin/env python2.7
# Copyright 2015, ARM Limited
# 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 li... | bsd-3-clause | 6,626,405,466,250,391,000 | 41.868263 | 84 | 0.674815 | false | 3.990524 | true | false | false |
205Consulting/OpenSource | pd_to_lda/pd_lda.py | 1 | 9614 | import pandas as pd
import gensim
import operator
from functools import partial
import sys,os,io
class pd_lda(object):
def __init__(self, existing_lda_model = None):
'''
function: init
params: existing_lda_model - a tuple (lda_model, fields) where lda_model is a trained LDA model and fields
is a lis... | mit | 2,558,793,770,046,810,000 | 26.08169 | 115 | 0.677554 | false | 3.22185 | false | false | false |
MarkAYoder/bone101 | examples/Grove_BBG/Software/Python/Grove_IMU_10DOF/MPU9250.py | 1 | 3151 | #
import time
import smbus
import sys
import serial
from visualscope import *
bus = smbus.SMBus(1)
ser = serial.Serial(port = "/dev/ttyO2", baudrate=19200)
class MPU9250():
MPU9250_I2C_ADDR = 0x68
accX = 0
accY = 0
accZ = 0
gyroX = 0
gyroY = 0
gyroZ = 0
tempOut = 0
#the offs... | lgpl-3.0 | -7,532,021,725,153,299,000 | 32.531915 | 128 | 0.49762 | false | 2.798401 | false | false | false |
rail-berkeley/d4rl | d4rl/pointmaze_bullet/bullet_maze.py | 1 | 6698 | import os
import hashlib
import numpy as np
from pybullet_envs import env_bases
from pybullet_envs import scene_abstract
from d4rl.pointmaze_bullet import bullet_robot
from d4rl.pointmaze import maze_model
from d4rl import offline_env
class MazeRobot(bullet_robot.MJCFBasedRobot):
def __init__(self, maze_spec):
... | apache-2.0 | -7,266,494,682,963,003,000 | 37.716763 | 110 | 0.592416 | false | 3.257782 | false | false | false |
v-iam/azure-sdk-for-python | azure-servicefabric/azure/servicefabric/models/deployed_service_package_health.py | 2 | 2882 | # 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 ... | mit | 3,762,934,142,459,046,400 | 52.37037 | 181 | 0.682165 | false | 4.32084 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.