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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Rhoana/rh_aligner | old/template_matching_vis.py | 1 | 1661 | # Setup
import numpy as np
import json
import sys
import matplotlib
matplotlib.use('GTK')
import matplotlib.pyplot as plt
from pylab import axis
def main(jsonfile):
with open(jsonfile) as data_file1:
data1 = json.load(data_file1)
pms = data1['pointmatches']
pointmatches = []
for i in range(0,... | mit | 1,634,532,390,849,737,500 | 34.340426 | 104 | 0.608067 | false | 2.950266 | false | false | false |
alexbevi/scummvm | devtools/create_bladerunner/subtitles/quotesSpreadsheetCreator/sortBladeRunnerWavs02.py | 1 | 57514 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# Created by Praetorian (ShadowNate) for Classic Adventures in Greek
# classic.adventures.in.greek@gmail.com
#
# DONE Add code and switch option: to get the blade runner installation directory as input, then find the TLK files and export them with proper naming
# DONE fix... | gpl-2.0 | 7,867,496,162,567,932,000 | 43.372685 | 299 | 0.695689 | false | 3.030672 | false | false | false |
stevenwudi/Kernelized_Correlation_Filter | scripts/model/score.py | 1 | 2430 | from collections import OrderedDict
from config import *
##########################################################
class Score:
# name
# desc
# ovelapScores
# errorNum
# overlap
# error
# successRateList
def __init__(self, name, desc, tracker=None, evalType=None, seqs=[],
over... | gpl-3.0 | 4,081,629,390,442,816,000 | 31.413333 | 101 | 0.538683 | false | 4.370504 | false | false | false |
Kagee/pa-stream-sink-selector | pa-stream-sink-selector.py | 1 | 8612 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import gtk
import gobject
import appindicator
import os
import dbus
from dbus.mainloop.glib import DBusGMainLoop
from subprocess import call, check_call
class SinkRadioMenuItem(gtk.RadioMenuItem):
def __init__(
self,
radioGroup,
label,
pa... | mit | 3,494,173,339,126,254,000 | 37.446429 | 87 | 0.541802 | false | 4.150361 | false | false | false |
IvarsKarpics/mxcube | gui/bricks/EMBL/MarvinBrick.py | 1 | 12087 | #
# Project: MXCuBE
# https://github.com/mxcube
#
# This file is part of MXCuBE software.
#
# MXCuBE is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your... | lgpl-3.0 | -2,373,055,459,295,168,000 | 38.759868 | 88 | 0.591958 | false | 3.649457 | false | false | false |
variac/bazel | tools/j2objc/j2objc_wrapper.py | 1 | 19368 | #!/usr/bin/python2.7
# Copyright 2015 The Bazel 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 requ... | apache-2.0 | 592,699,237,315,477,500 | 35.406015 | 80 | 0.635584 | false | 3.802867 | false | false | false |
ekarlso/python-odlclient | examples/test_ovsdb.py | 1 | 1159 | # Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# Author: Endre Karlson <endre.karlson@hp.com>
#
# 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/lice... | apache-2.0 | -341,697,412,123,585,600 | 31.194444 | 75 | 0.721311 | false | 3.644654 | false | false | false |
mross-22/dinsdale | src/fleet_fuzzy_control/controller.py | 1 | 3171 | #!/usr/bin/env python
from __future__ import division
import numpy as np
import numpy.matlib as npm
class Controller:
""" Define control law """
def __init__(self, number, T):
""" Initialise the controller """
self.u = np.matrix([]) # Output for plant
self.p = np.matrix([]... | gpl-3.0 | 7,563,531,282,684,602,000 | 32.734043 | 129 | 0.415642 | false | 3.002841 | false | false | false |
thorsummoner/worldcraftcommand-gtk | runmap.py | 1 | 1344 | #!/usr/bin/env python
import window
import os
class RunmapWindow(window.Window):
"""
Gui application interface.
"""
GLADE_FILE = os.path.splitext(__file__)[0] + '.glade'
WINDOW_NORMAL = 'window_normal'
WINDOW_EXPERT = 'window_expert'
ROOT_WINDOW = WINDOW_NORMAL
def __init__(self... | cc0-1.0 | -254,404,526,158,643,140 | 26.428571 | 64 | 0.55878 | false | 3.818182 | false | false | false |
gavinwahl/django-u2f | django_u2f/management/commands/addbackupcode.py | 1 | 2235 | from __future__ import print_function
"""
This is inspired by addstatictoken in django-otp, which is licensed as follows:
Copyright (c) 2012, Peter Sagerson
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following c... | bsd-2-clause | -6,746,104,994,555,524,000 | 43.7 | 83 | 0.731544 | false | 4.725159 | false | false | false |
HCLXTO/Project_4-ConferenceCentral | main.py | 1 | 1724 | #!/usr/bin/env python
"""
main.py -- Udacity conference server-side Python App Engine
HTTP controller handlers for memcache & task queue access
$Id$
created by wesc on 2014 may 24
"""
__author__ = 'wesc+api@google.com (Wesley Chun)'
import webapp2
from google.appengine.api import app_identity
from google.appe... | apache-2.0 | -1,512,063,725,052,440,800 | 29.785714 | 102 | 0.656613 | false | 3.839644 | false | false | false |
nbessi/l10n-switzerland | __unported__/l10n_ch_payment_slip_account_statement_base_completion/__openerp__.py | 1 | 1951 | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Guewen Baconnier
# Copyright 2014 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pu... | agpl-3.0 | -4,946,421,639,456,005,000 | 36.519231 | 101 | 0.625833 | false | 3.933468 | false | false | false |
johncheetham/gshogi | setup.py | 1 | 3201 | import ez_setup
ez_setup.use_setuptools()
from setuptools import setup, Extension
import os
import sys
import shutil
import gshogi.constants
assert sys.version_info >= (3,0)
VERSION = gshogi.constants.VERSION
macros = [
("HAVE_BCOPY", "1"),
("HAVE_ERRNO_H", "1"),
("HAVE_FCNTL_H", "1"),
... | gpl-3.0 | -1,778,009,572,521,367,800 | 26.358974 | 79 | 0.573571 | false | 3.351832 | false | false | false |
lixiangning888/whole_project | modules/processing/analysisinfo.py | 1 | 2769 | # Copyright (C) 2010-2015 Cuckoo Foundation.
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.
import codecs
import time
import json
import logging
import os
from datetime import datetime
from lib.cuckoo.core.database import Database
from lib.cu... | lgpl-3.0 | -3,125,393,680,542,930,400 | 33.185185 | 86 | 0.566269 | false | 4.182779 | false | false | false |
thompsonm-ANL/cdc_2017_viz | teams.py | 1 | 1793 | import state
from twisted.python import log
class Team(object):
def __init__(self, num, network, name):
self.num = num
self.network = network
self.name = name # this will be the school for us
self.state = state.State(self.num)
def contains(self, ip):
netocts = self.netw... | mit | 544,642,636,359,804,300 | 29.913793 | 93 | 0.513107 | false | 3.636917 | false | false | false |
edonyM/emthesis | code/pc_cluster.py | 1 | 4380 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
r"""
# .---. .-----------
# / \ __ / ------
# / / \( )/ ----- (`-') _ _(`-') <-. (`-')_
# ////// '\/ ` --- ( OO).-/( (OO ).-> .-> \( OO) ) .->
# //// / // : : --- (,------... | mit | -5,458,792,829,535,498,000 | 30.970803 | 89 | 0.438584 | false | 3.382239 | false | false | false |
Mastercorp/StarCategorizer | Model.py | 1 | 8176 | import urllib2
import time
import json
import os
import shutil
class Model(object):
@staticmethod
def resolve_redirects(url):
try:
return urllib2.urlopen(url), urllib2.urlopen(url).getcode()
except urllib2.HTTPError as e:
if e.code == 429:
time.sleep(20)... | mit | -8,258,452,629,295,397,000 | 39.475248 | 131 | 0.544887 | false | 3.919463 | false | false | false |
sweetsoftware/ares | server/webui/__init__.py | 1 | 4590 | import random
import string
from functools import wraps
import hashlib
from datetime import datetime
from flask import Blueprint
from flask import abort
from flask import request
from flask import redirect
from flask import render_template
from flask import session
from flask import url_for
from flask import flash
fro... | gpl-2.0 | -8,726,524,682,381,864,000 | 32.021583 | 122 | 0.616558 | false | 3.967156 | false | false | false |
Mozhuowen/projectJ-eveserver | mongodb/service.py | 1 | 1340 | #!coding=utf-8
import settings
from mongodb.model import *
def result_data(data, status, message=''):
result = dict(data=data, status=status, message=message)
return result
def find_all_objects(model):
return model.objects
def find_objects_by_id(model, id):
return model.objects(id=id)
def check... | bsd-3-clause | 3,195,599,398,155,021,000 | 20.269841 | 62 | 0.614179 | false | 3.392405 | false | false | false |
KieranWynn/pyquaternion | demo/demo.py | 1 | 1146 | import pyquaternion
# Create a quaternion representing a rotation of +90 degrees about positive y axis.
my_quaternion = pyquaternion.Quaternion(axis=[0, 1, 0], degrees=90)
my_vector = [0, 0, 4]
my_rotated_vector = my_quaternion.rotate(my_vector)
print('\nBasic Rotation')
print('--------------')
print('My Vector: {}... | mit | 6,587,377,718,851,480,000 | 37.233333 | 117 | 0.71815 | false | 3.410714 | false | false | false |
worldforge/cyphesis | data/rulesets/basic/scripts/mind/Memory.py | 1 | 1461 | # This file is distributed under the terms of the GNU General Public license.
# Copyright (C) 1999 Aloril (See the file COPYING for details).
from common import const
class Memory:
def __init__(self, a_map):
self.events = []
self.map = a_map
def destroy(self):
self.events = None
... | gpl-2.0 | 641,681,012,251,463,400 | 30.76087 | 82 | 0.550992 | false | 4.058333 | false | false | false |
ksmit799/Toontown-Source | toontown/catalog/CatalogAccessoryItem.py | 1 | 16168 | import CatalogItem
from CatalogAccessoryItemGlobals import *
from toontown.toonbase import ToontownGlobals
from toontown.toonbase import TTLocalizer
from toontown.toon import ToonDNA
import random, types
from direct.showbase import PythonUtil
from direct.gui.DirectGui import *
from pandac.PandaModules import *
class C... | mit | -7,144,899,727,194,287,000 | 37.042353 | 118 | 0.573107 | false | 3.65131 | false | false | false |
cloudify-cosmo/cloudify-training-labs | advanced-workflows/task-graphs-lab/solution/plugins/custom/plugin/operations.py | 1 | 2651 | '''Copyright Gigaspaces, 2017, All Rights Reserved'''
from cloudify_aws.connection import EC2ConnectionClient
from cloudify_aws.ec2.instance import Instance as AwsInstance
def stop(ctx, **_):
'''
Stops an instance
..note:
This is slightly modified version of the built-in
AWS Instance... | apache-2.0 | 1,278,360,128,664,526,000 | 35.315068 | 77 | 0.620143 | false | 4.122862 | false | false | false |
mjolnir92/D7041E_2-class-classifier | main.py | 1 | 1954 | import numpy as np
from NearestNeighbor import *
#constant for identifying one of the labels in the data for transformation into something useful later, the data used later on may only contain exactly two different labels
LABEL_IDENTIFIER = 's004'
#read the data to a matrix
raw_data = np.loadtxt(open("DSL-StrongPassw... | gpl-3.0 | -5,121,220,699,673,321,000 | 33.280702 | 172 | 0.72262 | false | 3.062696 | false | false | false |
ThatCodingGuy/BurritoFinder | utils/test_GeoTools.py | 1 | 1253 | import unittest
from utils.GeoTools import GeoTools
"""
This is a POJO used for testing GeoTools methods
"""
class PhysicalObject():
def __init__(self, longitude, latitude):
self.longitude = longitude
self.latitude = latitude
class GeoToolsTestCase(unittest.TestCase):
def setUp(self):
pass
def tearDown(s... | mit | 454,677,246,740,635,700 | 22.222222 | 70 | 0.731045 | false | 3.22108 | true | false | false |
magfest/ubersystem | alembic/versions/5dced3c6ef91_adds_attendee_hotel_pin_field.py | 1 | 1703 | """Adds attendee.hotel_pin field
Revision ID: 5dced3c6ef91
Revises: adf30f2f47d5
Create Date: 2017-09-13 14:28:17.567037
"""
# revision identifiers, used by Alembic.
revision = '5dced3c6ef91'
down_revision = 'adf30f2f47d5'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
try... | agpl-3.0 | -5,693,540,348,925,029,000 | 27.864407 | 109 | 0.620082 | false | 3.454361 | false | false | false |
LRiecken/zoxel | src/plugins/tool_fill.py | 1 | 3096 | # Simple tool for flood fill.
#
# 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 version.
#
# This program is distributed in the h... | gpl-3.0 | 5,647,197,235,768,378,000 | 41.410959 | 85 | 0.597545 | false | 3.558621 | false | false | false |
dssg/wikienergy | tests/test_appliance_instance.py | 1 | 1367 | import sys
import os.path
sys.path.append(os.path.abspath(os.pardir))
import disaggregator as da
import unittest
import pandas as pd
import numpy as np
class ApplianceInstanceTestCase(unittest.TestCase):
def setUp(self):
indices = [pd.date_range('1/1/2013', periods=96, freq='15T'),
pd.d... | mit | -1,904,028,626,703,498,500 | 34.051282 | 69 | 0.592538 | false | 3.807799 | true | false | false |
sh4r3m4n/twitter-wikiquote-bot | bot.py | 1 | 1879 | #-*- coding: utf- -*-
import os
import sys
import random
import time
import json
import wikiquote
import tuitear
from threading import Thread
CONGIG_JSON = 'bots.json'
# Variable local, para modificar el intervalo real cambiar la configuración
INTERVALO = 1
stop = False
def start_bot(bot):
""" Hilo que inicia ... | gpl-3.0 | -2,826,229,204,621,483,000 | 27.029851 | 79 | 0.569755 | false | 3.536723 | false | false | false |
westernx/sgactions | sgactions/ticketui.py | 1 | 6847 | from __future__ import absolute_import
import contextlib
import os
import subprocess
import sys
import tempfile
from Qt import QtWidgets, QtCore
Qt = QtCore.Qt
from . import tickets
class Dialog(QtWidgets.QDialog):
def __init__(self, exceptions=None, allow_no_exception=True):
super(Dialog, self).__... | bsd-3-clause | 4,666,754,797,678,785,000 | 33.933673 | 124 | 0.617351 | false | 4.087761 | false | false | false |
zeroch/CatGT | Server/Server.py | 1 | 1524 | __author__ = 'ivan'
import socket
import sys
from socket import error as socket_error
import command
messages = command.send_jsons
#create a TCP/IP Socket
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
#bind the socket to the port
#default server address else command line argument
if not (len(sys.argv) ==... | mit | -551,372,500,616,786,100 | 27.773585 | 84 | 0.644357 | false | 3.81 | false | false | false |
jiyuan/pyctp | example/test_trader.py | 1 | 2343 | #-*- coding:utf-8 -*-
import hashlib, os, sys, tempfile, time
from ctp.futures import ApiStruct, TraderApi
class MyTraderApi(TraderApi):
def __init__(self, brokerID, userID, password, instIDs):
print 'into __init__'
self.requestID = 0
self.brokerID = brokerID
self.userID = userID
... | mit | 6,690,818,839,220,018,000 | 31.585714 | 90 | 0.641385 | false | 3.301013 | false | false | false |
andresailer/DIRAC | ResourceStatusSystem/Service/PublisherHandler.py | 1 | 11982 | """ PublisherHandler
This service has been built to provide the RSS web views with all the information
they need. NO OTHER COMPONENT THAN Web controllers should make use of it.
"""
__RCSID__ = '$Id$'
# pylint: disable=no-self-use
import types
from datetime import datetime, timedelta
# DIRAC
from DIRAC import gLo... | gpl-3.0 | -5,812,043,319,358,478,000 | 32.376045 | 113 | 0.590636 | false | 4.507901 | false | false | false |
theiviaxx/Frog | frog/views/userpref.py | 1 | 3193 | ##################################################################################################
# Copyright (c) 2012 Brett Dixon
#
# 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 ... | mit | 619,152,995,862,756,900 | 32.978723 | 101 | 0.651738 | false | 4.280161 | false | false | false |
countrymarmot/project_euler | timeout.py | 1 | 1230 | import signal
import time
from functools import wraps
class TimeoutException(Exception):
pass
def timethis(func):
'''
Decorator that reports the execution time.
'''
@wraps(func)
def wrapper(*args, **kwargs):
def timeout_handler(signum, frame):
raise TimeoutException()
... | mit | -6,969,761,445,807,638,000 | 26.333333 | 75 | 0.56748 | false | 3.784615 | false | false | false |
etnadji/evxp | ftplugin/xml/exvp.py | 1 | 14069 | #!/usr/bin/python2
# -*- coding:Utf-8 -*-
import os
import commands
import tempfile
from vim_utils import *
def validate_prefered_rules(vim):
"""Validate current XML file against prefered rules of prefered rule_type"""
prefered = vimvar(vim,'exvp_validation_prefered')
validate_rules(vim,prefered)
def v... | gpl-3.0 | -6,918,003,566,715,362,000 | 32.394299 | 96 | 0.437798 | false | 4.216857 | false | false | false |
theDarkForce/plask | plask/pyimg.py | 1 | 1878 | # pyimg
# create at 2015/5/28
# autor: qianqians
from pyelement import pyelement
from pyhtmlstyle import pyhtmlstyle
class pyimg(pyelement):
onclick = 0
def __init__(self, img, cname, layout, praframe):
# when normal
self.normalimg = img
self.type = "img"
super(pyimg, self).__init__(cname, layout, praframe)... | lgpl-3.0 | 5,062,184,562,840,220,000 | 25.828571 | 75 | 0.580405 | false | 2.774003 | false | false | false |
vaultah/L | app/el/accounts/profile.py | 1 | 1393 | from .records import Record
from ..misc import utils
from .. import images
from ... import consts
import collections
def profile(acct, *, minimal=True, public=False):
''' Get the profile info for `acct` and return a `dict`
if minimal is truthy, skip processing country, website etc. '''
i... | mit | -1,600,622,759,921,867,500 | 32.190476 | 87 | 0.600144 | false | 3.935028 | false | false | false |
scitokens/scitokens | tests/create_webserver.py | 1 | 3978 | """
Utility to create a simple webserver that will answer oauth .well-known
required requests. This is so we can test the HTTP requesting part of issuers.
"""
import threading
import json
try:
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
except ImportError:
from http.server import BaseHTTPReq... | apache-2.0 | 1,819,854,243,660,189,400 | 28.466667 | 115 | 0.573152 | false | 3.539146 | true | false | false |
skosukhin/spack | var/spack/repos/builtin/packages/r-bsgenome/package.py | 1 | 2190 | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgpl-2.1 | 2,045,879,320,389,429,800 | 45.595745 | 126 | 0.658904 | false | 3.643927 | false | false | false |
sidnarayanan/RelativisticML | scripts/compressorAnalysis.py | 1 | 4118 | #!/usr/bin/python
import cPickle as pickle
import numpy as np
import ROOTInterface.Import
import ROOTInterface.Export
from sys import argv,exit
nEvents = -1
doMultiThread = False
def divide(a):
return a[0]/a[1]
def bin(a,b,m):
return min(int(a[0]/b),m)
def angleTruncate(a):
return min(6.28,max(0,a[0]))
print ... | mit | 7,430,864,445,285,418,000 | 29.503704 | 118 | 0.685527 | false | 2.7021 | false | false | false |
geodelic/arke | arke/plugins/collect/latency.py | 1 | 2158 | #
# Copyright 2013 Geodelic
#
# 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 ... | apache-2.0 | 5,878,172,798,683,864,000 | 29.828571 | 85 | 0.607044 | false | 4.056391 | false | false | false |
bukun/TorCMS | torcms/model/link_model.py | 1 | 2069 | # -*- coding:utf-8 -*-
'''
For friends links.
'''
from torcms.model.abc_model import Mabc, MHelper
from torcms.model.core_tab import TabLink
class MLink(Mabc):
'''
For friends links.
'''
@staticmethod
def get_counts():
'''
The count in table.
'''
# adding ``None`` t... | mit | -9,063,340,792,857,582,000 | 24.54321 | 85 | 0.509425 | false | 4.033138 | false | false | false |
spulec/freezegun | tests/test_warnings.py | 1 | 2822 | import contextlib
import datetime
import sys
import types
import warnings
from freezegun import freeze_time
class ModuleWithWarning(object):
"""
A module that triggers warnings on attribute access.
This does not happen with regular modules, there has to be a bit of lazy
module magic going on in orde... | apache-2.0 | -926,519,092,871,683,600 | 32.595238 | 111 | 0.694897 | false | 3.823848 | false | false | false |
sidus-dev/poseidon | modules/validators/utils.py | 1 | 1291 | try: from collections import OrderedDict
except ImportError: from ordereddict import OrderedDict
import inspect, itertools, six
from decorator import decorator
class ValidationFailure(object):
def __init__(self, func, args):
self.func = func
self.__dict__.update(args)
def __repr__(self):
... | gpl-3.0 | 851,962,590,574,058,000 | 29.023256 | 91 | 0.588691 | false | 4.021807 | false | false | false |
DearBytes/Remote-Integrity-Tool | dear/remote_integrity/syslog_client.py | 1 | 1518 | """
Remote syslog client.
Works by sending UDP messages to a remote syslog server. The remote server
must be configured to accept logs from the network.
License: PUBLIC DOMAIN
Author: Christian Stigen Larsen
For more information, see RFC 3164.
"""
import socket
class Facility:
"Syslog facilities"
KERN, USER, M... | lgpl-3.0 | 2,574,575,239,182,011,000 | 24.728814 | 74 | 0.662055 | false | 3.336264 | false | false | false |
kandluis/machine-learning | prac4/practical4-code/tdlearner/brainin_tdlearner.py | 1 | 2277 | import sys
'''
The below is only needed for Bayesian Optimization on Luis' Machine.
Ignore and comment out if it causes problems.
'''
path = "/home/luis/Documents/Harvard_School_Work/Spring_2015/cs181/assignments/practicals/prac4/practical4-code/"
if path not in sys.path:
sys.path.append(path)
'''
End Bayesian
'''... | mit | 1,753,387,978,091,709,000 | 30.625 | 113 | 0.599912 | false | 3.898973 | false | false | false |
Kombinat451/resignal | resignal/SignalCliDbusWrapper.py | 1 | 3813 | # -*- coding: utf-8 -*-
""" signal-cli dbus wrapper for sending messages """
from __future__ import print_function, unicode_literals
import logging
import glib
from resignal.utils import baseify, unbaseify
from dbus import Array, Interface, SessionBus, Signature
from dbus.exceptions import DBusException
from dbus.ma... | gpl-3.0 | 7,160,893,713,709,944,000 | 37.908163 | 169 | 0.592185 | false | 4.153595 | false | false | false |
ASMlover/study | python/proto/google/protobuf/service_reflection.py | 1 | 11042 | # Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# http://code.google.com/p/protobuf/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions o... | bsd-2-clause | 4,694,518,757,565,296,000 | 37.880282 | 102 | 0.729035 | false | 4.716788 | false | false | false |
silly-wacky-3-town-toon/SOURCE-COD | toontown/hood/OZHoodAI.py | 1 | 2851 | from toontown.hood import HoodAI
from toontown.toonbase import ToontownGlobals
from toontown.distributed.DistributedTimerAI import DistributedTimerAI
from toontown.classicchars import DistributedChipAI
from toontown.classicchars import DistributedDaleAI
from toontown.dna.DNAParser import DNAGroup, DNAVisGroup
from toon... | apache-2.0 | -7,405,833,992,803,428,000 | 41.552239 | 90 | 0.634163 | false | 3.756258 | false | false | false |
Lamzin/KNU_LABS | 4-course/numerical-methods/lab1/methods/min_squares.py | 1 | 3159 | # -*- coding: utf-8 -*-
import numpy as np
import math
from scipy import integrate
from function import F, X
class MinSquares(object):
def __init__(s, n, a, b, m_koef, k_koef, q_koef, p_koef, alpha_koef, u, k, p, q, f):
s.n = n
s.a = a
s.b = b
s.m_koef = m_koef
s.k_koe... | gpl-2.0 | 5,112,587,401,801,471,000 | 31.234694 | 175 | 0.358974 | false | 2.223082 | false | false | false |
zitouni/ieee_802-15-4_868-900 | python/ieee802_15_4.py | 1 | 3940 | #!/usr/bin/env python
# O-QPSK modulation and demodulation.
#
#
# Copyright 2005 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio 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 Foundat... | gpl-3.0 | 8,383,000,823,689,001,000 | 32.675214 | 128 | 0.636294 | false | 3.288815 | false | false | false |
anonimoanemico/opentension | lib/exportutils/exportHexenhal.py | 1 | 2770 | import sys, os, sqlite3, datetime, time
import xml.etree.ElementTree as ElementTree
import xml.etree.cElementTree as xmlTree
def feed_xml(db_file_path, output_file_path, profile):
bp_index = 1
# setup the XML document
root = xmlTree.Element("ArrayOfBPEntry")
root.set('xmlns:xsi', 'http://www.w3.o... | gpl-3.0 | 4,057,723,546,099,262,000 | 45.966102 | 154 | 0.632491 | false | 3.270366 | false | false | false |
captflint/noah | noahcli.py | 1 | 6405 | import lzma
import pickle
import curses
import random
import enchant
from index import index
from doubleentries import doubleentries
with lzma.open('webster.txt.xz', 'rt') as infile:
webster = infile.read()
wordlist = enchant.request_pwl_dict('wordlist.txt')
# initialize terminal screen
screen = curses.initscr()
c... | gpl-3.0 | -7,734,705,872,024,836,000 | 29.942029 | 83 | 0.521468 | false | 3.968401 | false | false | false |
garibaldu/multicauseRBM | Max/rbmpy/mnist.py | 1 | 1782 |
import os, struct
from array import array
import numpy as np
import random, math
TRAIN_FILE_NAME = 'train-images.idx3-ubyte'
def read(dataset = "training", path = "."):
"""
Python function for importing the MNIST data set.
"""
if dataset is "training":
fname_img = os.path.join(path, 'train... | mit | -1,058,917,226,942,048,400 | 24.457143 | 87 | 0.607183 | false | 3.035775 | false | false | false |
kevinbader/MAtw | doc/src/scripts/generate-tikz-testMinFill2.py | 1 | 3709 | #!/usr/bin/env python
# encoding: utf-8
preamble="""\\usetikzlibrary{{backgrounds,fit}}
\\begin{{tikzpicture}}
[vertex/.style={{circle,draw=blue!50,fill=blue!20,thick}},
selectedvertex/.style={{circle,draw=red!50,fill=red!20,thick}},
edge/.style={{thick}},
newedge/.style={{dashed,thick}}]"""
def compon... | gpl-3.0 | -8,726,287,631,369,347,000 | 43.154762 | 171 | 0.486115 | false | 2.697455 | false | false | false |
nutnut/p2pool | p2pool/work.py | 1 | 24133 | from __future__ import division
import base64
import random
import re
import sys
import time
from twisted.internet import defer
from twisted.python import log
import bitcoin.getwork as bitcoin_getwork, bitcoin.data as bitcoin_data
from bitcoin import helper, script, worker_interface
from util import forest, jsonrpc,... | gpl-3.0 | 1,550,763,456,478,705,400 | 54.605991 | 223 | 0.574607 | false | 3.78973 | false | false | false |
tensorflow/graphics | tensorflow_graphics/datasets/pix3d/pix3d_test.py | 1 | 1674 | # Copyright 2020 The TensorFlow Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | apache-2.0 | -4,918,123,054,430,127,000 | 33.163265 | 74 | 0.682198 | false | 3.647059 | true | false | false |
hansroh/skitai | skitai/corequest/httpbase/rcache.py | 1 | 3235 | from hashlib import md5
import time
import threading
class Result:
def __init__ (self, status, ident = None):
self.status = status
self.ident = ident
self.timeout = 0
self.cached_time = 0
self.remain_secs = 0
self.is_cached = False
def is_normal (self):
return self.status == 3
def get_status (s... | mit | 3,124,798,410,993,566,000 | 18.846626 | 62 | 0.609583 | false | 2.855252 | false | false | false |
stantonk/botanist | webapp/ui/tests/test_parse_search_results.py | 1 | 1407 | import os
from django.test import TestCase
from mock import patch
from ui.views import parse_search_results
FIXTURES_ROOT = os.path.join(os.path.dirname(__file__), 'fixtures')
FX = lambda *relpath: os.path.join(FIXTURES_ROOT, *relpath)
@patch('ui.views.get_repo_type')
@patch('ui.views.CODE_ROOT', '/opt/botanist/re... | mit | 3,133,287,782,293,238,000 | 43 | 188 | 0.665956 | false | 3.742021 | false | false | false |
inkeye/sinesudoku | mix_audio.py | 1 | 1200 | from pydub import AudioSegment
from config import audio_secs, name, sec
from sinesudoku.sudokusynth import Sudokusynth
def post_process(audio, headroom, threshold):
output = audio.low_pass_filter(20000)
output = output.high_pass_filter(20)
output = output.normalize(0)
output = output.compress_dynamic... | gpl-3.0 | 4,693,766,373,055,259,000 | 26.272727 | 70 | 0.68 | false | 2.877698 | false | false | false |
oneonestar/CloudStorage | src/client/client.py | 1 | 7136 | import client_conn
import filelist
import rsa
import hashlib
import getpass
import log
import os
import signal
import sys
# filename of list
mylist = "list"
password = None
def print_help():
"""
Print the available command list.
"""
print()
print()
if client_conn.is_login():
print("Lo... | gpl-3.0 | -4,331,798,698,066,752,000 | 24.395018 | 90 | 0.579877 | false | 3.844828 | false | false | false |
hal0x2328/neo-python | neo/Core/TX/Transaction.py | 1 | 24115 | """
Description:
Transaction Basic Class
Usage:
from neo.Core.Transaction import Transaction
"""
import sys
from itertools import groupby
import binascii
from neo.Core.UInt160 import UInt160
from neo.Blockchain import GetBlockchain
from neo.Core.TX.TransactionAttribute import TransactionAttributeUsage
from neo.... | mit | -940,137,017,928,709,900 | 29.996144 | 176 | 0.575451 | false | 4.280263 | false | false | false |
jtylers/tools | encrypt.py | 1 | 1287 | #!/bin/python2.7
import sys
import threading
from string import maketrans
from random import randint
from time import sleep
# Swaps two random letters
def scramble(letters):
x = list(letters)
a = randint(0, len(letters) - 1)
b = randint(0, len(letters) - 1)
while b == a:
b = randint(0, len(lett... | gpl-2.0 | -4,997,476,406,386,990,000 | 24.74 | 93 | 0.660451 | false | 3.535714 | false | false | false |
melmothx/jsonbot | jsb/contrib/tweepy/models.py | 1 | 8675 | # Tweepy
# Copyright 2009-2010 Joshua Roesslein
# See LICENSE for details.
from error import TweepError
from utils import parse_datetime, parse_html_value, parse_a_href, parse_search_datetime, unescape_html
class ResultSet(list):
"""A list like object that holds results from a Twitter API query."""
class Model(... | mit | -3,717,628,936,641,280,500 | 26.983871 | 102 | 0.565418 | false | 3.835102 | false | false | false |
Haynie-Research-and-Development/jarvis | deps/lib/python3.4/site-packages/pubnub/endpoints/push/add_channels_to_push.py | 1 | 2309 | import six
from pubnub.endpoints.endpoint import Endpoint
from pubnub.errors import PNERR_CHANNEL_MISSING, PNERR_PUSH_DEVICE_MISSING, PNERROR_PUSH_TYPE_MISSING
from pubnub.exceptions import PubNubException
from pubnub.enums import HttpMethod, PNOperationType
from pubnub.models.consumer.push import PNPushAddChannelResu... | gpl-2.0 | 1,520,146,163,758,504,700 | 29.381579 | 101 | 0.666522 | false | 3.624804 | false | false | false |
googleinterns/major-tom | services/parser-database/parser.py | 1 | 3229 | """parser.py - Parses a PDF document to extract driving
regulation articles and store them in memory.
"""
import logging
import hashlib
import re
import slate # pylint: disable=import-error
import connector
import retriever
logging.basicConfig(level=logging.INFO)
class Document:
"""Class for Regulations Docum... | apache-2.0 | 2,029,537,061,322,867,500 | 26.827586 | 65 | 0.583024 | false | 3.936585 | false | false | false |
Abogical/borg-gtk | src/list_process.py | 1 | 1519 | import enums
import borg, importlib
importlib.import_module('.helpers', 'borg')
importlib.import_module('.archive', 'borg')
import os, stat, queue, gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
def walk():
treepath = Gtk.TreePath.new_first()
dir_stack = []
def pop_dir_item():
nonlocal treep... | bsd-2-clause | 603,473,698,797,975,400 | 23.901639 | 101 | 0.665569 | false | 2.7125 | false | false | false |
googleads/google-ads-python | google/ads/googleads/v6/services/types/feed_item_set_link_service.py | 1 | 4162 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# 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 | 1,096,708,712,873,068,400 | 31.771654 | 132 | 0.679962 | false | 4.108588 | false | false | false |
latexjs/latexjs | texlive/build_thinfs_db.py | 1 | 5666 | # This script takes `raw_stats.json` produced from the build_raw_stats.js
# script and prepares it into the format THINFS needs to operate.
#
# The produced file, `thinfs_db.json`, contains all the information need to
# mock the following filesystem calls:
#
# - `fs.lstatSync(path)`
# - `fs.readlinkSync(path)`
#
# Whic... | bsd-2-clause | 8,988,523,643,102,983,000 | 33.339394 | 97 | 0.613131 | false | 3.396882 | false | false | false |
wasade/qiita | qiita_db/meta_util.py | 1 | 4299 | r"""
Util functions (:mod: `qiita_db.meta_util`)
===========================================
..currentmodule:: qiita_db.meta_util
This module provides utility functions that use the ORM objects. ORM objects
CANNOT import from this file.
Methods
-------
..autosummary::
:toctree: generated/
get_accessible_fi... | bsd-3-clause | 1,928,193,968,237,195,800 | 31.568182 | 79 | 0.60107 | false | 4.181907 | false | false | false |
lcdb/lcdblib | tests/test_aligners.py | 1 | 1081 | import pytest
from lcdblib.snakemake import aligners
def test_hisat2_prefixes():
files = [
'a/b/c.1.ht2',
'a/b/c.2.ht2',
'a/b/c.3.ht2',
'a/b/c.4.ht2',
'a/b/c.5.ht2',
'a/b/c.6.ht2',
'a/b/c.7.ht2',
'a/b/c.8.ht2']
assert aligners.hisat2_index_from_p... | mit | -6,163,043,469,433,596,000 | 27.447368 | 70 | 0.555967 | false | 2.329741 | false | false | false |
somu1795/cyberoam-bruteforce | brute-multiple.py | 1 | 2515 | __author__ = 'Xplore'
# Cyberaom brute force Script
import urllib
import time
import datetime
import urllib2
import sys
import xml.dom.minidom as XML
'''
#CountDown And Credits
def countdown(num):
for i in xrange(num,0,-1):
time.sleep(1)
sys.stdout.write(str(i%10)+'\r')
sys.stdout.flush()
'... | mit | -6,067,582,533,346,587,000 | 24.15 | 94 | 0.577336 | false | 3.445205 | false | false | false |
gkunter/coquery | coquery/unicode.py | 1 | 1990 | # -*- coding: utf-8 -*-
"""
unicode.py is part of Coquery.
Copyright (c) 2016, 2017 Gero Kunter (gero.kunter@coquery.org)
Coquery is released under the terms of the GNU General Public License (v3).
For details, see the file LICENSE that you should have received along
with Coquery. If not, see <http://www.gnu.org/lic... | gpl-3.0 | 2,070,971,530,529,269,500 | 28.701493 | 75 | 0.541709 | false | 4.288793 | false | false | false |
nehuengonzalez/survivability | survivability/preproc/t_analysis.py | 1 | 1417 | # coding=utf-8
def global_survived(kp, demands):
s = 0
for K in kp:
if len(K) == len(demands):
s += 1
return s / float(len(kp))
def survived_dem(kp):
sk = []
for k in kp:
sk.append(len(k))
return sk
def failed_dem(kp, demands):
fk = []
for k in kp:
... | gpl-3.0 | 3,643,789,120,296,893,400 | 23.448276 | 87 | 0.485533 | false | 3.318501 | false | false | false |
m4tt3uz/maze-puzzle-test | maze.py | 1 | 3625 | import os
import sys
import json
from terminaltables import AsciiTable
class Maze(object):
def __init__(self, start_node, json_file, selected_objects=[]):
self.start_node = start_node
self.selected_objects = selected_objects
self.result = [['Id', 'Room', 'Obj. collected']]
self.js... | apache-2.0 | -8,349,802,679,291,468,000 | 29.982906 | 86 | 0.530483 | false | 4.045759 | false | false | false |
tjctw/PythonNote | CLRS/ps2/circuit/circuit.py | 1 | 21123 | #!/usr/bin/env python
import json # Used when TRACE=jsonp
import os # Used to get the TRACE environment variable
import re # Used when TRACE=jsonp
import sys # Used to smooth over the range / xrange issue.
# Python 3 doesn't have xrange, and range behaves like xrange.
if sys.version_info >= (3,):
xra... | cc0-1.0 | -5,167,896,069,328,415,000 | 35.169521 | 92 | 0.560905 | false | 4.364256 | false | false | false |
Grumpy-Mike/Mikes-Pi-Bakery | Steady_Hands/SteadyRa.py | 1 | 2229 | # python
# Steady hands game
# run with - sudo python SteadyRa.py
# updated to be Revision Aware, to cope with board revisions 1 & 2
import RPi.GPIO as GPIO
import time
def findRevision():
global boardRevision
fin = open('/proc/cpuinfo')
boardRevision = -1
while True: # go through the file line by li... | gpl-2.0 | 1,481,658,886,603,479,800 | 28.328947 | 82 | 0.656348 | false | 3.166193 | false | false | false |
Azure/azure-sdk-for-python | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_certificate_registration_provider_operations.py | 1 | 5097 | # 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 | -3,344,390,561,927,701,000 | 46.194444 | 133 | 0.658819 | false | 4.654795 | false | false | false |
dabodev/dabodoc | api/epydoc/man.py | 1 | 8842 | # epydoc.py: manpage-style text output
# Edward Loper
#
# Created [01/30/01 05:18 PM]
# $Id: man.py,v 1.6 2003/07/18 15:46:19 edloper Exp $
#
"""
Documentation formatter that produces man-style documentation.
@note: This module is under development. It generates incomplete
documentation pages, and is not yet incorpe... | mit | 7,447,472,170,674,492,000 | 34.087302 | 77 | 0.463583 | false | 4.120224 | false | false | false |
xu6148152/Binea_Python_Project | Spider/taobaomm.py | 1 | 2962 | # -*-coding:utf8-*-
from pyspider.libs.base_handler import *
PAGE_START = 1
PAGE_END = 30
DIR_PATH = './platform/Python'
class Handler(BaseHandler):
crawl_config = {
}
def __init__(self):
self.base_url = 'https://mm.taobao.com/json/request_top_list.htm?page='
self.page_num = 1
s... | mit | 5,712,214,133,019,156,000 | 29.22449 | 83 | 0.541526 | false | 3.505325 | false | false | false |
fluxer/spm | nuitka/nuitka/nodes/ParameterSpecs.py | 1 | 15122 | # Copyright 2016, Kay Hayen, mailto:kay.hayen@gmail.com
#
# Part of "Nuitka", an optimizing Python compiler that is compatible and
# integrates with CPython, but also works on its own.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in complianc... | gpl-2.0 | -5,495,277,840,087,743,000 | 29.861224 | 94 | 0.50529 | false | 4.428111 | false | false | false |
peterfpeterson/dotfiles | bin/i3statuswrapper.py | 1 | 4461 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# This script is a simple wrapper which prefixes each i3status line with custom
# information. It is a python reimplementation of:
# http://code.stapelberg.de/git/i3status/tree/contrib/wrapper.pl
#
# To use it, ensure your ~/.i3status.conf contains this line:
# output_... | mit | 6,176,209,926,059,855,000 | 30.857143 | 93 | 0.619955 | false | 3.692053 | false | false | false |
VikParuchuri/scan | core/web/forms.py | 1 | 2182 | from flask_wtf import Form
from werkzeug import secure_filename
from flask_wtf.file import FileField, FileRequired, FileAllowed
from wtforms import FloatField, IntegerField, TextField, StringField, TextAreaField
from wtforms.validators import Required, Optional
from core.database.models import Question, Essay
from flas... | agpl-3.0 | 5,898,198,284,156,164,000 | 34.193548 | 149 | 0.63978 | false | 3.974499 | false | false | false |
tylerjereddy/steric-conflict-resolution | docker_build/generate_mdp.py | 1 | 3661 | import collections
def generate_mdp(resolution='CG', output_filename = 'alchembed.mdp', b = 2, steps = 1000, delta_lambda = 0.001, alpha = 0.1, dt = 0.01):
'''Produce custom alchembed / GROMACS .mdp file based on Phil F's github tutorial: https://github.com/philipwfowler/alchembed-tutorial
b can be either 1 or... | mit | -2,146,209,980,592,924,200 | 57.111111 | 173 | 0.368479 | false | 4.198394 | false | false | false |
ebilionis/py-best | best/gp/_real_covariance_function.py | 1 | 3903 | """Define a real covariance function.
Author:
Ilias Bilionis
Date:
11/20/2012
"""
__all__ = ['RealCovarianceFunction']
import numpy as np
from . import CovarianceFunction
class RealCovarianceFunction(CovarianceFunction):
"""Define a real covariance function.
A real covariance function is a co... | lgpl-3.0 | -2,101,069,538,516,914,400 | 29.740157 | 74 | 0.530874 | false | 3.830226 | false | false | false |
diego-d5000/MisValesMd | env/lib/python2.7/site-packages/django/views/generic/base.py | 1 | 9019 | from __future__ import unicode_literals
import logging
import warnings
from functools import update_wrapper
from django import http
from django.core.exceptions import ImproperlyConfigured
from django.core.urlresolvers import NoReverseMatch, reverse
from django.template.response import TemplateResponse
from ... | mit | -2,092,403,663,514,126,800 | 34.366935 | 93 | 0.57401 | false | 4.629877 | false | false | false |
vdel/CoMFoRT | src/vobject/base.py | 2 | 41220 | """vobject module for reading vCard and vCalendar files."""
import copy
import re
import sys
import logging
import StringIO
import string
import exceptions
import codecs
#------------------------------------ Logging ----------------------------------
logger = logging.getLogger(__name__)
if not logging.getLogger().han... | gpl-3.0 | 8,302,658,190,029,246,000 | 36.540984 | 123 | 0.565163 | false | 4.261346 | false | false | false |
fyabc/MiniGames | HearthStone2/MyHearthStone/ui/ui_cocos/main_scene.py | 1 | 3801 | #! /usr/bin/python
# -*- coding: utf-8 -*-
"""The main scene of the cocos-single frontend.
This is one of the views in MVC pattern.
"""
import pyglet
from cocos import director, layer, scene, menu
from cocos.scenes import transitions
from .utils.basic import set_menu_style
from .utils.layers import BackgroundLayer,... | mit | -3,998,949,303,661,920,000 | 27.155556 | 108 | 0.62773 | false | 3.602844 | false | false | false |
chrisglencross/python-lessons | lesson5/times_table_challenge.py | 1 | 1331 | import random
import time
def input_number(prompt):
while True:
try:
print(prompt)
number=int(input("> "))
break
except ValueError:
print("Oops! That wasn't a valid number. Try again.")
return number
def ask_times_table(num1, num2):
answer=in... | mit | 1,848,696,340,619,895,800 | 23.648148 | 74 | 0.602554 | false | 3.676796 | false | false | false |
MSEMJEJME/ReAlistair | renpy/display/image.py | 1 | 11399 | # Copyright 2004-2010 PyTom <pytom@bishoujo.us>
#
# 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, mer... | gpl-2.0 | -7,185,725,368,899,875,000 | 32.128743 | 116 | 0.564172 | false | 4.372459 | false | false | false |
bjorncooley/rainforest_makers | spirit/models/topic_unread.py | 1 | 1804 | #-*- coding: utf-8 -*-
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.core.urlresolvers import reverse
from django.conf import settings
from django.utils import timezone
from django.db import IntegrityError
from spirit.signals.comment import comment_posted
from spiri... | mit | 4,498,641,563,114,988,500 | 29.59322 | 78 | 0.697339 | false | 3.711934 | false | false | false |
AdrianEvans/FFanalysis | FF-raw2click.py | 1 | 2860 | # python script to rip click data from a sql database from the fossilfinder data
# NOTES
# raw data should have a reference_key that is clean - starting at 1 and incrementing by 1 for each row - not doing this will throw an error
# this code rips T3 from the data - so clicks are for individual object ids of interest
# ... | apache-2.0 | -1,099,394,774,089,425,800 | 38.722222 | 308 | 0.639161 | false | 3.020063 | false | false | false |
rzdchen/pythonArticle | tools/yundama_requests.py | 1 | 4164 | # -*- coding: utf-8 -*-
__author__ = 'bobby'
import json
import requests
class YDMHttp(object):
apiurl = 'http://api.yundama.com/api.php'
username = ''
password = ''
appid = ''
appkey = ''
def __init__(self, username, password, appid, appkey):
self.username = username
self.pa... | apache-2.0 | -2,927,557,647,307,643,400 | 28.982609 | 111 | 0.574246 | false | 2.368132 | false | false | false |
elthariel/dff | api/gui/button/pushbutton.py | 1 | 1981 | # DFF -- An Open Source Digital Forensics Framework
# Copyright (C) 2009-2010 ArxSys
# This program is free software, distributed under the terms of
# the GNU General Public License Version 2. See the LICENSE file
# at the top of the source tree.
#
# See http://www.digital-forensic.org for more information about this... | gpl-2.0 | -4,325,183,166,420,823,000 | 42.065217 | 156 | 0.655729 | false | 3.861598 | false | false | false |
iansealy/rosalind | cons/cons.py | 1 | 1460 | #!/usr/bin/env python
"""This script is given "A collection of at most 10 DNA strings of equal length
(at most 1 kbp) in FASTA format" and returns "A consensus string and profile
matrix for the collection".
"""
import argparse
from collections import defaultdict
def main(args):
"""Consensus and Profile"""
... | gpl-3.0 | 8,608,174,609,780,301,000 | 26.54717 | 79 | 0.581507 | false | 3.893333 | false | false | false |
antmont/wmda-stuff | wmdadict/urls.py | 1 | 1089 | from django.conf.urls import url
from . import views
app_name = 'wmdadict'
urlpatterns = [
# # /
# url(r'^$', views.index, name='index'),
# /dict/
url(r'^dict/$', views.dictionary_list, name='dictionary_list'),
# /dict/5/
url(r'^dict/(?P<field_id>[0-9]+)/$', views.dictionary_detail, name='dict... | bsd-3-clause | 6,929,779,515,638,242,000 | 36.551724 | 97 | 0.585859 | false | 2.643204 | false | true | false |
rajanandakumar/DIRAC | DataManagementSystem/Client/DataManager.py | 1 | 72748 | """
:mod: DataManager
.. module: DataManager
:synopsis: DataManager links the functionalities of StorageElement and FileCatalog.
This module consists of DataManager and related classes.
"""
# # RSCID
__RCSID__ = "$Id$"
# # imports
from datetime import datetime, timedelta
import fnmatch
import os
import time
from ... | gpl-3.0 | -2,389,590,288,556,396,000 | 42.046154 | 157 | 0.623179 | false | 3.926806 | false | false | false |
WZQ1397/automatic-repo | python/USACO/USACO 2019 Dec-B2.py | 1 | 1173 | # -*- coding: utf-8 -*-
# Author: Zach.Wang
# @Time : 2019-12-25 19:09
factorynums=eval(input())
factoryroute=[]
for _ in range(factorynums-1):
factoryroute.append(eval(input().replace(' ',',')))
print(factoryroute)
factoryroutereachcount={}
#TODO star situtation
def star_condition():
for i in range(factorynums)... | lgpl-3.0 | 1,509,816,345,890,131,700 | 25.659091 | 85 | 0.663257 | false | 3.015424 | false | false | false |
tiffanyjaya/kai | vendors/pdfminer.six/tools/pdf2txt.py | 1 | 5843 | #!/usr/bin/env python
"""
Converts PDF text content (though not images containing text) to plain text, html, xml or "tags".
"""
import sys
import logging
import six
import pdfminer.settings
pdfminer.settings.STRICT = False
import pdfminer.high_level
import pdfminer.layout
from pdfminer.image import ImageWriter
def e... | mit | 6,198,839,411,238,877,000 | 45.007874 | 193 | 0.599521 | false | 3.591272 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.