hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | 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 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
797b844b0433a5225a68661478fdeb48703b5e84 | 1,043 | py | Python | e2e/Tests/Merit/Verify.py | rikublock/Meros | 7a3ae9c78af388eb523bc8a2c840018fc058ef44 | [
"CC0-1.0"
] | null | null | null | e2e/Tests/Merit/Verify.py | rikublock/Meros | 7a3ae9c78af388eb523bc8a2c840018fc058ef44 | [
"CC0-1.0"
] | null | null | null | e2e/Tests/Merit/Verify.py | rikublock/Meros | 7a3ae9c78af388eb523bc8a2c840018fc058ef44 | [
"CC0-1.0"
] | 1 | 2021-02-08T23:46:35.000Z | 2021-02-08T23:46:35.000Z | #Blockchain class.
from e2e.Classes.Merit.Blockchain import Blockchain
#TestError Exception.
from e2e.Tests.Errors import TestError
#RPC class.
from e2e.Meros.RPC import RPC
#Sleep standard function.
from time import sleep
#Verify the Blockchain.
def verifyBlockchain(
rpc: RPC,
blockchain: Blockchain
) -> None:... | 26.075 | 76 | 0.68744 |
797b856ac1d263d513c8f7811cedad6409069916 | 831 | py | Python | tests/containers/plist_event.py | pyllyukko/plaso | 7533db2d1035ca71d264d6281ebd5db2d073c587 | [
"Apache-2.0"
] | 2 | 2019-10-23T03:37:59.000Z | 2020-08-14T17:09:26.000Z | tests/containers/plist_event.py | pyllyukko/plaso | 7533db2d1035ca71d264d6281ebd5db2d073c587 | [
"Apache-2.0"
] | null | null | null | tests/containers/plist_event.py | pyllyukko/plaso | 7533db2d1035ca71d264d6281ebd5db2d073c587 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Tests for the plist event attribute containers."""
import unittest
from plaso.containers import plist_event
from tests import test_lib as shared_test_lib
class PlistTimeEventDataTest(shared_test_lib.BaseTestCase):
"""Tests for the plist event data attribute conta... | 27.7 | 77 | 0.737665 |
797b8588754f61677b1eec5de3d21d9fec4e05f8 | 330 | py | Python | src/models/tests/test_dueling_deep_q_model.py | Kautenja/playing-mario-with-deep-reinforcement-learning | bf61b8babfd06b6e6c26eb3694b84e8c7ff4c076 | [
"MIT"
] | 57 | 2018-04-24T07:07:29.000Z | 2022-01-19T17:07:13.000Z | src/models/tests/test_dueling_deep_q_model.py | Kautenja/playing-mario-with-deep-reinforcement-learning | bf61b8babfd06b6e6c26eb3694b84e8c7ff4c076 | [
"MIT"
] | 10 | 2018-06-07T14:29:19.000Z | 2019-07-29T13:48:03.000Z | src/models/tests/test_dueling_deep_q_model.py | Kautenja/playing-mario-with-deep-reinforcement-learning | bf61b8babfd06b6e6c26eb3694b84e8c7ff4c076 | [
"MIT"
] | 11 | 2018-09-11T23:14:37.000Z | 2021-06-30T03:56:55.000Z | """Unit tests for the Dueling Deep-Q model builder method."""
from unittest import TestCase
from keras.models import Model
from ..dueling_deep_q_model import build_dueling_deep_q_model
class ShouldBuildModel(TestCase):
def test(self):
model = build_dueling_deep_q_model()
self.assertIsInstance(mode... | 30 | 61 | 0.769697 |
797b860ad1519e7e8165e72440d63bf127128e6c | 8,950 | py | Python | src/xia2/Schema/Interfaces/Refiner.py | graeme-winter/xia2 | e00d688137d4ddb4b125be9a3f37ae00265886c2 | [
"BSD-3-Clause"
] | null | null | null | src/xia2/Schema/Interfaces/Refiner.py | graeme-winter/xia2 | e00d688137d4ddb4b125be9a3f37ae00265886c2 | [
"BSD-3-Clause"
] | 1 | 2016-09-19T13:53:01.000Z | 2016-10-21T09:42:11.000Z | src/xia2/Schema/Interfaces/Refiner.py | graeme-winter/xia2 | e00d688137d4ddb4b125be9a3f37ae00265886c2 | [
"BSD-3-Clause"
] | 1 | 2015-07-21T07:35:19.000Z | 2015-07-21T07:35:19.000Z | import inspect
import json
import logging
import os
from dxtbx.serialize.load import _decode_dict
logger = logging.getLogger("xia2.Schema.Interfaces.Refiner")
class Refiner:
"""An interface to present refinement functionality in a similar way to the
scaler interface."""
LATTICE_POSSIBLE = "LATTICE_POSS... | 33.02583 | 84 | 0.594078 |
797b88e73b82f955b9887d76d2536b7f51dded31 | 1,790 | py | Python | zuul.d/octavia/tests/unit/api/drivers/test_driver_factory.py | yi-cloud/octavia | b7f5cfa4c3c454925a90c24984049539228806d7 | [
"Apache-2.0"
] | null | null | null | zuul.d/octavia/tests/unit/api/drivers/test_driver_factory.py | yi-cloud/octavia | b7f5cfa4c3c454925a90c24984049539228806d7 | [
"Apache-2.0"
] | null | null | null | zuul.d/octavia/tests/unit/api/drivers/test_driver_factory.py | yi-cloud/octavia | b7f5cfa4c3c454925a90c24984049539228806d7 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Rackspace, US 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 applic... | 36.530612 | 79 | 0.693296 |
797b88fa12b13e0a027dde25ea90dcc870e3447b | 638 | py | Python | hotel/views/reserva_view.py | ALEXIS2ES/Hotel_serve | dcf1364417486d1f27c6c654565cf218fb865d44 | [
"MIT"
] | 1 | 2017-11-13T20:33:49.000Z | 2017-11-13T20:33:49.000Z | hotel/views/reserva_view.py | ALEXIS2ES/Hotel_serve | dcf1364417486d1f27c6c654565cf218fb865d44 | [
"MIT"
] | 7 | 2020-06-05T18:33:09.000Z | 2021-09-20T23:07:52.000Z | hotel/views/reserva_view.py | lp2-20172/hotel-serve | 8f0f3f8b06776b2aa9c3b46a959ddd2a7d6bcd61 | [
"MIT"
] | null | null | null | from ..models.reserva import Reserva
from rest_framework import serializers, viewsets
from rest_framework import permissions
class ReservaSerializer(serializers.ModelSerializer):
nombre_cliente = serializers.SerializerMethodField()
class Meta:
model = Reserva
fields = '__all__'
def get_n... | 29 | 58 | 0.68652 |
797b891c8bda1f24b1e1a20b0867bf9e319278d1 | 19,711 | py | Python | exploreframework/scripts/processmultipleobject.py | abdurrahmanvizier/frameworkdjango | 132becee33ad0363f695b90bf4900f3b9647e0fb | [
"BSD-2-Clause"
] | null | null | null | exploreframework/scripts/processmultipleobject.py | abdurrahmanvizier/frameworkdjango | 132becee33ad0363f695b90bf4900f3b9647e0fb | [
"BSD-2-Clause"
] | 5 | 2021-03-30T13:58:14.000Z | 2021-09-22T19:24:10.000Z | exploreframework/scripts/processmultipleobject.py | abdurrahmanvizier/frameworkdjango | 132becee33ad0363f695b90bf4900f3b9647e0fb | [
"BSD-2-Clause"
] | null | null | null | import sys
import pandas as pd
from datetime import datetime
from django.db.models import Max
from .funtions import *
from .process_object_desc import Desc
from framework.models import *
from framework.forms import ObjectRelationForm
from scripts.generateobjectdesc import ManualDesc
class MultipleObject:
def _... | 74.946768 | 223 | 0.649485 |
797b8a5a82a35db3a0f0d7a483bf731b2125acd0 | 2,051 | py | Python | virtual/lib/python3.6/site-packages/PIL/DcxImagePlugin.py | GabrielSpear/PersonalGallery | e863339af357469598ed3380d1449f579ce2a3b2 | [
"MIT"
] | 169 | 2016-12-18T16:37:48.000Z | 2022-03-08T11:37:49.000Z | virtual/lib/python3.6/site-packages/PIL/DcxImagePlugin.py | GabrielSpear/PersonalGallery | e863339af357469598ed3380d1449f579ce2a3b2 | [
"MIT"
] | 10 | 2017-07-13T00:24:03.000Z | 2017-07-17T07:39:03.000Z | virtual/lib/python3.6/site-packages/PIL/DcxImagePlugin.py | GabrielSpear/PersonalGallery | e863339af357469598ed3380d1449f579ce2a3b2 | [
"MIT"
] | 42 | 2016-12-23T03:27:12.000Z | 2021-10-01T13:46:21.000Z | #
# The Python Imaging Library.
# $Id$
#
# DCX file handling
#
# DCX is a container file format defined by Intel, commonly used
# for fax applications. Each DCX file consists of a directory
# (a list of file offsets) followed by a set of (usually 1-bit)
# PCX files.
#
# History:
# 1995-09-09 fl Created
# 1996-03-20 ... | 23.574713 | 67 | 0.645051 |
797b8d19fa43acc28d949cc9a2596565e9f2f12f | 24,944 | py | Python | examples/electrophysiology/fibers/multiple_fibers_cubes_partitioning/helper.py | maierbn/opendihu | 577650e2f6b36a7306766b0f4176f8124458cbf0 | [
"MIT"
] | 17 | 2018-11-25T19:29:34.000Z | 2021-09-20T04:46:22.000Z | examples/electrophysiology/fibers/multiple_fibers_cubes_partitioning/helper.py | maierbn/opendihu | 577650e2f6b36a7306766b0f4176f8124458cbf0 | [
"MIT"
] | 1 | 2020-11-12T15:15:58.000Z | 2020-12-29T15:29:24.000Z | examples/electrophysiology/fibers/multiple_fibers_cubes_partitioning/helper.py | maierbn/opendihu | 577650e2f6b36a7306766b0f4176f8124458cbf0 | [
"MIT"
] | 4 | 2018-10-17T12:18:10.000Z | 2021-05-28T13:24:20.000Z | # Multiple 1D fibers (monodomain)
# This is a helper script that sets a lot of the internal variables which are all defined in variables.py
# This script for multiple_fibers is a copy of the file in fibers_emg.
#
# if variables.fiber_file=cuboid.bin, it uses a small cuboid test example
import numpy as np
import pickle... | 59.109005 | 317 | 0.729434 |
797b8d6dae1ebbc27a30a40d9d2a6b7ff163b2ea | 1,706 | py | Python | mpca/pcamodel.py | passion4energy/mpca | f3c2b695105a0c2e625064b435931a48d93cb11e | [
"BSD-3-Clause"
] | 1 | 2021-03-12T21:32:42.000Z | 2021-03-12T21:32:42.000Z | mpca/pcamodel.py | passion4energy/mpca | f3c2b695105a0c2e625064b435931a48d93cb11e | [
"BSD-3-Clause"
] | null | null | null | mpca/pcamodel.py | passion4energy/mpca | f3c2b695105a0c2e625064b435931a48d93cb11e | [
"BSD-3-Clause"
] | 3 | 2019-04-17T12:54:05.000Z | 2021-03-12T21:11:43.000Z | from mpca.utils.datahandling import read_h5, write_h5
from sklearn.decomposition import PCA
import numpy as np
class pcamodel:
'''
Wrapper class for a 2-component PCA model.
PCA is performed using sklearn PCA.
The model is defined by the loadings and the scores.
Implements saving and loading from file.
'''
... | 25.462687 | 121 | 0.722743 |
797b8e0a09c1117772dfbd14c9ca0675a51c78cf | 1,075 | py | Python | osf/models/citation.py | fabmiz/osf.io | 8d86af3f0a6e5388bd5b18383e68e27b65a66247 | [
"Apache-2.0"
] | null | null | null | osf/models/citation.py | fabmiz/osf.io | 8d86af3f0a6e5388bd5b18383e68e27b65a66247 | [
"Apache-2.0"
] | 5 | 2017-09-14T18:04:12.000Z | 2017-10-03T17:43:55.000Z | osf/models/citation.py | fabmiz/osf.io | 8d86af3f0a6e5388bd5b18383e68e27b65a66247 | [
"Apache-2.0"
] | 1 | 2019-07-16T00:14:49.000Z | 2019-07-16T00:14:49.000Z | from django.db import models
from django.utils import timezone
from osf.models.base import BaseModel
from osf.utils.fields import NonNaiveDateTimeField
class CitationStyle(BaseModel):
"""Persistent representation of a CSL style.
These are parsed from .csl files, so that metadata fields can be indexed.
""... | 29.054054 | 107 | 0.68093 |
797b91779078581076c869f4231db0627ab76863 | 1,820 | py | Python | photo-stack-back/python_server/engine.py | riccardofelluga/PhotoStack | c7fee56932ffed6c8ffe46ddf96717843f29def6 | [
"BSD-3-Clause"
] | 4 | 2019-07-08T12:58:26.000Z | 2021-09-02T13:20:46.000Z | photo-stack-back/python_server/engine.py | riccardofelluga/PhotoStack | c7fee56932ffed6c8ffe46ddf96717843f29def6 | [
"BSD-3-Clause"
] | null | null | null | photo-stack-back/python_server/engine.py | riccardofelluga/PhotoStack | c7fee56932ffed6c8ffe46ddf96717843f29def6 | [
"BSD-3-Clause"
] | 1 | 2019-07-08T12:58:29.000Z | 2019-07-08T12:58:29.000Z | import redis
import json
from minio import Minio
from minio.error import ResponseError
from imageai.Prediction import ImagePrediction
import os
import time
def objdetection_handler(message):
print('Object detection task received: ', message['data'])
data = json.loads(message['data'])
print(data);
if(da... | 37.142857 | 115 | 0.681319 |
797b917d51b1c1abb8414a47525074904681a249 | 1,618 | py | Python | docs/tools/python/markdown-pp-master/MarkdownPP/Modules/IncludeURL.py | corneliouzbett/dhis2-android-capture-app | 48a00632a2e01b4514ddde408eb9536c062bab43 | [
"BSD-3-Clause"
] | 31 | 2018-07-10T16:06:13.000Z | 2022-03-15T09:21:54.000Z | docs/tools/python/markdown-pp-master/MarkdownPP/Modules/IncludeURL.py | ankitbansal25/dhis2-android-capture-app | a09f5d22e37f3efcd7946a2bcd42141020cfb043 | [
"BSD-3-Clause"
] | 228 | 2018-10-26T16:53:03.000Z | 2022-03-30T15:18:31.000Z | docs/tools/python/markdown-pp-master/MarkdownPP/Modules/IncludeURL.py | ankitbansal25/dhis2-android-capture-app | a09f5d22e37f3efcd7946a2bcd42141020cfb043 | [
"BSD-3-Clause"
] | 78 | 2018-07-12T11:05:58.000Z | 2022-02-21T09:29:48.000Z | # Copyright (C) 2016 Smart Software Solutions, Inc
# Licensed under the MIT license
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import re
try:
# Python3
from urllib.request import urlopen
from urllib.parse import urlparse
except Imp... | 26.52459 | 76 | 0.622991 |
797b9203beaf43d9b00c1b7f087472c44d916330 | 509 | py | Python | djxami/templatetags/djxami.py | xacce/djxami | 4be9e5cda54235a242012163a7d41b8a4dd5bdd0 | [
"BSD-3-Clause"
] | null | null | null | djxami/templatetags/djxami.py | xacce/djxami | 4be9e5cda54235a242012163a7d41b8a4dd5bdd0 | [
"BSD-3-Clause"
] | null | null | null | djxami/templatetags/djxami.py | xacce/djxami | 4be9e5cda54235a242012163a7d41b8a4dd5bdd0 | [
"BSD-3-Clause"
] | null | null | null | from django.shortcuts import render_to_response
from django.template import Library
from django.conf import settings
from django.utils.safestring import mark_safe
register = Library()
@register.inclusion_tag('djxami/init.html')
def djxami_init():
return {
'first_query_pause': getattr(settings, 'DJXAMI_FI... | 31.8125 | 81 | 0.75835 |
797b92409be85423eb154d993c858b3b7ea6f7e9 | 39 | py | Python | depiction/models/examples/celltype/__init__.py | IBM/dl-interpretability-compbio | 3b13394f2dd9614736b4183b407a938a2c5924ac | [
"Apache-2.0"
] | 23 | 2019-07-10T08:35:11.000Z | 2019-11-20T13:53:01.000Z | depiction/models/examples/celltype/__init__.py | IBM/dl-interpretability-compbio | 3b13394f2dd9614736b4183b407a938a2c5924ac | [
"Apache-2.0"
] | 31 | 2019-07-03T17:08:31.000Z | 2019-11-21T12:45:56.000Z | depiction/models/examples/celltype/__init__.py | IBM/dl-interpretability-compbio | 3b13394f2dd9614736b4183b407a938a2c5924ac | [
"Apache-2.0"
] | 13 | 2019-07-12T18:45:19.000Z | 2019-11-20T16:25:20.000Z | from .celltype import CellTyper # noqa | 39 | 39 | 0.794872 |
797b93e0e97fc5a51fa34081a9c7936628d0fac5 | 1,534 | py | Python | demos/crackme_dexlabs_patch.py | tkgwJeff/androguard | bf653d6340a05023eb7d87a70b9c7ae6327eb3cc | [
"Apache-2.0"
] | 12 | 2016-12-26T12:40:42.000Z | 2022-01-04T23:18:12.000Z | demos/crackme_dexlabs_patch.py | dweinstein/androguard | 7dd2791212e815e869a42541655a1f20cc548665 | [
"Apache-2.0"
] | null | null | null | demos/crackme_dexlabs_patch.py | dweinstein/androguard | 7dd2791212e815e869a42541655a1f20cc548665 | [
"Apache-2.0"
] | 6 | 2017-03-20T02:03:17.000Z | 2022-01-13T22:36:22.000Z | #!/usr/bin/env python
import sys
PATH_INSTALL = "./"
sys.path.append(PATH_INSTALL)
from androguard.core.bytecodes import dvm
from androguard.core.bytecodes import apk
from androguard.core.analysis import analysis
from androguard.core import androconf
class Nop(dvm.Instruction10x):
def __init__(self):
... | 22.558824 | 77 | 0.686441 |
797b94a1f0cae8ee37c50803bc4b2f6f4f4afe25 | 1,634 | py | Python | hapi/tests/test_progressbar.py | xyzhou-puck/hapi | 4c11001a9696270aa9affcb37ead098343f56e5c | [
"Apache-2.0"
] | null | null | null | hapi/tests/test_progressbar.py | xyzhou-puck/hapi | 4c11001a9696270aa9affcb37ead098343f56e5c | [
"Apache-2.0"
] | null | null | null | hapi/tests/test_progressbar.py | xyzhou-puck/hapi | 4c11001a9696270aa9affcb37ead098343f56e5c | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 PaddlePaddle 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 appli... | 31.423077 | 74 | 0.632191 |
797b94ae7ef7b3f3c1a9082663ca856b326ac031 | 397 | py | Python | backend/test_30383/wsgi.py | crowdbotics-apps/test-30383 | 5c55fa9b950d8bd92a17e8f98d2d70af3b1402b5 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/test_30383/wsgi.py | crowdbotics-apps/test-30383 | 5c55fa9b950d8bd92a17e8f98d2d70af3b1402b5 | [
"FTL",
"AML",
"RSA-MD"
] | 6 | 2021-09-13T07:36:47.000Z | 2021-10-05T03:43:55.000Z | backend/test_30383/wsgi.py | crowdbotics-apps/test-30383 | 5c55fa9b950d8bd92a17e8f98d2d70af3b1402b5 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | """
WSGI config for test_30383 project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SE... | 23.352941 | 78 | 0.788413 |
797b94f559e864bca3ec5d72420099de753b8275 | 2,231 | py | Python | vas/web_server/WebServer.py | spring-operator/vas-python-api | ce7148a2044863e078e78b47abbaafc426f732ee | [
"Apache-2.0"
] | null | null | null | vas/web_server/WebServer.py | spring-operator/vas-python-api | ce7148a2044863e078e78b47abbaafc426f732ee | [
"Apache-2.0"
] | null | null | null | vas/web_server/WebServer.py | spring-operator/vas-python-api | ce7148a2044863e078e78b47abbaafc426f732ee | [
"Apache-2.0"
] | null | null | null | # vFabric Administration Server API
# Copyright (c) 2012 VMware, 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
... | 37.813559 | 119 | 0.667414 |
797b9500d21128c0d71b365e137a9ca7191ffdde | 12,027 | py | Python | src/parascopy/msa.py | tprodanov/parascopy | fb3b201334c20761389ff3a9876e15c5e97dd724 | [
"MIT"
] | null | null | null | src/parascopy/msa.py | tprodanov/parascopy | fb3b201334c20761389ff3a9876e15c5e97dd724 | [
"MIT"
] | null | null | null | src/parascopy/msa.py | tprodanov/parascopy | fb3b201334c20761389ff3a9876e15c5e97dd724 | [
"MIT"
] | 2 | 2021-09-10T21:34:51.000Z | 2021-10-06T15:57:19.000Z | #!/usr/bin/env python3
import argparse
import pysam
import collections
import sys
from datetime import datetime
from .view import parse_expression
from .inner import common
from .inner.genome import Genome, Interval
from .inner.duplication import Duplication
from . import long_version
_AlignedRegion = collections.n... | 44.054945 | 119 | 0.611458 |
797b960923d2d96607eac9b98ed0e7ac4851fff9 | 8,865 | py | Python | build/lib/particledist/ParticleDistributionCMSEfficient.py | nickchak21/particledist | 59b788a894655273ec177a3a6bb4cf9526f8c402 | [
"MIT"
] | 1 | 2020-03-01T19:47:13.000Z | 2020-03-01T19:47:13.000Z | build/lib/particledist/ParticleDistributionCMSEfficient.py | nickchak21/particledist | 59b788a894655273ec177a3a6bb4cf9526f8c402 | [
"MIT"
] | null | null | null | build/lib/particledist/ParticleDistributionCMSEfficient.py | nickchak21/particledist | 59b788a894655273ec177a3a6bb4cf9526f8c402 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from __future__ import absolute_import, division, print_function
from time import process_time
import energyflow as ef
import numpy as np
import matplotlib.pyplot as plt
class ParticleDistributionCMSEfficient:
def __init__(self, sim):
t1_start = process_time()
print("Start... | 37.405063 | 139 | 0.592442 |
797b96b84be6df7f085794f4c1e753e72429f70a | 449 | py | Python | gwells/templatetags/group_filter.py | rstens/gwells | 234132f741643d2debd3c509c46c0bbfae2333ae | [
"Apache-2.0"
] | 1 | 2020-01-29T22:42:40.000Z | 2020-01-29T22:42:40.000Z | gwells/templatetags/group_filter.py | rstens/gwells | 234132f741643d2debd3c509c46c0bbfae2333ae | [
"Apache-2.0"
] | 1 | 2018-05-02T05:28:33.000Z | 2018-05-09T15:58:07.000Z | gwells/templatetags/group_filter.py | rstens/gwells | 234132f741643d2debd3c509c46c0bbfae2333ae | [
"Apache-2.0"
] | 1 | 2018-05-02T23:56:48.000Z | 2018-05-02T23:56:48.000Z | from django import template
from django.contrib.auth.models import Group
register = template.Library()
@register.filter(name='has_group')
def has_group(user, group_name):
if Group.objects.filter(name=group_name).exists():
group = Group.objects.get(name=group_name)
user_groups = user.groups.all()
... | 26.411765 | 54 | 0.701559 |
797b980982d05185eb7eeaedd440e12f579867ab | 852 | py | Python | modules/implant/inject/reflectdll_excel.py | beenjaminmb/koadic | 2f162919cee71274b1b82644ec48d5610680187d | [
"Apache-2.0"
] | 1 | 2019-05-01T11:06:47.000Z | 2019-05-01T11:06:47.000Z | modules/implant/inject/reflectdll_excel.py | NTgitdude23/koadic | 57372f74657a15d21f731f08c3f54180a1dbc314 | [
"Apache-2.0"
] | null | null | null | modules/implant/inject/reflectdll_excel.py | NTgitdude23/koadic | 57372f74657a15d21f731f08c3f54180a1dbc314 | [
"Apache-2.0"
] | null | null | null | import core.implant
class ExcelReflectJob(core.job.Job):
def done(self):
self.results = "Completed"
self.display()
def display(self):
pass
#self.shell.print_plain(str(self.errno))
class ExcelReflectImplant(core.implant.Implant):
NAME = "Reflective DLL via Excel"
DESCR... | 28.4 | 106 | 0.657277 |
797b98493816b19f05b60098f67d35d88400bc34 | 519 | py | Python | config.py | testnet-exchange/market-maker | ede19dbb69165e085b97f793a6d386d9dea0a93e | [
"Apache-2.0"
] | 13 | 2018-08-07T11:58:39.000Z | 2021-12-19T22:29:11.000Z | config.py | testnet-exchange/market-maker | ede19dbb69165e085b97f793a6d386d9dea0a93e | [
"Apache-2.0"
] | 1 | 2019-04-09T02:39:22.000Z | 2019-04-09T11:35:29.000Z | config.py | testnet-exchange/market-maker | ede19dbb69165e085b97f793a6d386d9dea0a93e | [
"Apache-2.0"
] | 12 | 2018-08-13T13:30:14.000Z | 2022-01-06T16:58:38.000Z | import os
EXCHANGE_URL = "http://localhost:8080/"
MARKET_NAME = "TESTNET3RINKEBY"
MONEY_NAME = "TESTNET3"
STOCK_NAME = "RINKEBY"
BTC_ETH_PRICE_URL = "https://min-api.cryptocompare.com/data/price?fsym=ETH&tsyms=BTC"
BTC_ETH_PRICE_ERROR_PRC = float(os.getenv('BTC_ETH_PRICE_ERROR_PRC', 0))
BOT_USER_ID = int(os.getenv('B... | 37.071429 | 85 | 0.770713 |
797b9919de589ff0db7d68f9ed6982c269420959 | 13,191 | py | Python | iexcloud/stock.py | PyFund/iexcloud | c4c2a558e3ebeca60acfee43399ef51c4881dcd0 | [
"MIT"
] | 2 | 2020-10-04T19:12:46.000Z | 2020-12-29T15:26:07.000Z | iexcloud/stock.py | shawnlinxl/iexcloud | c4c2a558e3ebeca60acfee43399ef51c4881dcd0 | [
"MIT"
] | 3 | 2020-03-24T18:13:54.000Z | 2020-07-16T03:25:09.000Z | iexcloud/stock.py | shawnlinxl/iexcloud | c4c2a558e3ebeca60acfee43399ef51c4881dcd0 | [
"MIT"
] | null | null | null | import pandas as pd
import requests
import json
from typing import Union, List
from requests import Response
from iexcloud.config import get_token, get_url
class Stock(object):
def __init__(self, symbol: str, output="pandas"):
self.symbol: str = symbol
self.output: str = output
self.divi... | 40.965839 | 88 | 0.566295 |
797b992c966bc865f8d35d3ff590a9d988825c02 | 6,233 | py | Python | src/events/admin.py | MadRex2000/pycon.tw | 3db353dd6ac5cd5c3d98d233bf56ecef94826724 | [
"MIT"
] | null | null | null | src/events/admin.py | MadRex2000/pycon.tw | 3db353dd6ac5cd5c3d98d233bf56ecef94826724 | [
"MIT"
] | null | null | null | src/events/admin.py | MadRex2000/pycon.tw | 3db353dd6ac5cd5c3d98d233bf56ecef94826724 | [
"MIT"
] | null | null | null | from django.conf import settings
from django.contrib import admin
from django.urls import reverse
from django.db.models import Q
from django.utils.html import format_html
from django.utils.timezone import make_naive
from django.utils.translation import (
ugettext, gettext_lazy as _, pgettext_lazy as p,
)
from impo... | 31.639594 | 90 | 0.66902 |
797b99593ba4f88a2716314b942195cb8de4d34e | 122,461 | py | Python | osf/models/node.py | erinspace/osf.io | 5cf968a191541195621b59d6457d104174c84778 | [
"Apache-2.0"
] | null | null | null | osf/models/node.py | erinspace/osf.io | 5cf968a191541195621b59d6457d104174c84778 | [
"Apache-2.0"
] | 5 | 2017-02-13T19:38:59.000Z | 2018-10-17T20:38:08.000Z | osf/models/node.py | erinspace/osf.io | 5cf968a191541195621b59d6457d104174c84778 | [
"Apache-2.0"
] | null | null | null | import functools
import itertools
import logging
import re
import urlparse
import warnings
import markupsafe
import bson
from django.db.models import Q
from dirtyfields import DirtyFieldsMixin
from django.apps import apps
from django.contrib.auth.models import AnonymousUser
from django.contrib.contenttypes.fields impo... | 38.63123 | 202 | 0.592491 |
797b9a4c9fb075444e36ba145fb7facee2f3078f | 11,423 | py | Python | tests/utils/stl/test/tests.py | xmas92/STL | 178b8406a5647507e759442960f17cd33045cdf5 | [
"Apache-2.0"
] | 8,232 | 2019-09-16T22:51:24.000Z | 2022-03-31T03:55:39.000Z | tests/utils/stl/test/tests.py | xmas92/STL | 178b8406a5647507e759442960f17cd33045cdf5 | [
"Apache-2.0"
] | 2,263 | 2019-09-17T05:19:55.000Z | 2022-03-31T21:05:47.000Z | tests/utils/stl/test/tests.py | xmas92/STL | 178b8406a5647507e759442960f17cd33045cdf5 | [
"Apache-2.0"
] | 1,276 | 2019-09-16T22:51:40.000Z | 2022-03-31T03:30:05.000Z | # Copyright (c) Microsoft Corporation.
#===----------------------------------------------------------------------===##
#
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-except... | 41.089928 | 120 | 0.581196 |
797b9aa135ad3f5c99ee134a40f91fcda7f5ca5d | 22,445 | py | Python | lib/python3.5/site-packages/twilio/rest/api/v2010/account/usage/record/last_month.py | karvindass/shiny-broccoli | afe20be1ef12e8533185b48ab0f08313eec3ba26 | [
"MIT"
] | 1 | 2017-12-29T10:20:51.000Z | 2017-12-29T10:20:51.000Z | lib/python3.5/site-packages/twilio/rest/api/v2010/account/usage/record/last_month.py | karvindass/shiny-broccoli | afe20be1ef12e8533185b48ab0f08313eec3ba26 | [
"MIT"
] | 2 | 2021-03-31T18:31:06.000Z | 2021-12-13T19:46:40.000Z | lib/python3.5/site-packages/twilio/rest/api/v2010/account/usage/record/last_month.py | karvindass/shiny-broccoli | afe20be1ef12e8533185b48ab0f08313eec3ba26 | [
"MIT"
] | null | null | null | # coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import serialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.list_resource import Li... | 41.411439 | 119 | 0.669949 |
797b9aa41df95e9e1e5c65ce23e9ae7dfd951aee | 4,289 | py | Python | data_structures/linked_lists/singly_linked_list.py | vinta/fuck-coding-interviews | 915ff55963430e81134a35f65f511e5684c52f11 | [
"MIT"
] | 590 | 2020-06-17T08:26:47.000Z | 2022-03-30T18:47:32.000Z | data_structures/linked_lists/singly_linked_list.py | parvathirajan/fuck-coding-interviews | 915ff55963430e81134a35f65f511e5684c52f11 | [
"MIT"
] | 12 | 2020-07-14T09:24:32.000Z | 2020-11-02T03:43:47.000Z | data_structures/linked_lists/singly_linked_list.py | parvathirajan/fuck-coding-interviews | 915ff55963430e81134a35f65f511e5684c52f11 | [
"MIT"
] | 75 | 2020-07-29T06:50:13.000Z | 2022-03-13T16:14:57.000Z | # coding: utf-8
class ListNode:
def __init__(self, value, next=None):
self.value = value
self.next = next
class LinkedList:
def __init__(self, head=None):
self.head = head
# O(n)
def __len__(self):
length = 0
current_node = self.head
while current_node:... | 27.670968 | 87 | 0.542318 |
797b9c8b15546eb7fa17bc7a2de2496815fd128a | 3,454 | py | Python | activemq_xml/setup.py | chotiwat/integrations-core | 57a4437790cafcb769e120aa64d84aaecbf6a414 | [
"BSD-3-Clause"
] | 2 | 2019-04-03T17:21:38.000Z | 2020-02-04T16:28:05.000Z | activemq_xml/setup.py | chotiwat/integrations-core | 57a4437790cafcb769e120aa64d84aaecbf6a414 | [
"BSD-3-Clause"
] | 10 | 2018-02-27T19:06:07.000Z | 2021-08-30T03:23:26.000Z | activemq_xml/setup.py | chotiwat/integrations-core | 57a4437790cafcb769e120aa64d84aaecbf6a414 | [
"BSD-3-Clause"
] | 6 | 2018-01-09T21:37:20.000Z | 2020-05-26T09:28:09.000Z | # Always prefer setuptools over distutils
from setuptools import setup
# To use a consistent encoding
from codecs import open
from os import path
import json
import re
here = path.abspath(path.dirname(__file__))
def parse_req_line(line):
line = line.strip()
if not line or line.startswith('--hash') or line[0]... | 28.545455 | 92 | 0.634337 |
797b9d0e83ef580b1b785f7444899fc80e241825 | 1,441 | py | Python | src/pyuwds3/types/detection.py | uwds3/uwds3 | 3ec70111d63db0c8d97d9f1e0110b7fe9ad56179 | [
"MIT"
] | null | null | null | src/pyuwds3/types/detection.py | uwds3/uwds3 | 3ec70111d63db0c8d97d9f1e0110b7fe9ad56179 | [
"MIT"
] | null | null | null | src/pyuwds3/types/detection.py | uwds3/uwds3 | 3ec70111d63db0c8d97d9f1e0110b7fe9ad56179 | [
"MIT"
] | null | null | null | import cv2
from .bbox import BoundingBox
class Detection(object):
"""Represents a 2D detection associated with a label and a confidence"""
def __init__(self, xmin, ymin, xmax, ymax, label, confidence, depth=None, mask=None):
"""Detection constructor"""
self.label = label
self.confiden... | 43.666667 | 146 | 0.609299 |
797b9d102835ff0fc3b2edc08c436f1b35f774be | 1,469 | py | Python | backdoors2electricboogaloo/ssbdserver.py | binarioGH/minihacktools | 664e72ccc54089baa3b4d2ddc28bdcddbfdd1833 | [
"MIT"
] | null | null | null | backdoors2electricboogaloo/ssbdserver.py | binarioGH/minihacktools | 664e72ccc54089baa3b4d2ddc28bdcddbfdd1833 | [
"MIT"
] | null | null | null | backdoors2electricboogaloo/ssbdserver.py | binarioGH/minihacktools | 664e72ccc54089baa3b4d2ddc28bdcddbfdd1833 | [
"MIT"
] | null | null | null | #-*-coding: utf-8-*-
from pyautogui import screenshot
from socket import *
from smtplib import SMTP
from email.mime.multipart import MIMEMultipart
from email.mime.image import MIMEImage
from email.mime.text import MIMEText
from datetime import datetime
if __name__ == '__main__':
sock = socket(AF_INET, SOCK_STREAM)
... | 30.604167 | 114 | 0.646698 |
797b9d182727e9371914f2796d9d7e66db909681 | 3,121 | py | Python | oscar/lib/python2.7/site-packages/IPython/core/tests/test_extension.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/IPython/core/tests/test_extension.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/IPython/core/tests/test_extension.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | import os.path
import nose.tools as nt
import IPython.testing.tools as tt
from IPython.utils.syspathcontext import prepended_to_syspath
from IPython.utils.tempdir import TemporaryDirectory
ext1_content = """
def load_ipython_extension(ip):
print("Running ext1 load")
def unload_ipython_extension(ip):... | 32.175258 | 75 | 0.560397 |
797b9d2c7be5a1c3573a97b76068cbd233d63965 | 132,025 | py | Python | pyxpcs/form1_temp.py | Nikea/pyXPCS | de33c388dcdd92ef6aeccbeef58f8e274942de0f | [
"BSD-3-Clause"
] | 1 | 2018-06-14T03:37:17.000Z | 2018-06-14T03:37:17.000Z | pyxpcs/form1_temp.py | Nikea/pyXPCS | de33c388dcdd92ef6aeccbeef58f8e274942de0f | [
"BSD-3-Clause"
] | null | null | null | pyxpcs/form1_temp.py | Nikea/pyXPCS | de33c388dcdd92ef6aeccbeef58f8e274942de0f | [
"BSD-3-Clause"
] | 5 | 2016-08-21T23:55:17.000Z | 2020-05-19T18:21:45.000Z | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'form1_temp.ui'
#
# Created: Thu Nov 12 15:45:33 2009
# by: The PyQt User Interface Compiler (pyuic) 3.17.6
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import Qt
from mplwidget import *
from numpy import *
from ... | 48.843877 | 282 | 0.677637 |
797ba0384252018e62932bb372d66197d4c740dd | 1,323 | py | Python | scripts/generate_sphinx_docs_headers.py | competitive-programming-helper/atcoder-api | 2e90b73349ad30a35a944e546b96af3eef75706b | [
"MIT"
] | 1 | 2022-02-09T07:35:28.000Z | 2022-02-09T07:35:28.000Z | scripts/generate_sphinx_docs_headers.py | competitive-programming-helper/atcoder-api | 2e90b73349ad30a35a944e546b96af3eef75706b | [
"MIT"
] | 3 | 2022-02-02T04:39:08.000Z | 2022-02-07T23:40:14.000Z | scripts/generate_sphinx_docs_headers.py | competitive-programming-helper/atcoder-api | 2e90b73349ad30a35a944e546b96af3eef75706b | [
"MIT"
] | null | null | null | import os
import shutil
import sys
sys.path.append(".")
from scripts._docs_util import ROOT, get_sphinx_docs_directory
SPHINX_DOCS_HEADER = "AtCoder"
def _remove_current_docs(docs_path: str) -> None:
try:
shutil.rmtree(docs_path)
except Exception as e:
pass
finally:
pass
def _g... | 22.423729 | 65 | 0.579743 |
797ba147e944e8552e77fe0dba736dfc9d82f6dc | 1,463 | py | Python | part1/07a_disaster_detection_tfidf.py | hli8nova/ODSC2021_NLP | 4de1b599913114f29be03ead8a6038d4ab762ead | [
"MIT"
] | 4 | 2021-11-16T22:41:04.000Z | 2021-12-02T15:52:21.000Z | part1/07a_disaster_detection_tfidf.py | hli8nova/ODSC2021_NLP | 4de1b599913114f29be03ead8a6038d4ab762ead | [
"MIT"
] | null | null | null | part1/07a_disaster_detection_tfidf.py | hli8nova/ODSC2021_NLP | 4de1b599913114f29be03ead8a6038d4ab762ead | [
"MIT"
] | 8 | 2021-11-16T22:39:57.000Z | 2021-11-16T23:22:52.000Z | #!/usr/bin/env python
# coding: utf-8
# ## Disaster or not: Text Classification using TFIDF and Logistic Regression
import numpy as np
import pandas as pd
import pickle
# ### Load data
from pathlib import Path
cwd = Path(__file__).parent
data_path = cwd / "disaster_data/train.csv"
pd.read_csv(data_path).head()
... | 21.514706 | 111 | 0.731374 |
797ba22d7de3fc36e1199f2d46a0c1106e1cbb01 | 5,421 | py | Python | sami2py/tests/test_utils.py | zzyztyy/sami2py | d36f7994ad0a7d2d01bd66f916697827ee380a9b | [
"BSD-3-Clause"
] | null | null | null | sami2py/tests/test_utils.py | zzyztyy/sami2py | d36f7994ad0a7d2d01bd66f916697827ee380a9b | [
"BSD-3-Clause"
] | null | null | null | sami2py/tests/test_utils.py | zzyztyy/sami2py | d36f7994ad0a7d2d01bd66f916697827ee380a9b | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (C) 2017, JK & AGB
# Full license can be found in License.md
# -----------------------------------------------------------------------------
""" Tests the utilities functions
"""
from __future__ import (print_function)
import os
import numpy as np
import sami2py
import pytest
clas... | 41.7 | 79 | 0.592511 |
797ba33169e63ae19d649bfc13e16f92527dab9d | 2,835 | py | Python | patches.py | timkurvers/synacor-binja-plugin | 2ba0b1599c17136c2f134751f327a835af83798c | [
"MIT"
] | 2 | 2020-05-17T12:15:58.000Z | 2021-09-17T15:01:33.000Z | patches.py | timkurvers/synacor-binja-plugin | 2ba0b1599c17136c2f134751f327a835af83798c | [
"MIT"
] | 1 | 2020-06-09T18:48:22.000Z | 2020-06-09T18:48:35.000Z | patches.py | timkurvers/synacor-binja-plugin | 2ba0b1599c17136c2f134751f327a835af83798c | [
"MIT"
] | null | null | null | # pylint: disable = line-too-long
import os
import sys
# Patch Synacor support into Vector35's debugger plugin
def patch_debugger():
# Do nothing if the debugger plugin is not installed
plugin = sys.modules.get('Vector35_debugger.binjaplug')
if not plugin:
return
def get_module_for_addr(self,... | 39.375 | 103 | 0.636332 |
797ba3742bcfd38a51ae79612a11c5fbdfc04e56 | 3,508 | py | Python | examples/horizon2.py | richjoyce/stader | 24811178026fe057a51c279ec99e79aae733659f | [
"BSD-3-Clause"
] | null | null | null | examples/horizon2.py | richjoyce/stader | 24811178026fe057a51c279ec99e79aae733659f | [
"BSD-3-Clause"
] | null | null | null | examples/horizon2.py | richjoyce/stader | 24811178026fe057a51c279ec99e79aae733659f | [
"BSD-3-Clause"
] | null | null | null | import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation
from matplotlib.patches import Polygon
import numpy as np
import stader
d = stader.load_aircraft('b747_flight_condition2')
ac = stader.Aircraft(d)
msec = 15
dt = msec/1000
show_state = False
if show_state:
fig = plt.figure(figsize=(1... | 29.728814 | 101 | 0.583238 |
797ba3ce5ce939dc298e57e18fc7ff032d596f0b | 70 | py | Python | double3/double3sdk/depth/depth.py | CLOMING/winter2021_double | 9b920baaeb3736a785a6505310b972c49b5b21e9 | [
"Apache-2.0"
] | null | null | null | double3/double3sdk/depth/depth.py | CLOMING/winter2021_double | 9b920baaeb3736a785a6505310b972c49b5b21e9 | [
"Apache-2.0"
] | null | null | null | double3/double3sdk/depth/depth.py | CLOMING/winter2021_double | 9b920baaeb3736a785a6505310b972c49b5b21e9 | [
"Apache-2.0"
] | null | null | null | from double3sdk.double_api import _DoubleAPI
class _Depth:
pass
| 11.666667 | 44 | 0.785714 |
797ba433cdf86bc4133d78ef6a7fe3d6047366be | 2,318 | py | Python | tests/data23/recipe-66064.py | JohannesBuchner/pystrict3 | f442a89ac6a23f4323daed8ef829d8e9e1197f90 | [
"BSD-2-Clause"
] | 1 | 2020-06-05T08:53:26.000Z | 2020-06-05T08:53:26.000Z | tests/data23/recipe-66064.py | JohannesBuchner/pystrict3 | f442a89ac6a23f4323daed8ef829d8e9e1197f90 | [
"BSD-2-Clause"
] | 1 | 2020-06-04T13:47:19.000Z | 2020-06-04T13:47:57.000Z | tests/data23/recipe-66064.py | JohannesBuchner/pystrict3 | f442a89ac6a23f4323daed8ef829d8e9e1197f90 | [
"BSD-2-Clause"
] | 1 | 2020-11-07T17:02:46.000Z | 2020-11-07T17:02:46.000Z | class LogicalLines:
def __init__(self, fileobj, continued=None):
# self.seq: the underlying line-sequence
# self.phys_num: current index into self.seq (physical line number)
# self.logi_num: current index into self (logical line number)
import xreadlines
try: self.seq = fileo... | 35.661538 | 75 | 0.608714 |
797ba52260e277552d024e05d31331636a3c314f | 2,088 | py | Python | defi_historical/misc/users.py | Poseyy/eth_analytics | 068ac14c868f2fb062567b7ed820869b5c4f1f59 | [
"MIT"
] | 68 | 2020-11-18T15:03:04.000Z | 2022-03-25T18:27:33.000Z | defi_historical/misc/users.py | kryptokhick/eth_analytics | 068ac14c868f2fb062567b7ed820869b5c4f1f59 | [
"MIT"
] | 1 | 2021-05-21T05:05:45.000Z | 2021-05-21T05:05:45.000Z | defi_historical/misc/users.py | kryptokhick/eth_analytics | 068ac14c868f2fb062567b7ed820869b5c4f1f59 | [
"MIT"
] | 26 | 2021-02-04T22:40:00.000Z | 2022-01-13T13:08:38.000Z | import pandas as pd
import plotly.graph_objects as go
import plotly.express as px
# Users over time
users_data = pd.read_csv('data/total_users.csv')
uniswap_users_data = pd.read_csv('data/uniswap_users.csv')
compound_users_data = pd.read_csv('data/compound_users.csv')
yearn_users_data = pd.read_csv('data/yearn... | 24.564706 | 104 | 0.59387 |
797ba691d7fba3de22aaf5a1a939f74ef2a94668 | 54,787 | py | Python | bipartitepandas/bipartitebase.py | adamoppenheimer/bipartitepandas | 529f139602d2eda75034824098c8a59300e13472 | [
"MIT"
] | 3 | 2021-07-02T10:00:07.000Z | 2022-02-13T16:38:48.000Z | bipartitepandas/bipartitebase.py | adamoppenheimer/bipartitepandas | 529f139602d2eda75034824098c8a59300e13472 | [
"MIT"
] | 2 | 2021-12-08T15:27:13.000Z | 2022-02-08T07:43:12.000Z | bipartitepandas/bipartitebase.py | tlamadon/bipartitepandas | 2690143d4880d41d99324eb23d855ba804cf6c64 | [
"MIT"
] | null | null | null | '''
Class for a bipartite network
'''
from pandas.core.indexes.base import InvalidIndexError
from tqdm.auto import tqdm
import numpy as np
# from numpy_groupies.aggregate_numpy import aggregate
import pandas as pd
from pandas import DataFrame, Int64Dtype
# from scipy.sparse.csgraph import connected_components
import wa... | 46.627234 | 479 | 0.615146 |
797ba6ca64a966f546063a20e30d15931c23376e | 4,788 | py | Python | server/models.py | pareeohnos/ktrade | 1eaed1ff16ded580d5649c667935357567e7b514 | [
"MIT"
] | 5 | 2021-09-08T11:04:15.000Z | 2021-11-27T08:42:23.000Z | server/models.py | pareeohnos/ktrade | 1eaed1ff16ded580d5649c667935357567e7b514 | [
"MIT"
] | 36 | 2021-08-31T09:28:10.000Z | 2021-12-10T06:47:04.000Z | server/models.py | pareeohnos/ktrade | 1eaed1ff16ded580d5649c667935357567e7b514 | [
"MIT"
] | 2 | 2021-08-29T02:53:54.000Z | 2021-08-29T06:21:36.000Z | from application import db
from sqlalchemy import ForeignKey
from sqlalchemy.orm import relationship
from marshmallow import Schema, fields
from server.enums.trade_status import TradeStatus
class BaseModel(db.Model):
__abstract__ = True
@classmethod
def find(cls, session, id):
return session.query(cls).fil... | 29.555556 | 91 | 0.727026 |
797ba7ebc5aeb9d026219502fe4071927bbbdfba | 2,383 | py | Python | in-develop/src/autobridge/Opt/GlobalRouting.py | Blaok/AutoBridge | e296a6d5ffe96ddf7ee35bd239ce1cd4a41f3670 | [
"MIT"
] | null | null | null | in-develop/src/autobridge/Opt/GlobalRouting.py | Blaok/AutoBridge | e296a6d5ffe96ddf7ee35bd239ce1cd4a41f3670 | [
"MIT"
] | null | null | null | in-develop/src/autobridge/Opt/GlobalRouting.py | Blaok/AutoBridge | e296a6d5ffe96ddf7ee35bd239ce1cd4a41f3670 | [
"MIT"
] | null | null | null | import logging
class GlobalRouting:
def __init__(self, floorplan, top_rtl_parser, slot_manager):
self.floorplan = floorplan
self.top_rtl_parser = top_rtl_parser
self.slot_manager = slot_manager
self.v2s = floorplan.getVertexToSlot()
self.s2e = floorplan.getSlotToEdges()
self.e_name2path = {}... | 34.042857 | 139 | 0.624843 |
797ba960d5ca5157cb10e9d2200f9030e86d85dd | 5,017 | py | Python | intropyproject-classify-pet-images/adjust_results4_isadog.py | hasib457/AIPND-revision | d2808f5ea64ccb218da4dfd5f4cc5e397e78dc3c | [
"MIT"
] | null | null | null | intropyproject-classify-pet-images/adjust_results4_isadog.py | hasib457/AIPND-revision | d2808f5ea64ccb218da4dfd5f4cc5e397e78dc3c | [
"MIT"
] | null | null | null | intropyproject-classify-pet-images/adjust_results4_isadog.py | hasib457/AIPND-revision | d2808f5ea64ccb218da4dfd5f4cc5e397e78dc3c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# */AIPND-revision/intropyproject-classify-pet-images/adjust_results4_isadog.py
#
# PROGRAMMER:
# DATE CREATED:
# REVISED DATE:
# PURPOSE: Create a function adju... | 54.532609 | 85 | 0.60893 |
797baa72fc4331f1bac0cca9874bd2b377aa0137 | 10,276 | py | Python | lib/tool_shed/test/functional/test_0010_repository_with_tool_dependencies.py | quacksawbones/galaxy-1 | 65f7259b29d3886e526d9be670c60d9da9fbe038 | [
"CC-BY-3.0"
] | 1,085 | 2015-02-18T16:14:38.000Z | 2022-03-30T23:52:07.000Z | lib/tool_shed/test/functional/test_0010_repository_with_tool_dependencies.py | quacksawbones/galaxy-1 | 65f7259b29d3886e526d9be670c60d9da9fbe038 | [
"CC-BY-3.0"
] | 11,253 | 2015-02-18T17:47:32.000Z | 2022-03-31T21:47:03.000Z | lib/tool_shed/test/functional/test_0010_repository_with_tool_dependencies.py | quacksawbones/galaxy-1 | 65f7259b29d3886e526d9be670c60d9da9fbe038 | [
"CC-BY-3.0"
] | 1,000 | 2015-02-18T16:18:10.000Z | 2022-03-29T08:22:56.000Z | import os
from ..base.twilltestcase import common, ShedTwillTestCase
repository_name = 'freebayes_0010'
repository_description = "Galaxy's freebayes tool"
repository_long_description = "Long description of Galaxy's freebayes tool"
'''
1. Create repository freebayes_0020 and upload only the tool XML.
2. Upload the to... | 61.903614 | 150 | 0.666504 |
797baae596fc05a26e8e2bca133e44ca42392af5 | 777 | py | Python | 506/migrations/versions/cd655e9d2204_.py | kaixiang1992/python-flask | 2b4c597d83f5a6ed662d42d7ff692e563a9adbf8 | [
"MIT"
] | null | null | null | 506/migrations/versions/cd655e9d2204_.py | kaixiang1992/python-flask | 2b4c597d83f5a6ed662d42d7ff692e563a9adbf8 | [
"MIT"
] | null | null | null | 506/migrations/versions/cd655e9d2204_.py | kaixiang1992/python-flask | 2b4c597d83f5a6ed662d42d7ff692e563a9adbf8 | [
"MIT"
] | null | null | null | """empty message
Revision ID: cd655e9d2204
Revises: 3b2b2d4fc921
Create Date: 2020-03-01 20:25:49.835809
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'cd655e9d2204'
down_revision = '3b2b2d4fc921'
branch_labels = None
depends_on = None
def upgrade():
# ... | 25.064516 | 85 | 0.688546 |
797babae37790d29b70c38edc7b8bc74a1111f14 | 6,822 | py | Python | armor_detection_node.py | lyjslay/Robomaster-2020-Tars-Go-Vision | 862bce60cc00efc5ae10b70272356feb055cc759 | [
"MIT"
] | 2 | 2020-08-26T12:51:56.000Z | 2022-03-04T13:57:04.000Z | armor_detection_node.py | lyjslay/Robomaster-2020-Tars-Go-Vision | 862bce60cc00efc5ae10b70272356feb055cc759 | [
"MIT"
] | null | null | null | armor_detection_node.py | lyjslay/Robomaster-2020-Tars-Go-Vision | 862bce60cc00efc5ae10b70272356feb055cc759 | [
"MIT"
] | null | null | null | #! /home/lyjslay/py3env/bin python
# coding=utf-8
#================================================================
# Copyright (C) 2019 * Ltd. All rights reserved.
#
# File name : armor_detectoion_node.py
# Author : Liu Yijun
# E-Mail : 2446078134@qq.com
# Description : Armor Detection ROS Node
#... | 38.111732 | 127 | 0.659631 |
797bac1a6f48de4a92ed2806451d78a4f109e945 | 13,904 | py | Python | tests/regex_tests/reserved_words_regex_test.py | alexmakii/bslint | 0795467166ca10c362fecc12ac17765cb85b659b | [
"BSD-3-Clause"
] | null | null | null | tests/regex_tests/reserved_words_regex_test.py | alexmakii/bslint | 0795467166ca10c362fecc12ac17765cb85b659b | [
"BSD-3-Clause"
] | null | null | null | tests/regex_tests/reserved_words_regex_test.py | alexmakii/bslint | 0795467166ca10c362fecc12ac17765cb85b659b | [
"BSD-3-Clause"
] | 1 | 2017-04-12T09:39:54.000Z | 2017-04-12T09:39:54.000Z | import unittest
import bslint.constants as const
import bslint.lexer.handlers.regex_handler as regex_handler
from tests.resources.common.test_methods import CommonMethods as Common
class TestReservedWordsRegex(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.common = Common()
def test_... | 35.28934 | 102 | 0.690665 |
797bac4ebfb295f8e4b29bb5ab295e4c3a2bcd7e | 3,050 | py | Python | lishixian/auto.py | znsoooo/lishixian | 1fbf8529154cc3a215900f80f926bb87ef471761 | [
"MIT"
] | null | null | null | lishixian/auto.py | znsoooo/lishixian | 1fbf8529154cc3a215900f80f926bb87ef471761 | [
"MIT"
] | null | null | null | lishixian/auto.py | znsoooo/lishixian | 1fbf8529154cc3a215900f80f926bb87ef471761 | [
"MIT"
] | null | null | null | """Office Automation"""
import os
import sys
import time
from threading import Thread
__all__ = list(globals())
# PAUSE = pyautogui.PAUSE
def shortcut(p=None, make=True): # get_path: desktop/programs/startup/...
import winshell
p = p or winshell.desktop()
path = sys.argv[0]
name = os.path.splite... | 25.847458 | 90 | 0.55377 |
797bac5b47c19a6e7811fc4f83f1906a1ac310dc | 53,354 | py | Python | superset/utils/core.py | furyou81/superset | 319125ec3b292a9e92666e059580b8ddd952c832 | [
"Apache-2.0"
] | null | null | null | superset/utils/core.py | furyou81/superset | 319125ec3b292a9e92666e059580b8ddd952c832 | [
"Apache-2.0"
] | 26 | 2020-12-23T07:22:16.000Z | 2022-02-16T06:53:36.000Z | superset/utils/core.py | furyou81/superset | 319125ec3b292a9e92666e059580b8ddd952c832 | [
"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... | 31.682898 | 96 | 0.631312 |
797baec9446fc0c63252d783f8fdbecb44483096 | 10,612 | py | Python | src/pykoda/data/getdata.py | KoDa-project/pykoda | a7460e5bf4d39b9cd3793efbbdbb341bc1e751c0 | [
"BSD-3-Clause"
] | 1 | 2022-02-21T10:00:26.000Z | 2022-02-21T10:00:26.000Z | src/pykoda/data/getdata.py | KoDa-project/pykoda | a7460e5bf4d39b9cd3793efbbdbb341bc1e751c0 | [
"BSD-3-Clause"
] | null | null | null | src/pykoda/data/getdata.py | KoDa-project/pykoda | a7460e5bf4d39b9cd3793efbbdbb341bc1e751c0 | [
"BSD-3-Clause"
] | null | null | null | '''
This module is used to download the data from several feeds in the public KoDa API.
Supported companies:
- dintur - Västernorrlands län: Only GTFSStatic
- dt - Dalatrafik
- klt - Kalmar länstrafik
- krono - Kronobergs Länstrafik: Only GTFSStatic
- otraf - Östgötatrafiken
- sj - SJ + Snälltåget + Tågab: Only GTFSSt... | 39.597015 | 132 | 0.624387 |
797bb075083a3e49783bada3d534070f13d57ceb | 11,132 | py | Python | datalad_osf/osfclient/osfclient/tests/fake_responses.py | adswa/datalad-osf-2 | 25988f898ffc6f489c0855933136f39f79cf8c65 | [
"BSD-3-Clause"
] | null | null | null | datalad_osf/osfclient/osfclient/tests/fake_responses.py | adswa/datalad-osf-2 | 25988f898ffc6f489c0855933136f39f79cf8c65 | [
"BSD-3-Clause"
] | 1 | 2020-06-16T17:26:16.000Z | 2020-06-16T17:26:16.000Z | datalad_osf/osfclient/osfclient/tests/fake_responses.py | adswa/datalad-osf-2 | 25988f898ffc6f489c0855933136f39f79cf8c65 | [
"BSD-3-Clause"
] | 1 | 2019-11-21T20:28:51.000Z | 2019-11-21T20:28:51.000Z | import json
# Use this to initialize a `Project` instance
node_json = """
{
"data": {
"relationships": {
"files": {
"links": {
"related": {
"href": "https://api.osf.io/v2/nodes/f3szh/files/",
"meta": {}
}
}
},
"view_only_links": {
... | 28.253807 | 114 | 0.424003 |
797bb2615ea656be4a44f10ef3516c4745c8e570 | 9,056 | py | Python | train.py | wanghuajing/unet-pytorch | 53e187e15d3676f08c8f594017f026047faff66a | [
"MIT"
] | null | null | null | train.py | wanghuajing/unet-pytorch | 53e187e15d3676f08c8f594017f026047faff66a | [
"MIT"
] | null | null | null | train.py | wanghuajing/unet-pytorch | 53e187e15d3676f08c8f594017f026047faff66a | [
"MIT"
] | null | null | null | import time
import numpy as np
import torch
import torch.backends.cudnn as cudnn
import torch.optim as optim
import torchvision.models as models
from PIL import Image
from torch import nn
from torch.autograd import Variable
from torch.utils.data import DataLoader
from torchvision import models
from tqdm import tqdm
f... | 38.53617 | 153 | 0.548366 |
797bb2a308445293267fac6836d932ed8079a985 | 1,696 | py | Python | setup.py | wq/html-json-forms | abffa4324a5f6d650283dd29deb347ba39d99e56 | [
"MIT"
] | 30 | 2016-03-04T22:56:31.000Z | 2020-06-02T19:43:15.000Z | setup.py | wq/html-json-forms | abffa4324a5f6d650283dd29deb347ba39d99e56 | [
"MIT"
] | 2 | 2016-12-13T18:18:14.000Z | 2019-04-17T05:20:33.000Z | setup.py | wq/html-json-forms | abffa4324a5f6d650283dd29deb347ba39d99e56 | [
"MIT"
] | 4 | 2019-04-09T18:24:31.000Z | 2021-04-02T01:17:50.000Z | from setuptools import setup
LONG_DESCRIPTION = """
Implementation of the HTML JSON Forms spec for use with the Django REST Framework.
"""
def readme():
try:
readme = open('README.md')
except IOError:
return LONG_DESCRIPTION
else:
return readme.read()
setup(
name='html-json-... | 29.241379 | 82 | 0.586085 |
797bb357f4dd207990438ba999964b416ed8c454 | 25,117 | py | Python | src/ezdxf/entities/dxfgfx.py | bimdata/ezdxf | 0004f4ea1f6905a1c19b92187f6de91e0bc144f7 | [
"MIT"
] | null | null | null | src/ezdxf/entities/dxfgfx.py | bimdata/ezdxf | 0004f4ea1f6905a1c19b92187f6de91e0bc144f7 | [
"MIT"
] | null | null | null | src/ezdxf/entities/dxfgfx.py | bimdata/ezdxf | 0004f4ea1f6905a1c19b92187f6de91e0bc144f7 | [
"MIT"
] | null | null | null | # Copyright (c) 2019-2022 Manfred Moitzi
# License: MIT License
from typing import TYPE_CHECKING, Optional, Tuple, Iterable, Dict, Any
from ezdxf.entities import factory
from ezdxf import options
from ezdxf.lldxf import validator
from ezdxf.lldxf.attributes import (
DXFAttr,
DXFAttributes,
DefSubclass,
... | 34.836338 | 92 | 0.609587 |
797bb360f5a095ad751bdbe52d37c317a1dc61fc | 1,065 | py | Python | numGuess.py | Ultraluxe25/Python_generation_Stepik | 9219c6033b939ae6bac41c32795600dc08259ac3 | [
"MIT"
] | null | null | null | numGuess.py | Ultraluxe25/Python_generation_Stepik | 9219c6033b939ae6bac41c32795600dc08259ac3 | [
"MIT"
] | null | null | null | numGuess.py | Ultraluxe25/Python_generation_Stepik | 9219c6033b939ae6bac41c32795600dc08259ac3 | [
"MIT"
] | null | null | null | import random
right = int(input('Введите правую границу диапазона '))
guess = random.randint(1, right)
print('Добро пожаловать в числовую угадайку')
def is_valid(number):
if 1 <= int(number) <= right and number.isdigit():
return True
else:
return False
# print(guess) тут можн... | 28.783784 | 76 | 0.602817 |
797bb5c3a727045dcbbab9ce9aac0caac3a7e876 | 6,340 | py | Python | reana_workflow_engine_yadage/externalbackend.py | matthewfeickert/reana-workflow-engine-yadage | ac194f6d2972ea77642ba5d3f10d2da2173fff0e | [
"MIT"
] | null | null | null | reana_workflow_engine_yadage/externalbackend.py | matthewfeickert/reana-workflow-engine-yadage | ac194f6d2972ea77642ba5d3f10d2da2173fff0e | [
"MIT"
] | null | null | null | reana_workflow_engine_yadage/externalbackend.py | matthewfeickert/reana-workflow-engine-yadage | ac194f6d2972ea77642ba5d3f10d2da2173fff0e | [
"MIT"
] | null | null | null | # This file is part of REANA.
# Copyright (C) 2017-2021 CERN.
#
# REANA is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""REANA-Workflow-Engine-yadage REANA packtivity backend."""
import base64
import logging
import os
from typing imp... | 35.819209 | 89 | 0.637382 |
797bb664d67f77aeb37b2c49bddf2db2ad7c4326 | 10,687 | py | Python | mil_common/perception/mil_vision/mil_vision_tools/color_classifier.py | RishiKumarRay/mil | f3746a91e68aac713e86b380cdda8852ba826170 | [
"MIT"
] | null | null | null | mil_common/perception/mil_vision/mil_vision_tools/color_classifier.py | RishiKumarRay/mil | f3746a91e68aac713e86b380cdda8852ba826170 | [
"MIT"
] | null | null | null | mil_common/perception/mil_vision/mil_vision_tools/color_classifier.py | RishiKumarRay/mil | f3746a91e68aac713e86b380cdda8852ba826170 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from abc import ABCMeta, abstractmethod, abstractproperty
from mil_vision_tools import LabelBoxParser, contour_mask
import cv2
import numpy as np
from sklearn.naive_bayes import GaussianNB
import pandas
import argparse
__author__ = 'Kevin Allen'
def _get_param(one, two):
'''
Hel... | 41.746094 | 120 | 0.648919 |
797bb741380cba73663f015a1d03b88fafc293a3 | 5,059 | py | Python | dags/mapping_dag.py | danieldjewell/starthinker | 3327d5874f01d7563603b8a82c1ecd6615b9768d | [
"Apache-2.0"
] | 1 | 2020-12-04T17:13:35.000Z | 2020-12-04T17:13:35.000Z | dags/mapping_dag.py | hgrias/starthinker | b9ed33e23b4ffd72565a31ebb8a8041d346bfca2 | [
"Apache-2.0"
] | null | null | null | dags/mapping_dag.py | hgrias/starthinker | b9ed33e23b4ffd72565a31ebb8a8041d346bfca2 | [
"Apache-2.0"
] | null | null | null | ###########################################################################
#
# 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
#
# https://www.apache.org/l... | 29.758824 | 145 | 0.521842 |
797bb741b2063d744e3f6aa59d86e7ee81297bc2 | 13,405 | bzl | Python | proto/proto.bzl | jmillikin/rules_rust | feb8642761ba923de735a102bf43d090254b92ff | [
"Apache-2.0"
] | null | null | null | proto/proto.bzl | jmillikin/rules_rust | feb8642761ba923de735a102bf43d090254b92ff | [
"Apache-2.0"
] | null | null | null | proto/proto.bzl | jmillikin/rules_rust | feb8642761ba923de735a102bf43d090254b92ff | [
"Apache-2.0"
] | null | null | null | # 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... | 32.301205 | 102 | 0.640582 |
797bb7b33fff6351b17a8f2f2b189935aa839fdf | 9,144 | py | Python | python/federatedml/linear_model/logistic_regression/hetero_logistic_regression/hetero_lr_guest.py | kakasu/FATE | cfc61ef268154e08a9e7125c047c318c5e5eb42a | [
"Apache-2.0"
] | 2 | 2020-11-21T11:25:08.000Z | 2020-11-21T11:25:11.000Z | python/federatedml/linear_model/logistic_regression/hetero_logistic_regression/hetero_lr_guest.py | TroubleMaker1994/FATE | 23ad848bcc7ae7f304a376d3f46f4af26872c8a2 | [
"Apache-2.0"
] | null | null | null | python/federatedml/linear_model/logistic_regression/hetero_logistic_regression/hetero_lr_guest.py | TroubleMaker1994/FATE | 23ad848bcc7ae7f304a376d3f46f4af26872c8a2 | [
"Apache-2.0"
] | 1 | 2021-02-03T08:23:42.000Z | 2021-02-03T08:23:42.000Z | #
# Copyright 2019 The FATE 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 appli... | 45.949749 | 121 | 0.659558 |
797bb8cff3546011f3c77ffeebffb0ac2c1b5437 | 4,146 | py | Python | containers/mobilenet/dataset/scripts/tar_to_record.py | phonymacoroni/ml-react-app | bf2b146e05df25cf2fd78c203bf9daa7ba3784b1 | [
"BSD-3-Clause"
] | null | null | null | containers/mobilenet/dataset/scripts/tar_to_record.py | phonymacoroni/ml-react-app | bf2b146e05df25cf2fd78c203bf9daa7ba3784b1 | [
"BSD-3-Clause"
] | null | null | null | containers/mobilenet/dataset/scripts/tar_to_record.py | phonymacoroni/ml-react-app | bf2b146e05df25cf2fd78c203bf9daa7ba3784b1 | [
"BSD-3-Clause"
] | 1 | 2020-11-15T20:35:18.000Z | 2020-11-15T20:35:18.000Z | import sys, os, shutil, tarfile, argparse, zipfile
import json_to_csv, generate_tfrecord, parse_meta, parse_hyperparams
from os.path import join, splitext, split
def main(dataset_paths, percent_eval, directory):
ROOT_PATH, PATH_EXT = os.path.splitext(dataset_paths[-1])
DATASET_NAME = ROOT_PATH.split('/')[-1]
... | 42.742268 | 190 | 0.640376 |
797bb93b0bb06244e88878c0b017b20cf8a728d2 | 6,160 | py | Python | src/climsoft_api/services/obselement_service.py | opencdms/climsoft-api | 860656423f78a2360ea7a581ea1642f6c3acb442 | [
"MIT"
] | null | null | null | src/climsoft_api/services/obselement_service.py | opencdms/climsoft-api | 860656423f78a2360ea7a581ea1642f6c3acb442 | [
"MIT"
] | 2 | 2022-01-16T15:41:27.000Z | 2022-01-30T18:37:13.000Z | src/climsoft_api/services/obselement_service.py | opencdms/climsoft-api | 860656423f78a2360ea7a581ea1642f6c3acb442 | [
"MIT"
] | 2 | 2021-12-22T21:50:19.000Z | 2022-01-28T12:53:32.000Z | import logging
from typing import List, Tuple
import backoff
import sqlalchemy.exc
from sqlalchemy.orm.query import Query
from climsoft_api.api.obselement import schema as obselement_schema
from climsoft_api.utils.query import get_count
from fastapi.exceptions import HTTPException
from opencdms.models.climsoft import v... | 30.49505 | 81 | 0.683442 |
797bb9774f97cffbed87a8558cf160fdea6122da | 1,970 | py | Python | wdwd/svm.py | taebinkim7/weighted-dwd | 6b3bbf1d7f4f1467a2c3483dcf4fc1b212a8acfa | [
"MIT"
] | null | null | null | wdwd/svm.py | taebinkim7/weighted-dwd | 6b3bbf1d7f4f1467a2c3483dcf4fc1b212a8acfa | [
"MIT"
] | null | null | null | wdwd/svm.py | taebinkim7/weighted-dwd | 6b3bbf1d7f4f1467a2c3483dcf4fc1b212a8acfa | [
"MIT"
] | null | null | null | import cvxpy as cp
import numpy as np
from sklearn.base import BaseEstimator # , TransformerMixin, ClassifierMixin
from wdwd.linear_model import LinearClassifierMixin
def solve_svm(X, y, C, sample_weight=None, solver_kws={}):
"""
Solves soft-margin SVM problem.
min_{beta, intercept}
(1/n) * sum_{i... | 23.73494 | 77 | 0.623858 |
797bbb59e28db72216409d9ca7c767850a1eb0a5 | 1,721 | py | Python | dtumlops/visualization/visualize.py | michaelfeil/dtu_mlops_cookiecutter | eb29f44f09e01c76a21be71074603ee5f87605ef | [
"MIT"
] | null | null | null | dtumlops/visualization/visualize.py | michaelfeil/dtu_mlops_cookiecutter | eb29f44f09e01c76a21be71074603ee5f87605ef | [
"MIT"
] | null | null | null | dtumlops/visualization/visualize.py | michaelfeil/dtu_mlops_cookiecutter | eb29f44f09e01c76a21be71074603ee5f87605ef | [
"MIT"
] | null | null | null | import os
import matplotlib.pyplot as plt
import seaborn as sns
import torch
from sklearn.manifold import TSNE
from dtumlops.data.data_utils import retrieve_mnist
from dtumlops.models.model import MyAwesomeModel
features = {}
a = 0
class VisCNNFeatures:
def get_features(self, name):
"""HELPER FUNCTION FO... | 29.169492 | 80 | 0.636839 |
797bbc38576cae77700bf565de97d51d64ab5dac | 675 | py | Python | app/models/form_element_list_value.py | attachemd/backend_v03 | c14b1b9e1c00187f5df8c3a3a4407eb5938aa314 | [
"MIT"
] | null | null | null | app/models/form_element_list_value.py | attachemd/backend_v03 | c14b1b9e1c00187f5df8c3a3a4407eb5938aa314 | [
"MIT"
] | null | null | null | app/models/form_element_list_value.py | attachemd/backend_v03 | c14b1b9e1c00187f5df8c3a3a4407eb5938aa314 | [
"MIT"
] | null | null | null | from sqlalchemy import (
Column,
Integer,
String,
ForeignKey,
)
from sqlalchemy.orm import relationship
from app.db.base_class import Base
# ANCHOR[id=FormElementListValue]
class FormElementListValue(Base):
__tablename__ = "form_element_list_values"
id = Column(Integer, primary_key=True, index=... | 29.347826 | 69 | 0.711111 |
797bbc589899db696f659c5961f28cef188b0c6c | 6,615 | py | Python | src/python/pants/backend/python/util_rules/pex_cli.py | thamenato/pants | bc4a8fb3f07f6145649f02b06a1e5599aa28b36c | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/python/util_rules/pex_cli.py | thamenato/pants | bc4a8fb3f07f6145649f02b06a1e5599aa28b36c | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/python/util_rules/pex_cli.py | thamenato/pants | bc4a8fb3f07f6145649f02b06a1e5599aa28b36c | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import dataclasses
import os
from dataclasses import dataclass
from pathlib import Path
from typing import Iterable, List, Mapping, Optional, Tuple
from pants.backend.python.subsystems.py... | 38.017241 | 100 | 0.691912 |
797bbc66aae427f3873eedfbe782bedd8dbe7452 | 9,852 | py | Python | brave/api/route_handler.py | niklasR/brave | 5234bd9cecd6d7282cd0b50acfda44890cf4cfb8 | [
"Apache-2.0"
] | null | null | null | brave/api/route_handler.py | niklasR/brave | 5234bd9cecd6d7282cd0b50acfda44890cf4cfb8 | [
"Apache-2.0"
] | null | null | null | brave/api/route_handler.py | niklasR/brave | 5234bd9cecd6d7282cd0b50acfda44890cf4cfb8 | [
"Apache-2.0"
] | null | null | null | import logging
logger = logging.getLogger('brave.rest_api')
import sanic
import brave.session
import sanic.response
from brave.helpers import state_string_to_constant, run_on_master_thread_when_idle
async def all(request):
session = brave.session.get_session()
return sanic.response.json({
'inputs': se... | 35.566787 | 93 | 0.709399 |
797bbd86fadcedc9b343ad04b3e4f3ab20f2755a | 2,758 | py | Python | testsuite/test_rmse_run.py | C2SM/clim-sanity-checker | 3d5d610b16ca7e87c841ef7ad06a94d0399b4773 | [
"MIT"
] | null | null | null | testsuite/test_rmse_run.py | C2SM/clim-sanity-checker | 3d5d610b16ca7e87c841ef7ad06a94d0399b4773 | [
"MIT"
] | 3 | 2021-07-29T11:26:20.000Z | 2021-07-29T16:01:54.000Z | testsuite/test_rmse_run.py | C2SM/clim-sanity-checker | 3d5d610b16ca7e87c841ef7ad06a94d0399b4773 | [
"MIT"
] | null | null | null | import testsuite.utils as utils
import os
def test_fldcor_embed():
input_dir = 'testsuite/data'
exp_name = 'run_emded'
files_generated = []
os.makedirs('testsuite/stages',exist_ok=True)
standard_postproc = 'testsuite/stages/standard_postproc_rmse_{}.nc'\
.format(exp_name)
files_gene... | 29.655914 | 72 | 0.642132 |
797bc07c1492d15d5a428c87e142eca4d3b4a171 | 4,071 | py | Python | django_twilio/decorators.py | Fwhiteiv/django-twilio | bdb72bd8af46f96c97655cc9021cf9f1f9f26ae1 | [
"Unlicense"
] | 173 | 2015-01-13T00:56:18.000Z | 2022-03-29T14:16:51.000Z | django_twilio/decorators.py | Fwhiteiv/django-twilio | bdb72bd8af46f96c97655cc9021cf9f1f9f26ae1 | [
"Unlicense"
] | 76 | 2015-01-11T23:48:35.000Z | 2022-03-18T03:28:50.000Z | django_twilio/decorators.py | Fwhiteiv/django-twilio | bdb72bd8af46f96c97655cc9021cf9f1f9f26ae1 | [
"Unlicense"
] | 66 | 2015-01-24T11:47:25.000Z | 2022-03-16T23:04:45.000Z | # -*- coding: utf-8 -*-
"""
Useful decorators.
"""
from functools import wraps
from django.conf import settings
from django.views.decorators.csrf import csrf_exempt
from django.http import (
HttpRequest, HttpResponse, HttpResponseForbidden, HttpResponseNotAllowed)
from twilio.twiml import TwiML as Verb
from twi... | 34.794872 | 79 | 0.631295 |
797bc102a3dde3e36fc3213304bb63a757a24ace | 2,509 | py | Python | distrobuild/lookaside/__init__.py | rocky-linux/distrobuild | 5f4f2356175537607376b84ad4282f13a4b4d2b7 | [
"MIT"
] | 30 | 2021-04-19T22:22:33.000Z | 2021-11-12T09:45:48.000Z | distrobuild/lookaside/__init__.py | rocky-linux/distrobuild | 5f4f2356175537607376b84ad4282f13a4b4d2b7 | [
"MIT"
] | 5 | 2021-04-19T23:16:06.000Z | 2021-06-06T03:16:07.000Z | distrobuild/lookaside/__init__.py | rocky-linux/distrobuild | 5f4f2356175537607376b84ad4282f13a4b4d2b7 | [
"MIT"
] | 4 | 2021-06-02T12:30:52.000Z | 2022-03-21T15:49:42.000Z | # Copyright (c) 2021 The Distrobuild Authors
#
# 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,... | 37.447761 | 81 | 0.669988 |
797bc1a9c01fe33b18e3f10a98a59a90d115f05c | 7,630 | py | Python | fake_traffic.py | deedy5/fake_traffic | 6f7146de1859b012916f28c85091a1ef87404979 | [
"MIT"
] | null | null | null | fake_traffic.py | deedy5/fake_traffic | 6f7146de1859b012916f28c85091a1ef87404979 | [
"MIT"
] | null | null | null | fake_traffic.py | deedy5/fake_traffic | 6f7146de1859b012916f28c85091a1ef87404979 | [
"MIT"
] | null | null | null | from random import uniform, choice, randint, sample
from concurrent.futures import ThreadPoolExecutor
from datetime import datetime, timedelta
from time import sleep
import requests
from lxml import html
from duckduckgo_search import ddg
from google_searching import ggl
from google_trends import daily_trends, realtime... | 38.15 | 181 | 0.604718 |
797bc1dbccbaab4f232a088b7dc64d37b70adeaf | 518 | py | Python | src/CursoEmvideo/ex099.py | kessiarodrigues/Python-Course | 2e6097af4475d826c2b242d4699aec72301060f7 | [
"MIT"
] | null | null | null | src/CursoEmvideo/ex099.py | kessiarodrigues/Python-Course | 2e6097af4475d826c2b242d4699aec72301060f7 | [
"MIT"
] | null | null | null | src/CursoEmvideo/ex099.py | kessiarodrigues/Python-Course | 2e6097af4475d826c2b242d4699aec72301060f7 | [
"MIT"
] | null | null | null | from time import sleep
def maior(* núm):
cont = maior = 0
print('-=' * 30)
print('\nAnalisando os valores passados...')
for valor in núm:
print(f'{valor} ', end='')
sleep(1)
if cont == 0:
maior = valor
else:
if valor > maior:
maior... | 22.521739 | 55 | 0.521236 |
797bc3013228b8225a0235cb3e37276b7a95fa0c | 4,967 | py | Python | gscripts/general/fastq_groupby_and_cat.py | YeoLab/gscripts | ae653d29d0ce82d342f7f6ff5bbeedd27a2e062b | [
"MIT"
] | 12 | 2015-07-10T09:36:49.000Z | 2021-07-06T03:25:04.000Z | gscripts/general/fastq_groupby_and_cat.py | YeoLab/gscripts | ae653d29d0ce82d342f7f6ff5bbeedd27a2e062b | [
"MIT"
] | 43 | 2015-01-21T20:01:38.000Z | 2021-04-13T17:50:38.000Z | gscripts/general/fastq_groupby_and_cat.py | YeoLab/gscripts | ae653d29d0ce82d342f7f6ff5bbeedd27a2e062b | [
"MIT"
] | 19 | 2015-05-02T09:33:17.000Z | 2022-02-12T17:08:06.000Z | import os
import itertools
import shutil
from optparse import OptionParser
from glob import glob
from copy import copy
from collections import defaultdict
import sys
def get_params():
usage="usage: %prog [options]"
parser = OptionParser(usage=usage)
parser.add_option("-i","--input_dir",
... | 33.560811 | 110 | 0.572579 |
797bc31973b2ec3b4e71f59969ed6333a247d323 | 1,865 | py | Python | analysis_word.py | ryantraviss/instagram_analysis | d7e9ee8067650e1b1a2655c0f7fdb9e3361ccbeb | [
"MIT"
] | 4 | 2020-07-23T20:00:43.000Z | 2022-02-28T12:40:50.000Z | analysis_word.py | ryantraviss/instagram_analysis | d7e9ee8067650e1b1a2655c0f7fdb9e3361ccbeb | [
"MIT"
] | null | null | null | analysis_word.py | ryantraviss/instagram_analysis | d7e9ee8067650e1b1a2655c0f7fdb9e3361ccbeb | [
"MIT"
] | null | null | null | #analysis_word.py by Ryan Traviss
import util
print("What is your username?")
USERNAME = input(">>>")
class AnalysisWord:
def __init__(self,path="",comments_filename = "comments.json",
messages_filename = "messages.json", comments=True, messages=True):
self.comments = comments
s... | 40.543478 | 111 | 0.59571 |
797bc3b90f18916883508e31b41507b6b5e80001 | 7,190 | py | Python | mkt/comm/tests/test_utils_.py | muffinresearch/zamboni | 045a6f07c775b99672af6d9857d295ed02fe5dd9 | [
"BSD-3-Clause"
] | null | null | null | mkt/comm/tests/test_utils_.py | muffinresearch/zamboni | 045a6f07c775b99672af6d9857d295ed02fe5dd9 | [
"BSD-3-Clause"
] | null | null | null | mkt/comm/tests/test_utils_.py | muffinresearch/zamboni | 045a6f07c775b99672af6d9857d295ed02fe5dd9 | [
"BSD-3-Clause"
] | null | null | null | import base64
import os.path
from django.conf import settings
from django.core.files.uploadedfile import SimpleUploadedFile
import mock
from nose.tools import eq_
import amo
from amo.tests import app_factory, TestCase, user_factory
from mkt.users.models import UserProfile
from mkt.comm.forms import CommAttachmentFo... | 37.447917 | 78 | 0.658832 |
797bc486df2a6dc480abbc0f081fb4c08614c520 | 96,799 | py | Python | test/parallel/test_torch.py | DEKHTIARJonathan/horovod | 333ce607c5ed0c5a38defd234f818aeb27a5394b | [
"Apache-2.0"
] | null | null | null | test/parallel/test_torch.py | DEKHTIARJonathan/horovod | 333ce607c5ed0c5a38defd234f818aeb27a5394b | [
"Apache-2.0"
] | null | null | null | test/parallel/test_torch.py | DEKHTIARJonathan/horovod | 333ce607c5ed0c5a38defd234f818aeb27a5394b | [
"Apache-2.0"
] | 3 | 2021-07-20T07:40:15.000Z | 2021-08-03T08:39:17.000Z | # Copyright 2018 Uber Technologies, Inc. All Rights Reserved.
# Modifications copyright (C) 2019 Intel Corporation
# Modifications copyright (C) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the Li... | 41.491213 | 126 | 0.579965 |
797bc58ea2d56cf4e37cac893e98fc6be332dd1b | 442 | py | Python | base/migrations/0005_auto_20200729_1349.py | OmarHammemi/django_project | ab70560f99ae2eaa3b28a76b89deccb61c042554 | [
"RSA-MD"
] | null | null | null | base/migrations/0005_auto_20200729_1349.py | OmarHammemi/django_project | ab70560f99ae2eaa3b28a76b89deccb61c042554 | [
"RSA-MD"
] | 2 | 2021-09-09T03:15:39.000Z | 2022-03-12T01:01:04.000Z | base/migrations/0005_auto_20200729_1349.py | OmarHammemi/django_project | ab70560f99ae2eaa3b28a76b89deccb61c042554 | [
"RSA-MD"
] | null | null | null | # Generated by Django 3.0.8 on 2020-07-29 20:49
import ckeditor_uploader.fields
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('base', '0004_auto_20200729_1333'),
]
operations = [
migrations.AlterField(
model_name='post',
... | 22.1 | 89 | 0.638009 |
797bc6fde59c6d98da25329a3475db1e51e04c75 | 119,239 | py | Python | renpy/display/core.py | swaggyp-14/renpy-7.4.4-sdk | 43a26d67d35fd345c40550f367a1ab0c389ab9dc | [
"Apache-2.0"
] | null | null | null | renpy/display/core.py | swaggyp-14/renpy-7.4.4-sdk | 43a26d67d35fd345c40550f367a1ab0c389ab9dc | [
"Apache-2.0"
] | null | null | null | renpy/display/core.py | swaggyp-14/renpy-7.4.4-sdk | 43a26d67d35fd345c40550f367a1ab0c389ab9dc | [
"Apache-2.0"
] | null | null | null | # Copyright 2004-2021 Tom Rothamel <pytom@bishoujo.us>
#
# 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, m... | 29.720588 | 175 | 0.569654 |
797bc778c0bc55f7511ae7b6804ad9a5b8d78be5 | 61,444 | py | Python | mmtbx/regression/tls/tst_tls_utils.py | dperl-sol/cctbx_project | b9e390221a2bc4fd00b9122e97c3b79c632c6664 | [
"BSD-3-Clause-LBNL"
] | null | null | null | mmtbx/regression/tls/tst_tls_utils.py | dperl-sol/cctbx_project | b9e390221a2bc4fd00b9122e97c3b79c632c6664 | [
"BSD-3-Clause-LBNL"
] | null | null | null | mmtbx/regression/tls/tst_tls_utils.py | dperl-sol/cctbx_project | b9e390221a2bc4fd00b9122e97c3b79c632c6664 | [
"BSD-3-Clause-LBNL"
] | null | null | null | from __future__ import absolute_import, division, print_function
import math
import numpy
from mmtbx.tls.utils import *
from scitbx.array_family import flex
from libtbx.test_utils import approx_equal, not_approx_equal
from pytest import raises
from six.moves import zip
from six.moves import range
rran = numpy.random.... | 39.31158 | 266 | 0.665728 |
797bc7ca0937316fd65551de886a915e1c3d89c0 | 1,074 | py | Python | examples/src/dbnd_examples/orchestration/tutorial_syntax/T01_tasks_and_pipelines.py | busunkim96/dbnd | 0191fdcd4c4fbd35006f1026d1a55b2abab9097b | [
"Apache-2.0"
] | 224 | 2020-01-02T10:46:37.000Z | 2022-03-02T13:54:08.000Z | examples/src/dbnd_examples/orchestration/tutorial_syntax/T01_tasks_and_pipelines.py | busunkim96/dbnd | 0191fdcd4c4fbd35006f1026d1a55b2abab9097b | [
"Apache-2.0"
] | 16 | 2020-03-11T09:37:58.000Z | 2022-01-26T10:22:08.000Z | examples/src/dbnd_examples/orchestration/tutorial_syntax/T01_tasks_and_pipelines.py | busunkim96/dbnd | 0191fdcd4c4fbd35006f1026d1a55b2abab9097b | [
"Apache-2.0"
] | 24 | 2020-03-24T13:53:50.000Z | 2022-03-22T11:55:18.000Z | import logging
from dbnd import pipeline, task
logger = logging.getLogger(__name__)
@task
def calculate_alpha(base: int):
calculated_alpha = base + 1
logging.info("Alpha=%s", calculated_alpha)
return calculated_alpha
@task
def calculate_ratio(base: int):
calculated_ratio = base + 1
logging.in... | 21.058824 | 93 | 0.72905 |
797bc8cecad8c008ea6f7453247246bce0ddb554 | 14,784 | py | Python | CromAndExtensions/vocab.py | KarlPineau/CromAndExtensions | f3be5dac89c3fa77ace744dbcf7a4fd59574ae6d | [
"Apache-2.0"
] | null | null | null | CromAndExtensions/vocab.py | KarlPineau/CromAndExtensions | f3be5dac89c3fa77ace744dbcf7a4fd59574ae6d | [
"Apache-2.0"
] | null | null | null | CromAndExtensions/vocab.py | KarlPineau/CromAndExtensions | f3be5dac89c3fa77ace744dbcf7a4fd59574ae6d | [
"Apache-2.0"
] | null | null | null |
# This assumes the default CIDOC-CRM, even though the model code
# can generate classes for any ontology
from .model import Identifier, Mark, ManMadeObject, Type, \
Person, Material, MeasurementUnit, Place, Dimension, \
ConceptualObject, TimeSpan, Actor, PhysicalThing, \
LinguisticObject, InformationObject, Spat... | 46.2 | 87 | 0.663488 |
797bc8ecb4144192f15b11c8cc60bf2144a966a3 | 681 | py | Python | examples/pythonlibrary/devrunner/agent.py | unity-idm/furms | ba587eb7dd9c1c67e6c2b5e833f73e034e17746f | [
"BSD-2-Clause"
] | 2 | 2021-05-10T08:36:18.000Z | 2021-11-02T10:22:45.000Z | examples/pythonlibrary/devrunner/agent.py | unity-idm/furms | ba587eb7dd9c1c67e6c2b5e833f73e034e17746f | [
"BSD-2-Clause"
] | 24 | 2020-11-18T22:27:15.000Z | 2022-01-05T11:47:30.000Z | examples/pythonlibrary/devrunner/agent.py | unity-idm/furms | ba587eb7dd9c1c67e6c2b5e833f73e034e17746f | [
"BSD-2-Clause"
] | null | null | null | # Copyright (c) 2021 Bixbit s.c. All rights reserved.
# See LICENSE file for licensing information.
import logging
import sys
import os
from furms import model, msgslistener, set_stream_logger
if len(sys.argv) != 2:
print("Provide queue name as command line parameter.")
sys.exit(1)
set_stream_logger('furms.m... | 23.482759 | 58 | 0.712188 |
797bc9ab077b214916840fd7e6357a25a197d5ca | 832 | py | Python | code/weekday_aggregator.py | HenriJSantos/MS | 313f2b72f42fa21121a5266df9708b6f12d7545a | [
"MIT"
] | null | null | null | code/weekday_aggregator.py | HenriJSantos/MS | 313f2b72f42fa21121a5266df9708b6f12d7545a | [
"MIT"
] | null | null | null | code/weekday_aggregator.py | HenriJSantos/MS | 313f2b72f42fa21121a5266df9708b6f12d7545a | [
"MIT"
] | null | null | null | import pandas as pd
df = pd.read_csv("data/aggregated/agg.csv", header=0, sep=",", low_memory=False)
df['AGG_PERIOD_START'] = pd.to_datetime(df['AGG_PERIOD_START'])
#remove holidays
df = df[(df['AGG_PERIOD_START'] != pd.to_datetime("2015-01-01")) & # Dia de Ano Novo
(df['AGG_PERIOD_START'] != pd.to_datet... | 48.941176 | 99 | 0.663462 |
797bc9abb32b7ecd01f892580684f186380d6ff8 | 4,043 | py | Python | roms/tests/joy/vaus-test-0.02/tools/pilbmp2nes.py | MrKOSMOS/ANESE | 8ae814d615479b1496c98033a1f5bc4da5921c6f | [
"MIT"
] | 1,461 | 2022-02-25T17:44:34.000Z | 2022-03-30T06:18:29.000Z | roms/tests/joy/vaus-test-0.02/tools/pilbmp2nes.py | MrKOSMOS/ANESE | 8ae814d615479b1496c98033a1f5bc4da5921c6f | [
"MIT"
] | 20 | 2020-11-09T19:57:25.000Z | 2021-12-24T07:09:53.000Z | roms/tests/joy/vaus-test-0.02/tools/pilbmp2nes.py | MrKOSMOS/ANESE | 8ae814d615479b1496c98033a1f5bc4da5921c6f | [
"MIT"
] | 47 | 2016-10-24T00:30:56.000Z | 2022-02-10T15:19:41.000Z | #!/usr/bin/env python
#
# Bitmap to NES CHR converter using Python Imaging Library
# Copyright 2010 Damian Yerrick
#
# Copying and distribution of this file, with or without
# modification, are permitted in any medium without royalty
# provided the copyright notice and this notice are preserved.
# This file is offered ... | 34.555556 | 82 | 0.582488 |
797bc9c52a9ebbc4708d3f86e4709e00c3f66710 | 232 | py | Python | wiki/search/src/formula/formula.py | GuillaumeFalourd/formulas-python | 8fb299598f6d63d42ceb39d2a64f65485aa39428 | [
"Apache-2.0"
] | 16 | 2021-02-17T14:40:07.000Z | 2022-01-14T23:44:43.000Z | wiki/search/src/formula/formula.py | ErosMLima/formulas-python | 15f1f56630131a2d3202ca7a1f685c2708a4815b | [
"Apache-2.0"
] | 1 | 2021-03-08T16:06:17.000Z | 2021-03-08T16:06:17.000Z | wiki/search/src/formula/formula.py | ErosMLima/formulas-python | 15f1f56630131a2d3202ca7a1f685c2708a4815b | [
"Apache-2.0"
] | 4 | 2021-02-04T16:31:42.000Z | 2021-04-09T04:16:44.000Z | #!/usr/bin/python3
import wikipedia
def run(keywords, language):
wikipedia.set_lang(language)
kw = wikipedia.page(keywords)
print("Title:", kw.title)
print("Url:", kw.url)
print("Content:", kw.content) | 21.090909 | 33 | 0.642241 |
797bcb1ab00a7c27c7fd44612af39244a98b22d2 | 2,310 | py | Python | instagram/models.py | vincent8880/inst4gram | 0d265c9b086663889d731ac8955e23b6835474a5 | [
"MIT"
] | null | null | null | instagram/models.py | vincent8880/inst4gram | 0d265c9b086663889d731ac8955e23b6835474a5 | [
"MIT"
] | 5 | 2020-06-05T21:57:20.000Z | 2021-06-10T21:46:57.000Z | instagram/models.py | vincent8880/inst4gram | 0d265c9b086663889d731ac8955e23b6835474a5 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
from tinymce.models import HTMLField
from pyuploadcare.dj.models import ImageField
# Create your models here.
class Profile(models.Model):
# profile_photo = models.ImageField(upload_to = 'profilepics/', default='Image')
prof_pic = ImageFi... | 30 | 84 | 0.67619 |
797bcbbab5c8cd8bd2ae99b3e09a05c937c00382 | 463 | py | Python | Instagram/scrapeImage.py | ksackvil/SocialScraper | b2d9c1724e895622e828c558bdefc814f4c52751 | [
"MIT"
] | null | null | null | Instagram/scrapeImage.py | ksackvil/SocialScraper | b2d9c1724e895622e828c558bdefc814f4c52751 | [
"MIT"
] | null | null | null | Instagram/scrapeImage.py | ksackvil/SocialScraper | b2d9c1724e895622e828c558bdefc814f4c52751 | [
"MIT"
] | null | null | null | from subprocess import call
USERNAME="stooleysbargrill" # add the insta username to scrape here
INCLUDE_IMAGE = True
INCLUDE_VIDEO = False
if (INCLUDE_IMAGE and INCLUDE_VIDEO) or (not(INCLUDE_IMAGE) and not(INCLUDE_VIDEO)):
media_types = ""
elif INCLUDE_IMAGE:
media_types = "--media-types=image"
elif INCLU... | 33.071429 | 92 | 0.7473 |
797bcbc1ca9c915ce349f7b272575cf0d20e531e | 4,720 | py | Python | examples/nginx_access_log_tail.py | raipc/atsd-api-python | 4dfa123bf99381ec8d2a0d58d60571ddf5583c65 | [
"Apache-2.0"
] | 20 | 2015-04-15T21:43:56.000Z | 2019-12-16T13:34:08.000Z | examples/nginx_access_log_tail.py | raipc/atsd-api-python | 4dfa123bf99381ec8d2a0d58d60571ddf5583c65 | [
"Apache-2.0"
] | 34 | 2017-09-20T11:31:27.000Z | 2021-06-16T15:12:56.000Z | examples/nginx_access_log_tail.py | raipc/atsd-api-python | 4dfa123bf99381ec8d2a0d58d60571ddf5583c65 | [
"Apache-2.0"
] | 8 | 2016-07-19T15:31:49.000Z | 2020-01-02T17:29:11.000Z | from __future__ import print_function
from atsd_client import connect, connect_url
from atsd_client.models import Message, Severity
from atsd_client.services import MessageService
import socket
from datetime import datetime
# Install sh module separately
from sh import tail
import csv
# nginx must be configured to wri... | 37.460317 | 119 | 0.637712 |
797bcbc34a2958224583fc5b05fd8861d3168bac | 1,579 | py | Python | insights/parsers/ls_var_www_perms.py | lhuett/insights-core | 1c84eeffc037f85e2bbf60c9a302c83aa1a50cf8 | [
"Apache-2.0"
] | 121 | 2017-05-30T20:23:25.000Z | 2022-03-23T12:52:15.000Z | insights/parsers/ls_var_www_perms.py | lhuett/insights-core | 1c84eeffc037f85e2bbf60c9a302c83aa1a50cf8 | [
"Apache-2.0"
] | 1,977 | 2017-05-26T14:36:03.000Z | 2022-03-31T10:38:53.000Z | insights/parsers/ls_var_www_perms.py | lhuett/insights-core | 1c84eeffc037f85e2bbf60c9a302c83aa1a50cf8 | [
"Apache-2.0"
] | 244 | 2017-05-30T20:22:57.000Z | 2022-03-26T10:09:39.000Z | """
LsVarWwwPerms - command ``/bin/ls -la /dev/null /var/www``
==========================================================
"""
from insights.core import CommandParser, FileListing
from insights.core.plugins import parser
from insights.specs import Specs
from insights.util.file_permissions import FilePermissions
@pars... | 32.895833 | 97 | 0.626346 |
797bcbc3a6dccafc6c4078ca864ca394b32cf856 | 2,564 | py | Python | 210329/sources/ismmessenger/mainapp/migrations/0001_initial.py | malfin/python-basics | 5b776c85dbe0b335ab7cfa89eb8c593e2bc9de85 | [
"MIT"
] | null | null | null | 210329/sources/ismmessenger/mainapp/migrations/0001_initial.py | malfin/python-basics | 5b776c85dbe0b335ab7cfa89eb8c593e2bc9de85 | [
"MIT"
] | null | null | null | 210329/sources/ismmessenger/mainapp/migrations/0001_initial.py | malfin/python-basics | 5b776c85dbe0b335ab7cfa89eb8c593e2bc9de85 | [
"MIT"
] | null | null | null | # Generated by Django 2.2 on 2021-03-25 17:02
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
opera... | 44.206897 | 177 | 0.586193 |
797bccef9eef0320ed680d1175a5d8ad6002d6a9 | 3,736 | py | Python | pl_bolts/setup_tools.py | layne-sadler/lightning-bolts | 511325d8e35385ee7370f87b4e1459578a9616f0 | [
"Apache-2.0"
] | 2 | 2021-04-23T11:02:19.000Z | 2021-04-23T11:22:21.000Z | pl_bolts/setup_tools.py | jeromepatel/lightning-bolts | a495d1568c933d05b6a8bec9b9a360c95a857c07 | [
"Apache-2.0"
] | 5 | 2020-11-28T20:49:22.000Z | 2021-01-09T13:50:22.000Z | pl_bolts/setup_tools.py | jeromepatel/lightning-bolts | a495d1568c933d05b6a8bec9b9a360c95a857c07 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright The PyTorch Lightning 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 by applica... | 41.054945 | 120 | 0.688704 |
797bcd6a726d24aca98151a3fc3960f1b6c16b7a | 8,009 | py | Python | cogs/database.py | waki285/rt-bot | 1b264d7d9fe75526766b56547cea801619d13051 | [
"BSD-4-Clause"
] | null | null | null | cogs/database.py | waki285/rt-bot | 1b264d7d9fe75526766b56547cea801619d13051 | [
"BSD-4-Clause"
] | null | null | null | cogs/database.py | waki285/rt-bot | 1b264d7d9fe75526766b56547cea801619d13051 | [
"BSD-4-Clause"
] | null | null | null | # RT - Database Manager
from discord.ext import commands
from ujson import loads
from data import is_admin
class DatabaseManager(commands.Cog):
def __init__(self, bot):
self.bot, self.rt = bot, bot.data
@commands.Cog.listener()
async def on_ready(self):
self.db = await self.rt["mysql"].... | 29.444853 | 97 | 0.515795 |
797bcdc4b0095d94e7f0c7f046ef4c4c37bba2f6 | 2,338 | py | Python | adv/albert.py | Happytogepi/dl | 6d67d255c75b30ed328cb4f839f241996bd641e6 | [
"Apache-2.0"
] | null | null | null | adv/albert.py | Happytogepi/dl | 6d67d255c75b30ed328cb4f839f241996bd641e6 | [
"Apache-2.0"
] | null | null | null | adv/albert.py | Happytogepi/dl | 6d67d255c75b30ed328cb4f839f241996bd641e6 | [
"Apache-2.0"
] | null | null | null | import adv.adv_test
from core.advbase import *
import copy
from module.x_alt import Fs_alt
from slot.a import *
from slot.d import *
def module():
return Albert
class Albert(Adv):
a1 = ('fs',0.5)
conf = {}
conf['acl'] = """
`s2, s1.charged>=s1.sp-330
`fs, s=2 and not self.afflics.para... | 27.186047 | 71 | 0.558169 |
797bce7a003f6de38b8b5d2a64410483c08ec105 | 115 | py | Python | cleanplotlib/__init__.py | khdc-me/cleanplotlib | 994e5cbbfe4adf83b2031a8cf97331a7053752bc | [
"MIT"
] | 1 | 2017-08-28T17:34:06.000Z | 2017-08-28T17:34:06.000Z | cleanplotlib/__init__.py | khdc-me/cleanplotlib | 994e5cbbfe4adf83b2031a8cf97331a7053752bc | [
"MIT"
] | 3 | 2017-12-18T03:49:22.000Z | 2018-01-24T23:35:43.000Z | cleanplotlib/__init__.py | khdc-me/cleanplotlib | 994e5cbbfe4adf83b2031a8cf97331a7053752bc | [
"MIT"
] | null | null | null | from .cleanplotlib import my_dot_plot
from .cleanplotlib import my_hbar_plot
from .cleanplotlib import my_bar_plot
| 28.75 | 38 | 0.869565 |
797bcf9ae32f045c1a83b25efc984d864fa08fe9 | 2,409 | py | Python | code/ch8-async-databases/views/account.py | ayhteo/web-applications-with-fastapi-course | 160d74c70528fbb803d95e4a80e495ddbd5e9833 | [
"MIT"
] | null | null | null | code/ch8-async-databases/views/account.py | ayhteo/web-applications-with-fastapi-course | 160d74c70528fbb803d95e4a80e495ddbd5e9833 | [
"MIT"
] | null | null | null | code/ch8-async-databases/views/account.py | ayhteo/web-applications-with-fastapi-course | 160d74c70528fbb803d95e4a80e495ddbd5e9833 | [
"MIT"
] | null | null | null | import asyncio
import fastapi
from fastapi_chameleon import template
from starlette import status
from starlette.requests import Request
from infrastructure import cookie_auth
from services import user_service
from viewmodels.account.account_viewmodel import AccountViewModel
from viewmodels.account.login_viewmodel im... | 25.62766 | 79 | 0.71648 |
797bd17645d75222a55e1713d9725b592bd24ff2 | 1,286 | py | Python | listings/chapter08/neural-network-keras-mnist.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | 2 | 2021-09-20T06:16:41.000Z | 2022-01-17T14:24:43.000Z | listings/chapter08/neural-network-keras-mnist.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | null | null | null | listings/chapter08/neural-network-keras-mnist.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | null | null | null | import numpy as np
from tensorflow import keras
from tensorflow.keras import layers
# Kategorien,
categories = 10
# Daten laden
(x_train, y_train), (x_test, y_test) = keras.datasets.mnist.load_data()
# Feature-Skalierung
x_train = x_train.astype("float32") / 255
x_test = x_test.astype("float32") / 255
# Daten in di... | 27.956522 | 87 | 0.708398 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.