hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
33482df41201c6d75c49959e9392fbaca5dc1b19 | 26,068 | py | Python | blousebrothers/cards/views.py | sladinji/blousebrothers | 461de3ba011c0aaed3f0014136c4497b6890d086 | [
"MIT"
] | 1 | 2022-01-27T11:58:10.000Z | 2022-01-27T11:58:10.000Z | blousebrothers/cards/views.py | sladinji/blousebrothers | 461de3ba011c0aaed3f0014136c4497b6890d086 | [
"MIT"
] | 5 | 2021-03-19T00:01:54.000Z | 2022-03-11T23:46:21.000Z | blousebrothers/cards/views.py | sladinji/blousebrothers | 461de3ba011c0aaed3f0014136c4497b6890d086 | [
"MIT"
] | null | null | null | import re
import logging
import random
from decimal import Decimal
from decimal import ROUND_DOWN
from datetime import timedelta, datetime, MINYEAR
from django.utils import timezone
from django.core.urlresolvers import reverse_lazy
import pytz
from django.db.models import Sum
from django.contrib import messages
from d... | 37.400287 | 114 | 0.630888 |
33484a850275930b70c3a824129e704964c51f5d | 79 | py | Python | src/prpy/tsr/tsrlibrary.py | MisoRobotics/prpy | afbc8e9c3a8e4f4dc31261782962e12eb4b0ca10 | [
"BSD-3-Clause"
] | 53 | 2015-02-07T04:58:23.000Z | 2022-03-07T15:49:07.000Z | src/prpy/tsr/tsrlibrary.py | MisoRobotics/prpy | afbc8e9c3a8e4f4dc31261782962e12eb4b0ca10 | [
"BSD-3-Clause"
] | 283 | 2015-01-01T17:16:37.000Z | 2018-05-09T23:51:48.000Z | src/prpy/tsr/tsrlibrary.py | MisoRobotics/prpy | afbc8e9c3a8e4f4dc31261782962e12eb4b0ca10 | [
"BSD-3-Clause"
] | 28 | 2015-02-20T01:37:38.000Z | 2021-03-12T07:05:23.000Z | # Stub file
from __future__ import absolute_import
from tsr.tsrlibrary import * | 26.333333 | 38 | 0.835443 |
33485683a036c20bfb6eb0d40dcd6104c5879789 | 6,733 | py | Python | api/ical_api.py | iivoraitahila/tilavarauspalvelu-core | ed809dd74dffc1e21141564a005fcdf138a49448 | [
"MIT"
] | null | null | null | api/ical_api.py | iivoraitahila/tilavarauspalvelu-core | ed809dd74dffc1e21141564a005fcdf138a49448 | [
"MIT"
] | null | null | null | api/ical_api.py | iivoraitahila/tilavarauspalvelu-core | ed809dd74dffc1e21141564a005fcdf138a49448 | [
"MIT"
] | null | null | null | import datetime
import hashlib
import hmac
import io
from typing import Union
from urllib.parse import urlsplit
from uuid import UUID
from django.conf import settings
from django.http import FileResponse, Http404
from drf_spectacular.types import OpenApiTypes
from drf_spectacular.utils import OpenApiParameter, extend_... | 32.061905 | 112 | 0.689737 |
33487afc617008dc69e26878ee32cf016c0236a2 | 26,054 | py | Python | theano/sandbox/linalg/ops.py | mesnilgr/Theano | 332cd5d49b8c8cf20e715151d5bd824d9ecd711f | [
"BSD-3-Clause"
] | 1 | 2016-01-06T01:32:30.000Z | 2016-01-06T01:32:30.000Z | theano/sandbox/linalg/ops.py | mesnilgr/Theano | 332cd5d49b8c8cf20e715151d5bd824d9ecd711f | [
"BSD-3-Clause"
] | null | null | null | theano/sandbox/linalg/ops.py | mesnilgr/Theano | 332cd5d49b8c8cf20e715151d5bd824d9ecd711f | [
"BSD-3-Clause"
] | null | null | null | import logging
logger = logging.getLogger(__name__)
import numpy
from theano.gof import Op, Apply
from theano.tensor import as_tensor_variable, dot, DimShuffle
from theano import tensor
import theano.tensor
from theano.tensor.opt import (register_stabilize,
register_specialize, register_canonicalize)
from th... | 30.016129 | 80 | 0.578529 |
33488c07a7d60ea5e7211159e16fd93b2c974ecf | 8,191 | py | Python | leetcode_python/Hash_table/longest-substring-without-repeating-characters.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Hash_table/longest-substring-without-repeating-characters.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Hash_table/longest-substring-without-repeating-characters.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | """
3. Longest Substring Without Repeating Characters
Medium
Given a string s, find the length of the longest substring without repeating characters.
Example 1:
Input: s = "abcabcbb"
Output: 3
Explanation: The answer is "abc", with the length of 3.
Example 2:
Input: s = "bbbbb"
Output: 1
Explanation: The answer... | 28.05137 | 109 | 0.487975 |
334896e9c1104e80eda592afb9278bf3f15a5225 | 762 | py | Python | misc/python_script/main.py | coveo-labs/pipeline-extension-manager | d1262d03c9d1f9cea92dfb8f230169143b935c89 | [
"MIT"
] | 4 | 2018-03-16T14:20:06.000Z | 2021-12-09T20:16:51.000Z | misc/python_script/main.py | coveo-labs/pipeline-extension-manager | d1262d03c9d1f9cea92dfb8f230169143b935c89 | [
"MIT"
] | 6 | 2017-06-22T21:24:34.000Z | 2018-11-28T01:32:28.000Z | misc/python_script/main.py | coveo-labs/pipeline-extension-manager | d1262d03c9d1f9cea92dfb8f230169143b935c89 | [
"MIT"
] | 6 | 2017-06-15T17:55:45.000Z | 2019-02-07T04:16:42.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Crawl a Github's user repositories to find folders with Indexing Pipeline Extensions
and push them in a Coveo Org (Push source) to be imported by the Chrome extension """
import datetime
import sys
import GithubCrawler
import BatchPush
def main():
""" Crawl... | 24.580645 | 89 | 0.688976 |
3348a177aa05d8700f563c3c41f10723dd01b89f | 12,562 | py | Python | py/axonchisel/metrics/foundation/ax/plugin.py | axonchisel/ax_metrics | a2db75c9ef9a9752997ccb112e8db68c1c8584a0 | [
"MIT"
] | 10 | 2016-08-26T18:57:28.000Z | 2021-09-19T19:21:16.000Z | py/axonchisel/metrics/foundation/ax/plugin.py | axonchisel/ax_metrics | a2db75c9ef9a9752997ccb112e8db68c1c8584a0 | [
"MIT"
] | 1 | 2015-01-08T19:54:54.000Z | 2015-01-09T01:24:17.000Z | py/axonchisel/metrics/foundation/ax/plugin.py | axonchisel/ax_metrics | a2db75c9ef9a9752997ccb112e8db68c1c8584a0 | [
"MIT"
] | 3 | 2015-01-08T23:32:58.000Z | 2016-09-23T02:38:26.000Z | """
Ax_Metrics - AxPlugin dynamic class support
------------------------------------------------------------------------------
Author: Dan Kamins <dos at axonchisel dot net>
Copyright (c) 2014 Dan Kamins, AxonChisel.net
"""
# ----------------------------------------------------------------------------
import colle... | 32.544041 | 78 | 0.592024 |
3348ab8c4594a85f47ffe78d4d588ff5d0609414 | 1,079 | py | Python | idiot/checks/ardagent.py | snare/idiot | 840a8e0de30724bca8298ae1318906d3f273f3d9 | [
"MIT"
] | 145 | 2016-03-16T10:37:06.000Z | 2021-08-02T16:51:01.000Z | idiot/checks/ardagent.py | snare/idiot | 840a8e0de30724bca8298ae1318906d3f273f3d9 | [
"MIT"
] | 5 | 2016-03-27T11:27:51.000Z | 2018-07-03T08:00:47.000Z | idiot/checks/ardagent.py | snare/idiot | 840a8e0de30724bca8298ae1318906d3f273f3d9 | [
"MIT"
] | 16 | 2016-03-17T06:08:38.000Z | 2020-12-18T18:21:08.000Z | """
Idiot check for Apple Remote Desktop management with ARDAgent
purpose: indicates if Sharing Preferences: Remote Management using Apple Remote Desktop management is permitted to this
machine
daemon:
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/MacOS/ARDAgent
requirement: ARD permits... | 34.806452 | 119 | 0.772011 |
3348b24403c803a0a7225f76fc24c8a4afeb54fb | 8,837 | py | Python | homework_3/graph.py | marcosicklinger/algorithmic_design | 5534904bce5707f62ce9d5bc72790bfb96f2540b | [
"MIT"
] | 1 | 2021-03-25T17:29:14.000Z | 2021-03-25T17:29:14.000Z | homework_3/graph.py | marcosicklinger/algorithmic_design | 5534904bce5707f62ce9d5bc72790bfb96f2540b | [
"MIT"
] | null | null | null | homework_3/graph.py | marcosicklinger/algorithmic_design | 5534904bce5707f62ce9d5bc72790bfb96f2540b | [
"MIT"
] | 1 | 2021-03-23T14:00:39.000Z | 2021-03-23T14:00:39.000Z | import copy
import numpy as np
########
# NODE #
########
class Node:
''' Class for representing WeightedGraph vertices
Members
-------
value: Object\n
\tthe object needed to be stored in the graph.
distance: Number\n
\tthe distance from a given source.
importance: Number\n
... | 34.791339 | 163 | 0.616046 |
3348b788da75b2ca0875fe96a1091fd402233e22 | 1,751 | py | Python | src_for_person3/m1_motion.py | landod/05b-IntroToEV3Robot | 7769bc37416c39f50a39bc487ed6ca213a819aa1 | [
"MIT"
] | null | null | null | src_for_person3/m1_motion.py | landod/05b-IntroToEV3Robot | 7769bc37416c39f50a39bc487ed6ca213a819aa1 | [
"MIT"
] | null | null | null | src_for_person3/m1_motion.py | landod/05b-IntroToEV3Robot | 7769bc37416c39f50a39bc487ed6ca213a819aa1 | [
"MIT"
] | null | null | null | """
An opportunity to explore how to make an EV3 Robot move.
Authors: Dave Fisher, David Mutchler, Vibha Alangar,
their colleagues, and PUT_YOUR_NAME_HERE.
""" # TODO: 1. PUT YOUR NAME IN THE ABOVE LINE.
# ------------------------------------------------------------------------------
# TODO: 2.
# Follow along with... | 33.037736 | 85 | 0.548258 |
3348befdad8c8956ad3aa53e31dadaf620bec898 | 6,721 | py | Python | tools/train_net.py | Singingkettle/SAF-FCOS | 5d00b83d659552940025923460d02bb2db7d29e8 | [
"BSD-2-Clause"
] | 10 | 2021-08-31T01:39:40.000Z | 2022-03-27T13:13:14.000Z | tools/train_net.py | Singingkettle/SAF-FCOS | 5d00b83d659552940025923460d02bb2db7d29e8 | [
"BSD-2-Clause"
] | 1 | 2021-10-10T05:36:35.000Z | 2021-12-11T05:56:26.000Z | tools/train_net.py | Singingkettle/SAF-FCOS | 5d00b83d659552940025923460d02bb2db7d29e8 | [
"BSD-2-Clause"
] | 3 | 2021-09-05T09:14:35.000Z | 2021-10-21T03:15:59.000Z | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
r"""
Basic training script for PyTorch
"""
import argparse
import json
import os
import torch
from fcos_core.config import cfg
from fcos_core.data import make_data_loader
from fcos_core.engine.inference import inference
from fcos_core.engine.tra... | 33.437811 | 115 | 0.665675 |
3348c03d7fc029dedbc78b0808918f33cda13951 | 704 | py | Python | quest/lib/io/__init__.py | Fluorescence-Tools/quest | e17e5682f7686d1acc1fd8a22bdae33963bc16d6 | [
"MIT"
] | null | null | null | quest/lib/io/__init__.py | Fluorescence-Tools/quest | e17e5682f7686d1acc1fd8a22bdae33963bc16d6 | [
"MIT"
] | 1 | 2019-08-14T08:01:26.000Z | 2019-08-15T22:59:05.000Z | quest/lib/io/__init__.py | Fluorescence-Tools/quest | e17e5682f7686d1acc1fd8a22bdae33963bc16d6 | [
"MIT"
] | null | null | null | def write_xyz(filename, points, verbose=False):
"""
Writes the points as xyz-format file. The xyz-format file can be opened and displayed for instance
in PyMol
:param filename: string
Filename the cartesian coordinates in points are written to as xyz-format file
:param points:
:param ver... | 32 | 102 | 0.56392 |
3348fed7a97980cb3718592824bc8f4346871f60 | 15,884 | py | Python | run_main.py | Bhaskers-Blu-Org1/superglue-mtl | 1eb3e581c0ef3b4c261e0256ec26116d2b657c40 | [
"Apache-2.0"
] | 15 | 2019-09-25T21:27:25.000Z | 2020-12-24T02:22:56.000Z | run_main.py | Bhaskers-Blu-Org1/superglue-mtl | 1eb3e581c0ef3b4c261e0256ec26116d2b657c40 | [
"Apache-2.0"
] | 2 | 2020-01-10T06:03:28.000Z | 2021-01-02T05:38:19.000Z | run_main.py | IBM/superglue-mtl | 1eb3e581c0ef3b4c261e0256ec26116d2b657c40 | [
"Apache-2.0"
] | 5 | 2019-09-11T14:53:51.000Z | 2021-04-12T00:55:25.000Z | import argparse
import glob
import logging
import os
import time
import random
import shutil
from typing import List, Optional
import numpy as np
import torch
from pytorch_transformers import (BertConfig, BertTokenizer, RobertaConfig, \
RobertaTokenizer)
from pytorch_transformers import AdamW, WarmupLinearSc... | 47.987915 | 120 | 0.620184 |
33490d8b31042e29b022888c32535490588d92ae | 653 | py | Python | apps/accounts/mfa_forms.py | TransparentHealth/bluebutton-web-server | 69b6e649b2e9caf7859a75ea3867bf74c83ca340 | [
"Apache-2.0"
] | 1 | 2020-01-26T16:02:27.000Z | 2020-01-26T16:02:27.000Z | apps/accounts/mfa_forms.py | TransparentHealth/bluebutton-web-server | 69b6e649b2e9caf7859a75ea3867bf74c83ca340 | [
"Apache-2.0"
] | null | null | null | apps/accounts/mfa_forms.py | TransparentHealth/bluebutton-web-server | 69b6e649b2e9caf7859a75ea3867bf74c83ca340 | [
"Apache-2.0"
] | 2 | 2018-09-29T18:53:08.000Z | 2020-01-26T16:02:31.000Z | from django import forms
from django.utils.translation import ugettext_lazy as _
class MFACodeForm(forms.Form):
code = forms.CharField(widget=forms.PasswordInput, max_length=30,
label=_('Code*'))
required_css_class = 'required'
class LoginForm(forms.Form):
username = forms.Ch... | 31.095238 | 74 | 0.661562 |
33491c56697147ea4901442ba87e02e2cc402ee8 | 3,050 | py | Python | tests/test_helpers/test_env_vars.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | tests/test_helpers/test_env_vars.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | tests/test_helpers/test_env_vars.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2022 Valory AG
# 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.
# ... | 37.195122 | 80 | 0.640984 |
33491d6028aae4d46f1948a6e8f1cafc19a21f54 | 1,310 | py | Python | var/spack/repos/builtin/packages/r-foreach/package.py | kehw/spack | 4f49b1a9301447a8cf880c99820cad65e5c2d7e3 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2020-09-10T22:50:08.000Z | 2021-01-12T22:18:54.000Z | var/spack/repos/builtin/packages/r-foreach/package.py | kehw/spack | 4f49b1a9301447a8cf880c99820cad65e5c2d7e3 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 11 | 2021-01-08T22:23:53.000Z | 2022-03-30T11:08:17.000Z | var/spack/repos/builtin/packages/r-foreach/package.py | kehw/spack | 4f49b1a9301447a8cf880c99820cad65e5c2d7e3 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RForeach(RPackage):
"""Support for the foreach looping construct. Foreach is an idiom that... | 46.785714 | 95 | 0.737405 |
334927ef4c43dac0855f4d7cafb1f4f4a4be32b0 | 9,386 | py | Python | plotly/graph_objs/graph_objs_tools.py | awesome-archive/plotly.py | 0af4ef6abd0fe9907268d266304de630f94cda60 | [
"MIT"
] | 48 | 2017-08-04T03:30:22.000Z | 2022-03-09T03:24:11.000Z | LDDMM_Python/lddmm_python/lib/plotly/graph_objs/graph_objs_tools.py | hushunbo/lddmm-ot | 5af26fe32ae440c598ed403ce2876e98d6e1c692 | [
"MIT"
] | null | null | null | LDDMM_Python/lddmm_python/lib/plotly/graph_objs/graph_objs_tools.py | hushunbo/lddmm-ot | 5af26fe32ae440c598ed403ce2876e98d6e1c692 | [
"MIT"
] | 15 | 2017-09-30T18:55:48.000Z | 2021-04-27T18:27:55.000Z | from __future__ import absolute_import
import textwrap
import six
from plotly import exceptions, graph_reference
# Define line and tab size for help text!
LINE_SIZE = 76
TAB_SIZE = 4
def get_help(object_name, path=(), parent_object_names=(), attribute=None):
"""
Returns a help string for a graph object.
... | 35.688213 | 80 | 0.594929 |
3349a6056e2e6c83bdcd9a2f18f9416ee7a8ac5c | 835 | py | Python | data/transcoder_evaluation_gfg/python/PROGRAM_OCTAL_DECIMAL_CONVERSION.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 241 | 2021-07-20T08:35:20.000Z | 2022-03-31T02:39:08.000Z | data/transcoder_evaluation_gfg/python/PROGRAM_OCTAL_DECIMAL_CONVERSION.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 49 | 2021-07-22T23:18:42.000Z | 2022-03-24T09:15:26.000Z | data/transcoder_evaluation_gfg/python/PROGRAM_OCTAL_DECIMAL_CONVERSION.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 71 | 2021-07-21T05:17:52.000Z | 2022-03-29T23:49:28.000Z | # Copyright (c) 2019-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
def f_gold ( n ) :
num = n ;
dec_value = 0 ;
base = 1 ;
temp = num ;
while ( temp ) :
last_digit = t... | 21.410256 | 64 | 0.526946 |
3349cdff35f8cb453153b0c13bb33ab70db05273 | 662 | py | Python | autom.py | micheleFraccaroli/autokeras | 4c0e36dc0a5418355952dd74f74b2b6e7e87ebf1 | [
"Apache-2.0"
] | null | null | null | autom.py | micheleFraccaroli/autokeras | 4c0e36dc0a5418355952dd74f74b2b6e7e87ebf1 | [
"Apache-2.0"
] | null | null | null | autom.py | micheleFraccaroli/autokeras | 4c0e36dc0a5418355952dd74f74b2b6e7e87ebf1 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import tensorflow as tf
from tensorflow.keras.datasets import cifar10
import autokeras as ak
from keras_tuner.engine.hyperparameters import Choice
from trains import Task
(x_train, y_train), (x_test, y_test) = cifar10.load_data()
max_flops = 77479996
input_node = ak.ImageInput()
output_node = ak.No... | 33.1 | 134 | 0.787009 |
3349d5b4bb12da2af1c9140d36db4d678d16a734 | 12,290 | py | Python | guided_diffusion/inception.py | ZGCTroy/guided-diffusion | af987bb2b65db2875148a5466df79736ea5ae6a1 | [
"MIT"
] | null | null | null | guided_diffusion/inception.py | ZGCTroy/guided-diffusion | af987bb2b65db2875148a5466df79736ea5ae6a1 | [
"MIT"
] | null | null | null | guided_diffusion/inception.py | ZGCTroy/guided-diffusion | af987bb2b65db2875148a5466df79736ea5ae6a1 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
import torchvision
try:
from torchvision.models.utils import load_state_dict_from_url
except ImportError:
from torch.utils.model_zoo import load_url as load_state_dict_from_url
# Inception weights ported to Pytorch from
# http://download.tenso... | 37.242424 | 126 | 0.638649 |
3349dc2736a2866cac72f452c16d75107a6765b3 | 2,058 | py | Python | models/games_model.py | Pallrp/discord-bot | dd2d85dbec2ce61d02a94679a1d1450c1463a041 | [
"MIT"
] | null | null | null | models/games_model.py | Pallrp/discord-bot | dd2d85dbec2ce61d02a94679a1d1450c1463a041 | [
"MIT"
] | 6 | 2020-11-26T23:17:09.000Z | 2021-03-22T16:08:09.000Z | models/games_model.py | Pallrp/discord-bot | dd2d85dbec2ce61d02a94679a1d1450c1463a041 | [
"MIT"
] | null | null | null | import sqlite3
from models.logs_model import Logs
class Games:
def __init__(self, filename="storage/games.db"):
self.filename = filename
self._create_default_table()
self.logs = Logs()
def _connect(self):
"""
Returns the connection and cursor to the database file
... | 27.810811 | 73 | 0.539845 |
3349ddf89db83122f10b188469adfd70a07211bb | 270 | py | Python | components/py_engine/tests/haas/HaaSEdu/python-apps/driver/i2c/main.py | ekmixon/AliOS-Things | 00334295af8aa474d818724149726ca93da4645d | [
"Apache-2.0"
] | 4,538 | 2017-10-20T05:19:03.000Z | 2022-03-30T02:29:30.000Z | components/py_engine/tests/haas/HaaSEdu/python-apps/driver/i2c/main.py | ekmixon/AliOS-Things | 00334295af8aa474d818724149726ca93da4645d | [
"Apache-2.0"
] | 1,088 | 2017-10-21T07:57:22.000Z | 2022-03-31T08:15:49.000Z | components/py_engine/tests/haas/HaaSEdu/python-apps/driver/i2c/main.py | willianchanlovegithub/AliOS-Things | 637c0802cab667b872d3b97a121e18c66f256eab | [
"Apache-2.0"
] | 1,860 | 2017-10-20T05:22:35.000Z | 2022-03-27T10:54:14.000Z |
from driver import I2C
print("-------------------i2c test--------------------")
i2c = I2C()
i2c.open("mpu6050")
regval = bytearray(1)
regval[0] = 0x5
print(regval)
ret = i2c.write(regval)
print(ret)
i2c.close()
print("-------------------i2c test--------------------")
| 19.285714 | 56 | 0.492593 |
3349eb57d481fad20099108aba7fb3e97281d69a | 23,229 | py | Python | packages/main/src/RPA/JavaAccessBridge.py | pavelee/rpaframework | 30bf09eb7a3bb3b22f596690791013e0ff2f7b73 | [
"Apache-2.0"
] | null | null | null | packages/main/src/RPA/JavaAccessBridge.py | pavelee/rpaframework | 30bf09eb7a3bb3b22f596690791013e0ff2f7b73 | [
"Apache-2.0"
] | null | null | null | packages/main/src/RPA/JavaAccessBridge.py | pavelee/rpaframework | 30bf09eb7a3bb3b22f596690791013e0ff2f7b73 | [
"Apache-2.0"
] | null | null | null | import atexit
import logging
import os
import platform
import queue
import threading
import time
from typing import Union
import warnings
from robot.api.deco import library, keyword
from robot.libraries.BuiltIn import BuiltIn
from RPA.Desktop import Desktop
if platform.system() == "Windows":
import ctypes
fr... | 35.847222 | 181 | 0.616901 |
3349ee8824882928cd4eaefacf660a75aca68e27 | 4,374 | py | Python | demo/python/cheetah_demo_realtime.py | feliciatrinh/cheetah | f32faced006b07e8fe24d399d52fc70d8ccf91d5 | [
"Condor-1.1"
] | null | null | null | demo/python/cheetah_demo_realtime.py | feliciatrinh/cheetah | f32faced006b07e8fe24d399d52fc70d8ccf91d5 | [
"Condor-1.1"
] | null | null | null | demo/python/cheetah_demo_realtime.py | feliciatrinh/cheetah | f32faced006b07e8fe24d399d52fc70d8ccf91d5 | [
"Condor-1.1"
] | null | null | null | import argparse
import os
import struct
import sys
from threading import Thread
import numpy as np
import pyaudio
import soundfile
sys.path.append(os.path.join(os.path.dirname(__file__), '../../binding/python'))
from cheetah import Cheetah
class CheetahRealtimeDemo(Thread):
def __init__(
self,
... | 31.242857 | 116 | 0.614083 |
3349f8ca8404fcd10da28c24c59fd78a77c98b8e | 29,178 | py | Python | sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_private_endpoint_connections_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_private_endpoint_connections_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_private_endpoint_connections_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 ... | 46.240887 | 239 | 0.681952 |
334a01fe5382248f4cbd8631ad8c83f43ccfbf63 | 770 | py | Python | extensions/iocompython/examples/ispy/iconbutton.py | iocafe/iocom | 9762b78fa1591994c74ed1fc6fe23b9ef44e0dff | [
"MIT"
] | 1 | 2020-04-28T23:25:50.000Z | 2020-04-28T23:25:50.000Z | extensions/iocompython/examples/ispy/iconbutton.py | iocafe/iocom | 9762b78fa1591994c74ed1fc6fe23b9ef44e0dff | [
"MIT"
] | 11 | 2020-01-30T16:27:24.000Z | 2020-08-09T06:25:06.000Z | extensions/iocompython/examples/ispy/iconbutton.py | iocafe/iocom | 9762b78fa1591994c74ed1fc6fe23b9ef44e0dff | [
"MIT"
] | null | null | null | from kivy.uix.button import Button
from kivy.uix.image import Image
class IconButton(Button):
def __init__(self, **kwargs):
super(IconButton, self).__init__(**kwargs)
self.background_color = [0,0,0,0]
self.size_hint_x = None
self.width = 60
def set_image(self, name, groupdict, ... | 33.478261 | 72 | 0.649351 |
334a28e12ffed816d74841890e3a78f21e19a58a | 2,123 | py | Python | lib/streamlit/elements/pyplot.py | dwiel/streamlit | 74ae7f30cc3d95948aff311371449963f8eaf29e | [
"Apache-2.0"
] | 1 | 2020-01-04T06:45:37.000Z | 2020-01-04T06:45:37.000Z | lib/streamlit/elements/pyplot.py | yutiansut/streamlit | 929942f755ca40f859a03d905ffcbf743f45dffa | [
"Apache-2.0"
] | 4 | 2021-05-09T11:42:18.000Z | 2022-02-27T10:59:36.000Z | lib/streamlit/elements/pyplot.py | yutiansut/streamlit | 929942f755ca40f859a03d905ffcbf743f45dffa | [
"Apache-2.0"
] | 1 | 2020-06-26T14:41:01.000Z | 2020-06-26T14:41:01.000Z | # -*- coding: utf-8 -*-
# Copyright 2018-2019 Streamlit Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | 32.166667 | 84 | 0.705605 |
334a2a1220dc4329c3042dc4c631200a1bd32f05 | 4,034 | py | Python | alipay/aop/api/request/AlipayDataDataserviceAdPromotepageQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/AlipayDataDataserviceAdPromotepageQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/AlipayDataDataserviceAdPromotepageQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayDataDataserviceAdPromotepageQueryModel import AlipayDataDataserviceAdPromotepageQueryModel
class AlipayDataDataserviceAdPromot... | 27.82069 | 148 | 0.649975 |
334a2a65d253f5dd2ea0d1c571994ea0c521d572 | 3,570 | py | Python | PyPruning/Papers.py | sbuschjaeger/PyPruning | bcd64e68ef7635f9eca5e0b40668a0ce05ab265f | [
"MIT"
] | 7 | 2021-05-05T11:19:02.000Z | 2022-01-31T10:52:07.000Z | PyPruning/Papers.py | sbuschjaeger/PyPruning | bcd64e68ef7635f9eca5e0b40668a0ce05ab265f | [
"MIT"
] | null | null | null | PyPruning/Papers.py | sbuschjaeger/PyPruning | bcd64e68ef7635f9eca5e0b40668a0ce05ab265f | [
"MIT"
] | 1 | 2021-05-13T11:09:24.000Z | 2021-05-13T11:09:24.000Z | from functools import partial
from sklearn.metrics import pairwise
from .MIQPPruningClassifier import MIQPPruningClassifier, combined, combined_error
from .GreedyPruningClassifier import GreedyPruningClassifier, reduced_error, complementariness, margin_distance, drep
from .RankPruningClassifier import RankPruningCla... | 63.75 | 406 | 0.761064 |
334a75f7b97fe99c1afb80498a8ca6527d074767 | 1,953 | py | Python | GaitSet/model/initialization_cross.py | JinkaiZheng/TraND | a8babc34073ee126789969bd97e149bae4015953 | [
"MIT"
] | 33 | 2021-05-13T08:37:10.000Z | 2022-03-15T11:51:35.000Z | GaitSet/model/initialization_cross.py | JinkaiZheng/TraND | a8babc34073ee126789969bd97e149bae4015953 | [
"MIT"
] | null | null | null | GaitSet/model/initialization_cross.py | JinkaiZheng/TraND | a8babc34073ee126789969bd97e149bae4015953 | [
"MIT"
] | 1 | 2021-07-24T07:30:30.000Z | 2021-07-24T07:30:30.000Z | # -*- coding: utf-8 -*-
# @Author : admin
# @Time : 2018/11/15
import os
from copy import deepcopy
import numpy as np
from .utils import load_data
from .model import Model
def initialize_data(config, train=False, test=False):
print("Initializing data...")
train_source, test_source = load_data(**config['... | 32.55 | 82 | 0.68766 |
334a8b25998252d0be36b070af86c0137e669ee4 | 123,086 | py | Python | protos/gen/python/protos/public/modeldb/DatasetVersionService_pb2.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | null | null | null | protos/gen/python/protos/public/modeldb/DatasetVersionService_pb2.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | null | null | null | protos/gen/python/protos/public/modeldb/DatasetVersionService_pb2.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: modeldb/DatasetVersionService.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol... | 47.340769 | 13,967 | 0.776327 |
334a9a6c88620c86d895267f917839e949967240 | 5,319 | py | Python | intersight/apis/feedback_feedback_post_api.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/apis/feedback_feedback_post_api.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/apis/feedback_feedback_post_api.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-255
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import sys
import os
import re
# python 2 and python 3 compatibility library
from s... | 36.431507 | 113 | 0.586952 |
334aa2e35c698e8c7683d6420b6f2205c06b1551 | 3,661 | py | Python | deeplab/test.py | Definiter/Deformable-ConvNets | 4a3795795d67b27d39d411bf46c0772208a2d7fa | [
"Apache-2.0"
] | 1 | 2017-08-28T13:13:48.000Z | 2017-08-28T13:13:48.000Z | deeplab/test.py | Definiter/Deformable-ConvNets | 4a3795795d67b27d39d411bf46c0772208a2d7fa | [
"Apache-2.0"
] | null | null | null | deeplab/test.py | Definiter/Deformable-ConvNets | 4a3795795d67b27d39d411bf46c0772208a2d7fa | [
"Apache-2.0"
] | 1 | 2021-11-05T20:44:54.000Z | 2021-11-05T20:44:54.000Z | # --------------------------------------------------------
# Deformable Convolutional Networks
# Copyright (c) 2016 by Contributors
# Copyright (c) 2017 Microsoft
# Licensed under The Apache-2.0 License [see LICENSE for details]
# Written by Zheng Zhang
# --------------------------------------------------------
import... | 35.543689 | 143 | 0.701994 |
334aac128b2bdb381bf597df3f61aba0312c7ddc | 2,276 | py | Python | cli/waiter/subcommands/init.py | mokshjawa/waiter | 129d0282e26a2d09dda38a79335c7d7120a1530a | [
"Apache-2.0"
] | null | null | null | cli/waiter/subcommands/init.py | mokshjawa/waiter | 129d0282e26a2d09dda38a79335c7d7120a1530a | [
"Apache-2.0"
] | null | null | null | cli/waiter/subcommands/init.py | mokshjawa/waiter | 129d0282e26a2d09dda38a79335c7d7120a1530a | [
"Apache-2.0"
] | null | null | null | import getpass
import logging
import os
from waiter import token_post
from waiter.data_format import determine_format
from waiter.util import deep_merge
parser = None
DEFAULTS = {
'name': 'your-app-name',
'metric-group': 'your-metric-group',
'cmd': 'your command',
'version': 'your version',
'cpu... | 34.484848 | 111 | 0.679262 |
334af2cda9264227f4c71f2b3e7e90318bf243c4 | 617 | py | Python | tools/amr-evaluation-tool-enhanced/onelabel.py | emorynlp/levi-graph-amr-parser | f71f1056c13181b8db31d6136451fb8d57114819 | [
"Apache-2.0"
] | 9 | 2021-07-12T22:05:47.000Z | 2022-02-22T03:10:14.000Z | tools/amr-evaluation-tool-enhanced/onelabel.py | emorynlp/levi-graph-amr-parser | f71f1056c13181b8db31d6136451fb8d57114819 | [
"Apache-2.0"
] | 4 | 2021-08-31T08:28:37.000Z | 2022-03-28T05:52:14.000Z | tools/amr-evaluation-tool-enhanced/onelabel.py | emorynlp/levi-graph-amr-parser | f71f1056c13181b8db31d6136451fb8d57114819 | [
"Apache-2.0"
] | null | null | null | import re
match_of = re.compile(":[0-9a-zA-Z]*-of")
match_no_of = re.compile(":[0-9a-zA-Z]*(?!-of)")
placeholder = '<`_placeholder_`>'
def readFile(filepath, keeplabel):
with open(filepath, 'r') as content_file:
content = content_file.read()
amr_t = content
assert placeholder not in amr_t, 'conf... | 25.708333 | 62 | 0.658023 |
334af5cbbe05b7fb9b61c2c0f19fe43181d6f03e | 32,176 | py | Python | psgeom/camera.py | chuckie82/psgeom | 4e59ef07a1749b2dff63dccaf00d11bb34c36b8b | [
"BSD-3-Clause-LBNL"
] | null | null | null | psgeom/camera.py | chuckie82/psgeom | 4e59ef07a1749b2dff63dccaf00d11bb34c36b8b | [
"BSD-3-Clause-LBNL"
] | null | null | null | psgeom/camera.py | chuckie82/psgeom | 4e59ef07a1749b2dff63dccaf00d11bb34c36b8b | [
"BSD-3-Clause-LBNL"
] | null | null | null | #!/usr/bin/env python
"""
Detector Geometries
===================
Briefly, geometries are organized heriarchically: there are `SensorElements`
that compose the leaves of a tree. These represent arbitrary objects that
actually measure e.g. photon intensities of scattered x-rays. An example of
such an element is an ASI... | 32.599797 | 104 | 0.513022 |
334b0b94cdd6f5375228e0cf3af3de18cd7867a8 | 15,862 | py | Python | great_expectations/core/usage_statistics/usage_statistics.py | UtahDave/great_expectations | 99a54370f7ebeea5d95bca726200db01c7326d68 | [
"Apache-2.0"
] | 1 | 2021-11-22T12:51:08.000Z | 2021-11-22T12:51:08.000Z | great_expectations/core/usage_statistics/usage_statistics.py | UtahDave/great_expectations | 99a54370f7ebeea5d95bca726200db01c7326d68 | [
"Apache-2.0"
] | null | null | null | great_expectations/core/usage_statistics/usage_statistics.py | UtahDave/great_expectations | 99a54370f7ebeea5d95bca726200db01c7326d68 | [
"Apache-2.0"
] | 1 | 2021-10-08T01:24:50.000Z | 2021-10-08T01:24:50.000Z | import atexit
import datetime
import json
import logging
import platform
import signal
import sys
import threading
from functools import wraps
from queue import Queue
from typing import Optional
import jsonschema
import requests
from great_expectations import __version__ as ge_version
from great_expectations.core.usa... | 37.234742 | 138 | 0.654898 |
334b368f1294a2254a7fb3d8afb3ca30cf298806 | 854 | py | Python | src/ice/utils.py | geraldhumphries/Ice | ec466e85407361bbbc87b9e484fe427c1769b4fe | [
"MIT"
] | null | null | null | src/ice/utils.py | geraldhumphries/Ice | ec466e85407361bbbc87b9e484fe427c1769b4fe | [
"MIT"
] | null | null | null | src/ice/utils.py | geraldhumphries/Ice | ec466e85407361bbbc87b9e484fe427c1769b4fe | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
"""
utils.py
Created by Scott on 2013-12-21.
Copyright (c) 2013 Scott Rice. All rights reserved.
Functionality should be added here if it is just general python utility
functions, not related to Ice at all. You should be able to move this file to
another python project and be a... | 21.35 | 77 | 0.733021 |
334b5c96c0c80b3fbce0e0dc2a93bc9f82a0ef74 | 15,290 | py | Python | backend/api/admin/user.py | deti/boss | bc0cfe3067bf1cbf26789f7443a36e7cdd2ac869 | [
"Apache-2.0"
] | 7 | 2018-05-20T08:56:08.000Z | 2022-03-11T15:50:54.000Z | backend/api/admin/user.py | deti/boss | bc0cfe3067bf1cbf26789f7443a36e7cdd2ac869 | [
"Apache-2.0"
] | 2 | 2021-06-08T21:12:51.000Z | 2022-01-13T01:25:27.000Z | backend/api/admin/user.py | deti/boss | bc0cfe3067bf1cbf26789f7443a36e7cdd2ac869 | [
"Apache-2.0"
] | 5 | 2016-10-09T14:52:09.000Z | 2020-12-25T01:04:35.000Z | # -*- coding: utf-8 -*-
import conf
import errors
import logbook
import bottle
import posixpath
from urllib.parse import urljoin
from memdb.token import UserToken
from model import User, autocommit, MessageTemplate
from model import display
from memdb.token import PasswordResetToken
from api import get, post, put, del... | 35.311778 | 114 | 0.578875 |
334b62b2ea60169bb63f07829f3e27e32591177b | 4,519 | py | Python | wavio.py | psi9730/naver_ai_hackathon_speech | b0739bc93a4d1abddd0b90ef194aa36dec418611 | [
"Apache-2.0"
] | 9 | 2019-11-05T06:26:42.000Z | 2020-12-03T05:49:12.000Z | wavio.py | psi9730/naver_ai_hackathon_speech | b0739bc93a4d1abddd0b90ef194aa36dec418611 | [
"Apache-2.0"
] | null | null | null | wavio.py | psi9730/naver_ai_hackathon_speech | b0739bc93a4d1abddd0b90ef194aa36dec418611 | [
"Apache-2.0"
] | 4 | 2019-11-05T05:57:58.000Z | 2021-12-11T12:32:03.000Z | """
The wavio module defines the functions:
read(file)
Read a WAV file and return a `wavio.Wav` object, with attributes
`data`, `rate` and `sampwidth`.
write(filename, data, rate, scale=None, sampwidth=None)
Write a numpy array to a WAV file.
-----
Author: Warren Weckesser
License: BSD 2-Clause:
Copyright (... | 41.458716 | 76 | 0.681567 |
334b7981f65c02bf0ec6e24034435dfb8b5fcb0d | 13,958 | py | Python | nautobot_chatops/workers/__init__.py | tanvimoharir/nautobot-plugin-chatops | 8fe984b7918f02eb8015c4c0ae3df889688c7a12 | [
"Apache-2.0"
] | null | null | null | nautobot_chatops/workers/__init__.py | tanvimoharir/nautobot-plugin-chatops | 8fe984b7918f02eb8015c4c0ae3df889688c7a12 | [
"Apache-2.0"
] | null | null | null | nautobot_chatops/workers/__init__.py | tanvimoharir/nautobot-plugin-chatops | 8fe984b7918f02eb8015c4c0ae3df889688c7a12 | [
"Apache-2.0"
] | null | null | null | """Workers module for the nautobot_chatops Nautobot plugin.
The functions in this module provide back-end worker logic that is totally ignorant
of the differences between various chat platforms. They receive generic data from
one of the platform-specific ``views``, handle it appropriately, then dispatch it
back to the... | 39.541076 | 119 | 0.669007 |
334b8308598495b653ee54c9c47d4f24b0b9e616 | 7,380 | py | Python | pntools/lpo_viewer_tk.py | BoltMaud/pntools | 3bb501b4f3ce8ad031fcc05e9c58c2c053230d8b | [
"MIT"
] | 6 | 2016-05-17T19:34:26.000Z | 2021-05-17T18:39:50.000Z | pntools/lpo_viewer_tk.py | BoltMaud/pntools | 3bb501b4f3ce8ad031fcc05e9c58c2c053230d8b | [
"MIT"
] | 15 | 2017-02-05T07:43:05.000Z | 2018-02-11T15:03:02.000Z | pntools/lpo_viewer_tk.py | BoltMaud/pntools | 3bb501b4f3ce8ad031fcc05e9c58c2c053230d8b | [
"MIT"
] | 8 | 2017-02-08T10:53:29.000Z | 2021-03-06T09:59:58.000Z | #!/usr/bin/python3
# -*- coding_ utf-8 -*-
""" This program implements a viewer for the LPO data structure.
A LPO is a partial ordered set of events. If two events are ordered
this order is represented by an arrow. If there is an arrow form an
event a to an event b this means event b occurs after event a.
Usage: pyt... | 36 | 175 | 0.617886 |
334b9686dfe027c5b9d2db83737cdae77498e3bc | 7,489 | py | Python | using_skimage/io_module.py | AzureDVBB/SFM-Preprocessor | 232009ca9cfd5ee3ba08e3117493f9243c68731c | [
"MIT"
] | null | null | null | using_skimage/io_module.py | AzureDVBB/SFM-Preprocessor | 232009ca9cfd5ee3ba08e3117493f9243c68731c | [
"MIT"
] | null | null | null | using_skimage/io_module.py | AzureDVBB/SFM-Preprocessor | 232009ca9cfd5ee3ba08e3117493f9243c68731c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Jan 18 12:28:03 2020
@author: AzureDVBB
A collection of fuctions to read and write image data.
"""
# standard library
from typing import Generator, List, Tuple
import os
from os import path
import timeit
# installed library
from skimage.io import i... | 27.94403 | 100 | 0.60649 |
334ba52d88eca0078daa59981ea9dce0c1158706 | 5,428 | py | Python | pytato/analysis/__init__.py | alexfikl/pytato | 6ece6bc8bc35b22fe000a60ded74e8845883d30b | [
"MIT"
] | null | null | null | pytato/analysis/__init__.py | alexfikl/pytato | 6ece6bc8bc35b22fe000a60ded74e8845883d30b | [
"MIT"
] | null | null | null | pytato/analysis/__init__.py | alexfikl/pytato | 6ece6bc8bc35b22fe000a60ded74e8845883d30b | [
"MIT"
] | null | null | null | from __future__ import annotations
__copyright__ = """
Copyright (C) 2021 Kaushik Kulkarni
"""
__license__ = """
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... | 34.573248 | 80 | 0.661938 |
334c2ef70e5354c4c89c7ed599abf0d7889f2fa1 | 1,438 | py | Python | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01/models/secret_object.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01/models/secret_object.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01/models/secret_object.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"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 ... | 35.95 | 77 | 0.609875 |
334c540a23d76cbcc8a5425b0135296ff6366fcd | 49,120 | py | Python | appengine/monorail/api/v3/api_proto/users_prpc_pb2.py | fknittel/git-retry-build | 4d57dd6e8b7567daeb24b55f66bc5becd3d459f3 | [
"BSD-3-Clause"
] | null | null | null | appengine/monorail/api/v3/api_proto/users_prpc_pb2.py | fknittel/git-retry-build | 4d57dd6e8b7567daeb24b55f66bc5becd3d459f3 | [
"BSD-3-Clause"
] | 4 | 2022-03-17T18:58:21.000Z | 2022-03-17T18:58:22.000Z | appengine/monorail/api/v3/api_proto/users_prpc_pb2.py | fknittel/git-retry-build | 4d57dd6e8b7567daeb24b55f66bc5becd3d459f3 | [
"BSD-3-Clause"
] | null | null | null | # Generated by the pRPC protocol buffer compiler plugin. DO NOT EDIT!
# source: api/v3/api_proto/users.proto
import base64
import zlib
from google.protobuf import descriptor_pb2
# Includes description of the api/v3/api_proto/users.proto and all of its transitive
# dependencies. Includes source code info.
FILE_DESCR... | 78.717949 | 86 | 0.881026 |
334c742f08123c497360497407ae9c85c40d87b7 | 1,257 | py | Python | reinvent_models/model_factory/lib_invent_adapter.py | GT4SD/-reinvent_models | e1cf00d1b24fe5f39354e34829adc25460da84e2 | [
"MIT"
] | null | null | null | reinvent_models/model_factory/lib_invent_adapter.py | GT4SD/-reinvent_models | e1cf00d1b24fe5f39354e34829adc25460da84e2 | [
"MIT"
] | 1 | 2022-03-07T12:18:00.000Z | 2022-03-07T12:18:00.000Z | reinvent_models/model_factory/lib_invent_adapter.py | GT4SD/reinvent_models | e1cf00d1b24fe5f39354e34829adc25460da84e2 | [
"MIT"
] | null | null | null | from reinvent_models.lib_invent.models.model import DecoratorModel
from reinvent_models.model_factory.generative_model_base import GenerativeModelBase
class LibInventAdapter(GenerativeModelBase):
def __init__(self, path_to_file: str, mode: str):
self.generative_model = DecoratorModel.load_from_fil... | 41.9 | 126 | 0.765314 |
334cb10ac3fe8a68348bd1f018d5dd8c042cf8a8 | 1,227 | py | Python | migrations/versions/27b70c1be3f0_.py | ENCODE-DCC/genomic-data-service | 954017a5bcc5f448fbe2867768186df5e066c67c | [
"MIT"
] | 3 | 2020-10-26T02:15:55.000Z | 2022-01-26T18:39:09.000Z | migrations/versions/27b70c1be3f0_.py | ENCODE-DCC/genomic-data-service | 954017a5bcc5f448fbe2867768186df5e066c67c | [
"MIT"
] | 3 | 2021-08-17T02:01:54.000Z | 2022-03-30T17:14:02.000Z | migrations/versions/27b70c1be3f0_.py | ENCODE-DCC/genomic-data-service | 954017a5bcc5f448fbe2867768186df5e066c67c | [
"MIT"
] | 1 | 2022-03-24T21:15:34.000Z | 2022-03-24T21:15:34.000Z | """empty message
Revision ID: 27b70c1be3f0
Revises: e7cf6ce136f4
Create Date: 2021-04-01 10:18:11.615734
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '27b70c1be3f0'
down_revision = 'e7cf6ce136f4'
branch_labels = None
depends_on = None
def upgrade():
# ... | 33.162162 | 93 | 0.708231 |
334cb7169ccc8e0baf55c9a9598bf1929c7b2ba1 | 7,566 | py | Python | open_spiel/python/examples/mcts.py | zouxu09/open_spiel | 8de8aa528616b27d1a4d0a0adc74a228c080ee5e | [
"Apache-2.0"
] | null | null | null | open_spiel/python/examples/mcts.py | zouxu09/open_spiel | 8de8aa528616b27d1a4d0a0adc74a228c080ee5e | [
"Apache-2.0"
] | null | null | null | open_spiel/python/examples/mcts.py | zouxu09/open_spiel | 8de8aa528616b27d1a4d0a0adc74a228c080ee5e | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 DeepMind Technologies Ltd. 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 appl... | 33.477876 | 80 | 0.698123 |
334ccc5abd912b4117977ae2fe264eb62450d7cb | 632 | py | Python | botoflow/decisions/__init__.py | boto/botoflow | 49d8ed3bc9c57294504be82e933a051e1901b76e | [
"Apache-2.0"
] | 13 | 2016-06-15T06:10:57.000Z | 2021-10-30T03:52:28.000Z | botoflow/decisions/__init__.py | DalavanCloud/botoflow | 49d8ed3bc9c57294504be82e933a051e1901b76e | [
"Apache-2.0"
] | 11 | 2016-09-15T01:48:08.000Z | 2019-01-09T06:11:44.000Z | botoflow/decisions/__init__.py | DalavanCloud/botoflow | 49d8ed3bc9c57294504be82e933a051e1901b76e | [
"Apache-2.0"
] | 16 | 2016-06-05T03:42:04.000Z | 2022-03-01T17:43:14.000Z | # Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
# http://aws.amazon.com/apache2.0
#
# or in the "license" file accompa... | 35.111111 | 75 | 0.757911 |
334cdf46d1ec1184a2ea4205ac2e4c763b018957 | 1,094 | py | Python | imageSearch.py | 1wheel/nbadraft | 28d5cfa39e23e2d2f60cfaf417a42a18cfe1a453 | [
"MIT"
] | 2 | 2015-04-03T15:19:05.000Z | 2017-06-18T10:13:33.000Z | imageSearch.py | 1wheel/nbadraft | 28d5cfa39e23e2d2f60cfaf417a42a18cfe1a453 | [
"MIT"
] | null | null | null | imageSearch.py | 1wheel/nbadraft | 28d5cfa39e23e2d2f60cfaf417a42a18cfe1a453 | [
"MIT"
] | null | null | null | import pyBingSearchAPI
import json
from time import sleep
key = 'uzMuSoVwFFEbXSo/lRT89rvLlFy6KG2C8q2s+PyN4h4'
bing = pyBingSearchAPI.BingSearchAPI(key)
params = {'ImageFilters':'"Face:Face+Aspect:Square"',
'$format': 'json',
'$top': 50,
'$skip': 0}
r = bing.search('image', 'Tim Duncan ... | 24.863636 | 81 | 0.654479 |
334d1fc27193e311769b2a3ceab1b92b7a2b744f | 5,494 | py | Python | custom_components/alpha_vantage/sensor.py | Per4merKC/home-assistant-config | 03a873bc4a460093dd1a10387c951890f899b5ba | [
"MIT"
] | null | null | null | custom_components/alpha_vantage/sensor.py | Per4merKC/home-assistant-config | 03a873bc4a460093dd1a10387c951890f899b5ba | [
"MIT"
] | null | null | null | custom_components/alpha_vantage/sensor.py | Per4merKC/home-assistant-config | 03a873bc4a460093dd1a10387c951890f899b5ba | [
"MIT"
] | null | null | null | """
Stock market information from Alpha Vantage.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.alpha_vantage/
"""
import logging
from homeassistant.const import (ATTR_ATTRIBUTION, CONF_CURRENCY, CONF_NAME)
from homeassistant.core import callback... | 29.379679 | 76 | 0.651256 |
334daf48481695dd50b84b8d11973fdc6f0c5436 | 11,489 | py | Python | tests/tests.py | ergo/pyramid_apispec | 41c0ed4b12b3cf491c52f2f9e66e120f2637b0e6 | [
"BSD-3-Clause"
] | 18 | 2018-06-13T01:17:55.000Z | 2021-08-02T15:16:24.000Z | tests/tests.py | ergo/pyramid_apispec | 41c0ed4b12b3cf491c52f2f9e66e120f2637b0e6 | [
"BSD-3-Clause"
] | 25 | 2018-06-21T06:28:00.000Z | 2021-10-17T12:35:55.000Z | tests/tests.py | ergo/pyramid_apispec | 41c0ed4b12b3cf491c52f2f9e66e120f2637b0e6 | [
"BSD-3-Clause"
] | 9 | 2018-06-21T06:05:32.000Z | 2020-10-28T21:50:05.000Z | import pytest
from apispec import APISpec
from pyramid.config import Configurator
from pyramid.response import Response
from pyramid.testing import DummyRequest, testConfig
from webtest import TestApp as WebTestApp # Avoid pytest warning
from pyramid_apispec import __version__
from pyramid_apispec.helpers import add_... | 33.10951 | 86 | 0.542519 |
334dce22924757f39ab55534ea3f421143f9600c | 13,642 | py | Python | data/tracking/methods/sequential/metric_collector/full_annotated.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 143 | 2021-12-03T02:33:36.000Z | 2022-03-29T00:01:48.000Z | data/tracking/methods/sequential/metric_collector/full_annotated.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 33 | 2021-12-03T10:32:05.000Z | 2022-03-31T02:13:55.000Z | data/tracking/methods/sequential/metric_collector/full_annotated.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 24 | 2021-12-04T06:46:42.000Z | 2022-03-30T07:57:47.000Z | from miscellanies.torch.distributed import is_main_process
from .utils.calculate_metrics import calculate_evaluation_metrics
from .utils.draw_plots import draw_success_plot, draw_precision_plot, draw_normalized_precision_plot
import os
import csv
from collections import namedtuple
import numpy as np
import json
from ty... | 69.602041 | 238 | 0.694766 |
334e180511fa60de28a34e9e9fce5285074e9dad | 1,875 | py | Python | pgn2fixture/tests/test_pgn2fixture.py | pointerish/pgn2fixture | 02039680acc37cbca22fb332738e34cd113831a4 | [
"MIT"
] | 3 | 2021-03-18T19:08:59.000Z | 2021-10-10T03:52:49.000Z | pgn2fixture/tests/test_pgn2fixture.py | pointerish/pgn2fixture | 02039680acc37cbca22fb332738e34cd113831a4 | [
"MIT"
] | null | null | null | pgn2fixture/tests/test_pgn2fixture.py | pointerish/pgn2fixture | 02039680acc37cbca22fb332738e34cd113831a4 | [
"MIT"
] | null | null | null | import unittest
from .. import pgn2fixture
class TestGame(unittest.TestCase):
def setUp(self) -> None:
pgn_string = '''
[Event "US Championship 1963/64"]
[Site "New York, NY USA"]
[Date "1964.01.01"]
[EventDate "1963.??.??"]
[Round "11"]
[Result "0-1"]
... | 37.5 | 683 | 0.607467 |
334e2cf68038f5908fd3609af07d7b850cca64df | 38,391 | py | Python | nmpc_mhe/dync/.old_/DynGen.py | kuanhanl/cappresse | 31cd7d03414a930f7e2c21e1a3eb5e7dd25cc500 | [
"MIT"
] | 2 | 2019-09-26T20:56:06.000Z | 2019-11-18T21:03:27.000Z | nmpc_mhe/dync/.old_/DynGen.py | kuanhanl/cappresse | 31cd7d03414a930f7e2c21e1a3eb5e7dd25cc500 | [
"MIT"
] | 6 | 2018-03-19T20:36:49.000Z | 2018-04-13T15:27:29.000Z | nmpc_mhe/dync/.old_/DynGen.py | kuanhanl/cappresse | 31cd7d03414a930f7e2c21e1a3eb5e7dd25cc500 | [
"MIT"
] | 5 | 2018-10-04T18:51:02.000Z | 2020-07-02T15:31:35.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import division
from pyomo.core.base import Var, Objective, minimize, Set, Constraint, Expression, Param, Suffix, maximize
from pyomo.core.base import ConstraintList
from pyomo.opt import SolverFactory, ProblemFormat, ... | 40.711559 | 133 | 0.50267 |
334e2e205aaa30be3a525967b5b3044f7f3d9e4a | 1,733 | py | Python | src/main/admin/local_hooks.py | abrami/uima-ducc | bf3ed51b1d070761557f660ddc684f851d7b6061 | [
"Apache-2.0"
] | 8 | 2015-07-08T17:53:46.000Z | 2021-11-10T19:00:35.000Z | src/main/admin/local_hooks.py | abrami/uima-ducc | bf3ed51b1d070761557f660ddc684f851d7b6061 | [
"Apache-2.0"
] | 2 | 2021-08-25T15:57:48.000Z | 2022-02-01T01:12:04.000Z | src/main/admin/local_hooks.py | abrami/uima-ducc | bf3ed51b1d070761557f660ddc684f851d7b6061 | [
"Apache-2.0"
] | 21 | 2015-12-09T21:48:28.000Z | 2021-11-10T19:00:23.000Z | #!/usr/bin/python
# -----------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licens... | 37.673913 | 86 | 0.688979 |
334e5a68d884cbc21ef49d299f679c78e2722517 | 24,554 | py | Python | concourse/replicator.py | busunkim96/cc-utils | aa864b1fad3061410907d6b93b8aee8cd25f33b5 | [
"Apache-2.0"
] | 15 | 2018-04-18T13:25:30.000Z | 2022-03-04T09:25:41.000Z | concourse/replicator.py | busunkim96/cc-utils | aa864b1fad3061410907d6b93b8aee8cd25f33b5 | [
"Apache-2.0"
] | 221 | 2018-04-12T06:29:43.000Z | 2022-03-27T03:01:40.000Z | concourse/replicator.py | busunkim96/cc-utils | aa864b1fad3061410907d6b93b8aee8cd25f33b5 | [
"Apache-2.0"
] | 29 | 2018-04-11T14:42:23.000Z | 2021-11-09T16:26:32.000Z | import dataclasses
import enum
import os
from enum import Enum, IntEnum
from concurrent.futures import ThreadPoolExecutor
import functools
import logging
import textwrap
import threading
import traceback
import typing
import mako.template
from ci.util import (
existing_dir,
merge_dicts,
FluentIterable,
... | 37.429878 | 100 | 0.648611 |
334e64bc87ee2f801ee16bf4ab13b8524810a3af | 861 | py | Python | peripheral/i2c/sht30.py | newdreamlj/rpi-toolbox | 6b24f614b617fa921b55062e3666171e3037584d | [
"MIT"
] | 1 | 2017-10-19T15:55:57.000Z | 2017-10-19T15:55:57.000Z | peripheral/i2c/sht30.py | newdreamlj/rpi-toolbox | 6b24f614b617fa921b55062e3666171e3037584d | [
"MIT"
] | null | null | null | peripheral/i2c/sht30.py | newdreamlj/rpi-toolbox | 6b24f614b617fa921b55062e3666171e3037584d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# 2017-09-22 by NewDream
#
# i2c interaction with SHT30
"""
"""
import time
import pigpio
BUS = 1
SHT_ADDR = 0x44
def sht_read():
pi = pigpio.pi()
if not pi.connected:
return -1
handle = pi.i2c_open(BUS, SHT_ADDR)
# pi.write_i2c_block_data(SHT_ADDR, 0x24, [0x00])
... | 19.568182 | 69 | 0.577236 |
334e7c65d8ce1a808cd8d22ac937bffb79bd7f55 | 37,689 | py | Python | docker/third-party/nnUNet/nnunet/training/network_training/nnUNetTrainer.py | LucasFidon/trustworthy-ai-fetal-brain-segmentation | 84959da54d8c2fb156da2b06cca30fa31a1c926d | [
"BSD-3-Clause"
] | null | null | null | docker/third-party/nnUNet/nnunet/training/network_training/nnUNetTrainer.py | LucasFidon/trustworthy-ai-fetal-brain-segmentation | 84959da54d8c2fb156da2b06cca30fa31a1c926d | [
"BSD-3-Clause"
] | null | null | null | docker/third-party/nnUNet/nnunet/training/network_training/nnUNetTrainer.py | LucasFidon/trustworthy-ai-fetal-brain-segmentation | 84959da54d8c2fb156da2b06cca30fa31a1c926d | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2020 Division of Medical Image Computing, German Cancer Research Center (DKFZ), Heidelberg, Germany
#
# 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://w... | 53.083099 | 128 | 0.609276 |
334e91137afb64abba7caa3f7a0cbf7a48c60e4d | 1,121 | py | Python | examples/data_package/nipy-examplepkg/setup.py | matthew-brett/nipy | 5a3f080f2504f8b2c326677ea2e3101344b3f579 | [
"BSD-3-Clause"
] | 1 | 2016-03-08T15:01:06.000Z | 2016-03-08T15:01:06.000Z | examples/data_package/nipy-examplepkg/setup.py | fabianp/nipy | 40e89f3ca7f34df05631623807993026134e6de3 | [
"BSD-3-Clause"
] | 1 | 2015-09-09T07:49:57.000Z | 2015-09-25T01:50:40.000Z | examples/data_package/nipy-examplepkg/setup.py | fabianp/nipy | 40e89f3ca7f34df05631623807993026134e6de3 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
''' Installation script for nipy examplepkg package '''
import os
from os.path import join as pjoin
from distutils.core import setup
import ConfigParser
# The directory under --pref... | 29.5 | 73 | 0.71008 |
334e93010de0780abadaf414d05f4165f2be3ff2 | 7,392 | py | Python | tumor_cut.py | netphone/Brain-tumor-segmentation-using-tumor-cut-algorithm | 18cc0114a5ec91673fb6f9cc37819bfb95f0aa67 | [
"MIT"
] | 1 | 2019-08-30T17:30:02.000Z | 2019-08-30T17:30:02.000Z | tumor_cut.py | netphone/Brain-tumor-segmentation-using-tumor-cut-algorithm | 18cc0114a5ec91673fb6f9cc37819bfb95f0aa67 | [
"MIT"
] | null | null | null | tumor_cut.py | netphone/Brain-tumor-segmentation-using-tumor-cut-algorithm | 18cc0114a5ec91673fb6f9cc37819bfb95f0aa67 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sat Mar 13 11:37:00 2018
@author: plin@augusta.edu
"""
import numpy as np
from numpy.linalg import norm as nrm
from scipy import ndimage
from signed_distance_function import *
import matplotlib.pyplot as plt
class tumorCut(object):
def __init__(self, image, foreground_... | 46.2 | 168 | 0.605249 |
334eaf3287d26092029abe57070b5087237034e7 | 15,996 | py | Python | weasyl/search.py | Weasyl/weasyl | 80c86942c6f20a815086e2895fdad51d3aa77eed | [
"Apache-2.0"
] | 111 | 2016-05-18T04:18:18.000Z | 2021-11-03T02:05:19.000Z | weasyl/search.py | Weasyl/weasyl | 80c86942c6f20a815086e2895fdad51d3aa77eed | [
"Apache-2.0"
] | 1,103 | 2016-05-29T05:17:53.000Z | 2022-03-31T18:12:40.000Z | weasyl/search.py | Weasyl/weasyl | 80c86942c6f20a815086e2895fdad51d3aa77eed | [
"Apache-2.0"
] | 47 | 2016-05-29T20:48:37.000Z | 2021-11-12T09:40:40.000Z | import re
from libweasyl.ratings import GENERAL, MATURE, EXPLICIT
from weasyl import character, journal, media, searchtag, submission
from weasyl import define as d
_QUERY_FIND_MODIFIERS = {
"#submission": "submit",
"#character": "char",
"#journal": "journal",
"#user": "user",
}
_QUERY_RATING_MODIF... | 40.190955 | 146 | 0.608965 |
334ebca233facc656f5d18f9ee758183606de6bb | 774 | py | Python | scapp/__init__.py | mikkqu/rc-chrysalis | 3243bb484ca5e30a672a35133af342df5ef12c5e | [
"BSD-2-Clause"
] | null | null | null | scapp/__init__.py | mikkqu/rc-chrysalis | 3243bb484ca5e30a672a35133af342df5ef12c5e | [
"BSD-2-Clause"
] | null | null | null | scapp/__init__.py | mikkqu/rc-chrysalis | 3243bb484ca5e30a672a35133af342df5ef12c5e | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
rc_chrysalis
~~~~~
A web service representing a casual social network to encourage
social activities at Recurse Center.
"""
import os
from flask import Flask
from flask_pymongo import PyMongo
from . import moment
app = Flask(__name__, static_url_path='/static')
app.jinja_e... | 24.967742 | 67 | 0.711886 |
334ec87513314962c6ee6e1691914397b667cdd6 | 13,441 | py | Python | keymap/mayaPieMenu.py | minoue/mtob | cccea29ccd9a398798e93718f9132eac01581b2a | [
"MIT"
] | 5 | 2020-04-15T13:54:22.000Z | 2021-04-09T01:37:04.000Z | keymap/mayaPieMenu.py | minoue/miBlenderScripts | 9dd4822968d408aa7670a082bb1cbf98308d514f | [
"MIT"
] | null | null | null | keymap/mayaPieMenu.py | minoue/miBlenderScripts | 9dd4822968d408aa7670a082bb1cbf98308d514f | [
"MIT"
] | 1 | 2019-05-30T09:02:51.000Z | 2019-05-30T09:02:51.000Z | import bpy
from bpy.types import Menu
bl_info = {
"name": "MayaPieMenu",
"description": "View Modes",
"author": "Michitaka Inoue",
"version": (0, 2, 5),
"blender": (2, 80, 0),
"warning": "",
"wiki_url": "",
"category": "3d View"
}
def getMode():
selected_obje... | 25.798464 | 109 | 0.548248 |
334ecc455b3e7d833f8287f165f79bfde5484ba9 | 11,444 | py | Python | salt/modules/virtualenv_mod.py | epoelke/salt | 80ae64e54f9f336d3cdb6e03e42f2a50469ec8f2 | [
"Apache-2.0"
] | 1 | 2016-12-20T20:11:21.000Z | 2016-12-20T20:11:21.000Z | salt/modules/virtualenv_mod.py | epoelke/salt | 80ae64e54f9f336d3cdb6e03e42f2a50469ec8f2 | [
"Apache-2.0"
] | null | null | null | salt/modules/virtualenv_mod.py | epoelke/salt | 80ae64e54f9f336d3cdb6e03e42f2a50469ec8f2 | [
"Apache-2.0"
] | null | null | null | '''
Create virtualenv environments
'''
# Import python libs
import glob
import shutil
import logging
import os
import os.path
# Import salt libs
import salt.utils
import salt.exceptions
log = logging.getLogger(__name__)
__opts__ = {
'venv_bin': 'virtualenv'
}
__pillar__ = {}
def __virtual__():
return 'vi... | 36.679487 | 80 | 0.583188 |
334ed22ff21c3e37bc92efe928a9ebb5f14ca3dc | 91 | py | Python | dungeons/apps.py | zachtib/MagicWithFriends | 18db849fe282903051820b718a2d7b434360e332 | [
"MIT"
] | null | null | null | dungeons/apps.py | zachtib/MagicWithFriends | 18db849fe282903051820b718a2d7b434360e332 | [
"MIT"
] | 5 | 2021-02-15T20:52:10.000Z | 2021-07-03T18:19:59.000Z | dungeons/apps.py | zachtib/MagicWithFriends | 18db849fe282903051820b718a2d7b434360e332 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class DungeonsConfig(AppConfig):
name = 'dungeons'
| 15.166667 | 33 | 0.758242 |
334efa9a6017870531e4702c78a2d9f0da313adc | 5,072 | py | Python | cmake/Scripts/generate-if.py | m-gul/timemory | 36520ff4aedc09ea7b54981dd8c97c4960f6ee79 | [
"MIT"
] | 1 | 2019-12-06T22:21:13.000Z | 2019-12-06T22:21:13.000Z | cmake/Scripts/generate-if.py | hbrunie/timemory | 36520ff4aedc09ea7b54981dd8c97c4960f6ee79 | [
"MIT"
] | null | null | null | cmake/Scripts/generate-if.py | hbrunie/timemory | 36520ff4aedc09ea7b54981dd8c97c4960f6ee79 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys
import argparse
# read in components and mangled enums
from timemory_types import components, mangled_enums, mangled_strings
def generate_if_statement(component, idx, indent_tabs=2, spaces=4, vec_var="vec"):
"""
This function generates a case label for C++
"""
enumera... | 39.625 | 106 | 0.576104 |
334efc8a210854e7ef432fde63baf04b4827d154 | 11,424 | py | Python | tests/test_helpers.py | ConsultingMD/covid-data-model | f3d23f98eccca1ce33c7a11ab546e9aab5d0aa4d | [
"MIT"
] | null | null | null | tests/test_helpers.py | ConsultingMD/covid-data-model | f3d23f98eccca1ce33c7a11ab546e9aab5d0aa4d | [
"MIT"
] | null | null | null | tests/test_helpers.py | ConsultingMD/covid-data-model | f3d23f98eccca1ce33c7a11ab546e9aab5d0aa4d | [
"MIT"
] | null | null | null | import dataclasses
from typing import List
from collections import UserList
from typing import Any
from typing import Mapping
from typing import Optional
from typing import Sequence
from typing import TypeVar
from typing import Union
import more_itertools
import pandas as pd
import numpy as np
from covidactnow.datapu... | 37.455738 | 100 | 0.714111 |
334f2c194c7051b69965b480c11ee466249c9f74 | 265 | py | Python | tools/Data_Structure_Extention.py | paolodelia99/Python-C-Algorithms | 9113ad566e4e659c1f16135c2d3abd3a4c57a46e | [
"MIT"
] | 2 | 2021-02-13T10:58:58.000Z | 2021-03-16T09:56:01.000Z | tools/Data_Structure_Extention.py | paolodelia99/Python-C-Algorithms | 9113ad566e4e659c1f16135c2d3abd3a4c57a46e | [
"MIT"
] | null | null | null | tools/Data_Structure_Extention.py | paolodelia99/Python-C-Algorithms | 9113ad566e4e659c1f16135c2d3abd3a4c57a46e | [
"MIT"
] | null | null | null | class DataStructureExtention:
"""
Class to represent the extension of the Data Structure
"""
def __init__(self, py_name: str, c_name: str, other_src=[]):
self.py_name = py_name
self.c_name = c_name
self.other_src = other_src
| 29.444444 | 64 | 0.649057 |
334f86ad943e41933ae0339123870b4c478866f5 | 2,700 | py | Python | services/template_service.py | renuchauhan625/RazorPyOfficial | e5e3c2cb638b0e402f665aa2e756debd7c456237 | [
"Apache-2.0"
] | 3 | 2021-07-11T03:52:50.000Z | 2022-01-06T11:30:08.000Z | services/template_service.py | renuchauhan625/RazorPyOfficial | e5e3c2cb638b0e402f665aa2e756debd7c456237 | [
"Apache-2.0"
] | null | null | null | services/template_service.py | renuchauhan625/RazorPyOfficial | e5e3c2cb638b0e402f665aa2e756debd7c456237 | [
"Apache-2.0"
] | 1 | 2021-07-18T05:42:40.000Z | 2021-07-18T05:42:40.000Z | '''
Created on 05-Feb-2021
@author: Abhishek Prajapati
'''
from os import path
from jinja2 import Environment, FileSystemLoader
from managers.vars_manager import AppsVars
from pyexception.RazorException import RazorException
from razorpy_abstract.RazorPy import RazorPy
import ntpath
class Template(RazorPy):
''... | 28.723404 | 140 | 0.603704 |
334f9ef0838da2586c4b4331f649ec28276a9b14 | 3,340 | py | Python | charms/icscf-operator/tests/test_pod_spec.py | charmed-osm/5g-ims | bb902efa575e2e3cf7b97441fc85ace2e917c39b | [
"Apache-2.0"
] | 1 | 2021-06-10T06:53:34.000Z | 2021-06-10T06:53:34.000Z | charms/icscf-operator/tests/test_pod_spec.py | charmed-osm/5g-ims | bb902efa575e2e3cf7b97441fc85ace2e917c39b | [
"Apache-2.0"
] | 3 | 2021-08-25T02:30:13.000Z | 2022-02-25T06:08:16.000Z | charms/icscf-operator/tests/test_pod_spec.py | charmed-osm/5g-ims | bb902efa575e2e3cf7b97441fc85ace2e917c39b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright 2020 Tata Elxsi
#
# 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... | 32.115385 | 80 | 0.618563 |
334fcd9a676e0c3a40abd137da63af7d2a34e657 | 18,816 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/aio/operations/_proximity_placement_groups_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/aio/operations/_proximity_placement_groups_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/aio/operations/_proximity_placement_groups_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.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 ... | 46.117647 | 232 | 0.688085 |
334fd7d0a981c7569777f2e72e7dc5fba9da2943 | 7,215 | py | Python | Analytics/resources/attributes/test_attribute_alias.py | thanosbnt/SharingCitiesDashboard | 5d123691d1f25d0b85e20e4e8293266bf23c9f8a | [
"Apache-2.0"
] | 4 | 2018-11-21T14:42:18.000Z | 2020-05-11T10:52:59.000Z | Analytics/resources/attributes/test_attribute_alias.py | thanosbnt/SharingCitiesDashboard | 5d123691d1f25d0b85e20e4e8293266bf23c9f8a | [
"Apache-2.0"
] | 60 | 2018-11-21T15:11:59.000Z | 2019-12-02T10:46:44.000Z | Analytics/resources/attributes/test_attribute_alias.py | thanosbnt/SharingCitiesDashboard | 5d123691d1f25d0b85e20e4e8293266bf23c9f8a | [
"Apache-2.0"
] | 7 | 2018-11-21T14:42:44.000Z | 2019-11-28T16:24:14.000Z | from http import HTTPStatus
from unittest import TestCase
import bcrypt
from flask.ctx import AppContext
from flask.testing import FlaskClient
from app import create_app
from db import db
from models.attribute_alias import AttrAlias
from models.attributes import Attributes
from models.theme import SubTheme, Theme
fro... | 38.582888 | 119 | 0.624532 |
334fd93e00d126a4cfd258999af88422fb8059df | 11,182 | py | Python | cinder/common/config.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | cinder/common/config.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | 2 | 2018-10-25T13:04:01.000Z | 2019-08-17T13:15:24.000Z | cinder/common/config.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | 2 | 2018-10-17T13:32:50.000Z | 2018-11-08T08:39:39.000Z | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# Copyright 2012 Red Hat, Inc.
# Copyright 2013 NTT corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file exc... | 45.08871 | 79 | 0.575657 |
334fdc81d38c8b9be324c687816f511eb717cef4 | 5,545 | py | Python | test/run_tests.py | 5GExchange/escape | eb35d460597a0386b18dd5b6a5f62a3f30eed5fa | [
"Apache-2.0"
] | 10 | 2016-11-16T16:26:16.000Z | 2021-04-26T17:20:28.000Z | test/run_tests.py | 5GExchange/escape | eb35d460597a0386b18dd5b6a5f62a3f30eed5fa | [
"Apache-2.0"
] | 3 | 2017-04-20T11:29:17.000Z | 2017-11-06T17:12:12.000Z | test/run_tests.py | 5GExchange/escape | eb35d460597a0386b18dd5b6a5f62a3f30eed5fa | [
"Apache-2.0"
] | 10 | 2017-03-27T13:58:52.000Z | 2020-06-24T22:42:51.000Z | #!/usr/bin/env python
# Copyright 2017 Lajos Gerecs, Janos Czentye
#
# 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 appli... | 36.721854 | 79 | 0.652119 |
334fdfa626b960bca5590c79528be5224d639a10 | 4,688 | py | Python | test/service/test_query_shortener.py | VIIgit/azul | bb61965f625c667979a2f255f6bc39dcafaaf40b | [
"Apache-2.0"
] | null | null | null | test/service/test_query_shortener.py | VIIgit/azul | bb61965f625c667979a2f255f6bc39dcafaaf40b | [
"Apache-2.0"
] | null | null | null | test/service/test_query_shortener.py | VIIgit/azul | bb61965f625c667979a2f255f6bc39dcafaaf40b | [
"Apache-2.0"
] | null | null | null | from unittest import mock
from chalice import BadRequestError, ChaliceViewError
from moto import mock_s3, mock_sts
from azul import config
from azul.logging import configure_test_logging
from azul.service.responseobjects.storage_service import StorageService
from azul_test_case import AzulTestCase
from lambdas.servic... | 41.486726 | 112 | 0.677261 |
335005d438f22b30825a0ce16eb47f9e6fe76b6b | 1,041 | py | Python | gwlfe/Input/WaterBudget/InitSnow.py | mudkipmaster/gwlf-e | 9e058445537dd32d1916f76c4b73ca64261771cd | [
"Apache-2.0"
] | null | null | null | gwlfe/Input/WaterBudget/InitSnow.py | mudkipmaster/gwlf-e | 9e058445537dd32d1916f76c4b73ca64261771cd | [
"Apache-2.0"
] | 6 | 2018-07-24T22:46:28.000Z | 2018-07-29T19:13:09.000Z | gwlfe/Input/WaterBudget/InitSnow.py | mudkipmaster/gwlf-e | 9e058445537dd32d1916f76c4b73ca64261771cd | [
"Apache-2.0"
] | 1 | 2018-07-24T18:22:01.000Z | 2018-07-24T18:22:01.000Z | from numpy import zeros
from gwlfe.Memoization import memoize
try:
from InitSnow_f_inner_compiled import InitSnow_f_inner
except ImportError:
print("Unable to import compiled InitSnow_inner, using slower version")
from gwlfe.Input.WaterBudget.InitSnow_inner import InitSnow_f_inner
def InitSnow(NYrs, Day... | 32.53125 | 82 | 0.591739 |
335011ad9a5f956652a0568d4c6b89e1c5eea84d | 600 | py | Python | APDIncidentReports/urls.py | johngriebel/APDIncidentReports | 491b91bcc7eef9a32bda05ad3236b14748ba3b50 | [
"MIT"
] | null | null | null | APDIncidentReports/urls.py | johngriebel/APDIncidentReports | 491b91bcc7eef9a32bda05ad3236b14748ba3b50 | [
"MIT"
] | 16 | 2019-05-23T03:25:01.000Z | 2022-02-10T08:54:24.000Z | APDIncidentReports/urls.py | johngriebel/APDIncidentReports | 491b91bcc7eef9a32bda05ad3236b14748ba3b50 | [
"MIT"
] | null | null | null | from django.conf import settings
from django.conf.urls.static import static
from django.urls import path, include
from django.contrib import admin
from rest_framework_jwt.views import obtain_jwt_token, refresh_jwt_token
urlpatterns = [
path('admin/', admin.site.urls),
path('', include("cases.urls")),
path... | 35.294118 | 99 | 0.773333 |
33503158da06d942b05ecb57c3a8b8182ead4022 | 258 | py | Python | tzcode/tzcode/doctype/pm_visit/pm_visit.py | Lewinta/TZCode | 4a44ed85ec202446fdba0fd54e20680ed56b8ad3 | [
"MIT"
] | null | null | null | tzcode/tzcode/doctype/pm_visit/pm_visit.py | Lewinta/TZCode | 4a44ed85ec202446fdba0fd54e20680ed56b8ad3 | [
"MIT"
] | null | null | null | tzcode/tzcode/doctype/pm_visit/pm_visit.py | Lewinta/TZCode | 4a44ed85ec202446fdba0fd54e20680ed56b8ad3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2021, Lewin Villar and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
# import frappe
from frappe.model.document import Document
class PMVisit(Document):
pass
| 23.454545 | 51 | 0.771318 |
33506540903515c17d71ef1224ad4caaebefb3b1 | 1,752 | py | Python | viz/config.py | LaudateCorpus1/learning-subspaces | 240122f8a875f580eca92325fb06a98bf71bbf3e | [
"AML"
] | 105 | 2021-03-30T06:03:44.000Z | 2022-03-03T15:50:41.000Z | viz/config.py | LaudateCorpus1/learning-subspaces | 240122f8a875f580eca92325fb06a98bf71bbf3e | [
"AML"
] | 3 | 2021-07-16T04:46:25.000Z | 2022-01-29T04:47:26.000Z | viz/config.py | LaudateCorpus1/learning-subspaces | 240122f8a875f580eca92325fb06a98bf71bbf3e | [
"AML"
] | 12 | 2021-03-23T17:24:43.000Z | 2022-03-26T11:43:12.000Z | #
# For licensing see accompanying LICENSE file.
# Copyright (C) 2020 Apple Inc. All Rights Reserved.
#
info = {
"ens_6": ["C0", "-", "x", "Line (Ensemble)"],
"ens_6_28": ["C0", "-", "x", r"Line (Ensemble $\alpha=0.2,0.8$)"],
"ens_4": ["C1", "-", "d", "Line (Layerwise, Ensemble)"],
"ens_0": ["C3", "-", ... | 30.736842 | 74 | 0.474315 |
335088e6ede089fdee1f10db5f4b1604a9501d6b | 4,476 | py | Python | snower/pollsite/pollsite/snower/imagec/image_case.py | glstr/python_learning | 243908d6f358764386f2e58dfbfde10a406d803c | [
"Apache-2.0"
] | 2 | 2018-09-20T06:08:00.000Z | 2018-09-26T13:57:20.000Z | snower/pollsite/pollsite/snower/imagec/image_case.py | glstr/python_learning | 243908d6f358764386f2e58dfbfde10a406d803c | [
"Apache-2.0"
] | null | null | null | snower/pollsite/pollsite/snower/imagec/image_case.py | glstr/python_learning | 243908d6f358764386f2e58dfbfde10a406d803c | [
"Apache-2.0"
] | 1 | 2019-03-25T05:53:32.000Z | 2019-03-25T05:53:32.000Z | #!/usr/bin/python
# coding=utf-8
'''
@brief: Service for image operation and tool of make experiment.
'''
import os
from pprint import pprint
import sys
from pyecharts import Line
import common
import imager
import image_operator as img_ope
import mutual_infor as mi
funcs = {}
def img_info(param):
im =... | 23.808511 | 70 | 0.572386 |
335095fa9a220e8c82e8ece1051029f14dae8006 | 1,807 | py | Python | proxyclient/v2/proxy.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | 1 | 2019-09-11T11:56:19.000Z | 2019-09-11T11:56:19.000Z | proxyclient/v2/proxy.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | proxyclient/v2/proxy.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | from proxyclient import base
class Proxy(base.Resource):
pass
class ProxyManager(base.Manager):
resource_class = Proxy
def authenticate_by_zone(self, user_id, zone_id):
body = {"auth": {"zone_id": zone_id}}
return self._update('/os-proxy/authenticate/%s' % user_id, body)
def registe... | 31.155172 | 72 | 0.622025 |
33509fc2821701363041d71ba2ac9749fba5344c | 1,348 | py | Python | alipay/aop/api/domain/SourceOffer.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/SourceOffer.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/SourceOffer.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class SourceOffer(object):
def __init__(self):
self._offer_id = None
self._offer_type = None
@property
def offer_id(self):
return self._offer_id
@offer_id.setter
... | 24.071429 | 71 | 0.577151 |
3350abf610797b4df27ab990fb7214fc2d8d360a | 302 | py | Python | src/examples/reference/mouseclicked.py | agarwalnaimish/pyprocessing | 46695c379c95a7b874f76257c37f44f4b59d39e9 | [
"MIT"
] | 3 | 2018-04-23T17:33:02.000Z | 2021-01-05T04:52:36.000Z | src/examples/reference/mouseclicked.py | agarwalnaimish/pyprocessing | 46695c379c95a7b874f76257c37f44f4b59d39e9 | [
"MIT"
] | 1 | 2018-04-23T17:37:37.000Z | 2018-04-23T17:37:37.000Z | src/examples/reference/mouseclicked.py | agarwalnaimish/pyprocessing | 46695c379c95a7b874f76257c37f44f4b59d39e9 | [
"MIT"
] | 2 | 2019-01-16T06:34:52.000Z | 2019-10-15T14:03:07.000Z | from pyprocessing import *
# Click within the image to change
# the value of the rectangle after
# after the mouse has been clicked
value = 0;
def draw():
fill(value);
rect(25, 25, 50, 50);
def mouseClicked():
global value
if(value == 0):
value = 255;
else:
value = 0;
run()
| 13.727273 | 35 | 0.635762 |
3350c6911f76b92d802cdc3f4556b42caa15f7f5 | 60,344 | py | Python | tests/unit/gapic/compute_v1/test_disk_types.py | LaudateCorpus1/python-compute | a36c637f153c7b4ef49bb6a78c8b09f3746e7af1 | [
"Apache-2.0"
] | null | null | null | tests/unit/gapic/compute_v1/test_disk_types.py | LaudateCorpus1/python-compute | a36c637f153c7b4ef49bb6a78c8b09f3746e7af1 | [
"Apache-2.0"
] | null | null | null | tests/unit/gapic/compute_v1/test_disk_types.py | LaudateCorpus1/python-compute | a36c637f153c7b4ef49bb6a78c8b09f3746e7af1 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 38.509253 | 106 | 0.682719 |
3350d935977126d4bcd6c85bb0870353219405ac | 2,313 | py | Python | teacher_app/apps/classes/views/classviews.py | Darius-Ndubi/Teacher_APP_API | 1bafbccbbb3f8a9cc4b396bdd91e0d8c8e9a17dc | [
"MIT"
] | null | null | null | teacher_app/apps/classes/views/classviews.py | Darius-Ndubi/Teacher_APP_API | 1bafbccbbb3f8a9cc4b396bdd91e0d8c8e9a17dc | [
"MIT"
] | 4 | 2021-03-19T02:10:15.000Z | 2022-02-10T09:23:23.000Z | teacher_app/apps/classes/views/classviews.py | Darius-Ndubi/Teacher_APP_API | 1bafbccbbb3f8a9cc4b396bdd91e0d8c8e9a17dc | [
"MIT"
] | null | null | null | from rest_framework import status
from rest_framework.generics import (
CreateAPIView,
RetrieveAPIView,
UpdateAPIView
)
from rest_framework.permissions import (
IsAuthenticated
)
from rest_framework.response import Response
from teacher_app.apps.classes.serializers.class_serializer import (
ClassSe... | 27.86747 | 85 | 0.679204 |
3350e8f44e29e516575b2c92833889acb540c31f | 2,727 | py | Python | testapp/app.py | stevelittlefish/easyforms | 7944b83ec94a29ca55777d16536e13cbf8f6996f | [
"Apache-2.0"
] | 5 | 2017-04-27T09:08:33.000Z | 2020-08-25T21:54:56.000Z | testapp/app.py | stevelittlefish/easyforms | 7944b83ec94a29ca55777d16536e13cbf8f6996f | [
"Apache-2.0"
] | 8 | 2021-01-15T15:42:44.000Z | 2022-01-13T00:41:20.000Z | testapp/app.py | stevelittlefish/easyforms | 7944b83ec94a29ca55777d16536e13cbf8f6996f | [
"Apache-2.0"
] | null | null | null | """
App factory function
"""
import logging
import datetime
import traceback
from flask import Flask, render_template
import jinja2
from littlefish import timetool
import flaskfilemanager
from main import main
import sessionutil
__author__ = 'Stephen Brown (Little Fish Solutions LTD)'
CACHE_BUSTER = int(timetool.u... | 30.988636 | 96 | 0.599927 |
3350f8d9f205d8de831fe39af31b6f155eb1f099 | 12,136 | py | Python | soco/alarms.py | gitter-badger/SoCo | 65977466057748ea522a6d8b7f2a649091485a07 | [
"MIT"
] | 28 | 2020-04-24T17:32:33.000Z | 2021-12-28T23:45:16.000Z | soco/alarms.py | gitter-badger/SoCo | 65977466057748ea522a6d8b7f2a649091485a07 | [
"MIT"
] | 11 | 2020-04-28T15:57:39.000Z | 2022-01-07T09:32:10.000Z | soco/alarms.py | gitter-badger/SoCo | 65977466057748ea522a6d8b7f2a649091485a07 | [
"MIT"
] | 3 | 2021-08-10T11:56:14.000Z | 2022-01-13T04:19:03.000Z | # -*- coding: utf-8 -*-
# Disable while we have Python 2.x compatability
# pylint: disable=useless-object-inheritance
"""This module contains classes relating to Sonos Alarms."""
from __future__ import unicode_literals
import logging
import re
import weakref
from datetime import datetime
from . import discovery
fr... | 37.226994 | 79 | 0.58998 |
33510fc3cee16677efd83f748833ca6032a78e4f | 5,914 | py | Python | tf_verify/refine_activation.py | Neelanjana314/eran | 4465000ac85781f2e3663683432c7525e94dc59a | [
"Apache-2.0"
] | 6 | 2022-03-03T23:50:02.000Z | 2022-03-29T05:58:47.000Z | tf_verify/refine_activation.py | Neelanjana314/eran | 4465000ac85781f2e3663683432c7525e94dc59a | [
"Apache-2.0"
] | null | null | null | tf_verify/refine_activation.py | Neelanjana314/eran | 4465000ac85781f2e3663683432c7525e94dc59a | [
"Apache-2.0"
] | null | null | null | """
Copyright 2020 ETH Zurich, Secure, Reliable, and Intelligent Systems Lab
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... | 41.943262 | 195 | 0.636625 |
335122d74cfdaa6059c25e75b59b7aab62066341 | 1,382 | py | Python | data/Super_user/S2_loop.py | jdlarsen-UA/LB-colloids | 92ad3cc8a08e8bdf4f468e55a3f5cf7bcc319a67 | [
"BSD-3-Clause"
] | 1 | 2020-09-17T02:45:12.000Z | 2020-09-17T02:45:12.000Z | data/Super_user/S2_loop.py | Gweiqi/LB-colloids | 92ad3cc8a08e8bdf4f468e55a3f5cf7bcc319a67 | [
"BSD-3-Clause"
] | null | null | null | data/Super_user/S2_loop.py | Gweiqi/LB-colloids | 92ad3cc8a08e8bdf4f468e55a3f5cf7bcc319a67 | [
"BSD-3-Clause"
] | 3 | 2019-12-28T21:06:42.000Z | 2020-09-17T02:45:10.000Z | from lb_colloids import LBImage
from lb_colloids import LB2DModel
import matplotlib.pyplot as plt
from lb_colloids import cIO
from lb_colloids import ColloidModel
import os
path = os.path.dirname(os.path.realpath(__file__))
imgname = os.path.join(path, "Synth100_2.png")
nlayers = 5
solidvx = 0
fluidvx = 253
# NaCl ... | 25.592593 | 77 | 0.664978 |
33513b74244610abe090206f9266c9ffdf916bc8 | 12,397 | py | Python | impacket/dcerpc/v5/dcom/scmp.py | black-security/impacket3 | 5b6145b3f511d4f7cddaba64cf150b109113afea | [
"Apache-1.1"
] | null | null | null | impacket/dcerpc/v5/dcom/scmp.py | black-security/impacket3 | 5b6145b3f511d4f7cddaba64cf150b109113afea | [
"Apache-1.1"
] | null | null | null | impacket/dcerpc/v5/dcom/scmp.py | black-security/impacket3 | 5b6145b3f511d4f7cddaba64cf150b109113afea | [
"Apache-1.1"
] | 1 | 2022-01-28T00:53:41.000Z | 2022-01-28T00:53:41.000Z | # Copyright (c) 2003-2014 CORE Security Technologies
#
# This software is provided under under a slightly modified version
# of the Apache Software License. See the accompanying LICENSE file
# for more information.
#
# Author: Alberto Solino
#
# Description:
# [MS-SCMP]: Shadow Copy Management Protocol Interface impl... | 31.951031 | 164 | 0.63838 |
335181e2cc46a7cf4354c9c72bc1bafaf1f54d63 | 17,406 | py | Python | asyncpraw/models/reddit/redditor.py | Lordshinjo/asyncpraw | d94d89a992d9b5b300439ea6884a9df1d95511e2 | [
"BSD-2-Clause"
] | 72 | 2020-07-14T02:02:21.000Z | 2022-03-15T13:10:02.000Z | asyncpraw/models/reddit/redditor.py | Lordshinjo/asyncpraw | d94d89a992d9b5b300439ea6884a9df1d95511e2 | [
"BSD-2-Clause"
] | 68 | 2020-07-16T05:29:43.000Z | 2022-03-14T12:04:56.000Z | asyncpraw/models/reddit/redditor.py | Lordshinjo/asyncpraw | d94d89a992d9b5b300439ea6884a9df1d95511e2 | [
"BSD-2-Clause"
] | 19 | 2020-07-22T15:34:30.000Z | 2022-03-27T20:28:46.000Z | """Provide the Redditor class."""
from json import dumps
from typing import TYPE_CHECKING, Any, AsyncGenerator, Dict, List, Optional, Union
from ...const import API_PATH
from ...util.cache import cachedproperty
from ..listing.mixins import RedditorListingMixin
from ..util import stream_generator
from .base import Redd... | 35.022133 | 88 | 0.581007 |
3351a2db01e2a352fd6d3a83498c77bb81f641c6 | 1,370 | py | Python | tests/func/test_update.py | 0LL13/person | 3b9d43c7b5c1452fd6d28ad50f1831dfb4c4fa62 | [
"MIT"
] | null | null | null | tests/func/test_update.py | 0LL13/person | 3b9d43c7b5c1452fd6d28ad50f1831dfb4c4fa62 | [
"MIT"
] | 12 | 2020-09-09T07:33:38.000Z | 2020-10-01T03:28:44.000Z | tests/func/test_update.py | 0LL13/person | 3b9d43c7b5c1452fd6d28ad50f1831dfb4c4fa62 | [
"MIT"
] | 2 | 2020-09-01T07:49:38.000Z | 2020-09-12T07:50:27.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# test_update.py
"""Tests the update function of mop_tinyDB."""
def test_update_party_entry(db_with_3_mops):
"""Test update_mop(field="party_entry", value="2010") updates mop's data.""" # noqa
db = db_with_3_mops
field = "party_entry"
value = "2010"
m... | 32.619048 | 90 | 0.654745 |
3351db618bca2cc510544a3ffcb52c14f8fcb271 | 9,771 | py | Python | src/rubrix/server/tasks/commons/api/model.py | sakares/rubrix | 791ffb29815b5d24f2bbbb0fa422f85f8b30098f | [
"Apache-2.0"
] | null | null | null | src/rubrix/server/tasks/commons/api/model.py | sakares/rubrix | 791ffb29815b5d24f2bbbb0fa422f85f8b30098f | [
"Apache-2.0"
] | null | null | null | src/rubrix/server/tasks/commons/api/model.py | sakares/rubrix | 791ffb29815b5d24f2bbbb0fa422f85f8b30098f | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2021-present, the Recognai S.L. team.
#
# 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 ... | 27.758523 | 106 | 0.662675 |
3351df613e44da976827a47f76360b0321da91d4 | 5,600 | py | Python | st2actions/st2actions/runners/__init__.py | UbuntuEvangelist/st2 | 36af04f2caa03b396fb8ab00fd6d700e827fda8d | [
"Apache-2.0"
] | null | null | null | st2actions/st2actions/runners/__init__.py | UbuntuEvangelist/st2 | 36af04f2caa03b396fb8ab00fd6d700e827fda8d | [
"Apache-2.0"
] | null | null | null | st2actions/st2actions/runners/__init__.py | UbuntuEvangelist/st2 | 36af04f2caa03b396fb8ab00fd6d700e827fda8d | [
"Apache-2.0"
] | 13 | 2017-01-12T11:07:20.000Z | 2019-04-19T09:55:49.000Z | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | 30.434783 | 96 | 0.655893 |
3351f508e5e233e0cd7517d3088529003dbaf93c | 357 | py | Python | tools/start.py | suvajitgupta/Tasks | 7cea23f7e317a0c4b3f5c3536753c2fd73a1c842 | [
"CC-BY-3.0"
] | 4 | 2015-07-17T17:27:42.000Z | 2016-02-01T22:53:31.000Z | tools/start.py | suvajitgupta/Tasks | 7cea23f7e317a0c4b3f5c3536753c2fd73a1c842 | [
"CC-BY-3.0"
] | 1 | 2018-03-30T07:16:45.000Z | 2018-03-30T07:16:45.000Z | tools/start.py | suvajitgupta/Tasks | 7cea23f7e317a0c4b3f5c3536753c2fd73a1c842 | [
"CC-BY-3.0"
] | 1 | 2019-10-23T11:30:21.000Z | 2019-10-23T11:30:21.000Z | from helpers import multiserve
import os.path
multiserve.setBase(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
commands = [
multiserve.relative(""),
]
def run(port):
if port:
commands.append(["sc-server", "--port", "%s" % port])
else:
commands.append(["sc-server"])
multiserve.run(comma... | 18.789474 | 79 | 0.672269 |
3352173cedd5a978e8ceaa290bcc98d16edf8e48 | 6,279 | py | Python | build/lib/events/views.py | aswinzz/django-events-rest-framework | f87358b7e416f3d8bbe870da2f56babbb98d741a | [
"MIT"
] | 7 | 2018-06-18T20:30:26.000Z | 2021-01-21T19:16:25.000Z | build/lib/events/views.py | aswinzz/django-events-rest-framework | f87358b7e416f3d8bbe870da2f56babbb98d741a | [
"MIT"
] | null | null | null | build/lib/events/views.py | aswinzz/django-events-rest-framework | f87358b7e416f3d8bbe870da2f56babbb98d741a | [
"MIT"
] | 1 | 2020-01-29T15:42:46.000Z | 2020-01-29T15:42:46.000Z | from django.shortcuts import render
# Create your views here.
from .models import Events,Occurrences
from rest_framework.views import APIView
from rest_framework import permissions, status
from rest_framework.decorators import (api_view,
permission_classes,
... | 43.909091 | 74 | 0.503106 |
3352417b6a98e81f30bf2b4fbe39c07421f4d31a | 1,367 | py | Python | python3/dash_apps/dash_for_beginners_datacamp.py | Nahid-Hassan/code-snippets | 24bd4b81564887822a0801a696001fcbeb6a7a75 | [
"MIT"
] | 2 | 2020-09-29T04:09:41.000Z | 2020-10-18T13:33:36.000Z | python3/dash_apps/dash_for_beginners_datacamp.py | Nahid-Hassan/code-snippets | 24bd4b81564887822a0801a696001fcbeb6a7a75 | [
"MIT"
] | null | null | null | python3/dash_apps/dash_for_beginners_datacamp.py | Nahid-Hassan/code-snippets | 24bd4b81564887822a0801a696001fcbeb6a7a75 | [
"MIT"
] | 1 | 2021-12-26T04:55:55.000Z | 2021-12-26T04:55:55.000Z | import dash
import dash_core_components as dcc
import dash_html_components as html
import pandas as pd
import plotly.graph_objs as go
app = dash.Dash()
df = pd.read_csv(
'https://gist.githubusercontent.com/chriddyp/' +
'5d1ea79569ed194d432e56108a04d188/raw/' +
'a9f9e8076b837d541398e999dcbac2b2826a81f8/' +... | 29.085106 | 66 | 0.4594 |
335253e252d532ece61f5093bf4fb04f88c2600e | 2,622 | py | Python | benchmarks/my_hook.py | jwenjian/naz | 905ce81703e5bb0068915d48e72fc9dca8cda4ab | [
"MIT"
] | null | null | null | benchmarks/my_hook.py | jwenjian/naz | 905ce81703e5bb0068915d48e72fc9dca8cda4ab | [
"MIT"
] | null | null | null | benchmarks/my_hook.py | jwenjian/naz | 905ce81703e5bb0068915d48e72fc9dca8cda4ab | [
"MIT"
] | null | null | null | import asyncio
import functools
import concurrent
import naz
import prometheus_client
class BenchmarksHook(naz.hooks.BaseHook):
"""
This is an implementation of BaseHook.
When this hook is called by `naz` it sends metrics to prometheus.
"""
def __init__(self) -> None:
self.registry = p... | 36.416667 | 129 | 0.651411 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.