hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | 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 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
952084feb93994d628fb83ccd69f163a0aff83d0 | 3,792 | py | Python | tensorflow/contrib/learn/python/learn/ops/embeddings_ops.py | uve/tensorflow | e08079463bf43e5963acc41da1f57e95603f8080 | [
"Apache-2.0"
] | 6 | 2022-02-04T18:12:24.000Z | 2022-03-21T23:57:12.000Z | Lib/site-packages/tensorflow/contrib/learn/python/learn/ops/embeddings_ops.py | shfkdroal/Robot-Learning-in-Mixed-Adversarial-and-Collaborative-Settings | 1fa4cd6a566c8745f455fc3d2273208f21f88ced | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/tensorflow/contrib/learn/python/learn/ops/embeddings_ops.py | shfkdroal/Robot-Learning-in-Mixed-Adversarial-and-Collaborative-Settings | 1fa4cd6a566c8745f455fc3d2273208f21f88ced | [
"bzip2-1.0.6"
] | 1 | 2022-02-08T03:53:23.000Z | 2022-02-08T03:53:23.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... | 40.774194 | 94 | 0.708861 |
1df844a8b7770671761243aaf12112b8b0f47aff | 1,386 | py | Python | models/__init__.py | dukebw/MichiGAN | 3048e259dd2d368bb7a790a034e54d46f3da2a20 | [
"MIT"
] | 2 | 2020-11-19T10:44:03.000Z | 2020-12-21T12:40:51.000Z | models/__init__.py | dukebw/MichiGAN | 3048e259dd2d368bb7a790a034e54d46f3da2a20 | [
"MIT"
] | null | null | null | models/__init__.py | dukebw/MichiGAN | 3048e259dd2d368bb7a790a034e54d46f3da2a20 | [
"MIT"
] | null | null | null | """
Copyright (C) University of Science and Technology of China.
Licensed under the MIT License.
"""
import importlib
import torch
def find_model_using_name(model_name):
# Given the option --model [modelname],
# the file "models/modelname_model.py"
# will be imported.
model_filename = "models." + mod... | 28.285714 | 115 | 0.670996 |
0d690d517cd26e5fb292a1ddad9bb1f0d2cf100e | 1,079 | py | Python | falmer/content/components/structures.py | sussexstudent/services-api | ae735bd9d6177002c3d986e5c19a78102233308f | [
"MIT"
] | 2 | 2017-04-27T19:35:59.000Z | 2017-06-13T16:19:33.000Z | falmer/content/components/structures.py | sussexstudent/falmer | ae735bd9d6177002c3d986e5c19a78102233308f | [
"MIT"
] | 975 | 2017-04-13T11:31:07.000Z | 2022-02-10T07:46:18.000Z | falmer/content/components/structures.py | sussexstudent/services-api | ae735bd9d6177002c3d986e5c19a78102233308f | [
"MIT"
] | 3 | 2018-05-09T06:42:25.000Z | 2020-12-10T18:29:30.000Z | import re
from wagtail.core.blocks import StructBlock,CharBlock,ListBlock, BooleanBlock, RegexBlock, StreamBlock
from falmer.content.components.base import Component
from falmer.content.components.buttons import basic_button
from falmer.content.components.text import text
OPENING_TIME_REGEX = re.compile('[Mo|Tu|We|Th... | 35.966667 | 133 | 0.759036 |
1f3a131c6b6fb7a47cf1eec655f95548fc1dcb71 | 605 | py | Python | setup.py | DistribCoglab/dspca | 6b2d76bd0279c7448553b727697567a7be8e7b6a | [
"MIT"
] | 1 | 2021-12-27T05:08:20.000Z | 2021-12-27T05:08:20.000Z | setup.py | DistribCoglab/dspca | 6b2d76bd0279c7448553b727697567a7be8e7b6a | [
"MIT"
] | null | null | null | setup.py | DistribCoglab/dspca | 6b2d76bd0279c7448553b727697567a7be8e7b6a | [
"MIT"
] | 3 | 2021-11-24T09:54:18.000Z | 2022-03-20T08:28:08.000Z | from distutils.core import setup
import setuptools
with open("README.md", "r") as fh:
readme = fh.read()
setup(
name='dspca',
version='1.0.3',
packages=setuptools.find_packages(),
url='http://github.com/ryhattori/dspca',
license='MIT License',
author='Ryoma Hattori',
author_email='rhat... | 24.2 | 72 | 0.654545 |
ea802be9be8c3b238babcaf69089cc972812cbdb | 11,222 | py | Python | RGB_HSL_HLV.py | MaFx/rgb-hsl-contrast | ec53deed193b410be30042bdfe7237ee02417028 | [
"MIT"
] | null | null | null | RGB_HSL_HLV.py | MaFx/rgb-hsl-contrast | ec53deed193b410be30042bdfe7237ee02417028 | [
"MIT"
] | null | null | null | RGB_HSL_HLV.py | MaFx/rgb-hsl-contrast | ec53deed193b410be30042bdfe7237ee02417028 | [
"MIT"
] | null | null | null | import wx
import os
import numpy
from numpy import zeros
from PIL import Image
from threading import *
import colorsys
############################## COLOR TRANSITIONS #######################################
#colorsys.rgb_to_hsv(r, g, b)
#colorsys.hsv_to_rgb(h, s, v)
################################ THREADING #######... | 34.109422 | 137 | 0.549367 |
a11ed6d1d3c5e56428c153bb2ee4e3e9aa7ac456 | 7,146 | py | Python | aws/helper_functions.py | ethem-kinginthenorth/cloud-ml-examples | e434d2bdbf2adf058dc436f992a56585537dc8ab | [
"Apache-2.0"
] | 1 | 2022-03-23T05:10:45.000Z | 2022-03-23T05:10:45.000Z | aws/helper_functions.py | ethem-kinginthenorth/cloud-ml-examples | e434d2bdbf2adf058dc436f992a56585537dc8ab | [
"Apache-2.0"
] | null | null | null | aws/helper_functions.py | ethem-kinginthenorth/cloud-ml-examples | e434d2bdbf2adf058dc436f992a56585537dc8ab | [
"Apache-2.0"
] | 2 | 2021-07-16T02:33:05.000Z | 2021-09-20T19:27:54.000Z | #
# Copyright (c) 2019-2021, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 36.646154 | 111 | 0.638679 |
c228517f3760c876695625c2f4d2c32f14193fd8 | 4,549 | py | Python | adam_applier.py | wang90063/MRO-Asyn-RL | 38ab7bc33c4f51dcf6a10b36a9dcdea7b4653ad0 | [
"MIT"
] | 1 | 2019-04-24T04:27:43.000Z | 2019-04-24T04:27:43.000Z | adam_applier.py | wang90063/MRO-Asyn-RL | 38ab7bc33c4f51dcf6a10b36a9dcdea7b4653ad0 | [
"MIT"
] | null | null | null | adam_applier.py | wang90063/MRO-Asyn-RL | 38ab7bc33c4f51dcf6a10b36a9dcdea7b4653ad0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import tensorflow as tf
from tensorflow.python.training import training_ops
from tensorflow.python.training import slot_creator
from tensorflow.python.framework import ops
from tensorflow.python.ops import variables
class AdamApplier(object):
def __init__(self,
learning_rate,
... | 36.392 | 77 | 0.639042 |
f577c4a5a6de92ecc0c05f66c6dbb24c1548f5b1 | 1,299 | py | Python | tfworker/commands/clean.py | nrfox/terraform-worker | 9d6aebed73ecd095e8d5af916f81cdfeef9dbb95 | [
"Apache-2.0"
] | null | null | null | tfworker/commands/clean.py | nrfox/terraform-worker | 9d6aebed73ecd095e8d5af916f81cdfeef9dbb95 | [
"Apache-2.0"
] | null | null | null | tfworker/commands/clean.py | nrfox/terraform-worker | 9d6aebed73ecd095e8d5af916f81cdfeef9dbb95 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Richard Maynard (richard.maynard@gmail.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 applicab... | 38.205882 | 79 | 0.709007 |
a302cf6df673a6842cf1829445c624401dab25b9 | 16,057 | py | Python | pythonFiles/datascience/getJupyterVariableValue.py | JesterOrNot/vscode-python | f51b0bbf0e21bd6f9becc89ebfcb383f8e840e76 | [
"MIT"
] | 11 | 2019-11-11T20:45:40.000Z | 2021-05-08T05:51:36.000Z | pythonFiles/datascience/getJupyterVariableValue.py | JesterOrNot/vscode-python | f51b0bbf0e21bd6f9becc89ebfcb383f8e840e76 | [
"MIT"
] | 2 | 2018-06-22T07:20:03.000Z | 2018-06-25T18:58:49.000Z | pythonFiles/datascience/getJupyterVariableValue.py | JesterOrNot/vscode-python | f51b0bbf0e21bd6f9becc89ebfcb383f8e840e76 | [
"MIT"
] | 4 | 2020-02-02T02:18:41.000Z | 2021-07-07T15:31:17.000Z | import sys as VC_sys
import locale as VC_locale
VC_IS_PY2 = VC_sys.version_info < (3,)
# SafeRepr based on the pydevd implementation
# https://github.com/microsoft/ptvsd/blob/master/src/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_safe_repr.py
class VC_SafeRepr(object):
# Py3 compat - alias unicode to str, and xr... | 36.827982 | 135 | 0.566856 |
20c087a31fd247bfee3fc9685d8cc594b02b1a2f | 463 | py | Python | Tutorials/51dec.py | Aaryan-R-S/Python-Tutorials | 89e5ec69e529511137263231d735410e92f0a65d | [
"MIT"
] | null | null | null | Tutorials/51dec.py | Aaryan-R-S/Python-Tutorials | 89e5ec69e529511137263231d735410e92f0a65d | [
"MIT"
] | null | null | null | Tutorials/51dec.py | Aaryan-R-S/Python-Tutorials | 89e5ec69e529511137263231d735410e92f0a65d | [
"MIT"
] | null | null | null | # ----- 1 -----
# def f1():
# print('Hi')
# f2 = f1
# f2()
# ----- 2 -----
# def f1():
# print('Hi')
# f2 = f1
# del f1
# f2()
# ----- 3 -----
# def f1(x):
# x('Yo')
# f1(print)
# -- Or --
# def f2(x):
# print(x([3,4,5]))
# f2(sum)
# ----- 4 -----
# def f1(x):
# def f2():
#... | 8.903846 | 28 | 0.330454 |
8cb0fe2feadad325615f6fab41a809d80d8bc211 | 65,514 | py | Python | tools/shared.py | harshad-moreficent/emscripten | 65fc828d096c5f21a455e66cb91967318534972e | [
"MIT"
] | null | null | null | tools/shared.py | harshad-moreficent/emscripten | 65fc828d096c5f21a455e66cb91967318534972e | [
"MIT"
] | null | null | null | tools/shared.py | harshad-moreficent/emscripten | 65fc828d096c5f21a455e66cb91967318534972e | [
"MIT"
] | null | null | null | # Copyright 2011 The Emscripten Authors. All rights reserved.
# Emscripten is available under two separate licenses, the MIT license and the
# University of Illinois/NCSA Open Source License. Both these licenses can be
# found in the LICENSE file.
from __future__ import print_function
from subprocess import PIPE
im... | 35.780448 | 294 | 0.685151 |
6ea12c83268500c4e591d29e2332f539a461b170 | 7,750 | py | Python | fedml_api/distributed/fedavg/FedAVGAggregator.py | usc-sail/FedML | 43b7ed38243b23afaf31ffb829e0566bf03db227 | [
"Apache-2.0"
] | null | null | null | fedml_api/distributed/fedavg/FedAVGAggregator.py | usc-sail/FedML | 43b7ed38243b23afaf31ffb829e0566bf03db227 | [
"Apache-2.0"
] | null | null | null | fedml_api/distributed/fedavg/FedAVGAggregator.py | usc-sail/FedML | 43b7ed38243b23afaf31ffb829e0566bf03db227 | [
"Apache-2.0"
] | null | null | null | import copy
import logging
import random
import time
import numpy as np
import torch
import wandb
from .utils import transform_list_to_tensor
class FedAVGAggregator(object):
def __init__(self, train_global, test_global, all_train_data_num,
train_data_local_dict, test_data_local_dict, train_dat... | 46.130952 | 163 | 0.645677 |
1f589c2a194fc6d83f54a0e9ea9cb7de62a1e85e | 1,145 | py | Python | examples/from_entropy.py | EggPool/python-hdwallet | 9a18e7b411ec9903abc111d6613db30ed9b54d1d | [
"0BSD"
] | 1 | 2021-05-03T19:54:11.000Z | 2021-05-03T19:54:11.000Z | examples/from_entropy.py | EggPool/python-hdwallet | 9a18e7b411ec9903abc111d6613db30ed9b54d1d | [
"0BSD"
] | null | null | null | examples/from_entropy.py | EggPool/python-hdwallet | 9a18e7b411ec9903abc111d6613db30ed9b54d1d | [
"0BSD"
] | null | null | null | #!/usr/bin/env python3
from hdwallet import HDWallet
from hdwallet.utils import generate_entropy
from hdwallet.symbols import BTC
from typing import Optional
import json
# Choose strength 128, 160, 192, 224 or 256
STRENGTH: int = 160 # Default is 128
# Choose language english, french, italian, spanish, chinese_simp... | 31.805556 | 112 | 0.7869 |
cf4103673d18023aafe70148cd24a4a123a6a055 | 95,239 | py | Python | zerver/tests/test_upload.py | AndyGura/zulip | 4aff5b1d2275113eab7c7ec73fb1e3bdd6e18245 | [
"Apache-2.0"
] | null | null | null | zerver/tests/test_upload.py | AndyGura/zulip | 4aff5b1d2275113eab7c7ec73fb1e3bdd6e18245 | [
"Apache-2.0"
] | null | null | null | zerver/tests/test_upload.py | AndyGura/zulip | 4aff5b1d2275113eab7c7ec73fb1e3bdd6e18245 | [
"Apache-2.0"
] | null | null | null | import datetime
import io
import os
import re
import shutil
import time
import urllib
from io import StringIO
from unittest import mock
from unittest.mock import patch
import botocore.exceptions
import orjson
from django.conf import settings
from django.utils.timezone import now as timezone_now
from django_sendfile.ut... | 43.153149 | 123 | 0.644001 |
3ba98c80530eaee7f1f5d5fac3601041de0fabc0 | 35,733 | py | Python | tensorflow/contrib/slim/python/slim/learning_test.py | wangguizhu27/tensorflow1 | 3462966ac7d3884c2153b1655e8528a0f6bac0f4 | [
"Apache-2.0"
] | 1 | 2017-02-06T06:03:18.000Z | 2017-02-06T06:03:18.000Z | tensorflow/contrib/slim/python/slim/learning_test.py | wangguizhu27/tensorflow1 | 3462966ac7d3884c2153b1655e8528a0f6bac0f4 | [
"Apache-2.0"
] | null | null | null | tensorflow/contrib/slim/python/slim/learning_test.py | wangguizhu27/tensorflow1 | 3462966ac7d3884c2153b1655e8528a0f6bac0f4 | [
"Apache-2.0"
] | 4 | 2019-02-22T20:41:07.000Z | 2021-03-04T14:05:53.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... | 38.924837 | 91 | 0.717908 |
56e771a0b6b94578d055a9e3f5f2943d8f0098c3 | 2,996 | py | Python | polarity/__main__.py | znhv/diffepy | 92a21b3c90ca622b88f063935378cd2fe45e4222 | [
"MIT"
] | 1 | 2021-05-30T14:41:57.000Z | 2021-05-30T14:41:57.000Z | polarity/__main__.py | znhv/diffepy | 92a21b3c90ca622b88f063935378cd2fe45e4222 | [
"MIT"
] | null | null | null | polarity/__main__.py | znhv/diffepy | 92a21b3c90ca622b88f063935378cd2fe45e4222 | [
"MIT"
] | 1 | 2021-06-23T07:28:08.000Z | 2021-06-23T07:28:08.000Z | # -*- coding: utf-8 -*-
"""polarity - Compares two configuration files and shows a difference.
Usage: polarity [options] <filepath1> <filepath2>
Options:
-h, --help display help for command
-f, --format [type] output format (default: "stylish")
-V, --version output the version number
Examples:
... | 31.208333 | 85 | 0.59713 |
4e79b211941bb36411902da52a32091500582304 | 1,373 | py | Python | utilities/switch_array.py | xod442/hpe-composable-fabric-sidekick | 55c20b082c2ecacd8633bf3d085159100802ec2b | [
"Apache-2.0"
] | null | null | null | utilities/switch_array.py | xod442/hpe-composable-fabric-sidekick | 55c20b082c2ecacd8633bf3d085159100802ec2b | [
"Apache-2.0"
] | 3 | 2019-06-27T18:29:44.000Z | 2020-02-04T23:40:14.000Z | utilities/switch_array.py | xod442/hpe-composable-fabric-sidekick | 55c20b082c2ecacd8633bf3d085159100802ec2b | [
"Apache-2.0"
] | 2 | 2019-06-02T23:04:39.000Z | 2019-08-07T17:20:08.000Z | # -*-coding: utf-8 -*-
# (C) Copyright 2019 Hewlett Packard Enterprise Development LP.
# 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 ... | 31.930233 | 74 | 0.71158 |
51a4b5e0de3d27ad869b13691ded5c2e149357a5 | 372 | py | Python | cgi-bin/runCommand.py | sugar-activities/4430-activity | 3d6b804347778ea1eba91611dd782e483860f30e | [
"MIT"
] | null | null | null | cgi-bin/runCommand.py | sugar-activities/4430-activity | 3d6b804347778ea1eba91611dd782e483860f30e | [
"MIT"
] | null | null | null | cgi-bin/runCommand.py | sugar-activities/4430-activity | 3d6b804347778ea1eba91611dd782e483860f30e | [
"MIT"
] | null | null | null | #!/usr/bin/python
import os, sys, subprocess
import cgi, cgitb
base = 'file://'+activity.get_bundle_path()
cgitb.enable(display=True)
log = open('/tmp/logPF','w')
print 'Content-Type:text/html\n\n'
form = cgi.FieldStorage()
pth = form.getfirst('pth')
#now play pth
cmd = 'firefox file://' + base + pth
print >>log, 'cm... | 23.25 | 43 | 0.693548 |
19b151a4d0f3f57d5f35044b694a932520e466eb | 1,229 | py | Python | services/data_processor/src/StockDataPipe.py | QuanTesla/QuanTesla | d10d822d69f03940025aa605f8462b1163b5f2f8 | [
"MIT"
] | 1 | 2021-01-28T14:23:52.000Z | 2021-01-28T14:23:52.000Z | services/data_processor/src/StockDataPipe.py | QuanTesla/QuanTesla | d10d822d69f03940025aa605f8462b1163b5f2f8 | [
"MIT"
] | 1 | 2020-02-16T23:46:59.000Z | 2020-02-16T23:46:59.000Z | services/data_processor/src/StockDataPipe.py | QuanTesla/QuanTesla | d10d822d69f03940025aa605f8462b1163b5f2f8 | [
"MIT"
] | null | null | null | import yfinance as yf
import pandas as pd
import plotly.express as px
import plotly.graph_objects as go
# Wrapper to get a dataframe for the financial history of a company
def create_stock_data(company: str, period: str = "1y", interval: str = "1d") -> pd.DataFrame:
return yf.Ticker(company).history(period, inter... | 35.114286 | 94 | 0.708706 |
aa70bf4fa2a283722e9a26ff0b35b06bbbab4fa8 | 4,078 | py | Python | .circleci/generate_config_yml.py | wxwoods/mctorch | 7cd6eb51fdd01fa75ed9245039a4f145ba342de2 | [
"BSD-3-Clause"
] | 1 | 2019-07-23T11:20:58.000Z | 2019-07-23T11:20:58.000Z | .circleci/generate_config_yml.py | wxwoods/mctorch | 7cd6eb51fdd01fa75ed9245039a4f145ba342de2 | [
"BSD-3-Clause"
] | null | null | null | .circleci/generate_config_yml.py | wxwoods/mctorch | 7cd6eb51fdd01fa75ed9245039a4f145ba342de2 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
"""
This script is the source of truth for config.yml.
Please see README.md in this directory for details.
"""
import os
import sys
import shutil
from collections import namedtuple, OrderedDict
import cimodel.data.pytorch_build_definitions as pytorch_build_definitions
import cimodel.data.binar... | 32.110236 | 86 | 0.715056 |
60c3705e64ce150eff54728d985fc66af1dca2ef | 981 | py | Python | app/__init__.py | GreatBahram/Flask-Template | 0c775fc5d4bf07e9c2e9d6a3e8830e0c061cf3cf | [
"MIT"
] | null | null | null | app/__init__.py | GreatBahram/Flask-Template | 0c775fc5d4bf07e9c2e9d6a3e8830e0c061cf3cf | [
"MIT"
] | null | null | null | app/__init__.py | GreatBahram/Flask-Template | 0c775fc5d4bf07e9c2e9d6a3e8830e0c061cf3cf | [
"MIT"
] | null | null | null | # app/__init__.py
# third-party imports
from flask import Flask, render_template
from flask_sqlalchemy import SQLAlchemy
# local imports
from config import app_config
# db variable initialization
db = SQLAlchemy()
def create_app(config_name):
app = Flask(__name__)
app.config.from_object(app_config[config_na... | 25.153846 | 78 | 0.701325 |
8a78f2ef6488b36ee70bd62519c4dde525730739 | 5,802 | py | Python | molecule/command/init/role.py | Intermax-Cloudsourcing/molecule | d325ac3a6d01c2e115f8056855a60217d8898098 | [
"MIT"
] | null | null | null | molecule/command/init/role.py | Intermax-Cloudsourcing/molecule | d325ac3a6d01c2e115f8056855a60217d8898098 | [
"MIT"
] | null | null | null | molecule/command/init/role.py | Intermax-Cloudsourcing/molecule | d325ac3a6d01c2e115f8056855a60217d8898098 | [
"MIT"
] | null | null | null | # Copyright (c) 2015-2018 Cisco Systems, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge... | 33.154286 | 87 | 0.671837 |
c14bf72202f409acea4202828bd7f0d16b316048 | 1,186 | py | Python | tests/helper.py | EiffL/Stile | 9d5bab3ccb47d3fb1b8fc98db3c0e03605ff0169 | [
"BSD-3-Clause"
] | 12 | 2015-09-18T20:31:27.000Z | 2020-04-08T10:58:57.000Z | tests/helper.py | EiffL/Stile | 9d5bab3ccb47d3fb1b8fc98db3c0e03605ff0169 | [
"BSD-3-Clause"
] | 71 | 2015-01-05T21:53:04.000Z | 2018-11-05T18:47:27.000Z | tests/helper.py | EiffL/Stile | 9d5bab3ccb47d3fb1b8fc98db3c0e03605ff0169 | [
"BSD-3-Clause"
] | 6 | 2017-06-23T21:41:39.000Z | 2020-10-30T14:38:22.000Z | import numpy
def FormatSame(arr1,arr2):
"""
Do some NumPy data type tricks to make sure that two formatted arrays can be compared to each
other.
In short:
- Convert both arrays to numpy.arrays if they were something else (mostly for the case where
you in fact have a FITSrec)
... | 39.533333 | 100 | 0.682968 |
d1af3b1f93ac4aa13c688e422e34be189e89d771 | 1,036 | py | Python | 1128. Number of Equivalent Domino Pairs.py | minyoungan/coding-interview | 56cf90d8e65690c0cb49512b6d06a4de3f129a41 | [
"MIT"
] | 1 | 2021-11-24T01:30:38.000Z | 2021-11-24T01:30:38.000Z | 1128. Number of Equivalent Domino Pairs.py | minyoungan/Coding-Interview | 56cf90d8e65690c0cb49512b6d06a4de3f129a41 | [
"MIT"
] | null | null | null | 1128. Number of Equivalent Domino Pairs.py | minyoungan/Coding-Interview | 56cf90d8e65690c0cb49512b6d06a4de3f129a41 | [
"MIT"
] | null | null | null | class Solution:
def numEquivDominoPairs(self, dominoes: List[List[int]]) -> int:
for i in range(len(dominoes)):
dominoes[i].sort()
dominoes.sort()
print(dominoes)
res = 0
n = len(dominoes)
for i in range(n - 1):
for j in range... | 25.9 | 68 | 0.383205 |
944c25fab1bd8903886126a193d631cfed8ddd17 | 563 | py | Python | exercicios/ex066.py | mrcbnu/python-_exercicios | 773da52a227f0e9ecce998cb6b50b3fe167a4f1d | [
"MIT"
] | null | null | null | exercicios/ex066.py | mrcbnu/python-_exercicios | 773da52a227f0e9ecce998cb6b50b3fe167a4f1d | [
"MIT"
] | null | null | null | exercicios/ex066.py | mrcbnu/python-_exercicios | 773da52a227f0e9ecce998cb6b50b3fe167a4f1d | [
"MIT"
] | null | null | null | ###########################################
# EXERCICIO 066 #
###########################################
'''CRIE UM PROGRAMA QUE LEIA NUMEROS INTEIROS
PELO TECLADO. O PROGRAMA SÓ VAI PARA QUANDO O
USUARIO DIGITAR 999, QUE É A CONDIÇÃO DE PARADA
NO FINAL MOSTRE QUANTOS NUMEROS FORAM DIGITADOS
... | 29.631579 | 63 | 0.545293 |
6c2aa15761f07a318b86abc9c608222d6635f580 | 2,822 | py | Python | frontend/img_upload.py | kn1ghtf1re/aegir-core | e91937a116b076ed78b15684ce68a7477fe03b9d | [
"Apache-2.0"
] | 2 | 2021-10-02T11:34:06.000Z | 2021-10-05T15:56:04.000Z | frontend/img_upload.py | kn1ghtf1re/aegir-core | e91937a116b076ed78b15684ce68a7477fe03b9d | [
"Apache-2.0"
] | null | null | null | frontend/img_upload.py | kn1ghtf1re/aegir-core | e91937a116b076ed78b15684ce68a7477fe03b9d | [
"Apache-2.0"
] | 2 | 2021-10-04T16:28:59.000Z | 2021-10-05T09:40:37.000Z | import streamlit as st
import cv2
from streamlit.server.server import Server
from PIL import Image
import session_state as SessionState
import numpy as np
import pandas as pd
import time
import requests
import base64
import json
import tempfile
from random import randint
from comp_vis import ArgusCV
st.set_page_config... | 28.505051 | 76 | 0.614458 |
adfd0d49c9f2e44900c0bc5cdc7404f8970b245e | 1,725 | py | Python | src/oci_cli/object_storage_transfer_manager/upload_tasks.py | rosalexander/oci-cli | 2ab654c639a50431903dd6b81b0143fb602b0864 | [
"Apache-2.0"
] | null | null | null | src/oci_cli/object_storage_transfer_manager/upload_tasks.py | rosalexander/oci-cli | 2ab654c639a50431903dd6b81b0143fb602b0864 | [
"Apache-2.0"
] | null | null | null | src/oci_cli/object_storage_transfer_manager/upload_tasks.py | rosalexander/oci-cli | 2ab654c639a50431903dd6b81b0143fb602b0864 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
from oci.object_storage import UploadManager
from .work_pool_task import WorkPoolTask
from retrying import retry
from .. import retry_utils
# A simple task which uploads a single file to Object Storage
class SimpleSingleUp... | 49.285714 | 130 | 0.770435 |
b6251fe1a855a80619b1a74f9871527ac9fdf88f | 5,879 | py | Python | 0000_examples/gelsight/img_to_depth.py | Photon26/wrs-main_0614 | c0d0e38deac9785e9c382305f65f3ac5f221787d | [
"MIT"
] | null | null | null | 0000_examples/gelsight/img_to_depth.py | Photon26/wrs-main_0614 | c0d0e38deac9785e9c382305f65f3ac5f221787d | [
"MIT"
] | null | null | null | 0000_examples/gelsight/img_to_depth.py | Photon26/wrs-main_0614 | c0d0e38deac9785e9c382305f65f3ac5f221787d | [
"MIT"
] | null | null | null | import cv2
import pickle
import numpy as np
from scipy.fftpack import dst, idst
def fishye_calib(img, para):
K, D, DIM = para
map1, map2 = cv2.fisheye.initUndistortRectifyMap(K, D, np.eye(3), K, DIM, cv2.CV_16SC2)
undistorted_img = cv2.remap(img, map1, map2, interpolation=cv2.INTER_LINEAR, borderMode=cv2.... | 39.456376 | 130 | 0.540908 |
155f20b9cf9571ee3e195c3545169e318b5ba7c9 | 296 | py | Python | packer_val.py | sthenc/nc_packer | 8df62e6f5fcc28a5009a9ea3fb83d9e245c42ab0 | [
"MIT"
] | null | null | null | packer_val.py | sthenc/nc_packer | 8df62e6f5fcc28a5009a9ea3fb83d9e245c42ab0 | [
"MIT"
] | null | null | null | packer_val.py | sthenc/nc_packer | 8df62e6f5fcc28a5009a9ea3fb83d9e245c42ab0 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import os
os.chdir('./tmp_val/')
komanda = 'htk2nc val_map.txt ../dev.nc'
os.system(komanda)
import time
import datetime
ts = time.time()
stamp = datetime.datetime.fromtimestamp(ts).strftime('%Y_%m_%d_%H_%M_%S')
os.system('cp ../dev.nc ../backup/dev' + stamp + '.nc')
| 14.095238 | 73 | 0.665541 |
64d0a0d5a415407099fcf29d6c49c340d2ce9628 | 10,806 | py | Python | tests/test_docs.py | anton-shakh-qg/deploy | e109d38ea1ca40a2bbc6e5af5ae3176f2c48021c | [
"MIT"
] | null | null | null | tests/test_docs.py | anton-shakh-qg/deploy | e109d38ea1ca40a2bbc6e5af5ae3176f2c48021c | [
"MIT"
] | null | null | null | tests/test_docs.py | anton-shakh-qg/deploy | e109d38ea1ca40a2bbc6e5af5ae3176f2c48021c | [
"MIT"
] | null | null | null | import os
from itertools import chain, permutations, product
from urllib.parse import urlparse
import pytest
import requests
fqdn = os.environ.get('FQDN', 'standard.open-contracting.org')
base_url = f'https://{fqdn}'
versions = {
'': (['latest', '1.0', '1.1-dev'], '/es/schema/release/'),
'/infrastructure': (... | 32.256716 | 109 | 0.652878 |
714ec4c5a8acde88fba96cb47aae69ca2da74174 | 1,712 | py | Python | newauth/backend.py | beproud/django-newauth | e7aa0a403eb1ae86121cc34e1f0cca05394eae24 | [
"BSD-2-Clause"
] | 3 | 2018-04-24T12:38:24.000Z | 2018-08-17T06:54:01.000Z | newauth/backend.py | beproud/django-newauth | e7aa0a403eb1ae86121cc34e1f0cca05394eae24 | [
"BSD-2-Clause"
] | 17 | 2016-01-26T03:59:38.000Z | 2021-12-27T23:03:54.000Z | newauth/backend.py | beproud/django-newauth | e7aa0a403eb1ae86121cc34e1f0cca05394eae24 | [
"BSD-2-Clause"
] | 3 | 2016-08-09T02:42:48.000Z | 2017-05-08T03:25:59.000Z | #:coding=utf-8:
from newauth.models import (
get_user_model, get_anonymous_user_model
)
__all__ = (
'BaseAuthBackend',
'ModelAuthBackend',
'BasicUserBackend',
)
class BaseAuthBackend(object):
"""
An base authentication backend class. Authentication
backends should inherit from this class.... | 26.75 | 77 | 0.67465 |
7f55b903c11de3870fc614bfea31a9278d630027 | 47,616 | py | Python | python/ccxt/gateio4.py | StatyMcStats/ccxt1 | 59819488f5721094219e4ba65885351f9d402819 | [
"MIT"
] | null | null | null | python/ccxt/gateio4.py | StatyMcStats/ccxt1 | 59819488f5721094219e4ba65885351f9d402819 | [
"MIT"
] | null | null | null | python/ccxt/gateio4.py | StatyMcStats/ccxt1 | 59819488f5721094219e4ba65885351f9d402819 | [
"MIT"
] | 1 | 2022-03-15T23:09:17.000Z | 2022-03-15T23:09:17.000Z | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.base.exchange import Exchange
import hashlib
import math
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import ... | 39.157895 | 126 | 0.472698 |
d2bda33bc8a4a8083c2acd24fc72b58ce5b8e0c9 | 10,484 | py | Python | contrib/experimental/great_expectations_experimental/expectations/expect_column_values_to_change_between.py | arunnthevapalan/great_expectations | 97f1481bcd1c3f4d8878c6f383f4e6f008b20cd1 | [
"Apache-2.0"
] | 1 | 2022-03-17T08:05:44.000Z | 2022-03-17T08:05:44.000Z | contrib/experimental/great_expectations_experimental/expectations/expect_column_values_to_change_between.py | arunnthevapalan/great_expectations | 97f1481bcd1c3f4d8878c6f383f4e6f008b20cd1 | [
"Apache-2.0"
] | null | null | null | contrib/experimental/great_expectations_experimental/expectations/expect_column_values_to_change_between.py | arunnthevapalan/great_expectations | 97f1481bcd1c3f4d8878c6f383f4e6f008b20cd1 | [
"Apache-2.0"
] | null | null | null | import json
import pandas as pd
#!!! This giant block of imports should be something simpler, such as:
# from great_exepectations.helpers.expectation_creation import *
from great_expectations.execution_engine import (
PandasExecutionEngine,
SparkDFExecutionEngine,
SqlAlchemyExecutionEngine,
)
from great_e... | 40.635659 | 160 | 0.611217 |
7f95fbd20530207f83247c2ec7547914bb90e719 | 11,791 | py | Python | bpython/inspection.py | gpotter2/bpython | f9b21cafc87f343b861d458c3bc438b0e419c1cc | [
"PSF-2.0"
] | 2,168 | 2015-01-01T11:41:40.000Z | 2022-03-29T07:44:48.000Z | bpython/inspection.py | gpotter2/bpython | f9b21cafc87f343b861d458c3bc438b0e419c1cc | [
"PSF-2.0"
] | 521 | 2015-01-02T16:43:44.000Z | 2022-03-31T12:37:55.000Z | bpython/inspection.py | gpotter2/bpython | f9b21cafc87f343b861d458c3bc438b0e419c1cc | [
"PSF-2.0"
] | 250 | 2015-01-08T21:28:18.000Z | 2022-02-28T16:07:43.000Z | # The MIT License
#
# Copyright (c) 2009-2011 the bpython authors.
# Copyright (c) 2015 Sebastian Ramacher
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including wit... | 31.867568 | 88 | 0.618607 |
662db2da09ab0aa2d27add5bef0ef068707088a1 | 83 | py | Python | apps/fyle/apps.py | Sravanksk/fyle-qbo-api | 53f595170a073f245b9930bfce2ca07bdf998ce3 | [
"MIT"
] | 1 | 2021-03-08T08:13:36.000Z | 2021-03-08T08:13:36.000Z | apps/fyle/apps.py | Sravanksk/fyle-qbo-api | 53f595170a073f245b9930bfce2ca07bdf998ce3 | [
"MIT"
] | 82 | 2020-11-24T10:17:29.000Z | 2022-03-30T07:27:26.000Z | apps/fyle/apps.py | Sravanksk/fyle-qbo-api | 53f595170a073f245b9930bfce2ca07bdf998ce3 | [
"MIT"
] | 3 | 2020-03-09T12:56:31.000Z | 2020-06-10T07:55:47.000Z | from django.apps import AppConfig
class FyleConfig(AppConfig):
name = 'fyle'
| 13.833333 | 33 | 0.73494 |
304b0c8ea51dc68aa3e9bf566d4a1c1257401855 | 10,068 | py | Python | tflite2onnx/tensor.py | briangrifiin/tflite2onnx | e0a30f23d8236673c6a31a9a2a67913ae4cb8644 | [
"Apache-2.0"
] | 87 | 2020-09-23T01:16:36.000Z | 2022-03-26T01:10:32.000Z | tflite2onnx/tensor.py | briangrifiin/tflite2onnx | e0a30f23d8236673c6a31a9a2a67913ae4cb8644 | [
"Apache-2.0"
] | 57 | 2020-09-23T01:26:13.000Z | 2022-01-26T07:58:29.000Z | tflite2onnx/tensor.py | briangrifiin/tflite2onnx | e0a30f23d8236673c6a31a9a2a67913ae4cb8644 | [
"Apache-2.0"
] | 23 | 2020-10-17T11:58:21.000Z | 2022-03-24T06:15:18.000Z | import copy
import logging
import numpy as np
import onnx
from onnx import helper, numpy_helper, TensorProto
from tflite2onnx import mapping
from tflite2onnx.common import T2OBase
logger = logging.getLogger('tflite2onnx')
class Tensor(T2OBase):
def __init__(self, model, graph, index, layout=None, is_bias=False)... | 35.957143 | 92 | 0.592372 |
50af5ba5eea3ae4f6963f92d7935fcd3e11cde49 | 2,355 | py | Python | src/biblishelf_book/migrations/0001_initial.py | x007007007/biblishelf | a79b105f6929ecc9df41b1e74a92713212cd06fa | [
"MIT"
] | null | null | null | src/biblishelf_book/migrations/0001_initial.py | x007007007/biblishelf | a79b105f6929ecc9df41b1e74a92713212cd06fa | [
"MIT"
] | 3 | 2018-01-28T15:17:55.000Z | 2018-01-31T09:21:01.000Z | src/biblishelf_book/migrations/0001_initial.py | x007007007/biblishelf | a79b105f6929ecc9df41b1e74a92713212cd06fa | [
"MIT"
] | 1 | 2018-01-27T13:49:51.000Z | 2018-01-27T13:49:51.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2016-09-24 09:10
from __future__ import unicode_literals
import biblishelf_book.models
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('biblishel... | 40.603448 | 157 | 0.599151 |
e55bdfdf7a10f808d871c7108857a1c79c3f1ff6 | 35,534 | py | Python | tasks/vendoring/__init__.py | epicfaace/pipenv | b29a4884e24dd2dd72f379d64b23779a676d2ef9 | [
"MIT"
] | null | null | null | tasks/vendoring/__init__.py | epicfaace/pipenv | b29a4884e24dd2dd72f379d64b23779a676d2ef9 | [
"MIT"
] | 54 | 2018-10-07T08:46:09.000Z | 2020-08-19T14:25:31.000Z | tasks/vendoring/__init__.py | epicfaace/pipenv | b29a4884e24dd2dd72f379d64b23779a676d2ef9 | [
"MIT"
] | null | null | null | # -*- coding=utf-8 -*-
# Taken from pip
# see https://github.com/pypa/pip/blob/95bcf8c5f6394298035a7332c441868f3b0169f4/tasks/vendoring/__init__.py
""""Vendoring script, python 3.5 needed"""
import io
import itertools
import json
import re
import shutil
import sys
# from tempfile import TemporaryDirectory
import tarf... | 39.005488 | 170 | 0.625457 |
6885709e154f6ae3d0952842e393c4c290d87e3b | 643 | py | Python | addons/mendeley/tests/test_serializer.py | gaybro8777/osf.io | 30408511510a40bc393565817b343ef5fd76ab14 | [
"Apache-2.0"
] | 628 | 2015-01-15T04:33:22.000Z | 2022-03-30T06:40:10.000Z | addons/mendeley/tests/test_serializer.py | gaybro8777/osf.io | 30408511510a40bc393565817b343ef5fd76ab14 | [
"Apache-2.0"
] | 4,712 | 2015-01-02T01:41:53.000Z | 2022-03-30T14:18:40.000Z | addons/mendeley/tests/test_serializer.py | Johnetordoff/osf.io | de10bf249c46cede04c78f7e6f7e352c69e6e6b5 | [
"Apache-2.0"
] | 371 | 2015-01-12T16:14:08.000Z | 2022-03-31T18:58:29.000Z | # -*- coding: utf-8 -*-
"""Serializer tests for the Mendeley addon."""
import pytest
from addons.base.tests.serializers import CitationAddonSerializerTestSuiteMixin
from addons.base.tests.utils import MockFolder
from addons.mendeley.tests.factories import MendeleyAccountFactory
from addons.mendeley.serializer import M... | 30.619048 | 81 | 0.819596 |
eac95900720d3ef6c8893fab353cdcaa59c2d571 | 4,904 | py | Python | PP4E/Examples/PP4E/Gui/Tools/guiStreams.py | BeacherHou/Python-_Markdown- | 015d79a02d32f49395b80ca10919b3a09b72c4df | [
"MIT"
] | null | null | null | PP4E/Examples/PP4E/Gui/Tools/guiStreams.py | BeacherHou/Python-_Markdown- | 015d79a02d32f49395b80ca10919b3a09b72c4df | [
"MIT"
] | null | null | null | PP4E/Examples/PP4E/Gui/Tools/guiStreams.py | BeacherHou/Python-_Markdown- | 015d79a02d32f49395b80ca10919b3a09b72c4df | [
"MIT"
] | null | null | null | """
###############################################################################
first-cut implementation of file-like classes that can be used to redirect
input and output streams to GUI displays; as is, input comes from a common
dialog pop-up (a single output+input interface or a persistent Entry field
for in... | 40.528926 | 82 | 0.515905 |
91d4472986e797ca2d2e9dd1d2bda7836c118d74 | 126,494 | py | Python | src/Main.py | FahimShahriar/LegendOfZeldaGame | b506ad520443e9bf7a3dab7e49927e69ff9c594c | [
"MIT"
] | null | null | null | src/Main.py | FahimShahriar/LegendOfZeldaGame | b506ad520443e9bf7a3dab7e49927e69ff9c594c | [
"MIT"
] | null | null | null | src/Main.py | FahimShahriar/LegendOfZeldaGame | b506ad520443e9bf7a3dab7e49927e69ff9c594c | [
"MIT"
] | null | null | null | __author__ = 'Fahim and Sajid'
from math import *
from random import *
from pygame import *
import os
current_path = os.path.dirname(__file__)
size = width, height = 1200, 800
screen = display.set_mode(size)
myClock = time.Clock()
font.init()
mixer.init()
def splitter(pic, row, col):
x, y = pic.get_size()
... | 40.426334 | 172 | 0.468172 |
d1a2e305f89d163bcfd930abfd8b9cbb12c9d8a0 | 16,052 | py | Python | pysnmp/BSC2780-OPT-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/BSC2780-OPT-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/BSC2780-OPT-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module BSC2780-OPT-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/BSC2780-OPT-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 17:24:19 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27... | 150.018692 | 2,657 | 0.772988 |
8ab429fde7df6fb2a6db294665c3fba00e543856 | 30,411 | py | Python | tests/contrib/dbapi/test_dbapi.py | ClementAcher/dd-trace-py | f36519313c64d912ab9010094205ec3a82f1e493 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | tests/contrib/dbapi/test_dbapi.py | ClementAcher/dd-trace-py | f36519313c64d912ab9010094205ec3a82f1e493 | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2021-01-27T04:53:24.000Z | 2021-01-27T04:53:24.000Z | tests/contrib/dbapi/test_dbapi.py | ClementAcher/dd-trace-py | f36519313c64d912ab9010094205ec3a82f1e493 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | import mock
import pytest
from ddtrace import Pin
from ddtrace.constants import ANALYTICS_SAMPLE_RATE_KEY
from ddtrace.contrib.dbapi import FetchTracedCursor
from ddtrace.contrib.dbapi import TracedConnection
from ddtrace.contrib.dbapi import TracedCursor
from ddtrace.span import Span
from ddtrace.utils.attrdict impor... | 37.359951 | 117 | 0.624018 |
f479eeb289ee7bd6b76a00bab1450c5491aa2a57 | 4,199 | py | Python | setup_singlethread.py | 5c0t-qi/qulacs | 1c6c2f09616163eb92669cb7e9fb1ee78b7c2e42 | [
"MIT"
] | 1 | 2020-04-10T01:36:34.000Z | 2020-04-10T01:36:34.000Z | setup_singlethread.py | 5c0t-qi/qulacs | 1c6c2f09616163eb92669cb7e9fb1ee78b7c2e42 | [
"MIT"
] | null | null | null | setup_singlethread.py | 5c0t-qi/qulacs | 1c6c2f09616163eb92669cb7e9fb1ee78b7c2e42 | [
"MIT"
] | null | null | null | import os
import re
import sys
import platform
import subprocess
from setuptools import setup, find_packages, Extension
from setuptools.command.build_ext import build_ext
from distutils.version import LooseVersion
_VERSION = '0.1.9'
project_name = 'Qulacs'
class CMakeExtension(Extension):
def __init__(self, nam... | 40.375 | 112 | 0.58371 |
6dece278a07c81b3358f933fa52e3970e03a483c | 2,708 | py | Python | Projects/Continuous_Control/main.py | whiterabbitobj/udacity-deep-reinforcement-learning | ede648f94c81f36aae68e3c9859280bf1e3a01eb | [
"MIT"
] | 1 | 2019-05-19T23:02:25.000Z | 2019-05-19T23:02:25.000Z | Projects/Continuous_Control/main.py | whiterabbitobj/udacity-deep-reinforcement-learning | ede648f94c81f36aae68e3c9859280bf1e3a01eb | [
"MIT"
] | 8 | 2020-03-24T16:48:32.000Z | 2022-01-13T01:06:11.000Z | Projects/Continuous_Control/main.py | whiterabbitobj/udacity-deep-reinforcement-learning | ede648f94c81f36aae68e3c9859280bf1e3a01eb | [
"MIT"
] | 1 | 2019-02-14T10:02:45.000Z | 2019-02-14T10:02:45.000Z | # -*- coding: utf-8 -*-
import numpy as np
from agent import D4PG_Agent
from environment import Environment
from data_handling import Logger, Saver, gather_args
def main():
"""
Originall written for Udacity's Continuous Control project:
https://github.com/udacity/deep-reinforcement-learning/tree/master/p2_... | 26.038462 | 92 | 0.634786 |
3986a44ced7b7d28ef65a8fd463aa3c1035eda79 | 2,978 | py | Python | nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Tool/as.py | RESP3CT88/Nuitka | 0fcc25d9f00c4fc78c79a863c4b7987f573962e1 | [
"Apache-2.0"
] | 5,421 | 2018-09-24T08:04:06.000Z | 2022-03-31T20:02:37.000Z | nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Tool/as.py | RESP3CT88/Nuitka | 0fcc25d9f00c4fc78c79a863c4b7987f573962e1 | [
"Apache-2.0"
] | 1,348 | 2018-09-22T13:41:00.000Z | 2022-03-31T22:33:40.000Z | nuitka/build/inline_copy/lib/scons-3.1.2/SCons/Tool/as.py | RESP3CT88/Nuitka | 0fcc25d9f00c4fc78c79a863c4b7987f573962e1 | [
"Apache-2.0"
] | 396 | 2018-09-28T15:37:03.000Z | 2022-03-29T10:52:09.000Z | """SCons.Tool.as
Tool-specific initialization for as, the generic Posix assembler.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001 - 2019 The SCons Foundation
#
# Permission is hereby ... | 37.696203 | 113 | 0.737072 |
2df4eaad62ac0ff3a8a9e46314af9e7925f58eb7 | 797 | py | Python | tutorials/W2D5_ReinforcementLearning/solutions/W2D5_Tutorial2_Solution_82effe96.py | NinelK/course-content | 317b4cf153a89afbddbd194e7fbb15c91588b3c5 | [
"CC-BY-4.0"
] | 26 | 2020-07-01T20:38:44.000Z | 2021-06-20T06:37:27.000Z | tutorials/W2D5_ReinforcementLearning/solutions/W2D5_Tutorial2_Solution_82effe96.py | Andy-Dufrein/course-content | 977f4ddaaa4f33746672930ae01d5ea592dbbba0 | [
"CC-BY-4.0"
] | 3 | 2020-06-23T03:46:36.000Z | 2020-07-07T05:26:01.000Z | tutorials/W2D5_ReinforcementLearning/solutions/W2D5_Tutorial2_Solution_82effe96.py | Andy-Dufrein/course-content | 977f4ddaaa4f33746672930ae01d5ea592dbbba0 | [
"CC-BY-4.0"
] | 16 | 2020-07-06T06:48:02.000Z | 2021-07-30T08:18:52.000Z | def epsilon_greedy(q, epsilon):
"""Epsilon-greedy policy: selects the maximum value action with probabilty
(1-epsilon) and selects randomly with epsilon probability.
Args:
q (ndarray): an array of action values
epsilon (float): probability of selecting an action randomly
Returns:
int: the c... | 29.518519 | 80 | 0.707654 |
e0ca527b6b0cf6b3676d9fd89799a24c30324245 | 2,413 | py | Python | open_spiel/python/algorithms/exploitability_descent_test.py | Limmen/open_spiel | 2d4d7b783a9161e2c4c90f70dec29d6982fac6c1 | [
"Apache-2.0"
] | 1 | 2021-12-31T01:45:58.000Z | 2021-12-31T01:45:58.000Z | open_spiel/python/algorithms/exploitability_descent_test.py | Limmen/open_spiel | 2d4d7b783a9161e2c4c90f70dec29d6982fac6c1 | [
"Apache-2.0"
] | null | null | null | open_spiel/python/algorithms/exploitability_descent_test.py | Limmen/open_spiel | 2d4d7b783a9161e2c4c90f70dec29d6982fac6c1 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 DeepMind Technologies Limited
#
# 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 agr... | 37.703125 | 78 | 0.758392 |
97575a421bc120379d7df3206567ab4f3c7928f0 | 518 | py | Python | setup.py | lysol/saulscript | 5cd0a409981a56c490d064612f416137ead7ea4a | [
"MIT"
] | null | null | null | setup.py | lysol/saulscript | 5cd0a409981a56c490d064612f416137ead7ea4a | [
"MIT"
] | null | null | null | setup.py | lysol/saulscript | 5cd0a409981a56c490d064612f416137ead7ea4a | [
"MIT"
] | null | null | null | import setuptools
setuptools.setup(name='saulscript',
version='0.0.1',
description='An interpreted scripting language for games',
long_description=open('README.md').read().strip(),
author='Package Author',
author_email='you@youremail... | 37 | 75 | 0.544402 |
be01261d1ca226d6b0fc714dc2d90b1ffd8558f2 | 1,970 | py | Python | docs/conf.py | SimeonAleksov/shawty.me | bf7b4daba6de57f7843f70a663a8f222e1bacf8e | [
"Apache-2.0"
] | null | null | null | docs/conf.py | SimeonAleksov/shawty.me | bf7b4daba6de57f7843f70a663a8f222e1bacf8e | [
"Apache-2.0"
] | null | null | null | docs/conf.py | SimeonAleksov/shawty.me | bf7b4daba6de57f7843f70a663a8f222e1bacf8e | [
"Apache-2.0"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 35.178571 | 79 | 0.666497 |
92cd6e69c00d2ca2c8ffb93a7cd94debf26f6a41 | 2,671 | py | Python | llama_slobber/ll_matchresult.py | wusui/llama_slobber | bd31f44074fc129bb89c0ac250b06405c2fa68ba | [
"MIT"
] | 5 | 2019-01-02T03:01:19.000Z | 2021-09-03T18:52:39.000Z | llama_slobber/ll_matchresult.py | wusui/llama_slobber | bd31f44074fc129bb89c0ac250b06405c2fa68ba | [
"MIT"
] | 3 | 2019-03-06T19:01:55.000Z | 2019-03-06T23:36:43.000Z | llama_slobber/ll_matchresult.py | wusui/llama_slobber | bd31f44074fc129bb89c0ac250b06405c2fa68ba | [
"MIT"
] | 1 | 2019-10-25T03:02:45.000Z | 2019-10-25T03:02:45.000Z | #!/usr/bin/python
# Copyright (c) 2018 Warren Usui, MIT License
# pylint: disable=W0223
# pylint: disable=E1111
"""
Handle the compilation of information for a match day.
"""
from html.parser import HTMLParser
from llama_slobber.ll_local_io import get_session
from llama_slobber.ll_local_io import get_page_data
from ll... | 31.423529 | 74 | 0.558967 |
4280249e994b33e79bc8bc28a554ccad818002af | 1,129 | py | Python | examples/pyecharts/h_approximation_example.py | dongyan1024/overtime | 4f722a823585890026fe9584ba5985963b2a586c | [
"MIT"
] | 9 | 2020-10-15T13:53:36.000Z | 2022-03-08T12:08:09.000Z | examples/pyecharts/h_approximation_example.py | dongyan1024/overtime | 4f722a823585890026fe9584ba5985963b2a586c | [
"MIT"
] | 6 | 2021-02-07T15:43:12.000Z | 2021-04-24T04:03:39.000Z | examples/pyecharts/h_approximation_example.py | dongyan1024/overtime | 4f722a823585890026fe9584ba5985963b2a586c | [
"MIT"
] | 7 | 2020-10-15T13:55:12.000Z | 2022-03-12T03:54:02.000Z | import overtime as ot
# load data (simple network)
network1 = ot.TemporalDiGraph('test_network', data=ot.CsvInput('../../overtime/data/network.csv'))
# load data (London subway stations - Victoria)
tfl_data = ot.CsvInput('../../overtime/data/victoria_central_bakerloo_piccadilly-inbound_outbound.csv')
network... | 49.086957 | 251 | 0.781222 |
e071819cf11adc6ac1886a779156a0956b4dee5a | 372 | py | Python | app/core/migrations/0006_auto_20220111_0803.py | hamidrezaorouji/recipe-app-api | 0500f4f59389fad63a13bc65800646cc980f58e6 | [
"MIT"
] | null | null | null | app/core/migrations/0006_auto_20220111_0803.py | hamidrezaorouji/recipe-app-api | 0500f4f59389fad63a13bc65800646cc980f58e6 | [
"MIT"
] | null | null | null | app/core/migrations/0006_auto_20220111_0803.py | hamidrezaorouji/recipe-app-api | 0500f4f59389fad63a13bc65800646cc980f58e6 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.26 on 2022-01-11 08:03
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('core', '0005_auto_20220111_0801'),
]
operations = [
migrations.RenameField(
model_name='recipe',
old_name='time_minutes',
... | 19.578947 | 48 | 0.594086 |
4f22cce85e14ff5842d1dc3740b6ac4239b82e0a | 10,418 | py | Python | tests/test_packages/test_skills/test_confirmation_aw1/test_dialogues.py | marcofavorito/agents-aea | e520f2f5d076a193514e194d94aa76c6423ac5bc | [
"Apache-2.0"
] | null | null | null | tests/test_packages/test_skills/test_confirmation_aw1/test_dialogues.py | marcofavorito/agents-aea | e520f2f5d076a193514e194d94aa76c6423ac5bc | [
"Apache-2.0"
] | null | null | null | tests/test_packages/test_skills/test_confirmation_aw1/test_dialogues.py | marcofavorito/agents-aea | e520f2f5d076a193514e194d94aa76c6423ac5bc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2018-2019 Fetch.AI Limited
#
# 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 ... | 41.34127 | 88 | 0.668842 |
36a6363060a347135c9fcd68607d7d963bcf1ead | 6,560 | py | Python | my_pruning/models/vgg_cifar10.py | dbwp031/pruning | 27c432b0e456cb7e10c872fe58d67160b5f0db01 | [
"MIT"
] | null | null | null | my_pruning/models/vgg_cifar10.py | dbwp031/pruning | 27c432b0e456cb7e10c872fe58d67160b5f0db01 | [
"MIT"
] | null | null | null | my_pruning/models/vgg_cifar10.py | dbwp031/pruning | 27c432b0e456cb7e10c872fe58d67160b5f0db01 | [
"MIT"
] | null | null | null | import math
import torch
import torch.nn as nn
from torch.autograd import Variable
__all__ = ['vgg']
defaultcfg = {
11: [64, 'M', 128, 'M', 256, 256, 'M', 512, 512, 'M', 512, 512],
13: [64, 64, 'M', 128, 128, 'M', 256, 256, 'M', 512, 512, 'M', 512, 512],
16: [64, 64, 'M', 128, 128, 'M', 256, 2... | 39.518072 | 108 | 0.499238 |
a44a61c1296bfc3f03c025cdb0db9376cff986f3 | 606 | py | Python | visualsearch/init_db.py | emabello42/visual-search | dcf17f8f63f0ccfedfcf64576a870ee70ee783f7 | [
"MIT"
] | null | null | null | visualsearch/init_db.py | emabello42/visual-search | dcf17f8f63f0ccfedfcf64576a870ee70ee783f7 | [
"MIT"
] | null | null | null | visualsearch/init_db.py | emabello42/visual-search | dcf17f8f63f0ccfedfcf64576a870ee70ee783f7 | [
"MIT"
] | null | null | null | from application import db, DBConfig
from sqlalchemy_utils import create_database
import ast
from database.models import Category
def init_database():
db.create_all()
# create image categories
with open("imagenet.txt", "r") as f:
dict_categories = ast.literal_eval(f.read())
categories = []... | 27.545455 | 64 | 0.678218 |
a809c3726dc63de64fd615a4d045c5e06b68f6da | 176 | py | Python | input matrix.py | kingRovo/PythonCodingChalenge | b62938592df10ccafec9930b69c14c778e19ad37 | [
"bzip2-1.0.6"
] | 1 | 2021-08-02T16:52:55.000Z | 2021-08-02T16:52:55.000Z | input matrix.py | kingRovo/PythonCodingChalenge | b62938592df10ccafec9930b69c14c778e19ad37 | [
"bzip2-1.0.6"
] | null | null | null | input matrix.py | kingRovo/PythonCodingChalenge | b62938592df10ccafec9930b69c14c778e19ad37 | [
"bzip2-1.0.6"
] | null | null | null | a=int(input("enter the row"))
b=int(input("enter the colomn"))
k=1
for i in range(a):
for j in range(b):
print(k,end=' ')
k=k+1
print(' ')
| 16 | 32 | 0.488636 |
2dc4db4e5f0b893b870e22387dd844b4721b40f1 | 191 | py | Python | tests/__init__.py | hasandiwan/ZppixBot-Source | 8364ace985897b84433244450ab22d4ed4ad8191 | [
"EFL-2.0"
] | 1 | 2019-11-27T16:56:51.000Z | 2019-11-27T16:56:51.000Z | tests/__init__.py | RhinosF1/ZppixBot-Source | 32f45c85d70a1961aafe7a4ce9b95c34e0133aa7 | [
"EFL-2.0"
] | null | null | null | tests/__init__.py | RhinosF1/ZppixBot-Source | 32f45c85d70a1961aafe7a4ce9b95c34e0133aa7 | [
"EFL-2.0"
] | null | null | null | # coding=utf-8
from __future__ import (
unicode_literals,
absolute_import,
print_function,
division
)
import sys, os
sys.path.insert(0, os.path.abspath(__file__ + "/../.."))
| 17.363636 | 56 | 0.675393 |
fa18fda738ead574f9b947a7d38a3c85f77e8ed6 | 1,041 | py | Python | app/core/migrations/0004_recipe.py | martinramirezboggio/recipe-app-api | 8f576ae036ba9a55e75a76465e97e0340378572e | [
"MIT"
] | null | null | null | app/core/migrations/0004_recipe.py | martinramirezboggio/recipe-app-api | 8f576ae036ba9a55e75a76465e97e0340378572e | [
"MIT"
] | null | null | null | app/core/migrations/0004_recipe.py | martinramirezboggio/recipe-app-api | 8f576ae036ba9a55e75a76465e97e0340378572e | [
"MIT"
] | null | null | null | # Generated by Django 2.1.5 on 2019-01-20 04:10
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('core', '0003_ingredient'),
]
operations = [
migrations.CreateModel(
... | 35.896552 | 118 | 0.603266 |
35cc2d90307f46a17f94e833cb392de616ba35e0 | 2,095 | py | Python | tests/test_transaction.py | massanchik/monero-python | 5699c26f6ba0a64f50ac065ebe0419daf01fd993 | [
"BSD-3-Clause"
] | 3 | 2020-05-02T02:48:16.000Z | 2021-06-15T16:50:11.000Z | tests/test_transaction.py | massanchik/monero-python | 5699c26f6ba0a64f50ac065ebe0419daf01fd993 | [
"BSD-3-Clause"
] | null | null | null | tests/test_transaction.py | massanchik/monero-python | 5699c26f6ba0a64f50ac065ebe0419daf01fd993 | [
"BSD-3-Clause"
] | 1 | 2019-03-08T12:04:19.000Z | 2019-03-08T12:04:19.000Z | from datetime import datetime
from decimal import Decimal
from operator import attrgetter
import random
import unittest
from monero.address import address
from monero.numbers import PaymentID
from monero.transaction import IncomingPayment, OutgoingPayment, Transaction, _ByHeight
class FiltersTestCase(unittest.TestCas... | 41.078431 | 133 | 0.686396 |
60af224525843c3e12832794039c0237e895b7ec | 635 | py | Python | backend/manage.py | crowdbotics-apps/the-chase-32502 | 55f3af63654e3a15b4012399c02f453a718977a0 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/manage.py | crowdbotics-apps/the-chase-32502 | 55f3af63654e3a15b4012399c02f453a718977a0 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/manage.py | crowdbotics-apps/the-chase-32502 | 55f3af63654e3a15b4012399c02f453a718977a0 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'the_chase_32502.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
rais... | 28.863636 | 79 | 0.686614 |
90d4e54f4e3b4f293057d5edd67db1a390d4ff30 | 3,773 | py | Python | tests/_apis/league_of_legends/test_MatchApiV4.py | TheBoringBakery/Riot-Watcher | 6e05fffe127530a75fd63e67da37ba81489fd4fe | [
"MIT"
] | 2 | 2020-10-06T23:33:01.000Z | 2020-11-22T01:58:43.000Z | tests/_apis/league_of_legends/test_MatchApiV4.py | TheBoringBakery/Riot-Watcher | 6e05fffe127530a75fd63e67da37ba81489fd4fe | [
"MIT"
] | null | null | null | tests/_apis/league_of_legends/test_MatchApiV4.py | TheBoringBakery/Riot-Watcher | 6e05fffe127530a75fd63e67da37ba81489fd4fe | [
"MIT"
] | null | null | null | from unittest.mock import MagicMock
import pytest
from riotwatcher._apis.league_of_legends import MatchApiV4
@pytest.mark.lol
@pytest.mark.unit
class TestMatchApiV4:
def test_by_id(self):
mock_base_api = MagicMock()
expected_return = object()
mock_base_api.raw_request.return_value = expe... | 29.944444 | 108 | 0.589186 |
b1e65b1165d1e2a274294a0042e5bf993c97d768 | 973 | py | Python | fancy/trainer/model/checkpoint_plotter.py | susautw/fancy-trainer | eeb7ba1a541a8070171f1be972f8d99f81a4bff9 | [
"MIT"
] | null | null | null | fancy/trainer/model/checkpoint_plotter.py | susautw/fancy-trainer | eeb7ba1a541a8070171f1be972f8d99f81a4bff9 | [
"MIT"
] | null | null | null | fancy/trainer/model/checkpoint_plotter.py | susautw/fancy-trainer | eeb7ba1a541a8070171f1be972f8d99f81a4bff9 | [
"MIT"
] | null | null | null | from typing import Dict
from matplotlib import pyplot as plt
from . import CheckpointPlotterBase, Checkpoint
class CheckpointPlotter(CheckpointPlotterBase):
def plot(self, checkpoint: Checkpoint) -> Dict[str, plt.Figure]:
test_plotted = []
figs = {}
for name, metric_list in checkpoint.tr... | 32.433333 | 77 | 0.597122 |
31a92f74edbd4d620c3ad36d4ef4d78df8f5e534 | 3,908 | py | Python | tests/test_orient_version.py | spy7/pyorient | ac2547287f9299f4eec350666da3b19797872f20 | [
"Apache-2.0"
] | 142 | 2015-01-12T06:34:59.000Z | 2022-01-19T10:34:30.000Z | tests/test_orient_version.py | spy7/pyorient | ac2547287f9299f4eec350666da3b19797872f20 | [
"Apache-2.0"
] | 238 | 2015-01-04T21:05:41.000Z | 2021-04-12T17:45:53.000Z | tests/test_orient_version.py | spy7/pyorient | ac2547287f9299f4eec350666da3b19797872f20 | [
"Apache-2.0"
] | 107 | 2015-01-03T03:33:17.000Z | 2021-12-07T16:48:48.000Z | import unittest
import pyorient
# db_name = "GratefulDeadConcerts"
# client = pyorient.OrientDB("localhost", 2424)
# client.set_session_token(True)
# cluster_info = client.db_open( db_name, "admin", "admin" )
# print(client.db_count_records())
__author__ = 'Ostico <ostico@gmail.com>'
class OrientVersionTestCase( un... | 35.527273 | 126 | 0.610542 |
4c2acf88873b57f4ee973bdb2ee03d8f3d438ee6 | 2,099 | py | Python | tests/regressiontests/forms/localflavor/py.py | hafeez3000/django | 08e1175ac8d683b692ec3c67dc31df149f07dc8f | [
"BSD-3-Clause"
] | null | null | null | tests/regressiontests/forms/localflavor/py.py | hafeez3000/django | 08e1175ac8d683b692ec3c67dc31df149f07dc8f | [
"BSD-3-Clause"
] | null | null | null | tests/regressiontests/forms/localflavor/py.py | hafeez3000/django | 08e1175ac8d683b692ec3c67dc31df149f07dc8f | [
"BSD-3-Clause"
] | null | null | null | from django.contrib.localflavor.py.forms import (PyDepartmentSelect,
PyNumberedDepartmentSelect)
from utils import LocalFlavorTestCase
class PYLocalFlavorTests(LocalFlavorTestCase):
def test_PyDepartmentSelect(self):
py = PyDepartmentSelect()
out = u'''<select name="department">
<option value=... | 38.87037 | 68 | 0.717961 |
d2052bec7ab6a1ccf3c45354e210d39bc592d3aa | 82 | py | Python | Information_Extraction/CRF++/python/PaxHeader/test.py | zenithanu/Information_Analysis | 5436838212509523d89f0ad395b945ef66015890 | [
"Apache-2.0"
] | null | null | null | Information_Extraction/CRF++/python/PaxHeader/test.py | zenithanu/Information_Analysis | 5436838212509523d89f0ad395b945ef66015890 | [
"Apache-2.0"
] | null | null | null | Information_Extraction/CRF++/python/PaxHeader/test.py | zenithanu/Information_Analysis | 5436838212509523d89f0ad395b945ef66015890 | [
"Apache-2.0"
] | null | null | null | 14 gid=567620
14 uid=567620
27 mtime=1464137112.290804
27 atime=1466558107.382911
| 16.4 | 26 | 0.829268 |
42b05cde397c3e31d070f6e8125c824ad3b48f50 | 790 | py | Python | assignments/04-python-bash/head.py | jaeanderson/biosys-analytics | 2d92bfc584a5ee6a3072616b0f139c0a809bae1d | [
"MIT"
] | null | null | null | assignments/04-python-bash/head.py | jaeanderson/biosys-analytics | 2d92bfc584a5ee6a3072616b0f139c0a809bae1d | [
"MIT"
] | null | null | null | assignments/04-python-bash/head.py | jaeanderson/biosys-analytics | 2d92bfc584a5ee6a3072616b0f139c0a809bae1d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""head command in python"""
import sys
import os
def main():
"""main"""
args = sys.argv[1:]
if len(args) == 0 or len(args) > 2:
scriptname = os.path.basename(sys.argv[0])
print('Usage: {} FILE [NUM_LINES]'.format(scriptname))
sys.exit(1)
if len(ar... | 21.944444 | 74 | 0.525316 |
925d25df67057ef94cbde4b10199c50090441ec7 | 10,148 | py | Python | sdk/python/pulumi_azure_native/devtestlab/latest/get_artifact_source.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/devtestlab/latest/get_artifact_source.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/devtestlab/latest/get_artifact_source.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
__a... | 37.446494 | 299 | 0.645349 |
3843207a84210e8b44eb3c6c918036aad30325d0 | 37,079 | py | Python | sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_databases_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_databases_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/kusto/azure-mgmt-kusto/azure/mgmt/kusto/aio/operations/_databases_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # 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 ... | 45.776543 | 329 | 0.6734 |
2ce2bda762f84d99e988f09126ed7a199d8971b6 | 3,675 | py | Python | sphinx/util/console.py | cocoatomo/sphinx | 559c8202146eb4682d3babb648a4aa5b6c588977 | [
"BSD-2-Clause"
] | null | null | null | sphinx/util/console.py | cocoatomo/sphinx | 559c8202146eb4682d3babb648a4aa5b6c588977 | [
"BSD-2-Clause"
] | null | null | null | sphinx/util/console.py | cocoatomo/sphinx | 559c8202146eb4682d3babb648a4aa5b6c588977 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
sphinx.util.console
~~~~~~~~~~~~~~~~~~~
Format colored console output.
:copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import os
import re
import sys
try:
# check if colorama is installed to support colo... | 24.177632 | 79 | 0.569524 |
c5b287c0db33ec051ed556bf4306560cc4b51f7d | 1,446 | py | Python | leo/external/npyscreen/wgtextbox_controlchrs.py | ATikhonov2/leo-editor | 225aac990a9b2804aaa9dea29574d6e072e30474 | [
"MIT"
] | 1,550 | 2015-01-14T16:30:37.000Z | 2022-03-31T08:55:58.000Z | leo/external/npyscreen/wgtextbox_controlchrs.py | ATikhonov2/leo-editor | 225aac990a9b2804aaa9dea29574d6e072e30474 | [
"MIT"
] | 2,009 | 2015-01-13T16:28:52.000Z | 2022-03-31T18:21:48.000Z | leo/external/npyscreen/wgtextbox_controlchrs.py | ATikhonov2/leo-editor | 225aac990a9b2804aaa9dea29574d6e072e30474 | [
"MIT"
] | 200 | 2015-01-05T15:07:41.000Z | 2022-03-07T17:05:01.000Z | #@+leo-ver=5-thin
#@+node:ekr.20170428084208.359: * @file ../external/npyscreen/wgtextbox_controlchrs.py
#@+others
#@+node:ekr.20170428084208.360: ** Declarations
# import curses
from . import wgtextbox as textbox
#@+node:ekr.20170428084208.361: ** class TextfieldCtrlChars
class TextfieldCtrlChars(textbox.Textfield):
... | 32.863636 | 122 | 0.715076 |
dcac7630230253b56af44b5953b093d3da73d9ad | 48,121 | py | Python | usb/core.py | JackLilhammers/pyusb | 8e58638d5a79092a0f21c8cb5a550bb13bc9d3a5 | [
"BSD-3-Clause"
] | null | null | null | usb/core.py | JackLilhammers/pyusb | 8e58638d5a79092a0f21c8cb5a550bb13bc9d3a5 | [
"BSD-3-Clause"
] | null | null | null | usb/core.py | JackLilhammers/pyusb | 8e58638d5a79092a0f21c8cb5a550bb13bc9d3a5 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2009-2017 Wander Lairson Costa
# Copyright 2009-2021 PyUSB contributors
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this ... | 36.018713 | 94 | 0.60298 |
ecc5d7fc24ccc81f2c9f88bfc27c6f40d1e3607a | 455 | py | Python | Python/functions.py | JoaoRobertoFernandes/Code-to-study | ac0a69035f5aa124b4ef789bc884342dc93e6fc8 | [
"MIT"
] | null | null | null | Python/functions.py | JoaoRobertoFernandes/Code-to-study | ac0a69035f5aa124b4ef789bc884342dc93e6fc8 | [
"MIT"
] | null | null | null | Python/functions.py | JoaoRobertoFernandes/Code-to-study | ac0a69035f5aa124b4ef789bc884342dc93e6fc8 | [
"MIT"
] | null | null | null | #Functions
'''
#Using Functions
#------------------------#
print("----------------------")
def print_hello_world() :
print("Hello World")
print_hello_world()
print("----------------------")
#------------------------#
'''
'''
#Using paramaters
#------------------------#
print("----------------------")
def print_m... | 19.782609 | 34 | 0.364835 |
2588916866fec7e487bd0ee80d573aa7a2e19577 | 11,525 | py | Python | rcsb/utils/chem/OeSubStructSearchUtils.py | rcsb/py-rcsb_utils_chem | 960b18f5ac245b75d2fc996b0516108438e862ea | [
"Apache-2.0"
] | null | null | null | rcsb/utils/chem/OeSubStructSearchUtils.py | rcsb/py-rcsb_utils_chem | 960b18f5ac245b75d2fc996b0516108438e862ea | [
"Apache-2.0"
] | null | null | null | rcsb/utils/chem/OeSubStructSearchUtils.py | rcsb/py-rcsb_utils_chem | 960b18f5ac245b75d2fc996b0516108438e862ea | [
"Apache-2.0"
] | 3 | 2020-12-03T17:39:13.000Z | 2020-12-03T17:39:30.000Z | ##
# File: OeSubStructSearchUtils.py
# Author: jdw
# Date: 2-Oct-2020
# Version: 0.001
#
# Updates:
#
##
"""
Utilities to manage OE specific substructure search operations (w/ formula/feature prefiltering)
"""
__docformat__ = "restructuredtext en"
__author__ = "John Westbrook"
__email__ = "john.westbrook@rcsb.o... | 45.196078 | 173 | 0.633406 |
e9bde430349b3f6884ca1a01862b254fd8c8529a | 20,737 | py | Python | autotest/gcore/vrtmisc.py | dbaston/gdal | 908fd2d40155659c6c1f87b23d3fd42b19796a45 | [
"MIT"
] | 3,100 | 2015-01-02T10:33:40.000Z | 2022-03-31T02:06:51.000Z | autotest/gcore/vrtmisc.py | git996/gdal | e1da7a220fd08f478df832423880ff5f8824eb82 | [
"Apache-2.0"
] | 3,496 | 2015-01-06T16:53:30.000Z | 2022-03-31T20:18:51.000Z | autotest/gcore/vrtmisc.py | git996/gdal | e1da7a220fd08f478df832423880ff5f8824eb82 | [
"Apache-2.0"
] | 2,036 | 2015-01-08T20:22:12.000Z | 2022-03-31T10:24:08.000Z | #!/usr/bin/env pytest
# -*- coding: utf-8 -*-
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Misc tests of VRT driver
# Author: Even Rouault <even dot rouault at spatialys.com>
#
#####################################################... | 35.630584 | 138 | 0.602836 |
f18aae0de37fbe766a3df1d44da66b30b27a3665 | 4,248 | py | Python | ucscentralsdk/mometa/memory/MemoryUnitEnvStatsHist.py | ragupta-git/ucscentralsdk | 2678008b5fb6b0fafafec388d0874147e95a1086 | [
"Apache-2.0"
] | null | null | null | ucscentralsdk/mometa/memory/MemoryUnitEnvStatsHist.py | ragupta-git/ucscentralsdk | 2678008b5fb6b0fafafec388d0874147e95a1086 | [
"Apache-2.0"
] | null | null | null | ucscentralsdk/mometa/memory/MemoryUnitEnvStatsHist.py | ragupta-git/ucscentralsdk | 2678008b5fb6b0fafafec388d0874147e95a1086 | [
"Apache-2.0"
] | null | null | null | """This module contains the general information for MemoryUnitEnvStatsHist ManagedObject."""
from ...ucscentralmo import ManagedObject
from ...ucscentralcoremeta import UcsCentralVersion, MoPropertyMeta, MoMeta
from ...ucscentralmeta import VersionMeta
class MemoryUnitEnvStatsHistConsts():
MOST_RECENT_FALSE = "f... | 56.64 | 259 | 0.655132 |
85db8f65c070dbde13686c451c96e7a6df40030c | 14,016 | py | Python | model_ours/retest_MMGCRN.py | deepkashiwa20/TrafficAccident | c5fb26106137a4e85e5b5aa1e8ffdbb672a61988 | [
"MIT"
] | null | null | null | model_ours/retest_MMGCRN.py | deepkashiwa20/TrafficAccident | c5fb26106137a4e85e5b5aa1e8ffdbb672a61988 | [
"MIT"
] | null | null | null | model_ours/retest_MMGCRN.py | deepkashiwa20/TrafficAccident | c5fb26106137a4e85e5b5aa1e8ffdbb672a61988 | [
"MIT"
] | null | null | null | import sys
import os
import shutil
import math
import numpy as np
import pandas as pd
import scipy.sparse as ss
from sklearn.preprocessing import StandardScaler, MinMaxScaler
from datetime import datetime
import time
import torch
import torch.nn as nn
import torch.nn.init as init
import torch.nn.functional as F
from to... | 48.666667 | 150 | 0.653539 |
43fd48c56fc4ccf1c9db65fa688d72e86d2080c2 | 343 | py | Python | lib/JumpScale/core/baseclasses/__init__.py | Jumpscale/jumpscale6_core | 0502ddc1abab3c37ed982c142d21ea3955d471d3 | [
"BSD-2-Clause"
] | 1 | 2015-10-26T10:38:13.000Z | 2015-10-26T10:38:13.000Z | lib/JumpScale/core/baseclasses/__init__.py | Jumpscale/jumpscale6_core | 0502ddc1abab3c37ed982c142d21ea3955d471d3 | [
"BSD-2-Clause"
] | null | null | null | lib/JumpScale/core/baseclasses/__init__.py | Jumpscale/jumpscale6_core | 0502ddc1abab3c37ed982c142d21ea3955d471d3 | [
"BSD-2-Clause"
] | null | null | null |
__all__ = ['BaseEnumeration', 'EnumerationWithValue', 'BaseType', ]
from JumpScale.core.baseclasses.BaseEnumeration import BaseEnumeration, EnumerationWithValue
from JumpScale.core.baseclasses.BaseType import BaseType
from JumpScale import j
# j.basetype=BaseType()
#from ManagementApplication import ManagementApp... | 28.583333 | 92 | 0.833819 |
b6b15de3abf6055160f94906fb701897088cd831 | 1,019 | py | Python | helm/dagster/schema/setup.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | helm/dagster/schema/setup.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | helm/dagster/schema/setup.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | 1 | 2019-09-11T03:02:27.000Z | 2019-09-11T03:02:27.000Z | from setuptools import find_packages, setup
setup(
name="dagster-helm",
version="0.0.1",
author="Elementl",
author_email="hello@elementl.com",
license="Apache-2.0",
description="Tools for Dagster Helm schema",
url="https://github.com/dagster-io/dagster/tree/master/helm/dagster/schema",
... | 30.878788 | 80 | 0.598626 |
81fcc089d1b31e67581dbb711eaad3b634b97a2a | 148 | py | Python | request/__init__.py | renxinqiang/SpiderComment | 30df130e77a2dfca5d8fc219082386603f1f11ec | [
"MIT"
] | 1 | 2021-07-28T13:37:55.000Z | 2021-07-28T13:37:55.000Z | request/__init__.py | renxinqiang/SpiderComment | 30df130e77a2dfca5d8fc219082386603f1f11ec | [
"MIT"
] | null | null | null | request/__init__.py | renxinqiang/SpiderComment | 30df130e77a2dfca5d8fc219082386603f1f11ec | [
"MIT"
] | 1 | 2018-07-03T08:04:57.000Z | 2018-07-03T08:04:57.000Z | #!/usr/local/bin/python3
import requests
class Request:
request = None
def __init__(self):
self.request = requests
pass | 12.333333 | 31 | 0.628378 |
87255883a6cee226929e9757082e929363b1be43 | 3,810 | py | Python | tests/comparison_operators.py | MosesSymeonidis/aggregation_builder | a1f4b580401d400c53206e9c020e413166254274 | [
"MIT"
] | 9 | 2017-12-08T17:31:23.000Z | 2021-05-07T01:07:12.000Z | tests/comparison_operators.py | MosesSymeonidis/aggregation_builder | a1f4b580401d400c53206e9c020e413166254274 | [
"MIT"
] | null | null | null | tests/comparison_operators.py | MosesSymeonidis/aggregation_builder | a1f4b580401d400c53206e9c020e413166254274 | [
"MIT"
] | null | null | null | from aggregation_builder import AggregationQueryBuilder
from aggregation_builder.operators import *
import unittest
import datetime
class ArithmeticOperatorsTests(unittest.TestCase):
def test_cmp(self):
query = [
{
'$project':
{
'item... | 27.608696 | 61 | 0.377428 |
ecbb4674fd044b93542ee1529e6242b74cf3ea7c | 469 | py | Python | simple/simple.py | rzzzwilson/pyqt5 | b0d06f01727e6b3c99b68f1276573baf36daadb6 | [
"MIT"
] | 1 | 2017-10-29T13:00:52.000Z | 2017-10-29T13:00:52.000Z | simple/simple.py | rzzzwilson/pyqt5 | b0d06f01727e6b3c99b68f1276573baf36daadb6 | [
"MIT"
] | null | null | null | simple/simple.py | rzzzwilson/pyqt5 | b0d06f01727e6b3c99b68f1276573baf36daadb6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ZetCode PyQt5 tutorial
In this example, we create a simple
window in PyQt5.
author: Jan Bodnar
website: zetcode.com
last edited: January 2015
"""
import sys
from PyQt5.QtWidgets import QApplication, QWidget
if __name__ == '__main__':
app = QApplication... | 15.633333 | 49 | 0.65032 |
9c1e5474455154930b642aee4bdfbef78498e49f | 900 | py | Python | py2/testdir_single_jvm/test_with_a_browser.py | ahmedengu/h2o-3 | ac2c0a6fbe7f8e18078278bf8a7d3483d41aca11 | [
"Apache-2.0"
] | 2 | 2020-09-23T14:23:55.000Z | 2020-09-23T19:26:30.000Z | py2/testdir_single_jvm/test_with_a_browser.py | ahmedengu/h2o-3 | ac2c0a6fbe7f8e18078278bf8a7d3483d41aca11 | [
"Apache-2.0"
] | 2 | 2021-06-02T02:24:03.000Z | 2021-11-15T17:51:49.000Z | py2/testdir_single_jvm/test_with_a_browser.py | ahmedengu/h2o-3 | ac2c0a6fbe7f8e18078278bf8a7d3483d41aca11 | [
"Apache-2.0"
] | 1 | 2020-04-17T13:06:26.000Z | 2020-04-17T13:06:26.000Z | import unittest, time, sys, os
sys.path.extend(['.','..','../..','py'])
import h2o2 as h2o
import h2o_cmd, h2o_browse as h2b, h2o_args
class Basic(unittest.TestCase):
def tearDown(self):
h2o.check_sandbox_for_errors()
@classmethod
def setUpClass(cls):
# Uses your username specific json: p... | 26.470588 | 85 | 0.626667 |
c0c84a65d0516a0d794b7591d2727af22e072d97 | 2,776 | py | Python | BUILD/doc/source/examples/get_all_sensors_code.py | netsec/pytan | 29a3484d21cb90d8896275febd1c535e4f3cdc7e | [
"MIT"
] | 1 | 2019-01-29T21:22:06.000Z | 2019-01-29T21:22:06.000Z | BUILD/doc/source/examples/get_all_sensors_code.py | c1rdan/pytan | 5e537a6dcf4136e3b9c3905a39f073396e7f044f | [
"MIT"
] | null | null | null | BUILD/doc/source/examples/get_all_sensors_code.py | c1rdan/pytan | 5e537a6dcf4136e3b9c3905a39f073396e7f044f | [
"MIT"
] | null | null | null | # import the basic python packages we need
import os
import sys
import tempfile
import pprint
import traceback
# disable python from generating a .pyc file
sys.dont_write_bytecode = True
# change me to the path of pytan if this script is not running from EXAMPLES/PYTAN_API
pytan_loc = "~/gh/pytan"
pytan_static_path =... | 32.27907 | 90 | 0.747839 |
0f95d8492d5d1a07dd96074d7413a038d77f1e51 | 12,157 | py | Python | tensor2tensor/rl/collect.py | qimingj/tensor2tensor | a6df48799dc93176df94c36d3a1aea75caa7c594 | [
"Apache-2.0"
] | 1 | 2021-04-26T08:37:10.000Z | 2021-04-26T08:37:10.000Z | tensor2tensor/rl/collect.py | qimingj/tensor2tensor | a6df48799dc93176df94c36d3a1aea75caa7c594 | [
"Apache-2.0"
] | null | null | null | tensor2tensor/rl/collect.py | qimingj/tensor2tensor | a6df48799dc93176df94c36d3a1aea75caa7c594 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2018 The Tensor2Tensor 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... | 40.388704 | 80 | 0.670971 |
1ee90ced5fdc247bfd35722df2f08d7f4188c236 | 230 | py | Python | part1_07.py | Dauvit/AHDA-sample-text | a07154e16b828f94db4c182c63df5efd45a4138f | [
"MIT"
] | 1 | 2019-07-11T11:37:26.000Z | 2019-07-11T11:37:26.000Z | part1_07.py | Dauvit/AHDA-sample-text | a07154e16b828f94db4c182c63df5efd45a4138f | [
"MIT"
] | null | null | null | part1_07.py | Dauvit/AHDA-sample-text | a07154e16b828f94db4c182c63df5efd45a4138f | [
"MIT"
] | 1 | 2021-11-11T03:59:32.000Z | 2021-11-11T03:59:32.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Python for AHDA.
Part 1, Example 7.
"""
# More with lists
words = ['Mary', 'had', 'a', 'little', 'lamb']
number_of_words = len(words)
print(number_of_words)
print(len(words))
| 14.375 | 46 | 0.626087 |
3f56e09ce40808ac0cc78b2305de5d88926754e7 | 3,649 | py | Python | tests/schema.py | prakashngit/CCF | 3ae6e3d4074f424a85ee062aa1ed584e7e17f72f | [
"Apache-2.0"
] | null | null | null | tests/schema.py | prakashngit/CCF | 3ae6e3d4074f424a85ee062aa1ed584e7e17f72f | [
"Apache-2.0"
] | null | null | null | tests/schema.py | prakashngit/CCF | 3ae6e3d4074f424a85ee062aa1ed584e7e17f72f | [
"Apache-2.0"
] | null | null | null | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the Apache 2.0 License.
import os
import sys
import getpass
import json
import time
import logging
import multiprocessing
import shutil
import random
import infra.ccf
import infra.proc
import infra.e2e_args
from loguru import logger as LOG
... | 32.292035 | 85 | 0.550562 |
c86eab5660a23046f99e6a2113b1f29a8673c74d | 4,590 | py | Python | manim/utils/bezier.py | mz71/manim | 3f6b9bf4eccca92999ac54cb74de31e196b33358 | [
"MIT"
] | 3 | 2020-10-19T18:16:22.000Z | 2021-05-09T14:49:58.000Z | manim/utils/bezier.py | Zoravar-python/News-API | 08678f7b3edc376932493f53e416d310666ed3b7 | [
"MIT"
] | null | null | null | manim/utils/bezier.py | Zoravar-python/News-API | 08678f7b3edc376932493f53e416d310666ed3b7 | [
"MIT"
] | 3 | 2020-09-15T06:02:13.000Z | 2021-11-22T20:50:59.000Z | from scipy import linalg
import numpy as np
from ..utils.simple_functions import choose
CLOSED_THRESHOLD = 0.001
def bezier(points):
n = len(points) - 1
return lambda t: sum(
[
((1 - t) ** (n - k)) * (t ** k) * choose(n, k) * point
for k, point in enumerate(points)
]
... | 29.050633 | 84 | 0.605882 |
46616cb32273643b498783c3b95c143a9abef483 | 7,707 | py | Python | test/test_context.py | GrafeasGroup/tor_worker | b17981f45323c182c2526749250018450d034ef7 | [
"MIT"
] | 1 | 2018-03-22T17:10:00.000Z | 2018-03-22T17:10:00.000Z | test/test_context.py | GrafeasGroup/tor_worker | b17981f45323c182c2526749250018450d034ef7 | [
"MIT"
] | null | null | null | test/test_context.py | GrafeasGroup/tor_worker | b17981f45323c182c2526749250018450d034ef7 | [
"MIT"
] | null | null | null | import pytest
from .generators import (
generate_comment,
generate_submission,
)
from tor_worker.context import (
is_code_of_conduct,
is_claimed_post_response,
is_claimable_post,
has_youtube_captions,
)
import os
import unittest
class IsCodeOfConductTest(unittest.TestCase):
def setUp(s... | 45.875 | 80 | 0.668743 |
a5d089c7dd0800f041cd2b09329dc984e385cbad | 1,796 | py | Python | wrapper.py | yoavweiss/Responsive-Image-Container | 2568e1dec00f6178dfcd526babb5ba38f85c23a2 | [
"MIT"
] | 3 | 2016-09-28T02:33:44.000Z | 2020-02-05T10:10:33.000Z | wrapper.py | yoavweiss/Responsive-Image-Container | 2568e1dec00f6178dfcd526babb5ba38f85c23a2 | [
"MIT"
] | null | null | null | wrapper.py | yoavweiss/Responsive-Image-Container | 2568e1dec00f6178dfcd526babb5ba38f85c23a2 | [
"MIT"
] | null | null | null | from StringIO import StringIO
from PIL import Image
import iso_media
params_num = { "LBAS": 0,
"LAEN": 3 }
def wrapLayers(layers, quality = 95, diffquality = 90):
def wrapLayer(layer, boxtype, quality, parameters):
def writeImageBuffer():
buf = ""
for param in param... | 29.442623 | 72 | 0.546771 |
7001e21d93a665d883f87882f9892b58fce90a76 | 4,807 | py | Python | integration/python/integration_api/models/email_open.py | ShekharPaatni/SDK | 6534ffdb63af87c02c431df9add05a90370183cb | [
"Apache-2.0"
] | 11 | 2019-04-16T02:11:17.000Z | 2021-12-16T22:51:40.000Z | integration/python/integration_api/models/email_open.py | ShekharPaatni/SDK | 6534ffdb63af87c02c431df9add05a90370183cb | [
"Apache-2.0"
] | 81 | 2019-11-19T23:24:28.000Z | 2022-03-28T11:35:47.000Z | integration/python/integration_api/models/email_open.py | ShekharPaatni/SDK | 6534ffdb63af87c02c431df9add05a90370183cb | [
"Apache-2.0"
] | 11 | 2020-07-08T02:29:56.000Z | 2022-03-28T10:05:33.000Z | # coding: utf-8
"""
Hydrogen Integration API
The Hydrogen Integration API # noqa: E501
OpenAPI spec version: 1.3.1
Contact: info@hydrogenplatform.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from integration_api.con... | 26.854749 | 100 | 0.566466 |
3cd903e1ef413c469d7fb9f93c40e5ddb35bc053 | 14,019 | py | Python | src/sqlfluff/config.py | jonklippenstein-io/sqlfluff | c23f145ce06262dfc00a1842147d052f31ae2679 | [
"MIT"
] | null | null | null | src/sqlfluff/config.py | jonklippenstein-io/sqlfluff | c23f145ce06262dfc00a1842147d052f31ae2679 | [
"MIT"
] | null | null | null | src/sqlfluff/config.py | jonklippenstein-io/sqlfluff | c23f145ce06262dfc00a1842147d052f31ae2679 | [
"MIT"
] | null | null | null | """Module for loading config."""
import os
import sys
import configparser
from .dialects import dialect_selector
from .templaters import templater_selector
global_loader = None
""":obj:`ConfigLoader`: A variable to hold the single module loader when loaded.
We define a global loader, so that between c... | 37.685484 | 120 | 0.556316 |
ba8a032d6668f700ddc6b1b0cabd6e2398539d61 | 551 | py | Python | app/database/createdb.py | dpilipovic/flansible-with-scheduler | c459b16015f0258ad9fdf009d0146ea263b0e167 | [
"MIT"
] | 1 | 2019-04-13T14:11:19.000Z | 2019-04-13T14:11:19.000Z | app/database/createdb.py | dpilipovic/flansible-with-scheduler | c459b16015f0258ad9fdf009d0146ea263b0e167 | [
"MIT"
] | null | null | null | app/database/createdb.py | dpilipovic/flansible-with-scheduler | c459b16015f0258ad9fdf009d0146ea263b0e167 | [
"MIT"
] | 1 | 2019-12-10T18:36:24.000Z | 2019-12-10T18:36:24.000Z | """ Create Database object here """
import os
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
from app import app
from app.conf.config import SQLALCHEMY_TRACK_MODIFICATIONS
# DB SETUP:
with app.app_context():
basedir = os.path.abspath(os.path.dirname(__file__))
app.config['S... | 32.411765 | 94 | 0.718693 |
baff2527e701dfc57df8ceb58cc205838b857c93 | 4,224 | py | Python | promus/hooks/post_receive.py | LaudateCorpus1/promus | 2d5b8ac54afe721298f6326f45fd3587bc00d173 | [
"BSD-3-Clause"
] | null | null | null | promus/hooks/post_receive.py | LaudateCorpus1/promus | 2d5b8ac54afe721298f6326f45fd3587bc00d173 | [
"BSD-3-Clause"
] | null | null | null | promus/hooks/post_receive.py | LaudateCorpus1/promus | 2d5b8ac54afe721298f6326f45fd3587bc00d173 | [
"BSD-3-Clause"
] | 1 | 2021-12-31T13:24:18.000Z | 2021-12-31T13:24:18.000Z | """post-receive hook
Email the users of this repository
<http://git-scm.com/book/en/Customizing-Git-Git-Hooks>:
The post-receive hook runs after the entire process is completed and
can be used to update other services or notify users. It takes the
same stdin data as the pre-receive hook. Examples include e-mailing a... | 32 | 81 | 0.634706 |
5bcaecc07484fb5dd105c6210bfa30aac276c461 | 921 | py | Python | src/DNN_one_layer.py | patelotech/genetic_deep_learning | 04d418a35a5adcb2f201dba657b6248263596eed | [
"MIT"
] | 5 | 2019-01-15T13:56:20.000Z | 2019-11-15T12:57:51.000Z | src/DNN_one_layer.py | IAARhub/genetic_deep_learning | bd45298d330c117f895d6873c8e36b8f40d0dc10 | [
"MIT"
] | null | null | null | src/DNN_one_layer.py | IAARhub/genetic_deep_learning | bd45298d330c117f895d6873c8e36b8f40d0dc10 | [
"MIT"
] | 1 | 2019-01-14T21:18:02.000Z | 2019-01-14T21:18:02.000Z | import numpy as np
from NN1 import NN1
from sklearn.utils import shuffle
from sklearn.model_selection import train_test_split
import os
size = 500
def read_dataset():
path = os.path.dirname(os.path.abspath(__file__))
dataset = np.loadtxt(
path +
"/../dataset/data-500.csv",
delimiter="... | 24.236842 | 67 | 0.62215 |
02e049e54aaad801b8090f29f92ddeb354869934 | 446 | py | Python | tutorial/tutorial/spiders/items.py | geniusjoe/igxe-scrapy-csgo | 6c8109332b01ab18a1e0a0cbc66413e1f79a5ae7 | [
"MIT"
] | 4 | 2019-03-12T05:54:37.000Z | 2020-03-13T13:43:08.000Z | tutorial/tutorial/spiders/items.py | geniusjoe/igxe-scrapy-csgo | 6c8109332b01ab18a1e0a0cbc66413e1f79a5ae7 | [
"MIT"
] | null | null | null | tutorial/tutorial/spiders/items.py | geniusjoe/igxe-scrapy-csgo | 6c8109332b01ab18a1e0a0cbc66413e1f79a5ae7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# https://doc.scrapy.org/en/latest/topics/items.html
import scrapy
class weapon_ig_message(scrapy.Item):
# define the fields for your item here like:
name = scrapy.Field()
# img = scrapy.Field()
# the l... | 23.473684 | 52 | 0.683857 |
9701ad559f3f84ea64608c240567632e5102a51f | 1,995 | py | Python | src/model.py | saattrupdan/scandi-models | 49635e3743e11aae7298245c5f1c5df4cd822be1 | [
"MIT"
] | null | null | null | src/model.py | saattrupdan/scandi-models | 49635e3743e11aae7298245c5f1c5df4cd822be1 | [
"MIT"
] | null | null | null | src/model.py | saattrupdan/scandi-models | 49635e3743e11aae7298245c5f1c5df4cd822be1 | [
"MIT"
] | null | null | null | '''Model loading'''
from typing import Tuple
from transformers import (AutoConfig,
AutoTokenizer,
AutoModelForTokenClassification,
AutoModelForSequenceClassification,
PreTrainedModel,
PreTr... | 37.641509 | 77 | 0.586466 |
04871951d9150524ae135b494d8376cafc3895b5 | 3,499 | py | Python | dependencies/src/4Suite-XML-1.0.2/Ft/Lib/DistExt/Build.py | aleasims/Peach | bb56841e943d719d5101fee0a503ed34308eda04 | [
"MIT"
] | null | null | null | dependencies/src/4Suite-XML-1.0.2/Ft/Lib/DistExt/Build.py | aleasims/Peach | bb56841e943d719d5101fee0a503ed34308eda04 | [
"MIT"
] | null | null | null | dependencies/src/4Suite-XML-1.0.2/Ft/Lib/DistExt/Build.py | aleasims/Peach | bb56841e943d719d5101fee0a503ed34308eda04 | [
"MIT"
] | 1 | 2020-07-26T03:57:45.000Z | 2020-07-26T03:57:45.000Z | import sys, os
from distutils import util, ccompiler
from distutils.command import build
import Util
class Build(build.build):
command_name = "build"
description = "build everything needed to install"
user_options = [
('build-base=', 'b', "base directory for build library"),
('build-lib... | 33.32381 | 77 | 0.577879 |
49aa2f5858f011baddfe7d7b3141584063a9db7f | 377 | py | Python | getJobAttributes.py | eschanet/QMonit | 83f3323fa465b3ae41f9a49f28332bdb5e748685 | [
"MIT"
] | 1 | 2020-12-05T16:59:13.000Z | 2020-12-05T16:59:13.000Z | getJobAttributes.py | eschanet/QMonit | 83f3323fa465b3ae41f9a49f28332bdb5e748685 | [
"MIT"
] | null | null | null | getJobAttributes.py | eschanet/QMonit | 83f3323fa465b3ae41f9a49f28332bdb5e748685 | [
"MIT"
] | null | null | null | #!/usr/bin/python
from __future__ import print_function
from pprint import pprint
import json, sys
import requests
import cPickle as pickle
from datetime import datetime
from pandaserver.taskbuffer import JobSpec
from pandaserver.userinterface import Client
# this is an example
job = Client.getJobStatus([4242299116... | 17.952381 | 44 | 0.795756 |
5215860c3738f356f98d9f5ed1b019501e0297b4 | 9,566 | py | Python | pool/store/mongodb_store.py | nghiank/pool-reference | 3bfa646eb2f25ee1548e89912d5283249ecf8229 | [
"Apache-2.0"
] | 1 | 2021-09-14T09:55:43.000Z | 2021-09-14T09:55:43.000Z | pool/store/mongodb_store.py | nghiank/pool-reference | 3bfa646eb2f25ee1548e89912d5283249ecf8229 | [
"Apache-2.0"
] | null | null | null | pool/store/mongodb_store.py | nghiank/pool-reference | 3bfa646eb2f25ee1548e89912d5283249ecf8229 | [
"Apache-2.0"
] | 2 | 2021-07-21T09:52:28.000Z | 2021-08-15T01:58:35.000Z | from pathlib import Path
from typing import Optional, Set, List, Tuple, Dict
from blspy import G1Element
from chia.pools.pool_wallet_info import PoolState
from chia.types.blockchain_format.sized_bytes import bytes32
from chia.types.coin_spend import CoinSpend
from chia.util.ints import uint64
from bson.binary import Bi... | 41.055794 | 131 | 0.629208 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.