org_text stringlengths 830 329k | texts list | scores list | num_lines int64 1 8.05k | avg_score float64 0 0.27 | check bool 1
class |
|---|---|---|---|---|---|
# -*- coding: utf-8 -*-
from resources.lib.util import cUtil
from resources.lib.gui.gui import cGui
from resources.lib.gui.guiElement import cGuiElement
from resources.lib.handler.requestHandler import cRequestHandler
from resources.lib.parser import cParser
from resources.lib.config import cConfig
from resources.lib ... | [
"# -*- coding: utf-8 -*-\n",
"from resources.lib.util import cUtil\n",
"from resources.lib.gui.gui import cGui\n",
"from resources.lib.gui.guiElement import cGuiElement\n",
"from resources.lib.handler.requestHandler import cRequestHandler\n",
"from resources.lib.parser import cParser\n",
"from resources... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.02666666666666667,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.015625,
0.3333333333333333,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.030303030303030304,
0.0217391304347... | 368 | 0.01956 | false |
# project forms
from django import forms
from project.models import Project, PROJECT_VISIBLE_LIST_CHOICES, PROJECT_VISIBLE_PRIVATE, Task, TaskComment, Milestone, Member, TaskDomain, TaskLink, TaskProfile, TASK_PROFILE_PRIORITY_LIST, TASK_PROFILE_PRIORITY_INTERESTED, TASK_PROFILE_PRIORITY_LIST_CHOICES, TaskCheckList, ... | [
"# project forms\n",
"\n",
"from django import forms\n",
"from project.models import Project, PROJECT_VISIBLE_LIST_CHOICES, PROJECT_VISIBLE_PRIVATE, Task, TaskComment, Milestone, Member, TaskDomain, TaskLink, TaskProfile, TASK_PROFILE_PRIORITY_LIST, TASK_PROFILE_PRIORITY_INTERESTED, TASK_PROFILE_PRIORITY_LIST... | [
0,
0,
0,
0.0028328611898017,
0,
0,
0,
0,
0,
0,
0,
0.027777777777777776,
0,
0,
0,
0.014492753623188406,
0,
0,
0.04054054054054054,
0,
0,
0,
0.017391304347826087,
0,
0.02631578947368421,
0.04878048780487805,
0.047619047619047616,
0,
0,
0,
0.01666666666666666... | 158 | 0.007963 | false |
# Written by Vamei
import itertools
import math
import random
'''
##itertools 包
# iter()内置函数,可以将诸如表、字典等容器变为循环器:
for i in iter([2, 4, 5, 6]):
print(i)
print("无穷循环器: ")
#itertools.count(5, 2) #从5开始的整数循环器,每次增加2,即5, 7, 9, 11, 13, 15 ...
#itertools.cycle('abc') #重复序列的元素,既a, b, c, a, b, c ...
#i... | [
"# Written by Vamei\n",
"import itertools\n",
"import math\n",
"import random\n",
"\n",
"'''\n",
"##itertools 包\n",
"# iter()内置函数,可以将诸如表、字典等容器变为循环器:\n",
"for i in iter([2, 4, 5, 6]):\n",
" print(i)\n",
"\n",
"print(\"无穷循环器: \")\n",
"#itertools.count(5, 2) #从5开始的整数循环器,每次增加2,即5, 7, 9, 1... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.1111111111111111,
0,
0,
0,
0,
0,
0.1,
0,
0,
0,
0.011904761904761904,
0,
0,
0,
0.03225806451612903,
0.058823529411764705,
0,
0,
0,
0... | 97 | 0.033491 | false |
"""
screen_previous.py - This module contains class PreviousScreen.
Copyright © 2015 Mikko Pitkänen mun.lumia900@gmail.com
"""
import tkinter
import tkinter.ttk
import data as Data
import misc_functions
class PreviousScreen(tkinter.Frame):
def __init__(self, master, fn, arg):
tkinter.Frame._... | [
"\"\"\"\n",
" screen_previous.py - This module contains class PreviousScreen.\n",
"\n",
" Copyright © 2015 Mikko Pitkänen mun.lumia900@gmail.com\n",
"\"\"\"\n",
"\n",
"\n",
"import tkinter\n",
"import tkinter.ttk\n",
"import data as Data\n",
"import misc_functions\n",
"\n",
"\n",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.009345794392523364,
0,
0,
0,
0,
0.009345794392523364,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | 72 | 0.00026 | false |
# -*- coding: utf-8 -*-
# ProjectEuler/src/python/problem374.py
#
# Maximum Integer Partition Product
# =================================
# Published on Saturday, 3rd March 2012, 07:00 pm
#
# An integer partition of a number n is a way of writing n as a sum of positive
# integers. Partitions that differ only in the or... | [
"# -*- coding: utf-8 -*-\n",
"# ProjectEuler/src/python/problem374.py\n",
"#\n",
"# Maximum Integer Partition Product\n",
"# =================================\n",
"# Published on Saturday, 3rd March 2012, 07:00 pm\n",
"#\n",
"# An integer partition of a number n is a way of writing n as a sum of posit... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.08333333333333333,
0,
0,
0.037037037037037035,
0
] | 26 | 0.00463 | false |
import account_verification_flask.utilities
from account_verification_flask.utilities.settings import AuthySettings
from authy.api import AuthyApiClient
class AuthyServices:
authy_client = None
def __init__(self):
if AuthyServices.authy_client == None:
AuthyServices.authy_client = AuthyA... | [
"import account_verification_flask.utilities\n",
"from account_verification_flask.utilities.settings import AuthySettings\n",
"from authy.api import AuthyApiClient\n",
"\n",
"\n",
"class AuthyServices:\n",
" authy_client = None\n",
"\n",
" def __init__(self):\n",
" if AuthyServices.au... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.02127659574468085,
0,
0,
0,
0.04,
0.011764705882352941,
0,
0.02564102564102564,
0,
0,
0.010416666666666666,
0,
0,
0,
0.04,
0.011764705882352941,
0,
0.009708737864077669,
0,
0,
0,
0.009009009009009009,
0,
0
] | 33 | 0.005442 | false |
### To Do ###
# [] replace time with datetime https://docs.python.org/2/library/datetime.html
# [] fix toDate http://stackoverflow.com/questions/3682748/converting-unix-timestamp-string-to-readable-date-in-python
Modules
time - convert between unix time and d/m/y formats
sqlite3 - databases
... | [
"### To Do ###\n",
"\n",
"# []\treplace time with datetime \t\t\t\thttps://docs.python.org/2/library/datetime.html\n",
"# []\tfix toDate\t\t\t\t\t\thttp://stackoverflow.com/questions/3682748/converting-unix-timestamp-string-to-readable-date-in-python\n",
"\n",
"Modules\n",
"time\t - convert between u... | [
0.07142857142857142,
0,
0.011904761904761904,
0.008064516129032258,
0,
0,
0.01818181818181818,
0.041666666666666664,
0.030303030303030304,
0.02040816326530612,
0,
0,
0,
0,
0,
0,
0.0625,
0.019230769230769232,
0,
0,
0,
0,
0.03125,
0.022222222222222223,
0,
0,
0,
0,... | 163 | 0.027255 | false |
storm = ["Straightway the winds upturn the main, and great seas rise",
"They are tossed asunder over the dreary gulf",
"Stormclouds enwrap the day, and rainy gloom blots out the sky",
"Out of the clouds bursts fire fast upon fire",
"Driven from our course, we go wandering on the bli... | [
"storm = [\"Straightway the winds upturn the main, and great seas rise\",\n",
" \"They are tossed asunder over the dreary gulf\",\n",
" \"Stormclouds enwrap the day, and rainy gloom blots out the sky\",\n",
" \"Out of the clouds bursts fire fast upon fire\",\n",
" \"Driven fr... | [
0,
0,
0,
0,
0,
0.008695652173913044,
0.011363636363636364,
0,
0,
0.010416666666666666,
0,
0,
0,
0,
0.01020408163265306,
0.010638297872340425,
0,
0,
0,
0,
0,
0,
0.01098901098901099,
0,
0,
0.012048192771084338,
0,
0,
0,
0.014492753623188406,
0,
0.012048192... | 142 | 0.004178 | false |
#!/usr/bin/env python2
# -*- coding: UTF-8 -*-
# 2014 - Anonymous
import base64
def decode(string):
import base64
s = ''
str = _reverse(string)
for x in range(0,len(str)):
s += _decode_char(str[x])
return base64.b64decode(s)
def _reverse(s):
string = ''
length = len(s)-3
wh... | [
"#!/usr/bin/env python2\n",
"# -*- coding: UTF-8 -*-\n",
"# 2014 - Anonymous\n",
"import base64\n",
"def decode(string):\n",
" import base64\n",
" s = ''\n",
" str = _reverse(string)\n",
" for x in range(0,len(str)):\n",
" s += _decode_char(str[x])\n",
" return base64.b64de... | [
0,
0,
0,
0,
0.05,
0,
0,
0,
0.03125,
0,
0,
0.2,
0.058823529411764705,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.02127659574468085,
0.014925373134328358,
0,
0,
0.2,
0.047619047619047616,
0.006944444444444444,
0.006944444444444444,
0.02857142857142857,
0.0212765957... | 128 | 0.021841 | false |
# edm_init.py - sets up the IronPython environment ready for scripting
# the edm control software.
import clr
import sys
import time
from System.IO import Path
# Import the edm control software assemblies into IronPython
sys.path.append(Path.GetFullPath("..\\EDMHardwareControl\\bin\\EDM\\"))
clr.AddReferenceToFile("... | [
"# edm_init.py - sets up the IronPython environment ready for scripting\n",
"# the edm control software.\n",
"\n",
"import clr\n",
"import sys\n",
"import time\n",
"from System.IO import Path\n",
"\n",
"# Import the edm control software assemblies into IronPython\n",
"sys.path.append(Path.GetFullP... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.038461538461538464,
0,
0.025,
0,
0,
0.02631578947368421,
0,
0,
0,
0,
0,
0,
0.07142857142857142,
0.038461538461538464,
0,
0.006896551724137931,
0,
0.05555555555555555,
0,
0,
0,
0... | 51 | 0.028001 | false |
#!/usr/bin/python
# GNU Solfege - free ear training software
# Copyright (C) 2007, 2008, 2011 Tom Cato Amundsen
#
# 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 Licens... | [
"#!/usr/bin/python\n",
"# GNU Solfege - free ear training software\n",
"# Copyright (C) 2007, 2008, 2011 Tom Cato Amundsen\n",
"#\n",
"# This program is free software: you can redistribute it and/or modify\n",
"# it under the terms of the GNU General Public License as published by\n",
"# the Free Softw... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.014492753623188406,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.007575757575757576,
0,
0,
0,
0,
0,
0,
0.012195121951219513,
0.026315789473... | 66 | 0.016591 | false |
#-------------------------------------------------------------------------
# Copyright (c) Microsoft. 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://w... | [
"#-------------------------------------------------------------------------\r\n",
"# Copyright (c) Microsoft. All rights reserved.\r\n",
"#\r\n",
"# Licensed under the Apache License, Version 2.0 (the \"License\");\r\n",
"# you may not use this file except in compliance with the License.\r\n",
"# You may... | [
0.013157894736842105,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.012987012987012988,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | 1,230 | 0.00036 | false |
#-------------------------------------------------------------------------
# Copyright (c) Microsoft. 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.apa... | [
"#-------------------------------------------------------------------------\n",
"# Copyright (c) Microsoft. All rights reserved.\n",
"#\n",
"# Licensed under the Apache License, Version 2.0 (the \"License\");\n",
"# you may not use this file except in compliance with the License.\n",
"# You may obtain a ... | [
0.013333333333333334,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.013157894736842105,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.014492753623188406,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | 71 | 0.002959 | false |
import clr, sys
clr.AddReference('ZyGames.Framework.Common');
clr.AddReference('ZyGames.Framework');
clr.AddReference('ZyGames.Framework.Game');
clr.AddReference('ZyGames.Tianjiexing.Model');
clr.AddReference('ZyGames.Tianjiexing.BLL');
clr.AddReference('ZyGames.Tianjiexing.Lang');
clr.AddReference('ZyGames.Tia... | [
"import clr, sys\r\n",
"clr.AddReference('ZyGames.Framework.Common');\r\n",
"clr.AddReference('ZyGames.Framework');\r\n",
"clr.AddReference('ZyGames.Framework.Game');\r\n",
"clr.AddReference('ZyGames.Tianjiexing.Model');\r\n",
"clr.AddReference('ZyGames.Tianjiexing.BLL');\r\n",
"clr.AddReference('ZyGame... | [
0.058823529411764705,
0.02127659574468085,
0.025,
0.022222222222222223,
0.020833333333333332,
0.021739130434782608,
0.02127659574468085,
0.019230769230769232,
0.045454545454545456,
0.045454545454545456,
0.045454545454545456,
0.023809523809523808,
0.022727272727272728,
0.018867924528301886,... | 63 | 0.020268 | false |
################################################################################
### Copyright © 2012-2013 BlackDragonHunt
###
### This file is part of the Super Duper Script Editor.
###
### The Super Duper Script Editor is free software: you can redistribute it
### and/or modify it under the terms of the GNU Genera... | [
"################################################################################\n",
"### Copyright © 2012-2013 BlackDragonHunt\n",
"### \n",
"### This file is part of the Super Duper Script Editor.\n",
"### \n",
"### The Super Duper Script Editor is free software: you can redistribute it\n",
"### and/... | [
0.012345679012345678,
0.023809523809523808,
0.2,
0.017857142857142856,
0.2,
0.013157894736842105,
0.013513513513513514,
0.0125,
0.023255813953488372,
0.2,
0.012987012987012988,
0.013333333333333334,
0.015151515151515152,
0.02040816326530612,
0.2,
0.014285714285714285,
0.0217391304347... | 122 | 0.063526 | false |
from .types.CMakeVariable import CMakeVariable
from .types.VariableCollection import VariableCollection
class CMakeInfo(VariableCollection):
"""CMake Information related variables"""
CMAKE_ARGC = ()
CMAKE_ARGV0 = ()
CMAKE_AR = ()
CMAKE_BINARY_DIR = ()
CMAKE_BUILD_TOOL = ()
CMAKE_CACHEFILE... | [
"from .types.CMakeVariable import CMakeVariable\n",
"from .types.VariableCollection import VariableCollection\n",
"\n",
"class CMakeInfo(VariableCollection):\n",
" \"\"\"CMake Information related variables\"\"\"\n",
"\n",
" CMAKE_ARGC = ()\n",
" CMAKE_ARGV0 = ()\n",
" CMAKE_AR = ()\n",
... | [
0,
0,
0,
0.02702702702702703,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | 110 | 0.000246 | false |
"""
This module contains the 'validate_account' menu node.
"""
from textwrap import dedent
from menu.character import _options_choose_characters
def validate_account(caller, input):
"""Prompt the user to enter the received validation code."""
text = ""
options = (
{
"key": "b",
... | [
"\"\"\"\n",
"This module contains the 'validate_account' menu node.\n",
"\n",
"\"\"\"\n",
"\n",
"from textwrap import dedent\n",
"\n",
"from menu.character import _options_choose_characters\n",
"\n",
"def validate_account(caller, input):\n",
" \"\"\"Prompt the user to enter the received valid... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.02702702702702703,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | 40 | 0.000676 | false |
"""
This module is used to configure the behaviour of Krait when a request arrives and when its response is sent.
Currently, this module is used to configure routing and the client-side cache.
The members of this module should only be changed from ``.py/init.py``, later changes are ignored.
Reference
=========
"""
... | [
"\"\"\"\n",
"This module is used to configure the behaviour of Krait when a request arrives and when its response is sent.\n",
"Currently, this module is used to configure routing and the client-side cache.\n",
"\n",
"The members of this module should only be changed from ``.py/init.py``, later changes are ... | [
0,
0.00909090909090909,
0,
0,
0.010101010101010102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.01020408163265306,
0,
0,
0,
0.009174311926605505,
0,
0,
0,
0,
0,
0.009259259259259259,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | 96 | 0.004688 | false |
from news_spider import news_spider
import urllib
import urllib2
import cookielib
import time
import StringIO
import gzip
import sys
import re
import time
import os
import zlib
import random
import urlparse
# _url = 'http://newgame.17173.com/game-video-11958.html'
_url = 'http://tag.gamersky.com/v/2245.html'
vide... | [
"\n",
"\n",
"from news_spider import news_spider\n",
"import urllib\n",
"import urllib2\n",
"import cookielib\n",
"import time\n",
"import StringIO\n",
"import gzip\n",
"import sys\n",
"import re\n",
"import time\n",
"import os\n",
"import zlib\n",
"import random\n",
"import urlparse\n... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.015873015873015872,
0,
0.021505376344086023,
0.022988505747126436,
0.014705882352941176,
0.02857142857142857,
0.022222222222222223,
0.08333333333333333,
0,
0.030303030303030304,
0.014084507... | 231 | 0.007041 | false |
#Proposer
from twisted.internet.protocol import DatagramProtocol
from twisted.internet import reactor
from CommandParsing import *
import socket
import Queue
from LockService import LockService
class ServerNode(DatagramProtocol):
def __init__(self, acceptorAddresses, proposalNumberHop, startingRequestN... | [
"#Proposer\r\n",
"\r\n",
"from twisted.internet.protocol import DatagramProtocol\r\n",
"from twisted.internet import reactor\r\n",
"from CommandParsing import *\r\n",
"import socket\r\n",
"import Queue\r\n",
"from LockService import LockService\r\n",
"\r\n",
"class ServerNode(DatagramProtocol):\r\... | [
0.09090909090909091,
0,
0,
0,
0,
0,
0,
0,
0,
0.02702702702702703,
0.011627906976744186,
0.04,
0,
0,
0,
0,
0,
0,
0,
0,
0.021739130434782608,
0,
0,
0,
0.012658227848101266,
0.05263157894736842,
0.0125,
0.045454545454545456,
0.012658227848101266,
0.012345679012... | 213 | 0.011493 | false |
import sys
import urllib
import urlparse
import xbmcgui
import xbmcplugin
import xbmcaddon
import xbmc
import urllib, json
import requests
from lib import youtube
base_url = sys.argv[0]
addon_handle = int(sys.argv[1])
addon = xbmcaddon.Addon()
addonname = addon.getAddonInfo('name')
#xbmcgui.Dialog().ok(addonna... | [
"import sys\n",
"import urllib\n",
"import urlparse\n",
"import xbmcgui\n",
"import xbmcplugin\n",
"import xbmcaddon\n",
"import xbmc\n",
"import urllib, json\n",
"import requests\n",
"from lib import youtube\n",
"\n",
"base_url = sys.argv[0]\n",
"addon_handle = int(sys.argv[1])\n",
"\n",
... | [
0,
0,
0,
0,
0,
0,
0,
0.05,
0,
0,
0,
0,
0,
0,
0,
0.034482758620689655,
0.024390243902439025,
0.014084507042253521,
0,
0,
0,
0,
0,
0,
0.045454545454545456,
0.02040816326530612,
0,
0.03333333333333333,
0,
0,
0.015625,
0.03125,
0,
0.02857142857142857,
... | 75 | 0.035524 | false |
# -*- coding=utf-8 -*-
from __future__ import division
import os
import sys
import time
import re
import numpy as np
from scipy import spatial
import math
import logging
import logging.handlers
user_path = ""
try:
user_path = os.environ['USERPROFILE']
except KeyError:
try:
user_path = os.environ['HOM... | [
"# -*- coding=utf-8 -*-\n",
"from __future__ import division\n",
"\n",
"import os\n",
"import sys\n",
"import time\n",
"import re\n",
"import numpy as np\n",
"from scipy import spatial\n",
"import math\n",
"import logging\n",
"import logging.handlers\n",
"\n",
"user_path = \"\"\n",
"try:... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.01639344262295082,
0.0113636363636363... | 202 | 0.001674 | false |
def encode(data):
result = []
for field in data:
(bit_size, value) = field
value_bits = [(value & (1 << bit)) > 0 for bit in xrange(0, bit_size)]
result += value_bits
print 'Total bits = {}'.format(len(result))
result = [result[i:i + 8] for i in xrange(0, len(re... | [
"def encode(data):\r\n",
" result = []\r\n",
"\r\n",
" for field in data:\r\n",
" (bit_size, value) = field\r\n",
"\r\n",
" value_bits = [(value & (1 << bit)) > 0 for bit in xrange(0, bit_size)]\r\n",
"\r\n",
" result += value_bits\r\n",
"\r\n",
" print 'Total bits ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | 82 | 0 | false |
#/usr/bin/env python
#coding:utf-8
import os, tempfile, zipfile
from django.http import HttpResponse
from django.core.servers.basehttp import FileWrapper
from settings import PWD
import mimetypes
def download(request,path,document_root):
File=os.path.join(PWD,document_root,path.replace('/',os.sep))
return sen... | [
"#/usr/bin/env python\n",
"#coding:utf-8\n",
"import os, tempfile, zipfile\n",
"from django.http import HttpResponse\n",
"from django.core.servers.basehttp import FileWrapper\n",
"from settings import PWD\n",
"import mimetypes\n",
"\n",
"def download(request,path,document_root):\n",
" File=os.p... | [
0.047619047619047616,
0.07142857142857142,
0.034482758620689655,
0,
0,
0,
0,
0,
0.07142857142857142,
0.06060606060606061,
0,
0.2,
0.058823529411764705,
0.037037037037037035,
0.013888888888888888,
0.013333333333333334,
0.022222222222222223,
0,
0,
0.043478260869565216,
0.018518... | 52 | 0.026951 | false |
#!python3
# -*- coding:utf-8 -*-
import os
import sys
import time
import ctypes
import shutil
import subprocess
IsPy3 = sys.version_info[0] >= 3
if IsPy3:
import winreg
else:
import codecs
import _winreg as winreg
BuildType = 'Release'
IsRebuild = True
Build = 'Rebuild'
Update = False
Copy = False
CleanAl... | [
"#!python3\n",
"# -*- coding:utf-8 -*-\n",
"import os\n",
"import sys\n",
"import time\n",
"import ctypes\n",
"import shutil\n",
"import subprocess\n",
"IsPy3 = sys.version_info[0] >= 3\n",
"if IsPy3:\n",
" import winreg\n",
"else:\n",
" import codecs\n",
" import _winreg as winre... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.03508771929824561,
0,
0.0625,
0.04081632653061224,
0.05263157894736842,
0.030303030303030304,
0.02857142857142857,
0.06666666666666667,
0.029850746268656716,
0.088235... | 355 | 0.006261 | false |
def recoverOTP(msg, cphr):
result = ""
if (2 * len(msg) == len(cphr)):
for i in range(len(msg)):
cipherByte = int(cphr[2*i:2*i+2], 16)
ascii = hex(ord(msg[i]) ^ cipherByte)[-2:]
if ascii[0] == 'x':
ascii = '0' + ascii[1]
result = result + ... | [
"def recoverOTP(msg, cphr):\n",
" result = \"\"\n",
" if (2 * len(msg) == len(cphr)):\n",
" for i in range(len(msg)):\n",
" cipherByte = int(cphr[2*i:2*i+2], 16)\n",
" ascii = hex(ord(msg[i]) ^ cipherByte)[-2:]\n",
" if ascii[0] == 'x':\n",
" ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.041666666666666664,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.03225806451612903,
0,
0,
0,
0,
0,
0,
0,
0,
0.02564102564102564,
0,
0,
0,
0.058823529411764705
] | 36 | 0.0044 | false |
# Copyright (c) 2016, LE GOFF Vincent
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and th... | [
"# Copyright (c) 2016, LE GOFF Vincent\n",
"# All rights reserved.\n",
"\n",
"# Redistribution and use in source and binary forms, with or without\n",
"# modification, are permitted provided that the following conditions are met:\n",
"\n",
"# * Redistributions of source code must retain the above copyri... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.012345679012345678,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.034482758620689655,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.02564102564102564,
0,
0,
0,
0,
... | 288 | 0.00112 | false |
#-------------------------------------------------------------------------
# Copyright (c) Microsoft. 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.apa... | [
"#-------------------------------------------------------------------------\n",
"# Copyright (c) Microsoft. All rights reserved.\n",
"#\n",
"# Licensed under the Apache License, Version 2.0 (the \"License\");\n",
"# you may not use this file except in compliance with the License.\n",
"# You may obtain a ... | [
0.013333333333333334,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.013157894736842105,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.011627906976744186,
... | 589 | 0.001258 | false |
# File: core.py
# Library: DOPAL - DO Python Azureus Library
#
# 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; version 2 of the License.
#
# This program is distributed in the hope that it will... | [
"# File: core.py\n",
"# Library: DOPAL - DO Python Azureus Library\n",
"#\n",
"# This program is free software; you can redistribute it and/or modify\n",
"# it under the terms of the GNU General Public License as published by\n",
"# the Free Software Foundation; version 2 of the License.\n",
"#\n",
"#... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.025,
0,
0,
0,
0,
0.037037037037037035,
0,
0.02631578947368421,
0,
0,
0,
0,
0,
0,
0.023255813953488372,
0,
0,
0... | 1,031 | 0.001201 | false |
# coding: utf-8
import __builtin__, csv, io, codecs
from mox import Mox
from datetime import datetime
from unittest import TestCase
from model.product import Product
from service.impl.csv_exporter import CSVExporter
class CSVExporterTest(TestCase):
def test_get_filename(self):
exporter = CSVExporter()
... | [
"# coding: utf-8\n",
"\n",
"import __builtin__, csv, io, codecs\n",
"from mox import Mox\n",
"from datetime import datetime\n",
"from unittest import TestCase\n",
"\n",
"from model.product import Product\n",
"from service.impl.csv_exporter import CSVExporter\n",
"\n",
"\n",
"class CSVExporterT... | [
0,
0,
0.027777777777777776,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.011363636363636364,
0,
0,
0,
0,
0,
0.00847457627118644,
0,
0,
0,
0,
0,
0.008403361344537815,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.1111111111111111,
0,
0.1111111111111111,... | 65 | 0.009659 | false |
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
# Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
#
# 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 Lice... | [
"# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.\n",
"# Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.\n",
"#\n",
"# Licensed under the Apache License, Version 2.0 (the \"License\");\n",
"# you may not use this file except in compliance with the License.\n... | [
0,
0.012345679012345678,
0,
0,
0,
0.011764705882352941,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.047619047619047616,
0.037037037037037035,
0.02702702702702703,
0.02631578947368421,
0,
0.05263157894736842,
0.05,
0.024390243902439025,
0,
0.07142857142857142,
0... | 71 | 0.010727 | false |
import ebaysdk
import ast
from AlertsParameters.Categories.Category import Category
class EbayCategoriesList(object):
def __init__(self):
self.root = Category("root", -1, 0)
@staticmethod
def fromEbayResquest(cache):
categoriesList = EbayCategoriesList()
api = ebaysdk.shopping.C... | [
"\n",
"import ebaysdk\n",
"import ast\n",
"from AlertsParameters.Categories.Category import Category\n",
"\n",
"class EbayCategoriesList(object):\n",
"\n",
" def __init__(self):\n",
" self.root = Category(\"root\", -1, 0)\n",
"\n",
" @staticmethod\n",
" def fromEbayResquest(cac... | [
0,
0,
0,
0,
0,
0.029411764705882353,
0,
0,
0,
0,
0,
0,
0,
0,
0.012345679012345678,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.03571428571428571,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.014084507042253521,
0.022988505747126436,
0,
0,
0,
0,
0,... | 49 | 0.002338 | false |
# "Bubble Math"
# Developed RL Vision (www.rlvision.com)
# Source code licensed under GPLv3 (see LICENSE.txt)
# Dev Env: Portable Python 2.7.5.1 (Python2/Windows/Pygame/PyScripter)
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Util.py
# This module houses general helper func... | [
"# \"Bubble Math\"\n",
"# Developed RL Vision (www.rlvision.com)\n",
"# Source code licensed under GPLv3 (see LICENSE.txt)\n",
"# Dev Env: Portable Python 2.7.5.1 (Python2/Windows/Pygame/PyScripter)\n",
"# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #\n",
"# Util.py\n... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.02040816326530612,
0.07142857142857142,
0.07142857142857142,
0.02702702702702703,
0,
0.03333333333333333,
0.017543859649122806,
0.027777777777777776,
0.07142857142857142,
0.034482758620689655,
0.034482758620689655,... | 58 | 0.029955 | false |
from contextlib import closing
import configparser
import csv
import datetime
import io
import sqlite3
import urllib.request
import zipfile
ini = configparser.ConfigParser()
ini.read('database.ini')
response = urllib.request.urlopen('http://timezonedb.com/date.txt')
tzdate = datetime.date(*[int(i) for i in response.... | [
"from contextlib import closing\n",
"import configparser\n",
"import csv\n",
"import datetime\n",
"import io\n",
"import sqlite3\n",
"import urllib.request\n",
"import zipfile\n",
"\n",
"ini = configparser.ConfigParser()\n",
"ini.read('database.ini')\n",
"\n",
"response = urllib.request.urlo... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | 50 | 0 | false |
# -*- coding: utf-8 -*-
# ProjectEuler/src/python/problem149.py
#
# Searching for a maximum-sum subsequence.
# ========================================
# Published on Friday, 13th April 2007, 10:00 pm
#
# Looking at the table below, it is easy to verify that the maximum possible
# sum of adjacent numbers in any direct... | [
"# -*- coding: utf-8 -*-\n",
"# ProjectEuler/src/python/problem149.py\n",
"#\n",
"# Searching for a maximum-sum subsequence.\n",
"# ========================================\n",
"# Published on Friday, 13th April 2007, 10:00 pm\n",
"#\n",
"# Looking at the table below, it is easy to verify that the max... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.08333333333333333,
0,
0,
0.037037037037037035,
0
] | 27 | 0.004458 | false |
"""Impact of Dependencies.
The main class inspect the impact of correlation on a quantity
of interest of a model output.
TODO:
- Make test functions
- Clean the code
- Add a load/save to DependenceResult class
- User np.tril to take the values of the matrices
"""
import json
import operator
import o... | [
"\"\"\"Impact of Dependencies.\n",
"\n",
"The main class inspect the impact of correlation on a quantity\n",
"of interest of a model output.\n",
"\n",
"TODO:\n",
" - Make test functions\n",
" - Clean the code\n",
" - Add a load/save to DependenceResult class\n",
" - User np.tril to tak... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.0125,
0,
0,
0.0136986301369863,
0.01282051282051282,
0,
0,
0,
0,
0,
0,
0... | 840 | 0.000613 | false |
# This file is part of PlexPy.
#
# PlexPy 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.
#
# PlexPy is distributed in the hope t... | [
"# This file is part of PlexPy.\n",
"#\n",
"# PlexPy is free software: you can redistribute it and/or modify\n",
"# it under the terms of the GNU General Public License as published by\n",
"# the Free Software Foundation, either version 3 of the License, or\n",
"# (at your option) any later version.\n... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.010869565217391304,
0.01020408163265306,
0.010101010101010102,
0.01020408163265306,
0,
0.008130081300813009,
0,
0,
0,
0,
0,
0.0... | 914 | 0.003295 | false |
# File: genetic.py
# from chapter 13 of _Genetic Algorithms with Python_
#
# Author: Clinton Sheppard <fluentcoder@gmail.com>
# Copyright (c) 2016 Clinton Sheppard
#
# 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 ... | [
"# File: genetic.py\n",
"# from chapter 13 of _Genetic Algorithms with Python_\n",
"#\n",
"# Author: Clinton Sheppard <fluentcoder@gmail.com>\n",
"# Copyright (c) 2016 Clinton Sheppard\n",
"#\n",
"# Licensed under the Apache License, Version 2.0 (the \"License\").\n",
"# You may not use this file e... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | 196 | 0.000109 | false |
# -*- coding: utf-8 -*
#/*
import string, xbmc, xbmcgui, xbmcplugin, os, xbmcaddon
addon = xbmcaddon.Addon(id='plugin.video.shura.tv')
step = addon.getSetting('SmallStepForward')
myPlayer=xbmc.PLAYER_CORE_AUTO
try:
item=xbmcgui.ListItem('', '', '', '')
archiveName=str(xbmc.Player(myPlayer).getVideoInfoTag().getTit... | [
"# -*- coding: utf-8 -*\n",
"#/*\n",
"import string, xbmc, xbmcgui, xbmcplugin, os, xbmcaddon\n",
"\n",
"addon = xbmcaddon.Addon(id='plugin.video.shura.tv')\n",
"step = addon.getSetting('SmallStepForward')\n",
"\n",
"myPlayer=xbmc.PLAYER_CORE_AUTO\n",
"try:\n",
"\titem=xbmcgui.ListItem('', '', '',... | [
0,
0.25,
0.017857142857142856,
0,
0,
0,
0,
0.03225806451612903,
0,
0.05128205128205128,
0.028985507246376812,
0.06060606060606061,
0.03076923076923077,
0.06666666666666667,
0.030303030303030304,
0.05263157894736842,
0.045454545454545456,
0.03076923076923077,
0.03389830508474576,
... | 28 | 0.042952 | false |
# -*- coding: utf-8 -*-
###############################################################################################
#
# MediaPortal for Dreambox OS
#
# Coded by MediaPortal Team (c) 2013-2017
#
# This plugin is open source but it is NOT free software.
#
# This plugin may only be distributed to and executed... | [
"# -*- coding: utf-8 -*-\n",
"###############################################################################################\n",
"#\n",
"# MediaPortal for Dreambox OS\n",
"#\n",
"# Coded by MediaPortal Team (c) 2013-2017\n",
"#\n",
"# This plugin is open source but it is NOT free software.\n",... | [
0,
0.010416666666666666,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.011235955056179775,
0,
0.010638297872340425,
0,
0,
0,
0,
0,
0,
0.011235955056179775,
0,
0,
0.009174311926605505,
0.011627906976744186,
0,
0,
0.011235955056179775,
0.01098901098901099,
0.0120481927710... | 264 | 0.032477 | false |
# -*- coding: utf-8 -*-
###############################################################################################
#
# MediaPortal for Dreambox OS
#
# Coded by MediaPortal Team (c) 2013-2017
#
# This plugin is open source but it is NOT free software.
#
# This plugin may only be distributed to and executed... | [
"# -*- coding: utf-8 -*-\n",
"###############################################################################################\n",
"#\n",
"# MediaPortal for Dreambox OS\n",
"#\n",
"# Coded by MediaPortal Team (c) 2013-2017\n",
"#\n",
"# This plugin is open source but it is NOT free software.\n",... | [
0,
0.010416666666666666,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.011235955056179775,
0,
0.010638297872340425,
0,
0,
0,
0,
0,
0,
0.011235955056179775,
0,
0,
0.009174311926605505,
0.011627906976744186,
0,
0,
0.011235955056179775,
0.01098901098901099,
0.0120481927710... | 235 | 0.029559 | false |
# -*- coding: utf-8 -*-
###############################################################################################
#
# MediaPortal for Dreambox OS
#
# Coded by MediaPortal Team (c) 2013-2017
#
# This plugin is open source but it is NOT free software.
#
# This plugin may only be distributed to and executed... | [
"# -*- coding: utf-8 -*-\n",
"###############################################################################################\n",
"#\n",
"# MediaPortal for Dreambox OS\n",
"#\n",
"# Coded by MediaPortal Team (c) 2013-2017\n",
"#\n",
"# This plugin is open source but it is NOT free software.\n",... | [
0,
0.010416666666666666,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.011235955056179775,
0,
0.010638297872340425,
0,
0,
0,
0,
0,
0,
0.011235955056179775,
0,
0,
0.009174311926605505,
0.011627906976744186,
0,
0,
0.011235955056179775,
0.01098901098901099,
0.0120481927710... | 293 | 0.036377 | false |
#!/usr/bin/python
# -*- coding:utf-8 -*-
import urllib
import urllib2
import cookielib
#获取Cookiejar对象(存在本机的cookie信息)
cookie = cookielib.CookieJar()
#自定义opener,并将opener跟Cookiejar对象绑定
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cookie))
#安装opener,此后调用urlopen()时都会使用安装过的opener对象
urllib2.install_opener(open... | [
"#!/usr/bin/python\n",
"# -*- coding:utf-8 -*-\n",
"\n",
"import urllib\n",
"import urllib2\n",
"import cookielib\n",
"\n",
"#获取Cookiejar对象(存在本机的cookie信息)\n",
"cookie = cookielib.CookieJar()\n",
"#自定义opener,并将opener跟Cookiejar对象绑定\n",
"opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(coo... | [
0,
0,
0,
0,
0,
0,
0,
0.03333333333333333,
0,
0.029411764705882353,
0,
0.024390243902439025,
0,
0.03571428571428571,
0.005649717514124294,
0.2,
0.1,
0.06666666666666667,
0.08333333333333333,
0.2,
0.11904761904761904,
0,
0,
0.03333333333333333,
0.022727272727272728,
0... | 44 | 0.056517 | false |
from elementbase import ElementBase
from misc import *
import exceptions
class Path(ElementBase):
def __init__(self):
super().__init__('PATH')
self.eflags = 0
self.layer = -1
self.data_type = -1
self._width = 0
self.path_type = 0
self._pts = None
@pro... | [
"from elementbase import ElementBase\n",
"from misc import *\n",
"import exceptions\n",
"\n",
"class Path(ElementBase):\n",
"\n",
" def __init__(self):\n",
" super().__init__('PATH')\n",
"\n",
" self.eflags = 0\n",
" self.layer = -1\n",
" self.data_type = -1\n",
... | [
0,
0,
0,
0,
0.04,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.010752688172043012,
0.1111111111111111,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | 126 | 0.009969 | false |
# A bunch of file and text functions to make life easier
#
# Copyright: (c) Daniel Duma 2013
# Author: Daniel Duma <danielduma@gmail.com>
# For license information, see LICENSE.TXT
from __future__ import absolute_import
from __future__ import print_function
import os, re, codecs, datetime, random, sys, unicodedata... | [
"# A bunch of file and text functions to make life easier\n",
"#\n",
"# Copyright: (c) Daniel Duma 2013\n",
"# Author: Daniel Duma <danielduma@gmail.com>\n",
"\n",
"# For license information, see LICENSE.TXT\n",
"\n",
"from __future__ import absolute_import\n",
"from __future__ import print_functi... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.015625,
0,
0,
0,
0,
0,
0.125,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | 462 | 0.003741 | false |
#---------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#--------------------------------------------------------------------... | [
"#---------------------------------------------------------------------------------------------\n",
"# Copyright (c) Microsoft Corporation. All rights reserved.\n",
"# Licensed under the MIT License. See License.txt in the project root for license information.\n",
"#-------------------------------------------... | [
0.021052631578947368,
0,
0.010526315789473684,
0.021052631578947368,
0,
0,
0,
0,
0,
0.0375,
0,
0,
0,
0,
0,
0,
0,
0,
0.013888888888888888,
0.007692307692307693,
0.008130081300813009,
0.007575757575757576,
0,
0.008928571428571428,
0,
0.006134969325153374
] | 26 | 0.00548 | false |
from math import pi
from copy import copy
from urllib import urlopen, urlencode
from os.path import join as pathjoin, dirname, realpath
from urlparse import urljoin, urlparse, parse_qs
from os import close, write, unlink
from optparse import OptionParser
from StringIO import StringIO
from tempfile import mkstemp
from... | [
"from math import pi\n",
"from copy import copy\n",
"from urllib import urlopen, urlencode\n",
"from os.path import join as pathjoin, dirname, realpath\n",
"from urlparse import urljoin, urlparse, parse_qs\n",
"from os import close, write, unlink\n",
"from optparse import OptionParser\n",
"from String... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.008928571428571428,
0,
0,
0,
0,
0,
0,
0.029411764705882353,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.038461538461538464,
0,
0,
0,
... | 563 | 0.001415 | false |
# -*- coding: utf-8 -*-
#------------------------------------------------------------
# pelisalacarta - XBMC Plugin
# Canal para cinegratis
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
#------------------------------------------------------------
import urlparse,urllib2,urllib,re
from core import logger
f... | [
"# -*- coding: utf-8 -*-\n",
"#------------------------------------------------------------\n",
"# pelisalacarta - XBMC Plugin\n",
"# Canal para cinegratis\n",
"# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/\n",
"#------------------------------------------------------------\n",
"import urlpars... | [
0,
0.016129032258064516,
0,
0,
0,
0.016129032258064516,
0.11764705882352941,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.058823529411764705,
0,
0,
0.05,
0,
0,
0,
0.02127659574468085,
0.021052631578947368,
0.011695906432748537,
0.011560693641618497,
... | 156 | 0.016284 | false |
# -*- coding: utf-8 -*-
#------------------------------------------------------------
# License: GPL (http://www.gnu.org/licenses/gpl-3.0.html)
# Based on code from youtube addon
#------------------------------------------------------------
import os
import sys
import plugintools
import xbmc,xbmcaddon
from addon.comm... | [
"# -*- coding: utf-8 -*-\n",
"#------------------------------------------------------------\n",
"# License: GPL (http://www.gnu.org/licenses/gpl-3.0.html)\n",
"# Based on code from youtube addon\n",
"#------------------------------------------------------------\n",
"\n",
"import os\n",
"import sys\n",... | [
0,
0.016129032258064516,
0,
0,
0.016129032258064516,
0,
0,
0,
0,
0.09090909090909091,
0,
0,
0,
0,
0,
0,
0,
0,
0.017857142857142856,
0,
0.04,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.09090909090909091,
0,
0.2,
... | 151 | 0.057066 | false |
import sys
import math
import clr
import time
clr.AddReference("MissionPlanner")
import MissionPlanner
clr.AddReference("MissionPlanner.Utilities") # includes the Utilities class
from MissionPlanner.Utilities import Locationwp
def gps_distance(lat1, lon1, lat2, lon2):
'''return distance between two points in meters,... | [
"import sys\n",
"import math\n",
"import clr\n",
"import time\n",
"clr.AddReference(\"MissionPlanner\")\n",
"import MissionPlanner\n",
"clr.AddReference(\"MissionPlanner.Utilities\") # includes the Utilities class\n",
"from MissionPlanner.Utilities import Locationwp\n",
"\n",
"def gps_distance(lat... | [
0,
0,
0,
0,
0,
0.045454545454545456,
0.013157894736842105,
0.020833333333333332,
0,
0.023809523809523808,
0.02,
0.03571428571428571,
0.015384615384615385,
0.034482758620689655,
0,
0.02040816326530612,
0.045454545454545456,
0.045454545454545456,
0.045454545454545456,
0.045454545... | 80 | 0.036005 | false |
from math import atan2, pi, sqrt, cos, sin
import random
import strings
class Quadrant():
def __init__(self):
self.name = ""
self.klingons = 0
self.stars = 0
self.starbase = False
self.scanned = False
class SectorType():
def __init__(self):
self.empty, sel... | [
"from math import atan2, pi, sqrt, cos, sin\n",
"import random\n",
"\n",
"import strings\n",
"\n",
"\n",
"class Quadrant():\n",
"\n",
" def __init__(self):\n",
" self.name = \"\"\n",
" self.klingons = 0\n",
" self.stars = 0\n",
" self.starbase = False\n",
" ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.010869565217391304,
0,
0.037037037037037035,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | 879 | 0.000546 | false |
import getopt,sys
from random import *
from sys import *
def mapCsv(map,width,height):
csv=""
#chars=[' ','╶','╷','┌','╴','─','┐','┬','╵','└','│','├','┘','┴','┤','┼']
chars=['1','9','11','13','15','2','4','6','8','10','12','14','16','3','5','7']
for y in range(height-1):
for x in range(width-1... | [
"\n",
"import getopt,sys\n",
"\n",
"from random import *\n",
"from sys import *\n",
"\n",
"\n",
"def mapCsv(map,width,height):\n",
" csv=\"\"\n",
" #chars=[' ','╶','╷','┌','╴','─','┐','┬','╵','└','│','├','┘','┴','┤','┼']\n",
" chars=['1','9','11','13','15','2','4','6','8','10','12','14'... | [
0,
0.1111111111111111,
0,
0,
0,
0,
0,
0.06666666666666667,
0.09090909090909091,
0.012987012987012988,
0.20481927710843373,
0,
0.03333333333333333,
0.043478260869565216,
0.08695652173913043,
0.04,
0.04,
0.07142857142857142,
0.03125,
0.021052631578947368,
0,
0.066666666666666... | 186 | 0.044904 | false |
class Normalizer(object):
"""Used to normailze the data going into and coming out of a neural
network.
"""
def __init__(self, in_min = 0, in_max = 1,
out_min = 0, out_max = 1,
norm_min = 0, norm_max = 1):
self.in_offset = in_min
self.in_rang... | [
"class Normalizer(object):\n",
" \"\"\"Used to normailze the data going into and coming out of a neural\n",
" network. \n",
"\n",
" \"\"\"\n",
" def __init__(self, in_min = 0, in_max = 1,\n",
" out_min = 0, out_max = 1,\n",
" norm_min = 0, norm_max = 1):\n"... | [
0,
0,
0.06666666666666667,
0,
0,
0.0851063829787234,
0.09302325581395349,
0.08695652173913043,
0.1111111111111111,
0,
0,
0,
0,
0,
0,
0,
0,
0.1111111111111111,
0.2,
0.034482758620689655,
0,
0.25,
0,
0.03333333333333333,
0,
0,
0,
0.03225806451612903,
0,
0,
0... | 42 | 0.034956 | false |
# Imports
import os
os.system('cls')
# Variables
SourceFolder = input("\nFrom which folder do you wish me to move the files?\n")
TargetFolder = input("\nTo which folder do you wish me to move the files?\n")
MaxSize = int(input("\nMinimum size (MB) of file to move? \n")) *1048576
SourceFiles = "a"
TargetFiles = "b"
Mo... | [
"# Imports\n",
"import os\n",
"os.system('cls')\n",
"\n",
"# Variables\n",
"SourceFolder = input(\"\\nFrom which folder do you wish me to move the files?\\n\")\n",
"TargetFolder = input(\"\\nTo which folder do you wish me to move the files?\\n\")\n",
"MaxSize = int(input(\"\\nMinimum size (MB) of file... | [
0,
0,
0,
0,
0,
0,
0,
0.0136986301369863,
0,
0,
0,
0,
0,
0,
0.05128205128205128,
0,
0,
0.06666666666666667,
0.027777777777777776,
0.06451612903225806,
0,
0,
0.037037037037037035,
0,
0,
0,
0,
0,
0.03389830508474576,
0,
0.03125,
0,
0.04285714285714286,
... | 52 | 0.011323 | false |
from nn.layer import Layer
import theano.tensor as t
import theano
from dataset.pickle import writePickleZip, readPickleZip
from dataset.shared import isShared, getShape
class Network () :
def __init__ (self, prof=None, debug=False) :
self._profiler = prof
self._layers = []
self._debug = d... | [
"from nn.layer import Layer\n",
"import theano.tensor as t\n",
"import theano\n",
"from dataset.pickle import writePickleZip, readPickleZip\n",
"from dataset.shared import isShared, getShape\n",
"\n",
"class Network () :\n",
" def __init__ (self, prof=None, debug=False) :\n",
" self._profi... | [
0,
0,
0,
0,
0,
0,
0.10526315789473684,
0.04,
0,
0,
0,
0,
0,
0.034482758620689655,
0,
0,
0,
0,
0,
0,
0,
0.02857142857142857,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.041666666666666664,
0,
0,
0,
0,
0,
0,
0,
0.02127659574468085,
0,
0,
0,
0,
0... | 520 | 0.005607 | false |
'''
Created on 23 juil. 2015
@author: admin
'''
import numpy as np
import scipy.sparse as sparse
from sklearn.base import BaseEstimator, ClassifierMixin
from sklearn.preprocessing import Normalizer
from sklearn.utils.extmath import safe_sparse_dot
# Internal utilities
# Import the Cythonized module
from csom import... | [
"'''\n",
"Created on 23 juil. 2015\n",
"\n",
"@author: admin\n",
"'''\n",
"import numpy as np\n",
"import scipy.sparse as sparse\n",
"from sklearn.base import BaseEstimator, ClassifierMixin\n",
"from sklearn.preprocessing import Normalizer\n",
"from sklearn.utils.extmath import safe_sparse_dot\n",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.045454545454545456,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.014084507042253521,
0,
0,
0,
0,
0,
0,
0,
... | 445 | 0.005202 | false |
# Date Time Example
# Copyright (C) 2009 Yit Choong (http://code.google.com/u/yitchoong/)
# Copyright (C) 2009 Luke Kenneth Casson Leighton <lkcl@lkcl.net>
from SimplePanel import SimplePanel
from pyjamas import Factory
from VerticalPanel import VerticalPanel
from HorizontalPanel import HorizontalPanel
from PopupPan... | [
"# Date Time Example\n",
"# Copyright (C) 2009 Yit Choong (http://code.google.com/u/yitchoong/)\n",
"# Copyright (C) 2009 Luke Kenneth Casson Leighton <lkcl@lkcl.net>\n",
"\n",
"from SimplePanel import SimplePanel\n",
"from pyjamas import Factory\n",
"from VerticalPanel import VerticalPanel\n",
"from... | [
0,
0,
0,
0,
0,
0,
0.024390243902439025,
0,
0.02857142857142857,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.03571428571428571,
0.12903225806451613,
0.1276595744680851,
0,
0,
0,
0,
0,
0,
0,
0.034482758620689655,
0,
0,
0,
0,
0,
0,
0,
0,... | 459 | 0.007027 | false |
#
# This file is part of Dragonfly.
# (c) Copyright 2007, 2008 by Christo Butcher
# Licensed under the LGPL.
#
# Dragonfly 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 ... | [
"#\r\n",
"# This file is part of Dragonfly.\r\n",
"# (c) Copyright 2007, 2008 by Christo Butcher\r\n",
"# Licensed under the LGPL.\r\n",
"#\r\n",
"# Dragonfly is free software: you can redistribute it and/or modify it \r\n",
"# under the terms of the GNU Lesser General Public License as published \r... | [
0,
0,
0,
0,
0,
0.013333333333333334,
0.013157894736842105,
0.013333333333333334,
0,
0,
0.014084507042253521,
0.015384615384615385,
0.013888888888888888,
0,
0,
0.014084507042253521,
0.02040816326530612,
0,
0,
0,
0,
0,
0,
0,
0.013157894736842105,
0,
0,
0,
0,
0... | 68 | 0.002113 | false |
#!/usr/bin/python
"""
MAIN DRIVER CODE FOR CLASSIFICATION
This class does the main classification and prediction task.
Usage:
classify_relationships_posts.csv -m [modelfile] -t [training file csv] -e [test file csv] -o [prediction output file]
Advanced options:
-p [probability prediction output file] -c [clas... | [
"#!/usr/bin/python\r\n",
"\r\n",
"\"\"\"\r\n",
"MAIN DRIVER CODE FOR CLASSIFICATION\r\n",
"This class does the main classification and prediction task.\r\n",
"Usage:\r\n",
"classify_relationships_posts.csv -m [modelfile] -t [training file csv] -e [test file csv] -o [prediction output file]\r\n",
"Adva... | [
0,
0,
0,
0,
0,
0,
0.008403361344537815,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.009900990099009901,
0,
0.009615384615384616,
0.011111111111111112,
0.011363636363636364,
0.011111111111111112,
0,
0,
0,... | 153 | 0.001147 | false |
"""
Description: This is the implementation of the acceptor node
"""
from twisted.internet.protocol import DatagramProtocol
from twisted.internet import reactor
from CommandParsing import *
from collections import defaultdict
# Promise Format
# CommandType.Promise RequestNumber InstanceId (value)
# Denial Format
# C... | [
"\"\"\"\n",
"Description: This is the implementation of the acceptor node\n",
"\"\"\"\n",
"from twisted.internet.protocol import DatagramProtocol\n",
"from twisted.internet import reactor\n",
"\n",
"from CommandParsing import *\n",
"from collections import defaultdict\n",
"\n",
"# Promise Format\n... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.01818181818181818,
0,
0.01694915254237288,
0,
0.02631578947368421,
0.047619047619047616,
0.019230769230769232,
0.020833333333333332,
0.02127659574468085,
0,
0.02040816326530612,
0.020833333333333332,
0,
0.05,
0.023809523809523... | 68 | 0.029017 | false |
from django.shortcuts import render, redirect
from django.http import (HttpResponseForbidden, HttpResponse,
HttpResponseNotFound)
from django.template import Context
from django.contrib.auth.decorators import login_required
from datetime import datetime
import json
import os
from datasets.mo... | [
"from django.shortcuts import render, redirect\n",
"from django.http import (HttpResponseForbidden, HttpResponse,\n",
" HttpResponseNotFound)\n",
"from django.template import Context\n",
"from django.contrib.auth.decorators import login_required\n",
"\n",
"from datetime import da... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | 302 | 0 | false |
#!/usr/bin/python -tt
#
# This file is part of BRAT.
#
# BRAT 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.
#
# BRAT... | [
"#!/usr/bin/python -tt\n",
"#\n",
"# This file is part of BRAT.\n",
"#\n",
"# BRAT is free software: you can redistribute it and/or modify\n",
"# it under the terms of the GNU General Public License as published by\n",
"# the Free Software Foundation, either version 3 of the License, or\n",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.047619047619047616,
0,
0,
0,
0.08333333333333333,
0,
0.02631578947368421,
0,
0,
0.02564102564102564,
0,
0.02564102564102564,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.0166666666666... | 524 | 0.008704 | false |
# -*- coding: utf-8 -*-
# ------------------------------------------------------------
# pelisalacarta 4
# Copyright 2015 tvalacarta@gmail.com
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
#
# Distributed under the terms of GNU General Public License v3 (GPLv3)
# http://www.gnu.org/licenses/gpl-3.0.html
# -... | [
"# -*- coding: utf-8 -*-\n",
"# ------------------------------------------------------------\n",
"# pelisalacarta 4\n",
"# Copyright 2015 tvalacarta@gmail.com\n",
"# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/\n",
"#\n",
"# Distributed under the terms of GNU General Public License v3 (GPLv3)\... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.05405405405405406,
0.06060606060606061,
0,
0,
0.041666666666666664,
0.027777777777777776,
0,
0,
0,
0.02912621359223301,
0.02... | 504 | 0.015579 | false |
# encoding: utf-8
#
# the statemachine object, create an instance then call run()
# state() as a decorator adds states and their methods
#
from pygame.event import get, peek
from pygame.locals import QUIT
from pygame.time import Clock
import game
#~ import display
class simpleStateObject(object):
def __init__(se... | [
"# encoding: utf-8\n",
"#\n",
"# the statemachine object, create an instance then call run()\n",
"# state() as a decorator adds states and their methods\n",
"#\n",
"\n",
"from pygame.event import get, peek\n",
"from pygame.locals import QUIT\n",
"from pygame.time import Clock\n",
"\n",
"import g... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.05555555555555555,
0,
0.030303030303030304,
0,
0.025,
0,
0,
0.03125,
0,
0.025,
0,
0.047619047619047616,
0,
0,
0,
0.041666666666666664,
0,
0.017857142857142856,
0,
0,
0,
0,
0.04,
0,
0.030303030303030304,
0,
0... | 198 | 0.012014 | false |
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
# Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
#
# 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 Li... | [
"# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.\n",
"# Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.\n",
"# \n",
"# Licensed under the Apache License, Version 2.0 (the \"License\"); \n",
"# you may not use this file except in compliance with the License.... | [
0,
0.012345679012345678,
0.3333333333333333,
0.014925373134328358,
0,
0.011764705882352941,
0.3333333333333333,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.047619047619047616,
0.037037037037037035,
0.02702702702702703,
0.03125,
0.02564102564102564,
0.029411764705882353,
0,
0... | 72 | 0.01949 | false |
# -*- coding: utf-8 -*-
# --------------------------------------------------------------------------------
# Item is the object we use for representing data
# --------------------------------------------------------------------------------
import base64
import copy
import os
import urllib
from HTMLParser import HTML... | [
"# -*- coding: utf-8 -*-\n",
"# --------------------------------------------------------------------------------\n",
"# Item is the object we use for representing data \n",
"# --------------------------------------------------------------------------------\n",
"\n",
"import base64\n",
"import copy\n",
... | [
0,
0,
0.0196078431372549,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.05,
0,
0,
0,
0,
0,
0,
0,
0,
0.01,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.0625,
0,
0,
0,
0,
0,
0.008264462809917356,
0,
0,
0.01... | 482 | 0.001385 | false |
#!python3
# -*- coding:utf-8 -*-
import os
import sys
import time
import ctypes
import shutil
import subprocess
IsPy3 = sys.version_info[0] >= 3
if IsPy3:
import winreg
else:
import codecs
import _winreg as winreg
BuildType = 'Release'
IsRebuild = True
Build = 'Rebuild'
Update = False
Copy = False
CleanAl... | [
"#!python3\n",
"# -*- coding:utf-8 -*-\n",
"import os\n",
"import sys\n",
"import time\n",
"import ctypes\n",
"import shutil\n",
"import subprocess\n",
"IsPy3 = sys.version_info[0] >= 3\n",
"if IsPy3:\n",
" import winreg\n",
"else:\n",
" import codecs\n",
" import _winreg as winre... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.03508771929824561,
0,
0.0625,
0.043478260869565216,
0.05263157894736842,
0.030303030303030304,
0.029850746268656716,
0.06666666666666667,
0.03125,
0.08823529411764706... | 355 | 0.006276 | false |
#
# This file is part of Dragonfly.
# (c) Copyright 2007, 2008 by Christo Butcher
# Licensed under the LGPL.
#
# Dragonfly 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 th... | [
"#\n",
"# This file is part of Dragonfly.\n",
"# (c) Copyright 2007, 2008 by Christo Butcher\n",
"# Licensed under the LGPL.\n",
"#\n",
"# Dragonfly is free software: you can redistribute it and/or modify it \n",
"# under the terms of the GNU Lesser General Public License as published \n",
"# by... | [
0,
0,
0,
0,
0,
0.013513513513513514,
0.013333333333333334,
0.013513513513513514,
0,
0,
0.014285714285714285,
0.015625,
0.014084507042253521,
0,
0,
0.014285714285714285,
0.020833333333333332,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.01298701298701... | 225 | 0.001453 | false |
class EquipLib:
'Equipment library'
m_libHat = {
'Royal Dunwitch Hat': {
'name': 'Royal Dunwitch Hat',
'type': 'Hat',
'class': 'Magician',
'level': 150,
'str': 0,
'dex': 0,
'int': 40,
'luk': 40,
... | [
"class EquipLib:\n",
" 'Equipment library'\n",
"\n",
" m_libHat = {\n",
" 'Royal Dunwitch Hat': {\n",
" 'name': 'Royal Dunwitch Hat',\n",
" 'type': 'Hat',\n",
" 'class': 'Magician',\n",
" 'level': 150,\n",
" 'str': 0,\n",
" ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.023255813953488372,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.023255813953488372,
0,
... | 6,917 | 0.00137 | false |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace SeriesNamer
{
public class StringSeperator
{
public StringSeperator(string aSeperator, string aFinalSeperator, string empty)
{
mSeperator = aSeperator;
mFinalSeperator = aFin... | [
"using System;\n",
"using System.Collections.Generic;\n",
"using System.Linq;\n",
"using System.Text;\n",
"\n",
"namespace SeriesNamer\n",
"{\n",
" public class StringSeperator\n",
" {\n",
" public StringSeperator(string aSeperator, string aFinalSeperator, string empty)\n",
" ... | [
0.07142857142857142,
0.029411764705882353,
0.05263157894736842,
0.05263157894736842,
0,
0,
0,
0,
0,
0.011363636363636364,
0,
0.02702702702702703,
0.02127659574468085,
0.07142857142857142,
0,
0,
0,
0.02702702702702703,
0.02127659574468085,
0.08,
0,
0,
0,
0.02702702702702... | 86 | 0.019457 | false |
# -*- coding: utf-8 -*-
from Plugins.Extensions.MediaPortal.plugin import _
from Plugins.Extensions.MediaPortal.resources.imports import *
from Plugins.Extensions.MediaPortal.additions.fun.youtube import YT_ListScreen
GAME_Version = "GAME-Channels v0.93"
GAME_siteEncoding = 'utf-8'
class show_GAME_Genre(MPScreen):
... | [
"# -*- coding: utf-8 -*-\n",
"from Plugins.Extensions.MediaPortal.plugin import _\n",
"from Plugins.Extensions.MediaPortal.resources.imports import *\n",
"from Plugins.Extensions.MediaPortal.additions.fun.youtube import YT_ListScreen\n",
"\n",
"GAME_Version = \"GAME-Channels v0.93\"\n",
"\n",
"GAME_si... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.030303030303030304,
0,
0.03333333333333333,
0,
0.023255813953488372,
0.015625,
0,
0.022222222222222223,
0.037037037037037035,
0.012658227848101266,
0,
0.07692307692307693,
0.034482758620689655,
0.041666666666666664,
0.07692307692307693,
0,... | 77 | 0.025436 | false |
#!/usr/bin/python3
# AsparagramLoader.py
#
# Copyright (C) 2015 Caian Benedicto <caianbene@gmail.com>
#
# This file is part of Asparagus
#
# Asparagus 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; ... | [
"#!/usr/bin/python3\n",
"\n",
"# AsparagramLoader.py\n",
"#\n",
"# Copyright (C) 2015 Caian Benedicto <caianbene@gmail.com>\n",
"#\n",
"# This file is part of Asparagus\n",
"#\n",
"# Asparagus is free software; you can redistribute it and/or modify it \n",
"# under the terms of the GNU Genera... | [
0,
0,
0,
0,
0,
0,
0,
0,
0.0136986301369863,
0.014285714285714285,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.023255813953488372,
0,
0,
0,
0,
0.02702702702702703,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | 228 | 0.006585 | false |
import numpy as np
from scipy.cluster import vq
from .util import log_like_Gauss2
from .sampling import testData
from .emgmm import EMGMM
from .moments import *
class VBGMM(EMGMM):
"""
Gaussian Mixture Model with Variational Bayesian (VB) Learning.
This class is mostly based on the EMGMM class.
Attri... | [
"import numpy as np\n",
"from scipy.cluster import vq\n",
"from .util import log_like_Gauss2\n",
"from .sampling import testData\n",
"from .emgmm import EMGMM\n",
"from .moments import *\n",
"\n",
"class VBGMM(EMGMM):\n",
" \"\"\"\n",
" Gaussian Mixture Model with Variational Bayesian (VB) L... | [
0,
0,
0,
0,
0,
0,
0,
0.05,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.012345679012345678,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.012345679012345678,
0,
0,
0.08823529411764706,
0,
0,
0,
0,
0,
0,
0,
0,... | 199 | 0.004492 | false |
# -*- coding: utf-8 -*-
# ProjectEuler/src/python/problem013.py
#
# Large sum
# =========
# Published on Friday, 22nd March 2002, 06:00 pm
#
# Work out the first ten digits of the sum of the following one-hundred
# 50-digit numbers.
#import projecteuler as pe
data = (
37107287533902102798797998220837590246510135... | [
"# -*- coding: utf-8 -*-\n",
"# ProjectEuler/src/python/problem013.py\n",
"#\n",
"# Large sum\n",
"# =========\n",
"# Published on Friday, 22nd March 2002, 06:00 pm\n",
"#\n",
"# Work out the first ten digits of the sum of the following one-hundred\n",
"# 50-digit numbers.\n",
"\n",
"#import pro... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.037037037037037035,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | 120 | 0.001312 | false |
# -*- coding: utf-8 -*-
import re
import os
import sys
import xbmc
import urllib
import xbmcvfs
import xbmcaddon
import xbmcgui,xbmcplugin
import simplejson
from bs4 import BeautifulSoup
__addon__ = xbmcaddon.Addon()
__author__ = __addon__.getAddonInfo('author')
__scriptid__ = __addon__.getAddonInfo('id')... | [
"# -*- coding: utf-8 -*-\n",
"\n",
"import re\n",
"import os\n",
"import sys\n",
"import xbmc\n",
"import urllib\n",
"import xbmcvfs\n",
"import xbmcaddon\n",
"import xbmcgui,xbmcplugin\n",
"import simplejson\n",
"from bs4 import BeautifulSoup\n",
"\n",
"__addon__ = xbmcaddon.Addon()\... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.07692307692307693,
0,
0,
0,
0.02857142857142857,
0.02,
0.021739130434782608,
0,
0.0196078431372549,
0.021739130434782608,
0,
0.046511627906976744,
0.0449438202247191,
0.06060606060606061,
0.05555555555555555,
0,
0.03225806451612903,
0,... | 259 | 0.011135 | false |
__author__ = 'Corsac'
name = raw_input("Enter file:")
if len(name) < 1 : name = "mbox-short.txt"
fh = open(name)
sent = dict()
for line in fh:
line = line.strip()
if line.startswith("From"):
words = line.split()
sent[words[1]] = sent.get(words[1], 0) + 1
bigcount = None
bigword = None
for wor... | [
"__author__ = 'Corsac'\n",
"\n",
"\n",
"name = raw_input(\"Enter file:\")\n",
"if len(name) < 1 : name = \"mbox-short.txt\"\n",
"fh = open(name)\n",
"sent = dict()\n",
"for line in fh:\n",
" line = line.strip()\n",
" if line.startswith(\"From\"):\n",
" words = line.split()\n",
" ... | [
0,
0,
0,
0,
0.046511627906976744,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.02857142857142857,
0.006355932203389831
] | 22 | 0.003702 | false |
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
# Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
#
# 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 Lice... | [
"# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.\n",
"# Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.\n",
"#\n",
"# Licensed under the Apache License, Version 2.0 (the \"License\");\n",
"# you may not use this file except in compliance with the License.\n... | [
0,
0.012345679012345678,
0,
0,
0,
0.011764705882352941,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.047619047619047616,
0.037037037037037035,
0.02702702702702703,
0.016666666666666666,
0.024390243902439025,
0,
0.07142857142857142,
0.013157894736842105,
0.016806722689075... | 72 | 0.010613 | false |
'''
@name Robot Module
@author Andres Liiver
Module consists of the Robot class.
'''
from simulator import *
import random
class Robot(Agent):
def reason(self, world):
directions = {0: 'N', 1: 'NE', 2: 'E', 3: 'SE', 4: 'S', 5: 'SW', 6: 'W', 7: 'NW'}
directionsLookupTable = { # current direction... | [
"'''\n",
"@name Robot Module\n",
"@author Andres Liiver\n",
"\n",
"Module consists of the Robot class.\n",
"'''\n",
"\n",
"from simulator import *\n",
"import random\n",
"\n",
"class Robot(Agent):\n",
"\n",
" def reason(self, world):\n",
" directions = {0: 'N', 1: 'NE', 2: 'E', 3... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.05,
0,
0,
0.011111111111111112,
0.022988505747126436,
0,
0,
0,
0,
0,
0,
0.012345679012345678,
0,
0,
0,
0,
0,
0,
0.012345679012345678,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.0123456790... | 177 | 0.006414 | false |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sympy
from sympy.parsing.sympy_parser import parse_expr
def filterOut(out,decimals=6):
#TODO E,constants (pi,e), localization
#TODO tokenize this
# s=unicode(out)
#to make floats look prettier
try:
s=(u"{:."+str(decimals)+"g}").format(... | [
"#!/usr/bin/env python\n",
"# -*- coding: utf-8 -*-\n",
"\n",
"import sympy\n",
"from sympy.parsing.sympy_parser import parse_expr\n",
"\n",
"\n",
"def filterOut(out,decimals=6):\n",
" #TODO E,constants (pi,e), localization\n",
" #TODO tokenize this\n",
" # s=unicode(out)\n",
" #to... | [
0,
0,
0,
0,
0,
0,
0,
0.03225806451612903,
0.023255813953488372,
0.041666666666666664,
0,
0.029411764705882353,
0,
0.017543859649122806,
0.041666666666666664,
0,
0.025,
0.043478260869565216,
0,
0.058823529411764705,
0.06451612903225806,
0.06896551724137931,
0.0555555555555... | 111 | 0.051425 | false |
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
# Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
#
# 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 Lice... | [
"# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.\n",
"# Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.\n",
"#\n",
"# Licensed under the Apache License, Version 2.0 (the \"License\");\n",
"# you may not use this file except in compliance with the License.\n... | [
0,
0.012345679012345678,
0,
0,
0,
0.011764705882352941,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.047619047619047616,
0.037037037037037035,
0.02631578947368421,
0.03125,
0.02564102564102564,
0.029411764705882353,
0.02702702702702703,
0.02127659574468085,
0.0... | 178 | 0.005266 | false |
#-------------------------------------------------------------------------
# Copyright (c) Microsoft. 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.apa... | [
"#-------------------------------------------------------------------------\n",
"# Copyright (c) Microsoft. All rights reserved.\n",
"#\n",
"# Licensed under the Apache License, Version 2.0 (the \"License\");\n",
"# you may not use this file except in compliance with the License.\n",
"# You may obtain a ... | [
0.013333333333333334,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.013157894736842105,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.037037037037037035,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | 249 | 0.000742 | false |
"""
Django settings for elo project.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
impor... | [
"\"\"\"\n",
"Django settings for elo project.\n",
"\n",
"For more information on this file, see\n",
"https://docs.djangoproject.com/en/1.9/topics/settings/\n",
"\n",
"For the full list of settings and their values, see\n",
"https://docs.djangoproject.com/en/1.9/ref/settings/\n",
"\"\"\"\n",
"\n",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | 164 | 0.000454 | false |
# Copyright 2014-2017 The ODL contributors
#
# This file is part of ODL.
#
# This Source Code Form is subject to the terms of the Mozilla Public License,
# v. 2.0. If a copy of the MPL was not distributed with this file, You can
# obtain one at https://mozilla.org/MPL/2.0/.
"""Functions to create noise samples of dif... | [
"# Copyright 2014-2017 The ODL contributors\n",
"#\n",
"# This file is part of ODL.\n",
"#\n",
"# This Source Code Form is subject to the terms of the Mozilla Public License,\n",
"# v. 2.0. If a copy of the MPL was not distributed with this file, You can\n",
"# obtain one at https://mozilla.org/MPL/2.0/... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | 273 | 0.000083 | false |
# CANAPE Network Testing Tool
# Copyright (C) 2014 Context Information Security
#
# 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 you... | [
"# CANAPE Network Testing Tool\n",
"# Copyright (C) 2014 Context Information Security\n",
"#\n",
"# This program is free software: you can redistribute it and/or modify\n",
"# it under the terms of the GNU General Public License as published by\n",
"# the Free Software Foundation, either ve... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.05263157894736842,
0,
0,
0.08333333333333333,
0,
0,
0.05,
0,
0,
0,
0,
0,
0.05,
0,
0,
0,
0,
0,
0.05263157894736842,
0,
0,
0,
0,
0,
0,
0,
0,
0... | 159 | 0.006367 | false |
''' Lib for Plugin
Authors:
Andrey Kvichansky (kvichans on github.com)
Version:
'1.1.2 2018-07-24'
Content
log Logger with timing
get_translation i18n
dlg_wrapper Wrapper for dlg_custom: pack/unpack values, h-align controls
ToDo: (see end of file)
'''
import sys, os... | [
"''' Lib for Plugin\n",
"Authors:\n",
" Andrey Kvichansky (kvichans on github.com)\n",
"Version:\n",
" '1.1.2 2018-07-24'\n",
"Content\n",
" log Logger with timing\n",
" get_translation i18n\n",
" dlg_wrapper Wrapper for dlg_custom: pack/unpack values, h... | [
0,
0,
0,
0,
0,
0,
0,
0,
0.011764705882352941,
0,
0,
0,
0.03571428571428571,
0.05,
0.06451612903225806,
0.06451612903225806,
0,
0.023809523809523808,
0.03389830508474576,
0,
0.02631578947368421,
0.0625,
0.13513513513513514,
0.10344827586206896,
0.12121212121212122,
0... | 859 | 0.034366 | false |
###########################################################################
# (C) 2016 Elettra - Sincrotrone Trieste S.C.p.A.. All rights reserved. #
# #
# #
# This file is ... | [
"###########################################################################\n",
"# (C) 2016 Elettra - Sincrotrone Trieste S.C.p.A.. All rights reserved. #\n",
"# #\n",
"# ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.011904761904761904,
0,
0,
0,
0,
0,
0,
0,
0.0196078431372549,
0,
0.0625,
0.14285714285714285,
0.111111111111111... | 325 | 0.09425 | false |
from .ir import CONST, RELOP, TEMP, MOVE, CJUMP, PHIBase, LPHI
from .loop import Region, Loop
from logging import getLogger
logger = getLogger(__name__)
class LoopDetector(object):
def __init__(self):
pass
def process(self, scope):
self.scope = scope
self.scope.reset_loop_tree()
... | [
"from .ir import CONST, RELOP, TEMP, MOVE, CJUMP, PHIBase, LPHI\n",
"from .loop import Region, Loop\n",
"from logging import getLogger\n",
"logger = getLogger(__name__)\n",
"\n",
"\n",
"class LoopDetector(object):\n",
" def __init__(self):\n",
" pass\n",
"\n",
" def process(self, sc... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.012048192771084338,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | 221 | 0.000212 | false |
### Slack JSON Processing
### v0.0.1
import json
import os
import datetime
import glob
settings = {
"source" : "",
"users" : "",
"output" : "",
"title" : "Example Title",
"keepChannelJoins" : False
}
class User(object):
''' User object used for ... | [
"### Slack JSON Processing\n",
"### v0.0.1\n",
"\n",
"import json\n",
"import os\n",
"import datetime\n",
"import glob\n",
"\n",
"settings = {\n",
" \"source\" : \"\",\n",
" \"users\" : \"\",\n",
" \"output\" : \"\",\n",
" \"title\" :... | [
0.038461538461538464,
0.09090909090909091,
0,
0,
0,
0,
0,
0,
0,
0.03333333333333333,
0.03333333333333333,
0.03333333333333333,
0.023255813953488372,
0.03125,
0,
0,
0.05,
0,
0,
0.043478260869565216,
0.05263157894736842,
0.037037037037037035,
0,
0.03571428571428571,
0,
... | 159 | 0.011484 | false |
'''
Problem 3
@author: Kevin Ji
'''
def get_prime_factors( number ):
prime_factors = []
# Start with 2
cur_factor = 2
while number % cur_factor == 0:
prime_factors.append( cur_factor )
number = number // cur_factor
# Start with 3, increment by 2
cur_factor = 3
... | [
"'''\n",
"Problem 3\n",
"\n",
"@author: Kevin Ji\n",
"'''\n",
"\n",
"def get_prime_factors( number ):\n",
" prime_factors = []\n",
" \n",
" # Start with 2\n",
" cur_factor = 2\n",
" \n",
" while number % cur_factor == 0:\n",
" prime_factors.append( cur_factor )\n",... | [
0,
0,
0,
0,
0,
0,
0.09090909090909091,
0,
0.2,
0,
0,
0.2,
0,
0.046511627906976744,
0,
0.2,
0,
0,
0.2,
0,
0,
0.0425531914893617,
0,
0.1111111111111111,
0,
0.2,
0.04081632653061224,
0.05128205128205128,
0.2,
0,
0,
0.075,
0.041666666666666664,
0,
0.2,... | 43 | 0.05395 | false |
# -*- coding: utf-8 -*-
###############################################################################################
#
# MediaPortal for Dreambox OS
#
# Coded by MediaPortal Team (c) 2013-2017
#
# This plugin is open source but it is NOT free software.
#
# This plugin may only be distributed to and executed... | [
"# -*- coding: utf-8 -*-\n",
"###############################################################################################\n",
"#\n",
"# MediaPortal for Dreambox OS\n",
"#\n",
"# Coded by MediaPortal Team (c) 2013-2017\n",
"#\n",
"# This plugin is open source but it is NOT free software.\n",... | [
0,
0.010416666666666666,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.011235955056179775,
0,
0.010638297872340425,
0,
0,
0,
0,
0,
0,
0.011235955056179775,
0,
0,
0.009174311926605505,
0.011627906976744186,
0,
0,
0.011235955056179775,
0.01098901098901099,
0.0120481927710... | 338 | 0.032075 | false |
import arrow
import discord
from config import Prefix
from sigma.core.utils import user_avatar
in_use = False
in_use_by = None
def check_for_bot_prefixes(text):
common_pfx = [Prefix, '!', '/', '\\', '~', '.', '>', '-', '_']
prefixed = False
for pfx in common_pfx:
if text.startswith(pfx):
... | [
"import arrow\n",
"import discord\n",
"from config import Prefix\n",
"from sigma.core.utils import user_avatar\n",
"\n",
"in_use = False\n",
"in_use_by = None\n",
"\n",
"\n",
"def check_for_bot_prefixes(text):\n",
" common_pfx = [Prefix, '!', '/', '\\\\', '~', '.', '>', '-', '_']\n",
" p... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.010526315789473684,
0.011494252873563218,
0,
0,
0,
0,
0,
0,
0.008403361344537815,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.009345794392523364,
0,
0,
0,
0,
... | 87 | 0.001853 | false |
# -*- coding: utf-8 -*-
# ProjectEuler/src/python/problem022.py
#
# Names scores
# ============
# Published on Friday, 19th July 2002, 06:00 pm
#
# Using names.txt (right click and 'Save Link/Target As...'), a 46K text file
# containing over five-thousand first names, begin by sorting it into
# alphabetical order. The... | [
"# -*- coding: utf-8 -*-\n",
"# ProjectEuler/src/python/problem022.py\n",
"#\n",
"# Names scores\n",
"# ============\n",
"# Published on Friday, 19th July 2002, 06:00 pm\n",
"#\n",
"# Using names.txt (right click and 'Save Link/Target As...'), a 46K text file\n",
"# containing over five-thousand fir... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.027777777777777776,
0,
0,
0,
0,
0.017241379310344827,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | 50 | 0.0009 | false |
# This file is part of Tautulli.
#
# Tautulli 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.
#
# Tautulli is distributed in the ... | [
"# This file is part of Tautulli.\n",
"#\n",
"# Tautulli is free software: you can redistribute it and/or modify\n",
"# it under the terms of the GNU General Public License as published by\n",
"# the Free Software Foundation, either version 3 of the License, or\n",
"# (at your option) any later versio... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.011111111111111112,
0,
0.00847457627118644,
0,
0,
0,
... | 279 | 0.001818 | false |
import sys
import numpy as np
if sys.version_info[0] > 2:
xrange = range
class TaggedArray(np.ndarray):
def __new__(subtype, shape, dtype=float, buffer=None, offset=0,
strides=None, order=None, axistags=None):
obj = np.ndarray.__new__(subtype, shape, dtype, buffer, offset, strides, order)
... | [
"import sys\n",
"import numpy as np\n",
"\n",
"if sys.version_info[0] > 2:\n",
" xrange = range\n",
"\n",
"class TaggedArray(np.ndarray):\n",
"\n",
" def __new__(subtype, shape, dtype=float, buffer=None, offset=0,\n",
" strides=None, order=None, axistags=None):\n",
" obj = ... | [
0,
0,
0,
0,
0,
0,
0.03225806451612903,
0,
0,
0.019230769230769232,
0.011363636363636364,
0,
0.0625,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | 255 | 0.001833 | false |
#The MIT License (MIT)
#Copyright (c) 2014 Microsoft Corporation
#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, mod... | [
"#The MIT License (MIT)\n",
"#Copyright (c) 2014 Microsoft Corporation\n",
"\n",
"#Permission is hereby granted, free of charge, to any person obtaining a copy\n",
"#of this software and associated documentation files (the \"Software\"), to deal\n",
"#in the Software without restriction, including without... | [
0.043478260869565216,
0.023809523809523808,
0,
0.01282051282051282,
0.012658227848101266,
0.01282051282051282,
0.013333333333333334,
0.014084507042253521,
0.017241379310344827,
0,
0.0125,
0.02040816326530612,
0,
0.013157894736842105,
0.013513513513513514,
0.012987012987012988,
0.0138... | 125 | 0.024948 | false |
# Switch between four states (INT PHASE, MW DET B)
# INT PHASE can be 0 (TRUE) or pi/2 (FALSE)
# MW DET B can be on (TRUE) or off (FALSE)
from DAQ.Environment import *
def prompt(text):
sys.stdout.write(text)
return sys.stdin.readline().strip()
def go(intPhaseZeroVoltage, intPhasePiBy2Voltage):
# prompt to enter... | [
"# Switch between four states (INT PHASE, MW DET B)\n",
"# INT PHASE can be 0 (TRUE) or pi/2 (FALSE)\n",
"# MW DET B can be on (TRUE) or off (FALSE)\n",
"\n",
"from DAQ.Environment import *\n",
"\n",
"def prompt(text):\n",
"\tsys.stdout.write(text)\n",
"\treturn sys.stdin.readline().strip()\n",
"\... | [
0,
0,
0,
0,
0,
0,
0.05555555555555555,
0.041666666666666664,
0.02702702702702703,
0,
0.0196078431372549,
0.023809523809523808,
0.013333333333333334,
0.02631578947368421,
0,
0.03125,
0.037037037037037035,
0.013157894736842105,
0.017241379310344827,
0.6666666666666666,
0.045454... | 60 | 0.05603 | false |
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
# Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
#
# 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 Lice... | [
"# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.\n",
"# Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.\n",
"#\n",
"# Licensed under the Apache License, Version 2.0 (the \"License\");\n",
"# you may not use this file except in compliance with the License.\n... | [
0,
0.012345679012345678,
0,
0,
0,
0.011764705882352941,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.047619047619047616,
0.037037037037037035,
0.02702702702702703,
0.02631578947368421,
0.03125,
0.02564102564102564,
0.029411764705882353,
0,
0.07142857142857142,
0.019801... | 76 | 0.009858 | false |
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
# Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
#
# 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 Lice... | [
"# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.\n",
"# Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.\n",
"#\n",
"# Licensed under the Apache License, Version 2.0 (the \"License\");\n",
"# you may not use this file except in compliance with the License.\n... | [
0,
0.012345679012345678,
0,
0,
0,
0.011764705882352941,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.07142857142857142,
0.020202020202020204,
0.019801980198019802,
0.018518518518518517,
0.06666666666666667,
0.022727272727272728,
0.00980392156862745,
0.01,
0.009345794392523364... | 97 | 0.007646 | false |
#lims
from SBaaS_LIMS.lims_experiment_postgresql_models import *
from SBaaS_LIMS.lims_sample_postgresql_models import *
from .stage01_quantification_replicates_postgresql_models import *
from SBaaS_base.sbaas_base import sbaas_base
class stage01_quantification_replicates_query(sbaas_base):
def initialize_support... | [
"#lims\n",
"from SBaaS_LIMS.lims_experiment_postgresql_models import *\n",
"from SBaaS_LIMS.lims_sample_postgresql_models import *\n",
"from .stage01_quantification_replicates_postgresql_models import *\n",
"\n",
"from SBaaS_base.sbaas_base import sbaas_base\n",
"\n",
"class stage01_quantification_rep... | [
0.16666666666666666,
0,
0,
0,
0,
0,
0,
0.01694915254237288,
0,
0.021739130434782608,
0,
0.01834862385321101,
0.07407407407407407,
0.019230769230769232,
0.1111111111111111,
0,
0.028037383177570093,
0,
0,
0,
0.010101010101010102,
0.010416666666666666,
0,
0,
0,
0.00826... | 280 | 0.016322 | false |
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Step By Step Regular expressions module by Michaël Coquard
Ce module permet de compiler des expressions régulières utilisables pour
reconnaitre des chaînes partielles (caractère par caractère)
Les caractères à tester doivent être donnés en ASCII
(un caractère ... | [
"#!/usr/bin/python\r\n",
"# -*- coding: utf-8 -*-\r\n",
"\r\n",
"\"\"\"\r\n",
"Step By Step Regular expressions module by Michaël Coquard\r\n",
"\r\n",
"Ce module permet de compiler des expressions régulières utilisables pour\r\n",
"reconnaitre des chaînes partielles (caractère par caractère)\r\n",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.16666666666666666,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.012195121951219513,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0.0392156862745098,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | 605 | 0.011709 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.