hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
56684573a35ded67e1d51bead88cbf8a70a5d65c | 5,863 | py | Python | django/views/generic/list.py | vzuuum/django | b282fb06ca5d483f0166e690cbce8073940323d5 | [
"BSD-3-Clause"
] | 27 | 2015-02-11T16:31:43.000Z | 2021-12-18T04:24:19.000Z | django/views/generic/list.py | vzuuum/django | b282fb06ca5d483f0166e690cbce8073940323d5 | [
"BSD-3-Clause"
] | 1 | 2022-02-11T15:34:08.000Z | 2022-02-11T15:34:08.000Z | django/views/generic/list.py | jamespacileo/django | 9d3f86c72f5d22113b8cb5cd006abb9297f2fd4e | [
"BSD-3-Clause"
] | 14 | 2015-12-27T20:19:14.000Z | 2020-12-14T01:41:22.000Z | import re
from django.core.paginator import Paginator, InvalidPage
from django.core.exceptions import ImproperlyConfigured
from django.http import Http404
from django.utils.encoding import smart_str
from django.utils.translation import ugettext as _
from django.views.generic.base import TemplateResponseMixin, View
c... | 37.583333 | 119 | 0.618796 |
81439892e63ea2bed4312e5751486a4f8918f1b5 | 16,482 | py | Python | backend/server/data_anndata/anndata_adaptor.py | ihnorton/cellxgene | 28b526b3fc75a04c03dea29093e5de29b5bc6e01 | [
"MIT"
] | null | null | null | backend/server/data_anndata/anndata_adaptor.py | ihnorton/cellxgene | 28b526b3fc75a04c03dea29093e5de29b5bc6e01 | [
"MIT"
] | 7 | 2021-01-07T19:20:57.000Z | 2021-06-15T18:17:55.000Z | backend/server/data_anndata/anndata_adaptor.py | ihnorton/cellxgene | 28b526b3fc75a04c03dea29093e5de29b5bc6e01 | [
"MIT"
] | null | null | null | import warnings
from datetime import datetime
import anndata
import numpy as np
from packaging import version
from pandas.core.dtypes.dtypes import CategoricalDtype
from scipy import sparse
from server_timing import Timing as ServerTiming
import backend.common.compute.diffexp_generic as diffexp_generic
from backend.c... | 44.545946 | 118 | 0.620798 |
4586055c55a866052b5271011ce8fc326fe0c676 | 2,086 | py | Python | nets/DDI_edge_classification/gin_net.py | xyc1207/benchmarking-gnns | 9ba25a2825e8c155a93730d6e8f8752090292942 | [
"MIT"
] | 1,809 | 2020-02-28T11:13:52.000Z | 2022-03-31T11:44:58.000Z | nets/DDI_edge_classification/gin_net.py | xyc1207/benchmarking-gnns | 9ba25a2825e8c155a93730d6e8f8752090292942 | [
"MIT"
] | 61 | 2020-03-08T21:24:25.000Z | 2022-03-25T21:48:17.000Z | nets/DDI_edge_classification/gin_net.py | xyc1207/benchmarking-gnns | 9ba25a2825e8c155a93730d6e8f8752090292942 | [
"MIT"
] | 348 | 2020-03-03T17:00:21.000Z | 2022-03-31T03:09:56.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
import dgl
"""
GIN: Graph Isomorphism Networks
HOW POWERFUL ARE GRAPH NEURAL NETWORKS? (Keyulu Xu, Weihua Hu, Jure Leskovec and Stefanie Jegelka, ICLR 2019)
https://arxiv.org/pdf/1810.00826.pdf
"""
from layers.gin_layer import GINLayer, A... | 33.111111 | 113 | 0.598274 |
89e00af270a0209d8d8802137d3ec9dfd3d43db8 | 16,459 | py | Python | pandas/tests/window/test_numba.py | rendner/pandas | 47494a48edf25d5a49b0fb5b896b454c15c83595 | [
"BSD-3-Clause"
] | 1 | 2019-11-01T08:44:40.000Z | 2019-11-01T08:44:40.000Z | pandas/tests/window/test_numba.py | sdrees/pandas | bef454f0893efe2fa5e49317635f89c03467d16e | [
"BSD-3-Clause"
] | null | null | null | pandas/tests/window/test_numba.py | sdrees/pandas | bef454f0893efe2fa5e49317635f89c03467d16e | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import pytest
from pandas.compat import (
is_ci_environment,
is_platform_mac,
is_platform_windows,
)
from pandas.errors import NumbaUtilError
import pandas.util._test_decorators as td
from pandas import (
DataFrame,
Series,
option_context,
to_datetime,
)
import pandas._t... | 35.168803 | 88 | 0.57701 |
588c5577200619a2249fe28af33d4faa87e5b8d7 | 32 | py | Python | code/abc159_c_01.py | KoyanagiHitoshi/AtCoder | 731892543769b5df15254e1f32b756190378d292 | [
"MIT"
] | 3 | 2019-08-16T16:55:48.000Z | 2021-04-11T10:21:40.000Z | code/abc159_c_01.py | KoyanagiHitoshi/AtCoder | 731892543769b5df15254e1f32b756190378d292 | [
"MIT"
] | null | null | null | code/abc159_c_01.py | KoyanagiHitoshi/AtCoder | 731892543769b5df15254e1f32b756190378d292 | [
"MIT"
] | null | null | null | L = int(input())
print((L/3)**3) | 16 | 16 | 0.53125 |
2a7491aa50de5b897a54c64458e17087567a855c | 765 | py | Python | app/core/admin.py | kfahmi/recipe-app-api | fa678005a3615bff92b94d5e852526fcb00793ed | [
"MIT"
] | null | null | null | app/core/admin.py | kfahmi/recipe-app-api | fa678005a3615bff92b94d5e852526fcb00793ed | [
"MIT"
] | null | null | null | app/core/admin.py | kfahmi/recipe-app-api | fa678005a3615bff92b94d5e852526fcb00793ed | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from core import models
from django.utils.translation import gettext as _
class UserAdmin(BaseUserAdmin):
ordering = ['id']
list_display = ['email', 'name']
fieldsets = (
(None, {'fields': ('email', '... | 27.321429 | 65 | 0.562092 |
50482da70ec5161c1cd8359d91c9ddd3e89b4f59 | 14,528 | py | Python | tools/testrunner/standard_runner.py | dongAxis/to_be_a_v8_master | a63f7201063bf950483e373345b169f349dc9c4f | [
"BSD-3-Clause"
] | 192 | 2020-07-15T23:59:19.000Z | 2021-03-07T10:45:16.000Z | tools/testrunner/standard_runner.py | maldiohead/v8 | 03ff1b6dd6214d9c2f48c059184f26c4166a12ed | [
"BSD-3-Clause"
] | 333 | 2020-07-15T17:06:05.000Z | 2021-03-15T12:13:09.000Z | tools/testrunner/standard_runner.py | maldiohead/v8 | 03ff1b6dd6214d9c2f48c059184f26c4166a12ed | [
"BSD-3-Clause"
] | 25 | 2020-07-16T06:12:02.000Z | 2021-01-07T13:33:51.000Z | #!/usr/bin/env python
#
# Copyright 2017 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# for py2/py3 compatibility
from __future__ import absolute_import
from __future__ import print_function
from functools import redu... | 36.411028 | 79 | 0.655218 |
70d579e1c62e71a119a2a28d9d6e0073c1cf4b6c | 6,370 | py | Python | tests/integration/test_crossbar_integration.py | simonsobs/ocs | 24c6a617ea3038fccdb40bfd602ffd541415a476 | [
"BSD-2-Clause"
] | 9 | 2019-09-02T14:17:06.000Z | 2022-03-11T21:26:34.000Z | tests/integration/test_crossbar_integration.py | simonsobs/ocs | 24c6a617ea3038fccdb40bfd602ffd541415a476 | [
"BSD-2-Clause"
] | 158 | 2019-05-17T17:54:37.000Z | 2022-03-14T19:29:59.000Z | tests/integration/test_crossbar_integration.py | simonsobs/ocs | 24c6a617ea3038fccdb40bfd602ffd541415a476 | [
"BSD-2-Clause"
] | 1 | 2021-07-16T13:21:45.000Z | 2021-07-16T13:21:45.000Z | import os
import time
import pytest
import docker
from ocs.ocs_client import OCSClient
from integration.util import create_crossbar_fixture, restart_crossbar
try:
from so3g import hk
except ModuleNotFoundError as e:
print(f"Unable to import so3g: {e}")
pytest_plugins = ("docker_compose",)
wait_for_crossb... | 32.5 | 116 | 0.693093 |
f80b894767bc980bcd80d52d0eaf67f37907b56b | 1,200 | py | Python | google/ads/googleads/v7/enums/types/operating_system_version_operator_type.py | wxxlouisa/google-ads-python | f24137966f6bfcb765a9b1fae79f2d23041825fe | [
"Apache-2.0"
] | 285 | 2018-10-05T16:47:58.000Z | 2022-03-31T00:58:39.000Z | google/ads/googleads/v7/enums/types/operating_system_version_operator_type.py | wxxlouisa/google-ads-python | f24137966f6bfcb765a9b1fae79f2d23041825fe | [
"Apache-2.0"
] | 425 | 2018-09-10T13:32:41.000Z | 2022-03-31T14:50:05.000Z | google/ads/googleads/v7/enums/types/operating_system_version_operator_type.py | wxxlouisa/google-ads-python | f24137966f6bfcb765a9b1fae79f2d23041825fe | [
"Apache-2.0"
] | 369 | 2018-11-28T07:01:00.000Z | 2022-03-28T09:53:22.000Z | # -*- 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... | 31.578947 | 74 | 0.725 |
ab1ee40a80cf389321530bc7d45de4e91765dc35 | 642 | py | Python | SublimeText3_3176/Data/Packages/SideBarEnhancements-st3/StatusBarFileSize.py | xiexie1993/Tool_Sublime_Text3_for_Windows | 51b11ac2d7df36242d68b3b5f85af5f2a8c550e2 | [
"RSA-MD"
] | null | null | null | SublimeText3_3176/Data/Packages/SideBarEnhancements-st3/StatusBarFileSize.py | xiexie1993/Tool_Sublime_Text3_for_Windows | 51b11ac2d7df36242d68b3b5f85af5f2a8c550e2 | [
"RSA-MD"
] | null | null | null | SublimeText3_3176/Data/Packages/SideBarEnhancements-st3/StatusBarFileSize.py | xiexie1993/Tool_Sublime_Text3_for_Windows | 51b11ac2d7df36242d68b3b5f85af5f2a8c550e2 | [
"RSA-MD"
] | null | null | null | import sublime, sublime_plugin
from .hurry.filesize import size
from os.path import getsize
s = {}
def plugin_loaded():
global s
s = sublime.load_settings('Side Bar.sublime-settings')
class StatusBarFileSize(sublime_plugin.EventListener):
def on_activated_async(self, v):
if s.get('statusbar_file_size') and v.f... | 22.137931 | 55 | 0.711838 |
08583e4abfae956ddbea280770246e6894b6bfb6 | 1,159 | py | Python | python-stdlib/textwrap/setup.py | mkomon/micropython-lib | 25ebe4a261e7b1c7c8471bceef2fd0e12837cdd2 | [
"PSF-2.0"
] | 1,556 | 2015-01-18T01:10:21.000Z | 2022-03-31T23:27:33.000Z | python-stdlib/textwrap/setup.py | Li-Lian1069/micropython-lib | 1dfca5ad343b2841965df6c4e59f92d6d94a24bd | [
"PSF-2.0"
] | 414 | 2015-01-01T09:01:22.000Z | 2022-03-31T15:08:24.000Z | python-stdlib/textwrap/setup.py | Li-Lian1069/micropython-lib | 1dfca5ad343b2841965df6c4e59f92d6d94a24bd | [
"PSF-2.0"
] | 859 | 2015-02-05T13:23:00.000Z | 2022-03-28T02:28:16.000Z | import sys
# Remove current dir from sys.path, otherwise setuptools will peek up our
# module instead of system's.
sys.path.pop(0)
from setuptools import setup
sys.path.append("..")
import sdist_upip
setup(
name="micropython-textwrap",
version="3.4.2-1",
description="CPython textwrap module ported to Mic... | 46.36 | 500 | 0.761001 |
083aacf4e285a49645e47d28bca7b62b1f3db199 | 1,704 | py | Python | logreg/models.py | ben741863140/cfsystem | 227e269f16533719251962f4d8caee8b51091d2f | [
"Apache-2.0"
] | 4 | 2018-02-22T01:59:07.000Z | 2020-07-09T06:28:46.000Z | logreg/models.py | ben741863140/cfsystem | 227e269f16533719251962f4d8caee8b51091d2f | [
"Apache-2.0"
] | null | null | null | logreg/models.py | ben741863140/cfsystem | 227e269f16533719251962f4d8caee8b51091d2f | [
"Apache-2.0"
] | null | null | null | # _*_ utf-8 _*_
from django.db import models
from django.contrib.auth.models import AbstractUser
class Pair(object):
def __init__(self, num, str):
self.val = num
self.tag = str
class User(AbstractUser):
Choices = []
for i in range(1,99):
if i < 10:
Choices.append(Pair... | 40.571429 | 113 | 0.63615 |
d5d25bcee1f295948e3bfdd7b5b4877706a23488 | 812 | py | Python | sms/sms.py | mrprompt/bicsons | 664eeadab77f1fd1792d3e4b93df2305fb89e182 | [
"MIT"
] | 5 | 2017-11-16T11:49:24.000Z | 2020-01-15T15:59:49.000Z | sms/sms.py | mrprompt/bicsons | 664eeadab77f1fd1792d3e4b93df2305fb89e182 | [
"MIT"
] | null | null | null | sms/sms.py | mrprompt/bicsons | 664eeadab77f1fd1792d3e4b93df2305fb89e182 | [
"MIT"
] | null | null | null | """
Envio de SMS
"""
from random import randint
from datetime import datetime
from .driver import nexmo, totalvoice
def sms(numeros, exchange, mensagem):
"""
Envia o sms com o driver escolhido aleatoriamente
"""
for numero in numeros:
now = datetime.now().strftime("%H:%M")
if now in nu... | 30.074074 | 86 | 0.568966 |
1c593320ca76f8fa4205484ddde26f8259dff40c | 16,201 | py | Python | tests/base_tests.py | Ofeknielsen/incubator-superset | 8a58afb8f53692d772efca9f3783b393a94d85d8 | [
"Apache-2.0"
] | 1 | 2021-04-11T04:25:57.000Z | 2021-04-11T04:25:57.000Z | tests/base_tests.py | Ofeknielsen/incubator-superset | 8a58afb8f53692d772efca9f3783b393a94d85d8 | [
"Apache-2.0"
] | 2 | 2020-06-25T17:16:07.000Z | 2020-08-06T23:16:26.000Z | tests/base_tests.py | Ofeknielsen/incubator-superset | 8a58afb8f53692d772efca9f3783b393a94d85d8 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 34.84086 | 88 | 0.628974 |
b149d6d12a73073e91f6da11bcdc4a6c6aed77bf | 901 | py | Python | rubicon_ml/ui/views/header.py | jeklein/rubicon-ml | a4a3c4d3504cb251597890dbfa8302b0bde06f30 | [
"Apache-2.0"
] | 42 | 2021-02-23T23:30:49.000Z | 2021-05-01T02:54:03.000Z | rubicon_ml/ui/views/header.py | jeklein/rubicon-ml | a4a3c4d3504cb251597890dbfa8302b0bde06f30 | [
"Apache-2.0"
] | 56 | 2021-05-13T13:47:50.000Z | 2022-03-24T13:46:49.000Z | rubicon_ml/ui/views/header.py | jeklein/rubicon-ml | a4a3c4d3504cb251597890dbfa8302b0bde06f30 | [
"Apache-2.0"
] | 9 | 2021-02-23T23:30:51.000Z | 2021-04-24T16:42:28.000Z | import dash_html_components as html
def make_header_layout():
"""The html layout for the dashboard's header view."""
return html.Div(
id="header",
className="header",
children=[
html.Div(id="title", className="header--project", children="rubicon-ml"),
html.Div(... | 30.033333 | 85 | 0.419534 |
b3bd4f9a9e00e0b53614f2e01d2961576c1815dd | 3,175 | py | Python | modules/audio_processing/test/py_quality_assessment/quality_assessment/eval_scores_unittest.py | Aexyn/webrtc2 | daea5bf2deb843567a792f22ea2047a037e09d78 | [
"DOC",
"BSD-3-Clause"
] | 2 | 2018-01-16T13:29:45.000Z | 2018-08-10T09:15:23.000Z | modules/audio_processing/test/py_quality_assessment/quality_assessment/eval_scores_unittest.py | Aexyn/webrtc2 | daea5bf2deb843567a792f22ea2047a037e09d78 | [
"DOC",
"BSD-3-Clause"
] | null | null | null | modules/audio_processing/test/py_quality_assessment/quality_assessment/eval_scores_unittest.py | Aexyn/webrtc2 | daea5bf2deb843567a792f22ea2047a037e09d78 | [
"DOC",
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All contributing project au... | 36.918605 | 76 | 0.750866 |
b82e7b57bb96d7c75d7ad4753a65bde3af6fbc42 | 11,689 | py | Python | vcpp-data-analysis/vcpp-full-data.py | fcmeyer/meyer-psychcode | 5024d790b7af5b6fb21ea3f70decbe488e5e3161 | [
"MIT"
] | null | null | null | vcpp-data-analysis/vcpp-full-data.py | fcmeyer/meyer-psychcode | 5024d790b7af5b6fb21ea3f70decbe488e5e3161 | [
"MIT"
] | null | null | null | vcpp-data-analysis/vcpp-full-data.py | fcmeyer/meyer-psychcode | 5024d790b7af5b6fb21ea3f70decbe488e5e3161 | [
"MIT"
] | null | null | null | #####################################################################
## CPP Trial Data Parser #
## #
## Written by Francisco Meyer (fcmeyer@uchicago.edu) #
## Last edited: Friday, August 28 2015 ... | 29.667513 | 80 | 0.593977 |
600e8f3368a07fa38ce7ac9e5099ff913bc9a718 | 237 | py | Python | root/ilikeit/MySQLCrashCourse/dbcom/tests/test_config.py | ChyiYaqing/chyidlTutorial | 77e7f6f84f21537a58a8a8a42e31cf2e3dd31996 | [
"MIT"
] | 5 | 2018-10-17T05:57:39.000Z | 2021-07-05T15:38:24.000Z | root/ilikeit/MySQLCrashCourse/dbcom/tests/test_config.py | ChyiYaqing/chyidlTutorial | 77e7f6f84f21537a58a8a8a42e31cf2e3dd31996 | [
"MIT"
] | 2 | 2021-04-14T00:48:43.000Z | 2021-04-14T02:20:50.000Z | root/ilikeit/MySQLCrashCourse/dbcom/tests/test_config.py | ChyiYaqing/chyidlTutorial | 77e7f6f84f21537a58a8a8a42e31cf2e3dd31996 | [
"MIT"
] | 3 | 2019-03-02T14:36:19.000Z | 2022-03-18T10:12:09.000Z | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
# MySQL & MariaDB
mysql_host='192.168.82.56'
mysql_port=3306
mysql_user='xxx'
mysql_passwd='xxx'
# MsSQL
mssql_host='192.168.188.20'
mssql_port=1433
mssql_user='xxx'
mssql_passwd='xxxxxx'
| 14.8125 | 27 | 0.721519 |
58e46a118d48bf2efdf4c14601534eb91d496b0a | 4,179 | py | Python | tests/warehouses/athena_fixture.py | udemy/soda-sql | 53dd2218770c74367787f1d85ee0d48d498b51eb | [
"Apache-2.0"
] | null | null | null | tests/warehouses/athena_fixture.py | udemy/soda-sql | 53dd2218770c74367787f1d85ee0d48d498b51eb | [
"Apache-2.0"
] | null | null | null | tests/warehouses/athena_fixture.py | udemy/soda-sql | 53dd2218770c74367787f1d85ee0d48d498b51eb | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Soda
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
#... | 40.572816 | 119 | 0.692989 |
2d9a51d557a41528d1cbef170c56443d5bf7b0ba | 1,167 | py | Python | setup.py | pappacena/pysockmmsg | 28018cd9998e0aad9fe5fea601442d81109f903d | [
"Unlicense"
] | 1 | 2021-09-12T18:20:15.000Z | 2021-09-12T18:20:15.000Z | setup.py | pappacena/pysockmmsg | 28018cd9998e0aad9fe5fea601442d81109f903d | [
"Unlicense"
] | null | null | null | setup.py | pappacena/pysockmmsg | 28018cd9998e0aad9fe5fea601442d81109f903d | [
"Unlicense"
] | null | null | null | """Python setup.py for pysockmmsg package"""
import io
import os
from setuptools import find_packages, setup
def read(*paths, **kwargs):
"""Read the contents of a text file safely.
>>> read("pysockmmsg", "VERSION")
'0.1.0'
>>> read("README.md")
...
"""
content = ""
with io.open(
... | 26.522727 | 72 | 0.635818 |
81214be47ffdfdde1b96c43cd6d4f3715c8add92 | 1,393 | py | Python | capture_image.py | 6abi/pi08 | fa49d256569ba359ecde0f82a8f03d01db6d6a65 | [
"MIT"
] | null | null | null | capture_image.py | 6abi/pi08 | fa49d256569ba359ecde0f82a8f03d01db6d6a65 | [
"MIT"
] | null | null | null | capture_image.py | 6abi/pi08 | fa49d256569ba359ecde0f82a8f03d01db6d6a65 | [
"MIT"
] | null | null | null | import cv2
def capture_image():
key = cv2. waitKey(1)
webcam = cv2.VideoCapture(0)
while True:
try:
check, frame = webcam.read()
print(check) #prints true as long as the webcam is running
print(frame) #prints matrix values of each framecd
cv2.imshow... | 34.825 | 89 | 0.487437 |
76c73f47fa14616b9aebc7dcb9af95f1d57decfd | 18,156 | py | Python | barchybrid/src/arc_hybrid.py | maxtrem/uuparser | 989fc73b3a3a48b619d3d1ccf524f6c03882792f | [
"Apache-2.0"
] | null | null | null | barchybrid/src/arc_hybrid.py | maxtrem/uuparser | 989fc73b3a3a48b619d3d1ccf524f6c03882792f | [
"Apache-2.0"
] | null | null | null | barchybrid/src/arc_hybrid.py | maxtrem/uuparser | 989fc73b3a3a48b619d3d1ccf524f6c03882792f | [
"Apache-2.0"
] | null | null | null | from utils import ParseForest, read_conll, write_conll
from operator import itemgetter
from itertools import chain
import utils, time, random
import numpy as np
from copy import deepcopy
from collections import defaultdict
import json
class ArcHybridLSTM:
def __init__(self, vocab, options):
# import here ... | 41.546911 | 178 | 0.548909 |
f01e8ed041b397b41d4308164bae37880b106177 | 2,310 | py | Python | examples/map_reduce_cos_bucket.py | spitfiredd/pywren-ibm-cloud | 3bc0818ffc510b32770d695b16755c8980feaefd | [
"Apache-2.0"
] | null | null | null | examples/map_reduce_cos_bucket.py | spitfiredd/pywren-ibm-cloud | 3bc0818ffc510b32770d695b16755c8980feaefd | [
"Apache-2.0"
] | null | null | null | examples/map_reduce_cos_bucket.py | spitfiredd/pywren-ibm-cloud | 3bc0818ffc510b32770d695b16755c8980feaefd | [
"Apache-2.0"
] | null | null | null | """
Simple PyWren example using the map_reduce method which
runs a wordcount over all the objects inside the 'bucketname'
COS bucket.
This example processes some objects from COS. Be sure you have
a bucket with some data objects in your COS account. Then change
the value of the 'bucketname' variable to point to your b... | 31.216216 | 85 | 0.717749 |
82adad1bc50ed129e2d64425090595b8328d4c01 | 5,108 | py | Python | GetSylly.py | nicholascjones/get-sylly | b4410f5edcdad4ea7097b05075d94b61502df269 | [
"MIT"
] | null | null | null | GetSylly.py | nicholascjones/get-sylly | b4410f5edcdad4ea7097b05075d94b61502df269 | [
"MIT"
] | null | null | null | GetSylly.py | nicholascjones/get-sylly | b4410f5edcdad4ea7097b05075d94b61502df269 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
## GetSylly.py
## Nicholas Jones
## Course Project 2 -- Syllable Counter
#imports
import random
import string
#List Initialization for Syllable Counts
words = []
one = []
two = []
three = []
vowels = ['a','e','i','o','u']
vowels = set(vowels)
#functions
#reading words in from file
def ReadWo... | 17.613793 | 78 | 0.630579 |
22ee46dbb26f2d94100aa9f25ce8cc1cf30618fb | 55 | py | Python | social/backends/shopify.py | raccoongang/python-social-auth | 81c0a542d158772bd3486d31834c10af5d5f08b0 | [
"BSD-3-Clause"
] | 1,987 | 2015-01-01T16:12:45.000Z | 2022-03-29T14:24:25.000Z | social/backends/shopify.py | raccoongang/python-social-auth | 81c0a542d158772bd3486d31834c10af5d5f08b0 | [
"BSD-3-Clause"
] | 731 | 2015-01-01T22:55:25.000Z | 2022-03-10T15:07:51.000Z | virtual/lib/python3.6/site-packages/social/backends/shopify.py | dennismwaniki67/awards | 80ed10541f5f751aee5f8285ab1ad54cfecba95f | [
"MIT"
] | 1,082 | 2015-01-01T16:27:26.000Z | 2022-03-22T21:18:33.000Z | from social_core.backends.shopify import ShopifyOAuth2
| 27.5 | 54 | 0.890909 |
5f8e0f5f59cb336c89f2b8cf4047a222371be4f9 | 360 | py | Python | authlib/jose/rfc7515/__init__.py | YPCrumble/authlib | 782a0fced780849418dc2a869528d10387e24b65 | [
"BSD-3-Clause"
] | 3,172 | 2017-11-11T05:54:14.000Z | 2022-03-31T23:59:59.000Z | authlib/jose/rfc7515/__init__.py | YPCrumble/authlib | 782a0fced780849418dc2a869528d10387e24b65 | [
"BSD-3-Clause"
] | 397 | 2017-11-11T02:49:06.000Z | 2022-03-31T21:02:37.000Z | authlib/jose/rfc7515/__init__.py | YPCrumble/authlib | 782a0fced780849418dc2a869528d10387e24b65 | [
"BSD-3-Clause"
] | 387 | 2017-11-18T08:59:56.000Z | 2022-03-15T18:37:37.000Z | """
authlib.jose.rfc7515
~~~~~~~~~~~~~~~~~~~~~
This module represents a direct implementation of
JSON Web Signature (JWS).
https://tools.ietf.org/html/rfc7515
"""
from .jws import JsonWebSignature
from .models import JWSAlgorithm, JWSHeader, JWSObject
__all__ = [
'JsonWebSignature',
'JW... | 18.947368 | 54 | 0.655556 |
f59acd47ace51326ba84de036021763db2c8b4c9 | 3,710 | bzl | Python | tools/build_defs/repo/utils.bzl | sevki/bazel | b18915752a69fbbc6ed94e1710198167593565fc | [
"Apache-2.0"
] | 5 | 2019-01-10T09:41:11.000Z | 2020-07-15T12:02:22.000Z | tools/build_defs/repo/utils.bzl | sevki/bazel | b18915752a69fbbc6ed94e1710198167593565fc | [
"Apache-2.0"
] | 1 | 2020-01-19T03:55:41.000Z | 2020-01-19T03:55:41.000Z | tools/build_defs/repo/utils.bzl | sevki/bazel | b18915752a69fbbc6ed94e1710198167593565fc | [
"Apache-2.0"
] | 3 | 2019-05-05T01:52:36.000Z | 2020-11-04T03:16:14.000Z | # Copyright 2018 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | 41.685393 | 90 | 0.666846 |
7a5fe50932cdaed27ee4d95536d004d964f5ca1c | 12,827 | py | Python | autotest/test_gwt_moc3d01.py | mwtoews/modflow6 | 3426f524fba90b8b6186d09272226a941b97cef7 | [
"CC0-1.0"
] | null | null | null | autotest/test_gwt_moc3d01.py | mwtoews/modflow6 | 3426f524fba90b8b6186d09272226a941b97cef7 | [
"CC0-1.0"
] | null | null | null | autotest/test_gwt_moc3d01.py | mwtoews/modflow6 | 3426f524fba90b8b6186d09272226a941b97cef7 | [
"CC0-1.0"
] | 1 | 2020-09-01T18:43:19.000Z | 2020-09-01T18:43:19.000Z | import os
import sys
import numpy as np
try:
import pymake
except:
msg = "Error. Pymake package is not available.\n"
msg += "Try installing using the following command:\n"
msg += " pip install https://github.com/modflowpy/pymake/zipball/master"
raise Exception(msg)
try:
import flopy
except:
... | 30.252358 | 79 | 0.590473 |
79553202bd943a3745bcce095b9a9a6b3e58c3a1 | 4,307 | py | Python | word_knn/nlpl_retriever.py | rom1504/word-knn | 56cb113a8f843eaafec6200ec5ed6e88876edf12 | [
"MIT"
] | 4 | 2019-08-26T11:52:23.000Z | 2020-08-10T17:52:40.000Z | word_knn/nlpl_retriever.py | rom1504/word-knn | 56cb113a8f843eaafec6200ec5ed6e88876edf12 | [
"MIT"
] | 5 | 2019-08-26T00:20:36.000Z | 2020-08-10T12:37:51.000Z | word_knn/nlpl_retriever.py | rom1504/word-knn | 56cb113a8f843eaafec6200ec5ed6e88876edf12 | [
"MIT"
] | 1 | 2020-10-08T20:56:14.000Z | 2020-10-08T20:56:14.000Z | import numpy as np
import os.path
import os
from io import BytesIO
from zipfile import ZipFile
from urllib.request import urlopen
from word_knn.closest_words import inverse_dict
from word_knn.closest_words import ClosestWords
from word_knn.closest_words import build_knn_index
from pathlib import Path
home = str(Path.h... | 33.913386 | 117 | 0.634781 |
edb1aa04d75571b775e3705cbb84347e7d3bb6ef | 3,276 | py | Python | packages/syft/src/syft/core/node/common/permissions/permissions.py | jackbandy/PySyft | 0e20e90abab6a7a7ca672d6eedfa1e7f83c4981b | [
"Apache-2.0"
] | null | null | null | packages/syft/src/syft/core/node/common/permissions/permissions.py | jackbandy/PySyft | 0e20e90abab6a7a7ca672d6eedfa1e7f83c4981b | [
"Apache-2.0"
] | null | null | null | packages/syft/src/syft/core/node/common/permissions/permissions.py | jackbandy/PySyft | 0e20e90abab6a7a7ca672d6eedfa1e7f83c4981b | [
"Apache-2.0"
] | null | null | null | # future
from __future__ import annotations
# stdlib
from typing import Any
from typing import Optional
from typing import Type
# third party
from nacl.signing import VerifyKey
# relative
from ...abstract.node_service_interface import NodeServiceInterface
from ..node_service.generic_payload.syft_message import NewSy... | 30.055046 | 86 | 0.663614 |
96d2dd5abb670e68d0d1f2d3b073503feba2c0b6 | 12,676 | py | Python | stubs/stubs.py | zestyping/stubs | 4a5d2983361184537ffe607d10db4c6afd660016 | [
"Apache-2.0"
] | 1 | 2016-10-31T23:26:00.000Z | 2016-10-31T23:26:00.000Z | stubs/stubs.py | zestyping/stubs | 4a5d2983361184537ffe607d10db4c6afd660016 | [
"Apache-2.0"
] | null | null | null | stubs/stubs.py | zestyping/stubs | 4a5d2983361184537ffe607d10db4c6afd660016 | [
"Apache-2.0"
] | null | null | null | """Handy tools for setting up stubs and mocks.
This module exports two special objects, `stub` and `expect`, which can be
used to stub out functions or methods. To replace a function with a stub,
start a context block using `with`, then `stub` or `expect`, then the function
wrapped in square brackets. By default, th... | 37.064327 | 80 | 0.634427 |
082053fba2c9f13257a6f1081d9cb9b6601a4eee | 8 | py | Python | bad/listNonExistentList.py | Alberto42/Interpreter | a56c4d905672572734a8470ef607b66727489f15 | [
"BSD-3-Clause"
] | null | null | null | bad/listNonExistentList.py | Alberto42/Interpreter | a56c4d905672572734a8470ef607b66727489f15 | [
"BSD-3-Clause"
] | null | null | null | bad/listNonExistentList.py | Alberto42/Interpreter | a56c4d905672572734a8470ef607b66727489f15 | [
"BSD-3-Clause"
] | null | null | null | x = l[0] | 8 | 8 | 0.375 |
1b5e1b19455cd69a0ff98239d81029e9bb909e77 | 35,257 | py | Python | mars/dataframe/reduction/aggregation.py | BoxFishLab/mars | c2f53b74fd2bfaea918bf1f072a8927eb36e2038 | [
"Apache-2.0"
] | 1 | 2020-11-27T08:44:16.000Z | 2020-11-27T08:44:16.000Z | mars/dataframe/reduction/aggregation.py | BoxFishLab/mars | c2f53b74fd2bfaea918bf1f072a8927eb36e2038 | [
"Apache-2.0"
] | null | null | null | mars/dataframe/reduction/aggregation.py | BoxFishLab/mars | c2f53b74fd2bfaea918bf1f072a8927eb36e2038 | [
"Apache-2.0"
] | null | null | null | # Copyright 1999-2020 Alibaba Group Holding Ltd.
#
# 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 a... | 42.996341 | 110 | 0.565306 |
5f3e4a8bae4803790fd92f4957975f737c03a4df | 1,560 | py | Python | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/rds/apis/ModifyInstanceAzRequest.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | 14 | 2018-04-19T09:53:56.000Z | 2022-01-27T06:05:48.000Z | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/rds/apis/ModifyInstanceAzRequest.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | 15 | 2018-09-11T05:39:54.000Z | 2021-07-02T12:38:02.000Z | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/rds/apis/ModifyInstanceAzRequest.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | 33 | 2018-04-20T05:29:16.000Z | 2022-02-17T09:10:05.000Z | # coding=utf8
# Copyright 2018 JDCLOUD.COM
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | 33.913043 | 114 | 0.725641 |
5708edc9841ccdde4639c9912bb02934c8450a94 | 1,067 | py | Python | test/test_parser.py | mactov/nlpy | ad4131d9d8e7d5c5702b943234072ff52fd64ed6 | [
"MIT"
] | null | null | null | test/test_parser.py | mactov/nlpy | ad4131d9d8e7d5c5702b943234072ff52fd64ed6 | [
"MIT"
] | null | null | null | test/test_parser.py | mactov/nlpy | ad4131d9d8e7d5c5702b943234072ff52fd64ed6 | [
"MIT"
] | null | null | null | import unittest
import sys
sys.path.append('../')
from nlpy.parser import Parser
class TestParser(unittest.TestCase):
def setUp(self):
self.text = 'Hello, World! My name is Chris. What is your name?'
self.p = Parser(self.text)
def test_list_sentences(self):
result = ['Hello, World', '... | 36.793103 | 100 | 0.619494 |
fe2b717e30e3cb3dc50c1df78846a58bde9ca531 | 3,667 | py | Python | test/functional/interface_bitcoin_cli.py | JoffreyBourdieux/ApsioCoin | 6573a9ab4e6e302f99d203fe0e1e414adb1fd349 | [
"MIT"
] | null | null | null | test/functional/interface_bitcoin_cli.py | JoffreyBourdieux/ApsioCoin | 6573a9ab4e6e302f99d203fe0e1e414adb1fd349 | [
"MIT"
] | null | null | null | test/functional/interface_bitcoin_cli.py | JoffreyBourdieux/ApsioCoin | 6573a9ab4e6e302f99d203fe0e1e414adb1fd349 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test bitcoin-cli"""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util ... | 55.560606 | 160 | 0.707118 |
03277e46ead548df7a20c05d866636d06a399125 | 7,315 | py | Python | lib/urls_base.py | clouserw/olympia | 1d5755b08a526372ec66e6bc64ab636018181969 | [
"BSD-3-Clause"
] | 1 | 2017-07-14T19:22:39.000Z | 2017-07-14T19:22:39.000Z | lib/urls_base.py | clouserw/olympia | 1d5755b08a526372ec66e6bc64ab636018181969 | [
"BSD-3-Clause"
] | 6 | 2021-02-02T23:08:48.000Z | 2021-09-08T02:47:17.000Z | lib/urls_base.py | clouserw/olympia | 1d5755b08a526372ec66e6bc64ab636018181969 | [
"BSD-3-Clause"
] | null | null | null | from django.conf import settings
from django.conf.urls import include, patterns, url
from django.contrib import admin
from django.shortcuts import redirect, render
from django.views.i18n import javascript_catalog
from django.views.decorators.cache import cache_page
from amo.urlresolvers import reverse
from amo.utils i... | 31.260684 | 79 | 0.618455 |
4fda65b6e29e75ce48bb623b22e83dc5ee4a6118 | 407 | py | Python | source/interprocedural_analyses/taint/test/integration/recognized_callable_targets.py | rcramblit/pyre-check | fa15d2021ab1bf5b52aae8c09d1520e2b7bcf6c9 | [
"MIT"
] | 1 | 2021-05-17T23:13:52.000Z | 2021-05-17T23:13:52.000Z | source/interprocedural_analyses/taint/test/integration/recognized_callable_targets.py | rcramblit/pyre-check | fa15d2021ab1bf5b52aae8c09d1520e2b7bcf6c9 | [
"MIT"
] | 1 | 2021-08-16T12:11:37.000Z | 2021-08-16T12:11:37.000Z | source/interprocedural_analyses/taint/test/integration/recognized_callable_targets.py | rcramblit/pyre-check | fa15d2021ab1bf5b52aae8c09d1520e2b7bcf6c9 | [
"MIT"
] | 1 | 2021-02-20T13:09:30.000Z | 2021-02-20T13:09:30.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from builtins import __test_sink, __test_source, to_callable_target
@to_callable_target
def callable_target(arg):
__test_sink(arg)
def... | 23.941176 | 67 | 0.771499 |
3bd7055c37102d5553a4c02c8851e44dcdabd8b1 | 114 | py | Python | shop_app/serializers/__init__.py | syz247179876/e_mall | f94e39e091e098242342f532ae371b8ff127542f | [
"Apache-2.0"
] | 7 | 2021-04-10T13:20:56.000Z | 2022-03-29T15:00:29.000Z | shop_app/serializers/__init__.py | syz247179876/E_mall | f94e39e091e098242342f532ae371b8ff127542f | [
"Apache-2.0"
] | 9 | 2021-05-11T03:53:31.000Z | 2022-03-12T00:58:03.000Z | shop_app/serializers/__init__.py | syz247179876/E_mall | f94e39e091e098242342f532ae371b8ff127542f | [
"Apache-2.0"
] | 2 | 2020-11-24T08:59:22.000Z | 2020-11-24T14:10:59.000Z | # -*- coding: utf-8 -*-
# @Time : 2020/6/1 16:56
# @Author : 司云中
# @File : __init__.py.py
# @Software: PyCharm | 22.8 | 25 | 0.561404 |
0e0ec6fe50262f375ee64d31934db3ef49a59a35 | 2,105 | py | Python | cogdl/models/nn/m3s.py | zhangdan0602/cogdl | 35a338f29066e4b1a5d7f46217f09ebceaf13106 | [
"MIT"
] | null | null | null | cogdl/models/nn/m3s.py | zhangdan0602/cogdl | 35a338f29066e4b1a5d7f46217f09ebceaf13106 | [
"MIT"
] | null | null | null | cogdl/models/nn/m3s.py | zhangdan0602/cogdl | 35a338f29066e4b1a5d7f46217f09ebceaf13106 | [
"MIT"
] | null | null | null | import torch.nn.functional as F
from cogdl.layers import GCNLayer
from cogdl.trainers.m3s_trainer import M3STrainer
from .. import BaseModel, register_model
@register_model("m3s")
class M3S(BaseModel):
@staticmethod
def add_args(parser):
"""Add model-specific arguments to the parser."""
# fmt... | 33.412698 | 72 | 0.628504 |
2a0fad35ed34ebe1694ef130ee8da74d13444a22 | 737 | py | Python | profiles_api/permissions.py | oyekanmiayo/profiles-rest-api | ed2746932b01d453b15a1be5ba182a49294680dd | [
"MIT"
] | null | null | null | profiles_api/permissions.py | oyekanmiayo/profiles-rest-api | ed2746932b01d453b15a1be5ba182a49294680dd | [
"MIT"
] | 7 | 2020-05-16T17:14:22.000Z | 2022-02-10T10:37:49.000Z | profiles_api/permissions.py | oyekanmiayo/profiles-rest-api | ed2746932b01d453b15a1be5ba182a49294680dd | [
"MIT"
] | null | null | null | from rest_framework import permissions
class UpdateOwnProfile(permissions.BasePermission):
"""Allow users to edit their own profile"""
def has_object_permission(self, request, view, obj):
"""Check user is trying to update their own profile"""
if request.method in permissions.SAFE_METHODS:
... | 36.85 | 65 | 0.696065 |
245ef5f1ca14031aa062c6e24a9d839dc7d1ef6f | 1,894 | py | Python | lib/surface/compute/sole_tenancy/node_groups/update.py | bshaffer/google-cloud-sdk | f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9 | [
"Apache-2.0"
] | null | null | null | lib/surface/compute/sole_tenancy/node_groups/update.py | bshaffer/google-cloud-sdk | f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9 | [
"Apache-2.0"
] | null | null | null | lib/surface/compute/sole_tenancy/node_groups/update.py | bshaffer/google-cloud-sdk | f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*- #
# Copyright 2018 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 37.137255 | 77 | 0.774023 |
517b9302bad1201348c69437a6a12d05423f8514 | 2,579 | py | Python | App/alias.py | Jeffacy99/Blog | d9f45935998a073e4a3c947456be23c74ae64fef | [
"MIT"
] | null | null | null | App/alias.py | Jeffacy99/Blog | d9f45935998a073e4a3c947456be23c74ae64fef | [
"MIT"
] | 5 | 2020-03-24T18:10:26.000Z | 2022-03-12T00:12:33.000Z | App/alias.py | Jeffacy99/Blog-app | d9f45935998a073e4a3c947456be23c74ae64fef | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# ********************************************************************************
# Copyright © 2019 jianglin
# File Name: alias.py
# Author: jianglin
# Email: mail@honmaple.com
# Created: 2019-07-13 00:29:40 (CST)
# Last Update: Tuesday 2019-09-24 18:09:14 (CST)
# ... | 28.340659 | 93 | 0.589376 |
5ed61c6b216c04a0b92a5a9c426679773aea8f77 | 3,702 | py | Python | release/src-rt-6.x.4708/router/samba3/source4/scripting/python/samba/tests/credentials.py | zaion520/ATtomato | 4d48bb79f8d147f89a568cf18da9e0edc41f93fb | [
"FSFAP"
] | 2 | 2019-01-13T09:19:10.000Z | 2019-02-15T01:21:02.000Z | release/src-rt-6.x.4708/router/samba3/source4/scripting/python/samba/tests/credentials.py | zaion520/ATtomato | 4d48bb79f8d147f89a568cf18da9e0edc41f93fb | [
"FSFAP"
] | null | null | null | release/src-rt-6.x.4708/router/samba3/source4/scripting/python/samba/tests/credentials.py | zaion520/ATtomato | 4d48bb79f8d147f89a568cf18da9e0edc41f93fb | [
"FSFAP"
] | 2 | 2020-03-08T01:58:25.000Z | 2020-12-20T10:34:54.000Z | #!/usr/bin/env python
# Unix SMB/CIFS implementation.
# Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the Licens... | 36.653465 | 73 | 0.69557 |
a2d514dcc02eaf93ab8e5ce43856f0f643cfde4f | 1,409 | py | Python | client/plugins/installer_plugin.py | scudette/grr | d4257c5259af881e28a7d62e9837fa13352e2bf6 | [
"Apache-2.0"
] | 6 | 2015-04-03T02:25:28.000Z | 2021-11-17T21:42:59.000Z | client/plugins/installer_plugin.py | defaultnamehere/grr | ba1648b97a76f844ffb8e1891cc9e2680f9b1c6e | [
"Apache-2.0"
] | null | null | null | client/plugins/installer_plugin.py | defaultnamehere/grr | ba1648b97a76f844ffb8e1891cc9e2680f9b1c6e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""Example Installer plugin.
This is an example plugin to illustrate how GRR installation can be customized.
In this example we want to also uninstall an old service called "old_service" as
part of the GRR installation. This could be because we decided to rename the GRR
service itself (by defaul... | 32.767442 | 80 | 0.74308 |
a644511a5f45b8d6a240ff6e8b70f8774e94e482 | 1,258 | py | Python | epipy/utils/csvmanager.py | ckaus/EpiPy | f69eba6bf21fd9c60a8a6cbf7fe0d5c3eab69dce | [
"MIT"
] | 5 | 2020-04-08T09:18:00.000Z | 2020-05-07T16:18:17.000Z | epipy/utils/csvmanager.py | ckaus/EpiPy | f69eba6bf21fd9c60a8a6cbf7fe0d5c3eab69dce | [
"MIT"
] | 3 | 2016-02-10T14:11:49.000Z | 2017-06-07T07:52:56.000Z | epipy/utils/csvmanager.py | ckaus/EpiPy | f69eba6bf21fd9c60a8a6cbf7fe0d5c3eab69dce | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""This file contains functionality for reading a CSV file."""
import csv
from epipy.utils import logging
def read(file_name='', column=[]):
"""Read a CSV file by given header.
:param file_name: the file name
:type file_name: str
:param column: the columns of CSV file
:t... | 28.590909 | 79 | 0.554054 |
364897ba0a33f004dd3ae3325853705dd9be04c9 | 244 | py | Python | setup.py | SangheonOhWDC/neko | 041a35d883ff7f7ad10ab8841c12a739fc2a73bc | [
"MIT"
] | 11 | 2021-05-05T07:03:57.000Z | 2021-12-10T04:48:55.000Z | setup.py | byin-cwi/neko | 9a09cc5585f6a5f1cb25fefc88cc3ab461b8cb12 | [
"MIT"
] | 1 | 2021-08-02T19:02:30.000Z | 2021-08-10T23:13:05.000Z | setup.py | byin-cwi/neko | 9a09cc5585f6a5f1cb25fefc88cc3ab461b8cb12 | [
"MIT"
] | 2 | 2021-06-25T02:37:18.000Z | 2022-02-18T09:29:20.000Z | from setuptools import setup, find_packages
setup(
name="neko",
version="0.3a1",
packages=find_packages(),
install_requires=["tensorflow>=2.3", "torch>=1.6", "numpy", "scipy", "tqdm", "requests"],
python_requires=">=3.8"
)
| 24.4 | 93 | 0.643443 |
1883d7a11671298ae8473d2408d42b37b721c9fb | 4,249 | py | Python | jsondler/json_tools/sort.py | loven-doo/jsondler | 1466f022fc059a5a58e34dcc3ebddb76b5f82c5c | [
"BSD-3-Clause"
] | null | null | null | jsondler/json_tools/sort.py | loven-doo/jsondler | 1466f022fc059a5a58e34dcc3ebddb76b5f82c5c | [
"BSD-3-Clause"
] | null | null | null | jsondler/json_tools/sort.py | loven-doo/jsondler | 1466f022fc059a5a58e34dcc3ebddb76b5f82c5c | [
"BSD-3-Clause"
] | null | null | null | import itertools
from copy import deepcopy
from jsondler.json_tools import get_by_path
def sort_dicts_list(in_json, prior_list, reverse=False):
paths_order = get_paths_order(in_json=in_json, prior_list=prior_list, reverse=reverse)
reorder_dict = {path[0]: sorted_i for sorted_i, path in enumerate(paths_order)... | 43.357143 | 117 | 0.546482 |
137346ad1f48bb0f2a5e77d37f30c43ba2e0431a | 379 | py | Python | tests/flask_app.py | vb64/test.helper.flask | cc807dcea7554936fa291e83b0b0f86d91797865 | [
"MIT"
] | null | null | null | tests/flask_app.py | vb64/test.helper.flask | cc807dcea7554936fa291e83b0b0f86d91797865 | [
"MIT"
] | null | null | null | tests/flask_app.py | vb64/test.helper.flask | cc807dcea7554936fa291e83b0b0f86d91797865 | [
"MIT"
] | null | null | null | """
Entry point for app
"""
from flask import Flask, redirect, url_for
app = Flask(__name__) # pylint: disable=invalid-name
@app.route('/', methods=['GET', 'POST'])
def main_page():
"""
root page
"""
return "Flask OK"
@app.route('/redirect', methods=['POST'])
def redirect_page():
"""
redir... | 16.478261 | 53 | 0.609499 |
5b9a2b231a5837328fcff3e743d2e1a12aecfa10 | 2,117 | py | Python | util/readme-generator.py | TISparta/competitive-programming-solutions | 31987d4e67bb874bf15653565c6418b5605a20a8 | [
"MIT"
] | 1 | 2018-01-30T13:21:30.000Z | 2018-01-30T13:21:30.000Z | util/readme-generator.py | TISparta/competitive-programming-solutions | 31987d4e67bb874bf15653565c6418b5605a20a8 | [
"MIT"
] | null | null | null | util/readme-generator.py | TISparta/competitive-programming-solutions | 31987d4e67bb874bf15653565c6418b5605a20a8 | [
"MIT"
] | 1 | 2018-08-29T13:26:50.000Z | 2018-08-29T13:26:50.000Z | """
> Author: TISparta
> Description: Script to generate readme files for this repo
"""
import os
# Extensions to include
extensions = ['cpp', 'py']
# Files to ignore
ignore = ['readme-generator.py']
# Mapping problem with urls
urls = {
'exceeding the speed limit': 'exceeding-speed-limit',
'interesti... | 29.816901 | 123 | 0.607936 |
939d8e69eb41838fb2a7af13bfbf10abfea839d1 | 7,945 | py | Python | logbook/helpers.py | Infinidat/logbook | 220d2f3409bc5e8fe13ddc8155e72d5b78ece165 | [
"BSD-3-Clause"
] | null | null | null | logbook/helpers.py | Infinidat/logbook | 220d2f3409bc5e8fe13ddc8155e72d5b78ece165 | [
"BSD-3-Clause"
] | null | null | null | logbook/helpers.py | Infinidat/logbook | 220d2f3409bc5e8fe13ddc8155e72d5b78ece165 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
logbook.helpers
~~~~~~~~~~~~~~~
Various helper functions
:copyright: (c) 2010 by Armin Ronacher, Georg Brandl.
:license: BSD, see LICENSE for more details.
"""
import os
import re
import sys
import errno
import time
import random
from datetime import datetime, timedelta... | 27.975352 | 77 | 0.559597 |
ac23ec687ca28ddc0da8d8e27b6d22a2f1835ea1 | 1,972 | py | Python | src/notifier.py | AbhirajHinge/IntelligentMedicineBox | c95ee8c722a952bd81476ba3b28ca1c23399a68a | [
"MIT"
] | null | null | null | src/notifier.py | AbhirajHinge/IntelligentMedicineBox | c95ee8c722a952bd81476ba3b28ca1c23399a68a | [
"MIT"
] | null | null | null | src/notifier.py | AbhirajHinge/IntelligentMedicineBox | c95ee8c722a952bd81476ba3b28ca1c23399a68a | [
"MIT"
] | null | null | null | #!/bin/python3
from event_queue import EventQueue
import firebase_admin
from firebase_admin import credentials, db
"""
Notifier
Gathers notifications from EventQueue and sends them to PrescriptionManager.
"""
class Notifier:
_ref = None
_notification_ref= None
_prescription_ref= None
def __init__(sel... | 35.854545 | 119 | 0.649594 |
59158c27c78aae2e2b0306cf3d633296c250f861 | 727 | py | Python | aws_cloudformation_policies/aws_cloudformation_stack_drifted.py | glerb/panther-analysis | bc8518644e0a8fc7735576a700aa7269b3257546 | [
"Apache-2.0"
] | null | null | null | aws_cloudformation_policies/aws_cloudformation_stack_drifted.py | glerb/panther-analysis | bc8518644e0a8fc7735576a700aa7269b3257546 | [
"Apache-2.0"
] | null | null | null | aws_cloudformation_policies/aws_cloudformation_stack_drifted.py | glerb/panther-analysis | bc8518644e0a8fc7735576a700aa7269b3257546 | [
"Apache-2.0"
] | null | null | null | from panther_base_helpers import deep_get
# CloudFormation stacks tagged with "STACK=(name)" will be marked as passing.
IGNORE_STACK_TAGS = {
'panther-bootstrap-gateway', 'panther-cloud-security', 'panther-core',
'panther-log-analysis'
}
def policy(resource):
if deep_get(resource, 'DriftInformation', 'St... | 33.045455 | 96 | 0.698762 |
c4c92dceb70efee50e1ed020ec044e9b8561018b | 8,681 | py | Python | train_dance.py | VuongLong/DANCE_W | 8a7dc39a16908bb4726ed57049c6a7d6698a76bc | [
"MIT"
] | null | null | null | train_dance.py | VuongLong/DANCE_W | 8a7dc39a16908bb4726ed57049c6a7d6698a76bc | [
"MIT"
] | null | null | null | train_dance.py | VuongLong/DANCE_W | 8a7dc39a16908bb4726ed57049c6a7d6698a76bc | [
"MIT"
] | null | null | null | from __future__ import print_function
import yaml
import easydict
import os
import numpy as np
import torch.optim as optim
import torch.nn.functional as F
from torch.autograd import Variable
import torchvision.transforms as transforms
from apex import amp, optimizers
from data_loader.get_loader import get_loader
from u... | 37.908297 | 96 | 0.603617 |
92e41928627e8c2b941faadb24f8b7517f7f2971 | 4,355 | py | Python | segnlp/layers/encoders/lstm.py | AxlAlm/SegNLP | 89b8d077952397dfcea089376b373b117bcf6a65 | [
"Apache-2.0"
] | 1 | 2021-01-21T17:16:55.000Z | 2021-01-21T17:16:55.000Z | segnlp/layers/encoders/lstm.py | AxlAlm/SegNLP | 89b8d077952397dfcea089376b373b117bcf6a65 | [
"Apache-2.0"
] | 2 | 2021-01-24T20:07:54.000Z | 2021-01-26T16:59:28.000Z | segnlp/layers/encoders/lstm.py | AxlAlm/SegNLP | 89b8d077952397dfcea089376b373b117bcf6a65 | [
"Apache-2.0"
] | 1 | 2021-01-21T17:16:57.000Z | 2021-01-21T17:16:57.000Z |
#basics
from typing import Sequence, Union
import numpy as np
#pytorch
import torch
import torch.nn as nn
from torch.nn.utils.rnn import pack_padded_sequence
from torch.nn.utils.rnn import pad_packed_sequence
from torch.nn.functional import pad
from torch import Tensor
#segnlp
from segnlp import utils
class LST... | 35.696721 | 128 | 0.507692 |
180b19909116d122c1406576ac6c0842f4d0fa12 | 4,403 | py | Python | chimp/simulators/atari/atari.py | sisl/Chimp | 39aecc18a635ce2608b3f604310dedd738946574 | [
"Apache-2.0"
] | 76 | 2016-03-19T17:12:24.000Z | 2022-02-27T16:33:35.000Z | chimp/simulators/atari/atari.py | afcarl/Chimp | 39aecc18a635ce2608b3f604310dedd738946574 | [
"Apache-2.0"
] | 2 | 2016-03-24T20:45:56.000Z | 2018-05-04T22:57:36.000Z | chimp/simulators/atari/atari.py | afcarl/Chimp | 39aecc18a635ce2608b3f604310dedd738946574 | [
"Apache-2.0"
] | 18 | 2016-04-06T13:03:59.000Z | 2019-04-28T03:34:09.000Z | from ale_python_interface import ALEInterface
import pygame
import numpy as np
import scipy.misc as spm
class AtariSimulator(object):
def __init__(self, settings):
'''Initiate Arcade Learning Environment (ALE) using Python interface
https://github.com/bbitmaster/ale_python_interface/wiki
... | 37.956897 | 120 | 0.660005 |
529d887307c44d88fb62e4d85c058e8e76ebe953 | 9,436 | py | Python | web.py | ASionville/Python-Audio-Assistant | 0b10ace64522af3eee15b956e2bf74401dd7fa13 | [
"MIT"
] | 1 | 2020-03-24T09:28:27.000Z | 2020-03-24T09:28:27.000Z | web.py | ASionville/Python-Audio-Assistant | 0b10ace64522af3eee15b956e2bf74401dd7fa13 | [
"MIT"
] | null | null | null | web.py | ASionville/Python-Audio-Assistant | 0b10ace64522af3eee15b956e2bf74401dd7fa13 | [
"MIT"
] | null | null | null | # importing speech recognition package from google api
import speech_recognition as sr
import playsound # to play saved mp3 file
from gtts import gTTS # google text to speech
import os, sys # to save/open files
import wolframalpha # to calculate strings into formula
#from selenium import webdriver # to con... | 31.141914 | 119 | 0.585524 |
932ad9ddf0958ae3c162c7a3f4dcdbffcfd73ceb | 2,963 | py | Python | python/en/_numpy/python_numpy_tutorial/python_numpy_tutorial-scipy_image_operations_imageio.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/_numpy/python_numpy_tutorial/python_numpy_tutorial-scipy_image_operations_imageio.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/_numpy/python_numpy_tutorial/python_numpy_tutorial-scipy_image_operations_imageio.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
python_numpy_tutorial-scipy_image_operations_imageio.py
TODO: Fix the following error and make this code work.
img_tinted = Image.resize( (300,300), img_tinted )
AttributeError: module 'PIL.Image' has no attribute 'resize'
This Python script is an attempt to chan... | 34.453488 | 92 | 0.673304 |
10ab36821d5533ad8febd89df9e98c79920a3eb7 | 33,969 | py | Python | king_phisher/client/graphs.py | tanc7/king-phisher | 457e42440603bd9ba241a688bbaad6eb32ed118e | [
"BSD-3-Clause"
] | null | null | null | king_phisher/client/graphs.py | tanc7/king-phisher | 457e42440603bd9ba241a688bbaad6eb32ed118e | [
"BSD-3-Clause"
] | null | null | null | king_phisher/client/graphs.py | tanc7/king-phisher | 457e42440603bd9ba241a688bbaad6eb32ed118e | [
"BSD-3-Clause"
] | 1 | 2019-11-03T23:47:56.000Z | 2019-11-03T23:47:56.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# king_phisher/client/graphs.py
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, th... | 35.310811 | 155 | 0.741765 |
f8452017a584849906650f870fe946c58404dfc1 | 4,010 | py | Python | lane_detection_utils/determination_of_parallelism_with_previously_tracked_lanes.py | syeda27/MonoRARP | 71415d9fc71bc636ac1f5de1a90f033b4e519538 | [
"MIT"
] | 2 | 2020-07-22T07:05:01.000Z | 2021-11-27T13:28:03.000Z | lane_detection_utils/determination_of_parallelism_with_previously_tracked_lanes.py | syeda27/MonoRARP | 71415d9fc71bc636ac1f5de1a90f033b4e519538 | [
"MIT"
] | null | null | null | lane_detection_utils/determination_of_parallelism_with_previously_tracked_lanes.py | syeda27/MonoRARP | 71415d9fc71bc636ac1f5de1a90f033b4e519538 | [
"MIT"
] | null | null | null | """
Determination of Paralelism and Distance
Author: Juan Carlos Aragon - Allstate
Minor Editing: djp42 - Stanford
See README for more details.
We assess in this function wheather or not the white marking is sufficiently parallel to a previous tracked Lane.
"""
import math
def determination_of_parallelism_w(lane_dete... | 40.505051 | 113 | 0.518953 |
e15e1d5f160598edff676fc498f0d1510b434d48 | 406 | py | Python | api/hosts/models.py | mingweiarthurli/CMPUT-404-Project | b88bafc3e107f2b5271b58056d8ef778c861eaf9 | [
"MIT"
] | null | null | null | api/hosts/models.py | mingweiarthurli/CMPUT-404-Project | b88bafc3e107f2b5271b58056d8ef778c861eaf9 | [
"MIT"
] | null | null | null | api/hosts/models.py | mingweiarthurli/CMPUT-404-Project | b88bafc3e107f2b5271b58056d8ef778c861eaf9 | [
"MIT"
] | 2 | 2020-01-31T22:09:39.000Z | 2020-02-01T03:25:28.000Z | from django.db import models
# Create your models here.
import uuid
import json
from config.settings import DEFAULT_HOST
class Host(models.Model):
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
baseURL = models.URLField(null=False, blank=False)
username = models.CharField(bla... | 31.230769 | 79 | 0.770936 |
f8f93e9bb1d86f10bd61f821b40415e644666109 | 5,069 | py | Python | fvaForward.py | AlessandroGnoatto/Deep-xVA-Solver | 4b6efc0caef32424a70739c59b1867e80ab7fd6f | [
"MIT"
] | 5 | 2020-07-02T08:57:35.000Z | 2021-12-17T14:13:32.000Z | fvaForward.py | AlessandroGnoatto/Deep-xVA-Solver | 4b6efc0caef32424a70739c59b1867e80ab7fd6f | [
"MIT"
] | null | null | null | fvaForward.py | AlessandroGnoatto/Deep-xVA-Solver | 4b6efc0caef32424a70739c59b1867e80ab7fd6f | [
"MIT"
] | 1 | 2020-06-25T09:42:19.000Z | 2020-06-25T09:42:19.000Z | import numpy as np
import matplotlib.pyplot as plt
import tensorflow as tf
from solver import BSDESolver
from XvaSolver import XvaSolver
import xvaEquation as eqn
import RecursiveEquation as receqn
import munch
from scipy.stats import norm
if __name__ == "__main__":
dim = 1 #dimension of brownian motion
P =... | 34.719178 | 91 | 0.541724 |
0a1e878b3b2d6c0ac227d0610ea4a66a7d3ae0bb | 244 | py | Python | datawrapper/__init__.py | gka/datawrapper-api.py | 92966511f10740d9394d6bf900f08a861f50fa32 | [
"MIT"
] | null | null | null | datawrapper/__init__.py | gka/datawrapper-api.py | 92966511f10740d9394d6bf900f08a861f50fa32 | [
"MIT"
] | null | null | null | datawrapper/__init__.py | gka/datawrapper-api.py | 92966511f10740d9394d6bf900f08a861f50fa32 | [
"MIT"
] | null | null | null | """Top-level package for datawrapper."""
__author__ = """Sergio Sanchez"""
__email__ = "chekos@tacosdedatos.com"
__version__ = "0.4.2"
import datawrapper.datawrapper as dw
from IPython.display import HTML, Image
Datawrapper = dw.Datawrapper
| 22.181818 | 40 | 0.758197 |
a6ae885b50a4e6b8c687cbd28211b5ed07dab8c5 | 915 | py | Python | tools/env_utils/utils.py | fangchengji/DSGN | 9a70e1574f042d5de856ed540cfa9111099437f1 | [
"MIT"
] | 192 | 2019-08-30T08:09:51.000Z | 2021-05-18T06:24:40.000Z | tools/env_utils/utils.py | fangchengji/DSGN | 9a70e1574f042d5de856ed540cfa9111099437f1 | [
"MIT"
] | 24 | 2019-08-29T22:30:30.000Z | 2021-04-28T12:08:08.000Z | tools/env_utils/utils.py | fangchengji/DSGN | 9a70e1574f042d5de856ed540cfa9111099437f1 | [
"MIT"
] | 44 | 2019-09-17T23:00:41.000Z | 2021-04-30T07:30:03.000Z | import os
import os.path as osp
import shutil
import sys
import numpy as np
from datetime import datetime
from glob import glob
from itertools import chain
import gc
import torch
def mem_info():
import subprocess
dev = subprocess.check_output(
"nvidia-smi | grep MiB | awk -F '|' '{print $3}' | awk -F '... | 25.416667 | 109 | 0.665574 |
15726f6ce14ee60a821d6fcea38bd45ca2ffcc4a | 23,622 | py | Python | eiseg/util/coco/coco.py | He-jerry/EISeg | b562a98620fc50f4aedc130de17da6f02b1771db | [
"Apache-2.0"
] | null | null | null | eiseg/util/coco/coco.py | He-jerry/EISeg | b562a98620fc50f4aedc130de17da6f02b1771db | [
"Apache-2.0"
] | null | null | null | eiseg/util/coco/coco.py | He-jerry/EISeg | b562a98620fc50f4aedc130de17da6f02b1771db | [
"Apache-2.0"
] | 1 | 2021-11-05T07:22:25.000Z | 2021-11-05T07:22:25.000Z | import json
import time
from matplotlib.collections import PatchCollection
import numpy as np
import itertools
# from . import mask as maskUtils
import os
from collections import defaultdict
import sys
from datetime import datetime
PYTHON_VERSION = sys.version_info[0]
if PYTHON_VERSION == 2:
from urllib import url... | 36.623256 | 126 | 0.475235 |
9629e3a3bbfc6898d40d90e6ab8f8963b8e6005e | 394 | py | Python | backend/apps/config/asgi.py | ambient-innovation/workshop-django | 3105f6684097a4443919edc0ac300f64937a1371 | [
"MIT"
] | null | null | null | backend/apps/config/asgi.py | ambient-innovation/workshop-django | 3105f6684097a4443919edc0ac300f64937a1371 | [
"MIT"
] | null | null | null | backend/apps/config/asgi.py | ambient-innovation/workshop-django | 3105f6684097a4443919edc0ac300f64937a1371 | [
"MIT"
] | null | null | null | """
ASGI config for mysite project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTIN... | 23.176471 | 78 | 0.784264 |
91aebf10d40f594a5d310060ce91eb99bf3fc647 | 324 | py | Python | tests/conftest.py | esadek/adroa | 9033a3aa0a082c229e8d7275b75e1d28ae6c0c54 | [
"MIT"
] | null | null | null | tests/conftest.py | esadek/adroa | 9033a3aa0a082c229e8d7275b75e1d28ae6c0c54 | [
"MIT"
] | null | null | null | tests/conftest.py | esadek/adroa | 9033a3aa0a082c229e8d7275b75e1d28ae6c0c54 | [
"MIT"
] | null | null | null | import sys
import os
import shutil
import typing
import pytest
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../adroa')))
import adroa
@pytest.fixture
def directories() -> typing.Generator[None, None, None]:
adroa.create_directories('my-app')
yield None
shutil.rmtree('my-ap... | 19.058824 | 88 | 0.725309 |
29beb5a410ca3aebad36facbadd71bf346ef93b5 | 27,303 | py | Python | tests/python_client/common/common_func.py | drow931/milvus | d6bb86dd46a238efaa42c46f9770aec19cfbcc5b | [
"Apache-2.0"
] | null | null | null | tests/python_client/common/common_func.py | drow931/milvus | d6bb86dd46a238efaa42c46f9770aec19cfbcc5b | [
"Apache-2.0"
] | null | null | null | tests/python_client/common/common_func.py | drow931/milvus | d6bb86dd46a238efaa42c46f9770aec19cfbcc5b | [
"Apache-2.0"
] | null | null | null | import os
import random
import math
import string
import numpy as np
import pandas as pd
from sklearn import preprocessing
from pymilvus import DataType
from base.schema_wrapper import ApiCollectionSchemaWrapper, ApiFieldSchemaWrapper
from common import common_type as ct
from utils.util_log import test_log as log
"""... | 41.243202 | 163 | 0.636047 |
5ee76cce8c69c53892802819a6cde59da8aad897 | 17,872 | py | Python | tests/unit/test_config.py | sgillies/warehouse | 081c3dd5c85b2377d8f37ce163b179510c746ccd | [
"Apache-2.0"
] | null | null | null | tests/unit/test_config.py | sgillies/warehouse | 081c3dd5c85b2377d8f37ce163b179510c746ccd | [
"Apache-2.0"
] | null | null | null | tests/unit/test_config.py | sgillies/warehouse | 081c3dd5c85b2377d8f37ce163b179510c746ccd | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Li... | 40.071749 | 88 | 0.618901 |
9991307d006dceca91ab709e2882287f944a26de | 6,204 | py | Python | src/_pytest/debugging.py | oss-qm/python-pytest | 68bbd42213c33884ea5df2ac0df21570f057c1f8 | [
"MIT"
] | 1 | 2020-05-16T05:14:01.000Z | 2020-05-16T05:14:01.000Z | src/_pytest/debugging.py | oss-qm/python-pytest | 68bbd42213c33884ea5df2ac0df21570f057c1f8 | [
"MIT"
] | 5 | 2020-03-24T16:37:25.000Z | 2021-06-10T21:24:54.000Z | src/_pytest/debugging.py | oss-qm/python-pytest | 68bbd42213c33884ea5df2ac0df21570f057c1f8 | [
"MIT"
] | null | null | null | """ interactive debugging with PDB, the Python Debugger. """
from __future__ import absolute_import, division, print_function
import pdb
import sys
import os
from doctest import UnexpectedException
from _pytest.config import hookimpl
try:
from builtins import breakpoint # noqa
SUPPORTS_BREAKPOINT_BUILTIN = ... | 31.333333 | 85 | 0.651838 |
20dbd76d5cda31a9c33263a62a7c2bc2fdd350ca | 1,140 | py | Python | setup.py | smearle/gym-micropolis | 42b338ee050fb654e1c74dfe59bf5f03f03d39a4 | [
"MIT"
] | 8 | 2018-08-22T21:10:33.000Z | 2019-07-08T05:39:37.000Z | setup.py | smearle/gym-micropolis | 42b338ee050fb654e1c74dfe59bf5f03f03d39a4 | [
"MIT"
] | 4 | 2018-11-08T13:55:53.000Z | 2019-07-07T17:49:12.000Z | setup.py | smearle/gym-micropolis | 42b338ee050fb654e1c74dfe59bf5f03f03d39a4 | [
"MIT"
] | 8 | 2018-09-11T17:57:54.000Z | 2019-07-05T21:32:25.000Z | from setuptools import setup
with open("README.md", "r") as fh:
long_description = fh.read()
setup(name='gym_city',
version='0.0.0',
install_requires=['gym',
'numpy',
'pillow',
'baselines',
'imutils',
'visdom',
'graphviz'],
author... | 25.909091 | 70 | 0.608772 |
9e48a7b9240a132dd3ec3c323ddb78080776eabb | 7,632 | py | Python | pypy/jit/codegen/llvm/test/test_llvmjit.py | camillobruni/pygirl | ddbd442d53061d6ff4af831c1eab153bcc771b5a | [
"MIT"
] | 12 | 2016-01-06T07:10:28.000Z | 2021-05-13T23:02:02.000Z | pypy/jit/codegen/llvm/test/test_llvmjit.py | camillobruni/pygirl | ddbd442d53061d6ff4af831c1eab153bcc771b5a | [
"MIT"
] | null | null | null | pypy/jit/codegen/llvm/test/test_llvmjit.py | camillobruni/pygirl | ddbd442d53061d6ff4af831c1eab153bcc771b5a | [
"MIT"
] | 2 | 2016-07-29T07:09:50.000Z | 2016-10-16T08:50:26.000Z | import py
from os.path import dirname, join
from pypy.translator.c.test.test_genc import compile
from pypy.jit.codegen.llvm import llvmjit
from pypy.jit.codegen.llvm.compatibility import define, globalprefix, icmp, i1, i32
py.test.skip("doesn't work right now since it is using rctypes")
try:
from pypy.jit.codegen... | 30.650602 | 159 | 0.654088 |
bbdbc09ecc4a230821e3a1c0fd6cde72247a6776 | 31,127 | py | Python | tests/sensors/test_external_task_sensor.py | rliuamzn/airflow | 177dfbd12a42a5c229640c6c830f43f280ea5caa | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 3 | 2021-07-30T17:29:38.000Z | 2022-03-06T08:44:23.000Z | tests/sensors/test_external_task_sensor.py | rliuamzn/airflow | 177dfbd12a42a5c229640c6c830f43f280ea5caa | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 22 | 2020-12-13T07:33:35.000Z | 2022-02-27T17:55:01.000Z | tests/sensors/test_external_task_sensor.py | rliuamzn/airflow | 177dfbd12a42a5c229640c6c830f43f280ea5caa | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2021-09-18T17:04:21.000Z | 2021-09-18T17:04:21.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 38.239558 | 110 | 0.640055 |
f48113bb1d01455fca0863eb34cc0bbe71da72f4 | 16,277 | py | Python | fibo/wallet/wallet_transaction_store.py | Fibo-Network/fibo-blockchain | 34471efc081a52443e874749bb8ea3dc50b59891 | [
"Apache-2.0"
] | null | null | null | fibo/wallet/wallet_transaction_store.py | Fibo-Network/fibo-blockchain | 34471efc081a52443e874749bb8ea3dc50b59891 | [
"Apache-2.0"
] | null | null | null | fibo/wallet/wallet_transaction_store.py | Fibo-Network/fibo-blockchain | 34471efc081a52443e874749bb8ea3dc50b59891 | [
"Apache-2.0"
] | null | null | null | import time
from typing import Dict, List, Optional, Tuple
import aiosqlite
from fibo.types.blockchain_format.sized_bytes import bytes32
from fibo.types.mempool_inclusion_status import MempoolInclusionStatus
from fibo.util.db_wrapper import DBWrapper
from fibo.util.errors import Err
from fibo.util.ints import uint8, ... | 36.25167 | 118 | 0.605947 |
69de4afb5f510516f6b948782ac78b234c03ee18 | 15,057 | py | Python | tests/solvers/cpp/test_cpp_solvers.py | POPOGO/scikit-decide | 1128499c57aae1c989815b6fca4a29b96994dc12 | [
"MIT"
] | null | null | null | tests/solvers/cpp/test_cpp_solvers.py | POPOGO/scikit-decide | 1128499c57aae1c989815b6fca4a29b96994dc12 | [
"MIT"
] | null | null | null | tests/solvers/cpp/test_cpp_solvers.py | POPOGO/scikit-decide | 1128499c57aae1c989815b6fca4a29b96994dc12 | [
"MIT"
] | 1 | 2021-02-26T17:31:51.000Z | 2021-02-26T17:31:51.000Z | # Copyright (c) AIRBUS and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import annotations
import pytest
import inspect
from enum import Enum
from typing import NamedTuple, Optional
from math import sqrt
fr... | 37.831658 | 136 | 0.538686 |
0f277f042cfb7d7bb5584982fffc3e390b9f8242 | 7,455 | py | Python | execute_cora_sparse.py | 1049451037/FA-GAT | d8552cb79c30be50c93c869eeb042470b485e2fc | [
"MIT"
] | 5 | 2020-08-05T11:34:18.000Z | 2020-08-05T13:42:09.000Z | execute_cora_sparse.py | 1049451037/FA-GAT | d8552cb79c30be50c93c869eeb042470b485e2fc | [
"MIT"
] | null | null | null | execute_cora_sparse.py | 1049451037/FA-GAT | d8552cb79c30be50c93c869eeb042470b485e2fc | [
"MIT"
] | null | null | null | import time
import scipy.sparse as sp
import numpy as np
import tensorflow as tf
import argparse
from models import GAT
from models import SpGAT
from utils import process
checkpt_file = 'pre_trained/cora/mod_cora.ckpt'
dataset = 'cora'
# training params
batch_size = 1
nb_epochs = 100000
patience = 100
lr = 0.005 #... | 36.905941 | 115 | 0.580282 |
008df23f3e67be8cb6d8eb6c002b38eae8709108 | 7,364 | py | Python | Map.py | lmtri1998/Super-Zombie-Flag-Capturing-Game | e472282b4b0f4c1d570b5ad63374a022c6aa3a43 | [
"MIT"
] | null | null | null | Map.py | lmtri1998/Super-Zombie-Flag-Capturing-Game | e472282b4b0f4c1d570b5ad63374a022c6aa3a43 | [
"MIT"
] | null | null | null | Map.py | lmtri1998/Super-Zombie-Flag-Capturing-Game | e472282b4b0f4c1d570b5ad63374a022c6aa3a43 | [
"MIT"
] | null | null | null | from Grid import Wall
class Map:
def __init__(self, grid_list):
self.grid_list = grid_list
def make_map(self):
wall_A = Wall([(0, 0), (1, 0), (2, 0)])
wall_B = Wall([(0, 0)])
wall_C = Wall([(0, 0), (0, 1), (0, 2)])
wall_D = Wall([(0, 0), (0, 1), (1, 0), (1, 1)])
... | 51.859155 | 71 | 0.519147 |
962cf04b5951e8242d273a0681e355a8cc06d6e5 | 8,887 | py | Python | pcdswidgets/icons/valves.py | klauer/pcdswidgets | a6f50fdb41b4d7a991c86fec9bce06a4f09a80af | [
"BSD-3-Clause-LBNL"
] | null | null | null | pcdswidgets/icons/valves.py | klauer/pcdswidgets | a6f50fdb41b4d7a991c86fec9bce06a4f09a80af | [
"BSD-3-Clause-LBNL"
] | null | null | null | pcdswidgets/icons/valves.py | klauer/pcdswidgets | a6f50fdb41b4d7a991c86fec9bce06a4f09a80af | [
"BSD-3-Clause-LBNL"
] | null | null | null | import math
from qtpy.QtCore import (QPointF, QRectF, Qt, Property, QLineF)
from qtpy.QtGui import (QPainterPath, QBrush, QColor, QPolygonF, QTransform)
from .base import BaseSymbolIcon
class PneumaticValveSymbolIcon(BaseSymbolIcon):
"""
A widget with a pneumatic valve symbol drawn in it.
Parameters
... | 31.182456 | 76 | 0.579498 |
ec0e63d23c581c03939e4974709025752469b436 | 941 | py | Python | openDAM/model/StepCurve.py | bcornelusse/openDAM | ad74541d5b5955b6ebb7212aecc6942ff5f71575 | [
"BSD-2-Clause"
] | 15 | 2018-09-18T23:28:41.000Z | 2022-01-11T12:44:10.000Z | openDAM/model/StepCurve.py | bcornelusse/openDAM | ad74541d5b5955b6ebb7212aecc6942ff5f71575 | [
"BSD-2-Clause"
] | 2 | 2018-07-06T13:18:59.000Z | 2018-07-11T08:53:29.000Z | openDAM/model/StepCurve.py | bcornelusse/openDAM | ad74541d5b5955b6ebb7212aecc6942ff5f71575 | [
"BSD-2-Clause"
] | 3 | 2020-06-02T04:16:54.000Z | 2021-02-22T10:52:06.000Z | ## Step curve of the energy market.
from openDAM.model.Bid import *
from openDAM.model.SinglePeriodBid import *
class StepCurve(Bid):
def __init__(self, points=[], period=0, location=None):
"""
Volumes are negative for demand bids.
:param points: List of volume-price pairs. First pair mus... | 29.40625 | 90 | 0.5983 |
e5ac56cd17222f1d7390a3b6aba0a1da6faabca9 | 1,958 | py | Python | torchbiggraph/types.py | stillmatic/PyTorch-BigGraph | d7d6576281faa54ec5850e204ffc07b1268fdb04 | [
"BSD-3-Clause"
] | 3,189 | 2019-04-01T23:25:40.000Z | 2022-03-29T10:26:22.000Z | torchbiggraph/types.py | KonstantinKlepikov/PyTorch-BigGraph | db9d1478211dcf74a24b88dae1348588c5f645fb | [
"BSD-3-Clause"
] | 238 | 2019-04-02T07:19:55.000Z | 2022-03-22T11:03:06.000Z | torchbiggraph/types.py | KonstantinKlepikov/PyTorch-BigGraph | db9d1478211dcf74a24b88dae1348588c5f645fb | [
"BSD-3-Clause"
] | 457 | 2019-04-01T23:50:09.000Z | 2022-03-28T14:48:12.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE.txt file in the root directory of this source tree.
from enum import Enum
from typing import Any, Dict, NamedTuple, TypeVar
import torch... | 28.376812 | 83 | 0.712972 |
fb776dc05e223f063b94c681d2fd9b93ad4731f3 | 46 | py | Python | venv/lib/python3.7/imp.py | OseiasBeu/PyECom | 2ea4e7e3be4ca015fb1bbc1083aa3f2d44accc5f | [
"CC0-1.0"
] | 1 | 2020-08-16T04:04:23.000Z | 2020-08-16T04:04:23.000Z | venv/lib/python3.7/imp.py | OseiasBeu/PyECom | 2ea4e7e3be4ca015fb1bbc1083aa3f2d44accc5f | [
"CC0-1.0"
] | null | null | null | venv/lib/python3.7/imp.py | OseiasBeu/PyECom | 2ea4e7e3be4ca015fb1bbc1083aa3f2d44accc5f | [
"CC0-1.0"
] | null | null | null | /home/oseiasbeu/anaconda3/lib/python3.7/imp.py | 46 | 46 | 0.826087 |
78e87c53aca97af19253848d2681c7d48cbe5635 | 184 | py | Python | pypint/multi_level_providers/__init__.py | DiMoser/PyPinT | 3cba394d0fd87055ab412d35fe6dbf4a3b0dbe73 | [
"MIT"
] | null | null | null | pypint/multi_level_providers/__init__.py | DiMoser/PyPinT | 3cba394d0fd87055ab412d35fe6dbf4a3b0dbe73 | [
"MIT"
] | null | null | null | pypint/multi_level_providers/__init__.py | DiMoser/PyPinT | 3cba394d0fd87055ab412d35fe6dbf4a3b0dbe73 | [
"MIT"
] | null | null | null | # coding=utf-8
"""Multi-Level Providers for Iterative Time Solvers
.. moduleauthor:: Torbjörn Klatt <t.klatt@fz-juelich.de>
.. moduleauthor:: Dieter Moser <d.moser@fz-juelich.de>
"""
| 26.285714 | 56 | 0.728261 |
044b013039760ad1ec24b0bf0a7c270aa8637817 | 2,715 | py | Python | infcomp/protocol/MultivariateNormal.py | tuananhle7/pyprob | 6a46bc43a5af9f598b44bac7a74c80949c94fcec | [
"MIT"
] | 1 | 2018-02-11T16:32:23.000Z | 2018-02-11T16:32:23.000Z | infcomp/protocol/MultivariateNormal.py | tuananhle7/pyprob | 6a46bc43a5af9f598b44bac7a74c80949c94fcec | [
"MIT"
] | null | null | null | infcomp/protocol/MultivariateNormal.py | tuananhle7/pyprob | 6a46bc43a5af9f598b44bac7a74c80949c94fcec | [
"MIT"
] | 1 | 2020-06-24T15:29:15.000Z | 2020-06-24T15:29:15.000Z | # automatically generated by the FlatBuffers compiler, do not modify
# namespace: protocol
import flatbuffers
class MultivariateNormal(object):
__slots__ = ['_tab']
@classmethod
def GetRootAsMultivariateNormal(cls, buf, offset):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)... | 38.239437 | 165 | 0.672192 |
abc1cd272c9036b17829510f98567fbc20b7cba7 | 1,508 | py | Python | Classification Based Machine Learning for Algorithmic Trading/default_predictions/Naive Bayes.py | sangamkotalwar/Classification-and-Regression-based-ML-for-Finance | c1d73391c0ae8eba923da1e98eda3ede47013869 | [
"MIT"
] | 1 | 2018-04-02T11:53:48.000Z | 2018-04-02T11:53:48.000Z | Classification Based Machine Learning for Algorithmic Trading/default_predictions/Naive Bayes.py | sangamkotalwar/Classification-and-Regression-based-ML-for-Finance | c1d73391c0ae8eba923da1e98eda3ede47013869 | [
"MIT"
] | null | null | null | Classification Based Machine Learning for Algorithmic Trading/default_predictions/Naive Bayes.py | sangamkotalwar/Classification-and-Regression-based-ML-for-Finance | c1d73391c0ae8eba923da1e98eda3ede47013869 | [
"MIT"
] | 1 | 2019-07-03T08:47:53.000Z | 2019-07-03T08:47:53.000Z | # -*- coding: utf-8 -*-
"""
Created on Sun Jun 25 22:02:07 2017
@author: HellRider
"""
import numpy as np
import pandas as pd
df = pd.read_csv("dataset_2.csv")
df['default'].describe()
print(sum(df['default'] == 0))
print(sum(df['default'] == 1))
X = df.iloc[:, 1:6].values
y = df['default'].values
# Splitting the ... | 30.16 | 81 | 0.745358 |
f0a6e8a74226cbbc4c6c7a34ca80d8feb0e68361 | 652 | py | Python | stockvis/extract_scripts/sort_by_time.py | visdata/DeepClue | 8d80ecd783919c97ba225db67664a0dfe5f3fb37 | [
"Apache-2.0"
] | 1 | 2020-12-06T08:04:32.000Z | 2020-12-06T08:04:32.000Z | stockvis/extract_scripts/sort_by_time.py | visdata/DeepClue | 8d80ecd783919c97ba225db67664a0dfe5f3fb37 | [
"Apache-2.0"
] | null | null | null | stockvis/extract_scripts/sort_by_time.py | visdata/DeepClue | 8d80ecd783919c97ba225db67664a0dfe5f3fb37 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import sys
import traceback
import time
from datetime import timedelta
from time import mktime
from datetime import datetime
import os
from dateutil.parser import parse
if len(sys.argv)!= 3:
print 'Usage: %s input output' % sys.argv[0]
sys.exit(0)
input_file = open(sys.argv[1],"r")
outp... | 26.08 | 95 | 0.67638 |
34fe3f2455205a426b236f44f07c6dc1cb21b6d9 | 484 | py | Python | regexlib/2021-5-15/python_re2_test_file/regexlib_1840.py | yetingli/ReDoS-Benchmarks | f5b5094d835649e957bf3fec6b8bd4f6efdb35fc | [
"MIT"
] | 1 | 2022-01-24T14:43:23.000Z | 2022-01-24T14:43:23.000Z | regexlib/python_re2_test_file/regexlib_1840.py | yetingli/ReDoS-Benchmarks | f5b5094d835649e957bf3fec6b8bd4f6efdb35fc | [
"MIT"
] | null | null | null | regexlib/python_re2_test_file/regexlib_1840.py | yetingli/ReDoS-Benchmarks | f5b5094d835649e957bf3fec6b8bd4f6efdb35fc | [
"MIT"
] | null | null | null | # 1840
# (\d*)'*-*(\d*)/*(\d*)"
# EXPONENT
# nums:5
# EXPONENT AttackString:""+"1"*256+"! _1SLQ_1"
import re2 as re
from time import perf_counter
regex = """(\d*)'*-*(\d*)/*(\d*)""""
REGEX = re.compile(regex)
for i in range(0, 150000):
ATTACK = "" + "1" * i * 1 + "! _1SLQ_1"
LEN = len(ATTACK)
BE... | 25.473684 | 46 | 0.568182 |
a0420edcfc0f00efbf19ec6d5d341114dbd6c2a7 | 3,282 | py | Python | htdocs/plotting/auto/scripts/p67.py | trentford/iem | 7264d24f2d79a3cd69251a09758e6531233a732f | [
"MIT"
] | null | null | null | htdocs/plotting/auto/scripts/p67.py | trentford/iem | 7264d24f2d79a3cd69251a09758e6531233a732f | [
"MIT"
] | null | null | null | htdocs/plotting/auto/scripts/p67.py | trentford/iem | 7264d24f2d79a3cd69251a09758e6531233a732f | [
"MIT"
] | null | null | null | """Wind Speed by Temperature"""
import datetime
import calendar
import matplotlib.patheffects as PathEffects
import psycopg2.extras
import pandas as pd
from pyiem.util import get_autoplot_context, get_dbconn
from pyiem.plot.use_agg import plt
from pyiem.network import Table as NetworkTable
def get_description():
... | 33.151515 | 79 | 0.585619 |
bd2e36ca1f925593c1d67d1823717b35bf8e289f | 2,152 | py | Python | mopack/arguments.py | jimporter/mopack | e912be11528645f5463e7873b5470c420b698418 | [
"BSD-3-Clause"
] | null | null | null | mopack/arguments.py | jimporter/mopack | e912be11528645f5463e7873b5470c420b698418 | [
"BSD-3-Clause"
] | 17 | 2020-07-23T20:28:36.000Z | 2022-03-04T04:33:55.000Z | mopack/arguments.py | jimporter/mopack | e912be11528645f5463e7873b5470c420b698418 | [
"BSD-3-Clause"
] | 1 | 2020-11-04T03:51:20.000Z | 2020-11-04T03:51:20.000Z | from argparse import *
import yaml
from .iterutils import merge_into_dict
_ArgumentParser = ArgumentParser
_Action = Action
# Add some simple wrappers to make it easier to specify shell-completion
# behaviors.
def _add_complete(argument, complete):
if complete is not None:
argument.complete = complete
... | 29.479452 | 73 | 0.631506 |
3ae27059367239a3cc223eeb25128133d3a5af17 | 4,290 | py | Python | greendoge/protocols/full_node_protocol.py | grayfallstown/greendoge-blockchain | 31e325913374d694dc0859140d006a642e7f95ac | [
"Apache-2.0"
] | 44 | 2021-07-06T10:09:06.000Z | 2022-02-09T04:30:14.000Z | greendoge/protocols/full_node_protocol.py | grayfallstown/greendoge-blockchain | 31e325913374d694dc0859140d006a642e7f95ac | [
"Apache-2.0"
] | 67 | 2021-07-06T11:57:18.000Z | 2022-02-02T16:14:15.000Z | greendoge/protocols/full_node_protocol.py | grayfallstown/greendoge-blockchain | 31e325913374d694dc0859140d006a642e7f95ac | [
"Apache-2.0"
] | 16 | 2021-07-06T10:36:37.000Z | 2022-03-15T08:35:16.000Z | from dataclasses import dataclass
from typing import List, Optional
from greendoge.types.blockchain_format.sized_bytes import bytes32
from greendoge.types.blockchain_format.vdf import VDFInfo, VDFProof
from greendoge.types.end_of_slot_bundle import EndOfSubSlotBundle
from greendoge.types.full_block import FullBlock
fr... | 21.029412 | 116 | 0.791142 |
4955d6d5e198a490b94b088dfd09ec3fa2e24aca | 3,950 | py | Python | pipng/multiplexer1.py | nwiizo/joke | 808c4c998cc7f5b7f6f3fb5a3ce421588a70c087 | [
"MIT"
] | 1 | 2017-01-11T06:12:24.000Z | 2017-01-11T06:12:24.000Z | pipng/multiplexer1.py | ShuyaMotouchi/joke | 808c4c998cc7f5b7f6f3fb5a3ce421588a70c087 | [
"MIT"
] | null | null | null | pipng/multiplexer1.py | ShuyaMotouchi/joke | 808c4c998cc7f5b7f6f3fb5a3ce421588a70c087 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright © 2012-13 Qtrac Ltd. All rights reserved.
# This program or module is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option)... | 33.760684 | 75 | 0.627342 |
0bbc9ea3e9fb55bb32aeb3815a4c69d782252f0e | 2,858 | py | Python | ML/Advanced.py | ronnie7z7z/Autumn-of-Automation-Ronit-Shukla | 3bdafcb512ea40b7caccf9a1b49653cce86f9291 | [
"MIT"
] | null | null | null | ML/Advanced.py | ronnie7z7z/Autumn-of-Automation-Ronit-Shukla | 3bdafcb512ea40b7caccf9a1b49653cce86f9291 | [
"MIT"
] | null | null | null | ML/Advanced.py | ronnie7z7z/Autumn-of-Automation-Ronit-Shukla | 3bdafcb512ea40b7caccf9a1b49653cce86f9291 | [
"MIT"
] | null | null | null | #This code is supposed to be the ideal multi-feature classification model
#But it is incomplete, I'm adding to it at the moment as I gather some useful methods that I can find
import os
import numpy as np
import glob
import shutil
import scipy
import tensorflow as tf
import matplotlib.pyplot as plt
import tensorflow a... | 33.232558 | 152 | 0.6676 |
a8c01ae5bfee7bf364de9465066d8bc4cf92479e | 1,397 | py | Python | context_click_example.py | itsvinayak/selenium-python-examples | 4de79f6189c2aaf1ec27d7f17675c4342c2a95cc | [
"MIT"
] | null | null | null | context_click_example.py | itsvinayak/selenium-python-examples | 4de79f6189c2aaf1ec27d7f17675c4342c2a95cc | [
"MIT"
] | null | null | null | context_click_example.py | itsvinayak/selenium-python-examples | 4de79f6189c2aaf1ec27d7f17675c4342c2a95cc | [
"MIT"
] | null | null | null | from selenium import webdriver
from selenium.webdriver import ActionChains
## constants
username = "<YOUR_LAMBDATEST_USERNAME>"
access_key = "<YOUR__LAMBDATEST_ACCESS_KEY>"
## your desired capabilities from lambdatest
desired_caps = {
"build": "Build_Name",
"name": "Test_Name",
"platform": "Windows 10",
... | 24.086207 | 85 | 0.702935 |
6515a6c2d89327ba89e03f24a0c3cea2a0b8b6a3 | 9,763 | py | Python | CIM100/IEC61970/Informative/InfWork/DesignLocation.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | null | null | null | CIM100/IEC61970/Informative/InfWork/DesignLocation.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | null | null | null | CIM100/IEC61970/Informative/InfWork/DesignLocation.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | null | null | null | # Copyright (C) 2010-2011 Richard Lincoln
#
# 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, publish... | 35.761905 | 228 | 0.662092 |
401e4c30ee328ec730070fe3e48cfd834cd79c10 | 71,578 | py | Python | my_env/Lib/site-packages/sklearn/linear_model/_least_angle.py | obulrdy6881/Drowsinss | 61cb9281d7dd22aee282b517e2fbf500f0ff9935 | [
"MIT"
] | null | null | null | my_env/Lib/site-packages/sklearn/linear_model/_least_angle.py | obulrdy6881/Drowsinss | 61cb9281d7dd22aee282b517e2fbf500f0ff9935 | [
"MIT"
] | 7 | 2021-06-08T21:46:24.000Z | 2022-03-12T00:35:31.000Z | my_env/Lib/site-packages/sklearn/linear_model/_least_angle.py | obulrdy6881/Drowsinss | 61cb9281d7dd22aee282b517e2fbf500f0ff9935 | [
"MIT"
] | null | null | null | """
Least Angle Regression algorithm. See the documentation on the
Generalized Linear Model for a complete discussion.
"""
# Author: Fabian Pedregosa <fabian.pedregosa@inria.fr>
# Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Gael Varoquaux
#
# License: BSD 3 clause
from math import log
... | 38.943417 | 80 | 0.587094 |
8ac454af2babda9488bcb6870a79ab3b2192d03e | 1,121 | py | Python | plant/models/models.py | gyzi/devops | fe342ab1b25fca6005b1e4537e43488b544cffbb | [
"MIT"
] | null | null | null | plant/models/models.py | gyzi/devops | fe342ab1b25fca6005b1e4537e43488b544cffbb | [
"MIT"
] | 1 | 2020-06-18T15:22:46.000Z | 2020-06-18T15:22:46.000Z | plant/models/models.py | gyzi/devops | fe342ab1b25fca6005b1e4537e43488b544cffbb | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from odoo import models, fields, api
# class custom/plant(models.Model):
# _name = 'custom/plant.custom/plant'
# name = fields.Char()
# value = fields.Integer()
# value2 = fields.Float(compute="_value_pc", store=True)
# description = fields.Text()
#
# @api.depends('val... | 26.069767 | 68 | 0.661909 |
9772e62d54359e6d53dfc45e87800765c95ea4ed | 5,068 | py | Python | docs/source/conf.py | jmilhone/fabry_perot | cd3cb7a1dbcaa3c9382f9f2dbd3407d95447b3ce | [
"MIT"
] | 1 | 2020-03-29T20:39:31.000Z | 2020-03-29T20:39:31.000Z | docs/source/conf.py | jmilhone/fabry_perot | cd3cb7a1dbcaa3c9382f9f2dbd3407d95447b3ce | [
"MIT"
] | null | null | null | docs/source/conf.py | jmilhone/fabry_perot | cd3cb7a1dbcaa3c9382f9f2dbd3407d95447b3ce | [
"MIT"
] | 2 | 2020-04-16T15:05:23.000Z | 2020-12-05T18:19:10.000Z | # -*- coding: utf-8 -*-
#
# Fabry Perot documentation build configuration file, created by
# sphinx-quickstart on Tue Jul 31 09:58:29 2018.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#... | 30.715152 | 79 | 0.677782 |
f7749bb45c49d48f9492334a3797e7526d6554b5 | 208 | py | Python | python/testData/codeInsight/controlflow/While.py | 06needhamt/intellij-community | 63d7b8030e4fdefeb4760e511e289f7e6b3a5c5b | [
"Apache-2.0"
] | null | null | null | python/testData/codeInsight/controlflow/While.py | 06needhamt/intellij-community | 63d7b8030e4fdefeb4760e511e289f7e6b3a5c5b | [
"Apache-2.0"
] | null | null | null | python/testData/codeInsight/controlflow/While.py | 06needhamt/intellij-community | 63d7b8030e4fdefeb4760e511e289f7e6b3a5c5b | [
"Apache-2.0"
] | null | null | null | while c1:
x = 1
else:
y = 1
while c2:
a = 1
break
b = 1
else:
c = 1
while c3:
m = 1
if m:
break
n = 1
else:
o = 1
while c4:
m = 1
if m:
break | 8.666667 | 13 | 0.379808 |
c25b23c52e33c173f6d1774eadf2c435397996c5 | 783 | py | Python | hackerrank/python/ordered_dict.py | wesinalves/codeskill | 270a55ef0f9cef5d4e947e71d0d648761c21a065 | [
"Apache-2.0"
] | null | null | null | hackerrank/python/ordered_dict.py | wesinalves/codeskill | 270a55ef0f9cef5d4e947e71d0d648761c21a065 | [
"Apache-2.0"
] | null | null | null | hackerrank/python/ordered_dict.py | wesinalves/codeskill | 270a55ef0f9cef5d4e947e71d0d648761c21a065 | [
"Apache-2.0"
] | null | null | null | '''
Code for HackerRank
Python Language Proficiency
Wesin Ribeiro
###################################
An OrderedDict is a dictionary that remembers the order of the keys that were inserted first.
If a new entry overwrites an existing entry, the original insertion position is left unchanged.
'''
from collections impor... | 27.964286 | 95 | 0.623244 |
92287bafd95e5d55b8e1d66351ecff14ae23e054 | 3,512 | py | Python | models/shufflenet.py | camilaodsouza/Masters | bbf043222ff77fce760f2be42321307f308e5451 | [
"BSD-2-Clause"
] | null | null | null | models/shufflenet.py | camilaodsouza/Masters | bbf043222ff77fce760f2be42321307f308e5451 | [
"BSD-2-Clause"
] | null | null | null | models/shufflenet.py | camilaodsouza/Masters | bbf043222ff77fce760f2be42321307f308e5451 | [
"BSD-2-Clause"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
__all__ = ['ShuffleNet', 'shufflenetg2', 'shufflenetg3']
class ShuffleBlock(nn.Module):
def __init__(self, groups):
super(ShuffleBlock, self).__init__()
self.groups = groups
def forward(self, x):
"""Channel shuffle: [... | 34.431373 | 106 | 0.594248 |
dea3d9539044ba01c374ac9fd60ce59fd88d97f2 | 2,874 | py | Python | portfolio/migrations/0001_initial.py | GoWebyCMS/portfolio | 1ed5c20f6fe280388ff0876ca6a5b5129cf6b3f2 | [
"MIT"
] | 1 | 2016-12-07T15:31:22.000Z | 2016-12-07T15:31:22.000Z | portfolio/migrations/0001_initial.py | GoWebyCMS/portfolio | 1ed5c20f6fe280388ff0876ca6a5b5129cf6b3f2 | [
"MIT"
] | 26 | 2016-12-12T10:05:49.000Z | 2017-01-31T15:25:10.000Z | portfolio/migrations/0001_initial.py | GoWebyCMS/portfolio | 1ed5c20f6fe280388ff0876ca6a5b5129cf6b3f2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2017-01-17 10:34
from __future__ import unicode_literals
import ckeditor.fields
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
... | 39.916667 | 171 | 0.559151 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.