repo_name stringlengths 5 92 | path stringlengths 4 221 | copies stringclasses 19
values | size stringlengths 4 6 | content stringlengths 766 896k | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 32 997 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 13.6 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
electrumalt/electrum-ixc | gui/qt/util.py | 1 | 6755 | from electrum_ixc.i18n import _
from PyQt4.QtGui import *
from PyQt4.QtCore import *
import os.path
import time
import traceback
import sys
import threading
import platform
if platform.system() == 'Windows':
MONOSPACE_FONT = 'Lucida Console'
elif platform.system() == 'Darwin':
MONOSPACE_FONT = 'Monaco'
else:
... | gpl-3.0 | -9,210,945,300,034,786,000 | 26.684426 | 133 | 0.610067 | false | 3.518229 | false | false | false |
kushalbhola/MyStuff | Practice/PythonApplication/env/Lib/site-packages/pandas/core/internals/construction.py | 1 | 26379 | """
Functions for preparing various inputs passed to the DataFrame or Series
constructors before passing them to a BlockManager.
"""
from collections import OrderedDict, abc
import numpy as np
import numpy.ma as ma
from pandas._libs import lib
from pandas._libs.tslibs import IncompatibleFrequency, OutOfBoundsDatetime... | apache-2.0 | -9,052,426,239,437,025,000 | 31.566667 | 88 | 0.585731 | false | 3.995002 | false | false | false |
michaelkuty/mbot | mbot/backends/slack.py | 1 | 3363 |
import logging
from mbot.event import Event
from mbot.state import User
from mbot.utils.packages import install_package
from .base import Dispatcher
LOG = logging.getLogger(__name__)
class Slack(Dispatcher):
"""Yet another simple bot
Uses slack RTM and calls middlewares for all messages
:param: sla... | mit | -8,143,825,461,480,550,000 | 25.480315 | 74 | 0.531966 | false | 4.311538 | false | false | false |
hiconversion/spark-ec2 | spark_ec2.py | 1 | 65557 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# 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 Lice... | apache-2.0 | 808,082,597,537,682,300 | 38.779733 | 173 | 0.574553 | false | 3.625539 | false | false | false |
grembo/ice | python/test/Ice/objects/TestI.py | 1 | 5256 | # **********************************************************************
#
# Copyright (c) 2003-2017 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# ICE_LICENSE file included in this distribution.
#
# ***********************************************************... | gpl-2.0 | 8,795,476,075,585,207,000 | 27.410811 | 92 | 0.599125 | false | 3.364917 | true | false | false |
kapteyn-astro/kapteyn | doc/source/EXAMPLES/kmpfit_compare_wei_unwei.py | 1 | 3993 | #!/usr/bin/env python
#------------------------------------------------------------
# Purpose: Demonstrate quality improvement weighted vs
# unweighted fit for Wolberg data. Wolberg's
# best fit parameters for a weighted fit is not
# accurate (a,b) = (1.8926, 4.9982)
# Improved val... | bsd-3-clause | 6,116,116,169,382,425,000 | 41.489362 | 79 | 0.611821 | false | 3.233198 | false | false | false |
dleecefft/pcapstats | pbin/pcapsessionslicer.py | 1 | 4562 | #!/usr/bin/env python
from scapy.all import *
import re, sys, getopt, shutil
def pcapsessions(pfile):
pssn = rdpcap(pfile)
return pssn
def fullstrsplit(ipportstr):
retlist=[]
sssnlist = ipportstr.split()
# stack up the list and split out the port values
retlist.append(sssnlist[0])
tmpip ... | apache-2.0 | 6,310,344,041,747,523,000 | 31.126761 | 134 | 0.531565 | false | 3.258571 | false | false | false |
NicoLugil/Yafa | python/TimedActions.py | 1 | 2411 | # Copyright 2014 Nico Lugil <nico at lugil dot be>
#
# This file is part of Yafa!
#
# Yafa! 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) any later vers... | gpl-3.0 | 1,210,667,763,575,287,800 | 29.1375 | 70 | 0.625052 | false | 3.808847 | false | false | false |
nsynapse/edison_cat | catserver/control/control_system.py | 1 | 1326 | #-*- coding:utf-8 -*-
from models import DBSystemInfo as DB
import psutil
class Control_System(object):
def __init__(self, request):
self.request = request
def __del__(self):
pass
def update(self):
if self.request.method == 'POST':
try:
_net_if... | mit | -5,306,238,310,272,985,000 | 32.175 | 89 | 0.435143 | false | 4.277419 | false | false | false |
helixyte/TheLMA | thelma/tools/libcreation/base.py | 1 | 10770 | """
This file is part of the TheLMA (THe Laboratory Management Application) project.
See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information.
Base classes and constants for library creation ticket.
AAB
"""
from thelma.tools.iso.poolcreation.base import StockSampleCreationLayout
from thelma.tools.u... | mit | 6,090,208,923,717,987,000 | 33.408946 | 80 | 0.644475 | false | 3.893709 | false | false | false |
ReddyLab/1000Genomes | make-intron-retention-slurms.py | 1 | 1769 | #!/usr/bin/env python
#=========================================================================
# This is OPEN SOURCE SOFTWARE governed by the Gnu General Public
# License (GPL) version 3, as described at www.opensource.org.
# Copyright (C)2017 William H. Majoros (martiandna@gmail.com).
#==============================... | gpl-2.0 | 681,284,877,154,889,300 | 35.854167 | 74 | 0.560204 | false | 3.693111 | false | false | false |
luisfg30/Webserver | tests/table (1).py | 1 | 1978 | from tkinter import *
class ExampleApp(Tk):
def __init__(self):
Tk.__init__(self)
list2=["Data","Página","Tipo de Resuisição"]
t = SimpleTable(self,list2)
t.pack(side="top", fill="x")
list=["abc","def","ghi"]
t.insert_row(list)
t.insert_row(list)
t.se... | gpl-2.0 | -3,464,466,802,696,428,000 | 29.875 | 117 | 0.547342 | false | 3.440767 | false | false | false |
eubr-bigsea/tahiti | migrations/versions/185a7d89aa72_remove_field_from_form_85.py | 1 | 3078 | """Remove Field from Form 85
Revision ID: 185a7d89aa72
Revises: 2eaeb4b0c43f
Create Date: 2018-04-17 14:28:35.098385
"""
import json
from alembic import op
from sqlalchemy import String, Integer, Text
from sqlalchemy.sql import table, column, text
# revision identifiers, used by Alembic.
revision = '185a7d89aa72'
d... | apache-2.0 | 9,139,908,008,826,830,000 | 30.408163 | 120 | 0.536387 | false | 2.937023 | false | false | false |
clach04/Stache | __init__.py | 1 | 17723 | from __future__ import generators
import sys
from cgi import escape
try:
raise ImportError
import itertools
itertools_takewhile = itertools.takewhile
except ImportError:
# fake it
def takewhile(predicate, iterable):
# takewhile(lambda x: x<5, [1,4,6,4,1]) --> 1 4
for x in iterable:... | mit | 7,108,883,387,215,044,000 | 37.444685 | 146 | 0.486092 | false | 4.115885 | false | false | false |
acrosby/get-git-hash | git.py | 1 | 1455 | #
# Copyright 2013 A.Crosby
# See LICENSE for license information
#
import subprocess, os
def subs(cmd):
p = subprocess.Popen(cmd, shell=True,
stdout = subprocess.PIPE,
stderr = subprocess.PIPE)
out = p.communicate()
if len(out[1])>0:
raise ValueErr... | mit | -6,748,326,175,159,556,000 | 27.529412 | 86 | 0.580069 | false | 3.352535 | false | false | false |
schwertfjo/PowerEnergyIC_CS5461_python2Driver | CS5461.py | 1 | 4234 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import RPi.GPIO as GPIO
import spidev
import time
class cs5461:
# define command bytes
sync0 = 254
sync1 = 255
reset = 128
compu = 232
# default settings
default_mode = 2
default_speed = 100000
default_inverted = True # due to optocou... | gpl-2.0 | 1,260,076,423,460,905,200 | 31.821705 | 101 | 0.549835 | false | 3.150298 | false | false | false |
tentangdata/ig | helpers.py | 1 | 1557 | import os
import yaml
class AppConfig(object):
DB_URL_TEMPLATE = "{}://{}:{}@{}:{}/{}"
def __init__(self, db_type,
db_host, db_port, db_name,
db_username, db_password,
file_in_dir, file_out_dir,
posts_dir):
self.db_type = db_type
... | mit | 8,782,905,886,537,452,000 | 24.966667 | 64 | 0.526012 | false | 3.571101 | true | false | false |
NationalSecurityAgency/ghidra | Ghidra/Extensions/SleighDevTools/pcodetest/build.py | 1 | 10519 | ## ###
# IP: GHIDRA
#
# 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 writin... | apache-2.0 | -260,404,642,648,897,020 | 32.823151 | 143 | 0.523624 | false | 3.431974 | false | false | false |
DirectlineDev/django-hitcounter | django_hitcounter/models.py | 1 | 2032 | # -*- coding: utf-8 -*-
from django.utils import timezone
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes.fields import GenericForeignKey
from django.db import models, transaction
from django.db.models import F
from django.utils.translation import ugettext_lazy as _
from dja... | apache-2.0 | -8,971,828,384,236,141,000 | 34.649123 | 99 | 0.622047 | false | 4.096774 | false | false | false |
z/xonotic-map-manager | xmm/util.py | 1 | 7782 | import configparser
import os
import sys
import json
import time
import hashlib
import subprocess
import urllib.request
from datetime import datetime
from shutil import copyfile
def convert_size(number):
"""
Convert and integer to a human-readable B/KB/MB/GB/TB string.
:param number:
integer to b... | mit | 841,026,930,794,236,800 | 23.626582 | 104 | 0.577101 | false | 3.785019 | true | false | false |
Panda3D-google-code-repositories/naith | game/plugins/dirlight/dirlight.py | 1 | 2667 | # -*- coding: utf-8 -*-
# Copyright Tom SF Haines, Aaron Snoswell
#
# 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 appl... | apache-2.0 | -1,823,117,428,801,273,600 | 37.1 | 147 | 0.673416 | false | 3.194012 | false | false | false |
johjeff/Python-Wesleyen | Week2/ProblemSet2.py | 1 | 11302 | # -ProblemSet2.py *- coding: utf-8 -*-
"""
Each problem will be a function to write.
Remember that you can execute just the code between the #%% signs by clicking
somewhere in that space and the using Ctrl-Enter (Cmd-Enter on Mac). An
alternative is to use the second toolbar green triangle or Menu>Run>Run c... | bsd-2-clause | -8,545,179,733,091,308,000 | 28.711957 | 81 | 0.656432 | false | 3.133352 | true | false | false |
kernsuite-debian/lofar | CEP/Pipeline/recipes/sip/nodes/setupsourcedb.py | 1 | 3286 | # LOFAR IMAGING PIPELINE
#
# setupsourcedb nodes recipe
# Marcel Loose, 2012
# loose@astr... | gpl-3.0 | -1,931,678,355,029,964,500 | 38.590361 | 88 | 0.460743 | false | 5.070988 | false | false | false |
Princessgladys/googleresourcefinder | lib/feedlib/geo.py | 1 | 2777 | # Copyright 2009-2010 by Ka-Ping Yee
#
# 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 w... | apache-2.0 | 188,185,627,319,149,760 | 41.075758 | 80 | 0.649982 | false | 3.551151 | false | false | false |
voxpupuli/puppetboard | puppetboard/utils.py | 1 | 3597 | from __future__ import absolute_import
from __future__ import unicode_literals
import json
import logging
import os.path
from distutils.util import strtobool
from flask import abort, request, url_for
from jinja2.utils import contextfunction
from pypuppetdb.errors import EmptyResponseError
from requests.exceptions imp... | apache-2.0 | -6,206,864,817,678,152,000 | 25.065217 | 79 | 0.615791 | false | 3.863588 | false | false | false |
CrazyBBer/Python-Learn-Sample | Modules/modules_BuiltIn.py | 1 | 1445 | #!/usr/bin/env python3
# -*- coding utf-8 -*-
__Author__ ='eamon'
'Modules Built-In'
from datetime import datetime
now = datetime.now()
print(now)
print(type(now))
dt=datetime(2015,10,5,20,1,20)
print(dt)
print(dt.timestamp())
t=1444046480.0
print(datetime.fromtimestamp(t))
print(datetime.utcfromtimestamp(t)... | mit | -5,883,119,671,976,176,000 | 15.802326 | 85 | 0.666436 | false | 2.5 | false | false | false |
nansencenter/sea_ice_drift | sea_ice_drift/seaicedrift.py | 1 | 3709 | # Name: seaicedrift.py
# Purpose: Container of SeaIceDrift class
# Authors: Anton Korosov, Stefan Muckenhuber
# Created: 21.09.2016
# Copyright: (c) NERSC 2016
# Licence:
# This file is part of SeaIceDrift.
# SeaIceDrift is free software: you can redistribute it and/or modify
# it under the terms of the... | gpl-3.0 | -6,663,547,883,015,826,000 | 41.147727 | 77 | 0.605284 | false | 3.727638 | false | false | false |
revcoin/revcoin | contrib/pyminer/pyminer.py | 1 | 6434 | #!/usr/bin/python
#
# Copyright (c) 2011 The Bitcoin developers
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
import time
import json
import pprint
import hashlib
import struct
import re
import base64
import httplib
import... | mit | -6,053,348,634,752,949,000 | 24.531746 | 84 | 0.648896 | false | 2.83062 | false | false | false |
DamnWidget/txorm | txorm/_compat/python2_.py | 1 | 1170 |
# Copyright (c) 2014 Oscar Campos <oscar.campos@member.fsf.org>
# See LICENSE for details
import re
import sys
import urlparse
try:
import cPickle as pickle
except ImportError:
import pickle
try:
import cStringIO as StringIO
except ImportError:
from StringIO import StringIO
_queryprog = None
def... | lgpl-3.0 | -8,705,973,143,589,217,000 | 21.5 | 71 | 0.582051 | false | 3.726115 | false | false | false |
imclab/confer | scripts/chi2013/prepare_paper_paper_graph_data.py | 1 | 4179 | #!/usr/bin/python
import sys, os, operator, numpy, MySQLdb, json
import matplotlib.pyplot as plt
from db import entity
from db import session
from collections import defaultdict
'''
@author: anant bhardwaj
@date: Feb 12, 2013
script for preparing data in lenskit format
'''
entities = entity.Entity().entities
sessi... | mit | -679,769,721,634,642,000 | 26.675497 | 139 | 0.639627 | false | 2.910167 | false | false | false |
leiferikb/bitpop | src/tools/perf/benchmarks/sunspider.py | 1 | 2047 | # Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import collections
import json
import os
from metrics import power
from telemetry import test
from telemetry.page import page_measurement
from telemetry.... | gpl-3.0 | -1,330,169,115,319,398,100 | 30.984375 | 79 | 0.674646 | false | 3.623009 | false | false | false |
arnaudcoquelet/myAvstServer | node_modules/soap/node_modules/node-expat/build/c4che/Release.cache.py | 1 | 1498 | AR = '/usr/bin/ar'
ARFLAGS = 'rcs'
CCFLAGS = ['-g']
CCFLAGS_MACBUNDLE = ['-fPIC']
CCFLAGS_NODE = ['-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64']
CC_VERSION = ('4', '4', '5')
COMPILER_CXX = 'g++'
CPP = '/usr/bin/cpp'
CPPFLAGS_NODE = ['-D_GNU_SOURCE']
CPPPATH_EXPAT.H = ['/usr/include', '/usr/local/include']
CPPPATH_NOD... | gpl-2.0 | -36,677,115,917,842,780 | 27.264151 | 65 | 0.619493 | false | 2.439739 | false | true | false |
eile/ITK | Modules/ThirdParty/pygccxml/src/pygccxml/declarations/mdecl_wrapper.py | 1 | 3186 | # Copyright 2004-2008 Roman Yakovenko.
# Distributed under the Boost Software License, Version 1.0. (See
# accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
"""
defines class L{mdecl_wrapper_t} that allows to work on set of declarations,
as it was one declaration.
The L{class<mdecl_... | apache-2.0 | 5,379,909,319,253,769,000 | 32.197917 | 85 | 0.603264 | false | 4.121604 | false | false | false |
Azure/azure-sdk-for-python | sdk/maintenance/azure-mgmt-maintenance/azure/mgmt/maintenance/aio/operations/_apply_updates_operations.py | 1 | 19789 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | mit | -6,968,445,616,262,737,000 | 47.148418 | 282 | 0.648188 | false | 4.369397 | true | false | false |
OpenBfS/dokpool-plone | Plone/src/docpool.users/docpool/users/browser/personalpreferences.py | 1 | 1961 | # -*- coding: utf-8 -*-
from docpool.users import DocpoolMessageFactory as _
from docpool.users.interfaces import IDocPoolUsersLayer
from plone.app.users.browser.account import AccountPanelSchemaAdapter
from plone.app.users.browser.personalpreferences import PersonalPreferencesPanel
from plone.autoform import directive... | gpl-3.0 | 1,532,422,157,962,041,600 | 31.147541 | 80 | 0.748598 | false | 4.043299 | false | false | false |
Kortemme-Lab/klab | klab/bio/pymolmod/scaffold_model_design.py | 1 | 9771 | #!/usr/bin/python
# encoding: utf-8
"""
scaffold_model_design.py
A PSE builder for scaffold/model/design structures.
Created by Shane O'Connor 2014.
The PyMOL commands are adapted from scripts developed and written by Roland A. Pache, Ph.D., Copyright (C) 2012, 2013.
"""
from klab.fs.fsio import write_file
from klab ... | mit | -6,901,978,881,668,865,000 | 37.624506 | 149 | 0.707911 | false | 3.203607 | false | false | false |
tchellomello/home-assistant | homeassistant/components/kodi/device_trigger.py | 1 | 2824 | """Provides device automations for Kodi."""
from typing import List
import voluptuous as vol
from homeassistant.components.automation import AutomationActionType
from homeassistant.components.device_automation import TRIGGER_BASE_SCHEMA
from homeassistant.const import (
ATTR_ENTITY_ID,
CONF_DEVICE_ID,
CON... | apache-2.0 | 1,542,951,620,193,615,400 | 29.365591 | 85 | 0.61296 | false | 3.994342 | true | false | false |
Jonwing/morphling | morphling/renderer.py | 1 | 4057 | # -*- coding: utf-8 -*-
import re
class Renderer(object):
'''
the default renderer for parser
'''
_escape_pattern = re.compile(r'&(?!#?\w+;)')
_not_allowed_schemes = ['javascript:', 'vbscript:']
# HTML tags
_p = 'p'
_tr = 'tr'
def __init__(self, **kwargs):
self._escape = ... | mit | 8,642,026,942,259,503,000 | 31.198413 | 93 | 0.539808 | false | 3.46456 | false | false | false |
knittledan/imageResizer | imageResizer.py | 1 | 6167 | # -*- coding: utf-8 -*-
#-------------------------------------------------------------------------------
# imageUtility.py
#-------------------------------------------------------------------------------
# Software License
# The Python Imaging Library (PIL) is
#
# Copyright © 1997-2011 by Secret Labs AB
# Copyrig... | mit | -2,618,635,322,029,660,700 | 31.967914 | 80 | 0.525061 | false | 4.168357 | false | false | false |
emmanvg/cti-stix-elevator | stix2elevator/stix_stepper.py | 1 | 3114 | import io
import json
import sys
from six import text_type
from stix2.pattern_visitor import create_pattern_object
def step_cyber_observable(obj):
type_name20 = obj["type"]
if type_name20 == "file":
obj.pop("is_encrypted", None)
obj.pop("encryption_algorithm", None)
obj.pop("decryptio... | bsd-3-clause | -5,713,456,181,478,497,000 | 33.21978 | 119 | 0.571291 | false | 3.72043 | false | false | false |
matejc/searx | searx/engines/bing_images.py | 1 | 3090 | """
Bing (Images)
@website https://www.bing.com/images
@provide-api yes (http://datamarket.azure.com/dataset/bing/search),
max. 5000 query/month
@using-api no (because of query limit)
@results HTML (using search portal)
@stable no (HTML can change)
@parse url, title, img_src
... | agpl-3.0 | 4,278,168,107,756,276,700 | 27.878505 | 97 | 0.572492 | false | 3.523375 | false | false | false |
kcleong/rover_challenge | tests/test_grid.py | 1 | 1349 | # -*- coding: utf-8 -*-
from challenge.grid import Grid
from challenge.rover import Rover
import unittest
class GridTestSuite(unittest.TestCase):
"""Advanced test cases."""
def test_instantion(self):
""" Test if we can instantiate a grid object """
grid = Grid(5, 5)
self.assertEqual(... | mit | 6,842,073,942,312,527,000 | 24.471698 | 76 | 0.576723 | false | 3.706044 | true | false | false |
bixbydev/Bixby | util/sqltocsv.py | 1 | 1559 |
#!/usr/bin/python
#------------------------------------------------------------------------------
# Copyright (C) 2013 Bradley Hilton <bradleyhilton@bradleyhilton.com>
#
# Distributed under the terms of the GNU GENERAL PUBLIC LICENSE V3.
#_______________________________________________________________________... | gpl-3.0 | -5,794,217,589,997,273,000 | 31.479167 | 125 | 0.627967 | false | 3.352688 | false | false | false |
GitAcrown/Kreybot | Krey/cogs/economy.py | 1 | 27235 | import discord
from discord.ext import commands
from cogs.utils.dataIO import dataIO, fileIO
from collections import namedtuple, defaultdict
from datetime import datetime
from random import randint
from copy import deepcopy
from .utils import checks
from __main__ import send_cmd_help
import os
import time
im... | mit | 8,481,619,921,465,153,000 | 42.147967 | 178 | 0.562226 | false | 3.675014 | false | false | false |
shundread/pyweek24 | gamelib/main.py | 1 | 3587 | '''Game main module.
Contains the entry point used by the run_game.py script.
Feel free to put all your game code here, or in other modules in this "gamelib"
package.
'''
import json
import pygame
import data
import engine
class Game(object):
'''A class that delegates its engine functionalities to a hot-swappab... | gpl-3.0 | -8,235,789,348,464,003,000 | 27.927419 | 79 | 0.539448 | false | 4.385086 | false | false | false |
zardus/idalink | idalink/server.py | 1 | 1521 | # -*- coding: utf-8 -*-
# Copyright (C) 2013- Yan Shoshitaishvili aka. zardus
# Ruoyu Wang aka. fish
# Audrey Dutcher aka. rhelmot
# Kevin Borgolte aka. cao
from __future__ import print_function
# idc is just within IDA, so make pylint stop complaining
impo... | bsd-2-clause | 7,068,586,202,755,159,000 | 32.065217 | 98 | 0.627876 | false | 3.328228 | false | false | false |
egbertbouman/tribler-g | Tribler/Category/TestCategory.py | 1 | 4853 | # Written by Yuan Yuan
# see LICENSE.txt for license information
import sys, os
execpath = os.path.join(os.path.abspath(os.path.dirname(sys.argv[0])), '..', '..')
sys.path.append(execpath)
#print sys.path
from Utility.utility import getMetainfo
from Tribler.Category.Category import Category
DEBUG = False
... | lgpl-2.1 | 2,244,882,841,439,192,600 | 30.790541 | 101 | 0.535957 | false | 3.632485 | false | false | false |
TargetHolding/pyspark-elastic | python/setup.py | 1 | 1149 | #!/usr/bin/env python
import os
from setuptools import setup, find_packages
basedir = os.path.dirname(os.path.abspath(__file__))
os.chdir(basedir)
def f(*path):
return open(os.path.join(basedir, *path))
setup(
name='pyspark_elastic',
maintainer='Frens Jan Rumph',
maintainer_email='frens.jan.rumph@target-holdi... | apache-2.0 | 3,498,440,906,200,967,700 | 26.357143 | 80 | 0.700609 | false | 3.399408 | false | false | false |
Mirantis/pumphouse | pumphouse/_vendor/fuelclient/cli/actions/role.py | 1 | 1906 | # Copyright 2014 Mirantis, 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 ... | apache-2.0 | 6,900,483,627,728,180,000 | 31.862069 | 78 | 0.58447 | false | 4.351598 | false | false | false |
alexey-ernest/ml-for-trading | cumulative_returns.py | 1 | 1740 |
import os
import pandas as pd
import matplotlib.pyplot as plt
def symbol_to_path(symbol, base_dir="data"):
"""Return CSV file path given ticker symbol."""
return os.path.join(base_dir, "{}.csv".format(str(symbol)))
def get_data(symbols, dates):
"""Read stock data (adjusted close) for given symbols from ... | mit | -1,047,409,870,784,264,300 | 29.526316 | 85 | 0.613793 | false | 3.486974 | false | false | false |
better-dem/geo_feedback | survey/migrations/0001_initial.py | 1 | 3777 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.8 on 2016-10-14 21:45
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.Creat... | agpl-3.0 | -8,674,803,448,750,544,000 | 40.966667 | 210 | 0.568705 | false | 4.459268 | false | false | false |
DirkHoffmann/indico | indico/modules/events/requests/base.py | 1 | 7309 | # This file is part of Indico.
# Copyright (C) 2002 - 2021 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from flask_pluginengine import plugin_context
from wtforms.fields import SubmitField, TextAreaField
from ... | gpl-3.0 | 3,155,499,741,189,574,000 | 36.290816 | 116 | 0.658093 | false | 4.301942 | false | false | false |
tholewebgods/jenkins-scripts | jobs/syncgit.py | 1 | 10188 | import json
import re
import datetime
import time
import os
import os.path
import dulwich.repo
import jenkinscli
import xml.etree.ElementTree as ET
import sys
import argparse
import textwrap
# This script will create jobs for each remote branch found in the repository
# in the current directory. It will also remove th... | mit | 2,865,741,185,627,415,000 | 31.037736 | 132 | 0.688457 | false | 3.171856 | true | false | false |
agacek/camkes-tool | camkes/runner/NameMangling.py | 1 | 12529 | #
# Copyright 2014, NICTA
#
# This software may be distributed and modified according to the terms of
# the BSD 2-Clause license. Note that NO WARRANTY is provided.
# See "LICENSE_BSD2.txt" for details.
#
# @TAG(NICTA_BSD)
#
'''This code manages the name mangling (and reversal of such) that needs to
happen in the temp... | bsd-2-clause | -1,779,961,257,078,954,200 | 45.576208 | 93 | 0.621758 | false | 3.759076 | false | false | false |
JavaCardOS/pyResMan | pyResMan/Dialogs/pyResManCommandDialog_MifareAuthentication.py | 1 | 3904 | # -*- coding: utf-8 -*-
'''
Modified on 2017-03-28
@author: javacardos@gmail.com
@organization: https://www.javacardos.com/
@copyright: JavaCardOS Technologies. All rights reserved.
'''
from pyResMan.BaseDialogs.pyResManCommandDialogBase_MifareAuthentication import CommandDialogBase_MifareAuthentication
from pyResMa... | gpl-2.0 | -8,872,457,769,474,260,000 | 32.367521 | 118 | 0.574795 | false | 4.162047 | false | false | false |
fofix/fretwork | fretwork/midi/constants.py | 1 | 6316 | # -*- coding: utf-8 -*-
"""
A collection of constants from the midi spec.
"""
###################################################
## Midi channel events (The most usual events)
## also called "Channel Voice Messages"
NOTE_OFF = 0x80
# 1000cccc 0nnnnnnn 0vvvvvvv (channel, note, velocity)
NOTE_ON = 0x90
# 1001cccc 0... | gpl-2.0 | 6,677,587,943,104,313,000 | 29.365385 | 144 | 0.611463 | false | 2.817128 | false | false | false |
COSMOGRAIL/COSMOULINE | pipe/modules/readandreplace_fct.py | 1 | 2009 | def justreplace(inputstring, repdict):
template = inputstring
for key, value in repdict.iteritems():
template = template.replace(key, value)
return template
def justread(inputfilename):
import sys
import os
infile = open(inputfilename, 'r')
content = infile.read()
infile.close()
return content
#Tr... | gpl-3.0 | 1,196,499,792,120,505,900 | 21.829545 | 102 | 0.649079 | false | 2.703903 | false | false | false |
Eksmo/calibre | src/calibre/gui2/dialogs/conversion_error_ui.py | 1 | 2280 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '/home/gugu/w/calibre/src/calibre/gui2/dialogs/conversion_error.ui'
#
# Created: Thu Jul 19 23:32:30 2012
# by: PyQt4 UI code generator 4.9.1
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:... | gpl-3.0 | 6,277,705,584,022,447,000 | 45.530612 | 120 | 0.716228 | false | 3.68932 | false | false | false |
research-team/NEUCOGAR | NEST/cube/integration/excitement/synapses.py | 1 | 3707 | from keys import *
from simulation_params import *
import nest
import numpy.random as random
# Neuron parameters
hh_neuronparams = {'E_L': -70., # Resting membrane potential in mV
'V_T': -63., # Voltage offset that controls dynamics.
# -63mV ... | gpl-2.0 | -8,908,638,224,511,350,000 | 38.021053 | 118 | 0.488535 | false | 3.394689 | false | false | false |
Weihonghao/ECM | Vpy34/lib/python3.5/site-packages/theano/ifelse.py | 1 | 30209 | """
IfElse introduces lazy evaluation in Theano (coupled with the CVM/VM
linkers). It resembles the if clause of any programming language, that
has a `then` and `else` branch, and executes either one or the other
according to the condition provided.
This op differs from the already existent `switch` op, that evaluates... | agpl-3.0 | -1,317,404,698,973,674,000 | 37.581098 | 82 | 0.543646 | false | 3.826831 | false | false | false |
ReactiveX/RxPY | rx/core/operators/exclusive.py | 1 | 2032 | from typing import Callable
import rx
from rx.core import Observable
from rx.disposable import CompositeDisposable, SingleAssignmentDisposable
from rx.internal.utils import is_future
def _exclusive() -> Callable[[Observable], Observable]:
"""Performs a exclusive waiting for the first to finish before
subscri... | mit | -6,735,326,453,861,305,000 | 34.034483 | 108 | 0.557579 | false | 4.747664 | false | false | false |
rmcgibbo/nebterpolator | nebterpolator/smoothing.py | 1 | 6493 | """Smoothing a 1d signal
"""
##############################################################################
# Imports
##############################################################################
# library imports
import numpy as np
from scipy.optimize import leastsq
from scipy.signal import lfilter, lfilter_zi, fil... | gpl-3.0 | 7,068,469,299,697,415,000 | 31.465 | 79 | 0.574003 | false | 3.869487 | false | false | false |
DYFeng/pyaiml | aiml/Kernel.py | 1 | 46819 | # -*- coding: latin-1 -*-
"""This file contains the public interface to the aiml module."""
import AimlParser
import DefaultSubs
import Utils
from PatternMgr import PatternMgr
from WordSub import WordSub
from ConfigParser import ConfigParser
import copy
import glob
import os
import random
import re
import string
impor... | bsd-2-clause | -5,386,696,871,265,022,000 | 38.543074 | 139 | 0.589312 | false | 4.289418 | true | false | false |
jsa4000/OpenGL-Python | zero/core/engine.py | 1 | 4721 | import time
from .base import Thread
from .controllers import DisplayController, DeviceController
from ..system import InputManager, SceneManager, RenderManager
__all__ = ['CoreEngine']
class CoreEngine(Thread):
""" Core Engine Class
This class is the main loop of the process that will manage all
... | apache-2.0 | -1,644,156,547,459,216,400 | 31.115646 | 81 | 0.61703 | false | 4.75428 | false | false | false |
sky111144/nicoBookworld | server/app/blueprint/home.py | 1 | 12289 | #!/usr/bin/python
#coding=utf-8
from flask import Blueprint,render_template,make_response,redirect,request,g,jsonify
from flask import session as flaskSession
from sqlalchemy import distinct,desc,or_
from app.model.base import User,Site,Novel,Shelf,Comment,Message
from novelSpider.task import createDownloader
def obje... | apache-2.0 | 5,621,720,612,245,947,000 | 29.982143 | 110 | 0.545492 | false | 3.60172 | false | false | false |
jepler/linuxcnc-mirror | configs/by_machine/plasmac/pmx485.py | 4 | 9722 | #!/usr/bin/env python2
'''
pmx485.py
Copyright (C) 2019 2020 Phillip A Carter
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.... | lgpl-2.1 | -3,219,997,986,610,003,500 | 37.275591 | 119 | 0.528595 | false | 3.724904 | false | false | false |
honzajavorek/python.cz | pythoncz/models/meetups.py | 1 | 2352 | from functools import lru_cache
from lxml import html
import requests
from slugify import slugify
__all__ = ('get_meetups',)
WIKI_URL = ('https://cs.wikipedia.org/wiki/'
'Seznam_m%C4%9Bst_v_%C4%8Cesku_podle_po%C4%8Dtu_obyvatel')
@lru_cache()
def get_meetups(lang='cs'):
return sort_by_city_size(scr... | mit | -6,805,475,397,628,776,000 | 32.6 | 79 | 0.642007 | false | 3.253112 | false | false | false |
peoplepower/botlab | com.ppc.Microservices/intelligence/dailyreport/location_dailyreport_microservice.py | 1 | 26353 | '''
Created on November 20, 2019
This file is subject to the terms and conditions defined in the
file 'LICENSE.txt', which is part of this source code package.
@author: David Moss
'''
from intelligence.intelligence import Intelligence
import domain
import json
import utilities.utilities as utilities
import signals.... | apache-2.0 | 9,092,760,513,962,145,000 | 39.111111 | 191 | 0.567222 | false | 4.227302 | false | false | false |
miumok98/weblate | weblate/billing/admin.py | 1 | 1644 | # -*- coding: utf-8 -*-
#
# Copyright © 2012 - 2015 Michal Čihař <michal@cihar.com>
#
# This file is part of Weblate <http://weblate.org/>
#
# 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, eithe... | gpl-3.0 | -1,565,841,120,037,533,000 | 31.176471 | 71 | 0.69287 | false | 3.68764 | false | false | false |
smithchristian/arcpy-create-base-dataset | supportingModules/pln.py | 1 | 2508 | # ----------------------------------------------------------------------------
# Name: pln.py (Planning.py)
# Purpose: This module contains variables for the construction
# of a planning dataset. This module is to be used in
# conjunction with create-Base-DataSet/main.py.
#... | mit | 7,385,860,457,291,931,000 | 33.828571 | 80 | 0.544657 | false | 4.159204 | false | false | false |
smc170/fam-study-password | game_code.py | 1 | 2177 | """
Family Study Password - The Biblical Game
Copyright (C) 2013 Spencer Caesare
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
(at your option) any later ver... | gpl-3.0 | -7,751,935,000,141,383,000 | 23.738636 | 104 | 0.726229 | false | 3.36476 | false | false | false |
lcy-seso/models | fluid/icnet/_ce.py | 1 | 1308 | # this file is only used for continuous evaluation test!
import os
import sys
sys.path.append(os.environ['ceroot'])
from kpi import CostKpi, DurationKpi, AccKpi
# NOTE kpi.py should shared in models in some way!!!!
train_cost_kpi = CostKpi('train_cost', 0.05, 0, actived=True)
train_duration_kpi = DurationKpi('train_... | apache-2.0 | 771,536,410,682,091,400 | 21.947368 | 73 | 0.603211 | false | 2.900222 | false | false | false |
dajuno/nmrpy | mri0D.py | 1 | 9879 | # -*- coding: utf8 -*-
'''
Simulate magnetization of one group of nuclear spins "0D"
solving the Bloch equation within a frame of reference rotating with w_rf
dM/dt = g*(M x B) + relax
M: magnetization
B: applied magnetic field = B_0 + B_RF + B_G
g: gyromagnetic ratio
relax: T1, T2 relaxation terms '''
# TODO: [ ] ... | mit | 2,515,762,664,697,472,000 | 29.760125 | 79 | 0.50081 | false | 2.657158 | false | false | false |
ctuning/ck-env | soft/lib.papi/customize.py | 1 | 2808 | #
# Collective Knowledge (individual environment - setup)
#
# See CK LICENSE.txt for licensing details
# See CK COPYRIGHT.txt for copyright details
#
# Developer: Grigori Fursin, Grigori.Fursin@cTuning.org, http://fursin.net
#
import os
##############################################################################
# ... | bsd-3-clause | -5,265,577,132,017,976,000 | 24.297297 | 97 | 0.503561 | false | 3.536524 | false | false | false |
CanalTP/navitia | source/jormungandr/tests/integration_tests_settings.py | 1 | 2752 | # encoding: utf-8
# Copyright (c) 2001-2018, Canal TP and/or its affiliates. All rights reserved.
#
# This file is part of Navitia,
# the software to build cool stuff with public transport.
#
# powered by Canal TP (www.canaltp.fr).
# Help us simplify mobility and open public transport:
# a non ending quest ... | agpl-3.0 | 7,036,363,262,379,790,000 | 34.74026 | 105 | 0.706759 | false | 3.323671 | false | false | false |
SymbiFlow/prjxray | fuzzers/005-tilegrid/bram_block/top.py | 1 | 1635 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017-2020 The Project X-Ray Authors.
#
# Use of this source code is governed by a ISC-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/ISC
#
# SPDX-License-Identifier: ISC
import os
import random
random.seed(i... | isc | 4,388,151,815,182,200,000 | 24.546875 | 79 | 0.549847 | false | 3.283133 | false | false | false |
keepokeepo/MITx-6.00.1x-Introduction-to-Computer-Science-and-Programming-Using-Python | PSET 4/ps4b.py | 1 | 6456 | from ps4a import *
import time
#
#
# Computer chooses a word
#
#
def compChooseWord(hand, wordList, n):
"""
Given a hand and a wordList, find the word that gives
the maximum value score, and return it.
This word should be calculated by considering all the words
in the wordList.
If no words ... | mit | 3,707,142,585,639,417,000 | 34.668508 | 125 | 0.568154 | false | 4.388851 | false | false | false |
3dfxsoftware/cbss-addons | hr_payroll_pay_generator/wizard/generator_wizard.py | 1 | 1675 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Addons modules by CLEARCORP S.A.
# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>).
#
# This program is free software: you can redistribute... | gpl-2.0 | 7,269,671,319,546,851,000 | 44.297297 | 110 | 0.633433 | false | 3.913551 | false | false | false |
ccressent/acnav | DAT/Block.py | 1 | 3076 | """
Parse DAT files blocks and traverse block chains.
"""
from binascii import hexlify
from struct import unpack_from
from DAT.Header import Header
class Block:
"""
A block making up a chunk of a Directory in a DAT file.
"""
def __init__(self, filename=None, offset=None, size=None, next_block_offse... | mit | 8,332,130,015,601,070,000 | 26.221239 | 97 | 0.540637 | false | 3.913486 | false | false | false |
rjschwei/azure-sdk-for-python | azure-mgmt-authorization/azure/mgmt/authorization/models/classic_administrator.py | 1 | 1424 | # 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 | -2,572,937,800,584,470,000 | 34.6 | 86 | 0.589888 | false | 4.395062 | false | false | false |
bth/stools | stools/Machine.py | 1 | 4555 | # -*- coding: utf-8 -*-
"""
Module for machine
"""
import paramiko
import re, string
class Machine(object):
"""
Representation of a machine
"""
def __init__(self, name, ip, username, password, gateway="", prompt=None):
"""
Create a new Machine object
:param n... | gpl-2.0 | 7,681,146,573,439,596,000 | 32.992537 | 94 | 0.574973 | false | 4.527833 | false | false | false |
svn2github/pylucene | test3/test_PyLuceneThread.py | 1 | 3930 | # ====================================================================
# 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 re... | apache-2.0 | -3,566,141,051,861,162,500 | 32.02521 | 79 | 0.597455 | false | 4.194237 | true | false | false |
NuGrid/NuGridPy | nugridpy/astronomy.py | 1 | 11926 | """
============
astronomy.py
============
Useful functions for astronomy & astrophysics
"""
from functools import update_wrapper
import numpy as np
from scipy import integrate
from . import constants as cs
class ReadOnlyConstants:
"""Callable class for attaching constants as read-only property to a function... | bsd-3-clause | -490,455,445,624,667,840 | 19.84965 | 99 | 0.551149 | false | 3.103305 | false | false | false |
thimslugga/apistar | apistar/commands/new.py | 1 | 1588 | import os
import shutil
import sys
import click
import apistar
from apistar import schema
APISTAR_PACKAGE_DIR = os.path.dirname(apistar.__file__)
LAYOUTS_DIR = os.path.join(APISTAR_PACKAGE_DIR, 'layouts')
LAYOUT_CHOICES = os.listdir(LAYOUTS_DIR)
IGNORED_DIRECTORIES = ['__pycache__']
class TargetDir(schema.String):... | bsd-3-clause | 8,955,669,424,910,434,000 | 28.407407 | 81 | 0.648615 | false | 3.521064 | false | false | false |
BEugen/AI | KTF/evaluation_ktf_test.py | 1 | 4967 | # from pip import models
import numpy as np
import sys
import os
import argparse
###################################################################
# Variables #
# When launching project or scripts from Visual Studio, #
# input_dir and output_dir are pa... | gpl-3.0 | 7,968,917,967,813,314,000 | 35.240876 | 100 | 0.550856 | false | 3.716317 | false | false | false |
binho/myservertalks | MySTInstruct.py | 1 | 1607 | #!/usr/bin/python
# -*- coding: utf-8 -*-
'''
This file is part of MyServerTalks.
MyServerTalks 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 opt... | gpl-2.0 | -1,327,910,839,982,942,700 | 29.320755 | 124 | 0.685128 | false | 3.652273 | false | false | false |
xdutaotao/ntlmaps | lib/www_client.py | 1 | 4899 | #--coding:utf-8--
# This file is part of 'NTLM Authorization Proxy Server'
# Copyright 2001 Dmitry A. Rozmanov <dima@xenon.spb.ru>
#
# NTLM APS 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 ... | gpl-2.0 | -9,079,188,218,544,254,000 | 43.135135 | 100 | 0.585834 | false | 3.957189 | false | false | false |
Hanaasagi/sorator | tests/orm/test_model_global_scopes.py | 1 | 4366 | # -*- coding: utf-8 -*-
from . import DatabaseConnectionResolver
from .. import OratorTestCase
from orator.orm.scopes import Scope
from orator import Model
class ModelGlobalScopesTestCase(OratorTestCase):
@classmethod
def setUpClass(cls):
Model.set_connection_resolver(DatabaseConnectionResolver())
... | mit | 1,183,138,807,027,126,800 | 27.167742 | 122 | 0.593907 | false | 3.846696 | true | false | false |
sushant-hiray/teamflowy | blog/migrations/0001_initial.py | 1 | 2900 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Blog'
db.create_table(u'blog_blog', (
('Id', self.gf('django.db.models.fields.Au... | mit | 6,557,216,391,598,298,000 | 45.047619 | 107 | 0.557241 | false | 3.638645 | false | false | false |
devilry/devilry-django | devilry/devilry_admin/views/assignment/crinstance_assignment.py | 1 | 4933 | from devilry.apps.core.models import Assignment
from devilry.devilry_account.models import PeriodPermissionGroup
from devilry.devilry_admin.cradminextensions import devilry_crmenu_admin
from devilry.devilry_admin.views.assignment import overview
from devilry.devilry_admin.views.assignment.examiners import add_groups_to... | bsd-3-clause | -3,565,089,393,286,813,700 | 45.980952 | 112 | 0.715792 | false | 3.728647 | false | false | false |
rexdf/Chinese-Localization | Localization.py | 1 | 6325 | import sublime
import sublime_plugin
import os
from hashlib import md5
__version__ = "1.7.2"
CONFIG_NAME = "Localization.sublime-settings"
LANGS = {
"ZH_CN": {
'zipfile': 'ZH_CN.zip',
'syntax_md5sum': '44cd99cdd8ef6c2c60c0a89d53a40b95'
},
"ZH_TW": {
"zipfile": "ZH_T... | mit | 6,037,125,774,624,771,000 | 29.242574 | 77 | 0.586278 | false | 3.299007 | true | false | false |
lukaslueg/wirepy | wirepy/lib/column.py | 1 | 12746 | '''Wireshark displays generic information about a packet's content in it's GUI
using a set of columns. Each column has one of several pre-defined column-types
which ``libwireshark`` knows about and fills with content while dissecting a
packets. This allows dissectors of all kinds to provide information about a
packet, ... | gpl-3.0 | -2,718,258,804,250,527,000 | 42.20678 | 79 | 0.597442 | false | 3.557354 | false | false | false |
sukuba/js-py-ngram-full-text-search | test2_jsngram.py | 1 | 1764 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# written for python 3 but also run on python 2
from __future__ import absolute_import, division, print_function, unicode_literals
import os
import shutil
import jsngram.jsngram
import jsngram.dir2
import jsngram.text2
def test():
base_dir = os.path.realpath('/scratc... | mit | 6,650,857,769,097,815,000 | 29.807018 | 82 | 0.58713 | false | 3.357553 | false | false | false |
sukeesh/Jarvis | jarviscli/plugins/stock.py | 1 | 7341 | import requests
from plugin import plugin
from colorama import Fore
from inspect import cleandoc
import re
@plugin('stock')
class Stock:
"""
stock <stock_id> : Get details of stock identified by <stock_id>(one id at a time)
stock getid : Search stock id
stock profile <stock_... | mit | 7,597,438,638,204,117,000 | 43.75 | 134 | 0.528682 | false | 3.876915 | false | false | false |
takashi-suehiro/rtmtools | rtc_handle_example/cin/cin.py | 1 | 5056 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# -*- Python -*-
"""
\file cin.py
\brief an example RTC for rtc_handle
\date $Date$
"""
import sys
import time
sys.path.append(".")
# Import RTM module
import RTC
import OpenRTM_aist
# Import Service implementation class
# <rtc-template block="service_impl">
# </rt... | mit | 8,142,501,798,067,403,000 | 17.252708 | 70 | 0.630736 | false | 2.692226 | false | false | false |
jregalad-o/scripts | extract_kmers.py | 1 | 2494 | ###############################################################################
# Julian Regaldo
# julian.regalado@tuebingen.mpg.de
#
# Extact all kmers of length K from a reference sequence
###############################################################################
import sys
import random
import hashlib
def err... | mit | 566,555,367,325,854,100 | 24.44898 | 79 | 0.497594 | false | 3.767372 | false | false | false |
Alberto-Beralix/Beralix | i386-squashfs-root/usr/lib/ubiquity/plugins/ubi-wireless.py | 1 | 5701 | # -*- coding: utf-8; Mode: Python; indent-tabs-mode: nil; tab-width: 4 -*-
# Copyright (C) 2010 Canonical Ltd.
# Written by Evan Dandrea <evan.dandrea@canonical.com>
#
# 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 Fre... | gpl-3.0 | 2,619,777,803,315,187,000 | 38.317241 | 92 | 0.632871 | false | 3.961779 | false | false | false |
landier/imdb-crawler | crawler/libs/sqlalchemy/dialects/mssql/zxjdbc.py | 1 | 2550 | # mssql/zxjdbc.py
# Copyright (C) 2005-2012 the SQLAlchemy authors and contributors <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Support for the Microsoft SQL Server database via the zxjdbc JDBC
connector.
JDBC ... | gpl-3.0 | 7,793,973,673,749,884,000 | 33 | 84 | 0.658824 | false | 3.959627 | false | false | false |
rocian/AdventOfCode2016 | 08/solutions.py | 1 | 5519 | #!/usr/bin/env python3
"""
https://adventofcode.com/2016
--- Day 8: Two-Factor Authentication ---
You come across a door implementing what you can only assume is an
implementation of two-factor authentication after a long game of requirements
telephone.
To get past the door, you first swipe a keycard (no problem; t... | gpl-3.0 | -1,507,390,072,424,425,200 | 29.65 | 89 | 0.65126 | false | 3.634387 | false | false | false |
davipeterlini/routeflow_tcc | rflib/ipc/MongoIpc.py | 1 | 11834 | import rflib.ipc.RFProtocol as RFProtocol
import bson
import threading
import pymongo as mongo
import time
import sys
from rflib.ipc.Ipc import Ipc
from rflib.ipc.MongoUtils import MongoFactory
from rflib.defs import *
FIELD_NAME_ID = "_id"
FIELD_NAME_FROM = "from"
FIELD_NAME_TO = "to"
FIELD_NAME_TYPE = "type"
FIELD_... | apache-2.0 | -1,613,797,404,470,370,000 | 43.656604 | 164 | 0.532787 | false | 3.975143 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.