hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7954261d87560c9d93e9cca0e6e40051e7aa13d2 | 752 | py | Python | publications/OptimisingForEquity/main.py | alan-turing-institute/spatial-inequality | 13e47817db92c14aaf3b0f3d020305adb821e0b5 | [
"MIT"
] | 5 | 2021-07-14T12:42:32.000Z | 2022-03-02T18:14:48.000Z | publications/OptimisingForEquity/main.py | alan-turing-institute/spatial-inequality | 13e47817db92c14aaf3b0f3d020305adb821e0b5 | [
"MIT"
] | 40 | 2020-01-29T14:44:13.000Z | 2022-02-11T16:14:53.000Z | publications/OptimisingForEquity/main.py | alan-turing-institute/spatial-inequality | 13e47817db92c14aaf3b0f3d020305adb821e0b5 | [
"MIT"
] | 1 | 2021-03-27T20:26:39.000Z | 2021-03-27T20:26:39.000Z | import sensors_urb_obs
import networks_single_obj
import networks_multi_objs
import networks_two_objs
import figs_demographics
import figs_single_obj
import figs_urb_obs
import figs_multi_objs
import figs_two_objs
import report
def main():
"""
Run all scripts to process the data, generate optimised networks a... | 22.787879 | 85 | 0.75133 |
79544903ef093a0813e81720a43248ae5f6fcbb9 | 3,279 | py | Python | recipes/retrieve_all_pictures_from_ODF_files_cli.py | jdum/odfdo | 2494d0bed39f5a55974643206e9bafeed40f3a6b | [
"Apache-2.0"
] | 18 | 2018-04-19T08:30:48.000Z | 2022-02-14T11:00:27.000Z | recipes/retrieve_all_pictures_from_ODF_files_cli.py | jdum/odfdo | 2494d0bed39f5a55974643206e9bafeed40f3a6b | [
"Apache-2.0"
] | 15 | 2018-04-22T00:52:41.000Z | 2021-07-05T10:16:38.000Z | recipes/retrieve_all_pictures_from_ODF_files_cli.py | jdum/odfdo | 2494d0bed39f5a55974643206e9bafeed40f3a6b | [
"Apache-2.0"
] | 6 | 2018-04-22T00:14:12.000Z | 2021-12-06T01:42:07.000Z | #!/usr/bin/env python
"""
Analyse a list of files and directory (recurse), open all ODF documents and copy pictures
from documents in a directory.
"""
import os
import optparse
from hashlib import sha1
import time
from odfdo import Document
# encoding = "UTF8"
default_dest_dir = "my_collected_pictures"
known_images =... | 29.017699 | 89 | 0.635255 |
795460823556b9e43ad6d9c18d3cacbc2ce2910c | 2,578 | py | Python | scriptabit/tests/test_habitica_task.py | luqiang21/scriptabit | 0d0cf71814e98954850891fa0887bdcffcf7147d | [
"Apache-2.0"
] | 9 | 2016-09-04T07:02:20.000Z | 2021-06-29T07:29:40.000Z | scriptabit/tests/test_habitica_task.py | luqiang21/scriptabit | 0d0cf71814e98954850891fa0887bdcffcf7147d | [
"Apache-2.0"
] | 35 | 2016-07-30T01:03:15.000Z | 2022-02-12T20:27:37.000Z | scriptabit/tests/test_habitica_task.py | luqiang21/scriptabit | 0d0cf71814e98954850891fa0887bdcffcf7147d | [
"Apache-2.0"
] | 8 | 2016-09-05T12:36:53.000Z | 2020-06-15T18:25:50.000Z | # -*- coding: utf-8 -*-
from __future__ import (
absolute_import,
division,
print_function,
unicode_literals,
)
from builtins import *
import json
import pytest
import requests
import requests_mock
from pkg_resources import resource_filename
from scriptabit import (
HabiticaTask,
Difficulty,
... | 26.040404 | 84 | 0.700543 |
7954662bac0624b2208f69bb3698d0b379b4f28a | 4,267 | py | Python | leetcode_python/Math/roman-to-integer.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Math/roman-to-integer.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Math/roman-to-integer.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | """
13. Roman to Integer
Easy
Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.
Symbol Value
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
For example, 2 is written as II in Roman numeral, just two one's... | 27.352564 | 345 | 0.494727 |
795492a8ed08bc3552d0d7c1753604d5c2471d56 | 1,653 | py | Python | loss_folder/draw_loss.py | manhcntt21/TextNormSeq2Seq | 440b252bddc0c735f083acd51271f2056d088a0a | [
"MIT"
] | null | null | null | loss_folder/draw_loss.py | manhcntt21/TextNormSeq2Seq | 440b252bddc0c735f083acd51271f2056d088a0a | [
"MIT"
] | null | null | null | loss_folder/draw_loss.py | manhcntt21/TextNormSeq2Seq | 440b252bddc0c735f083acd51271f2056d088a0a | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
def get_data(f1,f2,f3,f4):
"""
four folder loss
"""
epoches = []
train_word = []
test_word = []
train_char = []
test_char = []
with open(f1,"r") as f:
for line in f:
tmp = line.rstrip("\n\r").split("\t")
train_word.append(float(tmp[1])*100)
epoches... | 25.430769 | 149 | 0.660617 |
7954af782ff489bd5132456890c68f76c284be3c | 4,421 | py | Python | test/sox_io_backend/test_info.py | lbjcom/audio | 990bb5e57b66c92254365fdd6e43a12d9d0b7c78 | [
"BSD-2-Clause"
] | null | null | null | test/sox_io_backend/test_info.py | lbjcom/audio | 990bb5e57b66c92254365fdd6e43a12d9d0b7c78 | [
"BSD-2-Clause"
] | null | null | null | test/sox_io_backend/test_info.py | lbjcom/audio | 990bb5e57b66c92254365fdd6e43a12d9d0b7c78 | [
"BSD-2-Clause"
] | null | null | null | import itertools
from parameterized import parameterized
from torchaudio.backend import sox_io_backend
from ..common_utils import (
TempDirMixin,
PytorchTestCase,
skipIfNoExec,
skipIfNoExtension,
)
from .common import (
get_test_name
)
from . import sox_utils
@skipIfNoExec('sox')
@skipIfNoExtens... | 38.443478 | 91 | 0.649853 |
7954e0f8cc879bb2d2caeac53b8f707f4fc7a24b | 831 | py | Python | premade_modules/2.80/e5e885d0ecb9430a73e0a904cdb6035a2ef77e98/bpy/ops/workspace.py | echantry/fake-bpy-module | 004cdf198841e639b7d9a4c4db95ca1c0d3aa2c7 | [
"MIT"
] | null | null | null | premade_modules/2.80/e5e885d0ecb9430a73e0a904cdb6035a2ef77e98/bpy/ops/workspace.py | echantry/fake-bpy-module | 004cdf198841e639b7d9a4c4db95ca1c0d3aa2c7 | [
"MIT"
] | null | null | null | premade_modules/2.80/e5e885d0ecb9430a73e0a904cdb6035a2ef77e98/bpy/ops/workspace.py | echantry/fake-bpy-module | 004cdf198841e639b7d9a4c4db95ca1c0d3aa2c7 | [
"MIT"
] | null | null | null | def add():
'''Add a new workspace by duplicating the current one or appending one from the user configuration
'''
pass
def append_activate(idname="", filepath=""):
'''Append a workspace and make it the active one in the current window
:param idname: Identifier, Name of the workspace to append... | 16.294118 | 103 | 0.632972 |
7954f46899f49f21d66ade05a31fc9161694ded1 | 4,006 | py | Python | pix2pix/options/test_options.py | wattanapong/DFA | c05851beca2f8739f80531eb4de2f61639715cab | [
"Apache-2.0"
] | null | null | null | pix2pix/options/test_options.py | wattanapong/DFA | c05851beca2f8739f80531eb4de2f61639715cab | [
"Apache-2.0"
] | null | null | null | pix2pix/options/test_options.py | wattanapong/DFA | c05851beca2f8739f80531eb4de2f61639715cab | [
"Apache-2.0"
] | null | null | null | from .base_options import BaseOptions
class TestOptions(BaseOptions):
"""This class includes test options.
It also includes shared options defined in BaseOptions.
"""
def initialize(self, parser):
parser = BaseOptions.initialize(self, parser) # define shared options
parser.add_argum... | 57.228571 | 108 | 0.590614 |
79551d1e2e8b3826bda7e6b578fc2d4f7809a543 | 224 | py | Python | src/11/simple_communication_between_interpreters/echoclient.py | tuanavu/python-gitbook | 948a05e065b0f40afbfd22f697dff16238163cde | [
"MIT"
] | 14 | 2017-05-20T04:06:46.000Z | 2022-01-23T06:48:45.000Z | src/11/simple_communication_between_interpreters/echoclient.py | tuanavu/python-gitbook | 948a05e065b0f40afbfd22f697dff16238163cde | [
"MIT"
] | 1 | 2021-06-10T20:17:55.000Z | 2021-06-10T20:17:55.000Z | src/11/simple_communication_between_interpreters/echoclient.py | tuanavu/python-gitbook | 948a05e065b0f40afbfd22f697dff16238163cde | [
"MIT"
] | 15 | 2017-03-29T17:57:33.000Z | 2021-08-24T02:20:08.000Z | from multiprocessing.connection import Client
c = Client(('localhost', 25000), authkey=b'peekaboo')
c.send('hello')
print('Got:', c.recv())
c.send(42)
print('Got:', c.recv())
c.send([1, 2, 3, 4, 5])
print('Got:', c.recv())
| 22.4 | 53 | 0.642857 |
795521b0c9fb42d0a0805621d1b8668cd72ec501 | 3,171 | py | Python | stixy/accounting/admin.py | AnthonyKenny98/Stixy | 5d6dd38cc590d28dc98cca2737bbacf4f1ec69ba | [
"MIT"
] | null | null | null | stixy/accounting/admin.py | AnthonyKenny98/Stixy | 5d6dd38cc590d28dc98cca2737bbacf4f1ec69ba | [
"MIT"
] | 7 | 2021-03-19T03:10:21.000Z | 2021-09-22T19:00:19.000Z | stixy/accounting/admin.py | AnthonyKenny98/Stixy | 5d6dd38cc590d28dc98cca2737bbacf4f1ec69ba | [
"MIT"
] | null | null | null | """Admin Settings for Accounting App."""
from django.contrib import admin
from django.forms.models import BaseInlineFormSet
# Register your models here.
from .models import AccountClass, AccountGroup, \
Account, SubAccount, BankAccount, Transaction, Entry
from django.core.exceptions import ValidationError
class... | 29.915094 | 88 | 0.654998 |
795523efe2f0cd6c09760ff4c088a56a2154ba3c | 823 | py | Python | alipay/aop/api/response/AlipayAssetPointVoucherprodBenefittemplateOfflineResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AlipayAssetPointVoucherprodBenefittemplateOfflineResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AlipayAssetPointVoucherprodBenefittemplateOfflineResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayAssetPointVoucherprodBenefittemplateOfflineResponse(AlipayResponse):
def __init__(self):
super(AlipayAssetPointVoucherprodBenefittemplateOfflineResponse, self).__init__... | 31.653846 | 130 | 0.752126 |
795544040a0f1f4d0ba64676987cfd367deebc02 | 704 | py | Python | Projective-Geometry/bergar/com.bergar.simonsen.homography/tools/IO.py | tonybeltramelli/Graphics-And-Vision | a1dbeada8e907b119ecce1fe421ae91e64ff3371 | [
"Apache-2.0"
] | 12 | 2017-05-26T12:04:38.000Z | 2021-07-11T04:42:19.000Z | Projective-Geometry/bergar/com.bergar.simonsen.homography/tools/IO.py | tonybeltramelli/Graphics-And-Vision | a1dbeada8e907b119ecce1fe421ae91e64ff3371 | [
"Apache-2.0"
] | null | null | null | Projective-Geometry/bergar/com.bergar.simonsen.homography/tools/IO.py | tonybeltramelli/Graphics-And-Vision | a1dbeada8e907b119ecce1fe421ae91e64ff3371 | [
"Apache-2.0"
] | 4 | 2017-05-09T08:26:44.000Z | 2018-04-23T03:16:01.000Z | __author__ = 'bs'
import cv2
from config.Const import *
from tools import Utils
import numpy as np
def writeImage(I):
fName = SAVE_FOLDER + OUTPUT_IMAGE + JPG_EXTENSION
for i in range(MAX_FILES):
if not Utils.doesFileExist(fName):
cv2.imwrite(SAVE_FOLDER + fName, I)
break
... | 28.16 | 78 | 0.62358 |
795551e17833f98b83fd1a6fc340bfc8a30f8a39 | 1,800 | py | Python | blousebrothers/confs/migrations/0056_auto_20171026_1356.py | sladinji/blousebrothers | 461de3ba011c0aaed3f0014136c4497b6890d086 | [
"MIT"
] | 1 | 2022-01-27T11:58:10.000Z | 2022-01-27T11:58:10.000Z | blousebrothers/confs/migrations/0056_auto_20171026_1356.py | sladinji/blousebrothers | 461de3ba011c0aaed3f0014136c4497b6890d086 | [
"MIT"
] | 5 | 2021-03-19T00:01:54.000Z | 2022-03-11T23:46:21.000Z | blousebrothers/confs/migrations/0056_auto_20171026_1356.py | sladinji/blousebrothers | 461de3ba011c0aaed3f0014136c4497b6890d086 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2017-10-26 13:56
from __future__ import unicode_literals
from decimal import Decimal
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('confs', '0055_auto_20171016_0854'),
]
operations = [
... | 48.648649 | 426 | 0.68 |
7955560a4363b88aa9fa09451a8a4dcc1950f23f | 11,514 | py | Python | services/traction/acapy_client/model/indy_non_revoc_proof.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 12 | 2022-01-29T20:30:03.000Z | 2022-03-29T11:46:14.000Z | services/traction/acapy_client/model/indy_non_revoc_proof.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 38 | 2021-11-22T17:52:50.000Z | 2022-03-31T17:52:00.000Z | services/traction/acapy_client/model/indy_non_revoc_proof.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 9 | 2021-11-22T18:05:48.000Z | 2022-03-29T11:25:08.000Z | """
Aries Cloud Agent
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v0.7.2
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from acapy_cli... | 41.869091 | 124 | 0.557061 |
79555dacd0fab0641bf26d9c7dcec5ec6d9bd19a | 21,518 | py | Python | src/python/pants/util/dirutil.py | mpopenko-exos/pants | 47d27037c8b13291fc9023e56ddd1b1defdf1b8e | [
"Apache-2.0"
] | null | null | null | src/python/pants/util/dirutil.py | mpopenko-exos/pants | 47d27037c8b13291fc9023e56ddd1b1defdf1b8e | [
"Apache-2.0"
] | 1 | 2018-09-04T17:37:34.000Z | 2018-09-04T19:42:58.000Z | src/python/pants/util/dirutil.py | mpopenko-exos/pants | 47d27037c8b13291fc9023e56ddd1b1defdf1b8e | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import atexit
import errno
import os
import shutil
import stat
import tempfile
import threading
import uuid
from collections import defaultdict
from contextlib import contextmanager
from p... | 33.833333 | 117 | 0.702853 |
79556d0d005637542fca359d73602170662e30bd | 3,937 | py | Python | samples/report_test_sam.py | ivmfnal/metacat | 9eeea5f5e7867395c7203b8a7789607d3bdbd903 | [
"BSD-3-Clause"
] | 1 | 2022-03-18T19:01:29.000Z | 2022-03-18T19:01:29.000Z | samples/report_test_sam.py | ivmfnal/metacat | 9eeea5f5e7867395c7203b8a7789607d3bdbd903 | [
"BSD-3-Clause"
] | null | null | null | samples/report_test_sam.py | ivmfnal/metacat | 9eeea5f5e7867395c7203b8a7789607d3bdbd903 | [
"BSD-3-Clause"
] | null | null | null | import os,time,sys,datetime, glob, fnmatch,string,subprocess, json
import samweb_client
samweb = samweb_client.SAMWebClient(experiment='dune')
month = sys.argv[1]
first = sys.argv[1]
last = sys.argv[2]
out = open("report_"+first+"_"+last+".tex",'w')
top = "\\documentclass[10pt]{article}\n"
top += "\\setlength{\\text... | 36.453704 | 118 | 0.597155 |
795582f6aea665b698af069fc9da142fc8427297 | 8,253 | py | Python | reana_client/cli/cwl_runner.py | scailfin/reana-client | 01ddb22ac6a9215e87212bede636389f6f24a7d2 | [
"MIT"
] | null | null | null | reana_client/cli/cwl_runner.py | scailfin/reana-client | 01ddb22ac6a9215e87212bede636389f6f24a7d2 | [
"MIT"
] | null | null | null | reana_client/cli/cwl_runner.py | scailfin/reana-client | 01ddb22ac6a9215e87212bede636389f6f24a7d2 | [
"MIT"
] | 1 | 2019-06-04T22:29:12.000Z | 2019-06-04T22:29:12.000Z | # -*- coding: utf-8 -*-
#
# This file is part of REANA.
# Copyright (C) 2017, 2018 CERN.
#
# REANA is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""CWL v1.0 interface CLI implementation."""
import io
import logging
import os
import r... | 36.517699 | 78 | 0.596147 |
795585bb9b4f82167de62458e34e7260ba606811 | 5,894 | py | Python | asposeimagingcloud/models/requests/modify_jpeg2000_request.py | aspose-imaging-cloud/aspose-imaging-cloud-python | 9280a4a1aa415cb569ec26a05792b33186d31a85 | [
"MIT"
] | 1 | 2022-01-14T10:06:26.000Z | 2022-01-14T10:06:26.000Z | asposeimagingcloud/models/requests/modify_jpeg2000_request.py | aspose-imaging-cloud/aspose-imaging-cloud-python | 9280a4a1aa415cb569ec26a05792b33186d31a85 | [
"MIT"
] | 3 | 2019-07-17T15:01:31.000Z | 2020-12-29T09:16:10.000Z | asposeimagingcloud/models/requests/modify_jpeg2000_request.py | aspose-imaging-cloud/aspose-imaging-cloud-python | 9280a4a1aa415cb569ec26a05792b33186d31a85 | [
"MIT"
] | null | null | null | # coding: utf-8
# ----------------------------------------------------------------------------
# <copyright company="Aspose" file="modify_jpeg2000_request.py">
# Copyright (c) 2018-2020 Aspose Pty Ltd. All rights reserved.
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any pers... | 48.311475 | 252 | 0.658806 |
79559f203367ac7c1cc09a437ebf20c19f7ce22c | 6,491 | py | Python | qnarre/prep/convert/roberta.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre/prep/convert/roberta.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre/prep/convert/roberta.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | # Copyright 2022 Quantapix Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | 48.804511 | 97 | 0.731474 |
7955d53070d2ec297ad76b40bb2c5c2828870132 | 710 | py | Python | covsirphy/util/file.py | rebeccadavidsson/covid19-sir | ca7a408c5fcf87e4857edd14a9276cae0b6737cf | [
"Apache-2.0"
] | null | null | null | covsirphy/util/file.py | rebeccadavidsson/covid19-sir | ca7a408c5fcf87e4857edd14a9276cae0b6737cf | [
"Apache-2.0"
] | 100 | 2021-02-06T17:50:15.000Z | 2022-03-31T20:30:49.000Z | covsirphy/util/file.py | ardhani31/Covid19-SIRV | 813bc66f668a3d2945dc97474ea1149bbc6e40c2 | [
"Apache-2.0"
] | 1 | 2021-09-18T12:36:11.000Z | 2021-09-18T12:36:11.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from pathlib import Path
import pandas as pd
def save_dataframe(df, filename, index=True):
"""
Save dataframe as a CSV file.
Args:
df (pd.DataFrame): the dataframe
filename (str or None): CSV filename
index (bool): if True, include in... | 25.357143 | 84 | 0.616901 |
7955e38d68dff0a302b7b39a4363434c879cb672 | 440 | py | Python | aiostorage/providers/exceptions.py | family-guy/aiostorage | 266826caf811e96ba110c4bff26ad1889a8e9f62 | [
"MIT"
] | null | null | null | aiostorage/providers/exceptions.py | family-guy/aiostorage | 266826caf811e96ba110c4bff26ad1889a8e9f62 | [
"MIT"
] | 3 | 2018-12-25T13:53:11.000Z | 2019-02-10T13:52:31.000Z | aiostorage/providers/exceptions.py | grking8/aiostorage | 266826caf811e96ba110c4bff26ad1889a8e9f62 | [
"MIT"
] | null | null | null | """
This module contains exceptions for object storage provider API errors.
"""
class ProviderError(Exception):
"""
Base exception class.
"""
class ProviderGetUploadUrlError(ProviderError):
"""
Unable to get file upload URL.
"""
class ProviderAuthorizationError(ProviderError):
"""
... | 15.714286 | 71 | 0.665909 |
7955ea17335a287450b6065b06014de98b658ae3 | 8,876 | py | Python | mlrun/runtimes/funcdoc.py | EdmondIguazio/mlrun | e63b34a610788ebe522ce7a46642e26927e39882 | [
"Apache-2.0"
] | null | null | null | mlrun/runtimes/funcdoc.py | EdmondIguazio/mlrun | e63b34a610788ebe522ce7a46642e26927e39882 | [
"Apache-2.0"
] | null | null | null | mlrun/runtimes/funcdoc.py | EdmondIguazio/mlrun | e63b34a610788ebe522ce7a46642e26927e39882 | [
"Apache-2.0"
] | 1 | 2021-05-05T14:19:46.000Z | 2021-05-05T14:19:46.000Z | # Copyright 2018 Iguazio
#
# 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, softwa... | 26.978723 | 75 | 0.590469 |
7955f8dfdb9f3b1f9bc9eddcfbb91ed300f2f8c3 | 777 | py | Python | sapp/sarif_types.py | facebook/sapp | 4b85d10a791d8e9c8ae83d1f62fbded24845f053 | [
"MIT"
] | 74 | 2020-12-18T20:04:30.000Z | 2022-03-22T22:26:02.000Z | sapp/sarif_types.py | facebook/sapp | 4b85d10a791d8e9c8ae83d1f62fbded24845f053 | [
"MIT"
] | 61 | 2020-12-21T21:33:05.000Z | 2022-01-27T21:22:20.000Z | sapp/sarif_types.py | facebook/sapp | 4b85d10a791d8e9c8ae83d1f62fbded24845f053 | [
"MIT"
] | 20 | 2021-04-08T01:28:53.000Z | 2022-03-22T22:26:05.000Z | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
# pyre-strict
import sys
from enum import Enum
from typing import Dict, Union, List
if sys.version_info >= (3, 10):
from typing impor... | 19.923077 | 77 | 0.66538 |
795604f9aaf0002baa996f411d96c70a1cf03112 | 1,769 | py | Python | robot_view/urls.py | Raoul1996/robot_view_be | b50c261b4a62779b7536670463cf39599c91bc4d | [
"MIT"
] | 1 | 2018-07-04T18:29:43.000Z | 2018-07-04T18:29:43.000Z | robot_view/urls.py | Raoul1996/robot_view_be | b50c261b4a62779b7536670463cf39599c91bc4d | [
"MIT"
] | 8 | 2018-07-22T03:41:24.000Z | 2022-03-11T23:21:22.000Z | robot_view/urls.py | Raoul1996/robot_view_be | b50c261b4a62779b7536670463cf39599c91bc4d | [
"MIT"
] | null | null | null | """robot_view URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-ba... | 40.204545 | 77 | 0.75636 |
79561033fdd8596e6ef8548c7992a8510657a8b4 | 9,094 | py | Python | tests/test_lease_server.py | agdsn/hades | 78782831b840188b14e37c0673a6d6e9712f64ce | [
"MIT"
] | 8 | 2015-04-27T00:41:03.000Z | 2021-11-14T17:15:26.000Z | tests/test_lease_server.py | agdsn/hades | 78782831b840188b14e37c0673a6d6e9712f64ce | [
"MIT"
] | 84 | 2015-04-27T12:15:00.000Z | 2021-11-28T19:06:23.000Z | tests/test_lease_server.py | agdsn/hades | 78782831b840188b14e37c0673a6d6e9712f64ce | [
"MIT"
] | 4 | 2015-11-14T16:20:40.000Z | 2017-09-05T00:27:49.000Z | import array
import contextlib
import logging
import mmap
import os
import socket
import struct
from io import FileIO
from typing import Callable, Dict, Generator, List, Optional, Tuple, TypeVar
import pytest
from _pytest.logging import LogCaptureFixture
from hades.leases.server import (
BufferTooSmallError, Bas... | 29.241158 | 98 | 0.609083 |
7956207ffed6ff3498a0f513901172daffcb39cd | 4,075 | py | Python | neutronclient/neutron/v2_0/qos/qos.py | teresa-ho/stx-python-neutronclient | 35ea6c2c96cbf98755a82cb7c19138648552b778 | [
"Apache-2.0"
] | null | null | null | neutronclient/neutron/v2_0/qos/qos.py | teresa-ho/stx-python-neutronclient | 35ea6c2c96cbf98755a82cb7c19138648552b778 | [
"Apache-2.0"
] | null | null | null | neutronclient/neutron/v2_0/qos/qos.py | teresa-ho/stx-python-neutronclient | 35ea6c2c96cbf98755a82cb7c19138648552b778 | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 OpenStack Foundation.
# All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | 32.6 | 78 | 0.617178 |
79563210ee66e8a3ef51b30587c4e4ccef13f529 | 2,985 | py | Python | src/marapp_metrics/helpers/earthengine.py | natgeosociety/marapp-metrics | f3883452fbbe4101c7a6a6481316fe78246c8be2 | [
"Apache-2.0"
] | null | null | null | src/marapp_metrics/helpers/earthengine.py | natgeosociety/marapp-metrics | f3883452fbbe4101c7a6a6481316fe78246c8be2 | [
"Apache-2.0"
] | 4 | 2020-11-25T12:03:26.000Z | 2022-01-22T13:58:02.000Z | src/marapp_metrics/helpers/earthengine.py | natgeosociety/marapp-metrics | f3883452fbbe4101c7a6a6481316fe78246c8be2 | [
"Apache-2.0"
] | 1 | 2021-02-23T18:58:10.000Z | 2021-02-23T18:58:10.000Z | """
Copyright 2018-2020 National Geographic Society
Use of this software does not constitute endorsement by National Geographic
Society (NGS). The NGS name and NGS logo may not be used for any purpose without
written permission from NGS.
Licensed under the Apache License, Version 2.0 (the "License"); you ma... | 29.85 | 88 | 0.610385 |
795640f7f23de69c0c13ed0ee2f98525a8b9efa3 | 62 | py | Python | tests/__init__.py | practicalci/practci | 47d0600918762373992da0ba067dbb84a3e4d633 | [
"BSD-3-Clause"
] | null | null | null | tests/__init__.py | practicalci/practci | 47d0600918762373992da0ba067dbb84a3e4d633 | [
"BSD-3-Clause"
] | null | null | null | tests/__init__.py | practicalci/practci | 47d0600918762373992da0ba067dbb84a3e4d633 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Unit test package for practci."""
| 15.5 | 36 | 0.564516 |
7956559c618cddbea84c1f0acf33727366ac73d7 | 6,269 | py | Python | roles/openshift_health_checker/openshift_checks/disk_availability.py | Ravichandramanupati/openshift | 1720af442f0b02359ce4cc70d32adca15d9d26ab | [
"Apache-2.0"
] | 1 | 2017-11-01T05:46:27.000Z | 2017-11-01T05:46:27.000Z | roles/openshift_health_checker/openshift_checks/disk_availability.py | gloria-sentinella/openshift-ansible | e03493f33073965ddf8c49256df80143059a2a51 | [
"Apache-2.0"
] | 3 | 2016-12-01T23:01:36.000Z | 2016-12-02T00:16:48.000Z | roles/openshift_health_checker/openshift_checks/disk_availability.py | gloria-sentinella/openshift-ansible | e03493f33073965ddf8c49256df80143059a2a51 | [
"Apache-2.0"
] | 1 | 2018-01-30T05:44:59.000Z | 2018-01-30T05:44:59.000Z | """Check that there is enough disk space in predefined paths."""
import tempfile
from openshift_checks import OpenShiftCheck, OpenShiftCheckException
class DiskAvailability(OpenShiftCheck):
"""Check that recommended disk space is available before a first-time install."""
name = "disk_availability"
tags... | 45.427536 | 108 | 0.600415 |
7956c594f3267a7ff5d977866703f7a90d668ede | 2,343 | py | Python | python/thumbContextMenu.py | Schizo/MediaBrowser | a80bd045380bb1c5697d9b0a6b9447a4b0e4dcc0 | [
"MIT"
] | 3 | 2016-01-19T10:36:09.000Z | 2021-01-29T01:14:45.000Z | python/thumbContextMenu.py | Schizo/MediaBrowser | a80bd045380bb1c5697d9b0a6b9447a4b0e4dcc0 | [
"MIT"
] | 2 | 2016-02-20T13:09:38.000Z | 2016-03-08T06:47:47.000Z | python/thumbContextMenu.py | Schizo/MediaBrowser | a80bd045380bb1c5697d9b0a6b9447a4b0e4dcc0 | [
"MIT"
] | 3 | 2016-02-19T16:52:57.000Z | 2017-05-16T03:06:43.000Z | from PyQt4 import QtGui, QtCore
import settings
import os
import subprocess
class ThumbContextMenu(QtGui.QMenu):
def __init__(self):
super(ThumbContextMenu, self).__init__()
# disabled, since it has been broken in the old ElementsBrowser for a few months and no one complained
# self.addAct... | 38.409836 | 110 | 0.665813 |
7956fcfa6d566bc3d7c32d33f331a4c040855668 | 2,010 | py | Python | main.py | karipov/gpa-calculator | fd7995e35124f0b128085a360176a31ca123621e | [
"MIT"
] | null | null | null | main.py | karipov/gpa-calculator | fd7995e35124f0b128085a360176a31ca123621e | [
"MIT"
] | null | null | null | main.py | karipov/gpa-calculator | fd7995e35124f0b128085a360176a31ca123621e | [
"MIT"
] | null | null | null | import telebot
import config
import values
import dbhandler
from textparser import check_entry, parse_entry
bot = telebot.TeleBot(config.KEY)
def calculate_gpa(subject_list):
grade_list = [x[1] for x in subject_list] # no need for subject names
total_gpa = 0 # a counter
for grade in grade_list:
t... | 30 | 77 | 0.694527 |
79571b5c80111e578a3f2e61e6aefd2666bbe0f8 | 28,155 | py | Python | run_ner_span.py | 20000607-lxc/BERT-NER-Pytorch-master | 47f2e1291ab53674986eb91abdb72693eafe9b61 | [
"MIT"
] | null | null | null | run_ner_span.py | 20000607-lxc/BERT-NER-Pytorch-master | 47f2e1291ab53674986eb91abdb72693eafe9b61 | [
"MIT"
] | null | null | null | run_ner_span.py | 20000607-lxc/BERT-NER-Pytorch-master | 47f2e1291ab53674986eb91abdb72693eafe9b61 | [
"MIT"
] | null | null | null | import argparse
import glob
import logging
import os
import json
import time
import torch
from torch.nn import CrossEntropyLoss
from torch.utils.data import DataLoader, RandomSampler, SequentialSampler, TensorDataset
from torch.utils.data.distributed import DistributedSampler
from callback.optimizater.adamw import Adam... | 55.532544 | 150 | 0.630368 |
79573b7933fdcae7c9793ef1e76eb9002290e3cd | 12,791 | py | Python | src/unit_parse/core.py | dylanwal/unit_parse | 07a74d43b9f161bd7ad6ef12ab0f362f1bf6a90d | [
"BSD-3-Clause"
] | 1 | 2022-01-29T17:14:40.000Z | 2022-01-29T17:14:40.000Z | src/unit_parse/core.py | dylanwal/unit_parse | 07a74d43b9f161bd7ad6ef12ab0f362f1bf6a90d | [
"BSD-3-Clause"
] | null | null | null | src/unit_parse/core.py | dylanwal/unit_parse | 07a74d43b9f161bd7ad6ef12ab0f362f1bf6a90d | [
"BSD-3-Clause"
] | null | null | null | """
Core
This code does the heavy lifting of turning strings into Quantities. Its the functions that need to deal with the
most mess.
"""
from typing import List, Union
import re
from unit_parse.config import Unit, Quantity, config
from unit_parse.pre_processing_substitution import sub_general
from unit_parse.utils ... | 25.179134 | 113 | 0.543898 |
79574461a39c134b1ebb8121bd822dbb0f1b7b7f | 86,018 | py | Python | 0900-hp/hplip-3.21.12/ui5/devmgr5.py | rgfaber/dev-toolkit | b7e6b1e35a4bfb8ca9ba75e5556917cc49b88f7f | [
"Apache-2.0"
] | null | null | null | 0900-hp/hplip-3.21.12/ui5/devmgr5.py | rgfaber/dev-toolkit | b7e6b1e35a4bfb8ca9ba75e5556917cc49b88f7f | [
"Apache-2.0"
] | null | null | null | 0900-hp/hplip-3.21.12/ui5/devmgr5.py | rgfaber/dev-toolkit | b7e6b1e35a4bfb8ca9ba75e5556917cc49b88f7f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# (c) Copyright 2001-2015 HP Development Company, L.P.
#
# 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 late... | 36.917597 | 189 | 0.545537 |
7957460ae567f9fa80966ca9f15901dadc7ae18d | 5,973 | py | Python | flow_models/merge.py | piotrjurkiewicz/flow_stats | cc97a8381275cb9dd23ed0c3432abffaf4198431 | [
"MIT"
] | 9 | 2019-07-08T09:53:22.000Z | 2021-11-19T07:50:11.000Z | flow_models/merge.py | ElsevierSoftwareX/SOFTX-D-21-00003 | cc97a8381275cb9dd23ed0c3432abffaf4198431 | [
"MIT"
] | 1 | 2021-02-23T16:01:21.000Z | 2021-04-03T02:06:32.000Z | flow_models/merge.py | ElsevierSoftwareX/SOFTX-D-21-00003 | cc97a8381275cb9dd23ed0c3432abffaf4198431 | [
"MIT"
] | 5 | 2019-09-27T14:52:54.000Z | 2022-01-25T07:58:24.000Z | #!/usr/bin/python3
"""
Merges flows which were split across multiple records due to *active timeout*.
"""
import argparse
import warnings
from .lib.io import FlowValFields, io_parser, IN_FORMATS, OUT_FORMATS
from .lib.util import logmsg, prepare_file_list
class Flow:
__slots__ = 'key', 'val'
def __init__(s... | 38.535484 | 118 | 0.542943 |
7957700f505fe822d925ca2a068cdc14546fecc5 | 3,049 | py | Python | Gamle scripts/systematic/drop_0_10.py | MadsAW/machine-learning-on-materials | 6101c7e3d12be54b12391c78442294198a39cc9b | [
"MIT"
] | 2 | 2018-10-10T09:32:34.000Z | 2019-03-28T08:42:31.000Z | Gamle scripts/systematic/drop_0_10.py | MadsAW/machine-learning-on-materials | 6101c7e3d12be54b12391c78442294198a39cc9b | [
"MIT"
] | null | null | null | Gamle scripts/systematic/drop_0_10.py | MadsAW/machine-learning-on-materials | 6101c7e3d12be54b12391c78442294198a39cc9b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Nov 13 12:31:46 2018
@author: Simon
"""
import os
from createLargerFeatureMatrix import simpleLargeMatrix
import pickle
from keras.models import Sequential
from keras.layers import Dense, Dropout
from keras import regularizers
import numpy as np
path ... | 23.274809 | 137 | 0.762545 |
795776bdbafc87f29a4c87412abe4fc850ee03a4 | 1,654 | py | Python | app/auth/views.py | Waithera-m/You-Got-This | efc83bd712ffbb5d57acf3c9925389905adf8673 | [
"Unlicense"
] | null | null | null | app/auth/views.py | Waithera-m/You-Got-This | efc83bd712ffbb5d57acf3c9925389905adf8673 | [
"Unlicense"
] | null | null | null | app/auth/views.py | Waithera-m/You-Got-This | efc83bd712ffbb5d57acf3c9925389905adf8673 | [
"Unlicense"
] | null | null | null | from flask import render_template,redirect,url_for,flash,request
from . import auth
from ..models import User
from .forms import UserRegistrationForm,LoginForm
from .. import db
from flask_login import login_user,logout_user,login_required
from ..email import email_message
@auth.route('/login', methods=["GET","POST"]... | 30.072727 | 98 | 0.691052 |
79579054f0bccfe8bb10d3c18aae6bcb6dc2b47e | 7,548 | py | Python | tests/python/pants_test/backend/python/tasks/test_select_interpreter.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/backend/python/tasks/test_select_interpreter.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/backend/python/tasks/test_select_interpreter.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2016 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
import os
from builtins import str
from textwrap import dedent
import mock
from pex.inte... | 48.384615 | 110 | 0.744966 |
79581758902061c1ddacc509344a6684dd0b338f | 2,831 | py | Python | src/python/pants/backend/project_info/tasks/filedeps.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/project_info/tasks/filedeps.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/project_info/tasks/filedeps.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import itertools
imp... | 44.936508 | 102 | 0.737195 |
795892cacaf38933bbb01032934f7569637e1617 | 7,622 | py | Python | tests/notebooks/imodels_demo.py | jiayouwyhit/imodels | 2f3e3cd55b6ac1e6d0f21420bf9c4c29e4d39b06 | [
"MIT"
] | 1 | 2021-05-22T13:04:36.000Z | 2021-05-22T13:04:36.000Z | tests/notebooks/imodels_demo.py | jiayouwyhit/imodels | 2f3e3cd55b6ac1e6d0f21420bf9c4c29e4d39b06 | [
"MIT"
] | null | null | null | tests/notebooks/imodels_demo.py | jiayouwyhit/imodels | 2f3e3cd55b6ac1e6d0f21420bf9c4c29e4d39b06 | [
"MIT"
] | null | null | null | # ---
# jupyter:
# jupytext:
# formats: ipynb,../tests/notebooks//py:percent
# text_representation:
# extension: .py
# format_name: percent
# format_version: '1.3'
# jupytext_version: 1.10.2
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
... | 30.246032 | 121 | 0.704802 |
7958c17bf5445a014e8e24cbce72ac8b488b284c | 27,185 | py | Python | readthedocs/rtd_tests/tests/test_celery.py | mehrdad-khojastefar/readthedocs.org | b958bb8d04c454324d612345890b13af54a19eb6 | [
"MIT"
] | 2,092 | 2019-06-29T07:47:30.000Z | 2022-03-31T14:54:59.000Z | readthedocs/rtd_tests/tests/test_celery.py | mehrdad-khojastefar/readthedocs.org | b958bb8d04c454324d612345890b13af54a19eb6 | [
"MIT"
] | 2,389 | 2019-06-29T04:22:55.000Z | 2022-03-31T22:57:49.000Z | readthedocs/rtd_tests/tests/test_celery.py | mehrdad-khojastefar/readthedocs.org | b958bb8d04c454324d612345890b13af54a19eb6 | [
"MIT"
] | 1,185 | 2019-06-29T21:49:31.000Z | 2022-03-30T09:57:15.000Z | import os
import shutil
from os.path import exists
from tempfile import mkdtemp
from unittest import mock
from unittest.mock import MagicMock, patch
from allauth.socialaccount.models import SocialAccount
from django.conf import settings
from django.contrib.auth.models import User
from django.test import TestCase
from ... | 38.725071 | 100 | 0.618503 |
7958cc9cda9df94ef07f1e1d1ba36279762d1f67 | 12,387 | py | Python | eureka/S5_lightcurve_fitting/plots_s5.py | astrojake/Eureka | 57cb0f1a576dfbbef9ba616b7a13a28c42efb876 | [
"MIT"
] | null | null | null | eureka/S5_lightcurve_fitting/plots_s5.py | astrojake/Eureka | 57cb0f1a576dfbbef9ba616b7a13a28c42efb876 | [
"MIT"
] | null | null | null | eureka/S5_lightcurve_fitting/plots_s5.py | astrojake/Eureka | 57cb0f1a576dfbbef9ba616b7a13a28c42efb876 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import corner
from scipy import stats
from copy import deepcopy
from .likelihood import computeRMS
from .utils import COLORS
def plot_fit(lc, model, meta, fitter, isTitle=True):
"""Plot the fitted model over the data. (Fig 5100)
Parameters
----------
... | 35.800578 | 148 | 0.602325 |
7958eae286ceae37a18c61fdab57b216f7ccbc97 | 77 | py | Python | steemexchange/__init__.py | cryptomental/python-goloslib | 0766f9b48e478bc3cdd18b22a6b5867b82a9f81e | [
"MIT"
] | 1 | 2017-04-08T05:08:35.000Z | 2017-04-08T05:08:35.000Z | steemexchange/__init__.py | cryptomental/python-goloslib | 0766f9b48e478bc3cdd18b22a6b5867b82a9f81e | [
"MIT"
] | null | null | null | steemexchange/__init__.py | cryptomental/python-goloslib | 0766f9b48e478bc3cdd18b22a6b5867b82a9f81e | [
"MIT"
] | null | null | null | from steemexchange.exchange import SteemExchange
__all__ = ['steemexchange']
| 25.666667 | 48 | 0.831169 |
7958fbb21c8c01dbafc491118d1c11230aa2b8cf | 1,574 | py | Python | touchpoint/location.py | zappospizza/touchpoint-python | 19572c0c1360408dd980ed95e852046dcdba3623 | [
"MIT"
] | null | null | null | touchpoint/location.py | zappospizza/touchpoint-python | 19572c0c1360408dd980ed95e852046dcdba3623 | [
"MIT"
] | null | null | null | touchpoint/location.py | zappospizza/touchpoint-python | 19572c0c1360408dd980ed95e852046dcdba3623 | [
"MIT"
] | null | null | null | # touchpoint/location.py
'''This module defines a location.'''
class Location():
'''
The Location object contains a location's details
:param location_id: Used to identify a given location
:type location_id: str
:param wss_url: Used to define a location's wss url
:type wss... | 28.618182 | 83 | 0.588945 |
795907e92e52c9832c578a4d9ba7a154b9136a39 | 475 | py | Python | makemessages.py | jackton1/django-service-objects | cdcaedb64154b949ab6c5e5de60b4f9835f1cc98 | [
"MIT"
] | 328 | 2017-08-13T19:09:31.000Z | 2022-03-30T09:02:35.000Z | makemessages.py | jackton1/django-service-objects | cdcaedb64154b949ab6c5e5de60b4f9835f1cc98 | [
"MIT"
] | 50 | 2017-08-17T02:31:49.000Z | 2022-02-23T22:45:13.000Z | makemessages.py | jackton1/django-service-objects | cdcaedb64154b949ab6c5e5de60b4f9835f1cc98 | [
"MIT"
] | 32 | 2017-08-15T03:29:53.000Z | 2022-01-24T22:18:05.000Z | import os
import django
from django.conf import settings
from django.core import management
BASE_DIR = os.path.dirname(__file__)
settings.configure(
DATABASES={
'default': {
'ENGINE': 'django.db.backends.sqlite3',
}
},
LOCALE_PATHS=(
os.path.join(BASE_DIR, 'loca... | 19.791667 | 70 | 0.604211 |
79591c0692d7618f5316e7b429e8d2302c7453e9 | 1,617 | py | Python | src/get_more_features/get_reading_level.py | kashev/reddit-reliability | 6d92486019b9264d2b7bfd51912ef257fc6088ae | [
"MIT"
] | null | null | null | src/get_more_features/get_reading_level.py | kashev/reddit-reliability | 6d92486019b9264d2b7bfd51912ef257fc6088ae | [
"MIT"
] | null | null | null | src/get_more_features/get_reading_level.py | kashev/reddit-reliability | 6d92486019b9264d2b7bfd51912ef257fc6088ae | [
"MIT"
] | null | null | null | #!/usr/bin/env python
## -*- coding: utf-8 -*-
# reddit-reliability
import pymongo
from textstat.textstat import textstat
from pymongo import MongoClient
def main():
mongo_client = MongoClient('mongodb://cs598tar:cs598tar@'
'107.170.215.176:27017')
reddit_data = mongo_client.re... | 30.509434 | 76 | 0.606679 |
795938870cfce0009337bfbfbebda0e193310133 | 1,832 | py | Python | tests/h/emails/test_test.py | Manuelinux/kubeh | a549f0d1c09619843290f9b78bce7668ed90853a | [
"BSD-2-Clause"
] | null | null | null | tests/h/emails/test_test.py | Manuelinux/kubeh | a549f0d1c09619843290f9b78bce7668ed90853a | [
"BSD-2-Clause"
] | 4 | 2020-03-24T17:38:24.000Z | 2022-03-02T05:45:01.000Z | tests/h/emails/test_test.py | Manuelinux/kubeh | a549f0d1c09619843290f9b78bce7668ed90853a | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import pytest
from h._compat import string_types
from h.emails.test import generate
from h import __version__
class TestGenerate:
def test_calls_renderers_with_appropriate_context(
self, pyramid_request, html_renderer, text_renderer, matc... | 31.050847 | 88 | 0.683952 |
7959393fd386df8c13da4864577559ca4ddafff0 | 5,856 | py | Python | mediapipe/calculators/tensorflow/vector_float_to_tensor_calculator_options_pb2.py | mengfu188/simple-mediapipe | 85dc8a87c9586312c2d057ad587bfccf3b5e2eb6 | [
"Apache-2.0"
] | 5 | 2021-01-01T11:02:41.000Z | 2022-03-11T19:44:29.000Z | mediapipe/calculators/tensorflow/vector_float_to_tensor_calculator_options_pb2.py | mengfu188/simple-mediapipe | 85dc8a87c9586312c2d057ad587bfccf3b5e2eb6 | [
"Apache-2.0"
] | null | null | null | mediapipe/calculators/tensorflow/vector_float_to_tensor_calculator_options_pb2.py | mengfu188/simple-mediapipe | 85dc8a87c9586312c2d057ad587bfccf3b5e2eb6 | [
"Apache-2.0"
] | 1 | 2021-04-12T05:59:46.000Z | 2021-04-12T05:59:46.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: mediapipe/calculators/tensorflow/vector_float_to_tensor_calculator_options.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _... | 46.47619 | 617 | 0.818648 |
79593bf354de0872e7871b8c89b72e845c3d4c2c | 4,937 | py | Python | cloakx/JS_Replace.py | skarami/cloakx | a6d0b808b5cfa665a1328c49931511d57f8aa6a7 | [
"BSD-2-Clause"
] | 2 | 2020-08-20T14:11:14.000Z | 2021-04-12T08:11:57.000Z | cloakx/JS_Replace.py | skarami/cloakx | a6d0b808b5cfa665a1328c49931511d57f8aa6a7 | [
"BSD-2-Clause"
] | null | null | null | cloakx/JS_Replace.py | skarami/cloakx | a6d0b808b5cfa665a1328c49931511d57f8aa6a7 | [
"BSD-2-Clause"
] | 1 | 2022-02-09T18:13:53.000Z | 2022-02-09T18:13:53.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from slimit import ast
from slimit.parser import Parser
from slimit.visitors import nodevisitor
from pprint import PrettyPrinter
import re
import esprima
pp = PrettyPrinter(indent=2)
data = """
var a = "content other" // YES NO
var b = 'content -content' // YES... | 32.913333 | 108 | 0.568361 |
79594933c0d74a262753633a669147b2de39c55b | 8,924 | py | Python | build/lib/rsnapsim/SSA_Soln.py | MunskyGroup/rSNAPsim | af3e496d5252e1d2e1da061277123233a5d609b4 | [
"MIT"
] | 1 | 2022-01-28T18:17:37.000Z | 2022-01-28T18:17:37.000Z | build/lib/rsnapsim/SSA_Soln.py | MunskyGroup/rSNAPsim | af3e496d5252e1d2e1da061277123233a5d609b4 | [
"MIT"
] | null | null | null | build/lib/rsnapsim/SSA_Soln.py | MunskyGroup/rSNAPsim | af3e496d5252e1d2e1da061277123233a5d609b4 | [
"MIT"
] | 1 | 2020-12-02T06:36:17.000Z | 2020-12-02T06:36:17.000Z | # -*- coding: utf-8 -*-
"""
Created on Thu Dec 17 17:57:33 2020
@author: willi
"""
from . import GenericMetaData
GenericMetaData = GenericMetaData.GenericMetaData
import numpy as np
import json, codecs
from json import encoder
class SSA_Soln():
'''
SSA container class
holds intensity / ribosome data as ... | 36.876033 | 170 | 0.453384 |
79594d8a10d482d64808e4eb2abc83f0f2525898 | 5,119 | py | Python | sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/_device_update.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/_device_update.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/_device_update.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 49.221154 | 129 | 0.728658 |
79595850e184508a3938154f97c588d9aa809d1e | 1,190 | py | Python | fabfile/utils.py | isabella232/lookatthis | fe9ccc896f50ede13f9c469d38d90c8a732f9a71 | [
"FSFAP"
] | 15 | 2015-02-21T13:56:25.000Z | 2019-08-14T21:19:09.000Z | fabfile/utils.py | nprapps/lookatthis | fe9ccc896f50ede13f9c469d38d90c8a732f9a71 | [
"FSFAP"
] | 444 | 2015-01-06T16:54:13.000Z | 2021-09-22T11:46:33.000Z | fabfile/utils.py | isabella232/lookatthis | fe9ccc896f50ede13f9c469d38d90c8a732f9a71 | [
"FSFAP"
] | 13 | 2015-01-05T14:33:15.000Z | 2021-02-23T10:45:32.000Z | #!/usr/bin/env python
"""
Utilities used by multiple commands.
"""
from glob import glob
import re
import boto
from boto.s3.connection import OrdinaryCallingFormat
from fabric.api import local, prompt
from fabric.state import env
import app_config
def confirm(message):
"""
Verify a users intentions.
"... | 20.877193 | 68 | 0.64958 |
795965653549373842eca389c4308a83f934aef6 | 43,832 | py | Python | src/sagemaker/estimator.py | Shuhuasong/Sage-Maker | 32534662acf290d7f9748f2008e6ded4f4e32660 | [
"Apache-2.0"
] | null | null | null | src/sagemaker/estimator.py | Shuhuasong/Sage-Maker | 32534662acf290d7f9748f2008e6ded4f4e32660 | [
"Apache-2.0"
] | null | null | null | src/sagemaker/estimator.py | Shuhuasong/Sage-Maker | 32534662acf290d7f9748f2008e6ded4f4e32660 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017-2018 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" fil... | 53.649939 | 120 | 0.676811 |
79596bf588fe650f132f18ac32ccd7693e857ed6 | 35,911 | py | Python | core/storage/user/gae_models_test.py | yashdusing/oppia | c0218e13ba29f9bc25cc5ec6f7f13108ee4fdb9a | [
"Apache-2.0"
] | null | null | null | core/storage/user/gae_models_test.py | yashdusing/oppia | c0218e13ba29f9bc25cc5ec6f7f13108ee4fdb9a | [
"Apache-2.0"
] | null | null | null | core/storage/user/gae_models_test.py | yashdusing/oppia | c0218e13ba29f9bc25cc5ec6f7f13108ee4fdb9a | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2014 The Oppia Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | 42.347877 | 80 | 0.673192 |
795972dfed129112894f663be442bffa99afff99 | 16,683 | py | Python | salt/utils/win_runas.py | silviud/salt | 9d35ea66428a030d00ef1a2f3b93ecfe90be023c | [
"Apache-2.0"
] | 1 | 2018-09-19T22:42:54.000Z | 2018-09-19T22:42:54.000Z | salt/utils/win_runas.py | silviud/salt | 9d35ea66428a030d00ef1a2f3b93ecfe90be023c | [
"Apache-2.0"
] | null | null | null | salt/utils/win_runas.py | silviud/salt | 9d35ea66428a030d00ef1a2f3b93ecfe90be023c | [
"Apache-2.0"
] | 1 | 2019-07-23T13:42:23.000Z | 2019-07-23T13:42:23.000Z | # -*- coding: utf-8 -*-
'''
Implements the ability to run processes as another user in Windows for salt
'''
from __future__ import absolute_import
# Import Python Libraries
import os
import logging
# Import Third Party Libs
try:
import win32con
import win32api
import win32process
import win32security
... | 36.50547 | 95 | 0.598394 |
795980c95f91b7fe1804cd9ed8dedf307b02d651 | 419 | py | Python | iris_sdk/models/maps/telephone_number.py | NumberAI/python-bandwidth-iris | 0e05f79d68b244812afb97e00fd65b3f46d00aa3 | [
"MIT"
] | 2 | 2020-04-13T13:47:59.000Z | 2022-02-23T20:32:41.000Z | iris_sdk/models/maps/telephone_number.py | bandwidthcom/python-bandwidth-iris | dbcb30569631395041b92917252d913166f7d3c9 | [
"MIT"
] | 5 | 2020-09-18T20:59:24.000Z | 2021-08-25T16:51:42.000Z | iris_sdk/models/maps/telephone_number.py | bandwidthcom/python-bandwidth-iris | dbcb30569631395041b92917252d913166f7d3c9 | [
"MIT"
] | 5 | 2018-12-12T14:39:50.000Z | 2020-11-17T21:42:29.000Z | #!/usr/bin/env python
from iris_sdk.models.maps.base_map import BaseMap
class TelephoneNumberMap(BaseMap):
account_id = None
city = None
full_number = None
last_modified = None
lata = None
order_create_date = None
order_id = None
order_type = None
rate_center = None
site_id = ... | 19.952381 | 49 | 0.663484 |
7959a2146cd1c016160d52d784d4c1863c85de25 | 2,350 | py | Python | applications/tensorflow/cnns/inference/data.py | Splendon/examples | ed4a8a01857b6ddca49559141acf5d0986eb01e1 | [
"MIT"
] | null | null | null | applications/tensorflow/cnns/inference/data.py | Splendon/examples | ed4a8a01857b6ddca49559141acf5d0986eb01e1 | [
"MIT"
] | null | null | null | applications/tensorflow/cnns/inference/data.py | Splendon/examples | ed4a8a01857b6ddca49559141acf5d0986eb01e1 | [
"MIT"
] | null | null | null | # Copyright 2019 Graphcore Ltd.
from functools import partial
from typing import Callable, Tuple
import tensorflow as tf
def load_and_preprocess_data(img_path: str, img_width: int, img_height: int,
preprocess_fn: Callable, dtype: tf.DType) -> tf.Tensor:
"""Read and pre-process image.... | 35.606061 | 114 | 0.693617 |
7959cbeec367f450e1667a84274e190f99e7ed69 | 675 | py | Python | learning_object/collections/manager/collections/get_one.py | dsvalenciah/ROAp | 24cbff0e719c5009ec1f1e7190924d4d9297e992 | [
"MIT"
] | 4 | 2018-04-23T00:04:01.000Z | 2018-10-28T22:56:51.000Z | learning_object/collections/manager/collections/get_one.py | dsvalenciah/ROAp | 24cbff0e719c5009ec1f1e7190924d4d9297e992 | [
"MIT"
] | 23 | 2017-12-22T08:27:35.000Z | 2021-12-13T19:57:35.000Z | learning_object/collections/manager/collections/get_one.py | dsvalenciah/ROAp | 24cbff0e719c5009ec1f1e7190924d4d9297e992 | [
"MIT"
] | 1 | 2020-06-03T02:07:26.000Z | 2020-06-03T02:07:26.000Z | from ..exceptions import CollectionNotFoundError
def get_one(db_client, collection_id, user):
_ = user.get('language')
collection = db_client.locollection.find_one({
'_id': collection_id
})
if not collection:
raise CollectionNotFoundError(_('Collection not found'))
lo_quantity = ... | 33.75 | 141 | 0.72 |
7959f9a2765abe135f1a785b808240745bc29024 | 5,429 | py | Python | project/apps/main_site/migrations/0005_auto__chg_field_gutterbumper_work_hrs__chg_field_gutterbumper_friend_h.py | skoczen/the-steven-manual | 20599347ed1618886290c596332738013ac45500 | [
"BSD-2-Clause"
] | null | null | null | project/apps/main_site/migrations/0005_auto__chg_field_gutterbumper_work_hrs__chg_field_gutterbumper_friend_h.py | skoczen/the-steven-manual | 20599347ed1618886290c596332738013ac45500 | [
"BSD-2-Clause"
] | 4 | 2020-02-12T01:09:50.000Z | 2021-06-10T20:34:59.000Z | project/apps/main_site/migrations/0005_auto__chg_field_gutterbumper_work_hrs__chg_field_gutterbumper_friend_h.py | skoczen/the-steven-manual | 20599347ed1618886290c596332738013ac45500 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'GutterBumper.work_hrs'
db.alter_column('main_site_gutterbumper', 'work_hrs', self.gf('dja... | 61 | 129 | 0.60361 |
795a09130cc2807bd1c505859b8fdc9838652d11 | 2,030 | py | Python | tools/obfuscator.py | anima-libera/ports | 782ea3291eb3f66a043a3bc8e3cf2d35ccd62815 | [
"Unlicense"
] | 4 | 2020-05-14T22:27:08.000Z | 2021-07-23T18:56:04.000Z | tools/obfuscator.py | anima-libera/ports | 782ea3291eb3f66a043a3bc8e3cf2d35ccd62815 | [
"Unlicense"
] | null | null | null | tools/obfuscator.py | anima-libera/ports | 782ea3291eb3f66a043a3bc8e3cf2d35ccd62815 | [
"Unlicense"
] | 1 | 2021-05-14T09:33:07.000Z | 2021-05-14T09:33:07.000Z |
""" TODO
Please note that this is clearly unoptimized because who cares
"""
import re
from random import choice
SPECIAL_NAMES = ["o", "o0", "o1", "of", "os", "sa", "ia", "ir"]
NAME_CHARS = "".join([chr(n) for n in range(ord("a"), ord("z")+1)]+[str(i) for i in range(10)])
generated_names = {}
def _generate_name(n):
... | 26.710526 | 95 | 0.639409 |
795a24629fe51b30acec07a3e96efc920f1bc25e | 3,500 | py | Python | test_pyramids/test_code_quality.py | leomauro/pyramids | 4f7a8e97e13a5ee0b037dc528e5ba72f31ac36e5 | [
"MIT"
] | 9 | 2015-09-04T22:33:40.000Z | 2019-04-11T14:05:11.000Z | test_pyramids/test_code_quality.py | leomauro/pyramids | 4f7a8e97e13a5ee0b037dc528e5ba72f31ac36e5 | [
"MIT"
] | 2 | 2015-09-04T22:31:44.000Z | 2017-07-29T04:11:53.000Z | test_pyramids/test_code_quality.py | hosford42/pyramids | 4f7a8e97e13a5ee0b037dc528e5ba72f31ac36e5 | [
"MIT"
] | 3 | 2015-10-14T12:41:26.000Z | 2022-01-08T19:43:47.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Tests to ensure code quality standards are met."""
import os
from pylama.main import check_path, parse_options
ERROR_TYPE_MAP = {
'W': 'Warning',
'D': 'Documentation',
'E': 'Code Checker Error',
'C': 'Coding Style',
'R': 'Code Complexity',
}
PYL... | 32.71028 | 96 | 0.584 |
795a439eb05239c6ac408caceb0f4368efa46369 | 7,640 | py | Python | demisto_sdk/commands/lint/tests/test_linter/docker_runner_test.py | yalonso7/demisto-sdk | 4b832078cdadb0b604a064532975e8be68ac726a | [
"MIT"
] | null | null | null | demisto_sdk/commands/lint/tests/test_linter/docker_runner_test.py | yalonso7/demisto-sdk | 4b832078cdadb0b604a064532975e8be68ac726a | [
"MIT"
] | null | null | null | demisto_sdk/commands/lint/tests/test_linter/docker_runner_test.py | yalonso7/demisto-sdk | 4b832078cdadb0b604a064532975e8be68ac726a | [
"MIT"
] | null | null | null | from unittest.mock import DEFAULT
import pytest
from demisto_sdk.commands.common.constants import TYPE_PWSH, TYPE_PYTHON
from demisto_sdk.commands.lint import linter
from demisto_sdk.commands.lint.linter import Linter
class TestCreateImage:
def test_build_image_no_errors(self, linter_obj: Linter, demisto_content... | 50.263158 | 123 | 0.593717 |
795a5447e3fec1af3fad27c2fc3b53d312f894f3 | 96 | py | Python | src/robots/concurrency/signals.py | severin-lemaignan/pyrobots | d5dd3bd54375e85802de7225556ad519b8b4e89d | [
"0BSD"
] | 11 | 2017-03-06T17:19:59.000Z | 2021-11-04T07:45:33.000Z | src/robots/concurrency/signals.py | severin-lemaignan/pyrobots | d5dd3bd54375e85802de7225556ad519b8b4e89d | [
"0BSD"
] | 2 | 2018-08-18T12:43:47.000Z | 2019-04-23T13:03:26.000Z | src/robots/concurrency/signals.py | severin-lemaignan/pyrobots | d5dd3bd54375e85802de7225556ad519b8b4e89d | [
"0BSD"
] | 3 | 2018-04-24T10:25:53.000Z | 2021-08-25T04:34:35.000Z | # coding=utf-8
class ActionCancelled(UserWarning): pass
class ActionPaused(UserWarning): pass
| 16 | 40 | 0.802083 |
795a60efe41d4cf2010b80549736f97b27549fe9 | 17,815 | py | Python | xd_xd/aa/road_networks/wkt_to_graph.py | SpaceNetChallenge/SpaceNet_Optimized_Routing_Solutions | 3fbc215de6b05904a5b54b2c7cde7e61074ae38d | [
"Apache-2.0"
] | 27 | 2020-03-04T05:54:48.000Z | 2022-01-05T07:07:44.000Z | xd_xd/aa/road_networks/wkt_to_graph.py | CosmiQ/SpaceNet_Optimized_Routing_Solutions | 3fbc215de6b05904a5b54b2c7cde7e61074ae38d | [
"Apache-2.0"
] | 1 | 2020-07-14T10:35:50.000Z | 2020-07-14T10:35:50.000Z | xd_xd/aa/road_networks/wkt_to_graph.py | SpaceNetChallenge/SpaceNet_Optimized_Routing_Solutions | 3fbc215de6b05904a5b54b2c7cde7e61074ae38d | [
"Apache-2.0"
] | 7 | 2020-03-07T21:42:57.000Z | 2022-01-07T10:49:50.000Z | import os
import time
import utm
import numpy as np
import networkx as nx
import osmnx as ox
import shapely
from shapely.geometry import mapping, Point, LineString
from osgeo import gdal, ogr, osr
import matplotlib.pyplot as plt
def wkt_to_graph(wkt_list, im_file, conf, out_graph_file):
min_subgraph_length_pix =... | 35.347222 | 118 | 0.554701 |
795a7a9cbf7ba6dcb3fcbd2b582abb24de74f26d | 2,090 | py | Python | voltcycle/peak_detection_fxn.py | MariaPoliti/voltcycle | cc67ae91103ac6bdc0c7995834865d8bcb176ec3 | [
"MIT"
] | null | null | null | voltcycle/peak_detection_fxn.py | MariaPoliti/voltcycle | cc67ae91103ac6bdc0c7995834865d8bcb176ec3 | [
"MIT"
] | null | null | null | voltcycle/peak_detection_fxn.py | MariaPoliti/voltcycle | cc67ae91103ac6bdc0c7995834865d8bcb176ec3 | [
"MIT"
] | null | null | null | """This module contains a function to determine the peaks in the specified
dataset, based on the y values (or current values). The function takes in the
specified y column of the dataframe and outputs a list consisting of the index
values of the peaks. This module calls the peakutils and numpy packages along
with t... | 39.433962 | 79 | 0.675598 |
795aa67248f66e72f8f772845c4ca5b2b1b06d3d | 42,643 | py | Python | tensorflow/python/kernel_tests/init_ops_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/python/kernel_tests/init_ops_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/python/kernel_tests/init_ops_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 26 | 2017-04-12T16:25:44.000Z | 2018-10-30T10:10:15.000Z | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 39.484259 | 80 | 0.658373 |
795add9de97acb060ac955484d90adbe7221684b | 2,132 | py | Python | mdrsl/rule_generation/association_rule_mining/apyori_impl/apyori_utils.py | joschout/Multi-Directional-Rule-Set-Learning | ef0620b115f4e0fd7fba3e752d238a8020c1ca6b | [
"Apache-2.0"
] | 3 | 2020-08-03T19:25:44.000Z | 2021-06-27T22:25:55.000Z | mdrsl/rule_generation/association_rule_mining/apyori_impl/apyori_utils.py | joschout/Multi-Directional-Rule-Set-Learning | ef0620b115f4e0fd7fba3e752d238a8020c1ca6b | [
"Apache-2.0"
] | null | null | null | mdrsl/rule_generation/association_rule_mining/apyori_impl/apyori_utils.py | joschout/Multi-Directional-Rule-Set-Learning | ef0620b115f4e0fd7fba3e752d238a8020c1ca6b | [
"Apache-2.0"
] | 2 | 2020-08-07T22:54:28.000Z | 2021-02-18T06:11:01.000Z | try:
from rule_generation.association_rule_mining.apyori_impl.apyori import RelationRecord
except ModuleNotFoundError:
from collections import namedtuple
# Ignore name errors because these names are namedtuples.
SupportRecord = namedtuple( # pylint: disable=C0103
'SupportRecord', ('items', 'su... | 42.64 | 154 | 0.719043 |
795adfca4c63aa2eb9d1ede5987e4d38cb030f2a | 8,248 | py | Python | tests/util_test.py | shouldsee/cathpy | 5f7fa1322434b2d254f0158c5840f029b12dbafe | [
"MIT"
] | null | null | null | tests/util_test.py | shouldsee/cathpy | 5f7fa1322434b2d254f0158c5840f029b12dbafe | [
"MIT"
] | null | null | null | tests/util_test.py | shouldsee/cathpy | 5f7fa1322434b2d254f0158c5840f029b12dbafe | [
"MIT"
] | null | null | null | import logging
import difflib
import os
import tempfile
from cathpy.core import error as err
from cathpy.core.util import (StructuralClusterMerger,
AlignmentSummaryRunner, GroupsimRunner, GroupsimResult, )
from cathpy.core.datafiles import ReleaseDir
from cathpy.core.align import Align
fr... | 39.090047 | 140 | 0.610936 |
795af4d864995ffc8fae39868fb4eb2dfaeab3d0 | 332 | py | Python | colcon_export_command/xml/models/__init__.py | maciejmatuszak/colcon-export-command | a7747996cbff25d8611306a9c1987cea3966271e | [
"Apache-2.0"
] | null | null | null | colcon_export_command/xml/models/__init__.py | maciejmatuszak/colcon-export-command | a7747996cbff25d8611306a9c1987cea3966271e | [
"Apache-2.0"
] | null | null | null | colcon_export_command/xml/models/__init__.py | maciejmatuszak/colcon-export-command | a7747996cbff25d8611306a9c1987cea3966271e | [
"Apache-2.0"
] | null | null | null | from colcon_export_command.xml.models.project import (
AdditionalGenerationEnvironment,
Component,
Configuration,
Configurations,
Env,
Envs,
Project,
)
__all__ = [
"AdditionalGenerationEnvironment",
"Component",
"Configuration",
"Configurations",
"Env",
"Envs",
"... | 16.6 | 54 | 0.650602 |
795b0e6463003f117e5ba7b41bb1d6b644eb27f0 | 1,819 | py | Python | cvrf2csaf/section_handlers/notes.py | sthagen/csaf-tools-CVRF-CSAF-Converter | bc458eb1a71cf12c5a7c45223b56ab233819bdbd | [
"Apache-2.0",
"MIT"
] | 9 | 2021-12-07T07:52:28.000Z | 2022-03-23T10:26:25.000Z | cvrf2csaf/section_handlers/notes.py | sthagen/csaf-tools-CVRF-CSAF-Converter | bc458eb1a71cf12c5a7c45223b56ab233819bdbd | [
"Apache-2.0",
"MIT"
] | 71 | 2021-12-03T09:40:56.000Z | 2022-03-29T21:47:38.000Z | cvrf2csaf/section_handlers/notes.py | sthagen/csaf-tools-CVRF-CSAF-Converter | bc458eb1a71cf12c5a7c45223b56ab233819bdbd | [
"Apache-2.0",
"MIT"
] | 3 | 2021-12-07T07:52:32.000Z | 2022-02-17T09:55:00.000Z | """ Module containing Notes class """
import logging
from ..common.common import SectionHandler
# pylint: disable=too-few-public-methods
class Notes(SectionHandler):
""" Responsible for converting the Notes sections:
- /cvrf:cvrfdoc/cvrf:DocumentNotes
- /cvrf:cvrfdoc/vuln:Vulnerability[i+1]/vuln:Notes... | 30.316667 | 96 | 0.573392 |
795b1dc32390651b8746d673af2715884a2d87f0 | 14,975 | py | Python | tests/endpoints/test_operations_log.py | nvllsvm/imbi-api | 1a5bd8894ac14c1026f33297994aa10782b0eea0 | [
"BSD-3-Clause"
] | 1 | 2021-06-23T18:34:47.000Z | 2021-06-23T18:34:47.000Z | tests/endpoints/test_operations_log.py | nvllsvm/imbi-api | 1a5bd8894ac14c1026f33297994aa10782b0eea0 | [
"BSD-3-Clause"
] | null | null | null | tests/endpoints/test_operations_log.py | nvllsvm/imbi-api | 1a5bd8894ac14c1026f33297994aa10782b0eea0 | [
"BSD-3-Clause"
] | 2 | 2022-02-11T22:06:18.000Z | 2022-02-21T19:35:06.000Z | import json
import uuid
import jsonpatch
from ietfparse import headers
from imbi.endpoints import operations_log
from tests import base
class AsyncHTTPTestCase(base.TestCaseWithReset):
ADMIN_ACCESS = True
TRUNCATE_TABLES = [
'v1.operations_log',
'v1.projects',
'v1.project_types',
... | 40.472973 | 76 | 0.581436 |
795b2e107bab2c3e259eb802f1be884b98b72ddc | 6,713 | py | Python | qiskit/optimization/converters/quadratic_program_to_qubo.py | tsura-crisaldo/qiskit-aqua | 2b4a70bb24a9170c3735124536dce1d7ffe4ed67 | [
"Apache-2.0"
] | 1 | 2020-08-01T21:07:54.000Z | 2020-08-01T21:07:54.000Z | qiskit/optimization/converters/quadratic_program_to_qubo.py | tsura-crisaldo/qiskit-aqua | 2b4a70bb24a9170c3735124536dce1d7ffe4ed67 | [
"Apache-2.0"
] | null | null | null | qiskit/optimization/converters/quadratic_program_to_qubo.py | tsura-crisaldo/qiskit-aqua | 2b4a70bb24a9170c3735124536dce1d7ffe4ed67 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2020.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modif... | 39.488235 | 100 | 0.669149 |
795b3d8a9657176ee00f2326b70da14b9ab57851 | 9,197 | py | Python | mitmproxy/tools/console/statusbar.py | takeratta/mitmproxy | 569d275d763f499cce9673fcf118dcc8d59d2eeb | [
"MIT"
] | null | null | null | mitmproxy/tools/console/statusbar.py | takeratta/mitmproxy | 569d275d763f499cce9673fcf118dcc8d59d2eeb | [
"MIT"
] | null | null | null | mitmproxy/tools/console/statusbar.py | takeratta/mitmproxy | 569d275d763f499cce9673fcf118dcc8d59d2eeb | [
"MIT"
] | null | null | null | import os.path
import urwid
from mitmproxy.tools.console import common
from mitmproxy.tools.console import signals
from mitmproxy.tools.console import commandeditor
import mitmproxy.tools.console.master # noqa
class PromptPath:
def __init__(self, callback, args):
self.callback, self.args = callback, arg... | 33.322464 | 83 | 0.561814 |
795bd48bc7737504b56fff80d7d6dddc57147c85 | 5,413 | py | Python | Final Exam/Q2/mdp.py | billgoo/Rutgers-CS520-Intro-to-AI | e3c67af8a1d0efdec763b4415962150563c9431c | [
"MIT"
] | null | null | null | Final Exam/Q2/mdp.py | billgoo/Rutgers-CS520-Intro-to-AI | e3c67af8a1d0efdec763b4415962150563c9431c | [
"MIT"
] | null | null | null | Final Exam/Q2/mdp.py | billgoo/Rutgers-CS520-Intro-to-AI | e3c67af8a1d0efdec763b4415962150563c9431c | [
"MIT"
] | 1 | 2021-05-03T05:24:57.000Z | 2021-05-03T05:24:57.000Z | from utils import *
import numpy as np
class MDP:
"""A Markov Decision Process, defined by an initial state, transition model,
and reward function. We also keep track of a beta value, for use by
algorithms. The transition model is represented somewhat differently from
the text. Instead of T(s, a, s')... | 32.220238 | 83 | 0.546277 |
795bd63e02fee89dfefc76ba95b83fc3b2c72200 | 979 | py | Python | modelscript/metamodels/classes/checkers.py | ScribesZone/ModelScribes | a36be1047283f2e470dc2dd4353f2a714377bb7d | [
"MIT"
] | 1 | 2019-02-22T14:27:06.000Z | 2019-02-22T14:27:06.000Z | modelscript/metamodels/classes/checkers.py | ScribesZone/ModelScribes | a36be1047283f2e470dc2dd4353f2a714377bb7d | [
"MIT"
] | 4 | 2015-12-18T10:30:02.000Z | 2015-12-18T10:36:28.000Z | modelscript/metamodels/classes/checkers.py | ScribesZone/ModelScribes | a36be1047283f2e470dc2dd4353f2a714377bb7d | [
"MIT"
] | null | null | null | # coding=utf-8
from modelscript.megamodels.checkers import NamingChecker
from modelscript.base.issues import (
Levels
)
from modelscript.base .symbols import Symbol
from modelscript.metamodels.classes.classes import (
Class)
from modelscript.metamodels.classes.types import EnumerationLiteral
class ClassNome... | 26.459459 | 67 | 0.705822 |
795bd7fd9d77a6e1a37303eaa16c80f3f551aa46 | 1,889 | py | Python | spydrnet/ir/innerpin.py | chgentso/spydrnet | 2cfc33ae367771cd2f3a15f240ebd0ec76841b5f | [
"BSD-3-Clause"
] | 34 | 2020-03-12T15:40:49.000Z | 2022-02-28T07:13:47.000Z | spydrnet/ir/innerpin.py | chgentso/spydrnet | 2cfc33ae367771cd2f3a15f240ebd0ec76841b5f | [
"BSD-3-Clause"
] | 104 | 2020-01-06T20:32:19.000Z | 2022-01-02T00:20:14.000Z | spydrnet/ir/innerpin.py | chgentso/spydrnet | 2cfc33ae367771cd2f3a15f240ebd0ec76841b5f | [
"BSD-3-Clause"
] | 10 | 2020-09-02T20:24:00.000Z | 2022-02-24T16:10:07.000Z | from spydrnet.ir.pin import Pin
from copy import deepcopy, copy, error
class InnerPin(Pin):
"""Pins that correspond to definitions.
These pins can be thought of as on the inside of a definition. There can be
many outer pins for each inner pin
"""
__slots__ = ['_port']
def __init__(self):
... | 32.016949 | 138 | 0.634198 |
795bec9dab858cf6a975825d777a40f41329b5b6 | 2,634 | py | Python | setup.py | nithyanandan/AstroUtils | 97473f52d4247bb9c8507598899215d0662e8d6f | [
"MIT"
] | 1 | 2018-10-31T03:49:39.000Z | 2018-10-31T03:49:39.000Z | setup.py | nithyanandan/AstroUtils | 97473f52d4247bb9c8507598899215d0662e8d6f | [
"MIT"
] | 5 | 2017-11-18T01:45:50.000Z | 2020-05-30T12:26:50.000Z | setup.py | nithyanandan/AstroUtils | 97473f52d4247bb9c8507598899215d0662e8d6f | [
"MIT"
] | 1 | 2019-10-14T08:44:40.000Z | 2019-10-14T08:44:40.000Z | import setuptools, re, glob, os
from setuptools import setup, find_packages
from subprocess import Popen, PIPE
githash = 'unknown'
if os.path.isdir(os.path.dirname(os.path.abspath(__file__))+'/.git'):
try:
gitproc = Popen(['git', 'rev-parse', 'HEAD'], stdout = PIPE)
githash = gitproc.communicate()[... | 44.644068 | 102 | 0.572893 |
795bf5b3a183c6908807d95c7fca88b8de2146d4 | 4,435 | py | Python | napari/_qt/qt_chunk_receiver.py | mkitti/napari | 4e954d30b5a1b70c5e495db1b8f48a3bdda1ff86 | [
"BSD-3-Clause"
] | null | null | null | napari/_qt/qt_chunk_receiver.py | mkitti/napari | 4e954d30b5a1b70c5e495db1b8f48a3bdda1ff86 | [
"BSD-3-Clause"
] | null | null | null | napari/_qt/qt_chunk_receiver.py | mkitti/napari | 4e954d30b5a1b70c5e495db1b8f48a3bdda1ff86 | [
"BSD-3-Clause"
] | null | null | null | """QtChunkReceiver and QtGuiEvent classes.
"""
import logging
from qtpy.QtCore import QObject, Signal
from ..components.chunk import chunk_loader
from ..utils.events import EmitterGroup, Event, EventEmitter
LOGGER = logging.getLogger('napari.async')
class QtGuiEvent(QObject):
"""Fires an event in the GUI threa... | 32.137681 | 80 | 0.67283 |
795c05e5afe0fc6b291eb748bd54f011a91bbf5a | 70 | py | Python | indecisive/game/client/scenes/util/__init__.py | markjoshua12/game-jam-2020 | 846dd052d649a609ab7a52ac0f4dcbeb71781c3b | [
"MIT"
] | 15 | 2020-04-17T12:02:14.000Z | 2022-03-16T03:01:34.000Z | indecisive/game/client/scenes/util/__init__.py | markjoshua12/game-jam-2020 | 846dd052d649a609ab7a52ac0f4dcbeb71781c3b | [
"MIT"
] | 9 | 2020-04-25T01:57:16.000Z | 2020-04-29T11:42:34.000Z | indecisive/game/client/scenes/util/__init__.py | markjoshua12/game-jam-2020 | 846dd052d649a609ab7a52ac0f4dcbeb71781c3b | [
"MIT"
] | 55 | 2020-04-17T12:01:11.000Z | 2021-12-28T10:14:02.000Z | from . colours import *
from . keys import *
from . elements import *
| 17.5 | 24 | 0.7 |
795c0eb880187aabb4dd0e66d57a3bca0d18866d | 20,529 | py | Python | katcp/test/test_sampling.py | MESAProductSolutions/katcp-python-rta | 54cbf1c9530035b1eff6fe2b04b4c307aaac4d1d | [
"BSD-3-Clause"
] | null | null | null | katcp/test/test_sampling.py | MESAProductSolutions/katcp-python-rta | 54cbf1c9530035b1eff6fe2b04b4c307aaac4d1d | [
"BSD-3-Clause"
] | null | null | null | katcp/test/test_sampling.py | MESAProductSolutions/katcp-python-rta | 54cbf1c9530035b1eff6fe2b04b4c307aaac4d1d | [
"BSD-3-Clause"
] | null | null | null | # test_sampling.py
# -*- coding: utf8 -*-
# vim:fileencoding=utf8 ai ts=4 sts=4 et sw=4
# Copyright 2009 SKA South Africa (http://ska.ac.za/)
# BSD license - see COPYING for details
"""Tests for the katcp.sampling module.
"""
import unittest2 as unittest
import threading
import time
import logging
import katcp
imp... | 36.463588 | 85 | 0.622047 |
795c4e40f5affc951fe0dd4ac3fd094d4ffb213c | 46,935 | py | Python | client/isolate.py | stefb965/luci-py | e0a8a5640c4104e5c90781d833168aa8a8d1f24d | [
"Apache-2.0"
] | 1 | 2019-04-25T17:50:34.000Z | 2019-04-25T17:50:34.000Z | client/isolate.py | stefb965/luci-py | e0a8a5640c4104e5c90781d833168aa8a8d1f24d | [
"Apache-2.0"
] | null | null | null | client/isolate.py | stefb965/luci-py | e0a8a5640c4104e5c90781d833168aa8a8d1f24d | [
"Apache-2.0"
] | 1 | 2020-07-05T19:54:40.000Z | 2020-07-05T19:54:40.000Z | #!/usr/bin/env python
# Copyright 2012 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.
"""Front end tool to operate on .isolate files.
This includes creating, merging or compiling them to generate a .isolated f... | 37.942603 | 113 | 0.703654 |
795c5cc631f00375a27f784611616ef675d75412 | 4,289 | py | Python | mangopay/tasks.py | sladinji/blousebrothers | 461de3ba011c0aaed3f0014136c4497b6890d086 | [
"MIT"
] | 1 | 2022-01-27T11:58:10.000Z | 2022-01-27T11:58:10.000Z | mangopay/tasks.py | sladinji/blousebrothers | 461de3ba011c0aaed3f0014136c4497b6890d086 | [
"MIT"
] | 5 | 2021-03-19T00:01:54.000Z | 2022-03-11T23:46:21.000Z | mangopay/tasks.py | sladinji/blousebrothers | 461de3ba011c0aaed3f0014136c4497b6890d086 | [
"MIT"
] | null | null | null | from datetime import datetime, timedelta
from django.conf import settings
from celery.task import task
from celery.task import PeriodicTask
from celery.schedules import crontab
from celery.utils.log import get_task_logger
from mangopaysdk.types.exceptions.responseexception import ResponseException
from .constants im... | 32.007463 | 81 | 0.691303 |
795c855d60b77e20c876cacec9a8091a695ddc63 | 258 | py | Python | plugins/giveaways/requirements/__init__.py | Friskytool/command-handler | 2c0c7eecc8afe7898650dfc69d1c8816448c2480 | [
"MIT"
] | null | null | null | plugins/giveaways/requirements/__init__.py | Friskytool/command-handler | 2c0c7eecc8afe7898650dfc69d1c8816448c2480 | [
"MIT"
] | 4 | 2021-12-10T06:18:12.000Z | 2022-03-24T14:43:57.000Z | plugins/giveaways/requirements/__init__.py | Friskytool/command-handler | 2c0c7eecc8afe7898650dfc69d1c8816448c2480 | [
"MIT"
] | null | null | null | from .lottery import Lottery
from .roles import Role, Bypass, Blacklist
from .amari import Amari
from .mee6 import Mee6
from .boost import Boost
def setup(bot):
for req in [Role, Bypass, Blacklist, Amari, Mee6, Boost, Lottery]:
req.inject(bot)
| 23.454545 | 70 | 0.724806 |
795c94502eb9cae73667bf4233714e1c7478e0d2 | 3,261 | py | Python | dnacentersdk/models/validators/v2_1_2/jsd_d6b8ca774739adf4.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | dnacentersdk/models/validators/v2_1_2/jsd_d6b8ca774739adf4.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | dnacentersdk/models/validators/v2_1_2/jsd_d6b8ca774739adf4.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""DNA Center Run read-only commands on devices data model.
Copyright (c) 2019-2020 Cisco and/or its affiliates.
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 re... | 30.194444 | 78 | 0.513033 |
795c99e0f0595538a34cde72c46a8b16fd984e98 | 2,900 | py | Python | master/Impractical_Python_Projects-master/Impractical_Python_Projects-master/Chapter_13/practice_45.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 4 | 2018-09-07T15:35:24.000Z | 2019-03-27T09:48:12.000Z | master/Impractical_Python_Projects-master/Impractical_Python_Projects-master/Chapter_13/practice_45.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 371 | 2020-03-04T21:51:56.000Z | 2022-03-31T20:59:11.000Z | master/Impractical_Python_Projects-master/Impractical_Python_Projects-master/Chapter_13/practice_45.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 3 | 2019-06-18T19:57:17.000Z | 2020-11-06T03:55:08.000Z | import sys
import math
import random
import pygame as pg
pg.init() # initialize pygame
# define color table
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
LT_GRAY = (180, 180, 180)
GRAY = (120, 120, 120)
DK_GRAY = (80, 80, 80)
class Particle(pg.sprite.Sprite):
"""Builds ejecta particles for volcano simulation.""... | 29.896907 | 79 | 0.575517 |
795cc70a1675dacd1651e0f3e66b196b9cb587c0 | 26,615 | py | Python | nicos/devices/generic/sequence.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 12 | 2019-11-06T15:40:36.000Z | 2022-01-01T16:23:00.000Z | nicos/devices/generic/sequence.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 4 | 2019-11-08T10:18:16.000Z | 2021-01-13T13:07:29.000Z | nicos/devices/generic/sequence.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 6 | 2020-01-11T10:52:30.000Z | 2022-02-25T12:35:23.000Z | # -*- coding: utf-8 -*-
# *****************************************************************************
# NICOS, the Networked Instrument Control System of the MLZ
# Copyright (c) 2009-2021 by the NICOS contributors (see AUTHORS)
#
# This program is free software; you can redistribute it and/or modify it under
# the t... | 35.724832 | 80 | 0.568101 |
795cf6542c505ca5817e5e72d28cd85381917ece | 78 | py | Python | assertion.py | godontop/python-work | ea22e0df8b0b17605f5a434e556a388d1f75aa47 | [
"MIT"
] | null | null | null | assertion.py | godontop/python-work | ea22e0df8b0b17605f5a434e556a388d1f75aa47 | [
"MIT"
] | null | null | null | assertion.py | godontop/python-work | ea22e0df8b0b17605f5a434e556a388d1f75aa47 | [
"MIT"
] | null | null | null | print(0)
assert "h" != "w"
print(1)
assert False
print(2)
assert True
print(3) | 11.142857 | 17 | 0.679487 |
795d0f5533d4ed9c570bbbea8458d86e5cc040ba | 861 | py | Python | test/BribeNet/graph/generation/test_weightedGenerator.py | RobMurray98/BribeNet | 09ddd8f15d9ab5fac44ae516ed92c6ba5e5119bc | [
"MIT"
] | null | null | null | test/BribeNet/graph/generation/test_weightedGenerator.py | RobMurray98/BribeNet | 09ddd8f15d9ab5fac44ae516ed92c6ba5e5119bc | [
"MIT"
] | null | null | null | test/BribeNet/graph/generation/test_weightedGenerator.py | RobMurray98/BribeNet | 09ddd8f15d9ab5fac44ae516ed92c6ba5e5119bc | [
"MIT"
] | null | null | null | from unittest import TestCase
from BribeNet.graph.generation.flatWeightGenerator import FlatWeightedGraphGenerator
from BribeNet.graph.generation import GraphGeneratorAlgo
class TestFlatWeightedGraphGenerator(TestCase):
def test_generate_ws(self):
graph_gen = FlatWeightedGraphGenerator(GraphGeneratorAlgo... | 39.136364 | 98 | 0.75029 |
795d41358b20cebf9d4077ba0261b1cb0b42f6e1 | 2,041 | py | Python | src/falcon_management/manager.py | chris-cmsoft/falcon-management | 4299f450cfc2513e3bd4aa63677d26e287fbe61b | [
"MIT"
] | 1 | 2019-03-11T14:22:46.000Z | 2019-03-11T14:22:46.000Z | src/falcon_management/manager.py | chris-cmsoft/falcon-management | 4299f450cfc2513e3bd4aa63677d26e287fbe61b | [
"MIT"
] | null | null | null | src/falcon_management/manager.py | chris-cmsoft/falcon-management | 4299f450cfc2513e3bd4aa63677d26e287fbe61b | [
"MIT"
] | null | null | null | import sys
from .exceptions import \
NoCommandSpecified, \
CommandNotFound, \
CommandFailed
from .logger import error
class CommandManager():
def __init__(self, commands: dict = None):
if not commands:
commands = dict()
self.commands = commands
def execute(self):
... | 28.347222 | 72 | 0.561489 |
795d6e4368b96c668c1f2c943fccc6e6bbf0a7b6 | 13,668 | py | Python | src/edeposit/amqp/rest/database/status_handler.py | edeposit/edeposit.rest | ecb1c00f7c156e1ed2000a0b68a3e4da506e7992 | [
"MIT"
] | 1 | 2015-12-10T13:30:22.000Z | 2015-12-10T13:30:22.000Z | src/edeposit/amqp/rest/database/status_handler.py | edeposit/edeposit.rest | ecb1c00f7c156e1ed2000a0b68a3e4da506e7992 | [
"MIT"
] | 33 | 2015-10-06T16:02:13.000Z | 2015-12-10T15:00:04.000Z | src/edeposit/amqp/rest/database/status_handler.py | edeposit/edeposit.rest | ecb1c00f7c156e1ed2000a0b68a3e4da506e7992 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# Interpreter version: python 2.7
#
# Imports =====================================================================
import time
import random
from functools import total_ordering
import transaction
from persistent import Persistent
from BTrees.OOBTree import OOSet
from... | 31.42069 | 79 | 0.578139 |
795d8372cd26271a5ea0835e69a24f638fc2b0dd | 2,280 | py | Python | components/google-cloud/tests/container/experimental/gcp_launcher/utils/test_artifact_util.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 2,860 | 2018-05-24T04:55:01.000Z | 2022-03-31T13:49:56.000Z | components/google-cloud/tests/container/experimental/gcp_launcher/utils/test_artifact_util.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 7,331 | 2018-05-16T09:03:26.000Z | 2022-03-31T23:22:04.000Z | components/google-cloud/tests/container/experimental/gcp_launcher/utils/test_artifact_util.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 1,359 | 2018-05-15T11:05:41.000Z | 2022-03-31T09:42:09.000Z | # Copyright 2021 The Kubeflow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | 44.705882 | 207 | 0.712719 |
795da7bdd8c7bac2bef44090295f40680b7524f4 | 1,387 | py | Python | setup.py | srossross/uvio | f4d55ad5ea5900a2a8b9c1249484ed621dc30055 | [
"MIT"
] | 3 | 2016-03-23T08:12:03.000Z | 2018-10-06T02:46:54.000Z | setup.py | srossross/uvio | f4d55ad5ea5900a2a8b9c1249484ed621dc30055 | [
"MIT"
] | null | null | null | setup.py | srossross/uvio | f4d55ad5ea5900a2a8b9c1249484ed621dc30055 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
from Cython.Build import cythonize
from distutils.extension import Extension
import versioneer
import sys
import os
include_dirs = [os.path.join(sys.prefix, "include")]
library_dirs = [os.path.join(sys.prefix, "lib")]
libraries = ["uv"]
kwargs = {
'include_dirs': include... | 31.522727 | 62 | 0.682769 |
795dd2f2220171d65b48466f851ead2abe1ac163 | 929 | py | Python | oscar/lib/python2.7/site-packages/phonenumber_field/formfields.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/phonenumber_field/formfields.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/phonenumber_field/formfields.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.core.exceptions import ValidationError
from django.forms.fields import CharField
from django.utils.translation import ugettext_lazy as _
from phonenumber_field.phonenumber import to_python
from phonenumber_field.validators import va... | 33.178571 | 76 | 0.719053 |
795ddd5184727d5f04ed371c448a3dbd0095f6dd | 968 | py | Python | src/cfiddle/Exceptions.py | NVSL/fiddle | 5edffa92caa0894057a449ad5accb23af748e657 | [
"MIT"
] | 2 | 2022-01-22T06:12:52.000Z | 2022-01-24T07:29:44.000Z | src/cfiddle/Exceptions.py | NVSL/cfiddle | 5edffa92caa0894057a449ad5accb23af748e657 | [
"MIT"
] | null | null | null | src/cfiddle/Exceptions.py | NVSL/cfiddle | 5edffa92caa0894057a449ad5accb23af748e657 | [
"MIT"
] | null | null | null | from functools import wraps
from click import secho
class CFiddleException(Exception):
pass
def handle_cfiddle_exceptions(f):
from .config import in_debug, get_config
@wraps(f)
def wrapped(*argc, **kwargs):
try:
return f(*argc, **kwargs)
except CFiddleException as e:
... | 27.657143 | 125 | 0.520661 |
795dde6acb55553b1f0205b417742873e5eda339 | 516 | py | Python | Backend/parser/setup.py | nemkrisz11/Computer-Security-Homework-2021-SHAjt | f60d81b38e1c82a1618e7d83179b36318905d00c | [
"Apache-2.0"
] | null | null | null | Backend/parser/setup.py | nemkrisz11/Computer-Security-Homework-2021-SHAjt | f60d81b38e1c82a1618e7d83179b36318905d00c | [
"Apache-2.0"
] | 56 | 2021-10-01T13:31:21.000Z | 2021-12-03T09:58:04.000Z | Backend/parser/setup.py | nemkrisz11/Computer-Security-Homework-2021-SHAjt | f60d81b38e1c82a1618e7d83179b36318905d00c | [
"Apache-2.0"
] | null | null | null | import sys
from pybind11 import get_cmake_dir
# Available at setup time due to pyproject.toml
from pybind11.setup_helpers import Pybind11Extension, build_ext
from setuptools import setup
ext_modules = [
Pybind11Extension("caffparser",
["pybind11_wrapper.cpp", "src/CaffParser.cpp", "src/CiffParser.cpp"]
... | 24.571429 | 76 | 0.718992 |
795de5eb64d00b31b61807f7159647f6f2198be9 | 27,109 | py | Python | vplexapi-7.0.0/vplexapi/api/consistency_group_api.py | dell/python-vplex | 02c5df5e7f9ed61a13a2838f21ca6467a25dd392 | [
"Apache-2.0"
] | 3 | 2020-12-01T11:22:13.000Z | 2021-02-16T17:38:42.000Z | vplexapi-7.0.0/vplexapi/api/consistency_group_api.py | dell/python-vplex | 02c5df5e7f9ed61a13a2838f21ca6467a25dd392 | [
"Apache-2.0"
] | null | null | null | vplexapi-7.0.0/vplexapi/api/consistency_group_api.py | dell/python-vplex | 02c5df5e7f9ed61a13a2838f21ca6467a25dd392 | [
"Apache-2.0"
] | 3 | 2021-01-01T21:07:55.000Z | 2021-02-20T07:07:40.000Z | # coding: utf-8
"""
VPlex REST API
A definition for the next-gen VPlex API # noqa: E501
OpenAPI spec version: 0.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import re # noqa: F401
# python 2 and python 3 compatibility library... | 48.065603 | 350 | 0.645431 |
795dff62aac5d2678c16e824f63103ed4383bea9 | 400 | py | Python | trinity/extensibility/__init__.py | jin10086/py-evm | da04e8de42fdbf3bc5ca596f5f6b3d810c1afea8 | [
"MIT"
] | 5 | 2018-09-28T20:01:42.000Z | 2022-02-22T19:54:46.000Z | trinity/extensibility/__init__.py | jin10086/py-evm | da04e8de42fdbf3bc5ca596f5f6b3d810c1afea8 | [
"MIT"
] | null | null | null | trinity/extensibility/__init__.py | jin10086/py-evm | da04e8de42fdbf3bc5ca596f5f6b3d810c1afea8 | [
"MIT"
] | null | null | null | from trinity.extensibility.events import ( # noqa: F401
BaseEvent
)
from trinity.extensibility.plugin import ( # noqa: F401
BasePlugin,
BaseIsolatedPlugin,
DebugPlugin,
PluginContext,
PluginProcessScope,
)
from trinity.extensibility.plugin_manager import ( # noqa: F401
MainAndIsolatedProc... | 23.529412 | 64 | 0.74 |
795e14d0fe2bc8e9d56e1ad64ccef604b6c234df | 212 | py | Python | do_like_javac/tools/jprint.py | markro49/do-like-javac | 2bb345c9368347493b0fcf098f00e54594332a61 | [
"BSD-3-Clause-Clear",
"BSD-3-Clause"
] | 7 | 2016-03-16T17:21:05.000Z | 2020-08-25T11:57:51.000Z | do_like_javac/tools/jprint.py | markro49/do-like-javac | 2bb345c9368347493b0fcf098f00e54594332a61 | [
"BSD-3-Clause-Clear",
"BSD-3-Clause"
] | 9 | 2016-10-06T19:23:39.000Z | 2017-12-19T19:58:16.000Z | do_like_javac/tools/jprint.py | markro49/do-like-javac | 2bb345c9368347493b0fcf098f00e54594332a61 | [
"BSD-3-Clause-Clear",
"BSD-3-Clause"
] | 15 | 2016-04-20T20:46:52.000Z | 2020-12-16T10:13:39.000Z | import json
argparser = None
def run(args, javac_commands, jars):
print (json.dumps(
{
"javac_commands": javac_commands,
"jars": jars
},
indent = 2,
separators = (',', ': ')
));
| 15.142857 | 39 | 0.556604 |
795e20c31ff7f249e99ae3f5b7b1300402b2749d | 5,133 | py | Python | cisp/event.py | centrify/centrify-hparcsight-integration-sample | d18f2d35fba13a7941cc10a4c9790f071f49864f | [
"Apache-2.0"
] | 1 | 2021-03-17T16:42:46.000Z | 2021-03-17T16:42:46.000Z | cisp/event.py | centrify/centrify-hparcsight-integration-sample | d18f2d35fba13a7941cc10a4c9790f071f49864f | [
"Apache-2.0"
] | null | null | null | cisp/event.py | centrify/centrify-hparcsight-integration-sample | d18f2d35fba13a7941cc10a4c9790f071f49864f | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Centrify 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 License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 48.424528 | 127 | 0.552893 |
795e210ba0b5e1a5dcb445663a11bafaa142dc05 | 40,465 | py | Python | pyaci/core.py | camrossi/pyaci | c2148a5ab6f1d8b5923bf6ded258c9e3f48b6217 | [
"Apache-2.0"
] | 46 | 2016-10-21T20:25:26.000Z | 2022-02-06T13:47:35.000Z | pyaci/core.py | camrossi/pyaci | c2148a5ab6f1d8b5923bf6ded258c9e3f48b6217 | [
"Apache-2.0"
] | 39 | 2017-11-26T20:28:50.000Z | 2021-12-23T09:47:24.000Z | pyaci/core.py | camrossi/pyaci | c2148a5ab6f1d8b5923bf6ded258c9e3f48b6217 | [
"Apache-2.0"
] | 39 | 2016-10-21T21:19:43.000Z | 2022-01-11T16:47:30.000Z | # Copyright (c) 2014, 2015 Cisco Systems, Inc. All rights reserved.
"""
pyaci.core
~~~~~~~~~~~~~~~~~~~
This module contains the core classes of PyACI.
"""
from OpenSSL.crypto import FILETYPE_PEM, load_privatekey, sign
from collections import OrderedDict, defaultdict, deque
from lxml import etree
from requests import... | 33.525269 | 119 | 0.583294 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.