repo_name stringlengths 6 61 | path stringlengths 4 230 | copies stringlengths 1 3 | size stringlengths 4 6 | text stringlengths 1.01k 850k | license stringclasses 15
values | hash int64 -9,220,477,234,079,998,000 9,219,060,020B | line_mean float64 11.6 96.6 | line_max int64 32 939 | alpha_frac float64 0.26 0.9 | autogenerated bool 1
class | ratio float64 1.62 6.1 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
kashyapchhatbar/CLASHChimeras | clashchimeras/parsers.py | 2 | 34332 | import csv
import gzip
import logging
import mmap
import os
import sys
import textwrap
from collections import Counter, defaultdict
from itertools import groupby
from operator import itemgetter
import pandas as pd
import pyfaidx
from Bio import SeqIO
from Bio.SeqRecord import SeqRecord
from Bio.Seq import Seq
import ... | mit | -935,002,050,063,870,100 | 41.75467 | 117 | 0.533933 | false | 4.227038 | false | false | false |
bmwiedemann/linuxcnc-mirror | src/hal/utils/halgui/main.py | 38 | 1324 |
# 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.
#
# This program is distributed in the hope that it will be u... | lgpl-2.1 | 748,531,910,334,872,700 | 24.960784 | 78 | 0.712991 | false | 3.475066 | false | false | false |
ReactiveX/RxPY | rx/scheduler/periodicscheduler.py | 1 | 3861 | from abc import abstractmethod
from datetime import datetime
from typing import Optional
from rx.core import typing
from rx.disposable import Disposable, MultipleAssignmentDisposable
from .scheduler import Scheduler
class PeriodicScheduler(Scheduler, typing.PeriodicScheduler):
"""Base class for the various peri... | mit | 8,123,050,020,604,884,000 | 32.284483 | 86 | 0.574204 | false | 5.260218 | false | false | false |
AnotherVisitor/StuffAroundRrdtool | weather.py | 1 | 1521 | #!/usr/bin/python
from Adafruit_BMP085 import BMP085
import re, os, rrdtool, time
# function: read and parse sensor data file
def read_sensor(path):
value = "U"
try:
f = open(path, "r")
line = f.readline()
if re.match(r"([0-9a-f]{2} ){9}: crc=[0-9a-f]{2} YES", line):
line = f.readline()
m ... | gpl-2.0 | -7,056,019,276,738,214,000 | 25.684211 | 73 | 0.590401 | false | 2.765455 | false | false | false |
danielquinn/spirithunter | src/economy/migrations/0001_initial.py | 1 | 3412 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2016-09-04 17:41
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('contenttypes', '0002_remove_content_typ... | agpl-3.0 | -838,863,452,036,683,800 | 41.65 | 201 | 0.578839 | false | 4.686813 | false | false | false |
bourbakilee/PyMPL | debug.py | 1 | 1270 | # -*- coding: utf-8 -*-
"""
Created on Fri Apr 22 11:55:10 2016
@author: liys
"""
import pickle, sqlite3
from queue import PriorityQueue
import matplotlib.pyplot as plt
from OffRoadPlanning import load_forward_path_primitives, load_reverse_path_primitives, test_load_path_primitives, \
test_load_motion_primitives, Stat... | gpl-3.0 | 6,384,187,114,103,065,000 | 25.479167 | 116 | 0.696063 | false | 2.974239 | false | false | false |
kdschlosser/SonyAPI | SonyAPI/channel.py | 1 | 4685 | # -*- coding: utf-8 -*-
#
# SonyAPI
# External control of Sony Bravia Generation 3 TV's
# Copyright (C) 2017 Kevin G. Schlosser
#
# 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 ... | gpl-2.0 | 7,907,677,837,741,881,000 | 29.422078 | 73 | 0.548346 | false | 4.113257 | false | false | false |
cmancone/ezgal | ezgal/sfhs.py | 1 | 2071 | from __future__ import (absolute_import, division, print_function,
unicode_literals)
import collections
import numpy as np
from . import dusts
__ver__ = '1.0'
class sfh_wrapper(object):
""" sfh_wrapper class. EzGal wraps this class around the sfh function. It takes care of the
details... | mit | -3,856,164,806,952,304,000 | 26.613333 | 98 | 0.609367 | false | 3.480672 | false | false | false |
qedi-r/home-assistant | homeassistant/components/alexa/const.py | 2 | 10344 | """Constants for the Alexa integration."""
from collections import OrderedDict
from homeassistant.const import TEMP_CELSIUS, TEMP_FAHRENHEIT
from homeassistant.components.climate import const as climate
from homeassistant.components import fan
DOMAIN = "alexa"
# Flash briefing constants
CONF_UID = "uid"
CONF_TITLE =... | apache-2.0 | -6,711,995,617,098,553,000 | 28.138028 | 104 | 0.643755 | false | 2.972414 | false | false | false |
vchudinov/MultiNEAT | MultiNEAT/viz.py | 1 | 13459 | from _MultiNEAT import *
def Scale(a, a_min, a_max, a_tr_min, a_tr_max):
t_a_r = a_max - a_min
if t_a_r == 0:
return a_max
t_r = a_tr_max - a_tr_min
rel_a = (a - a_min) / t_a_r
return a_tr_min + t_r * rel_a
def Clamp(a, min, max):
if a < min:
return min
elif a > max:
... | lgpl-3.0 | -9,214,734,946,703,446,000 | 35.57337 | 110 | 0.472695 | false | 3.607344 | false | false | false |
bibsian/database-development | test/manual_test_dialogobs.py | 1 | 6854 | #!/usr/bin/env python
import pytest
import pytestqt
from PyQt4 import QtGui
from collections import OrderedDict
import sys,os
from Views import ui_dialog_obs as obs
from poplerGUI import ui_logic_preview as prev
from poplerGUI import class_modelviewpandas as view
from poplerGUI import class_inputhandler as ini
from pop... | mit | 4,524,446,183,923,021,300 | 41.04908 | 95 | 0.557339 | false | 4.104192 | false | false | false |
mileswwatkins/moxie | moxie/cores/ssh.py | 4 | 10112 | # Copyright (c) Paul R. Tagliamonte <tag@pault.ag>, 2015
#
# 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... | mit | -2,430,743,110,413,162,500 | 27.514451 | 79 | 0.556457 | false | 3.363791 | false | false | false |
ichi23de5/ichi_Repo | sim/sim/models/sim.py | 1 | 3894 | # -*- coding: utf-8 -*-
from openerp import models, fields, api
from datetime import datetime, timedelta, date
from dateutil.relativedelta import relativedelta
class Sim(models.Model):
_name = 'sim'
_order = 'date_sim desc'
_inherit = ['mail.thread', 'ir.needaction_mixin']
user_number = fields.Char(s... | gpl-3.0 | -7,608,304,808,753,028,000 | 40.870968 | 121 | 0.67283 | false | 3.562672 | false | false | false |
based-at/odoo-addons | stock_warehouse_access/stock_access.py | 1 | 2673 | # -*- coding: utf-8 -*-
##############################################################################
#
# Limit User Access per Warehouse
# Copyright (C) 2016 Vadim (<http://based.at>).
# OpenERP, Open Source Management Solution
# Copyright (c) 2004-2016 Odoo S.A.
#
# This program is free software: you ... | agpl-3.0 | -8,148,570,591,550,810,000 | 44.305085 | 118 | 0.621399 | false | 4.222749 | false | false | false |
mihaip/NewsBlur | vendor/munin/memcached.py | 5 | 1089 | #!/usr/bin/env python
import os
import socket
from vendor.munin import MuninPlugin
class MuninMemcachedPlugin(MuninPlugin):
category = "Memcached"
def autoconf(self):
try:
self.get_stats()
except socket.error:
return False
return True
def get_stats(self):
... | mit | -4,773,181,607,346,177,000 | 26.225 | 67 | 0.522498 | false | 3.512903 | false | false | false |
bruderstein/PythonScript | PythonLib/full/xml/etree/ElementTree.py | 1 | 74022 | """Lightweight XML support for Python.
XML is an inherently hierarchical data format, and the most natural way to
represent it is with a tree. This module has two classes for this purpose:
1. ElementTree represents the whole XML document as a tree and
2. Element represents a single node in this tree.
In... | gpl-2.0 | -2,000,098,224,576,624,600 | 34.417225 | 96 | 0.568979 | false | 4.445232 | false | false | false |
mayapurmedia/tovp | tovp/gifts/migrations/0001_initial.py | 2 | 3850 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import audit_log.models.fields
import ananta.models
import model_utils.fields
from django.conf import settings
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('c... | mit | -7,659,025,736,623,560,000 | 64.254237 | 201 | 0.647013 | false | 3.952772 | false | false | false |
kryptn/Pantry | setup.py | 1 | 3672 | from setuptools import setup, find_packages
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='Pantry',
# Versions should comply with PEP440. For a discussion ... | mit | -741,208,000,180,265,900 | 35.366337 | 94 | 0.64842 | false | 4.05298 | false | false | false |
elaird/supy-tflat | displayer.py | 1 | 19587 | import ROOT as r
import supy
class displayer(supy.steps.displayer):
def __init__(self,
scale=200.0,
jets=[{"fixes":("J", "Gen"), "nMax":4, "color":r.kBlack, "width":2, "style":2},
{"fixes":("J", ""), "nMax":4, "color":r.kBlue, "width":1, "style":1},
... | gpl-3.0 | 8,626,758,202,597,365,000 | 37.481336 | 150 | 0.46633 | false | 3.685924 | false | false | false |
hunterfu/it-manager | stock_tech/rps_sma.py | 1 | 22581 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__version__ = 0.1
from lib import stock
from lib.htmltmpl import TemplateManager, TemplateProcessor
import sys
import os
import shutil
import pickle
import re
import time
#import pysqlite2.dbapi2 as sqlite
import sqlite3 as sqlite
import getopt
from operat... | lgpl-3.0 | 1,135,593,402,020,305,300 | 31.75 | 152 | 0.548466 | false | 3.197936 | false | false | false |
saulshanabrook/django-dumper | test/models.py | 1 | 2381 | from django.db import models
from django.core.urlresolvers import reverse
from django.contrib.contenttypes.models import ContentType
try: # new import added in Django 1.7
from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.fields import GenericRelation
except Impor... | mit | 4,475,345,521,856,068,000 | 30.328947 | 79 | 0.730365 | false | 4.112263 | false | false | false |
odoousers2014/odoo-addons-supplier_price | stock_working_days/__openerp__.py | 1 | 2769 | # -*- coding: utf8 -*-
#
# Copyright (C) 2014 NDP Systèmes (<http://www.ndp-systemes.fr>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License,... | agpl-3.0 | 5,371,611,125,826,309,000 | 40.909091 | 118 | 0.710412 | false | 4.073638 | false | false | false |
cmap/cmapPy | cmapPy/pandasGEXpress/GCToo.py | 1 | 12504 | """
DATA:
-----------------------------
| | cid |
-----------------------------
| | |
|r | |
|i | data |
|d | |
| | |
-----------------------------
ROW METADATA:
--------------------------... | bsd-3-clause | -3,186,919,485,496,119,300 | 43.028169 | 135 | 0.583333 | false | 3.710386 | false | false | false |
arenadata/ambari | ambari-server/src/main/resources/stacks/BigInsights/4.0/services/KAFKA/package/scripts/kafka_upgrade.py | 2 | 1531 |
#!/usr/bin/env python
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License")... | apache-2.0 | -4,120,357,280,770,025,500 | 39.289474 | 140 | 0.772044 | false | 3.895674 | false | false | false |
akretion/odoo | addons/website_sale_stock/models/sale_order.py | 17 | 2582 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models, api, fields
from odoo.tools.translate import _
class SaleOrder(models.Model):
_inherit = 'sale.order'
warning_stock = fields.Char('Warning')
def _cart_update(self, product_id=None... | agpl-3.0 | 7,518,949,106,520,849,000 | 41.327869 | 149 | 0.599923 | false | 3.797059 | false | false | false |
qedsoftware/commcare-hq | corehq/apps/products/models.py | 1 | 10523 | from datetime import datetime
from decimal import Decimal
import itertools
import jsonfield
from django.db import models
from django.utils.translation import ugettext as _
from couchdbkit.exceptions import ResourceNotFound
from dimagi.ext.couchdbkit import (
Document,
StringProperty,
DecimalProperty,
... | bsd-3-clause | -8,021,989,213,573,564,000 | 29.501449 | 105 | 0.588235 | false | 4.123433 | false | false | false |
antoinecarme/pyaf | tests/codegen/test_air_passengers_code_gen.py | 1 | 1297 | import pandas as pd
import numpy as np
import pyaf.ForecastEngine as autof
import pyaf.Bench.TS_datasets as tsds
import pyaf.CodeGen.TS_CodeGenerator as tscodegen
b1 = tsds.load_airline_passengers()
df = b1.mPastData
df.head()
H = b1.mHorizon;
N = df.shape[0];
for n in range(2*H, N , 10):
df1 = df.head(n)... | bsd-3-clause | 8,247,578,394,566,682,000 | 28.477273 | 137 | 0.692367 | false | 2.783262 | false | false | false |
mateoqac/unqTip | gui/views/qDesigner/boardOptionWindow.py | 4 | 3806 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'boardOptions.ui'
#
# Created: Fri Oct 4 12:49:10 2013
# by: PyQt4 UI code generator 4.9.1
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except At... | gpl-3.0 | -383,792,218,594,159,550 | 49.76 | 117 | 0.707042 | false | 3.939959 | false | false | false |
ASMlover/study | python/game-idea/main.py | 1 | 2866 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
#
# Copyright (c) 2015 ASMlover. 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 copyrig... | bsd-2-clause | -7,980,078,939,381,923,000 | 35.74359 | 78 | 0.675506 | false | 4.183942 | false | false | false |
Sispheor/piclodio3 | back/tests/test_views/test_alarm_clock_view/base.py | 1 | 1038 | from rest_framework.test import APITestCase
from restapi.models import WebRadio, AlarmClock
class Base(APITestCase):
def setUp(self):
super(Base, self).setUp()
self.test_webradio = WebRadio.objects.create(name="test", url="http://test.com")
self.test_webradio2 = WebRadio.objects.create(n... | mit | -5,475,881,533,277,622,000 | 48.428571 | 91 | 0.424855 | false | 5.1133 | true | false | false |
icoxfog417/sayuri-server | sayuri/rekognition/client.py | 1 | 1263 | import urllib.request
import urllib.parse
import json
class Client(object):
API_HOME = "https://rekognition.com/func/api/"
def __init__(self, api_key, api_secret, name_space="demo_project", user_id="demo_user"):
self.api_key = api_key
self.api_secret = api_secret
self.name_space = nam... | mit | -6,091,735,256,105,236,000 | 29.071429 | 92 | 0.577197 | false | 3.703812 | false | false | false |
springmeyer/gyp | test/mac/gyptest-archs.py | 4 | 3579 | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Tests things related to ARCHS.
"""
import TestGyp
import TestMac
import re
import subprocess
import sys
if sys.platform == 'darwin':
... | bsd-3-clause | -2,560,930,344,174,830,000 | 37.074468 | 79 | 0.656329 | false | 3.224324 | true | false | false |
Kkevsterrr/backdoorme | backdoors/shell/ruby.py | 1 | 1142 | from backdoors.backdoor import *
import time
class Ruby(Backdoor):
prompt = Fore.RED + "(rb) " + Fore.BLUE + ">> " + Fore.RESET
def __init__(self, core):
cmd.Cmd.__init__(self)
self.intro = GOOD + "Using Ruby module..."
self.core = core
self.options = {
"port" : Option("port", 53937, "port to conne... | mit | -8,470,266,462,933,295,000 | 35.870968 | 247 | 0.631349 | false | 2.812808 | false | false | false |
DonJayamanne/pythonVSCode | pythonFiles/refactor.py | 1 | 11855 | # Arguments are:
# 1. Working directory.
# 2. Rope folder
import difflib
import io
import json
import os
import sys
import traceback
try:
import rope
from rope.base import libutils
from rope.refactor.rename import Rename
from rope.refactor.extract import ExtractMethod, ExtractVariable
import rope.... | mit | 3,470,056,954,809,841,700 | 29.012658 | 93 | 0.562801 | false | 4.371313 | false | false | false |
lfepp/pd_account_info | get_info.py | 1 | 19158 | #!/usr/bin/env python
#
# Copyright (c) 2016, PagerDuty, Inc. <info@pagerduty.com>
# 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 copy... | bsd-3-clause | 7,826,909,042,825,284,000 | 33.028419 | 79 | 0.494206 | false | 4.280161 | false | false | false |
croxis/SpaceDrive | spacedrive/renderpipeline/rpcore/gui/buffer_viewer.py | 1 | 10435 | """
RenderPipeline
Copyright (c) 2014-2016 tobspr <tobias.springer1@gmail.com>
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 right... | mit | 1,130,596,399,849,093,500 | 39.74 | 98 | 0.594921 | false | 3.94518 | false | false | false |
asphalt-framework/asphalt-wamp | asphalt/wamp/events.py | 1 | 1043 | from autobahn.wamp.types import SessionDetails, CloseDetails
from asphalt.core import Event
__all__ = ('SessionJoinEvent', 'SessionLeaveEvent')
class SessionJoinEvent(Event):
"""
Signals that the client has joined the WAMP realm on the router.
:ivar details: the autobahn-provided session details
:v... | apache-2.0 | -6,847,102,164,541,371,000 | 27.972222 | 84 | 0.670182 | false | 3.950758 | false | false | false |
beaker-project/beaker | IntegrationTests/src/bkr/inttest/client/test_job_comment.py | 1 | 4191 |
# 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 turbogears.database import session
from bkr.inttest import data_s... | gpl-2.0 | -8,781,481,340,832,835,000 | 38.537736 | 79 | 0.596516 | false | 3.905871 | true | false | false |
delph-in/pydelphin | delphin/sembase.py | 1 | 6504 |
"""
Basic classes and functions for semantic representations.
"""
from typing import (Optional, Mapping, Tuple, List, Union, Sequence)
from delphin.lnk import Lnk, LnkMixin
# Default modules need to import the PyDelphin version
from delphin.__about__ import __version__ # noqa: F401
# Basic Types
# Identifiers ar... | mit | -4,539,682,961,294,775,300 | 31.039409 | 79 | 0.60163 | false | 3.946602 | false | false | false |
wolph/python-statsd | statsd/__init__.py | 1 | 1052 | from statsd.connection import Connection
from statsd.client import Client
from statsd.timer import Timer
from statsd.gauge import Gauge
from statsd.average import Average
from statsd.raw import Raw
from statsd.counter import Counter, increment, decrement
__all__ = [
'Client',
'Connection',
'Timer',
'Co... | bsd-3-clause | -6,754,197,769,659,256,000 | 23.465116 | 77 | 0.702471 | false | 3.811594 | false | false | false |
hammerlab/immuno | immuno/mhc_iedb.py | 1 | 8207 | # Copyright (c) 2014. Mount Sinai School of Medicine
#
# 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 o... | apache-2.0 | 3,265,039,371,302,371,000 | 30.687259 | 80 | 0.620568 | false | 3.780286 | false | false | false |
ragupta-git/ImcSdk | imcsdk/apis/v2/admin/ipmi.py | 1 | 3307 | # Copyright 2016 Cisco Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | apache-2.0 | 1,437,764,092,708,313,000 | 27.508621 | 77 | 0.644995 | false | 3.622125 | false | false | false |
cdubz/babybuddy | core/templatetags/duration.py | 1 | 1802 | # -*- coding: utf-8 -*-
from django import template
from core.utils import duration_parts, duration_string as d_string
register = template.Library()
@register.filter
def duration_string(duration, precision='s'):
"""
Format a duration (e.g. "2 hours, 3 minutes, 35 seconds").
:param duration: a timedetla... | bsd-2-clause | -8,208,156,730,294,913,000 | 24.027778 | 74 | 0.632075 | false | 4.230047 | false | false | false |
riverma/climate | obs4MIPs/obs4MIPs_process.py | 10 | 19744 | #!/usr/bin/env python
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "... | apache-2.0 | 159,500,257,221,938,300 | 38.886869 | 129 | 0.383762 | false | 4.878676 | false | false | false |
bruceyou/NewsBlur | apps/categories/management/commands/activate_free.py | 2 | 1058 | from django.core.management.base import BaseCommand
from django.contrib.auth.models import User
from optparse import make_option
import datetime
class Command(BaseCommand):
option_list = BaseCommand.option_list + (
make_option("-u", "--username", dest="username", nargs=1, help="Specify user id or username"... | mit | -1,529,755,085,474,918,100 | 34.266667 | 102 | 0.57845 | false | 4.560345 | false | false | false |
gitporst/spotpy | spotpy/algorithms/sceua.py | 1 | 16831 | # -*- coding: utf-8 -*-
'''
Copyright (c) 2015 by Tobias Houska
This file is part of Statistical Parameter Estimation Tool (SPOTPY).
:author: Tobias Houska and Stijn Van Hoey
This class holds the Shuffled Complex Evolution Algortithm (SCE-UA) algorithm, based on Duan (1994):
Duan, Q., Sorooshian, S. and Gupta, V. K... | mit | 8,285,090,159,764,058,000 | 37.600917 | 164 | 0.554757 | false | 3.788609 | false | false | false |
saks/hb | records/models.py | 1 | 2100 | import logging
from django.conf import settings
from django.contrib.postgres.fields import ArrayField
from django.db import models
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
from djmoney.models.fields import MoneyField
TRANSACTION_TYPE = (
('EXP', _('Expences')),
... | mit | 7,670,605,267,441,292,000 | 30.818182 | 88 | 0.650952 | false | 3.743316 | false | false | false |
sam81/pysoundanalyser | pysoundanalyser/dialog_save_sound.py | 1 | 3550 | # -*- coding: utf-8 -*-
# Copyright (C) 2010-2017 Samuele Carcagno <sam.carcagno@gmail.com>
# This file is part of pysoundanalyser
# pysoundanalyser 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... | gpl-3.0 | 5,370,182,566,540,507,000 | 45.103896 | 125 | 0.684789 | false | 3.944444 | false | false | false |
AusTac/parma | b3/plugins/censor.py | 1 | 12779 | #
# BigBrotherBot(B3) (www.bigbrotherbot.net)
# Copyright (C) 2005 Michael "ThorN" Thornton
#
# 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 opti... | gpl-2.0 | 2,528,547,837,317,563,000 | 42.617747 | 132 | 0.596604 | false | 3.846779 | true | false | false |
trenton42/txbalanced-v1.0 | setup.py | 1 | 1409 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
readme = open('README.rst').read()
history = open('HISTORY.rst... | bsd-3-clause | -3,378,068,112,512,977,000 | 25.092593 | 66 | 0.597587 | false | 3.631443 | false | true | false |
alfa-addon/addon | plugin.video.alfa/channels/pelisvips.py | 1 | 12431 | # -*- coding: utf-8 -*-
# -*- Channel PelisVips -*-
# -*- Created for Alfa-addon -*-
# -*- By the Alfa Develop Group -*-
import sys
PY3 = False
if sys.version_info[0] >= 3: PY3 = True; unicode = str; unichr = chr; long = int
if PY3:
import urllib.parse as urlparse ... | gpl-3.0 | 2,597,182,748,620,308,000 | 32.043836 | 123 | 0.518835 | false | 3.848823 | false | false | false |
taspinar/siml | siml/naive_bayes.py | 1 | 5454 | from collections import Counter, defaultdict
from evaluators import *
import load_data as ld
import numpy as np
class NaiveBaseClass:
def calculate_relative_occurences(self, list1):
no_examples = len(list1)
ro_dict = dict(Counter(list1))
for key in ro_dict.keys():
ro_dict[key] =... | mit | 4,719,717,715,912,433,000 | 36.102041 | 120 | 0.590392 | false | 3.436673 | true | false | false |
jameshilliard/playground21 | apibb/apibb-server.py | 1 | 4963 | import os
import re
import json
import random
import apsw
import time
# import flask web microframework
from flask import Flask
from flask import request
# import from the 21 Developer Library
from two1.lib.wallet import Wallet
from two1.lib.bitserv.flask import Payment
connection = apsw.Connection("apibb.db")
name... | mit | -4,786,536,286,983,426,000 | 24.321429 | 149 | 0.583921 | false | 3.552613 | false | false | false |
jessicalucci/NovaOrc | nova/console/websocketproxy.py | 9 | 3155 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.a... | apache-2.0 | -2,780,871,884,747,952,000 | 34.449438 | 78 | 0.590808 | false | 4.086788 | false | false | false |
super13/tensorflow-speech-recognition-pai | src/smodels/RNN/rnn.py | 1 | 10374 | # Note: All calls to tf.name_scope or tf.summary.* support TensorBoard visualization.
import os
import tensorflow as tf
from models.RNN.utils import variable_on_cpu
def SimpleLSTM(input_tensor, seq_length):
'''
This function was initially based on open source code from Mozilla DeepSpeech:
https://github... | mit | -6,191,367,770,140,815,000 | 44.104348 | 120 | 0.584249 | false | 3.454545 | false | false | false |
saurabh-hirani/bin | gen-nagios-cfg/get_chef_attrs.py | 1 | 3313 | #!/usr/bin/env python
"""
Usage:
get_chef_attrs.py [-h|--help] --hosts <hosts-file> [--chef-cfg <chef-cfg-file>] --cache <cache-file> [--ext <extension>] --attrs <attr>... [--verbose]
Options:
-h,--help show this help text
-H <hosts-file>, --hosts <hosts-file> target hosts file... | gpl-2.0 | -2,016,134,175,059,922,400 | 25.293651 | 155 | 0.567763 | false | 3.384065 | false | false | false |
erikdejonge/newsrivr | mongo/mongotest.py | 1 | 1030 | import csv
import json
import pymongo
from pymongo.objectid import ObjectId
from pymongo import Connection
def import_feeds():
print "reading"
s = set()
r = csv.reader(open("feeds.txt", "rU"))
for i in r:
if len(i)>1:
if len(i[1])>0:
s.add(i[1])
connection = Conn... | gpl-2.0 | 1,952,921,670,317,960,400 | 20.93617 | 71 | 0.564078 | false | 3.503401 | false | false | false |
ptrsxu/snippetpy | builtinim/peekable.py | 1 | 1117 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
from python cookbook 2nd edition.
"""
import collections
class Peekable(object):
"""A iteration that can look forward with normal iter operations.
Example:
>>> p = Peekable(iter(range(4)))
>>> p.peek()
0
>>> p.next(1)
[0]
>>> p.peek(3... | mit | -786,149,576,617,089,500 | 20.901961 | 69 | 0.5094 | false | 3.501567 | false | false | false |
puttarajubr/commcare-hq | corehq/apps/sms/tasks.py | 2 | 9211 | import math
from datetime import datetime, timedelta
from celery.task import task
from time import sleep
from redis_cache.cache import RedisCache
from corehq.apps.sms.mixin import SMSLoadBalancingMixin
from corehq.apps.sms.models import (SMSLog, OUTGOING, INCOMING,
ERROR_TOO_MANY_UNSUCCESSFUL_ATTEMPTS, ERROR_MESSAG... | bsd-3-clause | 2,552,213,391,816,183,000 | 36.291498 | 94 | 0.644121 | false | 3.871795 | false | false | false |
data-henrik/watson-conversation-tool | watoolV2.py | 1 | 6863 | # Copyright 2017-2018 IBM Corp. All Rights Reserved.
# See LICENSE for details.
#
# Author: Henrik Loeser
#
# Converse with your assistant based on IBM Watson Assistant service on IBM Cloud.
# See the README for documentation.
#
import json, argparse, importlib
from os.path import join, dirname
from ibm_watson import ... | apache-2.0 | 5,171,017,202,342,663,000 | 35.505319 | 115 | 0.588081 | false | 4.476843 | true | false | false |
zettsu-t/cPlusPlusFriend | scripts/tests/test_secretary_problem.py | 1 | 4823 | #!/usr/bin/python3
# coding: utf-8
'''
This script tests secretary_problem.py
Copyright (C) 2017 Zettsu Tatsuya
usage : python3 -m unittest discover tests
'''
import warnings
from unittest import TestCase
import numpy as np
import secretary_problem.secretary_problem as tested
class TestSecretaryPro... | mit | -1,155,666,774,424,360,000 | 40.681416 | 99 | 0.502384 | false | 3.427861 | true | false | false |
honza/stickies-app | stickies/notes/views.py | 1 | 2756 | from django.http import HttpResponse, Http404
from django.core.exceptions import ObjectDoesNotExist
from django.contrib.auth.models import Group
from django.contrib.auth.decorators import login_required
from django.template import RequestContext
from models import Note, Project
from django.shortcuts import render_to_re... | gpl-3.0 | 2,390,391,735,569,483,000 | 29.285714 | 247 | 0.601597 | false | 3.640687 | false | false | false |
ibest/GRC_Scripts | read_info.py | 1 | 3835 | #!/usr/bin/env python
"""
# Copyright 2013, Matt Settles
# Modified Aug 10, 2013
"""
from Bio import SeqIO
from optparse import OptionParser
import sys, os, os.path, time, gzip
from collections import Counter
## Parse options and setup ##
usage = "usage %prog -d [path to directory of raw reads]"
parser = OptionParse... | artistic-2.0 | -5,776,645,509,899,073,000 | 29.19685 | 142 | 0.605215 | false | 3.26661 | false | false | false |
ihabunek/toot | tests/test_config.py | 1 | 4923 | import os
import pytest
from toot import User, App, config
@pytest.fixture
def sample_config():
return {
'apps': {
'foo.social': {
'base_url': 'https://foo.social',
'client_id': 'abc',
'client_secret': 'def',
'instance': 'foo.soc... | gpl-3.0 | 5,020,795,922,674,533,000 | 34.417266 | 84 | 0.598212 | false | 3.425887 | true | false | false |
fls-bioinformatics-core/genomics | bcftbx/test/test_ngsutils.py | 1 | 7920 | #######################################################################
# Tests for ngsutils.py module
#######################################################################
import unittest
import os
import io
import tempfile
import shutil
import gzip
from bcftbx.ngsutils import *
from builtins import range
class Tes... | artistic-2.0 | 4,980,588,436,694,378,000 | 36.894737 | 133 | 0.573611 | false | 3.259259 | true | false | false |
jshufelt/volatility | volatility/plugins/malware/callbacks.py | 8 | 25250 | # Volatility
# Copyright (C) 2007-2013 Volatility Foundation
# Copyright (c) 2010, 2011, 2012 Michael Ligh <michael.ligh@mnin.org>
#
# This file is part of Volatility.
#
# Volatility 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... | gpl-2.0 | -1,730,338,783,978,873,900 | 38.147287 | 103 | 0.553822 | false | 4.060791 | false | false | false |
rohitwaghchaure/alec_frappe5_erpnext | erpnext/selling/custom_methods.py | 1 | 25465 | from __future__ import unicode_literals
import frappe
from frappe.utils import cint, cstr, flt, formatdate
from frappe.model.mapper import get_mapped_doc
from frappe import msgprint, _, throw
from erpnext.setup.utils import get_company_currency
import frappe.defaults
from frappe.desk.form.utils import get_linked_docs... | agpl-3.0 | -5,378,458,708,806,662,000 | 36.340176 | 241 | 0.693619 | false | 2.875776 | false | false | false |
solidfire/Python-CLI | element/cli/utils.py | 2 | 16761 | import jsonpickle
import json as serializer
from pkg_resources import Requirement, resource_filename
import os
import csv
from Crypto.Cipher import ARC4
import base64
import socket
import getpass
from solidfire.factory import ElementFactory
from filelock import FileLock
import sys
def kv_string_to_dict(kv_string):
... | apache-2.0 | -404,484,761,291,329,300 | 43.818182 | 201 | 0.629557 | false | 4.020389 | false | false | false |
sussexstudent/falmer | falmer/studentgroups/migrations/0005_auto_20170905_1151.py | 1 | 1091 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-09-05 10:51
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('matte', '0002_remoteimage'),
('studentgroups', '000... | mit | -7,897,777,460,002,123,000 | 28.486486 | 115 | 0.581118 | false | 4.228682 | false | false | false |
modimore/BreezeBlocks | examples/quickstart.py | 1 | 1696 | import sqlite3
from breezeblocks import Database
from breezeblocks.sql import Table
# Setup
db = Database(dsn="Library.sqlite", dbapi_module=sqlite3)
authors = Table("Author", ["id", "name"])
genres = Table("Genre", ["id", "name"])
books = Table("Book", ["id", "author_id", "genre_id", "title"])
# Query
get_all_author... | mit | 5,297,581,521,766,187,000 | 31.615385 | 76 | 0.679245 | false | 2.831386 | false | false | false |
spikeekips/serf-python | test/test_command_auth.py | 1 | 4108 | import serf
import pytest
from _base import FakeClient, FakeConnection
def test_request_auth () :
_body = dict(
AuthKey='auth-key',
)
_request = serf.get_request_class('auth')(**_body)
_request.check(FakeClient(), )
assert _request.is_checked
_body = dict(
AuthK... | mpl-2.0 | 1,739,868,179,361,525,200 | 24.202454 | 72 | 0.615871 | false | 3.575283 | true | false | false |
fmin2958/manwe | manwe/commands.py | 2 | 30978 | # -*- coding: utf-8 -*-
"""
Manwë command line interface.
Todo: Move some of the docstring from the _old_population_study.py file here.
.. moduleauthor:: Martijn Vermaat <martijn@vermaat.name>
.. Licensed under the MIT license, see the LICENSE file.
"""
import argparse
import getpass
import itertools
import os
imp... | mit | 7,411,989,852,363,706,000 | 31.604211 | 82 | 0.598696 | false | 3.758068 | true | false | false |
gfarnadi/FairPSL | debug/compare_fair_map/run_fpsl_pulp.py | 1 | 1338 | #!/usr/bin/env python
import os, sys
SCRIPTDIR = os.path.dirname(__file__)
ENGINDIR = os.path.join(SCRIPTDIR, '..', '..', 'engines')
sys.path.append(os.path.abspath(ENGINDIR))
from fpsl_pulp import fair_map_inference
PROBLEMDIR = os.path.join(SCRIPTDIR, '..', '..', 'problems', 'paper_review')
sys.path.append(os.path... | mit | -2,399,746,609,562,865,700 | 36.166667 | 87 | 0.603886 | false | 3.090069 | false | false | false |
tensorflow/tpu | models/official/mobilenet/supervised_images.py | 1 | 11789 | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -7,167,556,893,884,225,000 | 33.775811 | 80 | 0.656799 | false | 3.828841 | false | false | false |
spennihana/h2o-3 | h2o-py/tests/testdir_misc/pyunit_factoring.py | 5 | 2259 | from __future__ import print_function
from builtins import zip
import sys
sys.path.insert(1,"../../")
import h2o
from tests import pyunit_utils
from h2o import H2OFrame
from h2o.exceptions import H2OTypeError, H2OValueError
def compare_frames(expected, actual):
assert actual.shape == expected.shape
assert actu... | apache-2.0 | -4,928,311,135,687,874,000 | 35.435484 | 133 | 0.628597 | false | 3.090287 | false | false | false |
Rhombik/rhombik-object-repository | importer/views.py | 1 | 1798 | from django.http import HttpResponseRedirect#, HttpResponse
from importer.forms import ImportForm
from importer.tasks import ThingiProjectTask,ThingiUserTask
from django.shortcuts import get_object_or_404, render_to_response
from multiuploader.views import draftview
import re
''' nifty parse function performs all the ... | agpl-3.0 | -7,661,264,724,412,769,000 | 42.853659 | 203 | 0.656841 | false | 4.077098 | false | false | false |
255BITS/HyperGAN | examples/next-frame-wip.py | 1 | 22324 | import os
import uuid
import random
import tensorflow as tf
import hypergan as hg
import hyperchamber as hc
import numpy as np
import glob
import time
import re
from hypergan.viewer import GlobalViewer
from hypergan.samplers.base_sampler import BaseSampler
from hypergan.gan_component import ValidationException, GANComp... | mit | -7,698,782,246,398,737,000 | 36.021559 | 163 | 0.565848 | false | 3.516144 | true | false | false |
lukehsiao/SecretMessageMaker | SecretMessageMaker.py | 1 | 3306 | #! /usr/bin/env python
import sys, os, io, string
import argparse
def parse_args():
"""
Function: parse_args
--------------------
Parse the commandline arguments for SecretMessageMaker
"""
# Define what commandline arguments can be accepted
parser = argparse.ArgumentParser()
parser.add... | mit | -335,721,031,060,413,950 | 31.411765 | 80 | 0.613128 | false | 4.122195 | false | false | false |
onelab-eu/sfa | sfa/managers/registry_manager_openstack.py | 1 | 4232 | import types
# for get_key_from_incoming_ip
import tempfile
import os
import commands
from sfa.util.faults import RecordNotFound, AccountNotEnabled, PermissionError, MissingAuthority, \
UnknownSfaType, ExistingRecord, NonExistingRecord
from sfa.util.sfatime import utcparse, datetime_to_epoch
from sfa.util.prefixTr... | mit | 7,620,469,847,222,133,000 | 42.628866 | 162 | 0.648157 | false | 3.577346 | false | false | false |
xianjunzhengbackup/code | data science/machine_learning_for_the_web/chapter_7/server_movierecsys/books_recsys_app/management/commands/get_plotsfromtitles.py | 1 | 2962 | from django.core.management.base import BaseCommand
import os
import optparse
import numpy as np
import json
import pandas as pd
import requests
#python manage.py get_plotsfromtitles --input=/Users/andrea/Desktop/book_packt/chapters/5/data/utilitymatrix.csv --outputplots=plots.csv --outputumatrix='umatrix.csv'
class ... | mit | -2,961,374,809,798,989,300 | 43.223881 | 167 | 0.574274 | false | 3.970509 | false | false | false |
SpaceVim/SpaceVim | bundle/deoplete.nvim/test/rplugin/python3/deoplete/test_converter_reorder_attr.py | 2 | 1047 | from deoplete.filter.converter_reorder_attr import Filter
candidates = [
{'word': 'Apple', 'kind': 'Fruit'},
{'word': 'Banana', 'kind': 'Fruit'},
{'word': 'Pen', 'kind': 'Object'},
{'word': 'Cherry Pie', 'kind': 'Pie'},
]
def test_reorder():
candidates_copy = candidates[:]
preferred_order = ... | gpl-3.0 | -2,882,397,963,730,283,000 | 24.536585 | 57 | 0.541547 | false | 3.38835 | false | false | false |
AdrianArmaselu/aDi-music | graphmodel/appio/preprocessing.py | 1 | 1424 | import midi
import sys
from graphmodel.utils import MidiUtils
__author__ = 'Adisor'
class Analyzer(object):
"""
Class is used for analyzing, input curation, validation, and pre-processing a midi file before execution.
With this class, we can capture events that are not being processed or midi patterns th... | mit | -8,046,057,735,247,845,000 | 36.473684 | 109 | 0.572331 | false | 4.315152 | false | false | false |
newera912/WeatherTransportationProject | outputs/mesonetPlots/hourlyPatterns/graphPlot.py | 1 | 1771 | import matplotlib.pyplot as plt
import networkx as nx
import os
G=nx.Graph()
posp=[[0,0.1],[1,0.0],[2,0.1],[4,0.1],[6,0.25],[7,0.1],[8,0.25],[10,0],[12,0.0],[14,0.1]]
for node in range(10):
G.add_node(node,pos=(posp[node][0],posp[node][1]))
edges=[(0,1),(1,2),(2,3),(3,4),(3,5),(4,5),(4,6),(5,6),(5,7),(6,7),(7,8),(... | gpl-2.0 | 2,175,961,076,609,691,000 | 43.3 | 134 | 0.5048 | false | 3.156863 | false | false | false |
MOLSSI-BSE/basis_set_exchange | basis_set_exchange/curate/add_basis.py | 1 | 13528 | '''
Add a basis set to the library
'''
import os
import datetime
from ..fileio import read_json_basis, write_json_basis
from ..misc import expand_elements
from ..validator import validate_data
from ..skel import create_skel
from ..readers import read_formatted_basis_file
from .metadata import create_metadata_file
de... | bsd-3-clause | -6,095,067,406,082,727,000 | 37.431818 | 117 | 0.612803 | false | 4.423806 | false | false | false |
wolcomm/prngmgr | prngmgr/views/utils.py | 1 | 2529 | # Copyright 2016-2017 Workonline Communications (Pty) Ltd. All rights reserved.
#
# The contents of this file are 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/license... | apache-2.0 | 6,014,259,822,061,085,000 | 41.15 | 95 | 0.568604 | false | 4.468198 | false | false | false |
OlfillasOdikno/mctools | altExploit.py | 1 | 2070 | """
@author: OlfillasOdikno
@info: This tool was written in good faith. Please do not abuse this tool. Use it only with permission of the person/company you want to test.
@license:
/*****************************************************************************
* McTools ... | gpl-3.0 | 5,029,948,643,112,208,000 | 47.285714 | 142 | 0.452657 | false | 4.825175 | false | false | false |
Princessgladys/googleresourcefinder | tools/load_kml_hospitals.py | 1 | 1573 | from model import *
from setup import *
import datetime
import datetime
import kml
import re
import unicodedata
import utils
BEDS_RE = re.compile(r'(\d+) *[bB]eds')
def load_hospitals(version, records):
"""Loads a list of hospital records into the given version."""
arrondissement = DivisionType(
versi... | apache-2.0 | -7,513,072,806,892,976,000 | 29.843137 | 76 | 0.590591 | false | 3.874384 | false | false | false |
Letractively/timeside | timeside/core.py | 2 | 10798 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2009-2013 Parisson SARL
# Copyright (c) 2009 Olivier Guilyardi <olivier@samalyse.com>
#
# This file is part of TimeSide.
# TimeSide is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Softwar... | gpl-2.0 | -2,483,333,003,632,494,600 | 31.329341 | 91 | 0.590572 | false | 4.469371 | false | false | false |
algerbrex/Schemey | src/bytecode.py | 1 | 14432 | """
bytecode.py
----------------------------------------
Implementation of bytecode instructions. Also
includes the implementation of CodeObjects objects,
Instruction objects, and the serializer and deserializer
for the CodeObjects.
"""
from .utils import pack_integer, unpack_integer, pack_string, unpack_string, Str... | unlicense | -1,968,049,527,960,456,200 | 29.837607 | 108 | 0.59181 | false | 4.090703 | false | false | false |
SeanHayes/django-tastypie | tastypie/resources.py | 2 | 96092 | from __future__ import unicode_literals
from __future__ import with_statement
from copy import deepcopy
from datetime import datetime
import logging
from time import mktime
import warnings
from wsgiref.handlers import format_date_time
import django
from django.conf import settings
from django.conf.urls import patterns... | bsd-3-clause | 2,766,582,241,735,299,000 | 37.162033 | 213 | 0.60134 | false | 4.377568 | false | false | false |
Danielhiversen/home-assistant | homeassistant/components/switch/lutron_caseta.py | 4 | 1592 | """
Support for Lutron Caseta switches.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sitch.lutron_caseta/
"""
import logging
from homeassistant.components.lutron_caseta import (
LUTRON_CASETA_SMARTBRIDGE, LutronCasetaDevice)
from homeassistant.com... | mit | 7,844,480,755,282,230,000 | 29.615385 | 74 | 0.672739 | false | 3.593679 | false | false | false |
elin-moco/bedrock | bedrock/mozorg/urls.py | 1 | 3227 | # 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/.
from django.conf.urls import patterns, url
from util import page
import views
urlpatterns = patterns('',
url('^$', ... | mpl-2.0 | -4,273,601,811,822,576,000 | 52.783333 | 125 | 0.691044 | false | 3.302968 | false | true | false |
Gustavo6046/GusBot-2 | plugins/markov.py | 1 | 22353 | import json
import BeautifulSoup
import requests
import re
import time
import threading
import networkx as nx
import multiprocessing
import matplotlib.pyplot as plt
import glob
import os
import difflib
from plugincon import bot_command, easy_bot_command, get_message_target, get_bot_nickname
from random import choice, ... | mit | 8,187,108,142,967,812,000 | 26.160389 | 439 | 0.555675 | false | 3.830848 | false | false | false |
huangshiyu13/funnyLittleProgram | huatian-funny/huatian/train.py | 1 | 6822 | # -*- coding=utf8 -*-
"""
构建决策树
"""
from __future__ import division
from math import log
import operator
import matplotlib.pyplot as plt
from extension import mongo_collection, SALARY, EDUCATION, SATISFY
decision_node = dict(boxstyle="sawtooth", fc="0.8")
leaf_node = dict(boxstyle="round4", fc="0.8")
arrow_args = ... | apache-2.0 | 624,625,102,838,304,900 | 32.270936 | 91 | 0.585135 | false | 2.999112 | false | false | false |
eepp/sortmuz | sortmuz/app.py | 1 | 9337 | # The MIT License (MIT)
#
# Copyright (c) 2014 Philippe Proulx <eepp.ca>
#
# 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 us... | mit | 7,318,007,081,211,529,000 | 28.64127 | 80 | 0.520938 | false | 3.809466 | false | false | false |
yuanlisky/linlp | linlp/recognition/OrganizationRecognition.py | 1 | 2353 | # -*- coding: utf-8 -*-
from linlp.algorithm.Viterbi import viterbiRecognitionSimply
from linlp.algorithm.viterbiMat.prob_trans_organization import prob_trans as trans_p
from linlp.algorithm.viterbiMat.prob_emit_organization import prob_emit as emit_p
def organizationviterbiSimply(obs, DT, obsDT, debug):
if debug... | apache-2.0 | -8,138,178,052,148,569,000 | 37.627119 | 84 | 0.457218 | false | 2.852315 | false | false | false |
ianclegg/winrmlib | winrmlib/api/session.py | 1 | 8473 | # (c) 2015, Ian Clegg <ian.clegg@sourcewarp.com>
#
# winrmlib is 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 l... | apache-2.0 | 2,206,419,717,923,506,000 | 42.010152 | 112 | 0.659271 | false | 4.073558 | false | false | false |
genenetwork/pylmm_gn2 | pylmm_gn2/plink.py | 1 | 4036 | # Plink module
#
# Copyright (C) 2015 Pjotr Prins (pjotr.prins@thebird.nl)
# Some of the BED file parsing came from pylmm:
# Copyright (C) 2013 Nicholas A. Furlotte (nick.furlotte@gmail.com)
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public L... | agpl-3.0 | 1,433,418,620,599,991,000 | 36.719626 | 119 | 0.62116 | false | 3.116602 | false | false | false |
mmdg-oxford/papers | Schlipf-PRL-2018/model/epw_step.py | 1 | 1434 | from __future__ import print_function
from bose_einstein import bose_einstein
from constant import htr_to_K, htr_to_meV
import argparser
import norm_k
import numpy as np
import scf
import system
args = argparser.read_argument('Renormalize EPW calculation')
thres = args.thres / htr_to_meV
beta = htr_to_K / args.temp
wi... | gpl-3.0 | 6,837,800,266,492,713,000 | 24.607143 | 105 | 0.663877 | false | 2.463918 | false | false | false |
sSwiergosz/FinancialOrganiser | organizer_project/organizer/migrations/0015_auto_20170512_1208.py | 1 | 1520 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2017-05-12 10:08
from __future__ import unicode_literals
import datetime
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.s... | apache-2.0 | 1,351,537,851,008,599,800 | 40.081081 | 324 | 0.628947 | false | 3.979058 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.