hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | 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 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | 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 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2e558a6b97966f8cd0fa07448f3d28add3c6c4ed | 8,245 | py | Python | maml/apps/symbolic/_selectors_cvxpy.py | exalearn/maml | 1cf7a093af69dfde27aaecc17d0b9d34d5c3edff | [
"BSD-3-Clause"
] | null | null | null | maml/apps/symbolic/_selectors_cvxpy.py | exalearn/maml | 1cf7a093af69dfde27aaecc17d0b9d34d5c3edff | [
"BSD-3-Clause"
] | null | null | null | maml/apps/symbolic/_selectors_cvxpy.py | exalearn/maml | 1cf7a093af69dfde27aaecc17d0b9d34d5c3edff | [
"BSD-3-Clause"
] | null | null | null | """
This module implements more robust optmization
using the cvxpy package
"""
from typing import Optional, List, Dict, Union
import numpy as np
from scipy.linalg import lstsq
from monty.dev import requires
from maml.apps.symbolic._selectors import BaseSelector
try:
import cvxpy as cp
Expression = cp.expre... | 32.848606 | 108 | 0.588235 |
10ec37ccefb9c234b48cf16ca492b47acbc153c6 | 3,588 | py | Python | gmm_mle/q3.py | nssuperx/PatternRecognition | cfb8de6947c2f01cf7825946e1879836167ba849 | [
"Unlicense"
] | null | null | null | gmm_mle/q3.py | nssuperx/PatternRecognition | cfb8de6947c2f01cf7825946e1879836167ba849 | [
"Unlicense"
] | null | null | null | gmm_mle/q3.py | nssuperx/PatternRecognition | cfb8de6947c2f01cf7825946e1879836167ba849 | [
"Unlicense"
] | null | null | null | # -*- codeing: utf-8 -*-
import numpy as np
from scipy.stats import norm
import matplotlib.pyplot as plt
from matplotlib.ticker import MultipleLocator
# 参考:test_gmm.py
# 混合数5, muとsigmaは関数内で適当に設定
def q3func_gmm(n, fill=0.0):
x = np.zeros(n)
g = np.random.randn(n)
u = np.random.rand(n)
mu = n... | 29.652893 | 79 | 0.564103 |
f5e3dbd7f80a6d939c3323396c89afca28ee410f | 40,773 | py | Python | tornado/websocket.py | fengsp/tornado | 43e23f977715396ce243c6cd7e3387abf2a2e4ee | [
"Apache-2.0"
] | 1 | 2016-04-08T03:23:58.000Z | 2016-04-08T03:23:58.000Z | tornado/websocket.py | fengsp/tornado | 43e23f977715396ce243c6cd7e3387abf2a2e4ee | [
"Apache-2.0"
] | 1 | 2017-09-19T09:52:54.000Z | 2017-09-19T09:52:54.000Z | tornado/websocket.py | fengsp/tornado | 43e23f977715396ce243c6cd7e3387abf2a2e4ee | [
"Apache-2.0"
] | 1 | 2016-09-12T09:32:32.000Z | 2016-09-12T09:32:32.000Z | """Implementation of the WebSocket protocol.
`WebSockets <http://dev.w3.org/html5/websockets/>`_ allow for bidirectional
communication between the browser and server.
WebSockets are supported in the current versions of all major browsers,
although older versions that do not support WebSockets are still in use
(refer ... | 38.356538 | 80 | 0.625929 |
129b21745d4afa68f105bfb64a50ad73a74bd5c3 | 5,556 | py | Python | tensorflow/tools/gcs_test/python/gcs_smoke.py | ankush-me/tensorflow | ec7f37e40fedb23435bfb7e28668e5fa63ff52f3 | [
"Apache-2.0"
] | 2 | 2017-10-14T09:13:27.000Z | 2017-10-26T18:34:28.000Z | tensorflow/tools/gcs_test/python/gcs_smoke.py | kiliczsh/tensorflow | f49aca4532c155597c669cf2189f211cafbebf96 | [
"Apache-2.0"
] | null | null | null | tensorflow/tools/gcs_test/python/gcs_smoke.py | kiliczsh/tensorflow | f49aca4532c155597c669cf2189f211cafbebf96 | [
"Apache-2.0"
] | null | null | null | # 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... | 39.126761 | 80 | 0.690605 |
8dcce585e174a76e4756d85c2fad74ed83ca4909 | 5,752 | py | Python | CadVlan/EquipInterface/business.py | marcusgc/GloboNetworkAPI-WebUI | 1172f14028f9c116d71df7489eda770446b131d2 | [
"Apache-2.0"
] | 17 | 2015-05-19T20:03:45.000Z | 2022-03-24T06:19:47.000Z | CadVlan/EquipInterface/business.py | marcusgc/GloboNetworkAPI-WebUI | 1172f14028f9c116d71df7489eda770446b131d2 | [
"Apache-2.0"
] | 41 | 2015-01-27T18:36:07.000Z | 2021-06-10T20:34:03.000Z | CadVlan/EquipInterface/business.py | marcusgc/GloboNetworkAPI-WebUI | 1172f14028f9c116d71df7489eda770446b131d2 | [
"Apache-2.0"
] | 19 | 2016-09-12T07:35:42.000Z | 2022-01-28T23:46:11.000Z | # -*- coding:utf-8 -*-
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "Lic... | 33.248555 | 109 | 0.613873 |
eb548eaf5a8e2428318c19ddd628f859254079cc | 222 | py | Python | project/settings/base/i18n.py | limitedeternity/django-skeleton | 03001c81e36ae853831e57dea238ff7bddda4dbf | [
"MIT"
] | 2 | 2018-07-10T19:18:32.000Z | 2018-07-22T12:38:21.000Z | project/settings/base/i18n.py | limitedeternity/django-skeleton | 03001c81e36ae853831e57dea238ff7bddda4dbf | [
"MIT"
] | null | null | null | project/settings/base/i18n.py | limitedeternity/django-skeleton | 03001c81e36ae853831e57dea238ff7bddda4dbf | [
"MIT"
] | null | null | null | # Internationalization
# https://docs.djangoproject.com/en/1.11/topics/i18n/
from os.path import join
LANGUAGE_CODE = 'en-us'
USE_I18N = True
USE_L10N = True
LOCALE_PATHS = (join(PROJECT_DIR, 'conf/locale'),)
| 20.181818 | 54 | 0.711712 |
8ba7ef9bfef32b1d57db1c4383c81ae19b88b394 | 6,885 | py | Python | tests/metrics/test_compute_kid.py | houliangict/mimicry | d9e43940254de4a85c78e644f2d2b1135de4b50d | [
"MIT"
] | 560 | 2020-03-31T07:07:26.000Z | 2022-03-15T08:29:37.000Z | tests/metrics/test_compute_kid.py | houliangict/mimicry | d9e43940254de4a85c78e644f2d2b1135de4b50d | [
"MIT"
] | 34 | 2020-03-31T02:42:16.000Z | 2021-12-10T15:47:30.000Z | tests/metrics/test_compute_kid.py | houliangict/mimicry | d9e43940254de4a85c78e644f2d2b1135de4b50d | [
"MIT"
] | 63 | 2020-04-04T09:56:22.000Z | 2022-03-15T02:34:58.000Z | import os
import shutil
import pytest
import numpy as np
import tensorflow as tf
import torch
from torch_mimicry.metrics import compute_kid
from torch_mimicry.metrics.inception_model import inception_utils
from torch_mimicry.nets.gan import gan
class ExampleGen(gan.BaseGenerator):
def __init__(self,
... | 34.949239 | 79 | 0.501235 |
3a997e6ec7941536f1cf10faae587fed4a6aedf9 | 489 | py | Python | apps/imgur/migrations/0004_post_created.py | vanyakosmos/memes-reposter | 7bcd1117a81777f0662bcca38690de0c0404dbfa | [
"MIT"
] | 26 | 2019-01-19T21:07:57.000Z | 2022-03-07T16:07:52.000Z | apps/imgur/migrations/0004_post_created.py | vaniakosmos/telemgur | 7bcd1117a81777f0662bcca38690de0c0404dbfa | [
"MIT"
] | 7 | 2020-02-11T22:59:44.000Z | 2021-06-21T07:44:56.000Z | apps/imgur/migrations/0004_post_created.py | vaniakosmos/telemgur | 7bcd1117a81777f0662bcca38690de0c0404dbfa | [
"MIT"
] | 9 | 2018-09-21T06:38:08.000Z | 2022-01-26T11:57:28.000Z | # Generated by Django 2.0.3 on 2018-07-01 10:07
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('imgur', '0003_auto_20180630_1810'),
]
operations = [
migrations.AddField(
model_name='post',
... | 23.285714 | 93 | 0.631902 |
284e287a3688f8daccb2ecba33a564e28d5f71eb | 1,020 | py | Python | blockapi/api/__init__.py | galvanizze/blockapi | d46fc17861d6e914b823bbbf77e312dcaac1b6af | [
"MIT"
] | null | null | null | blockapi/api/__init__.py | galvanizze/blockapi | d46fc17861d6e914b823bbbf77e312dcaac1b6af | [
"MIT"
] | null | null | null | blockapi/api/__init__.py | galvanizze/blockapi | d46fc17861d6e914b823bbbf77e312dcaac1b6af | [
"MIT"
] | null | null | null | from blockapi.api.alethio import *
from blockapi.api.binance import *
from blockapi.api.blockchaininfo import *
from blockapi.api.blockchainos import *
from blockapi.api.blockchair import *
from blockapi.api.blockcypher import *
from blockapi.api.blockonomics import *
from blockapi.api.blockscout import *
from blockapi... | 35.172414 | 42 | 0.807843 |
31e6ca5fd267d56e197395ccebec90a010e945aa | 169 | py | Python | chapter03/my_test4.py | stavinski/grayhat_python_redux | 882b66616426a5dc774331ad1894049d19702424 | [
"MIT"
] | 4 | 2019-07-03T08:41:03.000Z | 2022-02-22T03:36:01.000Z | chapter03/my_test4.py | stavinski/grayhat_python_redux | 882b66616426a5dc774331ad1894049d19702424 | [
"MIT"
] | null | null | null | chapter03/my_test4.py | stavinski/grayhat_python_redux | 882b66616426a5dc774331ad1894049d19702424 | [
"MIT"
] | null | null | null | import my_debugger
debugger = my_debugger.debugger()
pid = raw_input("Enter PID of process to attach to: ")
debugger.attach(int(pid))
debugger.run()
debugger.detach()
| 18.777778 | 54 | 0.757396 |
2b7fb186402f997a2141bae6b11bcd88a8a32e04 | 20 | py | Python | Boolean/Boolean15.py | liyuanyuan11/Python | d94cc7ab39e56c6e24bfc741a30da77590d1d220 | [
"MIT"
] | null | null | null | Boolean/Boolean15.py | liyuanyuan11/Python | d94cc7ab39e56c6e24bfc741a30da77590d1d220 | [
"MIT"
] | null | null | null | Boolean/Boolean15.py | liyuanyuan11/Python | d94cc7ab39e56c6e24bfc741a30da77590d1d220 | [
"MIT"
] | null | null | null | print(True and True) | 20 | 20 | 0.8 |
c9966126aca41191d74a67f4a782be2fc8e310fb | 1,868 | py | Python | deeplearn_base/test/test_start_container.py | Data-drone/dl_toolk | a4b620fe5a9f1e1cecff14e51c711fd41003fc46 | [
"Apache-2.0"
] | 2 | 2019-08-10T10:29:21.000Z | 2019-08-12T14:54:12.000Z | deeplearn_base/test/test_start_container.py | Data-drone/dl_toolk | a4b620fe5a9f1e1cecff14e51c711fd41003fc46 | [
"Apache-2.0"
] | null | null | null | deeplearn_base/test/test_start_container.py | Data-drone/dl_toolk | a4b620fe5a9f1e1cecff14e51c711fd41003fc46 | [
"Apache-2.0"
] | 1 | 2018-10-17T18:52:34.000Z | 2018-10-17T18:52:34.000Z | # Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
import logging
import pytest
LOGGER = logging.getLogger(__name__)
@pytest.mark.parametrize(
"env,expected_server",
[
(["JUPYTER_ENABLE_LAB=yes"], "lab"),
(None, "notebook"),
],
)
def test... | 35.245283 | 103 | 0.661135 |
bbada056f120650b95f83a96a363e343ba3c95c5 | 598 | py | Python | vkbottle/types/responses/likes.py | LouisPython217/vkbottle | 3541bbdb66f32c2d3567b0047c36b706ac72bb3b | [
"MIT"
] | null | null | null | vkbottle/types/responses/likes.py | LouisPython217/vkbottle | 3541bbdb66f32c2d3567b0047c36b706ac72bb3b | [
"MIT"
] | null | null | null | vkbottle/types/responses/likes.py | LouisPython217/vkbottle | 3541bbdb66f32c2d3567b0047c36b706ac72bb3b | [
"MIT"
] | null | null | null | import typing
from ..base import BaseModel
from vkbottle.types import objects
class IsLiked(BaseModel):
liked: objects.base.BoolInt = None
copied: objects.base.BoolInt = None
class IsLikedModel(BaseModel):
response: IsLiked = None
class Add(BaseModel):
likes: int = None
class AddModel(BaseModel)... | 15.736842 | 39 | 0.70903 |
c3bf0bcc6f6f35546a710791915729a195351401 | 386 | py | Python | intermediates-python/1. Matplotlib/script_8.py | nhutnamhcmus/datacamp-playground | 25457e813b1145e1d335562286715eeddd1c1a7b | [
"MIT"
] | 1 | 2021-05-08T11:09:27.000Z | 2021-05-08T11:09:27.000Z | intermediates-python/1. Matplotlib/script_8.py | nhutnamhcmus/datacamp-playground | 25457e813b1145e1d335562286715eeddd1c1a7b | [
"MIT"
] | 1 | 2022-03-12T15:42:14.000Z | 2022-03-12T15:42:14.000Z | intermediates-python/1. Matplotlib/script_8.py | nhutnamhcmus/datacamp-playground | 25457e813b1145e1d335562286715eeddd1c1a7b | [
"MIT"
] | 1 | 2021-04-30T18:24:19.000Z | 2021-04-30T18:24:19.000Z | import matplotlib.pyplot as plt
# Basic scatter plot, log scale
plt.scatter(gdp_cap, life_exp)
plt.xscale('log')
# Strings
xlab = 'GDP per Capita [in USD]'
ylab = 'Life Expectancy [in years]'
title = 'World Development in 2007'
# Add axis labels
plt.xlabel(xlab)
plt.ylabel(ylab)
# Add title
plt.t... | 17.545455 | 38 | 0.686528 |
759cc8130e60f8dcf6b86e3fe6e882374db0f382 | 399 | py | Python | hrwros_ws/build/hrwros_week3/catkin_generated/pkg.develspace.context.pc.py | AshfakYeafi/ros | 7895302251088b7945e359f60a9c617e5170a72e | [
"MIT"
] | null | null | null | hrwros_ws/build/hrwros_week3/catkin_generated/pkg.develspace.context.pc.py | AshfakYeafi/ros | 7895302251088b7945e359f60a9c617e5170a72e | [
"MIT"
] | null | null | null | hrwros_ws/build/hrwros_week3/catkin_generated/pkg.develspace.context.pc.py | AshfakYeafi/ros | 7895302251088b7945e359f60a9c617e5170a72e | [
"MIT"
] | null | null | null | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else []
PROJECT_CATKIN_DEPENDS = "".replace(';', ' ')
PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else []
PROJECT_NAME = "hrwros_week3"
PROJECT_SPACE_DIR = "/h... | 44.333333 | 75 | 0.714286 |
ced59456e3d203a6b9aca6da83f1faeb930bef43 | 239 | py | Python | torrentscraper/datastruct/tvcalendar_instance.py | AsiganTheSunk/python-torrent-scrapper | 30f27962e795840b82d47398e05664429829ff2b | [
"Apache-2.0"
] | 5 | 2018-05-19T06:18:01.000Z | 2020-01-14T23:17:30.000Z | torrentscraper/datastruct/tvcalendar_instance.py | AsiganTheSunk/python-torrent-scrapper | 30f27962e795840b82d47398e05664429829ff2b | [
"Apache-2.0"
] | 9 | 2018-05-24T01:02:46.000Z | 2020-02-13T22:35:43.000Z | torrentscraper/datastruct/tvcalendar_instance.py | AsiganTheSunk/python-torrent-scrapper | 30f27962e795840b82d47398e05664429829ff2b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
class TVCalendarInstance():
def __init__(self, main_month_uri):
self.main_month_uri = main_month_uri
self.next_month_uri = ''
self.previous_month_uri = ''
self.main_calendar = {}
| 26.555556 | 44 | 0.656904 |
48ef51c315db4f4c97e0a147edb1579d40e48011 | 2,493 | py | Python | stixcore/products/tests/test_quicklook.py | samaloney/STIXCore | ad9526cc37701aabcbe64bea249cb77d2313e5c6 | [
"BSD-3-Clause"
] | 1 | 2021-07-15T14:57:25.000Z | 2021-07-15T14:57:25.000Z | stixcore/products/tests/test_quicklook.py | samaloney/STIXCore | ad9526cc37701aabcbe64bea249cb77d2313e5c6 | [
"BSD-3-Clause"
] | null | null | null | stixcore/products/tests/test_quicklook.py | samaloney/STIXCore | ad9526cc37701aabcbe64bea249cb77d2313e5c6 | [
"BSD-3-Clause"
] | null | null | null | import re
from unittest.mock import patch
import pytest
from stixcore.data.test import test_data
from stixcore.products.level0 import quicklook as qll0
from stixcore.products.level1 import quicklook as qll1
testpackets = [(test_data.tmtc.TM_21_6_30, qll0.LightCurve, 'ql-lightcurve',
'0659402030f00007... | 38.953125 | 99 | 0.677898 |
cdcdfe7f0f57635d696981e037d59b9857ff2a84 | 2,620 | py | Python | setup.py | AyrtonB/ipycanvas | 96064b7dbd86e71d47146033573c372224c14162 | [
"BSD-3-Clause"
] | null | null | null | setup.py | AyrtonB/ipycanvas | 96064b7dbd86e71d47146033573c372224c14162 | [
"BSD-3-Clause"
] | null | null | null | setup.py | AyrtonB/ipycanvas | 96064b7dbd86e71d47146033573c372224c14162 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
from __future__ import print_function
from glob import glob
from os.path import join as pjoin
from os import path
from jupyter_packaging import (
create_cmdclass, install_np... | 25.436893 | 81 | 0.659924 |
45b757f433ba659a4aef86c5df6ca3ec29726681 | 40,203 | py | Python | tensorflow_probability/python/experimental/mcmc/windowed_sampling.py | axch/probability | b112faafc593d18e6adf4c85fa8e0ce37b29f400 | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/experimental/mcmc/windowed_sampling.py | axch/probability | b112faafc593d18e6adf4c85fa8e0ce37b29f400 | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/experimental/mcmc/windowed_sampling.py | axch/probability | b112faafc593d18e6adf4c85fa8e0ce37b29f400 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The TensorFlow Probability Authors.
#
# Licensed under the Apache License, Version 2.0 (the 'License');
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 42.45301 | 119 | 0.708479 |
505a3c1be35ff1ab9a1585eb9bb0cde57a5e0a30 | 12,464 | py | Python | src/sage/combinat/output.py | bopopescu/sage | 2d495be78e0bdc7a0a635454290b27bb4f5f70f0 | [
"BSL-1.0"
] | 3 | 2019-07-15T13:48:24.000Z | 2019-11-08T12:31:43.000Z | src/sage/combinat/output.py | bopopescu/sage | 2d495be78e0bdc7a0a635454290b27bb4f5f70f0 | [
"BSL-1.0"
] | 2 | 2018-10-30T13:40:20.000Z | 2020-07-23T12:13:30.000Z | src/sage/combinat/output.py | bopopescu/sage | 2d495be78e0bdc7a0a635454290b27bb4f5f70f0 | [
"BSL-1.0"
] | 1 | 2019-06-02T03:16:55.000Z | 2019-06-02T03:16:55.000Z | """
Output functions
These are the output functions for latexing partitions and tableaux.
AUTHORS:
- Mike Hansen (?): initial version
- Andrew Mathas (2013-02-14): Added support for displaying conventions and
lines, and tableaux of skew partition, composition, and
skew/composition/partition/tableaux tuple shape.... | 40.732026 | 119 | 0.518935 |
36d911b9e9acfb4d7670c457a12df0aa69c636dd | 22,159 | py | Python | examples/tensorflow/question-answering/utils_qa.py | MichalPitr/transformers | 8b26688e2e4b68a64f4710b3627439089947cb08 | [
"Apache-2.0"
] | 101 | 2021-12-22T00:03:51.000Z | 2022-03-30T07:39:09.000Z | examples/tensorflow/question-answering/utils_qa.py | MichalPitr/transformers | 8b26688e2e4b68a64f4710b3627439089947cb08 | [
"Apache-2.0"
] | 5 | 2021-12-30T07:01:11.000Z | 2022-03-28T01:56:04.000Z | examples/tensorflow/question-answering/utils_qa.py | MichalPitr/transformers | 8b26688e2e4b68a64f4710b3627439089947cb08 | [
"Apache-2.0"
] | 11 | 2021-12-30T06:18:04.000Z | 2022-03-28T13:50:00.000Z | # coding=utf-8
# Copyright 2020 The HuggingFace Team 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... | 52.016432 | 135 | 0.642087 |
517149aa62cbe4a2cd19156a0e76009f5846dc49 | 876 | py | Python | validators/truthy.py | alimcmaster1/validators | 29df0817d840263c371c32bd704706c6a8a36a85 | [
"MIT"
] | 586 | 2015-01-17T08:54:54.000Z | 2022-03-26T08:32:58.000Z | validators/truthy.py | alimcmaster1/validators | 29df0817d840263c371c32bd704706c6a8a36a85 | [
"MIT"
] | 157 | 2015-06-24T07:29:04.000Z | 2022-03-19T07:29:03.000Z | validators/truthy.py | alimcmaster1/validators | 29df0817d840263c371c32bd704706c6a8a36a85 | [
"MIT"
] | 138 | 2015-06-22T14:27:35.000Z | 2022-03-27T21:00:25.000Z | from .utils import validator
@validator
def truthy(value):
"""
Validate that given value is not a falsey value.
This validator is based on `WTForms DataRequired validator`_.
.. _WTForms DataRequired validator:
https://github.com/wtforms/wtforms/blob/master/wtforms/validators.py
Examples:... | 21.9 | 75 | 0.579909 |
49afa85406380c1aa16db0af8922d7ac3dc91368 | 590 | py | Python | src/utils/files.py | amanmalali/CompilerDock | 0157c03c86ce9596ae7dfaaf298b794848e0c98b | [
"MIT"
] | 10 | 2020-06-28T14:25:17.000Z | 2021-12-29T01:21:35.000Z | src/utils/files.py | amanmalali/CompilerDock | 0157c03c86ce9596ae7dfaaf298b794848e0c98b | [
"MIT"
] | 3 | 2020-07-10T10:48:42.000Z | 2020-07-26T14:08:15.000Z | src/utils/files.py | amanmalali/CompilerDock | 0157c03c86ce9596ae7dfaaf298b794848e0c98b | [
"MIT"
] | 1 | 2020-06-28T14:31:15.000Z | 2020-06-28T14:31:15.000Z | def init_dir(dest, filenames):
for name in filenames:
with open(f"{dest}/{name}", "w") as _:
pass
def create_files(data, filename, dest):
with open(f"{dest}/{filename}", "w") as file:
file.write(data)
def error_check(dest, filename):
with open(f"{dest}/{filename}", "r") as er... | 24.583333 | 55 | 0.574576 |
c49ce66c207dcd98e024e62b8b455177fe920eca | 10,857 | py | Python | venv/Lib/site-packages/astroid/helpers.py | msactiondigital/mslearn-django-models-data | 0833beaeac9aa1664193557a405e1e536ca411c2 | [
"CC-BY-4.0",
"MIT"
] | null | null | null | venv/Lib/site-packages/astroid/helpers.py | msactiondigital/mslearn-django-models-data | 0833beaeac9aa1664193557a405e1e536ca411c2 | [
"CC-BY-4.0",
"MIT"
] | null | null | null | venv/Lib/site-packages/astroid/helpers.py | msactiondigital/mslearn-django-models-data | 0833beaeac9aa1664193557a405e1e536ca411c2 | [
"CC-BY-4.0",
"MIT"
] | null | null | null | # Copyright (c) 2015-2020 Claudiu Popa <pcmanticore@gmail.com>
# Copyright (c) 2015-2016 Ceridwen <ceridwenv@gmail.com>
# Copyright (c) 2018 Bryce Guinta <bryce.paul.guinta@gmail.com>
# Copyright (c) 2020-2021 hippo91 <guillaume.peillex@gmail.com>
# Copyright (c) 2020 Simon Hewitt <si@sjhewitt.co.uk>
# Copyright (c) 20... | 34.357595 | 85 | 0.677719 |
d27f642f0169d4592e8623dd7ed3ce2c2f83ff2f | 9,739 | py | Python | python-sdk/nuscenes/eval/detection/evaluate_wrapper.py | recogni/nuscenes-devkit | 023dbc213b13b7026fc7723a93ceab717752678d | [
"Apache-2.0"
] | null | null | null | python-sdk/nuscenes/eval/detection/evaluate_wrapper.py | recogni/nuscenes-devkit | 023dbc213b13b7026fc7723a93ceab717752678d | [
"Apache-2.0"
] | 1 | 2021-12-20T15:03:04.000Z | 2021-12-21T08:53:49.000Z | python-sdk/nuscenes/eval/detection/evaluate_wrapper.py | recogni/nuscenes-devkit | 023dbc213b13b7026fc7723a93ceab717752678d | [
"Apache-2.0"
] | null | null | null | # nuScenes dev-kit eval wrapper copied from python-sdk/nuscenes/eval/detection/evaluate.py.
# Original code written by Holger Caesar & Oscar Beijbom, 2018. Edited for internal usage.
from typing import List
from pyquaternion import Quaternion
from typing import Tuple, Dict, Any
from glob import glob
import numpy as np... | 44.880184 | 154 | 0.624705 |
41ee1cd723c81ab4770567d1688f6df6e1fc8512 | 4,217 | py | Python | kaa/ui/selectlist/selectlist.py | tnhung2011/kaa | e6a8819a5ecba04b7db8303bd5736b5a7c9b822d | [
"Unlicense"
] | 82 | 2015-01-26T15:34:03.000Z | 2021-12-03T14:34:23.000Z | kaa/ui/selectlist/selectlist.py | tnhung2011/kaa | e6a8819a5ecba04b7db8303bd5736b5a7c9b822d | [
"Unlicense"
] | 34 | 2015-02-09T08:13:05.000Z | 2021-04-08T08:19:05.000Z | kaa/ui/selectlist/selectlist.py | tnhung2011/kaa | e6a8819a5ecba04b7db8303bd5736b5a7c9b822d | [
"Unlicense"
] | 15 | 2015-05-21T07:41:17.000Z | 2021-10-16T13:33:22.000Z | import collections
from kaa import document
from kaa.ui.dialog import dialogmode
from kaa.keyboard import *
from kaa.command import commandid, norec, norerun
SelectItem = collections.namedtuple(
'SelectItem', ['style', 'activestyle', 'text', 'value'])
selectlist_keys = {
down: 'selectitemlist.next',
(ctr... | 28.493243 | 73 | 0.548968 |
a09c04da72c10679bbb1107e5106397be30deb15 | 1,303 | py | Python | release/stubs.min/System/Drawing/Configuration.py | tranconbv/ironpython-stubs | a601759e6c6819beff8e6b639d18a24b7e351851 | [
"MIT"
] | null | null | null | release/stubs.min/System/Drawing/Configuration.py | tranconbv/ironpython-stubs | a601759e6c6819beff8e6b639d18a24b7e351851 | [
"MIT"
] | null | null | null | release/stubs.min/System/Drawing/Configuration.py | tranconbv/ironpython-stubs | a601759e6c6819beff8e6b639d18a24b7e351851 | [
"MIT"
] | null | null | null | # encoding: utf-8
# module System.Drawing.Configuration calls itself Configuration
# from System.Drawing,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a
# by generator 1.145
# no doc
# no imports
# no functions
# classes
class SystemDrawingSection(ConfigurationSection):
""" SystemDrawingSe... | 33.410256 | 148 | 0.753645 |
e07d7d992629943db97eaa0fbf1f57112ff004b7 | 6,252 | py | Python | mbed-os/tools/export/iar/__init__.py | ghsecuritylab/BLEClient_mbedDevConn_Watson | f162ec8a99ab3b21cee28aaed65da60cf5dd6618 | [
"Apache-2.0"
] | 1 | 2019-05-28T04:54:23.000Z | 2019-05-28T04:54:23.000Z | mbed-os/tools/export/iar/__init__.py | ghsecuritylab/BLEClient_mbedDevConn_Watson | f162ec8a99ab3b21cee28aaed65da60cf5dd6618 | [
"Apache-2.0"
] | 1 | 2017-02-20T10:48:02.000Z | 2017-02-21T11:34:16.000Z | mbed-os/tools/export/iar/__init__.py | ghsecuritylab/BLEClient_mbedDevConn_Watson | f162ec8a99ab3b21cee28aaed65da60cf5dd6618 | [
"Apache-2.0"
] | 3 | 2017-02-07T15:06:06.000Z | 2021-02-19T13:56:31.000Z | import os
from os.path import sep, join, exists
from collections import namedtuple
from subprocess import Popen, PIPE
import shutil
import re
import sys
from tools.targets import TARGET_MAP
from tools.export.exporters import Exporter
import json
from tools.export.cmsis import DeviceCMSIS
from multiprocessing import cp... | 34.927374 | 88 | 0.580294 |
cf08de47d09ec22209a3aab1f70c911b7720cd5d | 12,547 | py | Python | pymcuprog/serialupdi/application.py | KrystianD-contribution/pymcuprog | a9411a8e4a5db8b54517c51da0bae96bf8385a65 | [
"MIT"
] | 28 | 2021-05-08T19:28:33.000Z | 2022-03-23T06:23:13.000Z | pymcuprog/serialupdi/application.py | KrystianD-contribution/pymcuprog | a9411a8e4a5db8b54517c51da0bae96bf8385a65 | [
"MIT"
] | 20 | 2021-05-24T19:20:39.000Z | 2022-03-12T20:10:30.000Z | pymcuprog/serialupdi/application.py | KrystianD-contribution/pymcuprog | a9411a8e4a5db8b54517c51da0bae96bf8385a65 | [
"MIT"
] | 11 | 2021-06-24T20:59:16.000Z | 2022-03-23T23:59:38.000Z | """
Application layer for UPDI stack
"""
from logging import getLogger
from pymcuprog.pymcuprog_errors import PymcuprogError
from . import constants
from .link import UpdiDatalink16bit, UpdiDatalink24bit
from .nvm import NvmUpdi, NvmUpdiV0, NvmUpdiAvrV2, NvmUpdiAvrV3
from .readwrite import UpdiReadWrite
from .physical ... | 34.949861 | 115 | 0.61441 |
00192650405c5d6fe5d1f6544212b973c6ed10b5 | 13,221 | py | Python | components/espcoredump/espcoredump.py | mbrunnen/hal_espressif | 4f2f7d18a5be962ad0c8bcb3e9fbe010d9df80ee | [
"Apache-2.0"
] | 7 | 2020-12-10T14:48:17.000Z | 2022-03-09T14:58:06.000Z | components/espcoredump/espcoredump.py | mbrunnen/hal_espressif | 4f2f7d18a5be962ad0c8bcb3e9fbe010d9df80ee | [
"Apache-2.0"
] | 24 | 2020-12-10T11:29:39.000Z | 2022-03-21T16:18:12.000Z | components/espcoredump/espcoredump.py | mbrunnen/hal_espressif | 4f2f7d18a5be962ad0c8bcb3e9fbe010d9df80ee | [
"Apache-2.0"
] | 16 | 2020-12-10T11:11:20.000Z | 2022-02-22T12:59:19.000Z | #!/usr/bin/env python
#
# ESP32 core dump Utility
import argparse
import logging
import os
import subprocess
import sys
from shutil import copyfile
from construct import GreedyRange, Int32ul, Struct
from corefile import __version__, xtensa
from corefile.elf import TASK_STATUS_CORRECT, ElfFile, ElfSegment, ESPCoreDump... | 44.07 | 115 | 0.553438 |
126e165b2c882acbbb1ce347dc28b3d8dc3875a7 | 3,254 | py | Python | bookkeeping/evEbitdaUpdate.py | investr/investr-docker | f58bf446185b88e447b94bd8bebcc38ac5d0c3a4 | [
"MIT"
] | 35 | 2019-07-25T05:47:57.000Z | 2022-01-30T11:36:09.000Z | bookkeeping/evEbitdaUpdate.py | cbzxt/investr-docker | 592640bafe9612976fff329e45daf4efcc8450bb | [
"MIT"
] | 3 | 2019-08-13T13:30:09.000Z | 2019-08-23T04:10:03.000Z | bookkeeping/evEbitdaUpdate.py | cbzxt/investr-docker | 592640bafe9612976fff329e45daf4efcc8450bb | [
"MIT"
] | 11 | 2019-07-25T07:42:12.000Z | 2020-06-27T07:18:51.000Z | #!/usr/bin/env python
# Initially created by: Chirag Rathod for https://investr.co.in (Gentle Request: Please don't delete this line)
#
# Updates enterprise value and EBITDA
#
# Note: This script silently passes the exceptions so be careful!
# Check the log file for any exceptions.
#
import os
import sys
import tra... | 32.54 | 143 | 0.594038 |
7ad40f76349177e6b366e443bbd2bd27ff095c62 | 15,656 | py | Python | tests/test_bcrypt.py | balabit-deps/balabit-os-7-python-bcrypt | bf0105f1a09bd668e6f61a5497ae528cd0877080 | [
"Apache-2.0"
] | null | null | null | tests/test_bcrypt.py | balabit-deps/balabit-os-7-python-bcrypt | bf0105f1a09bd668e6f61a5497ae528cd0877080 | [
"Apache-2.0"
] | null | null | null | tests/test_bcrypt.py | balabit-deps/balabit-os-7-python-bcrypt | bf0105f1a09bd668e6f61a5497ae528cd0877080 | [
"Apache-2.0"
] | null | null | null | import os
import pytest
import six
import bcrypt
_test_vectors = [
(
b"Kk4DQuMMfZL9o",
b"$2b$04$cVWp4XaNU8a4v1uMRum2SO",
b"$2b$04$cVWp4XaNU8a4v1uMRum2SO026BWLIoQMD/TXg5uZV.0P.uO8m3YEm",
),
(
b"9IeRXmnGxMYbs",
b"$2b$04$pQ7gRO7e6wx/936oXhNjrO",
b"$2b$04$pQ7... | 33.960954 | 79 | 0.627299 |
e0f07f13b6ce7a4c7cef814f50fc49aefcd5423e | 322 | py | Python | reactivestreams/subscription.py | Precognize/rsocket-py | 31704d53c232e0c0f53783b9a56117e5bd0645ce | [
"MIT"
] | null | null | null | reactivestreams/subscription.py | Precognize/rsocket-py | 31704d53c232e0c0f53783b9a56117e5bd0645ce | [
"MIT"
] | null | null | null | reactivestreams/subscription.py | Precognize/rsocket-py | 31704d53c232e0c0f53783b9a56117e5bd0645ce | [
"MIT"
] | null | null | null | from abc import ABCMeta, abstractmethod
class Subscription(metaclass=ABCMeta):
@abstractmethod
def request(self, n: int):
...
@abstractmethod
def cancel(self):
...
class DefaultSubscription(Subscription):
def request(self, n: int):
pass
def cancel(self):
pas... | 16.1 | 40 | 0.624224 |
5ba4715c45b716fb295eb9544e538d6873238a98 | 472 | py | Python | WEB-INF/addons/helloworld/setup.py | wnagy/pymframe | 1b0a220ad943ad4ca2d712e308d9a72d7388e831 | [
"Apache-2.0"
] | null | null | null | WEB-INF/addons/helloworld/setup.py | wnagy/pymframe | 1b0a220ad943ad4ca2d712e308d9a72d7388e831 | [
"Apache-2.0"
] | null | null | null | WEB-INF/addons/helloworld/setup.py | wnagy/pymframe | 1b0a220ad943ad4ca2d712e308d9a72d7388e831 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Helloworld Addon
W. Nagy
Minimales Plugin
Verwendet lokales Config und Controller des aufrufenden Programms.
"""
from helloworld.conf.config import Config as HelloworldConfig
class Helloworld(object):
controller = None
def __init__(self,controller):
self.controlle... | 20.521739 | 83 | 0.70339 |
8486a84b5d143fee738e6079d074c5af9a420842 | 487 | py | Python | src/sphinxcontrib/yamcs/javadoc.py | yamcs/sphinxcontrib-yamcs | 721f0df3ad2137e67cf3cd664cb358655fb0df57 | [
"BSD-2-Clause"
] | null | null | null | src/sphinxcontrib/yamcs/javadoc.py | yamcs/sphinxcontrib-yamcs | 721f0df3ad2137e67cf3cd664cb358655fb0df57 | [
"BSD-2-Clause"
] | null | null | null | src/sphinxcontrib/yamcs/javadoc.py | yamcs/sphinxcontrib-yamcs | 721f0df3ad2137e67cf3cd664cb358655fb0df57 | [
"BSD-2-Clause"
] | null | null | null | from docutils import nodes, utils
def javadoc_role(role, rawtext, text, lineno, inliner, options={}, content=[]):
print_short_name = text.startswith("~")
if print_short_name:
text = text[1:]
idx = text.rindex(".")
label = text[(idx + 1) :]
else:
label = text
ref = "htt... | 30.4375 | 81 | 0.603696 |
b74fb140bfff012e7f0c4330c7dbf721547c6ef7 | 614 | py | Python | Tests/image_tests/renderpasses/test_MVecRaster.py | wsqjny/Falcor | 9ebbb0a0426304a542a6ec314c9470e0c043093f | [
"BSD-3-Clause"
] | 1,615 | 2017-07-28T05:41:39.000Z | 2022-03-31T16:31:57.000Z | Tests/image_tests/renderpasses/test_MVecRaster.py | shill-lucasfilm/Falcor | 5236495554f57a734cc815522d95ae9a7dfe458a | [
"BSD-3-Clause"
] | 232 | 2017-08-03T10:58:41.000Z | 2022-03-31T16:17:46.000Z | Tests/image_tests/renderpasses/test_MVecRaster.py | shill-lucasfilm/Falcor | 5236495554f57a734cc815522d95ae9a7dfe458a | [
"BSD-3-Clause"
] | 383 | 2017-07-30T04:28:34.000Z | 2022-03-30T05:12:13.000Z | import sys
sys.path.append('..')
from helpers import render_frames
from graphs.MVecRaster import MVecRaster as g
from falcor import *
sceneFile = 'Cerberus/Standard/Cerberus.pyscene'
m.addGraph(g)
m.loadScene(sceneFile)
# default
render_frames(m, 'default', frames=[1,16,64])
# re-load scene with 32-bit indices
m.lo... | 23.615385 | 71 | 0.778502 |
92f2f0df370ff6ad3c19574c1c849f73c1ae1bfc | 1,015 | py | Python | like/migrations/0001_initial.py | engineer237/Project-Track-Api | 505f95d886144bbafd00797b25bd1c8940529e3f | [
"MIT"
] | null | null | null | like/migrations/0001_initial.py | engineer237/Project-Track-Api | 505f95d886144bbafd00797b25bd1c8940529e3f | [
"MIT"
] | null | null | null | like/migrations/0001_initial.py | engineer237/Project-Track-Api | 505f95d886144bbafd00797b25bd1c8940529e3f | [
"MIT"
] | null | null | null | # Generated by Django 4.0.3 on 2022-04-12 14:56
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('projects', '0001_initial'),
migrations.swappable_dependency(set... | 36.25 | 152 | 0.64335 |
8832466f0080748ab58ed182b56c139d2895ddc0 | 805 | py | Python | 143. Reorder List/143. Reorder List.py | JawadAsifBD/leetcode | 15c3bd0363f2a0bf2956fec38c095a955ca6c000 | [
"MIT"
] | null | null | null | 143. Reorder List/143. Reorder List.py | JawadAsifBD/leetcode | 15c3bd0363f2a0bf2956fec38c095a955ca6c000 | [
"MIT"
] | null | null | null | 143. Reorder List/143. Reorder List.py | JawadAsifBD/leetcode | 15c3bd0363f2a0bf2956fec38c095a955ca6c000 | [
"MIT"
] | null | null | null | # Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def reorderList(self, head: Optional[ListNode]) -> None:
"""
Do not return anything, modify head in-place instead.
"""
... | 23.676471 | 61 | 0.437267 |
b8937c4552267629592829c87850c33dc40f30e5 | 18,398 | py | Python | test/functional/test_framework/comptool.py | ravenjetcoin/ravenjetcoin | 6b76a19818f26ffde5bc9dd6bb5385143d8417b3 | [
"MIT"
] | null | null | null | test/functional/test_framework/comptool.py | ravenjetcoin/ravenjetcoin | 6b76a19818f26ffde5bc9dd6bb5385143d8417b3 | [
"MIT"
] | null | null | null | test/functional/test_framework/comptool.py | ravenjetcoin/ravenjetcoin | 6b76a19818f26ffde5bc9dd6bb5385143d8417b3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Copyright (c) 2017 The Marlin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Compare two or more marlinds to each other.
To use, cr... | 45.093137 | 149 | 0.601044 |
2720e91bc30bf9ae3b1e75d301b22a1d046f6bcf | 15,310 | py | Python | worker/tasks/sen2agri_tasks_l3a.py | wscullen/tile_viewer_api | da4aeb14aefe4ab5e3c1c7f573d726d71a14cbe7 | [
"MIT"
] | null | null | null | worker/tasks/sen2agri_tasks_l3a.py | wscullen/tile_viewer_api | da4aeb14aefe4ab5e3c1c7f573d726d71a14cbe7 | [
"MIT"
] | null | null | null | worker/tasks/sen2agri_tasks_l3a.py | wscullen/tile_viewer_api | da4aeb14aefe4ab5e3c1c7f573d726d71a14cbe7 | [
"MIT"
] | 1 | 2020-11-04T17:43:32.000Z | 2020-11-04T17:43:32.000Z | """ This job runs Sen2agri atmospheric correction on a L1C Products previously downloaded.
Inputs: ImageryList
Optional Inputs: WindowSize (default 3)
Maja Version (default 3.2.2)
Outputs: Corrected product uploaded
to S3 bucket
Dependencies: maccs-maja, sen2agri installation
Major Steps
1.... | 31.308793 | 333 | 0.640105 |
a6047653f7cce9f3731b72c27200720cda412b59 | 258 | py | Python | ex08/jennyssecretmessage_vs.py | Wassila211/Checkpoint00 | b46319e754f43b2d7f97cf2135d014f55b46ae16 | [
"MIT"
] | null | null | null | ex08/jennyssecretmessage_vs.py | Wassila211/Checkpoint00 | b46319e754f43b2d7f97cf2135d014f55b46ae16 | [
"MIT"
] | null | null | null | ex08/jennyssecretmessage_vs.py | Wassila211/Checkpoint00 | b46319e754f43b2d7f97cf2135d014f55b46ae16 | [
"MIT"
] | null | null | null | prenom = input("Quel est votre prénom?\n")
if prenom == "Johnny":
print ("je te déteste !")
if prenom == "Paul":
print("Hello my love!")
if prenom == "Marc":
print("Hello my love!")
if prenom == "Ismael":
print("Salut, désolé pas le temps de te parler")
| 25.8 | 49 | 0.643411 |
6e9c92bcdfadb6c41f04583475255c841fdf17e8 | 2,040 | py | Python | setup.py | fenriques/AstroDom | 84b54d3299cf591c39b214248339a201ae8ae6ca | [
"MIT"
] | 8 | 2020-05-17T14:57:08.000Z | 2020-12-20T12:29:43.000Z | setup.py | fenriques/AstroDom | 84b54d3299cf591c39b214248339a201ae8ae6ca | [
"MIT"
] | 2 | 2020-06-04T20:49:09.000Z | 2020-09-04T12:35:07.000Z | setup.py | fenriques/AstroDom | 84b54d3299cf591c39b214248339a201ae8ae6ca | [
"MIT"
] | null | null | null | ############################################################
# -*- coding: utf-8 -*-
#
# Astroimaging catalogue software
#
# Ferrante Enriques
# (c) 2020
#
# License MIT
#
###########################################################
from setuptools import setup, find_packages
import codecs
import os
def read(rel_path... | 29.142857 | 65 | 0.580392 |
a72158c3abf5d2c00d58cdd369f0b26c5c1bca43 | 7,434 | py | Python | examples/adhoc_provider.py | calendar42/SleekXMPP--XEP-0080- | d7bd5fd29f26a5d7de872a49ff63a353b8043e49 | [
"BSD-3-Clause"
] | null | null | null | examples/adhoc_provider.py | calendar42/SleekXMPP--XEP-0080- | d7bd5fd29f26a5d7de872a49ff63a353b8043e49 | [
"BSD-3-Clause"
] | null | null | null | examples/adhoc_provider.py | calendar42/SleekXMPP--XEP-0080- | d7bd5fd29f26a5d7de872a49ff63a353b8043e49 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
SleekXMPP: The Sleek XMPP Library
Copyright (C) 2010 Nathanael C. Fritz
This file is part of SleekXMPP.
See the file LICENSE for copying permission.
"""
import sys
import logging
import getpass
from optparse import OptionParser
import sleekxmpp
# P... | 36.263415 | 78 | 0.581383 |
31042d92f25f01f6e17ad8928ac9af0c89b28136 | 4,338 | py | Python | kubernetes_asyncio/client/models/v1_host_path_volume_source.py | aK0nshin/kubernetes_asyncio | aef9edcc1f8671a5b1bba9f4684bde890176b19c | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/models/v1_host_path_volume_source.py | aK0nshin/kubernetes_asyncio | aef9edcc1f8671a5b1bba9f4684bde890176b19c | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/models/v1_host_path_volume_source.py | aK0nshin/kubernetes_asyncio | aef9edcc1f8671a5b1bba9f4684bde890176b19c | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: v1.14.7
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class V1HostPath... | 30.125 | 196 | 0.58391 |
6a2bcb25b07dd7947c822080c078d6886310af58 | 2,016 | py | Python | sphinx/__init__.py | daobook/sphinx | ef8daca1f9a82ede9b4b0b5cde93f3414cee3dfe | [
"BSD-2-Clause"
] | null | null | null | sphinx/__init__.py | daobook/sphinx | ef8daca1f9a82ede9b4b0b5cde93f3414cee3dfe | [
"BSD-2-Clause"
] | null | null | null | sphinx/__init__.py | daobook/sphinx | ef8daca1f9a82ede9b4b0b5cde93f3414cee3dfe | [
"BSD-2-Clause"
] | null | null | null | """The Sphinx documentation toolchain."""
# Keep this file executable as-is in Python 3!
# (Otherwise getting the version out of it from setup.py is impossible.)
import os
import subprocess
import warnings
from os import path
from subprocess import PIPE
from .deprecation import RemovedInNextVersionWarning
# by defa... | 38.769231 | 76 | 0.679563 |
911c9688b93c6dad7b4867213b8981b6376d6ab2 | 2,284 | py | Python | geometry_analysis/molecule.py | MadisonB14/geometry_analysis | 69ce485c5c0ecdfd3202aa8a0290bc2fdc43f743 | [
"BSD-3-Clause"
] | null | null | null | geometry_analysis/molecule.py | MadisonB14/geometry_analysis | 69ce485c5c0ecdfd3202aa8a0290bc2fdc43f743 | [
"BSD-3-Clause"
] | null | null | null | geometry_analysis/molecule.py | MadisonB14/geometry_analysis | 69ce485c5c0ecdfd3202aa8a0290bc2fdc43f743 | [
"BSD-3-Clause"
] | null | null | null | """
molecule.py
A python package for the MolSSI Software Summer School.
Contains a molecule class
"""
import numpy as np
from .measure import calculate_angle, calculate_distance
class Molecule:
def __init__(self, name, symbols, coordinates):
if isinstance(name, str):
self.name = name
... | 28.55 | 99 | 0.637916 |
d3bf9c9f8ef5235bf700fee144c566f3582c3f57 | 9,221 | py | Python | pylearn2/datasets/dataset.py | BouchardLab/pylearn2 | 4cab785b870d22cd9e85a5f536d4cac234b6bf60 | [
"BSD-3-Clause"
] | null | null | null | pylearn2/datasets/dataset.py | BouchardLab/pylearn2 | 4cab785b870d22cd9e85a5f536d4cac234b6bf60 | [
"BSD-3-Clause"
] | null | null | null | pylearn2/datasets/dataset.py | BouchardLab/pylearn2 | 4cab785b870d22cd9e85a5f536d4cac234b6bf60 | [
"BSD-3-Clause"
] | null | null | null | """
A module defining the Dataset class.
"""
class Dataset(object):
"""
Abstract interface for Datasets.
"""
def __iter__(self):
"""
.. todo::
WRITEME
"""
return self.iterator()
def iterator(self, mode=None, batch_size=None, num_batches=None,
... | 39.917749 | 78 | 0.622167 |
7662bd41d1d62deeb34d070ff8d14168fb0edb77 | 19,315 | py | Python | lib/models/multi_resnetohkm.py | sumaliqinghua/DSPNet | e82cc1938af65234471b6a139a8ac51f22de32a6 | [
"MIT"
] | 5 | 2020-12-04T05:50:09.000Z | 2022-01-14T12:37:44.000Z | lib/models/multi_resnetohkm.py | sumaliqinghua/DSPNet | e82cc1938af65234471b6a139a8ac51f22de32a6 | [
"MIT"
] | 1 | 2021-01-28T03:20:00.000Z | 2021-01-28T03:20:00.000Z | lib/models/multi_resnetohkm.py | sumaliqinghua/DSPNet | e82cc1938af65234471b6a139a8ac51f22de32a6 | [
"MIT"
] | 3 | 2020-12-02T03:18:59.000Z | 2021-09-12T11:29:19.000Z | # ------------------------------------------------------------------------------
# Copyright (c) Microsoft
# Licensed under the MIT License.
# Written by Bin Xiao (Bin.Xiao@microsoft.com)
# ------------------------------------------------------------------------------
from __future__ import absolute_import
from __futu... | 38.707415 | 116 | 0.549003 |
dffa55ad843dd8d85009ce62fd84ab4bd4e24749 | 817 | py | Python | venv/lib/python3.8/site-packages/astroid/brain/brain_threading.py | VikrantAgrahari/littlegenius | f7a7d5f2ecacb862317df35e83de4ae43b5a1bc9 | [
"MIT"
] | 10 | 2020-07-21T21:59:54.000Z | 2021-07-19T11:01:47.000Z | Thonny/Lib/site-packages/astroid/brain/brain_threading.py | Pydiderot/pydiderotIDE | a42fcde3ea837ae40c957469f5d87427e8ce46d3 | [
"MIT"
] | 51 | 2019-10-08T01:53:02.000Z | 2021-06-04T22:02:21.000Z | Thonny/Lib/site-packages/astroid/brain/brain_threading.py | Pydiderot/pydiderotIDE | a42fcde3ea837ae40c957469f5d87427e8ce46d3 | [
"MIT"
] | 10 | 2021-05-13T16:18:53.000Z | 2021-11-08T14:30:08.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2016 Claudiu Popa <pcmanticore@gmail.com>
# Copyright (c) 2017 Łukasz Rogalski <rogalski.91@gmail.com>
# Licensed under the LGPL: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
# For details: https://github.com/PyCQA/astroid/blob/master/COPYING.LESSER
import astroid
... | 25.53125 | 85 | 0.620563 |
3a5b082fa98d449bae223acc0e76a71705dfd4a3 | 1,148 | py | Python | tests/test_navigation.py | daviur/voombot_simulator | 729dbd6624764bb405315846b8fbb6cec337e2dc | [
"MIT"
] | null | null | null | tests/test_navigation.py | daviur/voombot_simulator | 729dbd6624764bb405315846b8fbb6cec337e2dc | [
"MIT"
] | null | null | null | tests/test_navigation.py | daviur/voombot_simulator | 729dbd6624764bb405315846b8fbb6cec337e2dc | [
"MIT"
] | null | null | null | import pytest
from voombot_simulator.navigation import CardinalPoint, Coordinates2D
def test_add_coordinates():
assert Coordinates2D(2, 3) + Coordinates2D(-1, -3) == Coordinates2D(1, 0)
@pytest.mark.parametrize('coord1,coord2,expected', [
(Coordinates2D(1, 1), Coordinates2D(1, 1), True),
(Coordinates2D... | 28.7 | 77 | 0.726481 |
f7974190526d4dcfa6f58848aeb4822711686b8e | 1,347 | py | Python | python/pyarrow/flight.py | DeliangFan/arrow | 7b43bcfaad5b8146f54d9975adb9bb8c88fbc60d | [
"Apache-2.0"
] | 1 | 2021-07-07T07:13:51.000Z | 2021-07-07T07:13:51.000Z | python/pyarrow/flight.py | DeliangFan/arrow | 7b43bcfaad5b8146f54d9975adb9bb8c88fbc60d | [
"Apache-2.0"
] | 1 | 2019-02-24T17:12:35.000Z | 2019-02-24T18:46:21.000Z | python/pyarrow/flight.py | DeliangFan/arrow | 7b43bcfaad5b8146f54d9975adb9bb8c88fbc60d | [
"Apache-2.0"
] | 3 | 2021-03-23T19:45:48.000Z | 2021-03-23T21:36:16.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 43.451613 | 62 | 0.582777 |
a1e6add303e8eda7c5e734eac01a72e276824fd6 | 2,646 | py | Python | Machines/BUFF/x-files/48389.py | limitedeternity/HackTheBox | ed8d6fc7ff7b880b1961098bedca1fc5fdf7fd09 | [
"MIT"
] | null | null | null | Machines/BUFF/x-files/48389.py | limitedeternity/HackTheBox | ed8d6fc7ff7b880b1961098bedca1fc5fdf7fd09 | [
"MIT"
] | null | null | null | Machines/BUFF/x-files/48389.py | limitedeternity/HackTheBox | ed8d6fc7ff7b880b1961098bedca1fc5fdf7fd09 | [
"MIT"
] | 3 | 2021-12-29T10:39:01.000Z | 2022-03-29T22:56:40.000Z | # Exploit Title: CloudMe 1.11.2 - Buffer Overflow (PoC)
# Date: 2020-04-27
# Exploit Author: Andy Bowden
# Vendor Homepage: https://www.cloudme.com/en
# Software Link: https://www.cloudme.com/downloads/CloudMe_1112.exe
# Version: CloudMe 1.11.2
# Tested on: Windows 10 x86
#Instructions:
# Start the CloudMe se... | 44.1 | 68 | 0.679894 |
a1d3f2c388e0ecf2bbeae8f52cf271c801eb5fbc | 3,647 | py | Python | tests/test_optimizer_with_nn.py | ryancinsight/pytorch-optimizer | 5e7b5edc25f6a2e6f3af532a48380bd68bd45326 | [
"Apache-2.0"
] | null | null | null | tests/test_optimizer_with_nn.py | ryancinsight/pytorch-optimizer | 5e7b5edc25f6a2e6f3af532a48380bd68bd45326 | [
"Apache-2.0"
] | null | null | null | tests/test_optimizer_with_nn.py | ryancinsight/pytorch-optimizer | 5e7b5edc25f6a2e6f3af532a48380bd68bd45326 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import pytest
import torch
from torch import nn
import torch_optimizer as optim
def make_dataset(seed=42):
rng = np.random.RandomState(seed)
N = 100
D = 2
X = rng.randn(N, D) * 2
# center the first N/2 points at (-2,-2)
mid = N // 2
X[:mid, :] = X[:mid, :] - 2 * np.on... | 34.733333 | 77 | 0.584042 |
f24cd77bc71b2073013da7be92115efa9950b906 | 370 | py | Python | lib/JumpScale/core/config/__init__.py | rudecs/jumpscale_core7 | 30c03f26f1cdad3edbb9d79d50fbada8acc974f5 | [
"Apache-2.0"
] | 1 | 2015-10-26T10:38:13.000Z | 2015-10-26T10:38:13.000Z | lib/JumpScale/core/config/__init__.py | rudecs/jumpscale_core7 | 30c03f26f1cdad3edbb9d79d50fbada8acc974f5 | [
"Apache-2.0"
] | 4 | 2016-08-25T12:08:39.000Z | 2018-04-12T12:36:01.000Z | lib/JumpScale/core/config/__init__.py | rudecs/jumpscale_core7 | 30c03f26f1cdad3edbb9d79d50fbada8acc974f5 | [
"Apache-2.0"
] | 3 | 2016-03-08T07:49:34.000Z | 2018-10-19T13:56:43.000Z | from JumpScale import j
#from JumpScale.core.config.IConfigBase import ConfigManagementItem, GroupConfigManagement, SingleConfigManagement
#from JumpScale.core.config.JConfigBase import ConfiguredItem, ConfiguredItemGroup
#from JumpScale.core.config.ConfigLib import ItemGroupClass, ItemSingleClass
from JumpScale.core.... | 41.111111 | 114 | 0.864865 |
27dec653fc6375567218c0dc9cbcd421a98c353e | 1,554 | py | Python | python/35.search-insert-position.py | Zhenye-Na/leetcode | 95196a45f5709ccf7b970ee5ac84a4bf8fe2301e | [
"MIT"
] | 10 | 2019-09-15T00:23:57.000Z | 2022-01-05T12:53:42.000Z | python/35.search-insert-position.py | Zhenye-Na/leetcode | 95196a45f5709ccf7b970ee5ac84a4bf8fe2301e | [
"MIT"
] | 3 | 2021-06-30T00:39:26.000Z | 2021-08-01T07:13:59.000Z | python/35.search-insert-position.py | Zhenye-Na/leetcode | 95196a45f5709ccf7b970ee5ac84a4bf8fe2301e | [
"MIT"
] | 6 | 2020-02-08T02:55:22.000Z | 2022-01-02T22:48:18.000Z | #
# @lc app=leetcode id=35 lang=python3
#
# [35] Search Insert Position
#
# https://leetcode.com/problems/search-insert-position/description/
#
# algorithms
# Easy (42.78%)
# Likes: 3231
# Dislikes: 284
# Total Accepted: 777K
# Total Submissions: 1.8M
# Testcase Example: '[1,3,5,6]\n5'
#
# Given a sorted array o... | 20.72 | 77 | 0.564994 |
61765fc5080d3855bd0c8d2f5207f1f1adcd772e | 715 | py | Python | contentful_management/environment_assets_proxy.py | bram-rongen/contentful-management.py | dc94fa2ece08b56dd5a995511af1c64ca2e6bee5 | [
"MIT"
] | 30 | 2017-04-13T20:58:22.000Z | 2021-12-30T22:13:43.000Z | contentful_management/environment_assets_proxy.py | bram-rongen/contentful-management.py | dc94fa2ece08b56dd5a995511af1c64ca2e6bee5 | [
"MIT"
] | 42 | 2017-04-15T02:10:48.000Z | 2022-03-10T23:30:26.000Z | contentful_management/environment_assets_proxy.py | bram-rongen/contentful-management.py | dc94fa2ece08b56dd5a995511af1c64ca2e6bee5 | [
"MIT"
] | 15 | 2017-06-02T12:57:48.000Z | 2020-12-08T13:34:36.000Z | from .environment_resource_proxy import EnvironmentResourceProxy
from .assets_proxy import AssetsProxy
"""
contentful_management.environment_assets_proxy
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This module implements the EnvironmentAssetsProxy class.
API reference: https://www.contentful.com/developers/docs/refer... | 28.6 | 115 | 0.746853 |
6f071f71fbca848516794867727c07f121b22a34 | 174 | py | Python | .history/CourseLessions/FlowControlWithLoops/if_else_20210623204519.py | minefarmer/Complete-Coding-E-Degree | 7044d32b155d0fb2520c3234a0a4e3b2b44fa84b | [
"Unlicense"
] | null | null | null | .history/CourseLessions/FlowControlWithLoops/if_else_20210623204519.py | minefarmer/Complete-Coding-E-Degree | 7044d32b155d0fb2520c3234a0a4e3b2b44fa84b | [
"Unlicense"
] | null | null | null | .history/CourseLessions/FlowControlWithLoops/if_else_20210623204519.py | minefarmer/Complete-Coding-E-Degree | 7044d32b155d0fb2520c3234a0a4e3b2b44fa84b | [
"Unlicense"
] | null | null | null | """[If/Else]
Focus of this section is on controlling the flow of my data and coding with loops
If and else statements are key and our introduction into logical programmin
""" | 43.5 | 81 | 0.781609 |
7c424293381b95153ce99a43d55d339634767350 | 81 | py | Python | Build_Web_With_Flask/Building web applications with Flask_Code/chapter10/chapter10/wsgi.py | abacuspix/NFV_project | f5585a6750119b1f954fea65c37a14badad1fd62 | [
"MIT"
] | null | null | null | Build_Web_With_Flask/Building web applications with Flask_Code/chapter10/chapter10/wsgi.py | abacuspix/NFV_project | f5585a6750119b1f954fea65c37a14badad1fd62 | [
"MIT"
] | null | null | null | Build_Web_With_Flask/Building web applications with Flask_Code/chapter10/chapter10/wsgi.py | abacuspix/NFV_project | f5585a6750119b1f954fea65c37a14badad1fd62 | [
"MIT"
] | null | null | null | # coding:utf-8
from main import app_factory
app = app_factory(name="myproject")
| 16.2 | 35 | 0.765432 |
61f11d891c8ee23952c3f7aaa6204d1da72b7420 | 5,695 | py | Python | data_tools/lgbm/parameters.py | lopez86/DataTools | 573419f3a40ddeb5e9eaf5ced8ea8dbf41c8a65e | [
"MIT"
] | null | null | null | data_tools/lgbm/parameters.py | lopez86/DataTools | 573419f3a40ddeb5e9eaf5ced8ea8dbf41c8a65e | [
"MIT"
] | null | null | null | data_tools/lgbm/parameters.py | lopez86/DataTools | 573419f3a40ddeb5e9eaf5ced8ea8dbf41c8a65e | [
"MIT"
] | null | null | null | from enum import Enum
from typing import List
import funcy
class Task(Enum):
TRAIN = 'train'
PREDICT = 'predict'
CONVERT_MODEL = 'convert_model'
REFIT = 'refit'
class Objective(Enum):
REGRESSION = 'regression'
REGRESSION_L1 = 'regression_l1'
HUBER = 'huber'
FAIR = '... | 26.365741 | 73 | 0.597015 |
5f3212a40f92cc292c273e407525e8c4fd9683a5 | 2,315 | py | Python | Packages/Tag/tag_close_tag.py | 262877348/Data | 46e7ea20929ecb0496edd72efd0d2a599f0e49d9 | [
"Apache-2.0"
] | null | null | null | Packages/Tag/tag_close_tag.py | 262877348/Data | 46e7ea20929ecb0496edd72efd0d2a599f0e49d9 | [
"Apache-2.0"
] | null | null | null | Packages/Tag/tag_close_tag.py | 262877348/Data | 46e7ea20929ecb0496edd72efd0d2a599f0e49d9 | [
"Apache-2.0"
] | null | null | null | import sublime, sublime_plugin
from Tag import Tag
Tag = Tag.Tag()
class TagCloseTagCommand(sublime_plugin.TextCommand):
def run(self, edit):
view = self.view
is_xml = Tag.view_is_xml(view);
closed_some_tag = False
new_selections = []
new_selections_insert = []
for region in view.sel():
cursorPosi... | 26.609195 | 100 | 0.62635 |
4770ae156a6d91406dfda4e71cf6e8bf48f2a5cf | 7,667 | py | Python | Website/FlaskWebsite/env/Lib/site-packages/google/protobuf/message_factory.py | amirpaia/election-campaign-dynamics | b2b32c627cb79c7eb60e458511210308b7ff4035 | [
"CC0-1.0"
] | 6 | 2022-02-04T18:12:24.000Z | 2022-03-21T23:57:12.000Z | Website/FlaskWebsite/env/Lib/site-packages/google/protobuf/message_factory.py | amirpaia/election-campaign-dynamics | b2b32c627cb79c7eb60e458511210308b7ff4035 | [
"CC0-1.0"
] | null | null | null | Website/FlaskWebsite/env/Lib/site-packages/google/protobuf/message_factory.py | amirpaia/election-campaign-dynamics | b2b32c627cb79c7eb60e458511210308b7ff4035 | [
"CC0-1.0"
] | 1 | 2022-02-08T03:53:23.000Z | 2022-02-08T03:53:23.000Z | # Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# ... | 41.22043 | 81 | 0.728838 |
8a939c5fe7714a6d900c86707ffc88e14b3ba43e | 3,394 | py | Python | pandapower/test/shortcircuit/test_sgen.py | gdgarcia/pandapower | 630e3278ca012535f78282ae73f1b86f3fe932fc | [
"BSD-3-Clause"
] | null | null | null | pandapower/test/shortcircuit/test_sgen.py | gdgarcia/pandapower | 630e3278ca012535f78282ae73f1b86f3fe932fc | [
"BSD-3-Clause"
] | 1 | 2019-04-17T14:58:53.000Z | 2019-04-17T14:58:53.000Z | pandapower/test/shortcircuit/test_sgen.py | gdgarcia/pandapower | 630e3278ca012535f78282ae73f1b86f3fe932fc | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2016-2020 by University of Kassel and Fraunhofer Institute for Energy Economics
# and Energy System Technology (IEE), Kassel. All rights reserved.
import numpy as np
import pytest
import pandapower as pp
import pandapower.shortcircuit as sc
@pytest.fixture
def w... | 47.802817 | 147 | 0.705657 |
900785961d6f5c92943fb1722a74c1c6acedf535 | 13,838 | py | Python | openhtf/output/callbacks/mfg_inspector.py | prateekspanning/openhtf | 831f0e3947a56c2b63665886659df2c14de926df | [
"Apache-2.0"
] | 372 | 2015-09-02T00:08:40.000Z | 2022-03-30T17:29:30.000Z | openhtf/output/callbacks/mfg_inspector.py | prateekspanning/openhtf | 831f0e3947a56c2b63665886659df2c14de926df | [
"Apache-2.0"
] | 772 | 2015-09-01T22:00:20.000Z | 2022-02-10T14:53:14.000Z | openhtf/output/callbacks/mfg_inspector.py | prateekspanning/openhtf | 831f0e3947a56c2b63665886659df2c14de926df | [
"Apache-2.0"
] | 204 | 2015-09-01T20:48:21.000Z | 2022-03-13T22:20:50.000Z | """Output and/or upload a TestRun or MfgEvent proto for mfg-inspector.com.
"""
import copy
import json
import logging
import threading
import time
from typing import Any, Dict
import zlib
import httplib2
import oauth2client.client
from openhtf import util
from openhtf.core import test_record
from openhtf.output impo... | 36.511873 | 80 | 0.714843 |
b1204a1b48683105ba7ac406230815b2261bee39 | 5,739 | py | Python | platform.py | lekoook/platform-teensy | d92b12a5d2b0c931e0ce4551fe1770b6db2592ce | [
"Apache-2.0"
] | null | null | null | platform.py | lekoook/platform-teensy | d92b12a5d2b0c931e0ce4551fe1770b6db2592ce | [
"Apache-2.0"
] | null | null | null | platform.py | lekoook/platform-teensy | d92b12a5d2b0c931e0ce4551fe1770b6db2592ce | [
"Apache-2.0"
] | null | null | null | # Copyright 2014-present PlatformIO <contact@platformio.org>
#
# 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... | 41.28777 | 85 | 0.597491 |
b8034ffeaad6ad8ec107e8d84d94fecf4b237034 | 1,398 | py | Python | src/grokcore/security/tests/test_functional.py | zopefoundation/grokcore.security | 82828d6f4f74db8bdd9e4bbcc5b7453bfb455cfe | [
"ZPL-2.1"
] | null | null | null | src/grokcore/security/tests/test_functional.py | zopefoundation/grokcore.security | 82828d6f4f74db8bdd9e4bbcc5b7453bfb455cfe | [
"ZPL-2.1"
] | 2 | 2018-01-03T13:56:03.000Z | 2021-04-23T06:23:19.000Z | src/grokcore/security/tests/test_functional.py | zopefoundation/grokcore.security | 82828d6f4f74db8bdd9e4bbcc5b7453bfb455cfe | [
"ZPL-2.1"
] | 2 | 2015-04-03T04:58:02.000Z | 2018-01-12T06:52:41.000Z | import doctest
import grokcore.security
import unittest
import zope.app.wsgi.testlayer
import zope.testbrowser.wsgi
from pkg_resources import resource_listdir
from zope.app.wsgi.testlayer import http
class Layer(
zope.testbrowser.wsgi.TestBrowserLayer,
zope.app.wsgi.testlayer.BrowserLayer):
pass
... | 26.377358 | 71 | 0.616595 |
047775eaad7b3aeb10f157ffa446d13ec7c2e515 | 740 | py | Python | src/pipx/commands/__init__.py | KenMacD/pipx | 2ecc668acf472ad6956cc682499c077c1130d17e | [
"MIT"
] | null | null | null | src/pipx/commands/__init__.py | KenMacD/pipx | 2ecc668acf472ad6956cc682499c077c1130d17e | [
"MIT"
] | 3 | 2022-03-23T01:19:59.000Z | 2022-03-23T01:26:01.000Z | src/pipx/commands/__init__.py | KenMacD/pipx | 2ecc668acf472ad6956cc682499c077c1130d17e | [
"MIT"
] | null | null | null | from pipx.commands.ensure_path import ensure_pipx_paths
from pipx.commands.environment import environment
from pipx.commands.inject import inject
from pipx.commands.install import install
from pipx.commands.list_packages import list_packages
from pipx.commands.reinstall import reinstall, reinstall_all
from pipx.command... | 27.407407 | 60 | 0.759459 |
0a0558d88d74fa41c0a24eee0a5ec8f782f5a2a4 | 2,497 | py | Python | api/handler.py | jaymoulin/google-musicmanager-dedup-api | c16fb7d98449c046ce486cfe21cc94d7a111070b | [
"MIT"
] | 2 | 2019-03-02T23:46:05.000Z | 2020-07-20T21:03:30.000Z | api/handler.py | jaymoulin/google-musicmanager-dedup-api | c16fb7d98449c046ce486cfe21cc94d7a111070b | [
"MIT"
] | 1 | 2019-07-12T21:13:33.000Z | 2019-07-16T17:06:47.000Z | api/handler.py | jaymoulin/google-musicmanager-dedup-api | c16fb7d98449c046ce486cfe21cc94d7a111070b | [
"MIT"
] | 1 | 2019-12-12T17:45:46.000Z | 2019-12-12T17:45:46.000Z | from http.server import BaseHTTPRequestHandler
import os
import sqlite3
from urllib.parse import urlparse, parse_qs
from cgi import parse_header, parse_multipart
def _get_connection() -> sqlite3.Connection:
db_path = os.getenv("DB_PATH", "/app/db/googlemusicmanager.db")
db_exists = os.path.isfile(db_path)
... | 33.743243 | 93 | 0.634361 |
a7d2f35c6de99272440d09cc31e58e1252e7b558 | 2,028 | py | Python | BCAWT/CA_RSCU.py | AliYoussef96/BCAW-Tool | a296a52f8795325f08e0c6f00838b9e851f9459e | [
"MIT"
] | 3 | 2019-10-22T07:08:40.000Z | 2021-07-27T14:12:25.000Z | BCAWT/CA_RSCU.py | AliYoussef96/BCAW-Tool | a296a52f8795325f08e0c6f00838b9e851f9459e | [
"MIT"
] | 13 | 2019-06-26T07:21:25.000Z | 2021-07-23T15:01:31.000Z | BCAWT/CA_RSCU.py | AliYoussef96/BCAW-Tool | a296a52f8795325f08e0c6f00838b9e851f9459e | [
"MIT"
] | 3 | 2019-07-25T00:13:36.000Z | 2020-09-25T01:58:34.000Z | def CA_RSCU(allseq,allseq_name,The_Genetic_Codes_number=1):
"""calculate RSCU values for correspondence analysis.
Args:
allseq (str): DNA sequence
allseq_name (str) : gene name
The_Genetic_Codes_number (int) : default = 1, The Genetic Codes number described by NCBI (http... | 32.190476 | 156 | 0.609961 |
9b316bea09d1b228aca02e3036c8eabbc8567d1b | 6,483 | py | Python | src/bossmeta.py | NeuroDataDesign/lids-bloby | 9fb51bfa38d66f3c120c9d42f87b51d915e0ff12 | [
"Apache-2.0"
] | null | null | null | src/bossmeta.py | NeuroDataDesign/lids-bloby | 9fb51bfa38d66f3c120c9d42f87b51d915e0ff12 | [
"Apache-2.0"
] | 1 | 2018-07-18T13:51:46.000Z | 2018-07-18T13:51:49.000Z | src/bossmeta.py | NeuroDataDesign/lids-bloby | 9fb51bfa38d66f3c120c9d42f87b51d915e0ff12 | [
"Apache-2.0"
] | null | null | null | import requests
BOSS_VERSION = 'v1'
class BossMeta:
def __init__(self, collection, experiment, channel):
self._collection = collection
self._experiment = experiment
self._channel = channel
self._session = requests.Session()
self._session.stream = False
def session(se... | 36.835227 | 107 | 0.569798 |
136dcb77eb77e45bf1db5cfe5f9b463333ae3a3c | 34,205 | py | Python | src/sage/modular/pollack_stevens/manin_map.py | defeo/sage | d8822036a9843bd4d75845024072515ede56bcb9 | [
"BSL-1.0"
] | null | null | null | src/sage/modular/pollack_stevens/manin_map.py | defeo/sage | d8822036a9843bd4d75845024072515ede56bcb9 | [
"BSL-1.0"
] | null | null | null | src/sage/modular/pollack_stevens/manin_map.py | defeo/sage | d8822036a9843bd4d75845024072515ede56bcb9 | [
"BSL-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
r"""
Manin map
Represents maps from a set of right coset representatives to a
coefficient module.
This is a basic building block for implementing modular symbols, and
provides basic arithmetic and right action of matrices.
EXAMPLES::
sage: E = EllipticCurve('11a')
sage: phi = E.polla... | 39.58912 | 240 | 0.54036 |
e1331642db598a428668a360e315e979f4be73f2 | 1,713 | py | Python | healthybrains/inputoutput.py | Enucatl/machine-learning-healthy-brains | bfedc36c1e5657d97e838d9d58ba26af14f703c7 | [
"MIT"
] | null | null | null | healthybrains/inputoutput.py | Enucatl/machine-learning-healthy-brains | bfedc36c1e5657d97e838d9d58ba26af14f703c7 | [
"MIT"
] | null | null | null | healthybrains/inputoutput.py | Enucatl/machine-learning-healthy-brains | bfedc36c1e5657d97e838d9d58ba26af14f703c7 | [
"MIT"
] | null | null | null | import io
import nibabel as nb
import numpy as np
import apache_beam as beam
import os
class _Nifti1Source(beam.io.filebasedsource.FileBasedSource):
def __init__(self, file_pattern, min_bundle_size):
super(_Nifti1Source, self).__init__(
file_pattern=file_pattern,
min_bundle_size=m... | 29.534483 | 64 | 0.665499 |
0dce73b0cbc3458c202000941565586e5fafcc8a | 5,336 | py | Python | tests/test_vit.py | madil90/MONAI | 2f1c7a5d1b47c8dd21681dbe1b67213aa3278cd7 | [
"Apache-2.0"
] | 1 | 2021-08-20T01:54:26.000Z | 2021-08-20T01:54:26.000Z | tests/test_vit.py | madil90/MONAI | 2f1c7a5d1b47c8dd21681dbe1b67213aa3278cd7 | [
"Apache-2.0"
] | null | null | null | tests/test_vit.py | madil90/MONAI | 2f1c7a5d1b47c8dd21681dbe1b67213aa3278cd7 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 - 2021 MONAI Consortium
# 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 wri... | 38.948905 | 107 | 0.431222 |
6d715a141b52afcd1bdb3b095a830788105eaec5 | 8,242 | py | Python | prettymaps/draw.py | sofia-ab/prettymaps | f223c859d5231954ab29794a901844b37539c017 | [
"MIT"
] | 1 | 2021-08-31T16:28:16.000Z | 2021-08-31T16:28:16.000Z | prettymaps/draw.py | stsievert/prettymaps | 47c5d01e093ccf93ef6582a13bfe894ce0f5b2fa | [
"MIT"
] | null | null | null | prettymaps/draw.py | stsievert/prettymaps | 47c5d01e093ccf93ef6582a13bfe894ce0f5b2fa | [
"MIT"
] | null | null | null | import re
from collections.abc import Iterable
import osmnx as ox
import pandas as pd
from geopandas import GeoDataFrame
import numpy as np
from numpy.random import choice
from shapely.geometry import Polygon, MultiPolygon, MultiLineString, GeometryCollection
from shapely.affinity import translate, scale, rotate
from ... | 32.577075 | 157 | 0.577651 |
537227109d4cd709faf42599c9e608d841118cc1 | 8,515 | py | Python | test/python/visualization/pulse_v2/test_layouts.py | Roshan-Thomas/qiskit-terra | 77219b5c7b7146b1545c5e5190739b36f4064b2f | [
"Apache-2.0"
] | 1,599 | 2018-07-10T10:59:12.000Z | 2022-03-31T23:56:25.000Z | test/python/visualization/pulse_v2/test_layouts.py | Roshan-Thomas/qiskit-terra | 77219b5c7b7146b1545c5e5190739b36f4064b2f | [
"Apache-2.0"
] | 5,244 | 2018-07-10T06:20:13.000Z | 2022-03-31T22:18:48.000Z | test/python/visualization/pulse_v2/test_layouts.py | Roshan-Thomas/qiskit-terra | 77219b5c7b7146b1545c5e5190739b36f4064b2f | [
"Apache-2.0"
] | 1,409 | 2018-07-10T02:16:12.000Z | 2022-03-31T09:01:32.000Z | # 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 modifications or derivative wo... | 34.196787 | 90 | 0.556782 |
b4d475fffcbaa05906a8f3d4824e99bca0bb0c5a | 4,730 | py | Python | eim/small_problems_dists.py | kinoute/google-research | 4a59cab927579ea9722e43252c695de5da4eb5e2 | [
"Apache-2.0"
] | 11 | 2020-01-29T07:25:04.000Z | 2022-03-05T16:01:21.000Z | eim/small_problems_dists.py | zhangyuezjx/google-research | 4a59cab927579ea9722e43252c695de5da4eb5e2 | [
"Apache-2.0"
] | 13 | 2020-01-28T22:19:53.000Z | 2022-02-10T00:39:26.000Z | eim/small_problems_dists.py | zhangyuezjx/google-research | 4a59cab927579ea9722e43252c695de5da4eb5e2 | [
"Apache-2.0"
] | 2 | 2020-02-27T11:09:49.000Z | 2021-08-25T07:32:15.000Z | # coding=utf-8
# Copyright 2019 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 33.546099 | 78 | 0.674841 |
0c0b1a9a4f544d088a00f4900d5baae9d960fd63 | 6,268 | py | Python | tests/unit/io/test_class_bolt4x2.py | glesage/neo4j-python-driver | 540af77063f0ffddc6d73d371bcde90c4e75032d | [
"Apache-2.0"
] | null | null | null | tests/unit/io/test_class_bolt4x2.py | glesage/neo4j-python-driver | 540af77063f0ffddc6d73d371bcde90c4e75032d | [
"Apache-2.0"
] | null | null | null | tests/unit/io/test_class_bolt4x2.py | glesage/neo4j-python-driver | 540af77063f0ffddc6d73d371bcde90c4e75032d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Copyright (c) "Neo4j"
# Neo4j Sweden AB [http://neo4j.com]
#
# This file is part of Neo4j.
#
# 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
#... | 31.817259 | 97 | 0.676771 |
5cc6eae053d4c551668a17c685d5353aa61493c3 | 1,411 | py | Python | venv/lib/python3.8/site-packages/vsts/test/v4_0/models/test_results_query.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/vsts/test/v4_0/models/test_results_query.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/vsts/test/v4_0/models/test_results_query.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | 2 | 2021-05-23T16:46:31.000Z | 2021-05-26T23:51:09.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -----------------------------------------------------------------... | 41.5 | 95 | 0.529412 |
22240314fda50cbe3bfd6fc427bfb572ff601465 | 1,584 | py | Python | infra/tools/metric_tool/test/data/normal_case_2.py | eunchong/infra | ce3728559112bfb3e8b32137eada517aec6d22f9 | [
"BSD-3-Clause"
] | null | null | null | infra/tools/metric_tool/test/data/normal_case_2.py | eunchong/infra | ce3728559112bfb3e8b32137eada517aec6d22f9 | [
"BSD-3-Clause"
] | null | null | null | infra/tools/metric_tool/test/data/normal_case_2.py | eunchong/infra | ce3728559112bfb3e8b32137eada517aec6d22f9 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2015 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.
"""Example containing all metrics, all with descriptions.
Tests assume the description contains the name of the metric, without
the prefix.
"""
from infra_l... | 38.634146 | 76 | 0.746843 |
86fdc763a67ef0a2a47e99f06e84d61f16fa8834 | 1,464 | py | Python | src/pilot/utils.py | digambar15/JetPack | 808d4a84076a3700b0ba9f07c512e99e81c5c9eb | [
"Apache-2.0"
] | 1 | 2020-07-16T10:03:56.000Z | 2020-07-16T10:03:56.000Z | src/pilot/utils.py | MuhammadAsif1/JetPack | a8fc31c4f6a921958c81e9c2e2b17b146b34e35c | [
"Apache-2.0"
] | 4 | 2018-08-23T15:02:59.000Z | 2018-10-11T07:58:33.000Z | src/pilot/utils.py | digambar15/JetPack | 808d4a84076a3700b0ba9f07c512e99e81c5c9eb | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# Copyright (c) 2017-2020 Dell Inc. or its subsidiaries.
#
# 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... | 34.046512 | 78 | 0.651639 |
a8926f6a515578a718362877f3a6d658cbd134c2 | 2,626 | py | Python | downloaded_kernels/university_rankings/kernel_24.py | josepablocam/common-code-extraction | a6978fae73eee8ece6f1db09f2f38cf92f03b3ad | [
"MIT"
] | null | null | null | downloaded_kernels/university_rankings/kernel_24.py | josepablocam/common-code-extraction | a6978fae73eee8ece6f1db09f2f38cf92f03b3ad | [
"MIT"
] | null | null | null | downloaded_kernels/university_rankings/kernel_24.py | josepablocam/common-code-extraction | a6978fae73eee8ece6f1db09f2f38cf92f03b3ad | [
"MIT"
] | 2 | 2021-07-12T00:48:08.000Z | 2021-08-11T12:53:05.000Z | ######### INSTRUCTIONS #########
#
# Fork this script and change the university name to see what rank it gets:
#
my_university_name = ["Indiana University Bloomington"]
#
# Look at the log for a full list of universities you can choose from.
#
# If your university is listed under multiple names, you can combine as many... | 38.057971 | 127 | 0.734196 |
9c140aafc2db2af7e2f5557e9135745c5103d8ae | 2,293 | py | Python | MLP/MLP.py | wicky1234444/MyMLCodes | 8f7b37beb354d32b39d90ef370aefa13e45eee3f | [
"MIT"
] | null | null | null | MLP/MLP.py | wicky1234444/MyMLCodes | 8f7b37beb354d32b39d90ef370aefa13e45eee3f | [
"MIT"
] | null | null | null | MLP/MLP.py | wicky1234444/MyMLCodes | 8f7b37beb354d32b39d90ef370aefa13e45eee3f | [
"MIT"
] | null | null | null | import numpy as np
class MLP: ##multi layer perceptron
def __init__(self, layer_dimensions, lr, activation_function='sigmoid'):
self.W = [] ## weights
self.B = [] ## biases
for i in range(len(layer_dimensions)-1): ## weight and bias initializat... | 44.960784 | 115 | 0.557785 |
8821d6edf40de8c49f21ff58cb64078872cec28c | 465 | py | Python | Python/Programming Fundamentals/Dictionaries/01. A Minor Task.py | teodoramilcheva/softuni-software-engineering | 98dc9faa66f42570f6538fd7ef186d2bd1d39bff | [
"MIT"
] | null | null | null | Python/Programming Fundamentals/Dictionaries/01. A Minor Task.py | teodoramilcheva/softuni-software-engineering | 98dc9faa66f42570f6538fd7ef186d2bd1d39bff | [
"MIT"
] | null | null | null | Python/Programming Fundamentals/Dictionaries/01. A Minor Task.py | teodoramilcheva/softuni-software-engineering | 98dc9faa66f42570f6538fd7ef186d2bd1d39bff | [
"MIT"
] | null | null | null | def validate_key_existing(dictionary, key, def_value=0):
if key not in dictionary:
dictionary[key] = def_value
def print_dict(dictionary, template):
for k, v in dictionary.items():
print(template.format(k, v))
resources = {}
while True:
entry = input()
if entry == 'stop':
br... | 20.217391 | 56 | 0.643011 |
fe6601829fda62c4bfa3c15a3ad22879563a562c | 5,746 | py | Python | test/lib/mayaUsd/render/mayaToHydra/testMtohVisibility.py | ika-rporter/maya-usd | 8f216a4fb955fc44c0abda55caa53ed295aaa625 | [
"Apache-2.0"
] | 507 | 2019-07-30T20:05:10.000Z | 2022-03-30T07:38:43.000Z | test/lib/mayaUsd/render/mayaToHydra/testMtohVisibility.py | ika-rporter/maya-usd | 8f216a4fb955fc44c0abda55caa53ed295aaa625 | [
"Apache-2.0"
] | 1,188 | 2019-07-31T11:27:27.000Z | 2022-03-31T21:06:06.000Z | test/lib/mayaUsd/render/mayaToHydra/testMtohVisibility.py | ika-rporter/maya-usd | 8f216a4fb955fc44c0abda55caa53ed295aaa625 | [
"Apache-2.0"
] | 165 | 2019-07-30T22:27:57.000Z | 2022-03-25T07:20:23.000Z | import maya.cmds as cmds
import fixturesUtils
import mtohUtils
class TestCommand(mtohUtils.MtohTestCase):
_file = __file__
def setUp(self):
self.makeCubeScene(camDist=6)
self.assertTrue(cmds.getAttr("{}.visibility".format(self.cubeTrans)))
self.assertTrue(cmds.getAttr("{}.visibility".... | 36.833333 | 82 | 0.635921 |
b26521855377abfff08c3196d86305bd36b6bf0a | 4,569 | py | Python | rustici_software_cloud_v2/models/settings_individual_schema.py | RusticiSoftware/scormcloud-api-v2-client-python | 04e2cce304a336caf492c3330c706840815c4abe | [
"Apache-2.0"
] | 2 | 2020-07-21T10:33:39.000Z | 2021-08-17T21:40:13.000Z | rustici_software_cloud_v2/models/settings_individual_schema.py | RusticiSoftware/scormcloud-api-v2-client-python | 04e2cce304a336caf492c3330c706840815c4abe | [
"Apache-2.0"
] | 2 | 2020-10-22T20:58:19.000Z | 2020-10-27T17:25:28.000Z | rustici_software_cloud_v2/models/settings_individual_schema.py | RusticiSoftware/scormcloud-api-v2-client-python | 04e2cce304a336caf492c3330c706840815c4abe | [
"Apache-2.0"
] | 1 | 2020-10-15T17:11:15.000Z | 2020-10-15T17:11:15.000Z | # coding: utf-8
"""
SCORM Cloud Rest API
REST API used for SCORM Cloud integrations. # noqa: E501
OpenAPI spec version: 2.0
Contact: systems@rusticisoftware.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class Settin... | 28.203704 | 89 | 0.578901 |
fd2a5c4ab2933d57694cdfb1a76cceacc6faab6e | 5,170 | py | Python | build/PureCloudPlatformClientV2/models/section.py | cjohnson-ctl/platform-client-sdk-python | 38ce53bb8012b66e8a43cc8bd6ff00cf6cc99100 | [
"MIT"
] | 10 | 2019-02-22T00:27:08.000Z | 2021-09-12T23:23:44.000Z | libs/PureCloudPlatformClientV2/models/section.py | rocketbot-cl/genesysCloud | dd9d9b5ebb90a82bab98c0d88b9585c22c91f333 | [
"MIT"
] | 5 | 2018-06-07T08:32:00.000Z | 2021-07-28T17:37:26.000Z | libs/PureCloudPlatformClientV2/models/section.py | rocketbot-cl/genesysCloud | dd9d9b5ebb90a82bab98c0d88b9585c22c91f333 | [
"MIT"
] | 6 | 2020-04-09T17:43:07.000Z | 2022-02-17T08:48:05.000Z | # coding: utf-8
"""
Copyright 2016 SmartBear Software
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... | 24.736842 | 77 | 0.551064 |
67d66d90e0b4c0998d6a63e938faf34b6af6a669 | 1,692 | py | Python | health_report_helper/spider.py | why36/actions-NjuHealthReport | 72f31024937362fa9b2e0039cf6f8ec2e817b78d | [
"MIT"
] | null | null | null | health_report_helper/spider.py | why36/actions-NjuHealthReport | 72f31024937362fa9b2e0039cf6f8ec2e817b78d | [
"MIT"
] | null | null | null | health_report_helper/spider.py | why36/actions-NjuHealthReport | 72f31024937362fa9b2e0039cf6f8ec2e817b78d | [
"MIT"
] | 4 | 2021-11-12T14:40:03.000Z | 2022-03-01T10:33:54.000Z | # -*- coding: utf-8 -*-
#!/usr/bin/env python
# Copyright 2020 zhangt2333. All Rights Reserved.
# Author-Github: github.com/zhangt2333
# spider.py 2021/9/11 13:01
import json
import requests
import config
from uniform_login.uniform_login_spider import login
import utils
def get_apply_list(cookies):
try:
... | 28.677966 | 121 | 0.599291 |
4ff9b1033d63c8c8df3537409872f1c235c8461d | 2,137 | py | Python | alexmods/plot_spectrum.py | alexji/alexmods | 702f933e717256c0f055288f5f7c7341ac19b126 | [
"MIT"
] | 1 | 2018-06-02T09:47:31.000Z | 2018-06-02T09:47:31.000Z | alexmods/plot_spectrum.py | alexji/alexmods | 702f933e717256c0f055288f5f7c7341ac19b126 | [
"MIT"
] | 3 | 2018-08-24T07:41:22.000Z | 2018-10-29T15:54:17.000Z | alexmods/plot_spectrum.py | alexji/alexmods | 702f933e717256c0f055288f5f7c7341ac19b126 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
from matplotlib.ticker import MultipleLocator, ScalarFormatter
from .specutils import Spectrum1D
def plot_spectrum(spec, wlmin=None, wlmax=None, ax=None,
dxmaj=None, dxmin=None, dymaj=None, dymin=None,
fillcolor="#cccccc",fillalpha... | 32.378788 | 99 | 0.628451 |
90c4dda54ed9eb6069d58e05469577e7938c5c2f | 24,173 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_09_01/aio/operations/_virtual_routers_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 3 | 2020-06-23T02:25:27.000Z | 2021-09-07T18:48:11.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_09_01/aio/operations/_virtual_routers_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 510 | 2019-07-17T16:11:19.000Z | 2021-08-02T08:38:32.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_09_01/aio/operations/_virtual_routers_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 5 | 2019-09-04T12:51:37.000Z | 2020-09-16T07:28:40.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.841237 | 197 | 0.668473 |
fdfe880e3ed0270c3310e163218726b56067b4da | 8,243 | py | Python | simforest/_simforest.py | Cich0sza/SimilarityForest | c245ed764f419f4bada4da418c7397aca08d90a7 | [
"MIT"
] | 1 | 2019-05-27T00:32:01.000Z | 2019-05-27T00:32:01.000Z | simforest/_simforest.py | Cich0sza/SimilarityForest | c245ed764f419f4bada4da418c7397aca08d90a7 | [
"MIT"
] | null | null | null | simforest/_simforest.py | Cich0sza/SimilarityForest | c245ed764f419f4bada4da418c7397aca08d90a7 | [
"MIT"
] | 1 | 2019-05-27T12:50:58.000Z | 2019-05-27T12:50:58.000Z | from collections import defaultdict, Counter
import numpy as np
import pandas as pd
class AxesSampler:
def __init__(self, y, rand: np.random.RandomState = None, r=1):
self.y = self._process_y(y)
self.rand = rand if rand is not None else np.random.RandomState()
self.r = r
self.curr... | 36.312775 | 105 | 0.573214 |
cb882f33c6c43dacde11342276dc2053dc611048 | 293 | py | Python | hackerrank/python/introduction/set_intersection_operation.py | mhetrerajat/ds-challenge | 3208df5c29612b0dfe60c1c082da1f31ad220b49 | [
"MIT"
] | null | null | null | hackerrank/python/introduction/set_intersection_operation.py | mhetrerajat/ds-challenge | 3208df5c29612b0dfe60c1c082da1f31ad220b49 | [
"MIT"
] | 1 | 2021-05-18T07:30:16.000Z | 2021-05-18T07:30:16.000Z | hackerrank/python/introduction/set_intersection_operation.py | mhetrerajat/ds-challenge | 3208df5c29612b0dfe60c1c082da1f31ad220b49 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
if __name__ == "__main__":
nEnglish = int(raw_input())
englishStudents = set(map(int, raw_input().split(" ")))
nFrench = int(raw_input())
frenchStudents = set(map(int, raw_input().split(" ")))
print(len(englishStudents.intersection(frenchStudents)))
| 32.555556 | 60 | 0.668942 |
646719b747e4b10f29288a440a8bd92971dbb099 | 1,885 | py | Python | neutron/api/rpc/callbacks/resources.py | cleo4zheng/neutron | 6d65318308edfd984bdd0ff1ac7fef9486a040f7 | [
"Apache-2.0"
] | 1 | 2019-06-02T06:15:39.000Z | 2019-06-02T06:15:39.000Z | neutron/api/rpc/callbacks/resources.py | cleo4zheng/neutron | 6d65318308edfd984bdd0ff1ac7fef9486a040f7 | [
"Apache-2.0"
] | 1 | 2019-08-16T14:02:19.000Z | 2019-08-16T14:02:19.000Z | neutron/api/rpc/callbacks/resources.py | cleo4zheng/neutron | 6d65318308edfd984bdd0ff1ac7fef9486a040f7 | [
"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
# d... | 28.134328 | 78 | 0.756499 |
2aa6d25d4dc3535d58d885316d5982f43e337ff7 | 5,560 | py | Python | db/studentProjects/02_AkinwandeAtanda/Tweet_Analytics/045_TA03_02_binary_classification.py | chrislangst/scalable-data-science | c7beee15c7dd14d27353c4864d927c1b76cd2fa9 | [
"Unlicense"
] | 138 | 2017-07-25T06:48:28.000Z | 2022-03-31T12:23:36.000Z | db/studentProjects/02_AkinwandeAtanda/Tweet_Analytics/045_TA03_02_binary_classification.py | chrislangst/scalable-data-science | c7beee15c7dd14d27353c4864d927c1b76cd2fa9 | [
"Unlicense"
] | 11 | 2017-08-17T13:45:54.000Z | 2021-06-04T09:06:53.000Z | db/studentProjects/02_AkinwandeAtanda/Tweet_Analytics/045_TA03_02_binary_classification.py | chrislangst/scalable-data-science | c7beee15c7dd14d27353c4864d927c1b76cd2fa9 | [
"Unlicense"
] | 74 | 2017-08-18T17:04:46.000Z | 2022-03-21T14:30:51.000Z | # Databricks notebook source exported at Sun, 26 Jun 2016 01:45:30 UTC
# MAGIC %md
# MAGIC
# MAGIC # [Scalable Data Science](http://www.math.canterbury.ac.nz/~r.sainudiin/courses/ScalableDataScience/)
# MAGIC
# MAGIC
# MAGIC ### Course Project by [Akinwande Atanda](https://nz.linkedin.com/in/akinwande-atanda)
# MAGI... | 39.432624 | 407 | 0.730036 |
54f399138f9970a8ae1c08a5a0505fd0fc8921f6 | 11,134 | py | Python | acoustic/web/views/user.py | DavisDevasia/acoustid-server | b4b2acbc198b3d0497df04c2294d9f030133ede5 | [
"MIT"
] | null | null | null | acoustic/web/views/user.py | DavisDevasia/acoustid-server | b4b2acbc198b3d0497df04c2294d9f030133ede5 | [
"MIT"
] | null | null | null | acoustic/web/views/user.py | DavisDevasia/acoustid-server | b4b2acbc198b3d0497df04c2294d9f030133ede5 | [
"MIT"
] | null | null | null | import json
import base64
import urllib2
import logging
import random
from itsdangerous import URLSafeSerializer
from rauth import OAuth2Service
from openid import oidutil, fetchers
from openid.consumer import consumer as openid
from openid.extensions import ax, sreg
from flask import Blueprint, render_template, reques... | 33.136905 | 102 | 0.65529 |
1903cc3eecd36054eed8682d76b0a1dbdc45ce2e | 2,084 | py | Python | warn_transformer/transformers/ak.py | chriszs/warn-transformer | 62b6dc9116a81daefff424e2118e4a66ee642ba3 | [
"Apache-2.0"
] | 3 | 2022-02-18T22:21:00.000Z | 2022-03-24T21:24:29.000Z | warn_transformer/transformers/ak.py | chriszs/warn-transformer | 62b6dc9116a81daefff424e2118e4a66ee642ba3 | [
"Apache-2.0"
] | 20 | 2022-02-20T01:00:07.000Z | 2022-03-25T18:18:56.000Z | warn_transformer/transformers/ak.py | chriszs/warn-transformer | 62b6dc9116a81daefff424e2118e4a66ee642ba3 | [
"Apache-2.0"
] | 2 | 2022-02-25T02:50:00.000Z | 2022-03-14T16:32:22.000Z | import typing
from datetime import datetime
from ..schema import BaseTransformer
class Transformer(BaseTransformer):
"""Transform Alaska raw data for consolidation."""
postal_code = "AK"
fields = dict(
company="Company",
location="Location",
notice_date="Notice Date",
eff... | 28.944444 | 98 | 0.56382 |
63da5f1971dd5050ed3ea04dacf71b02630ce3b9 | 2,735 | py | Python | app/core/tests/test_models.py | andrewtdunn/recipe-app-api | f46775563b32399d792fb2f93801e9432ef0a71a | [
"MIT"
] | null | null | null | app/core/tests/test_models.py | andrewtdunn/recipe-app-api | f46775563b32399d792fb2f93801e9432ef0a71a | [
"MIT"
] | null | null | null | app/core/tests/test_models.py | andrewtdunn/recipe-app-api | f46775563b32399d792fb2f93801e9432ef0a71a | [
"MIT"
] | null | null | null | from unittest.mock import patch
from django.test import TestCase
from django.contrib.auth import get_user_model
from core import models
def sample_user(email='test@andrewtdunn.com', password='testpass'):
"""Create a sample user."""
return get_user_model().objects.create_user(email, password)
class ModelTe... | 32.176471 | 70 | 0.640585 |
c7ece0246694c9bc4eebbe4f69e5888bf801180b | 1,579 | py | Python | pythonx/vim_textobj_block_party/block_party/tests/test_search.py | ColinKennedy/vim-textobj-block-party | c3132b63840d2ff9719e3972dd8e5548d40165c5 | [
"MIT"
] | 7 | 2018-10-22T14:10:08.000Z | 2020-05-16T18:07:07.000Z | pythonx/vim_textobj_block_party/block_party/tests/test_search.py | ColinKennedy/vim-textobj-block-party | c3132b63840d2ff9719e3972dd8e5548d40165c5 | [
"MIT"
] | 5 | 2018-10-22T18:53:41.000Z | 2018-12-31T18:54:04.000Z | pythonx/vim_textobj_block_party/block_party/tests/test_search.py | ColinKennedy/vim-textobj-block-party | c3132b63840d2ff9719e3972dd8e5548d40165c5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''Any test that is related to inspecting Python source-code.'''
# IMPORT STANDARD LIBRARIES
import textwrap
# IMPORT THIRD-PARTY LIBRARIES
from block_party import config
# IMPORT LOCAL LIBRARIES
from . import common
class Blocks(common.Common):
'''A series of te... | 22.557143 | 84 | 0.540215 |
a510bc119b6a87c9bb2499e1bd99a24776bff55d | 8,225 | py | Python | keras_retinanet/preprocessing/csv_generator.py | Sid51/keras-retinanet | 3bf7ad6aad0a5d55b7c3a7b81fb6f151042659cc | [
"Apache-2.0"
] | null | null | null | keras_retinanet/preprocessing/csv_generator.py | Sid51/keras-retinanet | 3bf7ad6aad0a5d55b7c3a7b81fb6f151042659cc | [
"Apache-2.0"
] | null | null | null | keras_retinanet/preprocessing/csv_generator.py | Sid51/keras-retinanet | 3bf7ad6aad0a5d55b7c3a7b81fb6f151042659cc | [
"Apache-2.0"
] | null | null | null | """
Copyright 2017-2018 yhenon (https://github.com/yhenon/)
Copyright 2017-2018 Fizyr (https://fizyr.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-... | 34.414226 | 131 | 0.610213 |
562996b35f661c3a718fa2eebfb78bae22de2c5a | 9,016 | py | Python | app.py | TimeWz667/LitReviewer | 89574914c8148d758d82325b9dbff26bc6d6f1cc | [
"MIT"
] | null | null | null | app.py | TimeWz667/LitReviewer | 89574914c8148d758d82325b9dbff26bc6d6f1cc | [
"MIT"
] | null | null | null | app.py | TimeWz667/LitReviewer | 89574914c8148d758d82325b9dbff26bc6d6f1cc | [
"MIT"
] | null | null | null | from flask import Flask, request, render_template, send_file, session, redirect, url_for, jsonify, Response
import reviewer
__author__ = 'TimeWz667'
abbreviations = ['HIV', 'STD', 'NCD', 'SD', 'DES', 'ABM', 'EBM', 'BMC', 'I', 'II', 'OR',
'SIR', 'SID', 'SEIR', 'SIRS', 'ODE', 'PDE', 'SDE',
... | 30.053333 | 107 | 0.642968 |
1521aa2b439eb9c46e342551b8ebc40314d9f022 | 79,861 | py | Python | owslib/wps.py | jannefleischer/OWSLib | e0f82ce01c4f3d18c2e25938987af3e9bcc6ecad | [
"BSD-3-Clause"
] | null | null | null | owslib/wps.py | jannefleischer/OWSLib | e0f82ce01c4f3d18c2e25938987af3e9bcc6ecad | [
"BSD-3-Clause"
] | null | null | null | owslib/wps.py | jannefleischer/OWSLib | e0f82ce01c4f3d18c2e25938987af3e9bcc6ecad | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: ISO-8859-15 -*-
# =============================================================================
# Copyright (c) 2018 Luca Cinquini
#
# Authors : Luca Cinquini <luca.cinquini@jpl.nasa.gov>
# Carsten Ehbrecht <ehbrecht@dkrz.de>
#
# Contact email: ehbrecht@dkrz.de
# ================================... | 41.615946 | 846 | 0.596486 |
39424911686758463fc441efb68a58d69c144675 | 32,583 | py | Python | from_3b1b/old/hilbert/section2.py | tigerking/manim2 | 93e8957e433b8e59acb5a5213a4074ee0125b823 | [
"MIT"
] | null | null | null | from_3b1b/old/hilbert/section2.py | tigerking/manim2 | 93e8957e433b8e59acb5a5213a4074ee0125b823 | [
"MIT"
] | null | null | null | from_3b1b/old/hilbert/section2.py | tigerking/manim2 | 93e8957e433b8e59acb5a5213a4074ee0125b823 | [
"MIT"
] | null | null | null | from manim2.imports import *
import displayer as disp
from hilbert.curves import \
TransformOverIncreasingOrders, FlowSnake, HilbertCurve, \
SnakeCurve, PeanoCurve
from hilbert.section1 import get_mathy_and_bubble
from scipy.spatial.distance import cdist
def get_time_line():
length = 2.6*FRAME_WIDTH
y... | 30.62312 | 134 | 0.555474 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.