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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mbr/flatland0 | flatland/schema/forms.py | 1 | 4850 | # -*- coding: utf-8; fill-column: 78 -*-
"""Class attribute-style declarative schema construction."""
from .base import Element
from .containers import Dict
import six
__all__ = 'Form',
class _MetaForm(type):
"""Allows fields to be specified as class attribute declarations.
Processes class declarations of t... | mit | 1,622,958,919,024,363,300 | 31.993197 | 81 | 0.61299 | false | 4.409091 | false | false | false |
sonidosmutantes/apicultor | apicultor/mir/db/RedPanalDB.py | 1 | 1491 | # -*- coding: UTF-8 -*-
import json
import sys
import urllib2
import subprocess
import random
import os
from mir.db.api import MirDbApi
DATA_PATH = "data"
SAMPLES_PATH = "samples"
# RedPanal API
class RedPanalDB(MirDbApi):
__api_key = ""
__url = ""
def set_api_key(self, api_key):
self.__api_ke... | gpl-3.0 | -3,740,524,187,768,802,300 | 27.673077 | 135 | 0.592891 | false | 3.427586 | false | false | false |
jmcguire/learning | python/learn_python_the_hard_way/oop_test.py | 1 | 2292 | import random
from urllib import urlopen
import sys
WORD_URL = "http://learncodethehardway.org/words.txt"
WORDS = []
PHRASES = {
"class %%%(%%%):":
"Make a class named %%% that is-a %%%.",
"class %%%(object):\n\tdef __init__(self, ***)" :
"class %%% has-a __init__ that takes self and *** parameter... | mit | 7,105,388,418,799,773,000 | 26.614458 | 79 | 0.550175 | false | 3.643879 | false | false | false |
ganlvtech/django-xjtu-teaching-evaluation | xjtucas/views.py | 1 | 1684 | # coding=utf-8
from django.core.urlresolvers import reverse
from django.http import HttpResponseBadRequest
from django.shortcuts import render
from .models import Cas, CasLoginError
def login(request):
if request.method == 'POST':
if 'username' not in request.POST or 'password' not in request.POST:
... | agpl-3.0 | -1,078,552,229,176,296,400 | 32.208333 | 102 | 0.631744 | false | 3.391489 | false | false | false |
lucienimmink/scanner.py | mutagen/dsdiff.py | 1 | 7989 | # -*- coding: utf-8 -*-
# Copyright (C) 2020 Philipp Wolfer
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
"""DSDIF... | mit | 4,963,401,469,314,936,000 | 28.921348 | 78 | 0.571911 | false | 3.807912 | false | false | false |
LLNL/spack | var/spack/repos/builtin/packages/flang/package.py | 2 | 4513 | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import os
class Flang(CMakePackage, CudaPackage):
"""Flang is a Fortran compiler targeting LLVM... | lgpl-2.1 | -2,133,327,740,921,974,000 | 40.027273 | 105 | 0.627077 | false | 3.067981 | false | false | false |
dominicrodger/pywebfaction | setup.py | 1 | 1623 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
import sys
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True... | bsd-3-clause | 1,365,193,575,125,169,700 | 25.177419 | 66 | 0.590265 | false | 3.731034 | true | false | false |
google/vulncode-db | app/product/routes.py | 1 | 4111 | # Copyright 2019 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 or agreed to in writing, ... | apache-2.0 | -1,439,306,924,701,248,300 | 32.975207 | 82 | 0.690829 | false | 3.650977 | false | false | false |
netodeolino/TCC | TCC 02/Code Files/DBSCAN/dbscanFromCSV.py | 1 | 2570 | # -*- coding: utf-8 -*-
import numpy as np
import pandas
from sklearn.cluster import DBSCAN
from sklearn import metrics
from sklearn.datasets.samples_generator import make_blobs
from sklearn.preprocessing import StandardScaler
from collections import defaultdict
class Cluster(object):
def printLabels(self, labels... | mit | 6,044,939,522,099,056,000 | 29.963855 | 90 | 0.636187 | false | 3.44504 | false | false | false |
molski/django-abstract-relations | setup.py | 1 | 1026 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import codecs
import os
from setuptools import find_packages, setup
def read(file_name):
file_path = os.path.join(os.path.dirname(__file__), file_name)
with codecs.open(file_path, encoding='utf-8') as open_file:
re... | mit | 8,508,081,878,538,471,000 | 24.65 | 110 | 0.690058 | false | 3.442953 | false | false | false |
danishabdullah/redis-alchemy | redis_alchemy/caches.py | 1 | 1713 | from __future__ import unicode_literals, absolute_import, print_function
__author__ = 'danishabdullah'
from redis import StrictRedis
KEY = [
"DEL",
"DUMP",
"EXISTS",
"EXPIRE",
"EXPIREAT",
"MIGRATE",
"MOVE",
"PERSIST",
"PEXPIRE",
"PEXPIREAT",
"PTTL",
"RENAME",
"REN... | bsd-3-clause | -5,638,560,545,134,012,000 | 15.631068 | 77 | 0.473438 | false | 3.166359 | false | false | false |
walterbender/infoslicer | infoslicer/processing/HTML_Parser.py | 1 | 11459 | # Copyright (C) IBM Corporation 2008
from BeautifulSoup import BeautifulSoup, Tag
from NewtifulSoup import NewtifulStoneSoup as BeautifulStoneSoup
import re
from datetime import date
class NoDocException(Exception):
def __init__(self, value):
self.parameter = value
def __str__(self):
... | gpl-2.0 | 7,409,909,687,690,818,000 | 42.761719 | 144 | 0.530238 | false | 4.451826 | false | false | false |
byt3smith/CIRTKit | modules/reversing/viper/pymacho/MachONList.py | 1 | 2029 | # encoding: utf-8
"""
Copyright 2013 Jérémie BOUTOILLE
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 distri... | mit | -818,541,467,846,667,800 | 33.948276 | 91 | 0.631475 | false | 3.182104 | false | false | false |
anastue/netforce | netforce_mfg/netforce_mfg/models/production_plan.py | 1 | 7781 | # Copyright (c) 2012-2015 Netforce Co. Ltd.
#
# 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, merge, publ... | mit | 2,448,942,666,128,008,700 | 49.2 | 228 | 0.569464 | false | 3.721186 | false | false | false |
rigdenlab/SIMBAD | simbad/rotsearch/amore_search.py | 1 | 18934 | """Module to run the amore rotation search"""
__author__ = "Adam Simpkin & Felix Simkovic"
__date__ = "15 April 2018"
__version__ = "0.4"
import glob
import logging
import os
import shutil
import uuid
logger = logging.getLogger(__name__)
import pyjob
from pyjob.script import ScriptCollector, Script
import simbad.d... | bsd-3-clause | -4,120,522,641,979,143,700 | 38.282158 | 150 | 0.555509 | false | 3.453849 | false | false | false |
itkinside/ari | ari/canvas/simulator.py | 1 | 6621 | #! /usr/bin/env python
#
# Copyright (C) 2006 Thomas Adamcik, Stein Magnus Jodal
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2
# as published by the Free Software Foundation.
#
# This program is distributed in the hope that it w... | gpl-2.0 | 5,820,523,230,008,837,000 | 29.795349 | 80 | 0.516387 | false | 3.990958 | true | false | false |
birdy42/ircbot | lib/ctftime.py | 1 | 1577 | #!/usr/bin/python
# -*-coding:Utf-8 -*
import urllib2
import time
import json
def get_ctf() :
URL_API = "https://ctftime.org/api/v1/"
limit_nb_event = 100
start_timestamp = int(time.time())
end_timestamp = start_timestamp + 60*60*24*7*2 # 2 weeks
URI_EVENTS = "events/?limit=" + str(limit_nb_event) + "&s... | gpl-3.0 | 7,536,208,895,261,679,000 | 29.921569 | 145 | 0.620165 | false | 3.092157 | false | false | false |
montyly/manticore | manticore/wasm/types.py | 1 | 12512 | import typing
from dataclasses import dataclass
from ..core.smtlib import issymbolic, BitVec
from ctypes import *
import wasm
import struct
from ..core.state import Concretize
# Do I like this? No. Is it necessary to get mypy to pass without destroying the WASM type system? Yes.
# Look how much cleaner the version bel... | apache-2.0 | 1,630,577,395,305,032,000 | 25.396624 | 112 | 0.628037 | false | 3.482327 | false | false | false |
brianjimenez/lightdock | lightdock/scoring/sipper/driver.py | 1 | 5016 | """SIPPER scoring function
C-implementation of the SIPPER (https://dx.doi.org/10.1021/ci100353e) scoring function.
"""
import numpy as np
import os
from lightdock.constants import DEFAULT_LIGHTDOCK_PREFIX
from lightdock.scoring.functions import ScoringFunction, ModelAdapter
from lightdock.structure.model import Dock... | gpl-3.0 | -814,808,774,530,159,100 | 41.508475 | 117 | 0.628987 | false | 3.864407 | false | false | false |
DougFirErickson/neon | neon/data/batch_writer.py | 1 | 18962 | #!/usr/bin/env python
# ----------------------------------------------------------------------------
# Copyright 2015 Nervana Systems Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# ... | apache-2.0 | -130,820,873,907,815,400 | 44.147619 | 98 | 0.551366 | false | 3.749654 | false | false | false |
dhirajt/dtc | wsgi/dtcbusroutes/rost/views.py | 1 | 3143 | from django.http import HttpResponse, HttpResponseRedirect, Http404
from django.shortcuts import render
from django.core.urlresolvers import reverse
from django.core.exceptions import ObjectDoesNotExist
from models import Stage, Route, StageSeq
def server_error(request):
return render(request,template_name="500.h... | gpl-3.0 | 5,049,778,811,910,609,000 | 33.538462 | 78 | 0.576201 | false | 3.92875 | false | false | false |
arthurSena/processors | processors/actrn/extractors.py | 1 | 4111 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from .. import base
# Module API
def extract_source(record):
source = {
'id': 'actrn',
'name': 'ANZCTR',
'type': 'r... | mit | 4,970,013,123,790,287,000 | 29.007299 | 91 | 0.594503 | false | 3.867357 | false | false | false |
davidsminor/gaffer | python/GafferTest/TypedPlugTest.py | 1 | 6244 | ##########################################################################
#
# Copyright (c) 2011-2012, John Haddon. All rights reserved.
# Copyright (c) 2011-2013, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted ... | bsd-3-clause | -8,139,471,669,603,652,000 | 28.314554 | 129 | 0.657111 | false | 3.33547 | true | false | false |
Scitator/rl-course-experiments | A3C/run_a3c.py | 1 | 9127 | import argparse
import numpy as np
from rstools.utils.batch_utils import iterate_minibatches, merge_generators
from tqdm import trange
from A3C.a3c_ff import A3CFFAgent
from A3C.a3c_lstm import A3CLstmAgent
from common.networks import activations
from wrappers.gym_wrappers import Transition
from wrappers.run_wrappers... | mit | 3,200,046,538,725,923,300 | 33.441509 | 98 | 0.613455 | false | 3.486249 | false | false | false |
bparzella/secsgem | secsgem/secs/functions/s12f17.py | 1 | 2088 | #####################################################################
# s12f17.py
#
# (c) Copyright 2021, Benjamin Parzella. All rights reserved.
#
# This library 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 Fou... | lgpl-2.1 | 8,054,422,061,271,209,000 | 27.216216 | 97 | 0.552203 | false | 3.695575 | false | false | false |
statbio/Sargasso | sargasso/utils/samutils.py | 1 | 1072 | import pysam
def open_samfile_for_read(filename):
# This check_sq=False is to disable header check so when a bam file is
# generated by sambamba view | head,
# It can be read by pysam. See more here:
# https://github.com/pysam-developers/pysam/issues/51
return pysam.Samfile(filename, "rb", check_... | mit | -5,675,687,379,835,321,000 | 27.210526 | 75 | 0.634328 | false | 3.480519 | false | false | false |
joakimzhang/qa_study | IM_test/app_lib/sendMail.py | 1 | 2635 | # -*- coding: UTF-8 -*-
'''
发送文本和带附件的邮件
'''
import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
import globalVariable
class SendMail(object):
def __init__(self,to_list = globalVariable.USER_MAIL_LIST,
cc_list = globalVariable.USER_CC_LIST,
... | apache-2.0 | 8,149,924,101,457,501,000 | 34.575342 | 90 | 0.530227 | false | 3.51897 | false | false | false |
GeoffreyFrogeye/syncthing-gtk | syncthing_gtk/wizard.py | 1 | 25762 | #!/usr/bin/env python2
"""
Syncthing-GTK - 1st run wizard
Basically runs Syncthing daemon with -generate option and setups some
values afterwards.
"""
from __future__ import unicode_literals
from gi.repository import Gtk, Gdk, GLib
from syncthing_gtk import Configuration, DaemonProcess
from syncthing_gtk import Daemo... | gpl-2.0 | -953,613,239,208,394,400 | 34.730929 | 135 | 0.674132 | false | 3.097139 | true | false | false |
lcharlick/ArtistAlbumArt.bundle | Contents/Code/__init__.py | 1 | 5066 | """ A Plex Media Server agent for using album art as artist posters
"""
import os
import re
import hashlib
import unicodedata
import mutagen
# Settings lifted from localmedia agent
IMAGE_EXTS = ['jpg', 'png', 'jpeg', 'tbn']
ART_EXTS = ['jpg', 'jpeg', 'png', 'tbn']
POSTER_FILES = ['poster', 'default', 'cover', 'movie'... | mit | -4,449,003,983,367,390,000 | 40.867769 | 117 | 0.480853 | false | 4.278716 | false | false | false |
palette-software/palette | app/palette/initial.py | 1 | 5412 | """The initial setup page - as opposed to the configuration setup page.
The handlers for this page have no access control until after setup is
complete, and are hence 'open'
"""
# pylint: enable=missing-docstring,relative-import
from webob import exc, Response
from paste.auth.auth_tkt import AuthTicket
from akiri.fra... | gpl-3.0 | -7,646,855,911,900,364,000 | 37.112676 | 79 | 0.63119 | false | 4.198604 | false | false | false |
wurstmineberg/wurstminebot | wurstminebot/core.py | 1 | 21957 | import sys
sys.path.append('/opt/py')
from datetime import datetime
import json
import minecraft
from wurstminebot import nicksub
import os
import os.path
import re
import requests
import subprocess
import threading
import time
from datetime import timezone
import traceback
import tzlocal
import xml.sax.saxutils
cla... | mit | -5,279,569,844,177,602,000 | 37.144348 | 435 | 0.521315 | false | 3.776343 | true | false | false |
jackmin/toolkits | define.py | 1 | 2056 | #!/usr/bin/python
import urllib2
import sys
from lxml import etree
BASE_URL = 'http://www.dictionaryapi.com/api/v1/references/collegiate/xml/'
API_KEY = 'deba86d4-5a0c-4de7-88ed-a33cbbd47e7c'
reload(sys)
sys.setdefaultencoding("utf-8")
class WordDefine:
def __init__(self):
self.pr = ""
self.fl = ... | gpl-3.0 | 8,184,310,891,325,940,000 | 22.632184 | 79 | 0.499027 | false | 2.966811 | false | false | false |
ctgk/BayesianNetwork | bayesnet/image/max_pooling2d.py | 1 | 3157 | import numpy as np
from bayesnet.tensor.tensor import Tensor
from bayesnet.function import Function
from bayesnet.image.util import img2patch, patch2img
class MaxPooling2d(Function):
def __init__(self, pool_size, stride, pad):
"""
construct 2 dimensional max-pooling function
Parameters
... | mit | -6,440,447,094,784,967,000 | 32.946237 | 78 | 0.555591 | false | 3.637097 | false | false | false |
ProfessorX/Config | .PyCharm30/system/python_stubs/-1247972723/PyKDE4/knewstuff.py | 1 | 1638 | # encoding: utf-8
# module PyKDE4.knewstuff
# from /usr/lib/python2.7/dist-packages/PyKDE4/knewstuff.so
# by generator 1.135
# no doc
# no imports
# no functions
# classes
class KNS(): # skipped bases: <type 'sip.wrapper'>
# no doc
def standardAction(self, *args, **kwargs): # real signature unknown
pa... | gpl-2.0 | -8,184,110,789,566,540,000 | 29.333333 | 101 | 0.60928 | false | 3.756881 | false | false | false |
swift-lang/swift-e-lab | parsl/data_provider/files.py | 1 | 4997 | """Define the File Type.
The primary purpose of the File object is to track the protocol to be used
to transfer the file as well as to give the appropriate filepath depending
on where (client-side, remote-side, intermediary-side) the File.filepath is
being called from.
"""
import os
import logging
from urllib.parse i... | apache-2.0 | 3,935,732,826,858,092,500 | 32.536913 | 105 | 0.624775 | false | 4.311475 | false | false | false |
madsmpedersen/MMPE | ui/qtwidgets/SliderSpinBox.py | 1 | 6993 | '''
Created on 21/05/2013
@author: Mads M. Pedersen (mmpe@dtu.dk)
'''
import sys
from qtpy.QtCore import Signal, Qt
from qtpy.QtWidgets import QWidget, QHBoxLayout, QSlider, QApplication, \
QMainWindow, QVBoxLayout, QDoubleSpinBox
from mmpe.functions.Decorators import postpone_until_last_call_finishes
import num... | apache-2.0 | 5,625,261,936,775,293,000 | 34.678571 | 150 | 0.627771 | false | 3.363636 | false | false | false |
shreevatsa/sanskrit | scan.py | 1 | 1697 | """Given lines in SLP1, converts them to patterns of laghus and gurus."""
from __future__ import absolute_import, division, print_function, unicode_literals
try: xrange
except NameError: xrange = range
import re
import slp1
_SYLLABLE_RE = slp1.VOWEL_RE + slp1.CONSONANT_RE + '*'
def ScanVerse(lines):
cleaned_line... | gpl-2.0 | 2,590,237,436,215,543,000 | 33.632653 | 82 | 0.687095 | false | 2.86172 | false | false | false |
m-ober/byceps | byceps/services/shop/shop/service.py | 1 | 1884 | """
byceps.services.shop.shop.service
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2020 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from typing import List, Optional, Set
from ....database import db
from .models import Shop as DbShop
from .transfer.models import Shop, ShopID
cl... | bsd-3-clause | -5,149,135,319,267,799,000 | 20.906977 | 75 | 0.61518 | false | 3.119205 | false | false | false |
F5Networks/f5-common-python | f5/bigiq/cm/asm/tasks.py | 1 | 1992 | # coding=utf-8
#
# Copyright 2014-2016 F5 Networks Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | apache-2.0 | -7,685,760,042,985,169,000 | 33.344828 | 80 | 0.680723 | false | 3.525664 | false | false | false |
SVADemoAPP/Server | WebContent/WEB-INF/python/MQReceiver.py | 1 | 1996 | #!/usr/bin/env python
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "... | apache-2.0 | -1,743,607,607,542,541,600 | 38.156863 | 124 | 0.614729 | false | 3.913725 | false | false | false |
topaz1874/srvup | src/notification/views.py | 1 | 3083 | import json
from django.http import HttpResponse
from django.shortcuts import render,Http404,HttpResponseRedirect
from django.core.urlresolvers import reverse
from django.contrib.auth.decorators import login_required
from .models import Notifications
# Create your views here.
@login_required
def all(request):
obje... | mit | -5,698,150,079,110,194,000 | 28.644231 | 124 | 0.560169 | false | 4.067282 | false | false | false |
jmanday/Herramientas-IV | CDE/cde-package/cde-root/usr/lib/python3.2/sysconfig.py | 1 | 29026 | """Provide access to Python's configuration information.
"""
import sys
import os
from os.path import pardir, realpath
__all__ = [
'get_config_h_filename',
'get_config_var',
'get_config_vars',
'get_makefile_filename',
'get_path',
'get_path_names',
'get_paths',
'get_platform',
'get_... | gpl-3.0 | -1,053,693,326,694,464,400 | 35.78834 | 90 | 0.537587 | false | 3.937865 | true | false | false |
Lukc/ospace-lukc | client-pygame/lib/osci/res.py | 1 | 13877 | #
# Copyright 2001 - 2006 Ludek Smid [http://www.ospace.net/]
#
# This file is part of IGE - Outer Space.
#
# IGE - Outer Space is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the Lice... | gpl-2.0 | 956,041,626,229,794,800 | 30.827982 | 179 | 0.706781 | false | 2.642232 | false | false | false |
elsuizo/Beaglebone_opencv | ball_track_beaglebone2.py | 1 | 3406 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
#Imports
#*************************************************************************
import cv2
import serial
import numpy as np
#puerto = serial.Serial('/dev/ttyACM0', 9600, timeout=1)
#*************************************************************************
#Fun... | gpl-3.0 | -2,866,981,863,762,408,000 | 24.22963 | 78 | 0.458896 | false | 3.225379 | false | false | false |
shhui/horizon | openstack_dashboard/dashboards/project/overview/panel.py | 1 | 1070 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# no... | apache-2.0 | 3,468,446,372,758,110,700 | 31.424242 | 78 | 0.749533 | false | 4.05303 | false | false | false |
c4s4/http1 | http1/http1.py | 1 | 6386 | # encoding: UTF-8
"""
Module to perform HTTP requests. To do so:
import http1
response = http1.request('http://www.google.com')
print(f'Status: {response.status} ({response.message})')
print(f'Headers: {response.headers}')
print(f'Body: {response.body.strip()}')
"""
import base64
from urllib.parse import... | apache-2.0 | -1,743,397,933,594,466,600 | 34.281768 | 87 | 0.607422 | false | 4.001253 | false | false | false |
chromium/chromium | android_webview/tools/record_netlog.py | 4 | 4980 | #!/usr/bin/env vpython3
#
# Copyright 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Takes a netlog for the WebViews in a given application.
Developer guide:
https://chromium.googlesource.com/chromium/src/+/HEAD/a... | bsd-3-clause | 7,928,334,094,785,808,000 | 35.350365 | 91 | 0.700602 | false | 3.781321 | false | false | false |
Itxaka/st2 | st2api/st2api/controllers/v1/packs.py | 1 | 3512 | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | apache-2.0 | 5,215,025,361,212,900,000 | 34.474747 | 94 | 0.692768 | false | 3.554656 | false | false | false |
kebarr/Geist | geist/matcher.py | 1 | 9006 | from .match_position_finder_helpers import normalise_correlation, normalise_correlation_coefficient, calculate_squared_differences
from scipy.ndimage.measurements import label, find_objects
from scipy.signal import fftconvolve
import numpy as np
def to_rgb(im):
return np.dstack([im.astype(np.uint8)] * 3).copy(ord... | mit | 8,648,736,296,271,842,000 | 52.928144 | 218 | 0.675105 | false | 3.825828 | false | false | false |
wdv4758h/ZipPy | edu.uci.python.benchmark/src/benchmarks/sympy/sympy/core/add.py | 2 | 29591 | from __future__ import print_function, division
from collections import defaultdict
from sympy.core.basic import C, Basic
from sympy.core.compatibility import cmp_to_key, reduce, is_sequence
from sympy.core.singleton import S
from sympy.core.operations import AssocOp
from sympy.core.cache import cacheit
from sympy.co... | bsd-3-clause | -3,296,960,426,557,086,700 | 32.248315 | 79 | 0.490149 | false | 3.838998 | false | false | false |
cherrypy/cheroot | cheroot/test/test_wsgi.py | 1 | 1699 | """Test wsgi."""
from concurrent.futures.thread import ThreadPoolExecutor
import pytest
import portend
import requests
from requests_toolbelt.sessions import BaseUrlSession as Session
from jaraco.context import ExceptionTrap
from cheroot import wsgi
from cheroot._compat import IS_MACOS, IS_WINDOWS
IS_SLOW_ENV = IS... | bsd-3-clause | 2,927,251,651,926,810,000 | 28.293103 | 75 | 0.660977 | false | 3.742291 | false | false | false |
ghorn/debian-casadi | experimental/joris/graphSX.py | 1 | 1408 | #
# This file is part of CasADi.
#
# CasADi -- A symbolic framework for dynamic optimization.
# Copyright (C) 2010-2014 Joel Andersson, Joris Gillis, Moritz Diehl,
# K.U. Leuven. All rights reserved.
# Copyright (C) 2011-2014 Greg Horn
#
# CasADi is free software; you can... | lgpl-3.0 | 5,074,282,143,289,513,000 | 28.333333 | 84 | 0.664773 | false | 2.976744 | false | false | false |
tomasdubec/openstack-cinder | cinder/api/v2/views/volumes.py | 1 | 4559 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 OpenStack LLC.
# 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/... | apache-2.0 | -632,918,457,023,980,900 | 36.368852 | 79 | 0.560869 | false | 4.522817 | false | false | false |
gurneyalex/odoo | addons/hw_drivers/drivers/SerialBaseDriver.py | 8 | 5115 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import logging
import time
import traceback
from collections import namedtuple
from threading import Lock
from contextlib import contextmanager
import serial
from odoo.tools.translate import _
from odoo.addons.hw_drive... | agpl-3.0 | -8,459,007,865,350,260,000 | 33.560811 | 137 | 0.626197 | false | 4.353191 | false | false | false |
darashenka/aem-cmd | acmd/assets/utils.py | 1 | 1251 | # coding: utf-8
import os
import re
from acmd.jcr.path import join
ROOT_IMPORT_DIR = "/tmp/acmd_assets_ingest"
class AssetException(Exception):
pass
def get_dam_path(filepath, local_import_root, dam_import_root):
local_dir = os.path.dirname(filepath)
if dam_import_root is None:
dam_import_roo... | mit | -5,570,709,432,449,277,000 | 26.195652 | 87 | 0.664269 | false | 3.318302 | false | false | false |
isrusin/cbcalc | cbclib/sites.py | 1 | 16633 | """a module for compositional bias calculation.
The module contains site wrappers, function for site digitizing, and
dumper-loader functions for wrapped site collections. Each wrapper class
implements a method of compositional bias calculation.
"""
import cPickle
from decimal import Decimal
__all__ = [
"hash_str... | mit | -2,352,963,343,635,943,000 | 33.22428 | 75 | 0.572296 | false | 3.737753 | false | false | false |
Azure/azure-sdk-for-python | sdk/loganalytics/azure-loganalytics/azure/loganalytics/models/error_info_py3.py | 1 | 1928 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | -7,225,012,170,470,892,000 | 36.803922 | 128 | 0.603216 | false | 4.32287 | false | false | false |
s20081428/IVE-Attendance-Calculator | myportal.py | 1 | 9137 | import datetime as dt
import logging
import time
import requests
import telegram
from bs4 import BeautifulSoup
from emoji import emojize
from requests import session
from telegram.ext import MessageHandler, Updater, CommandHandler, Filters
from telegram.ext.dispatcher import run_async
class Action:
text = ''
... | apache-2.0 | -839,340,447,244,326,900 | 41.971014 | 283 | 0.562001 | false | 3.210032 | false | false | false |
zutshi/S3CAMX | src/PACell.py | 1 | 11520 | #!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import print_function
import logging
import numpy as np
from utils import print
# import matplotlib.pyplot as plt
import err
#TAG:Z3_IND
# Comment out below import
#import smtSolver as smt
import concretePlant as cp
import cellmanager as CM
logger = logging... | bsd-2-clause | 6,800,516,291,136,836,000 | 31 | 169 | 0.555556 | false | 3.484574 | false | false | false |
IngoHeimbach/shallow-appify | shallow_appify/shallow_appify.py | 1 | 13508 | #!/usr/bin/env python
# coding: utf-8
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
import argparse
import codecs
import logging
import os
import os.path
import re
import shutil
import subprocess
import sys
import t... | mit | 3,261,776,869,065,695,700 | 32.026895 | 118 | 0.605641 | false | 3.676647 | false | false | false |
airbnb/superset | superset/queries/api.py | 1 | 2326 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | -8,361,309,092,776,648,000 | 30.013333 | 67 | 0.662941 | false | 3.85738 | false | false | false |
apcrumbleton/google-python-exercises | termux/basic/list2.py | 1 | 2351 | #!/data/data/com.termux/files/usr/bin/python -tt
# Copyright 2010 Google Inc.
# Licensed under the Apache License, Version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
# Google's Python Class
# http://code.google.com/edu/languages/google-python-class/
# Additional basic list exercises
# D. Given a list of number... | apache-2.0 | 6,518,241,928,151,274,000 | 31.205479 | 79 | 0.646959 | false | 3.297335 | true | false | false |
rescrv/firmant | firmant/objects.py | 1 | 5142 | # Copyright (c) 2011, Robert Escriva
# 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 condition... | bsd-3-clause | 4,511,011,386,146,086,000 | 37.088889 | 139 | 0.636328 | false | 4.032941 | false | false | false |
dlakata/VocabFinder | config.py | 1 | 1082 | import os
DEBUG = True
SECRET_KEY = 'zhayYxXXUPuNh09ZDsNGLcDRIWywVUC6XCH1sZI2'
basedir = os.path.abspath(os.path.dirname(__file__))
SQLALCHEMY_DATABASE_URI = os.getenv('DATABASE_URL', '')
SECURITY_REGISTERABLE = True
SECURITY_SEND_REGISTER_EMAIL = False
SECURITY_SEND_PASSWORD_CHANGE_EMAIL = True
SECURITY_SEND_PASSWOR... | gpl-2.0 | 3,560,253,769,383,305,000 | 36.344828 | 96 | 0.780961 | false | 2.972527 | false | false | false |
adamrvfisher/TechnicalAnalysisLibrary | PriceRelativeRemoteSignalATROptimizerTwoAsset.py | 1 | 7759 | # -*- coding: utf-8 -*-
"""
Created on Wed Aug 30 19:07:37 2017
@author: AmatVictoriaCuramIII
"""
import numpy as np
import random as rand
import pandas as pd
import time as t
from DatabaseGrabber import DatabaseGrabber
from YahooGrabber import YahooGrabber
Empty = []
Dataset = pd.DataFrame()
Portfolio =... | apache-2.0 | -6,308,838,753,224,976,000 | 36.61194 | 101 | 0.608197 | false | 3.005035 | false | false | false |
SportySpice/Collections | src/videosource/Video.py | 1 | 1173 | from src.tools.enum import enum
#VideoType = enum(PLUGIN=0, YOUTUBE=1)
OnVideoClick = enum (PLAY_ONLY=1, PLAY_QUEUE_REST=2)
class Video(object):
def __init__(self, videoId, source, position, title, description, thumb, date, duration, rating, watchedDic):
self.id = videoId
#self.type = videoType... | gpl-2.0 | 3,249,819,863,521,331,000 | 22.019608 | 113 | 0.59335 | false | 3.771704 | false | false | false |
aouyar/healthgraph-api | setup.py | 1 | 1447 | #!/usr/bin/env python
"""healthgraph-api Setup Script
"""
import os
from setuptools import setup
__author__ = "Ali Onur Uyar"
__copyright__ = "Copyright 2012, Ali Onur Uyar"
__credits__ = []
__license__ = "GPL"
__version__ = "0.3.0"
__email__ = "aouyar at gmail.com"
__status__ = "Development"
def read_file(filenam... | gpl-3.0 | -6,953,828,571,014,758,000 | 26.826923 | 73 | 0.616448 | false | 3.710256 | false | false | false |
karllark/pydirtygrid | pydirtygrid/SpecDG.py | 1 | 9522 |
from __future__ import (absolute_import, print_function, division)
from astropy.table import Table
import numpy as np
from astropy.io import fits
# fix needed till astropy.io get's updated - need to check this
fits.column.ASCII2NUMPY['E'] = fits.column.ASCII2NUMPY['F'] = 'f8'
import matplotlib.pyplot as plt
import ... | bsd-3-clause | -6,222,733,802,252,536,000 | 33.007143 | 95 | 0.516173 | false | 3.850384 | false | false | false |
google/TensorNetwork | tensornetwork/contractors/opt_einsum_paths/path_contractors_node_test.py | 1 | 8061 | # Copyright 2019 The TensorNetwork Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | apache-2.0 | 3,485,453,215,045,057,500 | 29.534091 | 78 | 0.637638 | false | 2.656889 | true | false | false |
pdelsante/thug | thug/DOM/Navigator.py | 1 | 11693 | #!/usr/bin/env python
#
# Navigator.py
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY;... | gpl-2.0 | 6,174,800,928,388,011,000 | 30.51752 | 147 | 0.611391 | false | 4.185039 | false | false | false |
pichillilorenzo/JavaScriptEnhancements | src/commands/refactor/safe_move.py | 1 | 9123 | import sublime, sublime_plugin
import os, shutil, traceback, json
from ...libs import util
from ...libs import window_view_manager
from ...libs import FlowCLI
from .refactor_preview import RefactorPreview
class JavascriptEnhancementsRefactorSafeMoveCommand(sublime_plugin.TextCommand):
def run(self, edit, **args):
... | mit | 3,135,517,309,059,894,300 | 42.865385 | 185 | 0.539406 | false | 3.952773 | false | false | false |
akumuli/Akumuli | functests/test_incomplete_write.py | 1 | 2339 | from __future__ import print_function
import os
import sys
import socket
import datetime
import time
import akumulid_test_tools as att
import json
try:
from urllib2 import urlopen
except ImportError:
from urllib import urlopen
import traceback
import itertools
import math
HOST = '127.0.0.1'
TCPPORT = 8282
HTTP... | apache-2.0 | 4,509,453,418,220,766,000 | 28.607595 | 118 | 0.624626 | false | 3.683465 | false | false | false |
cnobile2012/embedcore | embedcore/utilities/utilities.py | 1 | 1028 | #
#
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILIT... | mit | -8,770,786,182,826,409,000 | 27.555556 | 78 | 0.656615 | false | 3.765568 | false | false | false |
AISpace2/AISpace2 | aispace2/jupyter/search/search_xml_to_python.py | 1 | 1916 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Aug 13 20:13:50 2019
@author: zijiazhang
"""
import xml.etree.ElementTree as ET
def xml_to_python(path):
try:
tree = ET.parse(path)
except:
print('Error Reading Files')
return
root = tree.getroot()
graph = root... | gpl-3.0 | 3,891,441,894,287,625,700 | 25.985915 | 71 | 0.529228 | false | 3.816733 | false | false | false |
andreyto/YAP | StepsLibrary.py | 1 | 106908 | ########################################################################################
## This file is a part of YAP package of scripts. https://github.com/shpakoo/YAP
## Distributed under the MIT license: http://www.opensource.org/licenses/mit-license.php
## Copyright (c) 2011-2013 Sebastian Szpakowski
#############... | mit | 38,221,745,210,140,240 | 35.599795 | 232 | 0.504509 | false | 3.884315 | false | false | false |
RiiConnect24/File-Maker | Channels/News_Channel/news.py | 1 | 2231 | #!/usr/bin/python
# -*- coding: utf-8 -*-
from Channels.News_Channel import newsdownload, newsmake
from .newsdownload import News
from .newsmake import process_news
import sys
from utils import *
def main():
print("News Channel File Generator \nBy Larsen Vallecillo / www.rc24.xyz\n")
if len(sys.argv) > 1:
... | agpl-3.0 | -6,417,758,213,196,607,000 | 30.422535 | 86 | 0.517257 | false | 3.774958 | false | false | false |
JuezUN/INGInious | inginious/frontend/plugins/analytics/api/radar_plot_api.py | 1 | 1402 | import web
from inginious.frontend.pages.api._api_page import APIError
from inginious.frontend.plugins.utils.superadmin_utils import SuperadminAPI
from ..utils import get_api_query_parameters
class RadarPlotAPI(SuperadminAPI):
def API_GET(self):
self.check_superadmin_rights()
input_dict = web.inp... | agpl-3.0 | -5,929,200,341,443,058,000 | 30.155556 | 109 | 0.485021 | false | 4.313846 | false | false | false |
gitcoinco/web | app/quests/management/commands/re_rank_quests.py | 1 | 2463 | '''
Copyright (C) 2021 Gitcoin Core
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This progra... | agpl-3.0 | -249,297,938,270,721,250 | 39.377049 | 135 | 0.603735 | false | 4.167513 | false | false | false |
lmazuel/azure-sdk-for-python | azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/usage_py3.py | 1 | 2020 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | 3,854,433,043,222,299,600 | 33.237288 | 82 | 0.570297 | false | 4.139344 | false | false | false |
jmgirven/warehouse | apiclient/model.py | 1 | 12742 | #!/usr/bin/python2.4
#
# Copyright (C) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | apache-2.0 | 1,367,978,173,613,629,400 | 32.26893 | 83 | 0.625098 | false | 4.51844 | false | false | false |
tsender/riptide_software | riptide_controllers/action/getDistance.py | 1 | 2901 | #! /usr/bin/env python
import rospy
import actionlib
from riptide_msgs.msg import Dvl, LinearCommand
from geometry_msgs.msg import Vector3
from darknet_ros_msgs.msg import BoundingBoxes
from stereo_msgs.msg import DisparityImage
from cv_bridge import CvBridge, CvBridgeError
import riptide_controllers.msg
import math
... | bsd-2-clause | 3,431,888,620,070,909,400 | 33.547619 | 152 | 0.599448 | false | 3.568266 | false | false | false |
Arable/evepod | lib/python2.7/site-packages/newrelic-2.12.0.10/newrelic/common/system_info.py | 2 | 6218 | """This module implements functions for querying properties of the operating
system or for the specific process the code is running in.
"""
import os
import sys
import multiprocessing
import re
try:
import resource
except ImportError:
pass
def cpu_count():
"""Returns the number of CPUs in the system.
... | apache-2.0 | -6,138,968,095,169,875,000 | 29.630542 | 76 | 0.586523 | false | 4.444603 | false | false | false |
ewels/NGI-RNAseq | bin/markdown_to_html.py | 1 | 2944 | #!/usr/bin/env python
from __future__ import print_function
import argparse
import markdown
import os
import sys
def convert_markdown(in_fn):
input_md = open(in_fn, mode="r", encoding="utf-8").read()
html = markdown.markdown(
"[TOC]\n" + input_md,
extensions = [
'pymdownx.extra',
... | mit | 2,260,523,864,488,914,200 | 28.44 | 219 | 0.497283 | false | 3.630086 | false | false | false |
sradanov/flyingpigeon | flyingpigeon/weatherclass.py | 1 | 1522 | def get_pca(resource):
"""
calculation of principal components
:param resource: netCDF file containing pressure values for a defined region and selected timesteps
:return pca: sklean objct
"""
from netCDF4 import Dataset, num2date
from flyingpigeon.utils import get_variable
var = get_variable(resource... | apache-2.0 | -3,465,914,563,928,663,000 | 26.690909 | 168 | 0.69251 | false | 3.308696 | false | false | false |
cstyan/python-scalable-server | server.py | 1 | 3606 | # Source File: server.py - simple multithreaded echo server
# Program: Scalable Server Methods 8005A2
# Functions:
# setup
# handler
# main
# Date: February 23, 2015
# Designer: Callum Styan, Jon Eustace
# Programmer: Callum Styan, Jon Eustace
from socket import *
import select
import thread
import sys
imp... | mit | -1,920,041,880,937,996,800 | 26.96124 | 125 | 0.648087 | false | 3.679592 | false | false | false |
bolidozor/MeteorDataAnalyser | iPython/DHProcessor.py | 1 | 4013 |
from HTMLParser import HTMLParser
from urllib import urlopen
import pandas as pd
import urllib
import matplotlib.pyplot as plt
def get_data(url_meteors, x):
ArrayHTML = []
ahtml2=[]
ahtml3=[]
class MyHTMLParser(HTMLParser):
global ArrayHTML
global ahtml2
global ahtml3
def ha... | gpl-3.0 | -6,384,288,855,211,495,000 | 24.238994 | 117 | 0.56317 | false | 3.254663 | false | false | false |
bootc/pypuppetdbquery | pypuppetdbquery/evaluator.py | 1 | 6435 | # -*- coding: utf-8 -*-
#
# This file is part of pypuppetdbquery.
# Copyright © 2016 Chris Boot <bootc@bootc.net>
#
# 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.or... | apache-2.0 | -5,408,981,024,538,613,000 | 33.042328 | 79 | 0.571806 | false | 3.988841 | false | false | false |
Ratfink/asciiplayback | src/asciiplayback.py | 1 | 2172 | from asciimation import *
class ASCIIPlayback(object):
def __init__(self, asciimation, speed=1):
self.asciimation = asciimation
self.current_frame = 0
self.speed = speed
self._last_speed = speed
def next_frame(self):
if self.current_frame >= len(self.asciimation):
... | mit | -8,395,817,220,573,585,000 | 30.028571 | 77 | 0.499079 | false | 3.906475 | false | false | false |
J08nY/PGPy | pgpy/decorators.py | 1 | 3944 | """ decorators.py
"""
import contextlib
import functools
import six
import warnings
try:
from singledispatch import singledispatch
except ImportError: # pragma: no cover
from functools import singledispatch
from .errors import PGPError
__all__ = ['classproperty',
'sdmethod',
'sdprope... | bsd-3-clause | -1,899,587,350,930,529,300 | 29.10687 | 116 | 0.573529 | false | 3.995947 | false | false | false |
legoktm/pywikipedia-rewrite | pywikibot/families/wiktionary_family.py | 1 | 8063 | # -*- coding: utf-8 -*-
from pywikibot import family
__version__ = '$Id$'
# The Wikimedia family that is known as Wiktionary
class Family(family.WikimediaFamily):
def __init__(self):
super(Family, self).__init__()
self.name = 'wiktionary'
self.languages_by_size = [
'en', 'mg... | mit | 294,788,154,934,463,360 | 61.503876 | 173 | 0.515069 | false | 2.741584 | false | false | false |
emanuelschuetze/OpenSlides | openslides/__main__.py | 1 | 8655 | #!/usr/bin/env python
import os
import sys
from typing import Dict
import django
from django.core.management import call_command, execute_from_command_line
import openslides
from openslides.core.apps import startup
from openslides.utils.arguments import arguments
from openslides.utils.main import (
ExceptionArgu... | mit | 1,791,041,099,126,137,600 | 31.055556 | 101 | 0.635124 | false | 4.257255 | false | false | false |
txt2tags/txt2tags-python3 | test/lib.py | 1 | 2005 | #
# txt2tags test-suite library (http://txt2tags.org)
# See also: run.py, */run.py
#
import os, time
# Path for txt2tags (change here if your txt2tags is in a different location)
TXT2TAGS = '../txt2tags'
CONFIG_FILE = 'config'
CSS_FILE = 'css'
DIR_OK = 'ok'
DIR_ERROR = 'error'
OK = FAILED = 0
ERROR_FILES = []
MSG_... | gpl-2.0 | -5,108,642,747,874,840,000 | 21.52809 | 77 | 0.664339 | false | 2.676903 | false | false | false |
lildadou/Flexget | flexget/plugins/api/history.py | 1 | 2738 | from __future__ import unicode_literals, division, absolute_import
import logging
from math import ceil
from flask import jsonify
from sqlalchemy import desc
from flexget.api import api, APIResource
from flexget.plugins.output.history import History
log = logging.getLogger('history')
history_api = api.namespace('h... | mit | -5,489,028,453,074,006,000 | 31.987952 | 114 | 0.543097 | false | 4.135952 | false | false | false |
smarkets/smk_python_sdk | setup.py | 1 | 6376 | #!/usr/bin/env python
# Copyright (C) 2011 Smarkets Limited <support@smarkets.com>
#
# This module is released under the MIT License:
# http://www.opensource.org/licenses/mit-license.php
import glob
import io
import os
import shutil
import subprocess
import sys
from distutils.command import build, clean
from distutils.... | mit | -1,554,919,277,131,930,600 | 31.20202 | 103 | 0.607591 | false | 3.538291 | false | false | false |
OCA/operating-unit | mis_builder_operating_unit/model/mis_builder.py | 1 | 1723 | # Copyright 2015-19 Eficent Business and IT Consulting Services S.L. -
# Jordi Ballester Alomar
# Copyright 2015-19 Serpent Consulting Services Pvt. Ltd. - Sudhir Arya
# Copyright 2018-19 ACSONE SA/NV
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from odoo import api, fields, models
class Mis... | agpl-3.0 | -6,436,393,487,303,929,000 | 34.163265 | 71 | 0.639582 | false | 3.567288 | false | false | false |
fl4v/botlane | misc/multiprocessing_tests.py | 1 | 2178 | from multiprocessing import Process, Queue, Value, RawValue, Lock
import time
class INT():
def __init__(self, n):
self.i = n
self.v = RawValue('i', n)
def increment(self):
self.v.value += 1
self.i += 1
def getV(self):
return self.v.value
def getI(self):
... | gpl-2.0 | 3,986,409,066,388,111,000 | 20.564356 | 65 | 0.519743 | false | 3.212389 | false | false | false |
guarddogofww/cs108test | src/jarabe/journal/palettes.py | 1 | 25770 | # Copyright (C) 2008 One Laptop Per Child
# Copyright (C) 2014 Ignacio Rodriguez
#
# 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 late... | gpl-3.0 | -3,832,390,331,830,841,300 | 37.810241 | 79 | 0.568141 | false | 4.051887 | false | false | false |
HarmonyEnterpriseSolutions/harmony-platform | wkroot/execute.py | 1 | 1137 | import os
import urllib
import urllib2
import thread
if __name__ == '__main__':
URL = 'http://localhost:82/harmony/wk.cgi/harmony/execute'
FIELDS = {
'command' : 'harmonysite3_sync_price',
}
response = urllib2.urlopen(URL, urllib.urlencode(FIELDS))
print response.code, response.msg
print response.headers
p... | gpl-2.0 | 2,426,405,483,374,298,600 | 21.294118 | 79 | 0.69657 | false | 3.25788 | false | false | false |
openstack/oslo.concurrency | releasenotes/source/conf.py | 1 | 8809 | # -*- coding: utf-8 -*-
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software... | apache-2.0 | 6,227,965,775,270,239,000 | 32.241509 | 79 | 0.709388 | false | 3.850087 | false | false | false |
apache/bloodhound | bloodhound_relations/bhrelations/tests/api.py | 2 | 22453 | # -*- coding: UTF-8 -*-
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (t... | apache-2.0 | 5,716,132,937,123,166,000 | 35.098071 | 79 | 0.601657 | false | 3.585596 | true | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.