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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c8ee47f4a73232282b37ab53c9888f8ee5684780 | 363 | py | Python | oldstuff/python/pythonchallenge/4.py | bcherry/bcherry | 5d2f1144dbdbf35d6284018fa2c9e24ec5cecec6 | [
"MIT"
] | 3 | 2016-11-13T09:06:41.000Z | 2021-09-11T23:36:19.000Z | oldstuff/python/pythonchallenge/4.py | bcherry/bcherry | 5d2f1144dbdbf35d6284018fa2c9e24ec5cecec6 | [
"MIT"
] | null | null | null | oldstuff/python/pythonchallenge/4.py | bcherry/bcherry | 5d2f1144dbdbf35d6284018fa2c9e24ec5cecec6 | [
"MIT"
] | 2 | 2017-04-04T10:03:18.000Z | 2021-09-11T23:36:26.000Z | import urllib
import time
nothing = '46059'
for i in range(300):
url = "http://www.pythonchallenge.com/pc/def/linkedlist.php?nothing=%s" % nothing
print url
page = urllib.urlopen(url).read()
nothing = page.split()[-1]
if page.split()[:-1] != "and the next nothing is".split():
# akward senten... | 30.25 | 85 | 0.628099 |
c8ee4efeedc5c7ceb65b34fc9c547e03db4348b1 | 6,347 | py | Python | ui/materials.py | aditiapratama/blenderseed | 667af6742af4a2a4b94fbad1e0732dd56724afb1 | [
"MIT"
] | null | null | null | ui/materials.py | aditiapratama/blenderseed | 667af6742af4a2a4b94fbad1e0732dd56724afb1 | [
"MIT"
] | null | null | null | ui/materials.py | aditiapratama/blenderseed | 667af6742af4a2a4b94fbad1e0732dd56724afb1 | [
"MIT"
] | null | null | null | #
# This source file is part of appleseed.
# Visit https://appleseedhq.net/ for additional information and resources.
#
# This software is released under the MIT license.
#
# Copyright (c) 2019 Jonathan Dent, The appleseedhq Organization
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
#... | 34.494565 | 142 | 0.653852 |
c8ee5fb1080dba713c2ebbf8ed87140667a3ce06 | 735 | py | Python | easytorch/metrics/loss.py | sraashis/quenn | 4bc6b7aca7ed13bed3502d0d5f2ea1a4c839bb41 | [
"MIT"
] | 20 | 2020-07-30T16:46:57.000Z | 2021-12-11T21:24:19.000Z | easytorch/metrics/loss.py | sraashis/quenn | 4bc6b7aca7ed13bed3502d0d5f2ea1a4c839bb41 | [
"MIT"
] | 4 | 2020-12-13T15:03:28.000Z | 2022-03-12T00:59:06.000Z | easytorch/metrics/loss.py | sraashis/quenn | 4bc6b7aca7ed13bed3502d0d5f2ea1a4c839bb41 | [
"MIT"
] | 3 | 2021-06-06T00:23:01.000Z | 2021-11-08T14:21:13.000Z | def dice_loss_binary(outputs=None, target=None, beta=1, weights=None):
"""
:param weights: element-wise weights
:param outputs:
:param target:
:param beta: More beta, better precision. 1 is neutral
:return:
"""
from torch import min as tmin
smooth = 1.0
if weights is not None:
... | 31.956522 | 75 | 0.557823 |
c8ee6549499978cbe02da0ffec1ef1f321522e8b | 4,440 | py | Python | ufora/test/PerformanceTestReporter_test.py | ufora/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 571 | 2015-11-05T20:07:07.000Z | 2022-01-24T22:31:09.000Z | ufora/test/PerformanceTestReporter_test.py | timgates42/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 218 | 2015-11-05T20:37:55.000Z | 2021-05-30T03:53:50.000Z | ufora/test/PerformanceTestReporter_test.py | timgates42/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 40 | 2015-11-07T21:42:19.000Z | 2021-05-23T03:48:19.000Z | # Copyright 2015 Ufora Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 35.806452 | 89 | 0.624324 |
c8ee69e6f435787265a3d3eb10eeae4af2d894d9 | 64 | py | Python | tests/__init__.py | kamalm87/phenotype | 92ff1c3ec6b21cd540caf10880ef532270d85110 | [
"MIT"
] | null | null | null | tests/__init__.py | kamalm87/phenotype | 92ff1c3ec6b21cd540caf10880ef532270d85110 | [
"MIT"
] | null | null | null | tests/__init__.py | kamalm87/phenotype | 92ff1c3ec6b21cd540caf10880ef532270d85110 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Unit test package for phenotype."""
| 16 | 38 | 0.578125 |
c8ee6da717660ff37d7f06d64df9c67c1dd45a09 | 9,103 | py | Python | oauthenticator/comanage.py | bnl-sdcc/jupyterhub | 408afa2cbb5c04a482af05258cc9e9e57da7645c | [
"BSD-3-Clause"
] | null | null | null | oauthenticator/comanage.py | bnl-sdcc/jupyterhub | 408afa2cbb5c04a482af05258cc9e9e57da7645c | [
"BSD-3-Clause"
] | null | null | null | oauthenticator/comanage.py | bnl-sdcc/jupyterhub | 408afa2cbb5c04a482af05258cc9e9e57da7645c | [
"BSD-3-Clause"
] | 1 | 2019-10-24T20:46:39.000Z | 2019-10-24T20:46:39.000Z | """CILogon/COManage OAuthAuthenticator for JupyterHub
Derived from CILogon OAuthenticator. John Hover <jhover@bnl.gov>
Uses OAuth 2.0 with cilogon.org (override with CILOGON_HOST)
Adds in authorization control and Unix account generation using COManage group membership
and attributes.
Caveats:
- For user whitelist... | 35.146718 | 123 | 0.621773 |
c8ee7c5cba60fb5e617bdcef940c0dd6d4af4740 | 2,092 | py | Python | test/vanilla/legacy/AcceptanceTests/test_constants.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/vanilla/legacy/AcceptanceTests/test_constants.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/vanilla/legacy/AcceptanceTests/test_constants.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 1 | 2022-03-28T08:58:03.000Z | 2022-03-28T08:58:03.000Z | # --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the ""Software""), ... | 42.693878 | 84 | 0.705545 |
c8ee8e2b3e8178cdb0b6a5142036ccebe81786ef | 1,708 | py | Python | wbsv/archiver.py | yswallow/wbsv-cli | 30b68d0d1efd56fba99286d53470a39d317d6d9d | [
"MIT"
] | null | null | null | wbsv/archiver.py | yswallow/wbsv-cli | 30b68d0d1efd56fba99286d53470a39d317d6d9d | [
"MIT"
] | null | null | null | wbsv/archiver.py | yswallow/wbsv-cli | 30b68d0d1efd56fba99286d53470a39d317d6d9d | [
"MIT"
] | null | null | null | import time
from random import random, randint
from savepagenow import capture_or_cache
from savepagenow.api import WaybackRuntimeError
class AbstractArchiver():
def __init__(self):
"""initialize."""
self.save_count = 0
self.fail_count = 0
def parse_opt(self, opt):
self.retr... | 26.276923 | 70 | 0.553279 |
c8eed1e5471894a492e2e4e545ce59c1d00e3ea8 | 4,378 | py | Python | txdav/caldav/icalendardirectoryservice.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | 1 | 2017-02-18T19:22:19.000Z | 2017-02-18T19:22:19.000Z | txdav/caldav/icalendardirectoryservice.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | null | null | null | txdav/caldav/icalendardirectoryservice.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | null | null | null | ##
# Copyright (c) 2013-2015 Apple Inc. 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... | 30.615385 | 115 | 0.664459 |
c8eed66b5a60166900b21c5bfced634d9252fcf1 | 2,268 | py | Python | two1/wallet/pid_utils.py | febuiles/two1-python | 88704487dba7715f97a0980781d4c0efb2ea7fc4 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2016-09-10T18:14:33.000Z | 2016-09-10T18:14:33.000Z | two1/wallet/pid_utils.py | febuiles/two1-python | 88704487dba7715f97a0980781d4c0efb2ea7fc4 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | two1/wallet/pid_utils.py | febuiles/two1-python | 88704487dba7715f97a0980781d4c0efb2ea7fc4 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2020-11-04T05:01:17.000Z | 2020-11-04T05:01:17.000Z | import os
import platform
from path import Path
def get_pid_file_dir():
system = platform.system()
pid_file_dir = ""
if system == "Darwin":
# pid_file_dir = Path("/private/var/run")
pid_file_dir = Path("~/.two1/wallet").expanduser()
elif system == "Linux":
pid_file_dir = Path(... | 23.381443 | 112 | 0.579806 |
c8eed7f23a510b99b3be483192a19e9049b01d46 | 8,210 | py | Python | homeassistant/components/ais_drives_service/config_flow.py | stravinci/AIS-home-assistant | ead4dafd3f801ebeb32860bd34443ed24a4f4167 | [
"Apache-2.0"
] | 5 | 2020-01-21T16:06:49.000Z | 2021-12-20T11:54:20.000Z | homeassistant/components/ais_drives_service/config_flow.py | stravinci/AIS-home-assistant | ead4dafd3f801ebeb32860bd34443ed24a4f4167 | [
"Apache-2.0"
] | 68 | 2018-10-04T16:01:20.000Z | 2022-03-31T06:21:46.000Z | homeassistant/components/ais_drives_service/config_flow.py | stravinci/AIS-home-assistant | ead4dafd3f801ebeb32860bd34443ed24a4f4167 | [
"Apache-2.0"
] | 7 | 2018-10-04T10:12:45.000Z | 2021-12-29T20:55:40.000Z | """Config flow to configure the AIS Drive Service component."""
import asyncio
import logging
import time
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.const import (
CONF_EMAIL,
CONF_HOST,
CONF_NAME,
CONF_PASSWORD,
CONF_PORT,
CONF_TYPE,
CONF_USERNAM... | 36.327434 | 88 | 0.584653 |
c8ef1004fc8c226cd8520b2443257c551b62ab7f | 2,270 | py | Python | luminous/optvis/render.py | yrkv/luminous | 3891b5416c2c422c739ec2cc2b801e9e723f417b | [
"Apache-2.0"
] | null | null | null | luminous/optvis/render.py | yrkv/luminous | 3891b5416c2c422c739ec2cc2b801e9e723f417b | [
"Apache-2.0"
] | null | null | null | luminous/optvis/render.py | yrkv/luminous | 3891b5416c2c422c739ec2cc2b801e9e723f417b | [
"Apache-2.0"
] | null | null | null | import torch
import torchvision
import numpy as np
from luminous.optvis import transform, objectives
_layer_output = None
_hook = None
def setup_hook(layer):
global _hook
if _hook is not None:
_hook.remove()
def hook(module, input, output):
global _layer_output
_layer_output = ou... | 26.395349 | 80 | 0.644493 |
c8ef5b1f75a05e651e81c81bc19329055c486e9f | 20,633 | py | Python | src/lib/Bcfg2/Server/Core.py | amplify-education/bcfg2 | 02d7f574babfeb2da99e2aad3a92b4e8d6494f07 | [
"mpich2"
] | null | null | null | src/lib/Bcfg2/Server/Core.py | amplify-education/bcfg2 | 02d7f574babfeb2da99e2aad3a92b4e8d6494f07 | [
"mpich2"
] | null | null | null | src/lib/Bcfg2/Server/Core.py | amplify-education/bcfg2 | 02d7f574babfeb2da99e2aad3a92b4e8d6494f07 | [
"mpich2"
] | null | null | null | """Bcfg2.Server.Core provides the runtime support for Bcfg2 modules."""
import atexit
import logging
import select
import sys
import threading
import time
from traceback import format_exc
try:
import lxml.etree
except ImportError:
print("Failed to import lxml dependency. Shutting down server.")
raise Syst... | 40.536346 | 95 | 0.568264 |
c8ef76f807e2e408fa90ce370b9854f7e4c8ec22 | 5,417 | py | Python | ucb_cs61A/projects/ants/tests/08.py | tavaresdong/courses-notes | 7fb89103bca679f5ef9b14cbc777152daac1402e | [
"MIT"
] | null | null | null | ucb_cs61A/projects/ants/tests/08.py | tavaresdong/courses-notes | 7fb89103bca679f5ef9b14cbc777152daac1402e | [
"MIT"
] | 1 | 2017-07-31T08:15:26.000Z | 2017-07-31T08:15:26.000Z | ucb_cs61A/projects/ants/tests/08.py | tavaresdong/courses-notes | 7fb89103bca679f5ef9b14cbc777152daac1402e | [
"MIT"
] | 1 | 2019-10-06T16:52:31.000Z | 2019-10-06T16:52:31.000Z | test = {
'name': 'Problem 8',
'points': 1,
'suites': [
{
'cases': [
{
'code': r"""
>>> # Testing TankAnt parameters
>>> TankAnt.food_cost
6
>>> TankAnt.damage
1
>>> TankAnt.container
True
>>> tank = TankAnt... | 30.432584 | 86 | 0.429758 |
c8ef824c6b53ddf77b3ea092d8141e72c4138dd5 | 22,023 | py | Python | analysis_scripts/image_chrom_align_hcam.py | SpeerLab/STORM-UI- | 232752dfa11e0fd2f4fda9fe0db36ac3ceb953d3 | [
"MIT"
] | 1 | 2021-12-03T11:59:40.000Z | 2021-12-03T11:59:40.000Z | analysis_scripts/image_chrom_align_hcam.py | SpeerLab/STORM-UI | 232752dfa11e0fd2f4fda9fe0db36ac3ceb953d3 | [
"MIT"
] | null | null | null | analysis_scripts/image_chrom_align_hcam.py | SpeerLab/STORM-UI | 232752dfa11e0fd2f4fda9fe0db36ac3ceb953d3 | [
"MIT"
] | null | null | null | import tifffile as timg;
from tifffile import imsave;
import skimage as skimg;
import scipy
import cv2
from PIL import Image
from py_dftregistration import dftregistration;
from imresize import imresize;
from imresize import imadjust;
arg1 = "C:\\Users\\Colenso\\Desktop\\GUI_XY_test\\";
local_exp = arg1;
rel_conv_i... | 46.857447 | 143 | 0.682741 |
c8ef9a6d9b68679c161a8f96db2dec6d3f306367 | 86,434 | py | Python | appengine/swarming/server/task_request_test.py | hixio-mh/luci-py | 5e2606b0db8f5dac25e9f84fdf71d103da393894 | [
"Apache-2.0"
] | null | null | null | appengine/swarming/server/task_request_test.py | hixio-mh/luci-py | 5e2606b0db8f5dac25e9f84fdf71d103da393894 | [
"Apache-2.0"
] | 1 | 2022-03-02T11:45:18.000Z | 2022-03-02T11:45:18.000Z | appengine/swarming/server/task_request_test.py | hixio-mh/luci-py | 5e2606b0db8f5dac25e9f84fdf71d103da393894 | [
"Apache-2.0"
] | 1 | 2021-07-23T15:32:55.000Z | 2021-07-23T15:32:55.000Z | #!/usr/bin/env vpython
# Copyright 2014 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.
import datetime
import logging
import random
import string
import sys
import unittest
import test_env
test_env.setup_test_... | 37.826696 | 80 | 0.638568 |
c8efed3e79232b9516d7cc9ae932653eb4f75e46 | 6,780 | py | Python | LAB2/search.py | Yalfoosh/UI-Labosi | 6c8f5796cafe603012ae94b9bd2adf4642c6a1e2 | [
"Apache-2.0"
] | null | null | null | LAB2/search.py | Yalfoosh/UI-Labosi | 6c8f5796cafe603012ae94b9bd2adf4642c6a1e2 | [
"Apache-2.0"
] | null | null | null | LAB2/search.py | Yalfoosh/UI-Labosi | 6c8f5796cafe603012ae94b9bd2adf4642c6a1e2 | [
"Apache-2.0"
] | 3 | 2018-03-26T13:40:24.000Z | 2019-06-07T14:02:26.000Z | import util
import copy
from util import Queue
from game import Directions
from game import Agent
from game import Actions
class SearchNode:
"""
This class represents a node in the graph which represents the search problem.
"""
def __init__(self, position, parent=None, transition=None, cost=0, heuris... | 33.564356 | 107 | 0.629056 |
c8eff39b9286bd82373cbd34f53282b4df217aad | 1,453 | py | Python | python/app/thirdparty/oneforall/modules/intelligence/virustotal.py | taomujian/linbing | fe772a58f41e3b046b51a866bdb7e4655abaf51a | [
"MIT"
] | 351 | 2020-02-26T05:23:26.000Z | 2022-03-26T12:39:19.000Z | python/app/thirdparty/oneforall/modules/intelligence/virustotal.py | taomujian/linbing | fe772a58f41e3b046b51a866bdb7e4655abaf51a | [
"MIT"
] | 15 | 2020-03-26T07:31:49.000Z | 2022-03-09T02:12:17.000Z | python/app/thirdparty/oneforall/modules/intelligence/virustotal.py | taomujian/linbing | fe772a58f41e3b046b51a866bdb7e4655abaf51a | [
"MIT"
] | 99 | 2020-02-28T07:30:46.000Z | 2022-03-16T16:41:09.000Z | from app.thirdparty.oneforall.common.query import Query
'''
最多查询100条
'''
class VirusTotal(Query):
def __init__(self, domain):
Query.__init__(self)
self.source = 'VirusTotalQuery'
self.module = 'Intelligence'
self.domain = domain
def query(self):
"""
向接口查询子域并做子... | 23.819672 | 84 | 0.522368 |
c8eff4879104865bf2d0479ff0c4dc184a5c1023 | 12,812 | py | Python | lib/google/api_core/operations_v1/operations_client.py | Blue-IT-Marketing/blue-it-marketing | 51500378ba3b00acc1232fe1893ceeca10e9a491 | [
"MIT"
] | null | null | null | lib/google/api_core/operations_v1/operations_client.py | Blue-IT-Marketing/blue-it-marketing | 51500378ba3b00acc1232fe1893ceeca10e9a491 | [
"MIT"
] | 2 | 2021-02-08T20:18:59.000Z | 2021-04-30T20:35:11.000Z | website/venv/lib/python2.7/site-packages/google/api_core/operations_v1/operations_client.py | wenhuiyang/ARgot | 3fd1eacca6f81a3157649dda95ab427ca1f5efe1 | [
"MIT"
] | null | null | null | # Copyright 2017 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 law or agreed to in writing, ... | 45.432624 | 79 | 0.648377 |
c8f00422b2a55be666226dd6aaa219d797e378a1 | 6,042 | py | Python | gslib/tests/test_notification.py | stanhu/gsutil | e8403ed5e07caed3027455c7b883fef733612360 | [
"Apache-2.0"
] | null | null | null | gslib/tests/test_notification.py | stanhu/gsutil | e8403ed5e07caed3027455c7b883fef733612360 | [
"Apache-2.0"
] | null | null | null | gslib/tests/test_notification.py | stanhu/gsutil | e8403ed5e07caed3027455c7b883fef733612360 | [
"Apache-2.0"
] | 1 | 2022-01-28T15:28:54.000Z | 2022-01-28T15:28:54.000Z | # -*- coding: utf-8 -*-
# Copyright 2013 Google Inc. 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 require... | 37.7625 | 80 | 0.682059 |
c8f038361a21f55948868dda512f44baec770dce | 1,971 | py | Python | tests/test_pipeline_e2e.py | strfx/deep-neural-transcriber | 7ca422a226d544b6b93fe6aca31ac0ce9c727667 | [
"MIT"
] | 4 | 2021-11-17T10:17:18.000Z | 2022-03-12T15:13:32.000Z | tests/test_pipeline_e2e.py | strfx/deep-neural-transcriber | 7ca422a226d544b6b93fe6aca31ac0ce9c727667 | [
"MIT"
] | 1 | 2021-11-19T11:56:40.000Z | 2022-03-07T17:38:16.000Z | tests/test_pipeline_e2e.py | strfx/deep-neural-transcriber | 7ca422a226d544b6b93fe6aca31ac0ce9c727667 | [
"MIT"
] | 1 | 2022-03-02T07:15:01.000Z | 2022-03-02T07:15:01.000Z | """
Simple end-to-end tests for the subtitle generation pipeline.
These tests do not aim to be comprehensive, but rather provide a simple way to
tell if the pipeline has defects. Ultimatly, it just shows that the app can
transcribe some video using the pre-trained models and return the subtitles.
NOTE: These tests on... | 33.982759 | 84 | 0.752917 |
c8f05373ab7f21e0895e71aafaf840cf8848a0e5 | 31,388 | py | Python | awswrangler/catalog/_create.py | weishao-aws/aws-data-wrangler | 5029d197a2ce8c7d80077ee8d5419c956cecf967 | [
"Apache-2.0"
] | null | null | null | awswrangler/catalog/_create.py | weishao-aws/aws-data-wrangler | 5029d197a2ce8c7d80077ee8d5419c956cecf967 | [
"Apache-2.0"
] | null | null | null | awswrangler/catalog/_create.py | weishao-aws/aws-data-wrangler | 5029d197a2ce8c7d80077ee8d5419c956cecf967 | [
"Apache-2.0"
] | 1 | 2021-07-06T18:37:00.000Z | 2021-07-06T18:37:00.000Z | """AWS Glue Catalog Module."""
import logging
from typing import Any, Dict, List, Optional
import boto3 # type: ignore
from awswrangler import _utils, exceptions
from awswrangler._config import apply_configs
from awswrangler.catalog._definitions import _csv_table_definition, _parquet_table_definition
from awswrangl... | 40.710765 | 120 | 0.658309 |
c8f054a45010bf011f9e26c6e437fa3ae485b212 | 2,029 | py | Python | tests/test_bga/test_utils.py | bwdeng20/thgsp | 785b3ff291d72ee51e51e4cdbfd4bab63f8de9ac | [
"BSD-3-Clause"
] | 22 | 2021-01-13T05:15:38.000Z | 2022-01-17T01:37:29.000Z | tests/test_bga/test_utils.py | bwdeng20/thgsp | 785b3ff291d72ee51e51e4cdbfd4bab63f8de9ac | [
"BSD-3-Clause"
] | 2 | 2021-03-26T04:36:39.000Z | 2022-01-11T16:17:56.000Z | tests/test_bga/test_utils.py | bwdeng20/thgsp | 785b3ff291d72ee51e51e4cdbfd4bab63f8de9ac | [
"BSD-3-Clause"
] | 2 | 2021-01-13T05:15:43.000Z | 2022-01-01T12:51:32.000Z | import pytest
import torch
from thgsp.graphs.generators import rand_udg, rand_bipartite,Graph
from ..utils4t import float_dtypes, lap_types,plot
from scipy.sparse import coo_matrix
from thgsp.bga.utils import is_bipartite_fix, laplace
class TestIbFix:
def test_bipartite(self):
n_sample = 7
N1, N2 ... | 31.703125 | 75 | 0.604239 |
c8f056b47f057bccb22f0b7fce1706b4ef41ede3 | 129 | py | Python | event/EventTypes.py | adhocmaster/pyns | 607feb56baf0900535130195163eac331e131a2e | [
"MIT"
] | 1 | 2021-06-15T06:21:14.000Z | 2021-06-15T06:21:14.000Z | event/EventTypes.py | adhocmaster/pyns | 607feb56baf0900535130195163eac331e131a2e | [
"MIT"
] | null | null | null | event/EventTypes.py | adhocmaster/pyns | 607feb56baf0900535130195163eac331e131a2e | [
"MIT"
] | 1 | 2021-06-15T06:21:18.000Z | 2021-06-15T06:21:18.000Z | from enum import Enum, auto
class EventTypes(Enum):
ArriveNode = auto()
EnterChannel = auto()
CheckQueue = auto()
| 14.333333 | 27 | 0.658915 |
c8f08b101b7cd6b46cc852aa010a038bd7ba502c | 688 | py | Python | performance/driver/core/classes/task.py | mesosphere/dcos-perf-test-driver | 8fba87cb6c6f64690c0b5bef5c7d9f2aa0fba06b | [
"Apache-2.0"
] | 2 | 2018-02-27T18:21:21.000Z | 2018-03-16T12:12:12.000Z | performance/driver/core/classes/task.py | mesosphere/dcos-perf-test-driver | 8fba87cb6c6f64690c0b5bef5c7d9f2aa0fba06b | [
"Apache-2.0"
] | 1 | 2018-06-25T07:14:41.000Z | 2018-06-25T07:14:41.000Z | performance/driver/core/classes/task.py | mesosphere/dcos-perf-test-driver | 8fba87cb6c6f64690c0b5bef5c7d9f2aa0fba06b | [
"Apache-2.0"
] | 1 | 2020-06-25T10:37:21.000Z | 2020-06-25T10:37:21.000Z | import logging
from performance.driver.core.config import Configurable
from performance.driver.core.eventbus import EventBusSubscriber
class Task(EventBusSubscriber, Configurable):
"""
A Task is an arbitrary piece of python code that executes a stand-alone
action and can optionally update the global definition... | 25.481481 | 75 | 0.715116 |
c8f09d5cc9287aafc8656109d40c708437cdcb62 | 739 | py | Python | pycalc/MAVProxy/modules/lib/mp_widgets.py | joakimzhang/python-electron | 79bc174a14c5286ca739bb7d8ce6522fdc6e9e80 | [
"CC0-1.0"
] | null | null | null | pycalc/MAVProxy/modules/lib/mp_widgets.py | joakimzhang/python-electron | 79bc174a14c5286ca739bb7d8ce6522fdc6e9e80 | [
"CC0-1.0"
] | 8 | 2021-01-28T19:26:22.000Z | 2022-03-24T18:07:24.000Z | pycalc/MAVProxy/modules/lib/mp_widgets.py | joakimzhang/python-electron | 79bc174a14c5286ca739bb7d8ce6522fdc6e9e80 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python
'''
some useful wx widgets
Andrew Tridgell
June 2012
'''
from wx_loader import wx
class ImagePanel(wx.Panel):
'''a resizable panel containing an image'''
def __init__(self, parent, img):
wx.Panel.__init__(self, parent, -1, size=(1, 1))
self.SetBackgroundStyle(wx.BG_STYLE... | 26.392857 | 70 | 0.64276 |
c8f0a1b9c0768b6ee896b818f233cd53a4e902af | 5,664 | py | Python | pollination_sdk/models/input_folder_reference.py | pollination/python-sdk | 599e8dbfc6e547c5e18aa903b27c70d7ffef84e5 | [
"RSA-MD"
] | 2 | 2020-01-30T23:28:59.000Z | 2020-05-06T16:43:47.000Z | pollination_sdk/models/input_folder_reference.py | pollination/python-sdk | 599e8dbfc6e547c5e18aa903b27c70d7ffef84e5 | [
"RSA-MD"
] | 1 | 2020-10-02T18:00:25.000Z | 2020-10-02T18:00:25.000Z | pollination_sdk/models/input_folder_reference.py | pollination/python-sdk | 599e8dbfc6e547c5e18aa903b27c70d7ffef84e5 | [
"RSA-MD"
] | null | null | null | # coding: utf-8
"""
pollination-server
Pollination Server OpenAPI Definition # noqa: E501
The version of the OpenAPI document: 0.16.0
Contact: info@pollination.cloud
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from pollination_sdk.configu... | 31.120879 | 136 | 0.605579 |
c8f0b0258e44391ca811a10a7bd6bb7faa85b16e | 782 | py | Python | examples/intervalSaving/init.py | sanjayankur31/netpyne | d8b7e94cabeb27e23e30853ff17ae86518b35ac2 | [
"MIT"
] | null | null | null | examples/intervalSaving/init.py | sanjayankur31/netpyne | d8b7e94cabeb27e23e30853ff17ae86518b35ac2 | [
"MIT"
] | null | null | null | examples/intervalSaving/init.py | sanjayankur31/netpyne | d8b7e94cabeb27e23e30853ff17ae86518b35ac2 | [
"MIT"
] | null | null | null | """
init.py
Starting script to run NetPyNE-based M1 model.
Usage:
python init.py # Run simulation, optionally plot a raster
MPI usage:
mpiexec -n 4 nrniv -python -mpi init.py
"""
import matplotlib; matplotlib.use('Agg') # to avoid graphics error in servers
from netpyne import sim
from cfg import cfg
from ... | 25.225806 | 144 | 0.757033 |
c8f0b62116c2599f28f027ec152a870d2ca52f8f | 1,228 | py | Python | github/methods/users/blocking/unblock_user.py | appheap/PyGithub | 2442a2512a708c6463f81d8398fd91090e134df1 | [
"MIT"
] | 1 | 2022-03-16T21:33:37.000Z | 2022-03-16T21:33:37.000Z | github/methods/users/blocking/unblock_user.py | appheap/PyGithub | 2442a2512a708c6463f81d8398fd91090e134df1 | [
"MIT"
] | null | null | null | github/methods/users/blocking/unblock_user.py | appheap/PyGithub | 2442a2512a708c6463f81d8398fd91090e134df1 | [
"MIT"
] | 1 | 2022-03-16T21:28:06.000Z | 2022-03-16T21:28:06.000Z | from github.scaffold import Scaffold
from github.types import Response
class UnblockUser(Scaffold):
"""
Unlock a user
"""
def unblock_user(
self,
*,
username: str,
) -> 'Response':
"""
Unblock a user
:param username: Username of the us... | 27.288889 | 129 | 0.536645 |
c8f0c7906d85a2f5eb7a8fe9df9b8de5cba9705d | 516 | py | Python | dagmc_bounding_box/__init__.py | fusion-energy/dagmc_bounding_box | 96be759b6f08eb427f40e8156091b269ea1f53d1 | [
"MIT"
] | null | null | null | dagmc_bounding_box/__init__.py | fusion-energy/dagmc_bounding_box | 96be759b6f08eb427f40e8156091b269ea1f53d1 | [
"MIT"
] | 4 | 2021-11-24T17:33:39.000Z | 2022-02-23T16:59:42.000Z | dagmc_bounding_box/__init__.py | fusion-energy/dagmc_bounding_box | 96be759b6f08eb427f40e8156091b269ea1f53d1 | [
"MIT"
] | 1 | 2021-12-03T12:25:45.000Z | 2021-12-03T12:25:45.000Z | try:
# this works for python 3.7 and lower
from importlib.metadata import version, PackageNotFoundError
except (ModuleNotFoundError, ImportError):
# this works for python 3.8 and higher
from importlib_metadata import version, PackageNotFoundError
try:
__version__ = version("dagmc_bounding_box")
exce... | 28.666667 | 64 | 0.771318 |
c8f0cdb9c5e61eba829aff7037c53108bdd2a573 | 4,090 | py | Python | lona/pytest.py | ukleinek/lona | b4b52dc1e76c1b28b5989b9a93ddc969e997a841 | [
"MIT"
] | 230 | 2021-08-15T20:46:24.000Z | 2022-03-30T10:17:43.000Z | lona/pytest.py | ukleinek/lona | b4b52dc1e76c1b28b5989b9a93ddc969e997a841 | [
"MIT"
] | 176 | 2021-08-18T08:19:37.000Z | 2022-03-29T16:45:06.000Z | lona/pytest.py | ukleinek/lona | b4b52dc1e76c1b28b5989b9a93ddc969e997a841 | [
"MIT"
] | 13 | 2021-08-20T10:35:04.000Z | 2022-01-17T15:49:40.000Z | from __future__ import annotations
from collections.abc import AsyncIterator, Iterator, Callable
from typing import AsyncContextManager, cast
from asyncio import AbstractEventLoop, sleep
from contextlib import asynccontextmanager
from dataclasses import dataclass
import time
from aiohttp.test_utils import TestClient
... | 28.013699 | 104 | 0.637164 |
c8f0d216e6f7a3bb715286bd6e7975a5dc1ac1cc | 21,878 | py | Python | tensorflow/python/keras/layers/wrappers_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/python/keras/layers/wrappers_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/python/keras/layers/wrappers_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 26 | 2017-04-12T16:25:44.000Z | 2018-10-30T10:10:15.000Z | # Copyright 2016 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... | 37.270869 | 81 | 0.644255 |
c8f109f1c406d0daae84ea108dacd8d1c722690c | 4,606 | py | Python | Override_ray/policy_optimizer.py | Skylark0924/Gamma_Reward | 2eed6e2ea246974946b16bb7743fa55219436580 | [
"Apache-2.0"
] | 12 | 2020-10-15T08:11:50.000Z | 2021-12-11T03:10:47.000Z | Override_ray/policy_optimizer.py | Skylark0924/Gamma_Reward | 2eed6e2ea246974946b16bb7743fa55219436580 | [
"Apache-2.0"
] | null | null | null | Override_ray/policy_optimizer.py | Skylark0924/Gamma_Reward | 2eed6e2ea246974946b16bb7743fa55219436580 | [
"Apache-2.0"
] | 2 | 2021-01-28T09:53:11.000Z | 2021-10-03T17:29:41.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import logging
from ray.rllib.utils.annotations import DeveloperAPI
from Override_ray.metrics import collect_episodes, summarize_episodes
logger = logging.getLogger(__name__)
@DeveloperAPI
class PolicyOptim... | 33.620438 | 78 | 0.655667 |
c8f1140eea8d893163e72d737349ddca770ac24f | 1,150 | py | Python | salty/tests/test_visualization_library.py | jameslee97/salty-1 | efe6e68cfcab75f8522a66f4fa8b21d2ad727df1 | [
"MIT"
] | null | null | null | salty/tests/test_visualization_library.py | jameslee97/salty-1 | efe6e68cfcab75f8522a66f4fa8b21d2ad727df1 | [
"MIT"
] | null | null | null | salty/tests/test_visualization_library.py | jameslee97/salty-1 | efe6e68cfcab75f8522a66f4fa8b21d2ad727df1 | [
"MIT"
] | null | null | null | from __future__ import absolute_import, division, print_function
import salty
import salty.visualization as vis
import unittest
from keras.layers import Dense, Dropout
from keras.models import Sequential
class visualization_library_tests(unittest.TestCase):
data = ['cpt', 'density']
T = [298.1, 298.16]
P ... | 31.944444 | 71 | 0.668696 |
c8f14667122ad0b0806131b7136bb612579409e6 | 4,944 | py | Python | maskrcnn_benchmark/utils/checkpoint.py | alexey-kashapov/maskrcnn-benchmark | b11b8b7c04eee648ee958f3f3352525e665f0710 | [
"MIT"
] | null | null | null | maskrcnn_benchmark/utils/checkpoint.py | alexey-kashapov/maskrcnn-benchmark | b11b8b7c04eee648ee958f3f3352525e665f0710 | [
"MIT"
] | null | null | null | maskrcnn_benchmark/utils/checkpoint.py | alexey-kashapov/maskrcnn-benchmark | b11b8b7c04eee648ee958f3f3352525e665f0710 | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
import logging
import os
import torch
from maskrcnn_benchmark.utils.model_serialization import load_state_dict
from maskrcnn_benchmark.utils.c2_model_loading import load_c2_format
from maskrcnn_benchmark.utils.imports import import_file
from mask... | 34.573427 | 87 | 0.614078 |
c8f16e23b8338c8d485b70d8a1d45744d4122974 | 1,485 | py | Python | bishop/file.py | silverfix/django-bishop | 1af66beff474fc6a5d1902bd13f1b16102b33d56 | [
"BSD-3-Clause"
] | 2 | 2016-09-10T16:53:25.000Z | 2016-09-10T17:44:41.000Z | bishop/file.py | silverfix/django-bishop | 1af66beff474fc6a5d1902bd13f1b16102b33d56 | [
"BSD-3-Clause"
] | null | null | null | bishop/file.py | silverfix/django-bishop | 1af66beff474fc6a5d1902bd13f1b16102b33d56 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, division, absolute_import
import codecs
import json
import os
from unicodecsv import DictWriter, DictReader
from django.conf import settings
def write_file_json(data, filepath):
with codecs.open(filepath, 'w', encoding=settings.DEFAULT_CHARSET, err... | 33.75 | 95 | 0.678114 |
c8f1df4788922182bc0a37f1c09a483fd402ca0c | 29,868 | py | Python | O365/utils/windows_tz.py | riptusk331/python-o365 | 1e0da3b1019df592718115a0f08af219e7a8f061 | [
"Apache-2.0"
] | 1 | 2019-11-10T18:59:06.000Z | 2019-11-10T18:59:06.000Z | O365/utils/windows_tz.py | riptusk331/python-o365 | 1e0da3b1019df592718115a0f08af219e7a8f061 | [
"Apache-2.0"
] | 2 | 2019-11-11T16:43:00.000Z | 2019-11-12T03:56:52.000Z | O365/utils/windows_tz.py | riptusk331/python-o365 | 1e0da3b1019df592718115a0f08af219e7a8f061 | [
"Apache-2.0"
] | null | null | null | """
Mapping from iana timezones to windows timezones and vice versa
"""
from datetime import tzinfo
import pytz
# noinspection SpellCheckingInspection
IANA_TO_WIN = {
"Africa/Abidjan": "Greenwich Standard Time",
"Africa/Accra": "Greenwich Standard Time",
"Africa/Addis_Ababa": "E. Africa Standard Time",
... | 46.378882 | 73 | 0.676108 |
c8f1f48d666c204266c2cb15be950d4ee893ba42 | 7,017 | py | Python | py2ipynb.py | ericeasthope/nbexport | e9a06ae93a7bd6142fc005d623932eaff51b95ff | [
"MIT"
] | null | null | null | py2ipynb.py | ericeasthope/nbexport | e9a06ae93a7bd6142fc005d623932eaff51b95ff | [
"MIT"
] | null | null | null | py2ipynb.py | ericeasthope/nbexport | e9a06ae93a7bd6142fc005d623932eaff51b95ff | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""Converts a .py file to a V.4 .ipynb notebook
Modified from http://stackoverflow.com/questions/23292242/converting-to-not-from-ipython-notebook-format
"""
import argparse
import nbformat
from nbformat.v4 import new_code_cell, new_markdown_cell, new_notebook
from nbformat import v3, v4
import ... | 32.188073 | 104 | 0.568904 |
c8f232c14094a52e611165390d45f62538379d25 | 397 | py | Python | backend/article/urls.py | StichtingIAPC/swipe | d1ea35a40813d2d5e9cf9edde33148c0a825efc4 | [
"BSD-3-Clause-Clear"
] | null | null | null | backend/article/urls.py | StichtingIAPC/swipe | d1ea35a40813d2d5e9cf9edde33148c0a825efc4 | [
"BSD-3-Clause-Clear"
] | null | null | null | backend/article/urls.py | StichtingIAPC/swipe | d1ea35a40813d2d5e9cf9edde33148c0a825efc4 | [
"BSD-3-Clause-Clear"
] | null | null | null | from django.conf.urls import url
from article import views
urlpatterns = [
url(r'^$', views.ArticleTypeListView.as_view()),
url(r'^(?P<pk>\d+)/$', views.ArticleTypeView.as_view()),
url(r'^(?P<article_type>\d+)/suppliers/$', views.ArticleTypeSupplierView.as_view()),
url(r'^(?P<article_type>\d+)/suppli... | 30.538462 | 112 | 0.680101 |
c8f24faa3f491c00757ed663319b97a53f3ad03f | 4,039 | py | Python | credoscript/adaptors/interfaceadaptor.py | tlb-lab/credoscript | 32bdf08d84703dc2062dae4df1a95587d36c3cf7 | [
"MIT"
] | null | null | null | credoscript/adaptors/interfaceadaptor.py | tlb-lab/credoscript | 32bdf08d84703dc2062dae4df1a95587d36c3cf7 | [
"MIT"
] | null | null | null | credoscript/adaptors/interfaceadaptor.py | tlb-lab/credoscript | 32bdf08d84703dc2062dae4df1a95587d36c3cf7 | [
"MIT"
] | null | null | null | from sqlalchemy.sql.expression import and_, or_
from credoscript import phenotype_to_interface, variation_to_interface
from credoscript.mixins import PathAdaptorMixin
from credoscript.mixins.base import paginate
class InterfaceAdaptor(PathAdaptorMixin):
"""
"""
def __init__(self, dynamic=False, paginate=F... | 32.837398 | 94 | 0.602872 |
c8f2663c7ce5b10466e94ea8c8f19ec5e9fc97c3 | 4,487 | py | Python | lib/streamlit/server/server_util.py | dwiel/streamlit | 74ae7f30cc3d95948aff311371449963f8eaf29e | [
"Apache-2.0"
] | 1 | 2020-01-04T06:45:37.000Z | 2020-01-04T06:45:37.000Z | lib/streamlit/server/server_util.py | IliaLarchenko/streamlit | 9cdf4851148a43e4e0431d7633c5a5d729e5b1e3 | [
"Apache-2.0"
] | 4 | 2021-05-09T11:42:18.000Z | 2022-02-27T10:59:36.000Z | lib/streamlit/server/server_util.py | IliaLarchenko/streamlit | 9cdf4851148a43e4e0431d7633c5a5d729e5b1e3 | [
"Apache-2.0"
] | 1 | 2020-06-26T14:41:01.000Z | 2020-06-26T14:41:01.000Z | # -*- coding: utf-8 -*-
# Copyright 2018-2019 Streamlit 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 applicabl... | 28.579618 | 80 | 0.683753 |
c8f26834b113ce1b09c125666a70bcc3b49e5a0f | 1,513 | py | Python | coldwallet/tests/test_coldwallet.py | ravirahman/sancus | 6563852b98edeb1068574e2d99e1fc18b815bee3 | [
"MIT"
] | 2 | 2022-03-17T04:50:20.000Z | 2022-03-17T04:51:31.000Z | coldwallet/tests/test_coldwallet.py | ravirahman/sancus | 6563852b98edeb1068574e2d99e1fc18b815bee3 | [
"MIT"
] | null | null | null | coldwallet/tests/test_coldwallet.py | ravirahman/sancus | 6563852b98edeb1068574e2d99e1fc18b815bee3 | [
"MIT"
] | null | null | null | import os
import tempfile
import unittest
from unittest.mock import patch
from protobufs.institution.coldwallet_pb2 import (
CreateKeyPairsRequest,
CreateKeyPairsResponse,
)
from coldwallet.coldwallet import ColdWallet
from tests.fixtures import mock_create_key_pairs, mock_create_key_pairs_response
class Te... | 32.191489 | 118 | 0.668209 |
c8f2985f1e4ea26a4ea52e0a7d70d75aa7c2988d | 733 | py | Python | test_app/migrations/0002_auto_20180504_1054.py | makinacorpus/django-mapentity | 69a53fb8a676a9d4f6173b77fc09f99d38c4795e | [
"BSD-3-Clause"
] | 26 | 2015-01-12T13:22:40.000Z | 2022-03-07T16:50:52.000Z | test_app/migrations/0002_auto_20180504_1054.py | makinacorpus/django-mapentity | 69a53fb8a676a9d4f6173b77fc09f99d38c4795e | [
"BSD-3-Clause"
] | 94 | 2015-01-21T16:20:47.000Z | 2022-03-24T13:44:56.000Z | test_app/migrations/0002_auto_20180504_1054.py | makinacorpus/django-mapentity | 69a53fb8a676a9d4f6173b77fc09f99d38c4795e | [
"BSD-3-Clause"
] | 13 | 2015-01-22T07:11:15.000Z | 2019-10-28T02:07:48.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.12 on 2018-05-04 10:54
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('test_app', '0001_initial'),
]
operations = [
migrations.CreateModel(
... | 26.178571 | 114 | 0.574352 |
c8f2a44198621fd4ee015fb08c0c305988c82143 | 5,318 | py | Python | master/searx-master/tests/unit/test_preferences.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 4 | 2018-09-07T15:35:24.000Z | 2019-03-27T09:48:12.000Z | master/searx-master/tests/unit/test_preferences.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 371 | 2020-03-04T21:51:56.000Z | 2022-03-31T20:59:11.000Z | master/searx-master/tests/unit/test_preferences.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 3 | 2019-06-18T19:57:17.000Z | 2020-11-06T03:55:08.000Z | from searx.preferences import (EnumStringSetting, MapSetting, MissingArgumentException, SearchLanguageSetting,
MultipleChoiceSetting, PluginsSetting, ValidationException)
from searx.testing import SearxTestCase
class PluginStub(object):
def __init__(self, id, default_on):
s... | 40.907692 | 110 | 0.664724 |
c8f2a746c8f0bef2d633388f2e06f516a5f760c6 | 1,147 | py | Python | core/components/effects.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | 3 | 2017-10-28T11:28:38.000Z | 2018-09-12T09:47:00.000Z | core/components/effects.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | null | null | null | core/components/effects.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | null | null | null | from core.components import listing, Component
@listing.register
class Effects(Component):
NAME = "effects"
__slots__ = ["active_effects", "finished_effects"]
def __init__(self):
super().__init__()
self.active_effects = {}
self.finished_effects = []
def add_effect(self, effec... | 29.410256 | 93 | 0.659983 |
c8f2afb14a0b52bad0c766974c77cee7fdebdb02 | 4,278 | py | Python | scripts/undistort.py | MonikaFJ/donkeycar | 1cf227027951da476865b3f69e26ea749a8c0eec | [
"MIT"
] | null | null | null | scripts/undistort.py | MonikaFJ/donkeycar | 1cf227027951da476865b3f69e26ea749a8c0eec | [
"MIT"
] | null | null | null | scripts/undistort.py | MonikaFJ/donkeycar | 1cf227027951da476865b3f69e26ea749a8c0eec | [
"MIT"
] | null | null | null | import numpy as np
import cv2
import glob
import os
import matplotlib.pyplot as plt
class Undistorter:
def __init__(self, img_dim):
dir_path = os.path.dirname(os.path.realpath(__file__))
self.img_dim = img_dim
K = np.loadtxt(dir_path + '/../data/fisheye_calibration/K.txt', delimiter=" ")
D = np.load... | 35.355372 | 99 | 0.590697 |
c8f2c78a882d2aad3adfec61e63aea935a04c14b | 275 | py | Python | esst/atis/_univers_radio/_ur_status.py | etcher-be/esst | ac41cd0c07af8ca8532997f533756c529c9609a4 | [
"MIT"
] | 4 | 2018-06-24T14:03:44.000Z | 2019-01-21T01:20:02.000Z | esst/atis/_univers_radio/_ur_status.py | etcher-be/esst | ac41cd0c07af8ca8532997f533756c529c9609a4 | [
"MIT"
] | 106 | 2018-06-24T13:59:52.000Z | 2019-11-26T09:05:14.000Z | esst/atis/_univers_radio/_ur_status.py | theendsofinvention/esst | ac41cd0c07af8ca8532997f533756c529c9609a4 | [
"MIT"
] | null | null | null | # coding=utf-8
"""
UniversRadio status
"""
from esst.sentry.sentry_context import SentryClassContext
class Status(SentryClassContext):
"""
UniversRadio status
"""
install_path = 'unknown'
settings_folder = 'unknown'
voice_settings_file = 'unknown'
| 17.1875 | 57 | 0.705455 |
c8f2dfec4655e569b7daa06f4ed4284747371b79 | 8,236 | py | Python | test/api/test_network_type.py | choonho/inventory | cc89757490d28fecb7ffccdfd6f89d4c0aa40da5 | [
"Apache-2.0"
] | null | null | null | test/api/test_network_type.py | choonho/inventory | cc89757490d28fecb7ffccdfd6f89d4c0aa40da5 | [
"Apache-2.0"
] | null | null | null | test/api/test_network_type.py | choonho/inventory | cc89757490d28fecb7ffccdfd6f89d4c0aa40da5 | [
"Apache-2.0"
] | null | null | null | import os
import uuid
import random
import unittest
from langcodes import Language
from spaceone.core import config
from spaceone.core import pygrpc
from spaceone.core import utils
from spaceone.core.unittest.runner import RichTestRunner
from google.protobuf.json_format import MessageToDict
def random_string():
r... | 32.425197 | 113 | 0.531326 |
c8f2e5ce3abacab7b821d22095dd7949647cb609 | 41,515 | py | Python | src/crossknight/sqink/ui.py | jfveronelli/sqink | 5e9e6bc6c5c6c00abbc07099bc1fa1ab6cf79577 | [
"Unlicense"
] | 32 | 2015-11-06T02:59:41.000Z | 2021-02-12T02:44:42.000Z | src/crossknight/sqink/ui.py | jfveronelli/sqink | 5e9e6bc6c5c6c00abbc07099bc1fa1ab6cf79577 | [
"Unlicense"
] | 6 | 2017-04-26T02:30:16.000Z | 2017-10-13T16:53:08.000Z | src/crossknight/sqink/ui.py | jfveronelli/sqink | 5e9e6bc6c5c6c00abbc07099bc1fa1ab6cf79577 | [
"Unlicense"
] | 4 | 2016-02-01T09:15:05.000Z | 2020-04-30T03:41:04.000Z | # coding:utf-8
from configparser import ConfigParser
from crossknight.sqink import __version__ as version
from crossknight.sqink.domain import listTags
from crossknight.sqink.domain import newUuid
from crossknight.sqink.domain import Note
from crossknight.sqink.markdown import renderHtml
from crossknight.sqink.provider... | 37.400901 | 120 | 0.65044 |
c8f2ef9b11bd6dcea1e2357f313e1a3e82f9a213 | 15,429 | py | Python | hyperbox/networks/pytorch_modules.py | marsggbo/hyperbox | 91dcd04ad30164bcb12209d818df18961fa3f347 | [
"MIT"
] | 1 | 2022-01-17T00:34:14.000Z | 2022-01-17T00:34:14.000Z | hyperbox/networks/pytorch_modules.py | marsggbo/hyperbox | 91dcd04ad30164bcb12209d818df18961fa3f347 | [
"MIT"
] | null | null | null | hyperbox/networks/pytorch_modules.py | marsggbo/hyperbox | 91dcd04ad30164bcb12209d818df18961fa3f347 | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import torch
import numpy as np
import torch.nn as nn
import torch.nn.functional as F
__all__ = [
'SharpSepConv',
'MixSeparableConv',
'InvertedResidual',
'InvertedResidualSE',
'StdConv',
'FactorizedDownsampl... | 33.984581 | 134 | 0.583252 |
c8f322407a0c77a75504b08ee3754e8824eee19a | 851 | py | Python | run_simulation.py | AdrienC21/covid-discrete-stochastic-model | 9dba5e4e9d2fe7288e637203aee970c3d2b1fc89 | [
"MIT"
] | null | null | null | run_simulation.py | AdrienC21/covid-discrete-stochastic-model | 9dba5e4e9d2fe7288e637203aee970c3d2b1fc89 | [
"MIT"
] | null | null | null | run_simulation.py | AdrienC21/covid-discrete-stochastic-model | 9dba5e4e9d2fe7288e637203aee970c3d2b1fc89 | [
"MIT"
] | null | null | null | from utils import *
from simulation_parameters import *
# Transition matrix
M = calculate_transition_matrix(alpha, beta, gamma, delta_t, N)
# Initialization : January 24th 2020
numberInfected = 2
infected = np.array([0 for _ in range(N + 1)])
infected[numberInfected] = 1
# Forecast number of infected individual for ... | 38.681818 | 78 | 0.706228 |
c8f32b68931c00f8c7b2facb07de2cbe1cb2b68c | 7,363 | py | Python | advnn/net.py | chnzhangrui/twaml | 6ee22a47ad8ac077dfa26700a4c0c42424bb5ce1 | [
"MIT"
] | null | null | null | advnn/net.py | chnzhangrui/twaml | 6ee22a47ad8ac077dfa26700a4c0c42424bb5ce1 | [
"MIT"
] | null | null | null | advnn/net.py | chnzhangrui/twaml | 6ee22a47ad8ac077dfa26700a4c0c42424bb5ce1 | [
"MIT"
] | 2 | 2019-05-07T14:33:08.000Z | 2019-05-16T12:14:58.000Z | import os
#os.environ['KERAS_BACKEND'] = 'theano'
from keras.layers import Input, Dense, Dropout
from keras.models import Model
from keras.optimizers import SGD, Adam
from keras.utils.vis_utils import plot_model
from keras.losses import mean_squared_error, mean_absolute_error
# from keras.layers.advanced_activations im... | 50.77931 | 159 | 0.657612 |
c8f33189862a1572cc1aa174188c6fcab2c79551 | 2,567 | py | Python | datawinners/questionnaire/library.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | 1 | 2015-11-02T09:11:12.000Z | 2015-11-02T09:11:12.000Z | datawinners/questionnaire/library.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | datawinners/questionnaire/library.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | from couchdb.mapping import TextField
from mangrove.datastore.cache_manager import get_cache_manager
from mangrove.datastore.documents import FormModelDocument, DocumentBase
from datawinners import settings
from datawinners.main.database import get_db_manager
TEMPLATE_CACHE_EXPIRY_TIME_IN_SEC = 2 * 60 * 60
GROUPING_CA... | 39.492308 | 99 | 0.687573 |
c8f34413d7dd648f9b8cb91af4f8bf53ea76a477 | 3,048 | py | Python | src/tumblelog/views.py | myles/django-basic-tumblelog | 4967acd0c052a42c42312f41dd08ff3f6a5a846a | [
"Apache-2.0"
] | 2 | 2016-05-08T10:05:07.000Z | 2017-12-18T04:08:07.000Z | src/tumblelog/views.py | myles/django-basic-tumblelog | 4967acd0c052a42c42312f41dd08ff3f6a5a846a | [
"Apache-2.0"
] | null | null | null | src/tumblelog/views.py | myles/django-basic-tumblelog | 4967acd0c052a42c42312f41dd08ff3f6a5a846a | [
"Apache-2.0"
] | null | null | null | """
Copyright 2009 Myles Braithwaite <me@mylesbraithwaite.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | 28.485981 | 92 | 0.762139 |
c8f36696fea1f160a4f84375b3f9130301149dca | 47,043 | py | Python | SBaaS_LIMS/lims_experiment_query.py | dmccloskey/SBaaS_LIMS | 5dfd73689674953345d523178a67b8dda10e6d47 | [
"MIT"
] | null | null | null | SBaaS_LIMS/lims_experiment_query.py | dmccloskey/SBaaS_LIMS | 5dfd73689674953345d523178a67b8dda10e6d47 | [
"MIT"
] | null | null | null | SBaaS_LIMS/lims_experiment_query.py | dmccloskey/SBaaS_LIMS | 5dfd73689674953345d523178a67b8dda10e6d47 | [
"MIT"
] | null | null | null | from SBaaS_base.sbaas_base import sbaas_base
from .lims_experiment_postgresql_models import *
from .lims_experimentor_postgresql_models import *
from .lims_sample_postgresql_models import *
from .lims_extractionMethod_postgresql_models import *
from .lims_acquisitionMethod_postgresql_models import *
from SBaaS_base.s... | 51.356987 | 152 | 0.597602 |
c8f371b241332c3374a17dc75938e2568aa0b1f6 | 5,510 | py | Python | docs/conf.py | gitter-badger/zproc | b26d39d9c564886c48c84a1e93e616f21f3bece4 | [
"MIT"
] | null | null | null | docs/conf.py | gitter-badger/zproc | b26d39d9c564886c48c84a1e93e616f21f3bece4 | [
"MIT"
] | null | null | null | docs/conf.py | gitter-badger/zproc | b26d39d9c564886c48c84a1e93e616f21f3bece4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ------------------------------------------------------------... | 31.129944 | 79 | 0.641379 |
c8f389556cf393c901d4521ff2bf21aa88ead7c2 | 3,234 | py | Python | blesuite/cli/ble_replay.py | jreynders/BLESuite-1 | 1c3c15fc2d4e30c3f9c1a15e0268cae84685784b | [
"MIT"
] | 198 | 2016-08-04T05:45:38.000Z | 2022-02-17T08:30:58.000Z | blesuite/cli/ble_replay.py | jreynders/BLESuite-1 | 1c3c15fc2d4e30c3f9c1a15e0268cae84685784b | [
"MIT"
] | 13 | 2018-02-04T14:16:16.000Z | 2020-10-09T02:16:24.000Z | blesuite/cli/ble_replay.py | jreynders/BLESuite-1 | 1c3c15fc2d4e30c3f9c1a15e0268cae84685784b | [
"MIT"
] | 57 | 2016-08-08T04:24:04.000Z | 2022-01-24T08:43:02.000Z | import blesuite.replay.hci_parser as hci_parser
import argparse
import blesuite.replay.util
import json
import time
import logging
from logging.config import fileConfig
__version__ = "0.1"
logger = logging.getLogger(__name__)
logger.addHandler(logging.NullHandler())
logging.basicConfig(level=logging.DEBUG)
def crea... | 36.337079 | 109 | 0.575139 |
c8f38d69d2da77305dbbb8d89381dc2f25a0e191 | 312 | py | Python | moneydog/__init__.py | Falldog/moneydog | 86e7cab1c0b35f07d1fe42e699e1159f57f1bef5 | [
"Apache-2.0"
] | null | null | null | moneydog/__init__.py | Falldog/moneydog | 86e7cab1c0b35f07d1fe42e699e1159f57f1bef5 | [
"Apache-2.0"
] | null | null | null | moneydog/__init__.py | Falldog/moneydog | 86e7cab1c0b35f07d1fe42e699e1159f57f1bef5 | [
"Apache-2.0"
] | null | null | null | # Import the Flask Framework
from flask import Flask
app = Flask(__name__)
# Note: We don't need to call run() since our application is embedded within
# the App Engine WSGI application server.
from moneydog import urls
from moneydog import views
from moneydog import views_admin
from moneydog import filters
| 24 | 76 | 0.798077 |
c8f38fe69dc515d5a7d0399dafec75916962fb5b | 1,492 | py | Python | scan/fetchers/kube/kube_fetch_aggregate_pods.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | scan/fetchers/kube/kube_fetch_aggregate_pods.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | scan/fetchers/kube/kube_fetch_aggregate_pods.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | ###############################################################################
# Copyright (c) 2017-2020 Koren Lev (Cisco Systems), #
# Yaron Yogev (Cisco Systems), Ilia Abashin (Cisco Systems) and others #
# #
... | 42.628571 | 79 | 0.483914 |
c8f39c8d9d410723b3504264d56ea47a9b1add60 | 3,827 | py | Python | tensorlayer/layers/dense/ternary_dense.py | thangvubk/tensorlayer | fcf7bb2f14caf6e1336b54b772c5227587b5f51d | [
"Apache-2.0"
] | 5 | 2018-12-06T21:10:55.000Z | 2021-01-24T11:47:35.000Z | tensorlayer/layers/dense/ternary_dense.py | sdd9465/tensorlayer | 690766535a591367ad86907835b39730f4aa1dea | [
"Apache-2.0"
] | null | null | null | tensorlayer/layers/dense/ternary_dense.py | sdd9465/tensorlayer | 690766535a591367ad86907835b39730f4aa1dea | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/python
# -*- coding: utf-8 -*-
import tensorflow as tf
from tensorlayer.layers.core import Layer
from tensorlayer.layers.core import LayersConfig
from tensorlayer.layers.utils import compute_alpha
from tensorlayer.layers.utils import ternary_operation
from tensorlayer import logging
from tensorlayer.de... | 33.867257 | 136 | 0.618761 |
c8f3a431c60b6068d3c899815972e96d2beffc75 | 1,128 | py | Python | var/spack/repos/builtin/packages/mafft/package.py | kehw/spack | 4f49b1a9301447a8cf880c99820cad65e5c2d7e3 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2020-09-10T22:50:08.000Z | 2021-01-12T22:18:54.000Z | var/spack/repos/builtin/packages/mafft/package.py | kehw/spack | 4f49b1a9301447a8cf880c99820cad65e5c2d7e3 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 14 | 2021-07-20T01:04:53.000Z | 2022-03-02T01:08:36.000Z | var/spack/repos/builtin/packages/mafft/package.py | kehw/spack | 4f49b1a9301447a8cf880c99820cad65e5c2d7e3 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1 | 2021-05-06T00:17:46.000Z | 2021-05-06T00:17:46.000Z | # Copyright 2013-2021 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 *
class Mafft(Package):
"""MAFFT is a multiple sequence alignment program for unix-like
ope... | 43.384615 | 95 | 0.720745 |
c8f3b0e2b73263c55626432cf194b4f21f67a12c | 91,969 | py | Python | theano/tensor/blas.py | jdehotin/Theano | 0477d6356e4c5ceb5c3c03585e59d2e85abfcd02 | [
"BSD-3-Clause"
] | null | null | null | theano/tensor/blas.py | jdehotin/Theano | 0477d6356e4c5ceb5c3c03585e59d2e85abfcd02 | [
"BSD-3-Clause"
] | null | null | null | theano/tensor/blas.py | jdehotin/Theano | 0477d6356e4c5ceb5c3c03585e59d2e85abfcd02 | [
"BSD-3-Clause"
] | null | null | null | """Ops and optimizations for using BLAS calls
BLAS = Basic Linear Algebra Subroutines
Learn more about BLAS here:
http://www.netlib.org/blas/blast-forum/
The standard BLAS libraries implement what is called "legacy BLAS" in that
document.
This documentation describes Theano's BLAS optimization pipeline.
Where th... | 37.754105 | 118 | 0.531375 |
c8f3b7048b29b8889b8f91a6eca582da52923f5e | 523 | py | Python | lambda/hitcount.py | moredatarequired/restauant-picker | 7362900f4285dd04b74e8b6fde63853350a9ddd4 | [
"MIT"
] | null | null | null | lambda/hitcount.py | moredatarequired/restauant-picker | 7362900f4285dd04b74e8b6fde63853350a9ddd4 | [
"MIT"
] | null | null | null | lambda/hitcount.py | moredatarequired/restauant-picker | 7362900f4285dd04b74e8b6fde63853350a9ddd4 | [
"MIT"
] | 1 | 2021-03-11T22:35:42.000Z | 2021-03-11T22:35:42.000Z | import json
import os
import boto3
def handler(event, context):
ddb = boto3.resource("dynamodb")
table = ddb.Table(os.environ["HITS_TABLE_NAME"])
table.update_item(
Key={"path": event["path"]},
UpdateExpression="ADD hits :incr",
ExpressionAttributeValues={":incr": 1},
)
... | 21.791667 | 60 | 0.634799 |
c8f3c64695ef7a29be227f0fcf110fa0e9780d49 | 561 | py | Python | docs/scripts/run_cmd.py | xenova/ChatReplayDownloader | ff9ddb1f840fa06d0cc3976badf75c1fffebd003 | [
"MIT"
] | 306 | 2021-02-03T12:19:14.000Z | 2022-03-31T02:07:20.000Z | docs/scripts/run_cmd.py | z1001123/chat-downloader | ef68e28ac5898ed3e424ca1b9fbbbe73377cbb1e | [
"MIT"
] | 79 | 2021-02-03T11:48:29.000Z | 2022-03-28T19:14:18.000Z | docs/scripts/run_cmd.py | z1001123/chat-downloader | ef68e28ac5898ed3e424ca1b9fbbbe73377cbb1e | [
"MIT"
] | 53 | 2021-02-09T21:55:11.000Z | 2022-03-28T21:17:40.000Z | import subprocess
import re
def run_cmd(cmd):
return subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True).communicate()[0].decode()
def cmd_output(cmd, padding=' '*4):
text = run_cmd(cmd)
return '.. code:: console\n\n' + ''.join(map(lambda x: padding + x, text.spl... | 23.375 | 100 | 0.641711 |
c8f3c81c1c31f3dbc9baa8dd4cde5a69ba9ff20c | 3,842 | py | Python | sacla/scripts/backups/old_scripts/ancient-preOct2016/Chip_Mar18_2015_noon.py | beamline-i24/DiamondChips | 02fb58a95ad2c1712c41b641eb5f197d688c54c3 | [
"Apache-2.0"
] | null | null | null | sacla/scripts/backups/old_scripts/ancient-preOct2016/Chip_Mar18_2015_noon.py | beamline-i24/DiamondChips | 02fb58a95ad2c1712c41b641eb5f197d688c54c3 | [
"Apache-2.0"
] | null | null | null | sacla/scripts/backups/old_scripts/ancient-preOct2016/Chip_Mar18_2015_noon.py | beamline-i24/DiamondChips | 02fb58a95ad2c1712c41b641eb5f197d688c54c3 | [
"Apache-2.0"
] | null | null | null | import os
import sys
import time
from subprocess import Popen, PIPE
def CoordinateSystem(fiducial_dict):
#1mm / counts per nanometer (give cts/mm)
scale = 10000
#d1, d2 = fiducial_positions
f1 = open('/dls_sw/work/R3.14.12.3/ioc/ME14E/ME14E-MO-IOC-01/ME14E-MO-IOC-01App/scripts/fiducial_1.txt','r')
... | 34.612613 | 119 | 0.597085 |
c8f403f78fab18f7b4e8c946a89b14371a2e6d40 | 249 | py | Python | aiomessaging/__init__.py | aiomessaging/aiomessaging | 0fe2296d5a772a9b28c3173259e7a6ace6e45624 | [
"MIT"
] | 4 | 2018-07-08T18:49:10.000Z | 2018-08-16T20:17:29.000Z | aiomessaging/__init__.py | aiomessaging/aiomessaging | 0fe2296d5a772a9b28c3173259e7a6ace6e45624 | [
"MIT"
] | 23 | 2018-07-08T18:52:42.000Z | 2018-10-25T16:58:50.000Z | aiomessaging/__init__.py | aiomessaging/aiomessaging | 0fe2296d5a772a9b28c3173259e7a6ace6e45624 | [
"MIT"
] | null | null | null | """aiomessaging.
"""
from .app import AiomessagingApp
from .queues import QueueBackend
from .event import Event
from .message import Message, Route, Effect
__all__ = [
'QueueBackend', 'AiomessagingApp', 'Event', 'Message', 'Route', 'Effect'
]
| 20.75 | 76 | 0.722892 |
c8f40c3f2e7700ef0357fd7a66a44a9fd7313411 | 145 | py | Python | scratchwork/question_to_query.py | mathurma/KGQA | 967cd851f84c73f284aee5fe94f8a3df66d5b638 | [
"CC0-1.0"
] | null | null | null | scratchwork/question_to_query.py | mathurma/KGQA | 967cd851f84c73f284aee5fe94f8a3df66d5b638 | [
"CC0-1.0"
] | null | null | null | scratchwork/question_to_query.py | mathurma/KGQA | 967cd851f84c73f284aee5fe94f8a3df66d5b638 | [
"CC0-1.0"
] | null | null | null | import rdflib
# Try to build an RDF doc
# Try to pull all S || V || O from an RDF doc
# Try to query and RDF doc
.. | 13.181818 | 45 | 0.524138 |
c8f43bde59ea77f2ad5b7cb791a76c9aca50ef3a | 681 | py | Python | challenges/binary-exploitation/text-adventure-1/solve/exploit.py | infosec-ucalgary/magpieCTF-2021 | 78459a1e16ac3a135e891c2246232c4890960b92 | [
"MIT"
] | 18 | 2021-02-22T00:09:27.000Z | 2022-02-28T14:23:33.000Z | challenges/binary-exploitation/text-adventure-1/solve/exploit.py | infosec-ucalgary/magpieCTF-2021 | 78459a1e16ac3a135e891c2246232c4890960b92 | [
"MIT"
] | null | null | null | challenges/binary-exploitation/text-adventure-1/solve/exploit.py | infosec-ucalgary/magpieCTF-2021 | 78459a1e16ac3a135e891c2246232c4890960b92 | [
"MIT"
] | 6 | 2021-02-22T01:32:10.000Z | 2022-02-25T15:48:42.000Z | from pwn import *
prc = remote("bin.magpiectf.ca", "1976")
padding = b"a" * 248
password = b"password1\0"
fakepass = b"password1"
payload = password + padding + fakepass
prc.recvline()
prc.recvline()
prc.sendline(b"go north")
prc.recvline()
prc.sendline(b"go west")
prc.recvline()
prc.sendline(b"use terminal")
... | 14.489362 | 46 | 0.690162 |
c8f43ca3464477e979a7d1d55a82d88c4ec78593 | 4,755 | py | Python | oscar/lib/python2.7/site-packages/PIL/PpmImagePlugin.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/PIL/PpmImagePlugin.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/PIL/PpmImagePlugin.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | #
# The Python Imaging Library.
# $Id$
#
# PPM support for PIL
#
# History:
# 96-03-24 fl Created
# 98-03-06 fl Write RGBA images (as RGB, that is)
#
# Copyright (c) Secret Labs AB 1997-98.
# Copyright (c) Fredrik Lundh 1996.
#
# See the README file for information on usage and redistri... | 27.970588 | 85 | 0.453628 |
c8f447d21b7f0a6b7fef072bd02037e8dfa35553 | 505 | py | Python | python/console/numpy_printing.py | delunapaolo/Code-snippets-and-utilities | 3766bb4adcf197ed088f68482758d022fae18515 | [
"MIT"
] | null | null | null | python/console/numpy_printing.py | delunapaolo/Code-snippets-and-utilities | 3766bb4adcf197ed088f68482758d022fae18515 | [
"MIT"
] | null | null | null | python/console/numpy_printing.py | delunapaolo/Code-snippets-and-utilities | 3766bb4adcf197ed088f68482758d022fae18515 | [
"MIT"
] | null | null | null | # https://docs.scipy.org/doc/numpy/reference/generated/numpy.set_printoptions.html
# suppress : bool
# If True, always print floating point numbers using fixed point notation, in which case numbers equal to zero in the current precision will print as zero. If False, then scientific notation is used when absolute va... | 45.909091 | 344 | 0.782178 |
c8f45cf0731208038b976688e79c3a4e0a39086a | 777 | py | Python | apps/user/admin.py | sparcs-kaist/new-ara-api | 63998da575cb148347708199fe1345c4e7ee3e1b | [
"MIT"
] | 19 | 2017-09-13T07:51:58.000Z | 2022-03-28T11:04:03.000Z | apps/user/admin.py | sparcs-kaist/new-ara-api | 63998da575cb148347708199fe1345c4e7ee3e1b | [
"MIT"
] | 147 | 2017-09-14T13:45:30.000Z | 2022-03-14T15:54:09.000Z | apps/user/admin.py | sparcs-kaist/new-ara-api | 63998da575cb148347708199fe1345c4e7ee3e1b | [
"MIT"
] | 5 | 2019-08-31T13:13:30.000Z | 2021-03-26T15:46:38.000Z | from django.contrib import admin
from apps.user.models import UserProfile
from apps.user.models.user.manual import ManualUser
from ara.classes.admin import MetaDataModelAdmin
@admin.register(UserProfile)
class UserProfileAdmin(MetaDataModelAdmin):
list_filter = (
'see_sexual',
'see_social',
... | 19.425 | 51 | 0.571429 |
c8f483f775dee26b5ee7ed0ad3f653d87bf5a047 | 7,629 | py | Python | tools/grit/grit/test_suite_all.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2019-01-28T08:09:58.000Z | 2021-11-15T15:32:10.000Z | tools/grit/grit/test_suite_all.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | tools/grit/grit/test_suite_all.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 6 | 2020-09-23T08:56:12.000Z | 2021-11-18T03:40:49.000Z | #!/usr/bin/env python
# Copyright (c) 2011 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.
'''Unit test suite that collects all test cases for GRIT.'''
import os
import sys
if __name__ == '__main__':
sys.path.append(os.... | 46.236364 | 78 | 0.776117 |
c8f48cb63f5a9476b5ed8f95498aafeeac9ddc2a | 3,147 | py | Python | openstackclient/identity/v2_0/catalog.py | redhat-openstack/python-openstackclient | 7dc2e1dc08b0692a3accb343c62451fb3d83f4cd | [
"Apache-2.0"
] | null | null | null | openstackclient/identity/v2_0/catalog.py | redhat-openstack/python-openstackclient | 7dc2e1dc08b0692a3accb343c62451fb3d83f4cd | [
"Apache-2.0"
] | null | null | null | openstackclient/identity/v2_0/catalog.py | redhat-openstack/python-openstackclient | 7dc2e1dc08b0692a3accb343c62451fb3d83f4cd | [
"Apache-2.0"
] | null | null | null | # 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
# distrib... | 32.443299 | 77 | 0.591992 |
c8f4bb23074dab81c7dd8cb10ec0bda814b91154 | 3,244 | py | Python | sportsbetting/bookmakers/pokerstars.py | chokybar/Sports-betting | 8e43bb7b0c4961eb8bc3f4cf4f02780ec0410c76 | [
"MIT"
] | null | null | null | sportsbetting/bookmakers/pokerstars.py | chokybar/Sports-betting | 8e43bb7b0c4961eb8bc3f4cf4f02780ec0410c76 | [
"MIT"
] | null | null | null | sportsbetting/bookmakers/pokerstars.py | chokybar/Sports-betting | 8e43bb7b0c4961eb8bc3f4cf4f02780ec0410c76 | [
"MIT"
] | null | null | null | """
Pokerstars odds scraper
"""
import datetime
import json
import re
import requests
from sportsbetting.auxiliary_functions import merge_dicts
def parse_pokerstars_api(id_league):
"""
Get pokerstars odds from league id
"""
url = ("https://sports.pokerstarssports.fr/sportsbook/v1/api/getCompetitionEv... | 36.044444 | 121 | 0.597411 |
c8f4bf9d0250c6df0dca58fae5d129cd1823ce1d | 6,813 | py | Python | tests/evaluation/test_evaluation.py | cclauss/statue | ac582dcf1cbcb4379028ef15339ac400bfe8a642 | [
"Apache-2.0"
] | 8 | 2020-09-29T12:31:08.000Z | 2022-02-28T08:49:48.000Z | tests/evaluation/test_evaluation.py | cclauss/statue | ac582dcf1cbcb4379028ef15339ac400bfe8a642 | [
"Apache-2.0"
] | 20 | 2020-06-13T20:21:27.000Z | 2022-03-29T12:52:36.000Z | tests/evaluation/test_evaluation.py | saroad2/statue | ac582dcf1cbcb4379028ef15339ac400bfe8a642 | [
"Apache-2.0"
] | null | null | null | from pytest_cases import THIS_MODULE, case, parametrize_with_cases
from statue.evaluation import CommandEvaluation, Evaluation, SourceEvaluation
from tests.constants import (
COMMAND1,
COMMAND2,
COMMAND3,
COMMAND4,
COMMAND5,
COMMAND6,
FAILED_TAG,
SOURCE1,
SOURCE2,
SUCCESSFUL_TAG... | 33.234146 | 88 | 0.643622 |
c8f4c374d01314f87f27d2a9f2761fa85cbe3664 | 3,762 | py | Python | tests/undo_redo_test.py | XIThing/esdl-mapeditor | 9f4cd4a58714ea67aeb532e88e88f0435a87dbd5 | [
"Apache-2.0"
] | null | null | null | tests/undo_redo_test.py | XIThing/esdl-mapeditor | 9f4cd4a58714ea67aeb532e88e88f0435a87dbd5 | [
"Apache-2.0"
] | 14 | 2020-09-30T21:16:46.000Z | 2021-11-08T18:54:34.000Z | tests/undo_redo_test.py | XIThing/esdl-mapeditor | 9f4cd4a58714ea67aeb532e88e88f0435a87dbd5 | [
"Apache-2.0"
] | 1 | 2020-09-17T12:48:57.000Z | 2020-09-17T12:48:57.000Z | # This work is based on original code developed and copyrighted by TNO 2020.
# Subsequent contributions are licensed to you by the developers of such code and are
# made available to the Project under one or several contributor license agreements.
#
# This work is licensed to you under the Apache License, Versi... | 30.33871 | 92 | 0.645136 |
c8f4d0cfff5729aca3c4e84e1ef873cf17ac983c | 6,917 | py | Python | asposewordscloud/models/custom_xml_part_update.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 14 | 2018-07-15T17:01:52.000Z | 2018-11-29T06:15:33.000Z | asposewordscloud/models/custom_xml_part_update.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 1 | 2018-09-28T12:59:34.000Z | 2019-10-08T08:42:59.000Z | asposewordscloud/models/custom_xml_part_update.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 2 | 2020-12-21T07:59:17.000Z | 2022-02-16T21:41:25.000Z | # coding: utf-8
# -----------------------------------------------------------------------------------
# <copyright company="Aspose" file="custom_xml_part_update.py">
# Copyright (c) 2021 Aspose.Words for Cloud
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person obtaining a copy
... | 32.938095 | 85 | 0.567009 |
c8f4d18991d06b17db05fd48044926fcfa514bf5 | 385 | py | Python | setup.py | craigshall/chiptools | a3358203a1e1f873c4a3c9a490b57fa847f5bd13 | [
"BSD-3-Clause"
] | null | null | null | setup.py | craigshall/chiptools | a3358203a1e1f873c4a3c9a490b57fa847f5bd13 | [
"BSD-3-Clause"
] | null | null | null | setup.py | craigshall/chiptools | a3358203a1e1f873c4a3c9a490b57fa847f5bd13 | [
"BSD-3-Clause"
] | null | null | null | # Import needed function from setuptools
from setuptools import setup
# Create proper setup to be used by pip
setup(name='chiptools',
version='0.0.1',
description='Utilities for removing rows and columns from pandas DataFrames.',
author='Craig Hall',
email='craigsh@gmail.com',
packages=['... | 32.083333 | 84 | 0.688312 |
c8f4f645464be08c8ae72f9c117106cbc9a27318 | 832 | py | Python | setup.py | 3wayHimself/crypko.py | 8c05a2ceeb53bbbd27617ca7a909f861df279a68 | [
"MIT"
] | null | null | null | setup.py | 3wayHimself/crypko.py | 8c05a2ceeb53bbbd27617ca7a909f861df279a68 | [
"MIT"
] | null | null | null | setup.py | 3wayHimself/crypko.py | 8c05a2ceeb53bbbd27617ca7a909f861df279a68 | [
"MIT"
] | 2 | 2018-10-29T00:55:44.000Z | 2019-04-06T07:18:43.000Z | import os
from setuptools import setup
version = __import__('crypko').__version__
def read(fname):
with open(os.path.join(os.path.dirname(__file__), fname)) as f:
return f.read()
setup(
name='crypko.py',
version=version,
author='Bottersnike',
author_email='bottersnik237@gmail.com',
... | 22.486486 | 73 | 0.63101 |
c8f5006e7b4ab86ab71f0dc836c390a21581ded4 | 642 | py | Python | 1_code/skill_card/data.py | jaimiles23/Multiplication_Medley | 1072dea1a5be0b339211ff39db6a89a90aca64c1 | [
"MIT"
] | null | null | null | 1_code/skill_card/data.py | jaimiles23/Multiplication_Medley | 1072dea1a5be0b339211ff39db6a89a90aca64c1 | [
"MIT"
] | null | null | null | 1_code/skill_card/data.py | jaimiles23/Multiplication_Medley | 1072dea1a5be0b339211ff39db6a89a90aca64c1 | [
"MIT"
] | null | null | null | """/**
* @author [Jai Miles]
* @email [jaimiles23@gmail.com]
* @create date 2020-05-04 16:35:10
* @modify date 2020-05-04 16:35:10
* @desc [
Data module for skill card titles.
]
*/
"""
##########
# Imports
##########
import aux_data.skill_data
##########
# Card Title
##########
TITLE_SKILL_NAME = aux_d... | 16.461538 | 49 | 0.616822 |
c8f502f0235de51fe3c0d68521e08d83ae49ece2 | 42,058 | py | Python | pokemongo_bot/__init__.py | matheussampaio/botmon-bot | d2b145c500956fa1368263a2aad371337fc37a6d | [
"MIT"
] | null | null | null | pokemongo_bot/__init__.py | matheussampaio/botmon-bot | d2b145c500956fa1368263a2aad371337fc37a6d | [
"MIT"
] | null | null | null | pokemongo_bot/__init__.py | matheussampaio/botmon-bot | d2b145c500956fa1368263a2aad371337fc37a6d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import datetime
import json
import logging
import os
import random
import re
import sys
import time
import Queue
import threading
from geopy.geocoders import GoogleV3
from pgoapi import PGoApi
from pgoapi.utilities import f2i, get_cell_ids
import cell_w... | 34.873964 | 137 | 0.545223 |
c8f5635b5f09a0473cdf143357e4d67484c385dd | 715 | py | Python | SoftLayer/CLI/cdn/origin_add.py | briancline/softlayer-python | 679fb62ba2db095f0177f9d9488ff4a80c3b7387 | [
"MIT"
] | null | null | null | SoftLayer/CLI/cdn/origin_add.py | briancline/softlayer-python | 679fb62ba2db095f0177f9d9488ff4a80c3b7387 | [
"MIT"
] | null | null | null | SoftLayer/CLI/cdn/origin_add.py | briancline/softlayer-python | 679fb62ba2db095f0177f9d9488ff4a80c3b7387 | [
"MIT"
] | null | null | null | """Create an origin pull mapping."""
# :license: MIT, see LICENSE for more details.
import SoftLayer
from SoftLayer.CLI import environment
import click
# pylint: disable=redefined-builtin
@click.command()
@click.argument('account_id')
@click.argument('content_url')
@click.option('--type',
help='The me... | 28.6 | 76 | 0.68951 |
c8f5767d66755ad280f65ae8c82826ed00bd969f | 32,003 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_06_01/operations/_virtual_network_gateway_connections_operations.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_06_01/operations/_virtual_network_gateway_connections_operations.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_06_01/operations/_virtual_network_gateway_connections_operations.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 1 | 2019-06-17T22:18:23.000Z | 2019-06-17T22:18:23.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 ... | 49.617054 | 203 | 0.696278 |
c8f58002d8ab0e5ab37cea1f4b0dd50a41a83ace | 710 | py | Python | passrotate/__init__.py | simon816/pass-rotate | 2c133e736cb27cebf2d903f863722b685f4f76fc | [
"MIT"
] | null | null | null | passrotate/__init__.py | simon816/pass-rotate | 2c133e736cb27cebf2d903f863722b685f4f76fc | [
"MIT"
] | null | null | null | passrotate/__init__.py | simon816/pass-rotate | 2c133e736cb27cebf2d903f863722b685f4f76fc | [
"MIT"
] | null | null | null | from passrotate.provider import get_provider, get_providers
import passrotate.providers
from getpass import getpass
def _getpass_prompt(prompt, prompt_type):
return getpass(prompt=prompt + ": ")
class PassRotate():
def __init__(self):
self.prompt = _getpass_prompt
def get_provider_class(self, nam... | 25.357143 | 59 | 0.676056 |
c8f58a9b0c13576a39be0f4519336480ac968538 | 338 | py | Python | system_a/evaluation_main.py | hkayesh/depend_clean | 1d4bfdaf9a4d323582ab36e3ec0f9b4f2faae851 | [
"Apache-2.0"
] | null | null | null | system_a/evaluation_main.py | hkayesh/depend_clean | 1d4bfdaf9a4d323582ab36e3ec0f9b4f2faae851 | [
"Apache-2.0"
] | null | null | null | system_a/evaluation_main.py | hkayesh/depend_clean | 1d4bfdaf9a4d323582ab36e3ec0f9b4f2faae851 | [
"Apache-2.0"
] | null | null | null | from scripts.evaluation import Evaluator
if __name__ == '__main__':
evaluator = Evaluator('files/srft_dataset.csv')
# print segment level sentiment detection scores
# evaluator.evaluate_sentiment_detection(scoring='f1_micro', merged=True)
print(evaluator.get_category_counts(cat_type='sentiment', merg... | 18.777778 | 77 | 0.754438 |
c8f5a168c324cf9f0f1c8cb724431e9eaf810f5a | 4,536 | py | Python | tests/test_nearest_neighbor_index.py | jkae/knn-exercise | ae569e3f6a0e23669369d99e032270e72f8fbb66 | [
"MIT"
] | null | null | null | tests/test_nearest_neighbor_index.py | jkae/knn-exercise | ae569e3f6a0e23669369d99e032270e72f8fbb66 | [
"MIT"
] | null | null | null | tests/test_nearest_neighbor_index.py | jkae/knn-exercise | ae569e3f6a0e23669369d99e032270e72f8fbb66 | [
"MIT"
] | null | null | null | """nn_search_test"""
import random
import time
import unittest
from pynn import NearestNeighborIndex
class NearestNeighborIndexTest(unittest.TestCase):
def test_basic(self):
"""
test_basic tests a handful of nearest neighbor queries to make sure they return the right
result.
"""... | 31.282759 | 130 | 0.590388 |
c8f5a4d0f9b7c0ec61601272f122c22958d3d3a2 | 1,754 | py | Python | test/test_coveragejson.py | covjson/covjson-validator | 97b6ee445bfcc70ad73d731dce3d67aa4aafaf3a | [
"BSD-3-Clause"
] | null | null | null | test/test_coveragejson.py | covjson/covjson-validator | 97b6ee445bfcc70ad73d731dce3d67aa4aafaf3a | [
"BSD-3-Clause"
] | 6 | 2022-02-02T16:52:33.000Z | 2022-02-09T09:40:50.000Z | test/test_coveragejson.py | covjson/covjson-validator | 97b6ee445bfcc70ad73d731dce3d67aa4aafaf3a | [
"BSD-3-Clause"
] | null | null | null | # Pytests to test the coveragejson.json schema file
import pytest
from jsonschema.exceptions import ValidationError
from .test_ndArray import get_example_ndarray
from .test_tiledNdArray import get_example_tiled_ndarray
from .test_coverage import get_sample_coverage
from .test_coverageCollection import get_sample_cove... | 25.794118 | 67 | 0.748575 |
c8f5d182313f6c9a81141e71d8d68f9eb3599dc2 | 1,203 | py | Python | examples/ml/h2o.py | Jie-Yuan/1_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | 14 | 2019-06-25T13:46:32.000Z | 2020-10-27T02:04:59.000Z | examples/ml/h2o.py | Jie-Yuan/2_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | null | null | null | examples/ml/h2o.py | Jie-Yuan/2_DataMining | f5338388b4f883233f350d4fb9c5903180883430 | [
"Apache-2.0"
] | 7 | 2019-06-25T13:26:16.000Z | 2020-10-27T02:05:03.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Project : tql-Python.
# @File : h2o
# @Time : 2019-09-16 21:12
# @Author : yuanjie
# @Email : yuanjie@xiaomi.com
# @Software : PyCharm
# @Description :
from sklearn.datasets import make_classification
from sklearn.model_selection ... | 30.075 | 101 | 0.630091 |
c8f60335a43db2c48605b377b385e6282ca5d02e | 2,095 | py | Python | venv/lib/python2.7/site-packages/py2neo/cypher/error/core.py | KairosSystems/drMouse | f98d04084eb1210db88df4c9888eea149ae31b2c | [
"MIT"
] | 9 | 2017-07-15T08:45:22.000Z | 2021-07-06T08:32:03.000Z | venv/lib/python2.7/site-packages/py2neo/cypher/error/core.py | KairosSystems/drMouse | f98d04084eb1210db88df4c9888eea149ae31b2c | [
"MIT"
] | 6 | 2017-05-05T13:11:51.000Z | 2019-01-25T22:46:30.000Z | venv/lib/python2.7/site-packages/py2neo/cypher/error/core.py | KairosSystems/drMouse | f98d04084eb1210db88df4c9888eea149ae31b2c | [
"MIT"
] | 3 | 2018-03-16T14:11:52.000Z | 2020-03-04T02:08:31.000Z | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Copyright 2011-2014, Nigel Small
#
# 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
#
# Unle... | 28.310811 | 107 | 0.688783 |
c8f626c70a2a3594957e0fd6519f5e26dc2b12d1 | 3,564 | py | Python | DailyCodingProblem/28_Palantir_Justtify_text.py | RafayAK/CodingPrep | 718eccb439db0f6e727806964766a40e8234c8a9 | [
"MIT"
] | 5 | 2019-09-07T17:31:17.000Z | 2022-03-05T09:59:46.000Z | DailyCodingProblem/28_Palantir_Justtify_text.py | RafayAK/CodingPrep | 718eccb439db0f6e727806964766a40e8234c8a9 | [
"MIT"
] | null | null | null | DailyCodingProblem/28_Palantir_Justtify_text.py | RafayAK/CodingPrep | 718eccb439db0f6e727806964766a40e8234c8a9 | [
"MIT"
] | 2 | 2019-09-07T17:31:24.000Z | 2019-10-28T16:10:52.000Z | """
This problem was asked by Palantir.
Write an algorithm to justify text. Given a sequence of words and an integer line length k,
return a list of strings which represents each line, fully justified.
More specifically, you should have as many words as possible in each line.
There should be at least one space betwee... | 39.164835 | 129 | 0.695567 |
c8f62e97c4b29e8703fb54b259450297c8b125d5 | 36,175 | py | Python | dblayer/func/func_simpkg.py | IntegrCiTy/dblayer | abb4cdbcb0d2b1dbffb387c14170f2394fa1185f | [
"BSD-2-Clause"
] | 1 | 2019-05-14T09:16:40.000Z | 2019-05-14T09:16:40.000Z | dblayer/func/func_simpkg.py | IntegrCiTy/dblayer | abb4cdbcb0d2b1dbffb387c14170f2394fa1185f | [
"BSD-2-Clause"
] | 7 | 2018-03-14T10:25:50.000Z | 2018-05-08T14:38:48.000Z | dblayer/func/func_simpkg.py | IntegrCiTy/dblayer | abb4cdbcb0d2b1dbffb387c14170f2394fa1185f | [
"BSD-2-Clause"
] | null | null | null | from sqlalchemy.sql import func
import warnings
from urllib.parse import urlparse
import os.path
### For some reason this function does not work ...
def func_cleanup_schema():
"""
Define function call to clean-up schema.
"""
return func.sim_pkg.cleanup_schema().execution_options( autocommit = True )... | 39.108108 | 152 | 0.630712 |
c8f637ed841fbda628c634bc0e6a1199758de0a4 | 465 | py | Python | projects/chatbot-server/nlu/keyword_based/rules/rule_manager.py | JackonYang/projects-in-one | edca9a313bfc80ddd5c1ca20cdfb0e0a12f8fc62 | [
"MIT"
] | 3 | 2021-12-04T09:03:06.000Z | 2022-01-10T07:30:15.000Z | projects/chatbot-server/nlu/keyword_based/rules/rule_manager.py | JackonYang/projects-in-one | edca9a313bfc80ddd5c1ca20cdfb0e0a12f8fc62 | [
"MIT"
] | 1 | 2021-12-04T08:59:00.000Z | 2021-12-07T11:20:18.000Z | projects/chatbot-server/nlu/keyword_based/rules/rule_manager.py | JackonYang/projects-in-one | edca9a313bfc80ddd5c1ca20cdfb0e0a12f8fc62 | [
"MIT"
] | null | null | null | from .simple_rule import SimpleRule
class RuleManager:
active_rules = [
SimpleRule,
]
def load_rules(self):
pass
def apply_rules(self, text):
replys = []
for rule_class in self.active_rules:
rule_obj = rule_class(text)
if rule_obj.match():
... | 19.375 | 54 | 0.550538 |
c8f64012cbe645ca218bbe390351f0284ad59d63 | 4,741 | py | Python | tools/tests/launcher.py | antont/tundra | 5c9b0a3957071f08ab425dff701cdbb34f9e1868 | [
"Apache-2.0"
] | 31 | 2015-01-12T15:20:29.000Z | 2022-02-03T10:04:17.000Z | tools/tests/launcher.py | antont/tundra | 5c9b0a3957071f08ab425dff701cdbb34f9e1868 | [
"Apache-2.0"
] | 2 | 2015-02-04T12:58:05.000Z | 2016-01-04T15:46:48.000Z | tools/tests/launcher.py | antont/tundra | 5c9b0a3957071f08ab425dff701cdbb34f9e1868 | [
"Apache-2.0"
] | 20 | 2015-03-04T02:31:33.000Z | 2022-02-13T18:12:55.000Z | #!/usr/local/bin/python
#import
import os
import sys
import time
import zipfile
import ftplib
import glob
import pexpect
from optparse import OptionParser
import config
# FTP-CONFIG for fileUpload
FTPHOST=config.launcherFTPHOST
FTPUSER=config.launcherFTPUSER
FTPPASSWD=config.launcherFTPPASSWD
#config
testlist = []
r... | 32.472603 | 160 | 0.620122 |
c8f654ada20ef9a47f137abc9521019d2e8e8c05 | 119 | py | Python | iris_sdk/models/maps/roles_list.py | NumberAI/python-bandwidth-iris | 0e05f79d68b244812afb97e00fd65b3f46d00aa3 | [
"MIT"
] | 2 | 2020-04-13T13:47:59.000Z | 2022-02-23T20:32:41.000Z | iris_sdk/models/maps/roles_list.py | bandwidthcom/python-bandwidth-iris | dbcb30569631395041b92917252d913166f7d3c9 | [
"MIT"
] | 5 | 2020-09-18T20:59:24.000Z | 2021-08-25T16:51:42.000Z | iris_sdk/models/maps/roles_list.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 RolesListMap(BaseMap):
role = None | 17 | 49 | 0.756303 |
c8f68532e9553eec9b95612b870520de3fd496a0 | 1,713 | py | Python | api_server/profiles_api/views.py | mihairadu2k/django_api_users | 7b6a4cc67446d4d7dfef6800e723ed3d37a78bc1 | [
"MIT"
] | null | null | null | api_server/profiles_api/views.py | mihairadu2k/django_api_users | 7b6a4cc67446d4d7dfef6800e723ed3d37a78bc1 | [
"MIT"
] | null | null | null | api_server/profiles_api/views.py | mihairadu2k/django_api_users | 7b6a4cc67446d4d7dfef6800e723ed3d37a78bc1 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from rest_framework.views import APIView
from rest_framework import viewsets
from rest_framework.response import Response
from rest_framework import status
from rest_framework.authentication import TokenAuthentication
from rest_framework import filters
from rest_framework.auth... | 35.6875 | 72 | 0.771162 |
c8f692560e53a4e187a9d3ed60f1d3fa79709a32 | 5,555 | py | Python | ielex/settings.py | lingdb/CoBL-public | e50b441c4281b9299fb1cd0b46f906887cb86dd1 | [
"BSD-2-Clause"
] | 3 | 2017-05-30T04:40:43.000Z | 2019-04-25T14:54:54.000Z | ielex/settings.py | lingdb/CoBL-public | e50b441c4281b9299fb1cd0b46f906887cb86dd1 | [
"BSD-2-Clause"
] | null | null | null | ielex/settings.py | lingdb/CoBL-public | e50b441c4281b9299fb1cd0b46f906887cb86dd1 | [
"BSD-2-Clause"
] | 3 | 2018-07-02T13:42:12.000Z | 2019-05-17T13:11:13.000Z | # -*- coding: utf-8 -*-
from __future__ import print_function
import os
import logging
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
VERSION = "1.0"
# Application definition
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'... | 33.263473 | 76 | 0.620702 |
c8f6ca79fe76f65d69de7bae631c92d19fa1f6a3 | 1,236 | py | Python | setup.py | Ankit-Dhankhar/PySyft | 750bd2c3987a570ef1dc8554b933696d416724c7 | [
"Apache-2.0"
] | null | null | null | setup.py | Ankit-Dhankhar/PySyft | 750bd2c3987a570ef1dc8554b933696d416724c7 | [
"Apache-2.0"
] | null | null | null | setup.py | Ankit-Dhankhar/PySyft | 750bd2c3987a570ef1dc8554b933696d416724c7 | [
"Apache-2.0"
] | 1 | 2021-04-18T15:27:15.000Z | 2021-04-18T15:27:15.000Z | import os
from setuptools import find_packages
from setuptools import setup
# Utility function to read the README file.
# Used for the long_description. It's nice, because now 1) we have a top level
# README file and 2) it's easier to type in the README file than to put a raw
# string in below ...
def read(fname):
... | 34.333333 | 132 | 0.723301 |
c8f6cbfeaee52808657bac361b778159be4a900f | 982 | py | Python | alipay/aop/api/response/AlipayOpenAuthOperatorInfoQueryResponse.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/AlipayOpenAuthOperatorInfoQueryResponse.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/AlipayOpenAuthOperatorInfoQueryResponse.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
from alipay.aop.api.domain.OperatorBasicInfo import OperatorBasicInfo
class AlipayOpenAuthOperatorInfoQueryResponse(AlipayResponse):
def __init__(self):
super(AlipayOpenAuthOperato... | 32.733333 | 112 | 0.734216 |
c8f6dda5e255e65f66af27acd241762af298ed06 | 10,897 | py | Python | collections/ansible_collections/ansible/tower/plugins/modules/tower_workflow_job_template.py | hindman-redhat/automated-smart-management-2 | 5450ccd71f2a4ba568a7f11b03466e1554ae0087 | [
"MIT"
] | null | null | null | collections/ansible_collections/ansible/tower/plugins/modules/tower_workflow_job_template.py | hindman-redhat/automated-smart-management-2 | 5450ccd71f2a4ba568a7f11b03466e1554ae0087 | [
"MIT"
] | null | null | null | collections/ansible_collections/ansible/tower/plugins/modules/tower_workflow_job_template.py | hindman-redhat/automated-smart-management-2 | 5450ccd71f2a4ba568a7f11b03466e1554ae0087 | [
"MIT"
] | 2 | 2021-03-30T14:26:02.000Z | 2021-04-01T18:17:29.000Z | #!/usr/bin/python
# coding: utf-8 -*-
# (c) 2020, John Westcott IV <john.westcott.iv@redhat.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version':... | 37.318493 | 132 | 0.683307 |
c8f6ec25ce2c8cad2dc039af18da38a2a1cecc3a | 778 | py | Python | remora/renderer/certs/kubernetes.py | yuanying/remora | b61cfc7c5035d8dc9a887bbdd9da333b05c2f6d3 | [
"Apache-2.0"
] | 5 | 2017-11-24T11:14:39.000Z | 2022-02-07T19:41:16.000Z | remora/renderer/certs/kubernetes.py | yuanying/remora | b61cfc7c5035d8dc9a887bbdd9da333b05c2f6d3 | [
"Apache-2.0"
] | 17 | 2017-04-11T01:35:03.000Z | 2018-07-26T04:21:40.000Z | remora/renderer/certs/kubernetes.py | yuanying/remora | b61cfc7c5035d8dc9a887bbdd9da333b05c2f6d3 | [
"Apache-2.0"
] | 7 | 2017-03-08T04:44:09.000Z | 2022-02-07T19:41:16.000Z | #
# 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
# distr... | 35.363636 | 77 | 0.724936 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.