hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 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 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 251 | max_forks_repo_name stringlengths 4 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.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3fd22b642b9f6e7837ab39991845866acb71bd9d | 929 | py | Python | txt/test/teste.py | juliano777/apostila_python | 521c05c1579a52d22d6b670af92e3763366b6301 | [
"BSD-3-Clause"
] | 3 | 2020-04-18T20:07:39.000Z | 2021-06-17T18:41:34.000Z | txt/test/teste.py | juliano777/apostila_python | 521c05c1579a52d22d6b670af92e3763366b6301 | [
"BSD-3-Clause"
] | null | null | null | txt/test/teste.py | juliano777/apostila_python | 521c05c1579a52d22d6b670af92e3763366b6301 | [
"BSD-3-Clause"
] | 1 | 2020-04-18T20:07:46.000Z | 2020-04-18T20:07:46.000Z | #_*_ encoding: utf-8 _*_
import time
''' Fibonacci function '''
''' Memoize function '''
# Start time
t1 = time.time()
# Loop
for i in range(35):
print('fib(%s) = %s' % (i, fibo(i)))
# End time
t2 = time.time()
# Total time
print('Tempo de execuo: %.3fs' % (t2 - t1))
# Take a pause
raw_input('Pressione <E... | 16.298246 | 47 | 0.568353 |
3fd2e3175b855481fd32ee5d4ebc2f50e3468d9a | 4,101 | py | Python | Tests/Methods/Mesh/test_get_field.py | IrakozeFD/pyleecan | 5a93bd98755d880176c1ce8ac90f36ca1b907055 | [
"Apache-2.0"
] | null | null | null | Tests/Methods/Mesh/test_get_field.py | IrakozeFD/pyleecan | 5a93bd98755d880176c1ce8ac90f36ca1b907055 | [
"Apache-2.0"
] | null | null | null | Tests/Methods/Mesh/test_get_field.py | IrakozeFD/pyleecan | 5a93bd98755d880176c1ce8ac90f36ca1b907055 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import pytest
import numpy as np
from unittest import TestCase
from SciDataTool import DataTime, Data1D, DataLinspace, VectorField
from pyleecan.Classes.SolutionData import SolutionData
from pyleecan.Classes.SolutionMat import SolutionMat
from pyleecan.Classes.SolutionVector import SolutionVe... | 32.039063 | 87 | 0.566935 |
3fd35632335b7013aa84b5d96f778f88b22e2bbe | 17,026 | py | Python | python/services/compute/beta/reservation.py | trodge/declarative-resource-client-library | 2cb7718a5074776b3113cc18a7483b54022238f3 | [
"Apache-2.0"
] | 16 | 2021-01-08T19:35:22.000Z | 2022-03-23T16:23:49.000Z | python/services/compute/beta/reservation.py | trodge/declarative-resource-client-library | 2cb7718a5074776b3113cc18a7483b54022238f3 | [
"Apache-2.0"
] | 1 | 2021-08-18T19:12:20.000Z | 2021-08-18T19:12:20.000Z | python/services/compute/beta/reservation.py | LaudateCorpus1/declarative-resource-client-library | a559c4333587fe9531cef150532e6fcafff153e4 | [
"Apache-2.0"
] | 11 | 2021-03-18T11:27:28.000Z | 2022-03-12T06:49:14.000Z | # Copyright 2021 Google LLC. 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 law o... | 36.615054 | 119 | 0.681017 |
3fd4a59a910de7324648c153841dea6bd5328a4e | 4,682 | py | Python | Examples/cimpleCraft/cimple4.py | shaesaert/TuLiPXML | 56cf4d58a9d7e17b6f6aebe6de8d5a1231035671 | [
"BSD-3-Clause"
] | 1 | 2021-05-28T23:44:28.000Z | 2021-05-28T23:44:28.000Z | Examples/cimpleCraft/cimple4.py | shaesaert/TuLiPXML | 56cf4d58a9d7e17b6f6aebe6de8d5a1231035671 | [
"BSD-3-Clause"
] | 2 | 2017-10-03T18:54:08.000Z | 2018-08-21T09:50:09.000Z | Examples/cimpleCraft/cimple4.py | shaesaert/TuLiPXML | 56cf4d58a9d7e17b6f6aebe6de8d5a1231035671 | [
"BSD-3-Clause"
] | 1 | 2018-10-06T12:58:52.000Z | 2018-10-06T12:58:52.000Z | # Import modules
from __future__ import print_function
import sys
import numpy as np
from polytope import box2poly
from tulip import hybrid
from tulip.abstract import prop2part, discretize
import Interface.DSL as DSL
from Interface import Statechart as dumpsmach
from Interface.Reduce import *
from Interface.Transfor... | 32.971831 | 110 | 0.548056 |
3fd50d9f4c976d633be6e56345cbe4edfe16b20b | 561 | py | Python | CableClub/cable_club_colosseum.py | V-FEXrt/Pokemon-Spoof-Plus | d397d680742496b7f64b401511da7eb57f63c973 | [
"MIT"
] | 2 | 2017-05-04T20:24:19.000Z | 2017-05-04T20:58:07.000Z | CableClub/cable_club_colosseum.py | V-FEXrt/Pokemon-Spoof-Plus | d397d680742496b7f64b401511da7eb57f63c973 | [
"MIT"
] | null | null | null | CableClub/cable_club_colosseum.py | V-FEXrt/Pokemon-Spoof-Plus | d397d680742496b7f64b401511da7eb57f63c973 | [
"MIT"
] | null | null | null | from AI.team_manager import TeamManager
from CableClub.cable_club_constants import Com
out_byte = 0
last_recieved = 0
count = 0 | 24.391304 | 66 | 0.654189 |
3fd6f8b99302959fd856c0174a84ad3698e8de10 | 931 | py | Python | workflow/wrappers/bio/popoolation2/indel_filtering_identify_indel_regions/wrapper.py | NBISweden/manticore-smk | fd0b4ccd4239dc91dac423d0ea13478d36702561 | [
"MIT"
] | null | null | null | workflow/wrappers/bio/popoolation2/indel_filtering_identify_indel_regions/wrapper.py | NBISweden/manticore-smk | fd0b4ccd4239dc91dac423d0ea13478d36702561 | [
"MIT"
] | null | null | null | workflow/wrappers/bio/popoolation2/indel_filtering_identify_indel_regions/wrapper.py | NBISweden/manticore-smk | fd0b4ccd4239dc91dac423d0ea13478d36702561 | [
"MIT"
] | 2 | 2021-08-23T16:09:51.000Z | 2021-11-12T21:35:56.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = "Per Unneberg"
__copyright__ = "Copyright 2020, Per Unneberg"
__email__ = "per.unneberg@scilifelab.se"
__license__ = "MIT"
import os
import re
import tempfile
from snakemake.shell import shell
from snakemake.utils import logger
log = snakemake.log_fmt_shell(... | 22.707317 | 83 | 0.692803 |
3fd71b6b624dc062e8df4e8fc57377ace10d329d | 6,741 | py | Python | open_publishing/provision/progression_rule.py | open-publishing/open-publishing-api | 0d1646bb2460c6f35cba610a355941d2e07bfefd | [
"BSD-3-Clause"
] | null | null | null | open_publishing/provision/progression_rule.py | open-publishing/open-publishing-api | 0d1646bb2460c6f35cba610a355941d2e07bfefd | [
"BSD-3-Clause"
] | null | null | null | open_publishing/provision/progression_rule.py | open-publishing/open-publishing-api | 0d1646bb2460c6f35cba610a355941d2e07bfefd | [
"BSD-3-Clause"
] | null | null | null | from open_publishing.core import SequenceItem, SequenceField, SequenceItemProperty
from open_publishing.core import FieldDescriptor, DatabaseObjectField, SimpleField
from open_publishing.user import User
from open_publishing.core.enums import ValueStatus
from open_publishing.core.enums import ProvisionRuleRole, Provisi... | 35.856383 | 100 | 0.558374 |
3fd8a3a7cd4b29135af9a933907e8e7ce8de084c | 2,746 | py | Python | forms/utils.py | braceio/forms | deb12f37447d6167ad284ae68085a02454c8f649 | [
"MIT"
] | 36 | 2015-01-02T05:15:02.000Z | 2018-03-06T11:36:41.000Z | forms/utils.py | braceio/forms | deb12f37447d6167ad284ae68085a02454c8f649 | [
"MIT"
] | 1 | 2015-02-16T20:03:41.000Z | 2016-01-01T23:42:25.000Z | forms/utils.py | braceio/forms | deb12f37447d6167ad284ae68085a02454c8f649 | [
"MIT"
] | 20 | 2015-01-04T21:38:12.000Z | 2021-01-17T12:59:10.000Z | from datetime import timedelta
from functools import update_wrapper
from flask import make_response, current_app, request, url_for, jsonify
import uuid
# decorators
def get_url(endpoint, secure=False, **values):
''' protocol preserving url_for '''
path = url_for(endpoint, **values)
if secure:
... | 31.563218 | 81 | 0.621267 |
3fd8c6ef2dca4f5f0372db69829883a2a443d40b | 4,536 | py | Python | tests/ref_test.py | lykme516/pykka | d66b0c49658fc0e7c4e1ae46a0f9c50c7e964ca5 | [
"Apache-2.0"
] | 1 | 2021-01-03T09:25:23.000Z | 2021-01-03T09:25:23.000Z | tests/ref_test.py | hujunxianligong/pykka | d66b0c49658fc0e7c4e1ae46a0f9c50c7e964ca5 | [
"Apache-2.0"
] | null | null | null | tests/ref_test.py | hujunxianligong/pykka | d66b0c49658fc0e7c4e1ae46a0f9c50c7e964ca5 | [
"Apache-2.0"
] | null | null | null | import time
import unittest
from pykka import ActorDeadError, ThreadingActor, ThreadingFuture, Timeout
def ConcreteRefTest(actor_class, future_class, sleep_function):
C.__name__ = '%sRefTest' % (actor_class.__name__,)
C.future_class = future_class
return C
ThreadingActorRefTest = ConcreteRefTest(
... | 31.068493 | 74 | 0.668651 |
3fda3cc0af3e5e42cd6c1e11390f1713cf4c09d1 | 3,365 | py | Python | tests/unit/test_baseObject.py | asaranprasad/nvda | e9609694acbfb06398eb6552067a0dcd532d67af | [
"bzip2-1.0.6"
] | 1 | 2018-11-16T10:15:59.000Z | 2018-11-16T10:15:59.000Z | tests/unit/test_baseObject.py | asaranprasad/nvda | e9609694acbfb06398eb6552067a0dcd532d67af | [
"bzip2-1.0.6"
] | 3 | 2017-09-29T17:14:18.000Z | 2019-05-20T16:13:39.000Z | tests/unit/test_baseObject.py | asaranprasad/nvda | e9609694acbfb06398eb6552067a0dcd532d67af | [
"bzip2-1.0.6"
] | 1 | 2017-09-29T08:53:52.000Z | 2017-09-29T08:53:52.000Z | #tests/unit/test_baseObject.py
#A part of NonVisual Desktop Access (NVDA)
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
#Copyright (C) 2018 NV Access Limited, Babbage B.V.
"""Unit tests for the baseObject module, its classes and their derivatives."""
import u... | 30.044643 | 94 | 0.744428 |
3fda75ffd417e01dfff80ddf791281704e021a18 | 3,960 | py | Python | querybook/server/lib/query_executor/connection_string/hive.py | shivammmmm/querybook | 71263eb7db79e56235ea752f2cf3339ca9b3a092 | [
"Apache-2.0"
] | 1,144 | 2021-03-30T05:06:16.000Z | 2022-03-31T10:40:31.000Z | querybook/server/lib/query_executor/connection_string/hive.py | shivammmmm/querybook | 71263eb7db79e56235ea752f2cf3339ca9b3a092 | [
"Apache-2.0"
] | 593 | 2021-07-01T10:34:25.000Z | 2022-03-31T23:24:40.000Z | querybook/server/lib/query_executor/connection_string/hive.py | shivammmmm/querybook | 71263eb7db79e56235ea752f2cf3339ca9b3a092 | [
"Apache-2.0"
] | 113 | 2021-03-30T00:07:20.000Z | 2022-03-31T07:18:43.000Z | import re
from typing import Dict, Tuple, List, NamedTuple, Optional
from lib.utils.decorators import with_exception_retry
from .helpers.common import (
split_hostport,
get_parsed_variables,
merge_hostport,
random_choice,
)
from .helpers.zookeeper import get_hostname_and_port_from_zk
# TODO: make thes... | 33.846154 | 202 | 0.689899 |
3fdb9c34cb8887a4abfe9945968ed8dd70631d27 | 137 | py | Python | flopz/__init__.py | Flopz-Project/flopz | eb470811e4a8be5e5d625209b0f8eb7ccd1d5da3 | [
"Apache-2.0"
] | 7 | 2021-11-19T15:53:58.000Z | 2022-03-28T03:38:52.000Z | flopz/__init__.py | Flopz-Project/flopz | eb470811e4a8be5e5d625209b0f8eb7ccd1d5da3 | [
"Apache-2.0"
] | null | null | null | flopz/__init__.py | Flopz-Project/flopz | eb470811e4a8be5e5d625209b0f8eb7ccd1d5da3 | [
"Apache-2.0"
] | 1 | 2022-03-25T12:44:01.000Z | 2022-03-25T12:44:01.000Z | """
flopz.
Low Level Assembler and Firmware Instrumentation Toolkit
"""
__version__ = "0.2.0"
__author__ = "Noelscher Consulting GmbH"
| 15.222222 | 56 | 0.744526 |
3fdde609468413e798c5347a27251969395c0fce | 2,294 | py | Python | OracleCASB_API_Client/occs.py | ftnt-cse/Oracle_CASB_API_Client | 00c92c7383d62d029736481f079773253e05589c | [
"Apache-2.0"
] | null | null | null | OracleCASB_API_Client/occs.py | ftnt-cse/Oracle_CASB_API_Client | 00c92c7383d62d029736481f079773253e05589c | [
"Apache-2.0"
] | null | null | null | OracleCASB_API_Client/occs.py | ftnt-cse/Oracle_CASB_API_Client | 00c92c7383d62d029736481f079773253e05589c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import sys, logging
import requests, json, argparse, textwrap
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
from oracle_casb_api import *
parser = argparse.ArgumentParser(
prog='Oracle CASB API Client'... | 37.606557 | 170 | 0.732781 |
3fde07047223da1d88704610e639913da4a2c4f4 | 1,787 | py | Python | src/classification_metrics.py | crmauceri/ReferringExpressions | d2ca43bf6df88f83fbe6dfba99b1105dd14592f4 | [
"Apache-2.0"
] | 6 | 2020-06-05T06:52:59.000Z | 2021-05-27T11:38:16.000Z | src/classification_metrics.py | crmauceri/ReferringExpressions | d2ca43bf6df88f83fbe6dfba99b1105dd14592f4 | [
"Apache-2.0"
] | 1 | 2021-03-28T13:27:21.000Z | 2021-04-29T17:58:28.000Z | src/classification_metrics.py | crmauceri/ReferringExpressions | d2ca43bf6df88f83fbe6dfba99b1105dd14592f4 | [
"Apache-2.0"
] | 2 | 2019-12-09T09:14:47.000Z | 2019-12-22T13:57:08.000Z | import argparse
import json
from data_management.DatasetFactory import datasetFactory
from config import cfg
import numpy as np
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Calculates metrics from output of a Classification network.' +
... | 34.365385 | 115 | 0.614997 |
3fe076a26915fb3a8a0df4e110f97d0bbe198980 | 6,448 | py | Python | base_model.py | Unmesh-Kumar/DMRM | f1c24049bd527c9dcc5ab6e6727dfa6c8e794c02 | [
"MIT"
] | 23 | 2019-12-19T02:46:33.000Z | 2022-03-22T07:52:28.000Z | base_model.py | Unmesh-Kumar/DMRM | f1c24049bd527c9dcc5ab6e6727dfa6c8e794c02 | [
"MIT"
] | 5 | 2020-07-28T14:25:45.000Z | 2022-03-08T14:30:21.000Z | base_model.py | Unmesh-Kumar/DMRM | f1c24049bd527c9dcc5ab6e6727dfa6c8e794c02 | [
"MIT"
] | 5 | 2019-12-20T15:46:08.000Z | 2021-11-23T01:15:32.000Z | import torch
import torch.nn as nn
from attention import Attention, NewAttention
from language_model import WordEmbedding, QuestionEmbedding, QuestionEmbedding2
from classifier import SimpleClassifier
from fc import FCNet
from Decoders.decoder1 import _netG as netG
import torch.nn.functional as F
from torch.autograd im... | 40.049689 | 114 | 0.618021 |
3fe105950fe7c097a0cf82f9fd41aa14438e8996 | 66 | py | Python | qymel/core/__init__.py | hal1932/QyMEL | 4fdf2409aaa34516f021a37aac0f011fe6ea6073 | [
"MIT"
] | 6 | 2019-12-23T05:20:29.000Z | 2021-01-30T21:17:32.000Z | qymel/core/__init__.py | hal1932/QyMEL | 4fdf2409aaa34516f021a37aac0f011fe6ea6073 | [
"MIT"
] | null | null | null | qymel/core/__init__.py | hal1932/QyMEL | 4fdf2409aaa34516f021a37aac0f011fe6ea6073 | [
"MIT"
] | 1 | 2020-03-05T08:17:44.000Z | 2020-03-05T08:17:44.000Z | # coding: utf-8
from .force_reload import *
from .scopes import *
| 16.5 | 27 | 0.727273 |
3fe18d763d2aae257f541fc27bf3a672136ac390 | 5,244 | py | Python | lambda/nodemanager.py | twosdai/cloud-enablement-aws | 145bf88acc1781cdd696e2d77a5c2d3b796e16c3 | [
"Apache-2.0"
] | 11 | 2018-05-25T18:48:30.000Z | 2018-11-30T22:06:58.000Z | lambda/nodemanager.py | twosdai/cloud-enablement-aws | 145bf88acc1781cdd696e2d77a5c2d3b796e16c3 | [
"Apache-2.0"
] | 10 | 2019-01-29T19:39:46.000Z | 2020-07-01T07:37:08.000Z | lambda/nodemanager.py | twosdai/cloud-enablement-aws | 145bf88acc1781cdd696e2d77a5c2d3b796e16c3 | [
"Apache-2.0"
] | 18 | 2019-01-29T05:31:23.000Z | 2021-09-16T20:04:24.000Z | # Copyright 2002-2018 MarkLogic Corporation. All Rights Reserved.
import boto3
import botocore
import logging
import hashlib
import json
import time
from botocore.exceptions import ClientError
log = logging.getLogger()
log.setLevel(logging.INFO)
# global variables
ec2_client = boto3.client('ec2')
asg_client = boto3... | 35.432432 | 101 | 0.54939 |
3fe27cb210e5f440aba20265f1b60a9554e9c206 | 5,724 | py | Python | pyABC/0.10.14/petab/amici.py | ICB-DCM/lookahead-study | b9849ce2b0cebbe55d6c9f7a248a5f4dff191007 | [
"MIT"
] | 3 | 2021-01-20T14:14:04.000Z | 2022-02-23T21:21:18.000Z | pyABC/0.10.14/petab/amici.py | ICB-DCM/lookahead-study | b9849ce2b0cebbe55d6c9f7a248a5f4dff191007 | [
"MIT"
] | 3 | 2021-01-20T23:11:20.000Z | 2021-02-15T14:36:39.000Z | pyABC/Modified/petab/amici.py | ICB-DCM/lookahead-study | b9849ce2b0cebbe55d6c9f7a248a5f4dff191007 | [
"MIT"
] | null | null | null | import logging
from collections.abc import Sequence, Mapping
from typing import Callable, Union
import copy
import pyabc
from .base import PetabImporter, rescale
logger = logging.getLogger(__name__)
try:
import petab
import petab.C as C
except ImportError:
petab = C = None
logger.error("Install petab... | 32.338983 | 79 | 0.601328 |
3fe32adbae6d30f0649147cee237cf1904d94533 | 99 | py | Python | ui_automation_core/helpers/browser/alert_action_type.py | Harshavardhanchowdary/python-ui-testing-automation | a624c6b945276c05722be2919d95aa9e5539d0d0 | [
"MIT"
] | null | null | null | ui_automation_core/helpers/browser/alert_action_type.py | Harshavardhanchowdary/python-ui-testing-automation | a624c6b945276c05722be2919d95aa9e5539d0d0 | [
"MIT"
] | null | null | null | ui_automation_core/helpers/browser/alert_action_type.py | Harshavardhanchowdary/python-ui-testing-automation | a624c6b945276c05722be2919d95aa9e5539d0d0 | [
"MIT"
] | null | null | null | from enum import Enum, auto
| 16.5 | 28 | 0.676768 |
3fe331ae497b79a61bbb73e932ba9991e96f0b3f | 18,769 | py | Python | xsertion/test_layers.py | karazijal/xsertion | 102c1a4f07b049647064a968257d56b00a064d6c | [
"MIT"
] | null | null | null | xsertion/test_layers.py | karazijal/xsertion | 102c1a4f07b049647064a968257d56b00a064d6c | [
"MIT"
] | null | null | null | xsertion/test_layers.py | karazijal/xsertion | 102c1a4f07b049647064a968257d56b00a064d6c | [
"MIT"
] | 1 | 2021-11-09T09:06:48.000Z | 2021-11-09T09:06:48.000Z | import unittest
from xsertion.layers import *
from keras.layers import Input, MaxPooling2D, Convolution2D, Activation, merge, Dense, Flatten
from keras.models import Model
import json
if __name__=="__main__":
unittest.main() | 42.656818 | 121 | 0.553146 |
3fe371c906222e31026634c1cd2e9e52427c680b | 151 | py | Python | language/python/modules/websocket/websocket_module.py | bigfoolliu/liu_aistuff | aa661d37c05c257ee293285dd0868fb7e8227628 | [
"MIT"
] | 1 | 2019-11-25T07:23:42.000Z | 2019-11-25T07:23:42.000Z | language/python/modules/websocket/websocket_module.py | bigfoolliu/liu_aistuff | aa661d37c05c257ee293285dd0868fb7e8227628 | [
"MIT"
] | 13 | 2020-01-07T16:09:47.000Z | 2022-03-02T12:51:44.000Z | language/python/modules/websocket/websocket_module.py | bigfoolliu/liu_aistuff | aa661d37c05c257ee293285dd0868fb7e8227628 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
# author: bigfoolliu
"""
web socket
"""
import websocket
if __name__ == '__main__':
pass
| 10.066667 | 26 | 0.629139 |
3fe5513bca482d43a59c15049895c9303427b971 | 85 | py | Python | engines/__init__.py | mukeran/simple_sandbox | a2a97d13d814548f313871f0bd5c48f65b1a6180 | [
"MIT"
] | null | null | null | engines/__init__.py | mukeran/simple_sandbox | a2a97d13d814548f313871f0bd5c48f65b1a6180 | [
"MIT"
] | null | null | null | engines/__init__.py | mukeran/simple_sandbox | a2a97d13d814548f313871f0bd5c48f65b1a6180 | [
"MIT"
] | null | null | null | from .watcher import FileWatcher
from .fpm_sniffer import FPMSniffer, FPMSnifferMode
| 28.333333 | 51 | 0.858824 |
3fe6078d322f58b763a2e00d815b964e8911f9bf | 885 | py | Python | PyTrinamic/modules/TMC_EvalShield.py | trinamic-AA/PyTrinamic | b054f4baae8eb6d3f5d2574cf69c232f66abb4ee | [
"MIT"
] | 37 | 2019-01-13T11:08:45.000Z | 2022-03-25T07:18:15.000Z | PyTrinamic/modules/TMC_EvalShield.py | AprDec/PyTrinamic | a9db10071f8fbeebafecb55c619e5893757dd0ce | [
"MIT"
] | 56 | 2019-02-25T02:48:27.000Z | 2022-03-31T08:45:34.000Z | PyTrinamic/modules/TMC_EvalShield.py | AprDec/PyTrinamic | a9db10071f8fbeebafecb55c619e5893757dd0ce | [
"MIT"
] | 26 | 2019-01-14T05:20:16.000Z | 2022-03-08T13:27:35.000Z | '''
Created on 18.03.2020
@author: LK
'''
| 26.818182 | 85 | 0.615819 |
3fe68b75dfeb56985a424ac16b45a678c22019cc | 285 | py | Python | kattis/rollcall.py | terror/Solutions | 1ad33daec95b565a38ac4730261593bcf249ac86 | [
"CC0-1.0"
] | 2 | 2021-04-05T14:26:37.000Z | 2021-06-10T04:22:01.000Z | kattis/rollcall.py | terror/Solutions | 1ad33daec95b565a38ac4730261593bcf249ac86 | [
"CC0-1.0"
] | null | null | null | kattis/rollcall.py | terror/Solutions | 1ad33daec95b565a38ac4730261593bcf249ac86 | [
"CC0-1.0"
] | null | null | null | import sys
d, n = [], {}
for i in sys.stdin:
if i.rstrip() == "":
break
a, b = map(str, i.split())
d.append([a, b])
if a in n:
n[a] += 1
else:
n[a] = 1
d = sorted(d, key=lambda x: (x[1], x[0]))
for k, v in d:
if n[k] > 1:
print(k, v)
else:
print(k)
| 14.25 | 41 | 0.45614 |
3fe82d5a85daeba3d97651074742e05e1165543c | 1,697 | py | Python | test/vizier/test_nodes.py | robotarium/vizier | 6ce2be4fc0edcdaf5ba246094c2e79bff32e219d | [
"MIT"
] | 11 | 2016-08-18T20:37:06.000Z | 2019-11-24T17:34:27.000Z | test/vizier/test_nodes.py | robotarium/vizier | 6ce2be4fc0edcdaf5ba246094c2e79bff32e219d | [
"MIT"
] | 6 | 2018-10-07T17:01:40.000Z | 2019-11-24T17:41:16.000Z | test/vizier/test_nodes.py | robotarium/vizier | 6ce2be4fc0edcdaf5ba246094c2e79bff32e219d | [
"MIT"
] | 3 | 2016-08-22T13:58:24.000Z | 2018-06-07T21:06:35.000Z | import json
import vizier.node as node
import unittest
| 30.854545 | 69 | 0.614614 |
3fe84decaa2c4b931f2c3a8a70e6c95473baf73c | 457 | py | Python | tests/not_test_basics.py | kipfer/simple_modbus_server | f16caea62311e1946498392ab4cb5f3d2e1306cb | [
"MIT"
] | 1 | 2021-03-11T13:04:00.000Z | 2021-03-11T13:04:00.000Z | tests/not_test_basics.py | kipfer/simple_modbus_server | f16caea62311e1946498392ab4cb5f3d2e1306cb | [
"MIT"
] | null | null | null | tests/not_test_basics.py | kipfer/simple_modbus_server | f16caea62311e1946498392ab4cb5f3d2e1306cb | [
"MIT"
] | null | null | null | import modbus_server
s = modbus_server.Server(
host="localhost", port=5020, daemon=True, loglevel="WARNING", autostart=False
)
s.start()
s.set_coil(1, True)
s.set_coils(2, [True, False, True])
s.set_discrete_input(1, True)
s.set_discrete_inputs(2, [True, False, True])
s.set_input_register(1, 1234, "h")
s.set_i... | 20.772727 | 81 | 0.68709 |
3fe8ccedd5919a259d55f873b8eeacc8ac42d24a | 5,417 | py | Python | cuda/rrnn_semiring.py | Noahs-ARK/rational-recurrences | 3b7ef54520bcaa2b24551cf42a125c9251124229 | [
"MIT"
] | 27 | 2018-09-28T02:17:07.000Z | 2020-10-15T14:57:16.000Z | cuda/rrnn_semiring.py | Noahs-ARK/rational-recurrences | 3b7ef54520bcaa2b24551cf42a125c9251124229 | [
"MIT"
] | 1 | 2021-03-25T22:08:35.000Z | 2021-03-25T22:08:35.000Z | cuda/rrnn_semiring.py | Noahs-ARK/rational-recurrences | 3b7ef54520bcaa2b24551cf42a125c9251124229 | [
"MIT"
] | 5 | 2018-11-06T05:49:51.000Z | 2019-10-26T03:36:43.000Z | RRNN_SEMIRING = """
extern "C" {
__global__ void rrnn_semiring_fwd(
const float * __restrict__ u,
const float * __restrict__ eps,
const float * __restrict__ c1_init,
const float * __restrict__ c2_init,
const int len,
... | 36.601351 | 86 | 0.502677 |
3fe8e4411ff091a355fe9346309f0659c9b08983 | 1,841 | py | Python | tests.py | c-okelly/movie_script_analytics | 6fee40c0378921199ab14ca0b4db447b9f4e7bcf | [
"MIT"
] | 1 | 2017-11-09T13:24:47.000Z | 2017-11-09T13:24:47.000Z | tests.py | c-okelly/movie_script_analytics | 6fee40c0378921199ab14ca0b4db447b9f4e7bcf | [
"MIT"
] | null | null | null | tests.py | c-okelly/movie_script_analytics | 6fee40c0378921199ab14ca0b4db447b9f4e7bcf | [
"MIT"
] | null | null | null | import re
import text_objects
import numpy as np
import pickle
# f = open("Data/scripts_text/17-Again.txt", 'r')
# text = f.read()
# text = text[900:1500]
# print(text)
# count = len(re.findall("\W+",text))
# print(count)
#
# lines = text.split('\n')
# lines_on_empty = re.split("\n\s+\n", text)
# print(len(lines))
#... | 23.303797 | 98 | 0.558935 |
3fea883542666ba0f05267690f8d99f2d06892ea | 1,945 | py | Python | malcolm/modules/demo/parts/countermovepart.py | dinojugosloven/pymalcolm | 0b856ee1113efdb42f2f3b15986f8ac5f9e1b35a | [
"Apache-2.0"
] | null | null | null | malcolm/modules/demo/parts/countermovepart.py | dinojugosloven/pymalcolm | 0b856ee1113efdb42f2f3b15986f8ac5f9e1b35a | [
"Apache-2.0"
] | null | null | null | malcolm/modules/demo/parts/countermovepart.py | dinojugosloven/pymalcolm | 0b856ee1113efdb42f2f3b15986f8ac5f9e1b35a | [
"Apache-2.0"
] | null | null | null | import time
from annotypes import Anno, add_call_types
from malcolm.core import PartRegistrar
from malcolm.modules import builtin
# Pull re-used annotypes into our namespace in case we are subclassed
APartName = builtin.parts.APartName
AMri = builtin.parts.AMri
with Anno("The demand value to move our counter motor ... | 36.018519 | 77 | 0.679177 |
3fea9db35ea3c9741fed546bd70ab750ac964bbd | 12,740 | py | Python | scripts/run_temporal_averaging.py | alexkaiser/heart_valves | 53f30ec3680503542890a84949b7fb51d1734272 | [
"BSD-3-Clause"
] | null | null | null | scripts/run_temporal_averaging.py | alexkaiser/heart_valves | 53f30ec3680503542890a84949b7fb51d1734272 | [
"BSD-3-Clause"
] | null | null | null | scripts/run_temporal_averaging.py | alexkaiser/heart_valves | 53f30ec3680503542890a84949b7fb51d1734272 | [
"BSD-3-Clause"
] | null | null | null | import pyvista
import os, sys, glob
import subprocess
import math
from natsort import natsorted
import multiprocessing
if __name__ == '__main__':
if len(sys.argv) >= 2:
nprocs_sim = int(sys.argv[1]) # number of procs in the sim, which determines how many files go into the decomposed data
else:... | 33.882979 | 209 | 0.586499 |
3fec010889ccbdbd07b4bb7fe68a11cde75d9565 | 3,641 | py | Python | server.py | MVHSiot/yelperhelper | a94dc9e80e301241da58b678770338e3fa9b642e | [
"MIT"
] | null | null | null | server.py | MVHSiot/yelperhelper | a94dc9e80e301241da58b678770338e3fa9b642e | [
"MIT"
] | null | null | null | server.py | MVHSiot/yelperhelper | a94dc9e80e301241da58b678770338e3fa9b642e | [
"MIT"
] | null | null | null | import sys
try:
sys.path.append('/opt/python3/lib/python3.4/site-packages')
except:
pass
import yelp_api
import pickle
import calc
pub_key = 'pub-c-2c436bc0-666e-4975-baaf-63f16a61558d'
sub_key = 'sub-c-0442432a-3312-11e7-bae3-02ee2ddab7fe'
from pubnub.callbacks import SubscribeCallback
from pubnub.enums impor... | 44.402439 | 198 | 0.611096 |
3fed58a2f0d55e3c995e8a4ab026bd1e2fa3c343 | 59 | py | Python | gmaploader/__init__.py | cormac-rynne/gmaploader | eec679af9a5d36b691bde05ffd6043bfef7e1acf | [
"MIT"
] | 2 | 2022-02-02T16:41:17.000Z | 2022-03-16T08:43:18.000Z | gmaploader/__init__.py | cormac-rynne/gmaploader | eec679af9a5d36b691bde05ffd6043bfef7e1acf | [
"MIT"
] | null | null | null | gmaploader/__init__.py | cormac-rynne/gmaploader | eec679af9a5d36b691bde05ffd6043bfef7e1acf | [
"MIT"
] | null | null | null | __version__ = '0.1.1'
from .gmaploader import GMapLoader
| 11.8 | 34 | 0.745763 |
3feef5a3e0cc27bf16fbab36a842bb9bb4ecc2cd | 643 | py | Python | machina/templatetags/forum_tracking_tags.py | jujinesy/initdjango-machina | 93c24877f546521867b3ef77fa278237af932d42 | [
"BSD-3-Clause"
] | 1 | 2021-10-08T03:31:24.000Z | 2021-10-08T03:31:24.000Z | machina/templatetags/forum_tracking_tags.py | jujinesy/initdjango-machina | 93c24877f546521867b3ef77fa278237af932d42 | [
"BSD-3-Clause"
] | 7 | 2020-02-12T01:11:13.000Z | 2022-03-11T23:26:32.000Z | machina/templatetags/forum_tracking_tags.py | jujinesy/initdjango-machina | 93c24877f546521867b3ef77fa278237af932d42 | [
"BSD-3-Clause"
] | 1 | 2019-04-20T05:26:27.000Z | 2019-04-20T05:26:27.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django import template
from machina.core.loading import get_class
TrackingHandler = get_class('forum_tracking.handler', 'TrackingHandler')
register = template.Library()
| 24.730769 | 91 | 0.738725 |
3fef44aadd222f045efc994567ce2c00bef12f97 | 1,194 | py | Python | xmodaler/modeling/layers/attention_pooler.py | cclauss/xmodaler | 1368fba6c550e97008628edbf01b59a0a6c8fde5 | [
"Apache-2.0"
] | 830 | 2021-06-26T07:16:33.000Z | 2022-03-25T10:31:32.000Z | xmodaler/modeling/layers/attention_pooler.py | kevinjunwei/xmodaler | 3e128a816876988c5fb07d842fde4a140e699dde | [
"Apache-2.0"
] | 28 | 2021-08-19T12:39:02.000Z | 2022-03-14T13:04:19.000Z | xmodaler/modeling/layers/attention_pooler.py | kevinjunwei/xmodaler | 3e128a816876988c5fb07d842fde4a140e699dde | [
"Apache-2.0"
] | 85 | 2021-08-15T06:58:29.000Z | 2022-02-19T07:30:56.000Z | # Copyright 2021 JD.com, Inc., JD AI
"""
@author: Yehao Li
@contact: yehaoli.sysu@gmail.com
"""
import torch
import torch.nn as nn
__all__ = ["AttentionPooler"] | 29.85 | 68 | 0.593802 |
3fefc1a6bf75d8c0151f7c8fa8710346285e3ae9 | 281 | py | Python | aas_core_meta/__init__.py | aas-core-works/aas-core3-meta | 88b618c82f78392a47ee58cf2657ae6df8e5a418 | [
"MIT"
] | null | null | null | aas_core_meta/__init__.py | aas-core-works/aas-core3-meta | 88b618c82f78392a47ee58cf2657ae6df8e5a418 | [
"MIT"
] | null | null | null | aas_core_meta/__init__.py | aas-core-works/aas-core3-meta | 88b618c82f78392a47ee58cf2657ae6df8e5a418 | [
"MIT"
] | null | null | null | """Provide meta-models for Asset Administration Shell information model."""
__version__ = "2021.11.20a2"
__author__ = (
"Nico Braunisch, Marko Ristin, Robert Lehmann, Marcin Sadurski, Manuel Sauer"
)
__license__ = "License :: OSI Approved :: MIT License"
__status__ = "Alpha"
| 31.222222 | 81 | 0.736655 |
3ff189fdd25a003504ca018c6776d007950e9fc2 | 2,937 | py | Python | arxivmail/web.py | dfm/ArXivMailer | f217466b83ae3009330683d1c53ba5a44b4bab29 | [
"MIT"
] | 1 | 2020-09-15T11:59:44.000Z | 2020-09-15T11:59:44.000Z | arxivmail/web.py | dfm/ArXivMailer | f217466b83ae3009330683d1c53ba5a44b4bab29 | [
"MIT"
] | null | null | null | arxivmail/web.py | dfm/ArXivMailer | f217466b83ae3009330683d1c53ba5a44b4bab29 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import flask
from .mail import send_email
from .models import db, Subscriber, Category
__all__ = ["web"]
web = flask.Blueprint("web", __name__)
| 34.964286 | 76 | 0.606742 |
3ff244c8c0c0b1265e61249a530b3e42331c5fc4 | 13,794 | py | Python | qiskit/pulse/timeslots.py | lerongil/qiskit-terra | a25af2a2378bc3d4f5ec73b948d048d1b707454c | [
"Apache-2.0"
] | 3 | 2019-11-20T08:15:28.000Z | 2020-11-01T15:32:57.000Z | qiskit/pulse/timeslots.py | lerongil/qiskit-terra | a25af2a2378bc3d4f5ec73b948d048d1b707454c | [
"Apache-2.0"
] | null | null | null | qiskit/pulse/timeslots.py | lerongil/qiskit-terra | a25af2a2378bc3d4f5ec73b948d048d1b707454c | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... | 32.456471 | 89 | 0.603741 |
3ff2f2040265231a2d5824e04f8c8d39faec1ec0 | 22,499 | py | Python | core/assembler.py | iahuang/scratch-gcc | bc4989f3dc54f0cdc3098f66078d17750c111bec | [
"MIT"
] | null | null | null | core/assembler.py | iahuang/scratch-gcc | bc4989f3dc54f0cdc3098f66078d17750c111bec | [
"MIT"
] | null | null | null | core/assembler.py | iahuang/scratch-gcc | bc4989f3dc54f0cdc3098f66078d17750c111bec | [
"MIT"
] | null | null | null | """ A basic two-pass MIPS assembler. Outputs a binary file in a custom format that can then be loaded into Scratch """
import struct
import re
import json
import os
"""
Diagram of the Scratch MIPS VM memory space
+--------------------- <- 0x0000000
| i/o space (see below)
+--------------------- <- 0x0000100
| data s... | 34.089394 | 126 | 0.586382 |
3ff3b22779c14ce17a4d6563f15286360782e0ac | 3,237 | py | Python | qvdfile/tests/test_qvdfile.py | cosmocracy/qvdfile | c1f92ec153c07f607fd57c6f6679e3c7269d643e | [
"Apache-2.0"
] | 17 | 2019-07-18T12:50:33.000Z | 2021-05-25T06:26:45.000Z | qvdfile/tests/test_qvdfile.py | cosmocracy/qvdfile | c1f92ec153c07f607fd57c6f6679e3c7269d643e | [
"Apache-2.0"
] | 2 | 2021-05-15T03:53:08.000Z | 2021-07-22T14:31:15.000Z | qvdfile/tests/test_qvdfile.py | cosmocracy/qvdfile | c1f92ec153c07f607fd57c6f6679e3c7269d643e | [
"Apache-2.0"
] | 5 | 2019-07-18T12:55:31.000Z | 2021-12-21T15:09:37.000Z | import pytest
import errno
import os
import glob
import shutil
import xml.etree.ElementTree as ET
from qvdfile.qvdfile import QvdFile, BadFormat
# READING QVD ==================================================================
# init
def test_init_smoke(qvd):
# metadata is in attribs
assert "TableName"... | 22.957447 | 81 | 0.611369 |
3ff5387e0936b375509e91f2742e4bc5ae6feee1 | 4,221 | py | Python | app/__init__.py | i2nes/app-engine-blog | 94cdc25674c946ad643f7f140cbedf095773de3f | [
"MIT"
] | null | null | null | app/__init__.py | i2nes/app-engine-blog | 94cdc25674c946ad643f7f140cbedf095773de3f | [
"MIT"
] | null | null | null | app/__init__.py | i2nes/app-engine-blog | 94cdc25674c946ad643f7f140cbedf095773de3f | [
"MIT"
] | null | null | null | from flask import Flask
from app.models import Article, Feature
import logging
def create_app(config, blog_config):
"""This initiates the Flask app and starts your app engine instance.
Startup Steps:
1. Instantiate the Flask app with the config settings.
2. Register bluprints.
3. Create the Contac... | 33.768 | 116 | 0.630419 |
3ff664299cdf95218a7f9411379521d7b5cdbaa4 | 430 | py | Python | libs/msfpayload.py | darkoperator/SideStep | 2c75af77ee2241595de4c65d7e4f8342dcc0bb50 | [
"BSL-1.0"
] | 3 | 2015-09-16T16:09:14.000Z | 2017-01-14T21:53:08.000Z | libs/msfpayload.py | darkoperator/SideStep | 2c75af77ee2241595de4c65d7e4f8342dcc0bb50 | [
"BSL-1.0"
] | null | null | null | libs/msfpayload.py | darkoperator/SideStep | 2c75af77ee2241595de4c65d7e4f8342dcc0bb50 | [
"BSL-1.0"
] | 2 | 2016-04-22T04:44:50.000Z | 2021-12-18T15:12:22.000Z | """
Generates the Meterpreter payload from msfvenom
"""
import subprocess | 53.75 | 275 | 0.727907 |
3ff6b1161dba69f783ae2e124e780852ea91eaaa | 9,689 | py | Python | RevitPythonShell_Scripts/GoogleTools.extension/GoogleTools.tab/Ontologies.Panel/BOS_SetValues.pushbutton/script.py | arupiot/create_revit_families | 9beab3c7e242426b2dca99ca5477fdb433e39db2 | [
"MIT"
] | 1 | 2021-02-04T18:20:58.000Z | 2021-02-04T18:20:58.000Z | RevitPythonShell_Scripts/GoogleTools.extension/GoogleTools.tab/Ontologies.Panel/BOS_SetValues.pushbutton/script.py | arupiot/DBOTools | 9beab3c7e242426b2dca99ca5477fdb433e39db2 | [
"MIT"
] | null | null | null | RevitPythonShell_Scripts/GoogleTools.extension/GoogleTools.tab/Ontologies.Panel/BOS_SetValues.pushbutton/script.py | arupiot/DBOTools | 9beab3c7e242426b2dca99ca5477fdb433e39db2 | [
"MIT"
] | null | null | null | # Select an element
# Open yaml file with entity types
# If parameters are already present, set values according to yaml input
import sys
import clr
import System
import rpw
import yaml
import pprint
from System.Collections.Generic import *
clr.AddReference("RevitAPI")
from Autodesk.Revit.DB import *
from rpw.ui.fo... | 38.601594 | 158 | 0.680462 |
3ff6bad744395c2228278988f9b9886b23c17ebf | 8,110 | py | Python | Code/src/models/optim/SimCLR_trainer.py | antoine-spahr/X-ray-Anomaly-Detection | 850b6195d6290a50eee865b4d5a66f5db5260e8f | [
"MIT"
] | 2 | 2020-10-12T08:25:13.000Z | 2021-08-16T08:43:43.000Z | Code/src/models/optim/SimCLR_trainer.py | antoine-spahr/X-ray-Anomaly-Detection | 850b6195d6290a50eee865b4d5a66f5db5260e8f | [
"MIT"
] | null | null | null | Code/src/models/optim/SimCLR_trainer.py | antoine-spahr/X-ray-Anomaly-Detection | 850b6195d6290a50eee865b4d5a66f5db5260e8f | [
"MIT"
] | 1 | 2020-06-17T07:40:17.000Z | 2020-06-17T07:40:17.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import numpy as np
import time
import logging
from sklearn.manifold import TSNE
from src.models.optim.CustomLosses import NT_Xent_loss, SupervisedContrastiveLoss
from src.utils.utils import print_progessbar
| 38.990385 | 181 | 0.561159 |
3ff6e816cd8b898e3be215d0d77841e6ad25c848 | 543 | py | Python | patients/migrations/0008_alter_patient_age.py | Curewell-Homeo-Clinic/admin-system | c8ce56a2bdbccfe1e6bec09068932f1943498b9f | [
"MIT"
] | 1 | 2021-11-29T15:24:41.000Z | 2021-11-29T15:24:41.000Z | patients/migrations/0008_alter_patient_age.py | Curewell-Homeo-Clinic/admin-system | c8ce56a2bdbccfe1e6bec09068932f1943498b9f | [
"MIT"
] | 46 | 2021-11-29T16:05:55.000Z | 2022-03-01T13:04:45.000Z | patients/migrations/0008_alter_patient_age.py | Curewell-Homeo-Clinic/admin-system | c8ce56a2bdbccfe1e6bec09068932f1943498b9f | [
"MIT"
] | null | null | null | # Generated by Django 3.2.9 on 2021-11-20 16:13
import django.core.validators
from django.db import migrations, models
| 27.15 | 179 | 0.67035 |
3ff70f0f8e53ee1c511ea409b894a75564f6138d | 4,348 | py | Python | kitsune/questions/tests/test_utils.py | AndrewDVXI/kitsune | 84bd4fa60346681c3fc5a03b0b1540fd1335cee2 | [
"BSD-3-Clause"
] | 1 | 2021-07-18T00:41:16.000Z | 2021-07-18T00:41:16.000Z | kitsune/questions/tests/test_utils.py | AndrewDVXI/kitsune | 84bd4fa60346681c3fc5a03b0b1540fd1335cee2 | [
"BSD-3-Clause"
] | 9 | 2021-04-08T22:05:53.000Z | 2022-03-12T00:54:11.000Z | kitsune/questions/tests/test_utils.py | AndrewDVXI/kitsune | 84bd4fa60346681c3fc5a03b0b1540fd1335cee2 | [
"BSD-3-Clause"
] | 1 | 2020-07-28T15:53:02.000Z | 2020-07-28T15:53:02.000Z | from kitsune.questions.models import Answer, Question
from kitsune.questions.tests import AnswerFactory, QuestionFactory
from kitsune.questions.utils import (
get_mobile_product_from_ua,
mark_content_as_spam,
num_answers,
num_questions,
num_solutions,
)
from kitsune.sumo.tests import TestCase
from k... | 34.507937 | 207 | 0.606486 |
3ff942a422edefd4743417af8a01150a5a71f98a | 10,122 | py | Python | scripts/create_fluseverity_figs_v2/export_zOR_classif_swap.py | eclee25/flu-SDI-exploratory-age | 2f5a4d97b84d2116e179e85fe334edf4556aa946 | [
"MIT"
] | 3 | 2018-03-29T23:02:43.000Z | 2020-08-10T12:01:50.000Z | scripts/create_fluseverity_figs_v2/export_zOR_classif_swap.py | eclee25/flu-SDI-exploratory-age | 2f5a4d97b84d2116e179e85fe334edf4556aa946 | [
"MIT"
] | null | null | null | scripts/create_fluseverity_figs_v2/export_zOR_classif_swap.py | eclee25/flu-SDI-exploratory-age | 2f5a4d97b84d2116e179e85fe334edf4556aa946 | [
"MIT"
] | null | null | null | #!/usr/bin/python
##############################################
###Python template
###Author: Elizabeth Lee
###Date: 10/14/14
###Function: Export zOR retrospective and early warning classifications into csv file format (SDI and ILINet, national and regional for SDI)
### Use nation-level peak-based retrospective class... | 59.893491 | 206 | 0.742936 |
3ff99e7156481e3c6520089236ad30d435cc64ca | 3,346 | py | Python | sonar/endpoints.py | sharm294/sonar | 99de16dd16d0aa77734584e67263c78a37abef86 | [
"MIT"
] | 5 | 2018-11-21T02:33:38.000Z | 2020-10-30T12:22:05.000Z | sonar/endpoints.py | sharm294/sonar | 99de16dd16d0aa77734584e67263c78a37abef86 | [
"MIT"
] | 2 | 2018-12-28T18:31:45.000Z | 2020-06-12T19:24:57.000Z | sonar/endpoints.py | sharm294/sonar | 99de16dd16d0aa77734584e67263c78a37abef86 | [
"MIT"
] | 1 | 2019-03-10T13:48:50.000Z | 2019-03-10T13:48:50.000Z | """
Signal endpoints that can be used in testbenches
"""
import textwrap
from typing import Dict
import sonar.base_types as base
| 22.456376 | 104 | 0.545129 |
3ff9c9e147dda16eeaf022e601e081b35faea86c | 15,400 | py | Python | minemeld/ft/condition/BoolExprParser.py | zul126/minemeld-core | 2eb9b9bfd7654aee57aabd5fb280d4e89a438daf | [
"Apache-2.0"
] | 1 | 2021-01-02T07:25:04.000Z | 2021-01-02T07:25:04.000Z | minemeld/ft/condition/BoolExprParser.py | zul126/minemeld-core | 2eb9b9bfd7654aee57aabd5fb280d4e89a438daf | [
"Apache-2.0"
] | null | null | null | minemeld/ft/condition/BoolExprParser.py | zul126/minemeld-core | 2eb9b9bfd7654aee57aabd5fb280d4e89a438daf | [
"Apache-2.0"
] | 1 | 2019-03-14T06:52:52.000Z | 2019-03-14T06:52:52.000Z | # Generated from BoolExpr.g4 by ANTLR 4.5.1
# encoding: utf-8
from __future__ import print_function
from antlr4 import *
from io import StringIO
# flake8: noqa
| 33.04721 | 241 | 0.586104 |
3ffb7c0442cbda7e7c873ec775ef33cdb0c000d2 | 398 | py | Python | nodes/networkedSingleStepper/temporaryURLNode.py | imoyer/pygestalt | d332df64264cce4a2bec8a73d698c386f1eaca7b | [
"MIT"
] | 1 | 2017-07-03T08:34:39.000Z | 2017-07-03T08:34:39.000Z | nodes/networkedSingleStepper/temporaryURLNode.py | imoyer/pygestalt | d332df64264cce4a2bec8a73d698c386f1eaca7b | [
"MIT"
] | 3 | 2015-12-04T23:14:50.000Z | 2016-11-08T16:24:32.000Z | nodes/networkedSingleStepper/temporaryURLNode.py | imnp/pygestalt | d332df64264cce4a2bec8a73d698c386f1eaca7b | [
"MIT"
] | 1 | 2017-09-13T00:17:39.000Z | 2017-09-13T00:17:39.000Z | <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /vn/testNode.py was not found on this server.</p>
<p>Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.</p>
<hr>... | 33.166667 | 85 | 0.718593 |
3ffbaac7ded264cd662d18071c85e8138b2662eb | 4,761 | py | Python | cppwg/writers/header_collection_writer.py | josephsnyder/cppwg | 265117455ed57eb250643a28ea6029c2bccf3ab3 | [
"MIT"
] | 21 | 2017-10-03T14:29:36.000Z | 2021-12-07T08:54:43.000Z | cppwg/writers/header_collection_writer.py | josephsnyder/cppwg | 265117455ed57eb250643a28ea6029c2bccf3ab3 | [
"MIT"
] | 2 | 2017-12-29T19:17:44.000Z | 2020-03-27T14:59:27.000Z | cppwg/writers/header_collection_writer.py | josephsnyder/cppwg | 265117455ed57eb250643a28ea6029c2bccf3ab3 | [
"MIT"
] | 6 | 2019-03-21T11:55:52.000Z | 2021-07-13T20:49:50.000Z | #!/usr/bin/env python
"""
Generate the file classes_to_be_wrapped.hpp, which contains includes,
instantiation and naming typedefs for all classes that are to be
automatically wrapped.
"""
import os
import ntpath
| 36.068182 | 91 | 0.603235 |
3ffbd01add7dfacc772a2751a5811b5cb60b641e | 6,590 | py | Python | 22-crab-combat/solution22_2.py | johntelforduk/advent-of-code-2020 | 138df3a7b12e418f371f641fed02e57a98a7392e | [
"MIT"
] | 1 | 2020-12-03T13:20:49.000Z | 2020-12-03T13:20:49.000Z | 22-crab-combat/solution22_2.py | johntelforduk/advent-of-code-2020 | 138df3a7b12e418f371f641fed02e57a98a7392e | [
"MIT"
] | null | null | null | 22-crab-combat/solution22_2.py | johntelforduk/advent-of-code-2020 | 138df3a7b12e418f371f641fed02e57a98a7392e | [
"MIT"
] | null | null | null | # Solution to part 2 of day 22 of AOC 2020, Crab Combat.
# https://adventofcode.com/2020/day/22
import sys
VERBOSE = ('-v' in sys.argv)
def text_to_cards(text: str) -> list:
"""For parm text file, return a list of integers which are the cards in that text file."""
cards = []
# Each card starts on a n... | 35.621622 | 119 | 0.582398 |
3ffc66c1a55abdcb165f5612bc7ea3c265086406 | 246 | py | Python | consts.py | mauroreisvieira/sublime-tailwindcss-intellisense | 140edc90c59c045fc8a9d7f6bcff0b727660ee64 | [
"MIT"
] | null | null | null | consts.py | mauroreisvieira/sublime-tailwindcss-intellisense | 140edc90c59c045fc8a9d7f6bcff0b727660ee64 | [
"MIT"
] | null | null | null | consts.py | mauroreisvieira/sublime-tailwindcss-intellisense | 140edc90c59c045fc8a9d7f6bcff0b727660ee64 | [
"MIT"
] | null | null | null | import os
# @see https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss
EXTENSION_UID = "bradlc.vscode-tailwindcss"
EXTENSION_VERSION = "0.5.2"
SERVER_BINARY_PATH = os.path.join("extension", "dist", "server", "index.js")
| 30.75 | 84 | 0.764228 |
3ffe70804c74668d12ccd199fbcd96d4fb1cfb92 | 2,426 | py | Python | backend/app/alembic/versions/491383f70589_add_separate_reported_and_deleted_tables.py | Pinafore/Karl-flashcards-web-app | 2f4d9925c545f83eb3289dfef85d9b0bf9bfeb8c | [
"Apache-2.0"
] | 7 | 2020-09-13T06:06:32.000Z | 2021-11-15T11:37:16.000Z | backend/app/alembic/versions/491383f70589_add_separate_reported_and_deleted_tables.py | Pinafore/Karl-flashcards-web-app | 2f4d9925c545f83eb3289dfef85d9b0bf9bfeb8c | [
"Apache-2.0"
] | 16 | 2020-08-28T20:38:27.000Z | 2021-03-18T04:03:00.000Z | backend/app/alembic/versions/491383f70589_add_separate_reported_and_deleted_tables.py | Pinafore/Karl-flashcards-web-app | 2f4d9925c545f83eb3289dfef85d9b0bf9bfeb8c | [
"Apache-2.0"
] | null | null | null | """add separate reported and deleted tables
Revision ID: 491383f70589
Revises: 9afc4e3a9bf3
Create Date: 2020-06-26 05:23:30.267933
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = '491383f70589'
down_revision = '9afc4e3... | 41.827586 | 162 | 0.694559 |
3fffb39e0047b218b9939ad4a6b88417807e3ce7 | 17,935 | py | Python | test/test_viscous.py | nchristensen/mirgecom | f27285d1fc7e077e0b1ac6872712d88517588e33 | [
"MIT"
] | null | null | null | test/test_viscous.py | nchristensen/mirgecom | f27285d1fc7e077e0b1ac6872712d88517588e33 | [
"MIT"
] | null | null | null | test/test_viscous.py | nchristensen/mirgecom | f27285d1fc7e077e0b1ac6872712d88517588e33 | [
"MIT"
] | null | null | null | """Test the viscous fluid helper functions."""
__copyright__ = """
Copyright (C) 2021 University of Illinois Board of Trustees
"""
__license__ = """
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Softwar... | 34.292543 | 84 | 0.652188 |
b200470663bb7eee02e9c82ffb877d8af91ad93e | 216 | py | Python | aiobotocore_refreshable_credentials/__init__.py | aweber/aiobotocore-refreshable-credentials | 3310d3fa29ac657f7cd5f64829da5f9b12c7a86d | [
"BSD-3-Clause"
] | null | null | null | aiobotocore_refreshable_credentials/__init__.py | aweber/aiobotocore-refreshable-credentials | 3310d3fa29ac657f7cd5f64829da5f9b12c7a86d | [
"BSD-3-Clause"
] | 2 | 2021-05-21T14:18:52.000Z | 2022-03-15T12:34:45.000Z | aiobotocore_refreshable_credentials/__init__.py | aweber/aiobotocore-refreshable-credentials | 3310d3fa29ac657f7cd5f64829da5f9b12c7a86d | [
"BSD-3-Clause"
] | 1 | 2021-06-18T18:37:15.000Z | 2021-06-18T18:37:15.000Z | """
aiobotocore-refreshable-credentials
===================================
"""
from aiobotocore_refreshable_credentials.session import get_session
version = '1.0.3'
__all__ = [
'get_session',
'version'
]
| 15.428571 | 67 | 0.606481 |
b2021676535704ccb7bbd4b21a330bdfa74bae2e | 702 | py | Python | g13gui/bitwidgets/label_tests.py | jtgans/g13gui | aa07ee91b0fd89eb8d9991291e11ca3a97ca11cc | [
"MIT"
] | 3 | 2021-10-16T01:28:24.000Z | 2021-12-07T21:49:54.000Z | g13gui/bitwidgets/label_tests.py | jtgans/g13gui | aa07ee91b0fd89eb8d9991291e11ca3a97ca11cc | [
"MIT"
] | 12 | 2021-05-09T16:57:18.000Z | 2021-06-16T19:20:57.000Z | g13gui/bitwidgets/label_tests.py | jtgans/g13gui | aa07ee91b0fd89eb8d9991291e11ca3a97ca11cc | [
"MIT"
] | null | null | null | import unittest
import time
from g13gui.bitwidgets.display import Display
from g13gui.bitwidgets.x11displaydevice import X11DisplayDevice
from g13gui.bitwidgets.label import Label
if __name__ == '__main__':
unittest.main()
| 22.645161 | 63 | 0.64245 |
b206b349123d73fd230c868195f898309f10c8ec | 7,772 | py | Python | padre/git_utils.py | krislindgren/padre | 56e3342a953fdc472adc11ce301acabf6c595760 | [
"MIT"
] | null | null | null | padre/git_utils.py | krislindgren/padre | 56e3342a953fdc472adc11ce301acabf6c595760 | [
"MIT"
] | null | null | null | padre/git_utils.py | krislindgren/padre | 56e3342a953fdc472adc11ce301acabf6c595760 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# MIT License
#
# Modified from https://github.com/wzpan/git-repo-sync/
import os
import subprocess
import sys
| 34.237885 | 76 | 0.556356 |
b2080b7d4050889b2b37d9d988f89eaa6cb3c1e8 | 11,358 | py | Python | domain_clf_analysis.py | xiaoleihuang/Domain_Adaptation_ACL2018 | c077ceb7f67f1836043df88ac16ffed53cd3a9cb | [
"Apache-2.0"
] | 3 | 2018-06-12T01:43:18.000Z | 2019-10-01T16:21:43.000Z | domain_clf_analysis.py | xiaoleihuang/Domain_Adaptation_ACL2018 | c077ceb7f67f1836043df88ac16ffed53cd3a9cb | [
"Apache-2.0"
] | null | null | null | domain_clf_analysis.py | xiaoleihuang/Domain_Adaptation_ACL2018 | c077ceb7f67f1836043df88ac16ffed53cd3a9cb | [
"Apache-2.0"
] | null | null | null | """
Test on one domain, and train on the other domains,
Output f1 scores and visualize them by heat map
"""
from utils import data_helper, model_helper
from sklearn.metrics import f1_score
from imblearn.over_sampling import RandomOverSampler
from sklearn.preprocessing import LabelEncoder
from sklearn.feature_extractio... | 39.992958 | 199 | 0.588044 |
b209d756a7a9dd9b0a6aa608dc616fb5501e9ff4 | 219 | py | Python | 01 - Expressions, variables and assignments/exercises/perimeter-of-rectangle.py | PableraShow/python-exercises | e1648fd42f3009ec6fb1e2096852b6d399e91d5b | [
"MIT"
] | 8 | 2018-10-01T17:35:57.000Z | 2022-02-01T08:12:12.000Z | 01 - Expressions, variables and assignments/exercises/perimeter-of-rectangle.py | PableraShow/python-exercises | e1648fd42f3009ec6fb1e2096852b6d399e91d5b | [
"MIT"
] | null | null | null | 01 - Expressions, variables and assignments/exercises/perimeter-of-rectangle.py | PableraShow/python-exercises | e1648fd42f3009ec6fb1e2096852b6d399e91d5b | [
"MIT"
] | 6 | 2018-07-22T19:15:21.000Z | 2022-02-05T07:54:58.000Z | """
Prints the length in inches of the perimeter of a rectangle
with sides of length 4 and 7 inches.
"""
# Rectangle perimeter formula
length = 4
inches = 7
perimeter = 2 * length + 2 * inches
# Output
print perimeter | 18.25 | 59 | 0.726027 |
b20aba712b1ab01e3fb65465b63bc20687698132 | 123 | py | Python | x_3_4.py | ofl/kuku2 | 7247fb1862d917d23258ebe7a93dca5939433225 | [
"MIT"
] | null | null | null | x_3_4.py | ofl/kuku2 | 7247fb1862d917d23258ebe7a93dca5939433225 | [
"MIT"
] | 1 | 2021-11-13T08:03:04.000Z | 2021-11-13T08:03:04.000Z | x_3_4.py | ofl/kuku2 | 7247fb1862d917d23258ebe7a93dca5939433225 | [
"MIT"
] | null | null | null | # x_3_4
#
# mathfloor
from statistics import mean
data = [7, 4, 3, 9]
print(mean(data))
| 12.3 | 43 | 0.739837 |
b20c24ef9d6d64b2c1eb48b70a055569f3cf0291 | 690 | py | Python | 2018/21/reverse_engineered.py | lvaughn/advent | ff3f727b8db1fd9b2a04aad5dcda9a6c8d1c271e | [
"CC0-1.0"
] | null | null | null | 2018/21/reverse_engineered.py | lvaughn/advent | ff3f727b8db1fd9b2a04aad5dcda9a6c8d1c271e | [
"CC0-1.0"
] | null | null | null | 2018/21/reverse_engineered.py | lvaughn/advent | ff3f727b8db1fd9b2a04aad5dcda9a6c8d1c271e | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python3
print(simulate(7041048, True))
print(simulate(7041048, False))
| 22.258065 | 65 | 0.401449 |
b20ca1a11af5328342bece8c8b28ae8ca5c425a2 | 7,025 | py | Python | pybilt/lipid_grid/lipid_grid_curv.py | blakeaw/ORBILT | ed402dd496534dccd00f3e75b57007d944c58c1d | [
"MIT"
] | 11 | 2019-07-29T16:21:53.000Z | 2022-02-02T11:44:57.000Z | pybilt/lipid_grid/lipid_grid_curv.py | blakeaw/ORBILT | ed402dd496534dccd00f3e75b57007d944c58c1d | [
"MIT"
] | 11 | 2019-05-15T09:30:05.000Z | 2021-07-19T16:49:59.000Z | pybilt/lipid_grid/lipid_grid_curv.py | blakeaw/ORBILT | ed402dd496534dccd00f3e75b57007d944c58c1d | [
"MIT"
] | 9 | 2019-08-12T11:14:45.000Z | 2020-12-22T18:22:55.000Z | '''
Classes and functions to implement gridding and curvature correlation analysis for lipid bilayers.
The gridding and anlaysis procedures are based on
the decription given in section "Correlation between bilayer surface curvature and the
clustering of lipid molecules" of Koldso H, Shorthouse D, He lie J, ... | 39.914773 | 117 | 0.540641 |
b20cc44e10c5f1d7b1d539469ba4792e3e3334fc | 492 | py | Python | security.py | Raghav714/intruder-alarm | c27825e5b483b6dc18704e0da76500b348174432 | [
"MIT"
] | 4 | 2018-10-02T06:37:50.000Z | 2021-10-31T16:41:59.000Z | security.py | Raghav714/intruder-alarm | c27825e5b483b6dc18704e0da76500b348174432 | [
"MIT"
] | null | null | null | security.py | Raghav714/intruder-alarm | c27825e5b483b6dc18704e0da76500b348174432 | [
"MIT"
] | null | null | null | import numpy as np
import cv2
import pygame
cap = cv2.VideoCapture(0)
fgbg = cv2.createBackgroundSubtractorMOG2()
pygame.mixer.init()
pygame.mixer.music.load("1.mp3")
while(1):
ret, frame = cap.read()
fgmask = fgbg.apply(frame)
flag = np.std(fgmask)
if flag>50:
print("some one came")
pygame.mixer.music.play()
... | 20.5 | 43 | 0.707317 |
b20cdd9f8c550b03afcaa9236a4a608b7379d8bd | 453 | py | Python | pygeos/measurements.py | jorisvandenbossche/pygeos | 0a25af4ae1c96d11752318d2755f4f3342611b17 | [
"BSD-3-Clause"
] | null | null | null | pygeos/measurements.py | jorisvandenbossche/pygeos | 0a25af4ae1c96d11752318d2755f4f3342611b17 | [
"BSD-3-Clause"
] | null | null | null | pygeos/measurements.py | jorisvandenbossche/pygeos | 0a25af4ae1c96d11752318d2755f4f3342611b17 | [
"BSD-3-Clause"
] | null | null | null | from . import ufuncs
__all__ = ["area", "distance", "length", "hausdorff_distance"]
| 19.695652 | 63 | 0.697572 |
b20ea0b58e52db3ee0246fdb58558d2834cf2129 | 9,539 | py | Python | naff/models/naff/extension.py | Discord-Snake-Pit/dis_snek | 45748467838b31d871a7166dbeb3aaa238ad94e3 | [
"MIT"
] | 64 | 2021-10-12T15:31:36.000Z | 2022-03-29T18:25:47.000Z | naff/models/naff/extension.py | Discord-Snake-Pit/dis_snek | 45748467838b31d871a7166dbeb3aaa238ad94e3 | [
"MIT"
] | 166 | 2021-10-10T16:27:52.000Z | 2022-03-30T09:04:54.000Z | naff/models/naff/extension.py | Discord-Snake-Pit/dis_snek | 45748467838b31d871a7166dbeb3aaa238ad94e3 | [
"MIT"
] | 34 | 2021-10-10T13:26:41.000Z | 2022-03-23T13:59:35.000Z | import asyncio
import inspect
import logging
from typing import Awaitable, List, TYPE_CHECKING, Callable, Coroutine, Optional
import naff.models.naff as naff
from naff.client.const import logger_name, MISSING
from naff.client.utils.misc_utils import wrap_partial
from naff.models.naff.tasks import Task
if TYPE_CHECKIN... | 35.726592 | 200 | 0.605095 |
b20eabd7816b307c80c7a57deaf784b914a0c831 | 2,619 | py | Python | model/State.py | BrandonTheBuilder/thermawesome | b2f2cb95e1181f05a112193be11baa18e10d39b1 | [
"MIT"
] | null | null | null | model/State.py | BrandonTheBuilder/thermawesome | b2f2cb95e1181f05a112193be11baa18e10d39b1 | [
"MIT"
] | null | null | null | model/State.py | BrandonTheBuilder/thermawesome | b2f2cb95e1181f05a112193be11baa18e10d39b1 | [
"MIT"
] | null | null | null | from CoolProp import CoolProp as CP
| 33.576923 | 82 | 0.544101 |
b20ed9c65d8b7c88f2047aafe3f3e3d7c3016629 | 2,401 | py | Python | dashboard_api/widget_def/migrations/0059_auto_20160701_0929.py | data61/Openboard | aaf7ef49e05c0771094efc6be811c6ae88055252 | [
"Apache-2.0"
] | 2 | 2017-08-29T23:05:51.000Z | 2019-04-02T21:11:35.000Z | dashboard_api/widget_def/migrations/0059_auto_20160701_0929.py | data61/Openboard | aaf7ef49e05c0771094efc6be811c6ae88055252 | [
"Apache-2.0"
] | 1 | 2019-04-02T21:11:26.000Z | 2019-04-03T15:12:57.000Z | dashboard_api/widget_def/migrations/0059_auto_20160701_0929.py | data61/Openboard | aaf7ef49e05c0771094efc6be811c6ae88055252 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-06-30 23:29
from __future__ import unicode_literals
from django.db import migrations, models
| 28.247059 | 110 | 0.549354 |
b74658fcd0b086ae391a31278701946a2e7748a0 | 7,649 | py | Python | ngraph/python/tests/test_ngraph/test_ops_reshape.py | mnosov/openvino | c52c4916be0369f092f7da6c162b6c61c37c08d7 | [
"Apache-2.0"
] | null | null | null | ngraph/python/tests/test_ngraph/test_ops_reshape.py | mnosov/openvino | c52c4916be0369f092f7da6c162b6c61c37c08d7 | [
"Apache-2.0"
] | 21 | 2021-02-16T13:02:05.000Z | 2022-02-21T13:05:06.000Z | ngraph/python/tests/test_ngraph/test_ops_reshape.py | mmakridi/openvino | 769bb7709597c14debdaa356dd60c5a78bdfa97e | [
"Apache-2.0"
] | null | null | null | # ******************************************************************************
# Copyright 2017-2021 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apa... | 32.969828 | 109 | 0.651458 |
b746b8cda074f334edc7ccba71a84d7a2cd55be1 | 1,980 | py | Python | malwarescan/wsclient.py | lbahtarliev/MalwareScan | 495e2fd3ceb3498c651ddd360a4cc2eb9571a10b | [
"Unlicense"
] | 3 | 2018-12-06T03:09:16.000Z | 2021-02-25T01:13:05.000Z | malwarescan/wsclient.py | lbahtarliev/MalwareScan | 495e2fd3ceb3498c651ddd360a4cc2eb9571a10b | [
"Unlicense"
] | 9 | 2018-12-10T18:44:14.000Z | 2019-02-06T21:13:31.000Z | malwarescan/wsclient.py | lbahtarliev/MalwareScan | 495e2fd3ceb3498c651ddd360a4cc2eb9571a10b | [
"Unlicense"
] | 4 | 2019-06-04T13:46:24.000Z | 2021-02-25T02:23:50.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import json
import ssl
import click
from json.decoder import JSONDecodeError
from websocket import WebSocketException
from websocket import WebSocketConnectionClosedException
from websocket import create_connection
from datetime import datetime as dtime... | 33 | 92 | 0.59899 |
b748129a257264ee78fbb33c2f52b2552698dcea | 2,418 | py | Python | CalibTracker/SiStripCommon/python/theBigNtuple_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | CalibTracker/SiStripCommon/python/theBigNtuple_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | CalibTracker/SiStripCommon/python/theBigNtuple_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
from CalibTracker.SiStripCommon.ShallowEventDataProducer_cfi import *
from CalibTracker.SiStripCommon.ShallowDigisProducer_cfi import *
from CalibTracker.SiStripCommon.ShallowClustersProducer_cfi import *
from CalibTracker.SiStripCommon.ShallowTrackClustersProducer_cfi import *... | 43.178571 | 130 | 0.700165 |
b748865dafd57226e01bad7504ce06ab355e363a | 75 | py | Python | anti_freeze/__main__.py | Donluigimx/anti-freeze | 03699e5c4f82ccd06f37b4e8b51da22cc5841b57 | [
"MIT"
] | null | null | null | anti_freeze/__main__.py | Donluigimx/anti-freeze | 03699e5c4f82ccd06f37b4e8b51da22cc5841b57 | [
"MIT"
] | null | null | null | anti_freeze/__main__.py | Donluigimx/anti-freeze | 03699e5c4f82ccd06f37b4e8b51da22cc5841b57 | [
"MIT"
] | null | null | null | if __name__ == '__main__':
from .system import MyApp
MyApp().run()
| 18.75 | 29 | 0.626667 |
b74908cfbdafb8fdf6ed4e638d485501633fe75d | 18,656 | py | Python | classic_NN/nn.py | disooqi/learning-machine-learning | 5fcef0a18f0c2e9aeab4abf45b968eb6ca5ba463 | [
"MIT"
] | 1 | 2020-09-30T18:09:51.000Z | 2020-09-30T18:09:51.000Z | classic_NN/nn.py | disooqi/learning-machine-learning | 5fcef0a18f0c2e9aeab4abf45b968eb6ca5ba463 | [
"MIT"
] | null | null | null | classic_NN/nn.py | disooqi/learning-machine-learning | 5fcef0a18f0c2e9aeab4abf45b968eb6ca5ba463 | [
"MIT"
] | null | null | null | import numpy as np
from scipy.special import expit, logit
import time
import logging
np.random.seed(4) # 4
logger = logging.getLogger(__name__)
fr = logging.Formatter('%(asctime)s:%(levelname)s:%(message)s')
sh = logging.StreamHandler()
# sh.setFormatter(fr)
logger.addHandler(sh)
logger.setLevel(logging.DEBUG)
logge... | 39.609342 | 187 | 0.582547 |
b749f4714d0c5e5ad919fdd5ae7b07a02ccd8628 | 71 | py | Python | sensorAtlas/__init__.py | iosefa/pyMatau | 7b3f768db578771ba55a912bc4a9b8be58619070 | [
"MIT"
] | 2 | 2021-05-28T10:26:17.000Z | 2021-07-03T03:11:22.000Z | sensorAtlas/__init__.py | iosefa/pyMatau | 7b3f768db578771ba55a912bc4a9b8be58619070 | [
"MIT"
] | 2 | 2020-11-19T00:51:19.000Z | 2020-11-19T01:18:03.000Z | sensorAtlas/__init__.py | sensoratlas/sensoratlas | 7b3f768db578771ba55a912bc4a9b8be58619070 | [
"MIT"
] | 1 | 2019-10-10T14:03:42.000Z | 2019-10-10T14:03:42.000Z | # app config
default_app_config = 'sensorAtlas.apps.sensorAtlasConfig'
| 23.666667 | 57 | 0.830986 |
b74a328698a70e0b159b7d2e8ddf8ec1e64183ed | 376 | py | Python | api/urls.py | yasminfarza/country-state-address-api | 39c8d349095dcca4f2411f7097497d6a8f39c1e1 | [
"MIT"
] | 4 | 2021-06-06T14:16:33.000Z | 2021-06-09T03:42:11.000Z | api/urls.py | yasminfarza/country-state-address-api | 39c8d349095dcca4f2411f7097497d6a8f39c1e1 | [
"MIT"
] | null | null | null | api/urls.py | yasminfarza/country-state-address-api | 39c8d349095dcca4f2411f7097497d6a8f39c1e1 | [
"MIT"
] | null | null | null | from django.urls import path, include
from rest_framework.routers import DefaultRouter
from api import views
router = DefaultRouter()
router.register('countries', views.CountryViewSet)
router.register('states/(?P<country>[^/.]+)', views.StateViewSet)
router.register('addresses', views.AddressViewSet)
app_name = 'api... | 23.5 | 65 | 0.755319 |
b74a946738ed6712ecf1be81551ad79c1bd928a1 | 1,401 | py | Python | tests/test_protocol.py | gimbas/openinput | 9cbb4b22aebe46dfc33ae9c56b164baa6c1fe693 | [
"MIT"
] | 38 | 2020-05-11T10:54:15.000Z | 2022-03-30T13:19:09.000Z | tests/test_protocol.py | gimbas/openinput | 9cbb4b22aebe46dfc33ae9c56b164baa6c1fe693 | [
"MIT"
] | 45 | 2020-04-21T23:52:22.000Z | 2022-02-19T20:29:27.000Z | tests/test_protocol.py | gimbas/openinput | 9cbb4b22aebe46dfc33ae9c56b164baa6c1fe693 | [
"MIT"
] | 5 | 2020-08-29T02:10:42.000Z | 2021-08-31T03:12:15.000Z | # SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021 Filipe Lans <lains@riseup.net>
| 32.581395 | 95 | 0.712348 |
b74acbae89490d10494c82735b42d81274199ebb | 4,314 | py | Python | zaqar-8.0.0/zaqar/storage/sqlalchemy/driver.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 97 | 2015-01-02T09:35:23.000Z | 2022-03-25T00:38:45.000Z | zaqar-8.0.0/zaqar/storage/sqlalchemy/driver.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 5 | 2019-08-14T06:46:03.000Z | 2021-12-13T20:01:25.000Z | zaqar-8.0.0/zaqar/storage/sqlalchemy/driver.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 44 | 2015-01-28T03:01:28.000Z | 2021-05-13T18:55:19.000Z | # Copyright (c) 2013 Red Hat, Inc.
# Copyright 2014 Catalyst IT 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 a... | 36.871795 | 79 | 0.653454 |
b74c264ab951da49d482e8b5b2b953e6b1285a3b | 792 | py | Python | tests/explainers/test_explainer.py | zduey/shap | 1bb8203f2d43f7552396a5f26167a258cbdc505c | [
"MIT"
] | 1 | 2021-03-03T11:00:32.000Z | 2021-03-03T11:00:32.000Z | tests/explainers/test_explainer.py | zduey/shap | 1bb8203f2d43f7552396a5f26167a258cbdc505c | [
"MIT"
] | null | null | null | tests/explainers/test_explainer.py | zduey/shap | 1bb8203f2d43f7552396a5f26167a258cbdc505c | [
"MIT"
] | null | null | null | """ Tests for Explainer class.
"""
import pytest
import shap
def test_wrapping_for_text_to_text_teacher_forcing_logits_model():
""" This tests using the Explainer class to auto choose a text to text setup.
"""
transformers = pytest.importorskip("transformers")
tokenizer = transformers.AutoTokenizer... | 31.68 | 111 | 0.753788 |
b74d8e9763f51be71d9332444a4477006848a8de | 1,301 | py | Python | main/urls.py | guinslym/django-Django-Code-Review-CodeEntrepreneurs | 2ad9bd3d352f7eba46e16a7bf24e06b809049d62 | [
"BSD-3-Clause"
] | 2 | 2017-07-31T13:52:40.000Z | 2017-09-19T15:07:09.000Z | main/urls.py | guinslym/Django-Code-Review-CodeEntrepreneurs | 2ad9bd3d352f7eba46e16a7bf24e06b809049d62 | [
"BSD-3-Clause"
] | null | null | null | main/urls.py | guinslym/Django-Code-Review-CodeEntrepreneurs | 2ad9bd3d352f7eba46e16a7bf24e06b809049d62 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from django.conf import settings
from django.contrib import admin
from django.conf.urls.static import static
from django.conf.urls.i18n import i18n_patterns
from django.views.decorators.cache import cache_page
from django.conf.urls import url, include, handler404, handler500
admin.autodiscover(... | 27.104167 | 69 | 0.687164 |
b74eef5240ddb793f5798e460265805a101c2233 | 486 | py | Python | examples/simpleform/app/forms.py | ezeev/Flask-AppBuilder | d95f0ed934272629ee44ad3241646fa7ba09cdf8 | [
"BSD-3-Clause"
] | 71 | 2016-11-02T06:45:42.000Z | 2021-11-15T12:33:48.000Z | examples/simpleform/app/forms.py | ezeev/Flask-AppBuilder | d95f0ed934272629ee44ad3241646fa7ba09cdf8 | [
"BSD-3-Clause"
] | 3 | 2021-06-08T23:39:54.000Z | 2022-03-12T00:50:13.000Z | examples/simpleform/app/forms.py | ezeev/Flask-AppBuilder | d95f0ed934272629ee44ad3241646fa7ba09cdf8 | [
"BSD-3-Clause"
] | 23 | 2016-11-02T06:45:44.000Z | 2022-02-08T14:55:13.000Z | from wtforms import Form, StringField
from wtforms.validators import DataRequired
from flask_appbuilder.fieldwidgets import BS3TextFieldWidget
from flask_appbuilder.forms import DynamicForm
| 37.384615 | 76 | 0.751029 |
b74ef20d1f5294557f6193fe99adc3a01e0224ec | 403 | py | Python | comms.py | kajusz/ufscreenadsclient | 0151edec0117161c522a87643eef2f7be214210c | [
"MIT"
] | null | null | null | comms.py | kajusz/ufscreenadsclient | 0151edec0117161c522a87643eef2f7be214210c | [
"MIT"
] | null | null | null | comms.py | kajusz/ufscreenadsclient | 0151edec0117161c522a87643eef2f7be214210c | [
"MIT"
] | null | null | null | import zmq
context = zmq.Context()
socket = context.socket(zmq.PAIR)
address = "tcp://127.0.0.1:5000"
# print("No message received yet")
| 18.318182 | 45 | 0.66005 |
b74f2a4a74090ecd5db981f0f8052fb5379e118a | 410 | py | Python | runtime/python/Lib/site-packages/numpy/typing/tests/data/fail/datasource.py | hwaipy/InteractionFreeNode | 88642b68430f57b028fd0f276a5709f89279e30d | [
"MIT"
] | null | null | null | runtime/python/Lib/site-packages/numpy/typing/tests/data/fail/datasource.py | hwaipy/InteractionFreeNode | 88642b68430f57b028fd0f276a5709f89279e30d | [
"MIT"
] | null | null | null | runtime/python/Lib/site-packages/numpy/typing/tests/data/fail/datasource.py | hwaipy/InteractionFreeNode | 88642b68430f57b028fd0f276a5709f89279e30d | [
"MIT"
] | null | null | null | from pathlib import Path
import numpy as np
path: Path
d1: np.DataSource
d1.abspath(path) # E: incompatible type
d1.abspath(b"...") # E: incompatible type
d1.exists(path) # E: incompatible type
d1.exists(b"...") # E: incompatible type
d1.open(path, "r") # E: incompatible type
d1.open(b"...", encod... | 25.625 | 57 | 0.656098 |
b7509767f47f312767bff162702df8fc8da90b4c | 2,821 | py | Python | applications/admin/controllers/gae.py | otaviocarvalho/forca-inf | 93b61f1d6988d4fb00a1736633d85b4f99a2f259 | [
"BSD-3-Clause"
] | 1 | 2017-03-28T21:31:51.000Z | 2017-03-28T21:31:51.000Z | applications/admin/controllers/gae.py | murray3/augmi-a | 9f8cff457fa3966d67d3752ccd86876b08bb19b1 | [
"BSD-3-Clause"
] | null | null | null | applications/admin/controllers/gae.py | murray3/augmi-a | 9f8cff457fa3966d67d3752ccd86876b08bb19b1 | [
"BSD-3-Clause"
] | 1 | 2022-03-10T19:53:44.000Z | 2022-03-10T19:53:44.000Z | ### this works on linux only
try:
import fcntl
import subprocess
import signal
import os
except:
session.flash='sorry, only on Unix systems'
redirect(URL(request.application,'default','site'))
forever=10**8
| 36.636364 | 90 | 0.515066 |
b751a3b9de29d209e3c48a06bc158c7966ca65b5 | 1,110 | py | Python | basicts/archs/AGCRN_arch/AGCRNCell.py | zezhishao/GuanCang_BasicTS | bbf82b9d08e82db78d4e9e9b11f43a676b54ad7c | [
"Apache-2.0"
] | 3 | 2022-02-22T12:50:08.000Z | 2022-03-13T03:38:46.000Z | basicts/archs/AGCRN_arch/AGCRNCell.py | zezhishao/GuanCang_BasicTS | bbf82b9d08e82db78d4e9e9b11f43a676b54ad7c | [
"Apache-2.0"
] | null | null | null | basicts/archs/AGCRN_arch/AGCRNCell.py | zezhishao/GuanCang_BasicTS | bbf82b9d08e82db78d4e9e9b11f43a676b54ad7c | [
"Apache-2.0"
] | null | null | null | import torch
import torch.nn as nn
from basicts.archs.AGCRN_arch.AGCN import AVWGCN
| 42.692308 | 81 | 0.648649 |
b7529f85e20a09a7d94f12902a504b82d6d2f333 | 1,763 | py | Python | lib/python2.7/site-packages/openopt/kernel/iterPrint.py | wangyum/anaconda | 6e5a0dbead3327661d73a61e85414cf92aa52be6 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | lib/python2.7/site-packages/openopt/kernel/iterPrint.py | wangyum/anaconda | 6e5a0dbead3327661d73a61e85414cf92aa52be6 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | lib/python2.7/site-packages/openopt/kernel/iterPrint.py | wangyum/anaconda | 6e5a0dbead3327661d73a61e85414cf92aa52be6 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | from numpy import log10, isnan
textOutputDict = {\
'objFunVal': lambda p: p.iterObjFunTextFormat % (-p.Fk if p.invertObjFunc else p.Fk),
'log10(maxResidual)': lambda p: '%0.2f' % log10(p.rk+1e-100),
'log10(MaxResidual/ConTol)':lambda p: '%0.2f' % log10(max((p.rk/p.contol, 1e-100))),
'residual':lambda p: '%0.1e' % p... | 37.510638 | 123 | 0.604651 |
b752f435d4eed268979210bf9a7cb3d5c6b5fde1 | 1,833 | py | Python | src/cli.py | blu3r4y/ccc-linz-mar2019 | a012a8e8d0cbf01c495385c62f2571bfb1b01962 | [
"MIT"
] | null | null | null | src/cli.py | blu3r4y/ccc-linz-mar2019 | a012a8e8d0cbf01c495385c62f2571bfb1b01962 | [
"MIT"
] | null | null | null | src/cli.py | blu3r4y/ccc-linz-mar2019 | a012a8e8d0cbf01c495385c62f2571bfb1b01962 | [
"MIT"
] | null | null | null | import os
from main import main
from pprint import pprint
if __name__ == "__main__":
level, quests = 4, 5
for i in range(1, quests + 1):
input_file = r'..\data\level{0}\level{0}_{1}.in'.format(level, i)
output_file = os.path.splitext(input_file)[0] + ".out"
with open(input_file, 'r'... | 24.118421 | 73 | 0.505728 |
b75565cf56b991351466f79c8a9946c1474351a6 | 5,749 | py | Python | card_utils/games/gin/ricky/utils.py | cdrappi/card_utils | dd12d3be22774cf35d7a6ce6b5f05ff6ee527929 | [
"MIT"
] | null | null | null | card_utils/games/gin/ricky/utils.py | cdrappi/card_utils | dd12d3be22774cf35d7a6ce6b5f05ff6ee527929 | [
"MIT"
] | null | null | null | card_utils/games/gin/ricky/utils.py | cdrappi/card_utils | dd12d3be22774cf35d7a6ce6b5f05ff6ee527929 | [
"MIT"
] | null | null | null | import itertools
from typing import List, Tuple
from card_utils import deck
from card_utils.deck.utils import (
rank_partition,
suit_partition,
ranks_to_sorted_values
)
from card_utils.games.gin.deal import new_game
def deal_new_game():
""" shuffle up and deal each player 7 cards,
put one car... | 27.117925 | 83 | 0.584623 |
b7569ffd8bee128efc51f5bcf493cd00aa1b2d94 | 899 | py | Python | evennia/contrib/rpg/dice/tests.py | davidrideout/evennia | 879eea55acdf4fe5cdc96ba8fd0ab5ccca4ae84b | [
"BSD-3-Clause"
] | null | null | null | evennia/contrib/rpg/dice/tests.py | davidrideout/evennia | 879eea55acdf4fe5cdc96ba8fd0ab5ccca4ae84b | [
"BSD-3-Clause"
] | null | null | null | evennia/contrib/rpg/dice/tests.py | davidrideout/evennia | 879eea55acdf4fe5cdc96ba8fd0ab5ccca4ae84b | [
"BSD-3-Clause"
] | null | null | null | """
Testing of TestDice.
"""
from evennia.commands.default.tests import BaseEvenniaCommandTest
from mock import patch
from . import dice
| 37.458333 | 100 | 0.657397 |
b75755658b51065a953a59f32b666762d1790a50 | 9,247 | py | Python | ardour_tally_relay.py | Jajcus/ardour_tally_relay | aa69035a86bd282238f70ef17c427068249efd59 | [
"BSD-2-Clause"
] | null | null | null | ardour_tally_relay.py | Jajcus/ardour_tally_relay | aa69035a86bd282238f70ef17c427068249efd59 | [
"BSD-2-Clause"
] | null | null | null | ardour_tally_relay.py | Jajcus/ardour_tally_relay | aa69035a86bd282238f70ef17c427068249efd59 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/python3
import argparse
import logging
import signal
import time
from logging import debug, error, info, warning
import pythonosc.osc_server
import pythonosc.udp_client
from pythonosc.dispatcher import Dispatcher
import hid
LOG_FORMAT = '%(message)s'
POLL_INTERVAL = 1
# Supported USB relay vendor-id and... | 37.589431 | 106 | 0.54861 |
b757a3fb8db3b96f5cc0d1f1dd19f7847059351f | 1,408 | py | Python | python second semester working scripts/electrode_fcn.py | pm2111/Heart-Defibrillation-Project | 48ea3570c360aac7c3ff46354891998f4f364fab | [
"MIT"
] | null | null | null | python second semester working scripts/electrode_fcn.py | pm2111/Heart-Defibrillation-Project | 48ea3570c360aac7c3ff46354891998f4f364fab | [
"MIT"
] | null | null | null | python second semester working scripts/electrode_fcn.py | pm2111/Heart-Defibrillation-Project | 48ea3570c360aac7c3ff46354891998f4f364fab | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import os
path = "/Users/petermarinov/msci project/electrode data/test data/data/"
filenames = []
for f in os.listdir(path):
if not f.startswith('.'):
filenames.append(f)
i=-12
data = np.genfromtxt(path + filenames[i])
V = np.zeros((200,20... | 31.288889 | 139 | 0.496449 |
b757a454248faaffeb488872e86cf07d801bf71c | 1,355 | py | Python | resources/lib/IMDbPY/bin/get_first_movie.py | bopopescu/ServerStatus | a883598248ad6f5273eb3be498e3b04a1fab6510 | [
"MIT"
] | 1 | 2017-11-02T06:06:39.000Z | 2017-11-02T06:06:39.000Z | resources/lib/IMDbPY/bin/get_first_movie.py | bopopescu/ServerStatus | a883598248ad6f5273eb3be498e3b04a1fab6510 | [
"MIT"
] | 1 | 2015-04-21T22:05:02.000Z | 2015-04-22T22:27:15.000Z | resources/lib/IMDbPY/bin/get_first_movie.py | GetSomeBlocks/Score_Soccer | a883598248ad6f5273eb3be498e3b04a1fab6510 | [
"MIT"
] | 4 | 2017-11-01T19:24:31.000Z | 2018-09-13T00:05:41.000Z | #!/usr/bin/env python
"""
get_first_movie.py
Usage: get_first_movie "movie title"
Search for the given title and print the best matching result.
"""
import sys
# Import the IMDbPY package.
try:
import imdb
except ImportError:
print 'You bad boy! You need to install the IMDbPY package!'
sys.exit(1)
if... | 22.583333 | 79 | 0.702583 |
b7592e3ec4b70120c5e12cf12590570b289d59a3 | 14,079 | py | Python | ID3.py | idiomatic/id3.py | 574b2a6bd52897e07c220198d451e5971577fc02 | [
"MIT"
] | null | null | null | ID3.py | idiomatic/id3.py | 574b2a6bd52897e07c220198d451e5971577fc02 | [
"MIT"
] | null | null | null | ID3.py | idiomatic/id3.py | 574b2a6bd52897e07c220198d451e5971577fc02 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- mode: python -*-
import re
import struct
import types
def items_in_order(dict, order=[]):
"""return all items of dict, but starting in the specified order."""
done = { }
items = [ ]
for key in order + dict.keys():
if not done.has_key(key) and dict.has_key(key):
... | 32.291284 | 79 | 0.539882 |
b75a00768c2cceed8ca46774029ad378bc7cc2e6 | 1,180 | py | Python | workflow/pnmlpy/pmnl_model.py | SODALITE-EU/verification | 584e3c61bc20e65944e34b875eb5ed0ec02d6fa9 | [
"Apache-2.0"
] | null | null | null | workflow/pnmlpy/pmnl_model.py | SODALITE-EU/verification | 584e3c61bc20e65944e34b875eb5ed0ec02d6fa9 | [
"Apache-2.0"
] | 2 | 2020-03-30T12:02:32.000Z | 2021-04-20T19:09:25.000Z | workflow/pnmlpy/pmnl_model.py | SODALITE-EU/verification | 584e3c61bc20e65944e34b875eb5ed0ec02d6fa9 | [
"Apache-2.0"
] | null | null | null | from xml.dom import minidom
from xml.etree import ElementTree
from xml.etree.cElementTree import Element, SubElement, ElementTree, tostring
def prettify(elem):
"""Return a pretty-printed XML string for the Element.
"""
rough_string = tostring(elem, 'utf-8')
reparsed = minidom.parseString(rough_string... | 31.891892 | 115 | 0.582203 |
b75be5ebe9cb0ad6772b99405564c425be4f2dda | 969 | py | Python | examples/truss/truss_01.py | ofgod2/Analisis-matricial-nusa-python | 7cea329ba00449b97711a0c67725053a0d194335 | [
"MIT"
] | 92 | 2016-11-14T01:39:55.000Z | 2022-03-27T17:23:41.000Z | examples/truss/truss_01.py | ofgod2/Analisis-matricial-nusa-python | 7cea329ba00449b97711a0c67725053a0d194335 | [
"MIT"
] | 1 | 2017-11-30T05:04:02.000Z | 2018-08-29T04:31:39.000Z | examples/truss/truss_01.py | ofgod2/Analisis-matricial-nusa-python | 7cea329ba00449b97711a0c67725053a0d194335 | [
"MIT"
] | 31 | 2017-05-17T18:50:18.000Z | 2022-03-12T03:08:00.000Z | # -*- coding: utf-8 -*-
# ***********************************
# Author: Pedro Jorge De Los Santos
# E-mail: delossantosmfq@gmail.com
# Blog: numython.github.io
# License: MIT License
# ***********************************
from nusa import *
"""
Logan, D. (2007). A first course in the finite element analysis.
... | 21.065217 | 64 | 0.585139 |
b75dd73022d3840c6328953902299b38ebc5ba18 | 2,919 | py | Python | Profiles/Mahmoud Higazy/logistic_regression.py | AhmedHani/FCIS-Machine-Learning-2017 | f241d989fdccfabfe351cd9c01f5de4da8df6ef3 | [
"Apache-2.0"
] | 13 | 2017-07-02T06:45:46.000Z | 2020-12-26T16:35:24.000Z | Profiles/Mahmoud Higazy/logistic_regression.py | AhmedHani/FCIS-Machine-Learning-2017 | f241d989fdccfabfe351cd9c01f5de4da8df6ef3 | [
"Apache-2.0"
] | 4 | 2017-07-22T00:09:41.000Z | 2017-12-15T15:54:33.000Z | Profiles/Mahmoud Higazy/logistic_regression.py | AhmedHani/FCIS-Machine-Learning-2017 | f241d989fdccfabfe351cd9c01f5de4da8df6ef3 | [
"Apache-2.0"
] | 25 | 2017-07-01T23:07:08.000Z | 2019-01-24T09:45:08.000Z | from data_reader.reader import CsvReader
from util import *
import numpy as np
import matplotlib.pyplot as plt
reader = CsvReader("./data/Iris.csv")
iris_features, iris_labels = reader.get_iris_data()
ignore_verginica = [i for i, v in enumerate(iris_labels) if v == 'Iris-virginica']
iris_features = [v for i, v in e... | 34.341176 | 148 | 0.656732 |
b75eb4207857101d04d38eb0f52b4294fd616690 | 1,413 | py | Python | wavefront_reader/reading/readobjfile.py | SimLeek/wavefront_reader | 4504f5b6185a03fcdd1722dbea660f7af35b8b8c | [
"MIT"
] | null | null | null | wavefront_reader/reading/readobjfile.py | SimLeek/wavefront_reader | 4504f5b6185a03fcdd1722dbea660f7af35b8b8c | [
"MIT"
] | null | null | null | wavefront_reader/reading/readobjfile.py | SimLeek/wavefront_reader | 4504f5b6185a03fcdd1722dbea660f7af35b8b8c | [
"MIT"
] | null | null | null | from wavefront_reader.wavefront_classes.objfile import ObjFile
from .readface import read_face
def read_objfile(fname):
"""Takes .obj filename and return an ObjFile class."""
obj_file = ObjFile()
with open(fname) as f:
lines = f.read().splitlines()
if 'OBJ' not in lines[0]:
raise Valu... | 39.25 | 107 | 0.573248 |
b760116d8d8fe2d046e6af340b2d6bd9cb6fc8e2 | 157 | py | Python | constants.py | Guedelho/snake-ai | 176db202aaec76ff5c7cac6cc9d7a7bc46ff2b16 | [
"MIT"
] | null | null | null | constants.py | Guedelho/snake-ai | 176db202aaec76ff5c7cac6cc9d7a7bc46ff2b16 | [
"MIT"
] | null | null | null | constants.py | Guedelho/snake-ai | 176db202aaec76ff5c7cac6cc9d7a7bc46ff2b16 | [
"MIT"
] | null | null | null | # Directions
UP = 'UP'
DOWN = 'DOWN'
LEFT = 'LEFT'
RIGHT = 'RIGHT'
# Colors
RED = (255, 0, 0)
BLACK = (0, 0, 0)
GREEN = (0, 255, 0)
WHITE = (255, 255, 255)
| 13.083333 | 23 | 0.547771 |
b76026927b6eb058284eefad5002a87c72c21db0 | 520 | py | Python | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/openedx/core/djangoapps/video_pipeline/utils.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | 3 | 2021-12-15T04:58:18.000Z | 2022-02-06T12:15:37.000Z | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/openedx/core/djangoapps/video_pipeline/utils.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | null | null | null | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/openedx/core/djangoapps/video_pipeline/utils.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | 1 | 2019-01-02T14:38:50.000Z | 2019-01-02T14:38:50.000Z | """
Utils for video_pipeline app.
"""
from django.conf import settings
from edx_rest_api_client.client import OAuthAPIClient
def create_video_pipeline_api_client(api_client_id, api_client_secret):
"""
Returns an API client which can be used to make Video Pipeline API requests.
Arguments:
api_cli... | 28.888889 | 82 | 0.765385 |
b76161b7b67049e769a1af4d2aa06f728082679c | 2,695 | py | Python | run.py | Galaxy-SynBioCAD/extractTaxonomy | da3a1da443909dbefe143a3b7de66905c43eaf82 | [
"MIT"
] | null | null | null | run.py | Galaxy-SynBioCAD/extractTaxonomy | da3a1da443909dbefe143a3b7de66905c43eaf82 | [
"MIT"
] | null | null | null | run.py | Galaxy-SynBioCAD/extractTaxonomy | da3a1da443909dbefe143a3b7de66905c43eaf82 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
Created on March 18 2020
@author: Melchior du Lac
@description: Extract the taxonomy ID from an SBML file
"""
import argparse
import tempfile
import os
import logging
import shutil
import docker
def main(inputfile, output):
"""Call the extractTaxonomy docker to return the JSON file
... | 35 | 127 | 0.565121 |
b761fb951040af2347c2dd2aa478c82dca9ff08e | 10,460 | py | Python | src/ebay_rest/api/buy_browse/models/refinement.py | matecsaj/ebay_rest | dd23236f39e05636eff222f99df1e3699ce47d4a | [
"MIT"
] | 3 | 2021-12-12T04:28:03.000Z | 2022-03-10T03:29:18.000Z | src/ebay_rest/api/buy_browse/models/refinement.py | jdavv/ebay_rest | 20fc88c6aefdae9ab90f9c1330e79abddcd750cd | [
"MIT"
] | 33 | 2021-06-16T20:44:36.000Z | 2022-03-30T14:55:06.000Z | src/ebay_rest/api/buy_browse/models/refinement.py | jdavv/ebay_rest | 20fc88c6aefdae9ab90f9c1330e79abddcd750cd | [
"MIT"
] | 7 | 2021-06-03T09:30:23.000Z | 2022-03-08T19:51:33.000Z | # coding: utf-8
"""
Browse API
<p>The Browse API has the following resources:</p> <ul> <li><b> item_summary: </b> Lets shoppers search for specific items by keyword, GTIN, category, charity, product, or item aspects and refine the results by using filters, such as aspects, compatibility, and fields values.<... | 46.488889 | 2,332 | 0.67782 |
b76571e31217da708c1ce0ba259ecc1d18b070d9 | 1,878 | py | Python | tests/dataio_tests/test_import_data_filter_empty_directories.py | cdeitrick/Lolipop | 5b87b00a2c7ccbeeb3876bddb32e54aedf6bdf6d | [
"MIT"
] | 6 | 2020-04-18T15:43:19.000Z | 2022-02-19T18:43:23.000Z | tests/dataio_tests/test_import_data_filter_empty_directories.py | cdeitrick/Lolipop | 5b87b00a2c7ccbeeb3876bddb32e54aedf6bdf6d | [
"MIT"
] | 5 | 2020-05-04T16:09:03.000Z | 2020-10-13T03:52:56.000Z | tests/dataio_tests/test_import_data_filter_empty_directories.py | cdeitrick/muller_diagrams | 5b87b00a2c7ccbeeb3876bddb32e54aedf6bdf6d | [
"MIT"
] | 3 | 2020-03-23T17:12:56.000Z | 2020-07-24T22:22:12.000Z | from pathlib import Path
import pandas
from muller.dataio import import_tables
from loguru import logger
DATA_FOLDER = Path(__file__).parent.parent / "data" | 33.535714 | 102 | 0.746006 |