hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3c449a36ffa6454a6abfdc3daf5685a3727e3679 | 147 | py | Python | pymps/__init__.py | jacobmanalo/dmrg_tool | 8a14b7f33b77f53df4356f090bdcd1a82b12ff20 | [
"Apache-2.0"
] | null | null | null | pymps/__init__.py | jacobmanalo/dmrg_tool | 8a14b7f33b77f53df4356f090bdcd1a82b12ff20 | [
"Apache-2.0"
] | null | null | null | pymps/__init__.py | jacobmanalo/dmrg_tool | 8a14b7f33b77f53df4356f090bdcd1a82b12ff20 | [
"Apache-2.0"
] | null | null | null | from .dmrg import SweepOpt, DMRG
from .mps import init_wavefunction
from .autoMPO import QuantumOperator, FermiOp
from .lanczos import lanczos
| 29.4 | 46 | 0.809524 |
c0cfae7b1518de559b1860a2f3f6a38fceece4ec | 12,691 | py | Python | maple_debugger/m_bp_cmds.py | he426100/maple_engine | 0b96bbfa91a6caeb61eeb58c55e22999bd9cb068 | [
"MulanPSL-1.0"
] | 1 | 2020-08-04T06:56:40.000Z | 2020-08-04T06:56:40.000Z | maple_debugger/m_bp_cmds.py | he426100/maple_engine | 0b96bbfa91a6caeb61eeb58c55e22999bd9cb068 | [
"MulanPSL-1.0"
] | null | null | null | maple_debugger/m_bp_cmds.py | he426100/maple_engine | 0b96bbfa91a6caeb61eeb58c55e22999bd9cb068 | [
"MulanPSL-1.0"
] | null | null | null | #
# Copyright (C) [2021] Futurewei Technologies, Inc. All rights reserved.
#
# OpenArkCompiler is licensed underthe Mulan Permissive Software License v2.
# You can use this software according to the terms and conditions of the MulanPSL - 2.0.
# You may obtain a copy of MulanPSL - 2.0 at:
#
# https://opensource.org/li... | 37.997006 | 157 | 0.579466 |
35a07702840b85ac6373b1b7d472be5a58978514 | 23,041 | py | Python | client.py | songyanho/PyBase | 06ae71657f7b8eef0722ba1f56672fbe3262bf7f | [
"Apache-2.0"
] | 36 | 2015-07-16T18:22:48.000Z | 2022-02-20T11:54:46.000Z | client.py | songyanho/PyBase | 06ae71657f7b8eef0722ba1f56672fbe3262bf7f | [
"Apache-2.0"
] | 22 | 2015-08-21T21:50:59.000Z | 2019-03-06T11:38:24.000Z | client.py | songyanho/PyBase | 06ae71657f7b8eef0722ba1f56672fbe3262bf7f | [
"Apache-2.0"
] | 16 | 2015-12-04T19:57:53.000Z | 2020-07-14T06:59:59.000Z | """
Copyright 2015 Samuel Curley
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in ... | 47.215164 | 122 | 0.633827 |
d9e76baa9a9c1639d442b571af2f98422843f798 | 6,896 | py | Python | cjio/metadata.py | fiodccobw/cjio | 734054234334aea502fdc2e4de216552ac05c543 | [
"MIT"
] | 52 | 2019-11-26T10:38:36.000Z | 2022-03-31T06:14:31.000Z | cjio/metadata.py | fiodccobw/cjio | 734054234334aea502fdc2e4de216552ac05c543 | [
"MIT"
] | 93 | 2019-10-30T11:00:35.000Z | 2022-03-25T14:29:02.000Z | cjio/metadata.py | fiodccobw/cjio | 734054234334aea502fdc2e4de216552ac05c543 | [
"MIT"
] | 19 | 2020-01-10T12:59:30.000Z | 2022-02-23T19:00:20.000Z | """Module containing metadata related functions"""
import uuid
import json
import os
import time
import re
import collections, functools, operator
import sys
from datetime import date, datetime
import platform
def generate_metadata(citymodel: dict,
filename: str = None,
ref... | 38.311111 | 140 | 0.597593 |
983a97bd9435b60c01ebe9251caf19eae9adafb5 | 4,475 | py | Python | openaerostruct/examples/rectangular_wing/opt_twist.py | lamkina/OpenAeroStruct | d30e2626fc1272e7fe3a27386c4c663157e958ec | [
"Apache-2.0"
] | 114 | 2017-04-06T15:24:19.000Z | 2022-03-21T09:57:43.000Z | openaerostruct/examples/rectangular_wing/opt_twist.py | lamkina/OpenAeroStruct | d30e2626fc1272e7fe3a27386c4c663157e958ec | [
"Apache-2.0"
] | 322 | 2017-04-07T01:40:03.000Z | 2022-03-17T21:50:52.000Z | openaerostruct/examples/rectangular_wing/opt_twist.py | lamkina/OpenAeroStruct | d30e2626fc1272e7fe3a27386c4c663157e958ec | [
"Apache-2.0"
] | 83 | 2017-04-06T16:53:26.000Z | 2022-03-19T19:34:05.000Z | """
Perform inviscid drag minimization of rectangular wing with respect to spanwise
twist, subject to a lift constraint. The expected result from lifting line
theory should produce an elliptical lift distrbution. Check output directory for
Tecplot solution files.
"""
import numpy as np
import openmdao.api as om
from... | 38.913043 | 109 | 0.723575 |
4131776eba62022a3e3a673288f52308ef04287a | 1,827 | py | Python | llnl.py | jwendyr/llnlcrawler | 4139bd7a47ea61b6db1a1b6314e8497a39d2cf98 | [
"Apache-2.0"
] | null | null | null | llnl.py | jwendyr/llnlcrawler | 4139bd7a47ea61b6db1a1b6314e8497a39d2cf98 | [
"Apache-2.0"
] | null | null | null | llnl.py | jwendyr/llnlcrawler | 4139bd7a47ea61b6db1a1b6314e8497a39d2cf98 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import scrapy
import re
import sys
import json
import os
#import urlparse2
from scrapy.http import Request
from scrapy.conf import settings
class LlnlSpider(scrapy.Spider):
name = 'llnl'
#allowed_domains = ['github.com','arxiv.org','cv-foundation.org']
start_urls = ['https://www.researchg... | 33.833333 | 161 | 0.71538 |
f38a0c7d304c44b194bcade44e0ff9a0b2e82aa6 | 63,716 | py | Python | Autocoders/src/parsers/XmlComponentParser.py | JPLOpenSource/fprime-sw-Rel1.0 | 18364596c24fa369c938ef8758e5aa945ecc6a9b | [
"Apache-2.0"
] | 1 | 2020-02-21T03:55:07.000Z | 2020-02-21T03:55:07.000Z | Autocoders/src/parsers/XmlComponentParser.py | JPLOpenSource/fprime-sw-Rel1.0 | 18364596c24fa369c938ef8758e5aa945ecc6a9b | [
"Apache-2.0"
] | null | null | null | Autocoders/src/parsers/XmlComponentParser.py | JPLOpenSource/fprime-sw-Rel1.0 | 18364596c24fa369c938ef8758e5aa945ecc6a9b | [
"Apache-2.0"
] | null | null | null | #!/bin/env python
#===============================================================================
# NAME: XmlComponentParser.py
#
# DESCRIPTION: This parses the XML component description files.
#
# USAGE:
#
# AUTHOR: reder
# EMAIL: reder@jpl.nasa.gov
# DATE CREATED : Aug. 14, 2007
#
# Copyright 2007, California In... | 44.277971 | 220 | 0.491588 |
bb31a6417253ebd2fb74f72243513316bf969f34 | 27,884 | py | Python | python/ray/data/grouped_dataset.py | andenrx/ray | 0ad4113e22aa4ec40f87d4a16e474a452f9c8af7 | [
"Apache-2.0"
] | null | null | null | python/ray/data/grouped_dataset.py | andenrx/ray | 0ad4113e22aa4ec40f87d4a16e474a452f9c8af7 | [
"Apache-2.0"
] | null | null | null | python/ray/data/grouped_dataset.py | andenrx/ray | 0ad4113e22aa4ec40f87d4a16e474a452f9c8af7 | [
"Apache-2.0"
] | null | null | null | from typing import Any, Union, Generic, Tuple, List, Callable
import numpy as np
import ray
from ray.util.annotations import PublicAPI
from ray.data.dataset import Dataset
from ray.data.dataset import BatchType
from ray.data.impl import sort
from ray.data.aggregate import AggregateFn, Count, Sum, Max, Min, Mean, Std
fr... | 43.911811 | 100 | 0.548522 |
cfcebdf7ac2873f4f775a370f9a16381b4ff7900 | 275 | py | Python | PyBlokusTools/pyblokustools/testserver/MsgType.py | HenrikThoroe/SWC-2021 | 8e7eee25e3a6fda7e863591b05fa161d8a2ebc78 | [
"BSD-2-Clause",
"MIT"
] | null | null | null | PyBlokusTools/pyblokustools/testserver/MsgType.py | HenrikThoroe/SWC-2021 | 8e7eee25e3a6fda7e863591b05fa161d8a2ebc78 | [
"BSD-2-Clause",
"MIT"
] | null | null | null | PyBlokusTools/pyblokustools/testserver/MsgType.py | HenrikThoroe/SWC-2021 | 8e7eee25e3a6fda7e863591b05fa161d8a2ebc78 | [
"BSD-2-Clause",
"MIT"
] | null | null | null | from enum import Enum
class MsgType(Enum):
"""An enum of different message types.
"""
GAMESTATE = 0
LEFT = 1
RESULT = 2
EXCEPT = 3
PREPARED = 4
OBSERVED = 5
PROTOCOLEND = 6
CLOSECONN = 7
UNDEFINED = 8
| 18.333333 | 42 | 0.516364 |
c752fe04d5c7878dd0f2d4eb8577b8fbbb3aad73 | 344 | py | Python | consumers/fasttext/src/main_predictor.py | gasparian/ml-serving-template | 02d2e4c73617647e42c455e7ff79105422d08681 | [
"MIT"
] | 6 | 2021-03-07T22:11:00.000Z | 2022-03-08T15:04:49.000Z | consumers/fasttext/src/main_predictor.py | gasparian/ml-serving-template | 02d2e4c73617647e42c455e7ff79105422d08681 | [
"MIT"
] | null | null | null | consumers/fasttext/src/main_predictor.py | gasparian/ml-serving-template | 02d2e4c73617647e42c455e7ff79105422d08681 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from ml_serving.server import ServingQueue, ServingCache
from config import FasttextConfig
from predictor import Predictor
config = FasttextConfig()
predictor = Predictor(config.model_path)
if config.queue_only:
proc = ServingQueue(config, predictor)
else:
proc = ServingCache(config, pr... | 24.571429 | 56 | 0.793605 |
9c9b9c78b04c91e5963d0e9e5fed23a0d39b0e9d | 5,202 | py | Python | modules/map/proto/map_stop_sign_pb2.py | jiyongfeng/imap | fcb2205fdc09948936855f87fad75fbf7f821c2b | [
"Apache-2.0"
] | 187 | 2019-11-12T12:43:12.000Z | 2022-03-30T01:11:56.000Z | map_label_tool/modules/map/proto/map_stop_sign_pb2.py | AmberJia23/OpenHDMap | 828d06f87bf3b3f539de4fc1fdac795892037074 | [
"Apache-2.0"
] | 13 | 2021-07-21T07:12:04.000Z | 2022-03-30T12:24:48.000Z | map_label_tool/modules/map/proto/map_stop_sign_pb2.py | AmberJia23/OpenHDMap | 828d06f87bf3b3f539de4fc1fdac795892037074 | [
"Apache-2.0"
] | 74 | 2019-12-30T11:27:05.000Z | 2022-03-10T03:22:36.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: modules/map/proto/map_stop_sign.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf imp... | 37.695652 | 638 | 0.754325 |
0ac610fb136e2812e0584214c381918cf2cd9036 | 1,055 | py | Python | day-18-solution.py | nityansuman/30-days-of-code | 4a4cbdb34b7b2e50c205223453193272e574efa6 | [
"Apache-2.0"
] | null | null | null | day-18-solution.py | nityansuman/30-days-of-code | 4a4cbdb34b7b2e50c205223453193272e574efa6 | [
"Apache-2.0"
] | null | null | null | day-18-solution.py | nityansuman/30-days-of-code | 4a4cbdb34b7b2e50c205223453193272e574efa6 | [
"Apache-2.0"
] | 1 | 2021-06-27T18:11:55.000Z | 2021-06-27T18:11:55.000Z |
class Solution:
def __init__(self):
self.stack = list()
self.queue = list()
# Method to push elements into the stack
def push_character(self, c):
self.stack.append(c)
# Method to pop out elements from the stack
def pop_character(self):
return self.stack.pop(-1)
# Method to enter element into the queu... | 21.1 | 55 | 0.698578 |
eba3e765a82b6644c56d60649330a03897f97600 | 1,155 | py | Python | setup.py | awesome-archive/JobFunnel | 05de19e73bddd538635543a9f22f28bdb078f53c | [
"MIT"
] | 1 | 2020-04-22T05:14:33.000Z | 2020-04-22T05:14:33.000Z | setup.py | awesome-archive/JobFunnel | 05de19e73bddd538635543a9f22f28bdb078f53c | [
"MIT"
] | 2 | 2021-06-02T03:09:42.000Z | 2021-12-13T20:53:29.000Z | setup.py | awesome-archive/JobFunnel | 05de19e73bddd538635543a9f22f28bdb078f53c | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
from jobfunnel import __version__ as version
description = 'Automated tool for scraping job postings.'
url = 'https://github.com/PaulMcInnis/JobFunnel'
requires = ['beautifulsoup4>=4.6.3',
'lxml>=4.2.4',
'requests>=2.19.1',
'python-dateut... | 33.970588 | 87 | 0.542857 |
d774dda89bace2bcc00103601d8399f9c3b76554 | 12,643 | py | Python | api/python/config/appconfig_pb2.py | beshleman/eve | d27bdd314f19b94793ac81ead53bbb5be5608ba6 | [
"Apache-2.0"
] | null | null | null | api/python/config/appconfig_pb2.py | beshleman/eve | d27bdd314f19b94793ac81ead53bbb5be5608ba6 | [
"Apache-2.0"
] | null | null | null | api/python/config/appconfig_pb2.py | beshleman/eve | d27bdd314f19b94793ac81ead53bbb5be5608ba6 | [
"Apache-2.0"
] | null | null | null | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: config/appconfig.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection ... | 45.807971 | 1,315 | 0.757494 |
b8f3b5564b3f7aac484939bdd8735752d7527db2 | 12,209 | py | Python | Tests/Validation/Magnetics/test_FEMM_periodicity.py | carbon-drive/pyleecan | e89d4fe97f23f6182c19127d2c6a2133614e169d | [
"Apache-2.0"
] | 1 | 2021-07-08T01:27:24.000Z | 2021-07-08T01:27:24.000Z | Tests/Validation/Magnetics/test_FEMM_periodicity.py | ecs-kev/pyleecan | 1faedde4b24acc6361fa1fdd4e980eaec4ca3a62 | [
"Apache-2.0"
] | null | null | null | Tests/Validation/Magnetics/test_FEMM_periodicity.py | ecs-kev/pyleecan | 1faedde4b24acc6361fa1fdd4e980eaec4ca3a62 | [
"Apache-2.0"
] | null | null | null | from os.path import join
from multiprocessing import cpu_count
import pytest
from Tests import save_validation_path as save_path
from numpy import exp, sqrt, pi, meshgrid, zeros, real
from numpy.testing import assert_array_almost_equal
from pyleecan.Classes.Simu1 import Simu1
from pyleecan.Classes.InputCurrent impo... | 26.774123 | 115 | 0.625686 |
212f94bc44c9e1568cda3318999e2115dd2b4a66 | 14,599 | py | Python | apmec/tests/unit/meo/test_nfvo_plugin.py | pineunity/apmec | ff7a04585c7740e6fe28aeb36b80a4ecfebd98c7 | [
"Apache-2.0"
] | null | null | null | apmec/tests/unit/meo/test_nfvo_plugin.py | pineunity/apmec | ff7a04585c7740e6fe28aeb36b80a4ecfebd98c7 | [
"Apache-2.0"
] | null | null | null | apmec/tests/unit/meo/test_nfvo_plugin.py | pineunity/apmec | ff7a04585c7740e6fe28aeb36b80a4ecfebd98c7 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Brocade Communications System, 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
#
# ... | 41.123944 | 78 | 0.606685 |
3cf14450b58f81118d3ad22b05fa05d803090e16 | 520 | py | Python | project/migrations/0012_alter_reservation_status.py | roshanba/mangal | f7b428811dc07214009cc33f0beb665ead402038 | [
"bzip2-1.0.6",
"MIT"
] | null | null | null | project/migrations/0012_alter_reservation_status.py | roshanba/mangal | f7b428811dc07214009cc33f0beb665ead402038 | [
"bzip2-1.0.6",
"MIT"
] | null | null | null | project/migrations/0012_alter_reservation_status.py | roshanba/mangal | f7b428811dc07214009cc33f0beb665ead402038 | [
"bzip2-1.0.6",
"MIT"
] | null | null | null | # Generated by Django 3.2.dev20200616075851 on 2020-06-19 07:45
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('project', '0011_alter_reservation_people'),
]
operations = [
migrations.AlterField(
model_name='reservation',
... | 27.368421 | 157 | 0.628846 |
6387ffebd6e8740c28afe489ec661f5feda742ed | 1,158 | py | Python | example/dj/wsgi.py | jsilhan/django-chamber | c9115e3cd907cf5cfca73d9b08d31ae697fb52a6 | [
"BSD-3-Clause"
] | 9 | 2016-03-16T13:49:47.000Z | 2021-02-15T01:26:18.000Z | example/dj/wsgi.py | jsilhan/django-chamber | c9115e3cd907cf5cfca73d9b08d31ae697fb52a6 | [
"BSD-3-Clause"
] | 96 | 2016-11-16T12:19:53.000Z | 2022-03-11T23:42:25.000Z | example/dj/wsgi.py | jsilhan/django-chamber | c9115e3cd907cf5cfca73d9b08d31ae697fb52a6 | [
"BSD-3-Clause"
] | 9 | 2016-03-12T22:35:18.000Z | 2019-10-25T10:42:16.000Z | """
WSGI config for django-ats-operator example app.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSG... | 37.354839 | 79 | 0.805699 |
a467dc99bcf602a77781b172c941e9b0438462c0 | 69 | py | Python | __init__.py | aroodooteam/insurance_broker_management | 61dbfff5685ba06dd6f4a84386a8133b24012dad | [
"BSD-2-Clause"
] | null | null | null | __init__.py | aroodooteam/insurance_broker_management | 61dbfff5685ba06dd6f4a84386a8133b24012dad | [
"BSD-2-Clause"
] | null | null | null | __init__.py | aroodooteam/insurance_broker_management | 61dbfff5685ba06dd6f4a84386a8133b24012dad | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import models
# import wizard
# import test
| 11.5 | 23 | 0.637681 |
112aee00b36b483eeb711a357df4282381a2f9bc | 352 | py | Python | modulacao/urls.py | robertoalcaras/ProjetoIntegrador | 796fb5d78ed9ad7b842bc76259dfb5f71b25dc48 | [
"MIT"
] | 1 | 2022-03-08T11:29:09.000Z | 2022-03-08T11:29:09.000Z | modulacao/urls.py | robertoalcaras/ProjetoIntegrador | 796fb5d78ed9ad7b842bc76259dfb5f71b25dc48 | [
"MIT"
] | null | null | null | modulacao/urls.py | robertoalcaras/ProjetoIntegrador | 796fb5d78ed9ad7b842bc76259dfb5f71b25dc48 | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
from clinicafono.urls import *
urlpatterns = [
#path('', views.index, name='index'),
#path("paciente/", views.paciente, name='paciente'),
path("modulacao/", views.modulacao, name='modulacao'),
#path("update/<int:profissionalenc_id>/", views.update, name=... | 35.2 | 95 | 0.690341 |
7c47ae2db3bc53858b6a0c6d2c547f7ebb68d597 | 465 | py | Python | data/scripts/templates/object/mobile/shared_dressed_commoner_old_zabrak_female_01.py | obi-two/GameServer | 7d37024e2291a97d49522610cd8f1dbe5666afc2 | [
"MIT"
] | 20 | 2015-02-23T15:11:56.000Z | 2022-03-18T20:56:48.000Z | data/scripts/templates/object/mobile/shared_dressed_commoner_old_zabrak_female_01.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/mobile/shared_dressed_commoner_old_zabrak_female_01.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | 20 | 2015-04-04T16:35:59.000Z | 2022-03-24T14:54:37.000Z | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Creature()
result.template = "object/mobile/shared_dressed_commoner_old_zabrak_female_01.iff"
result.attribute_te... | 27.352941 | 83 | 0.741935 |
29ee5dac571a25164840b88fed6497daf6199ec0 | 146 | py | Python | examples/for123.py | VictorVaquero/geneticPendulum | 60e20ec8148d4949ae3b3e1597433763498cd2e5 | [
"MIT"
] | null | null | null | examples/for123.py | VictorVaquero/geneticPendulum | 60e20ec8148d4949ae3b3e1597433763498cd2e5 | [
"MIT"
] | null | null | null | examples/for123.py | VictorVaquero/geneticPendulum | 60e20ec8148d4949ae3b3e1597433763498cd2e5 | [
"MIT"
] | null | null | null | for count in [1, 2, 3]:
print(count)
print('Yes' * count)
print('Done counting.')
for color in ['red', 'blue', 'green']:
print(color)
| 20.857143 | 38 | 0.582192 |
9d50e8c9004fce71d88311e3104ae4b30faf77e7 | 387 | py | Python | music/wsgi.py | hopgausi/Django_Music_Tool_App | 50763871bc014978b7189365878e92d9c0af20e9 | [
"MIT"
] | null | null | null | music/wsgi.py | hopgausi/Django_Music_Tool_App | 50763871bc014978b7189365878e92d9c0af20e9 | [
"MIT"
] | 5 | 2021-03-19T08:28:17.000Z | 2021-09-22T19:17:01.000Z | music/wsgi.py | hopgausi/Django_Music_Tool_App | 50763871bc014978b7189365878e92d9c0af20e9 | [
"MIT"
] | null | null | null | """
WSGI config for music 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/3.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTING... | 22.764706 | 78 | 0.782946 |
3814a9f5adedab07d5f04af0704ee5c5613ab69e | 27,402 | py | Python | extraction/enhancement_AEC_npy.py | manuelaguadomtz/MSU-LatentAFIS | 1d6e837651a1b5dac3bd48d672397f620bf9a0a5 | [
"MIT"
] | 53 | 2019-05-07T02:46:35.000Z | 2022-03-19T20:51:33.000Z | extraction/enhancement_AEC_npy.py | keivanB/MSU-LatentAFIS | 07abc3e1ac323b11163701c7a3240b668103ace7 | [
"MIT"
] | 10 | 2019-05-04T09:38:35.000Z | 2021-08-05T09:55:22.000Z | extraction/enhancement_AEC_npy.py | keivanB/MSU-LatentAFIS | 07abc3e1ac323b11163701c7a3240b668103ace7 | [
"MIT"
] | 23 | 2019-06-06T13:36:52.000Z | 2022-03-30T16:54:23.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# File: DCGAN.py
# Author: Yuxin Wu <ppwwyyxxc@gmail.com>
import numpy as np
import sys
import argparse
from tensorpack import *
from tensorpack.utils.viz import *
from tensorpack.tfutils.summary import add_moving_summary
from tensorpack.tfutils.scope_utils import auto_reu... | 40.061404 | 182 | 0.599737 |
215ab872e6b0546a8acc2942939c998ac40eedd9 | 2,095 | py | Python | custom_components/loxone/scene.py | geertsmichael/PyLoxone | 68eb5ea5d382ca04e8e2bed80ecc1604a4ccc8f1 | [
"Apache-2.0"
] | null | null | null | custom_components/loxone/scene.py | geertsmichael/PyLoxone | 68eb5ea5d382ca04e8e2bed80ecc1604a4ccc8f1 | [
"Apache-2.0"
] | null | null | null | custom_components/loxone/scene.py | geertsmichael/PyLoxone | 68eb5ea5d382ca04e8e2bed80ecc1604a4ccc8f1 | [
"Apache-2.0"
] | null | null | null | import asyncio
import logging
from homeassistant.components.scene import Scene
from homeassistant.const import (
CONF_VALUE_TEMPLATE)
from homeassistant.helpers.entity_platform import async_call_later
_LOGGER = logging.getLogger(__name__)
DEFAULT_NAME = 'Loxone Scene'
DEFAULT_FORCE_UPDATE = False
CONF_UUID = "u... | 31.742424 | 117 | 0.646778 |
c4a9e42fb4b40f315037f885a71efd6c672a1ca8 | 4,298 | py | Python | stock_prediction_deep_learning.py | ravi7234/stock-prediction-deep-neural-learning | f8a6aa0aabd89b32c79e06e8dcbd11aa50df717c | [
"CC0-1.0"
] | 145 | 2020-07-02T08:15:59.000Z | 2022-03-23T03:02:12.000Z | stock_prediction_deep_learning.py | ysdede/stock-prediction-deep-neural-learning | 409a637b3e56048523b19a658b5bf7cfe60f19ea | [
"CC0-1.0"
] | 6 | 2021-04-10T08:15:58.000Z | 2021-12-09T20:33:59.000Z | stock_prediction_deep_learning.py | ysdede/stock-prediction-deep-neural-learning | 409a637b3e56048523b19a658b5bf7cfe60f19ea | [
"CC0-1.0"
] | 43 | 2020-07-11T14:09:02.000Z | 2022-03-28T02:17:17.000Z | # Copyright 2020 Jordi Corbilla. 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 ... | 45.723404 | 143 | 0.739181 |
13e1093958f031562acdb3868daa475d4c344be0 | 3,452 | py | Python | spacy/tests/lang/de/test_prefix_suffix_infix.py | cedar101/spaCy | 66e22098a8bb77cbe527b1a4a3c69ec1cfb56f95 | [
"MIT"
] | 12 | 2019-03-20T20:43:47.000Z | 2020-04-13T11:10:52.000Z | spacy/tests/lang/de/test_prefix_suffix_infix.py | cedar101/spaCy | 66e22098a8bb77cbe527b1a4a3c69ec1cfb56f95 | [
"MIT"
] | 13 | 2018-06-05T11:54:40.000Z | 2019-07-02T11:33:14.000Z | spacy/tests/lang/de/test_prefix_suffix_infix.py | cedar101/spaCy | 66e22098a8bb77cbe527b1a4a3c69ec1cfb56f95 | [
"MIT"
] | 2 | 2020-02-15T18:33:35.000Z | 2022-02-13T14:11:41.000Z | # coding: utf-8
from __future__ import unicode_literals
import pytest
@pytest.mark.parametrize("text", ["(unter)"])
def test_de_tokenizer_splits_no_special(de_tokenizer, text):
tokens = de_tokenizer(text)
assert len(tokens) == 3
@pytest.mark.parametrize("text", ["unter'm"])
def test_de_tokenizer_splits_no_... | 30.821429 | 88 | 0.702491 |
b206d087be953c7f766e90cc3e28588b6f662547 | 6,546 | py | Python | metaworld/envs/mujoco/sawyer_xyz/sawyer_push_wall_v2.py | Shushman/metaworld | af48a92c12b8182b7e8a151d0a3523e9c3b049b1 | [
"MIT"
] | null | null | null | metaworld/envs/mujoco/sawyer_xyz/sawyer_push_wall_v2.py | Shushman/metaworld | af48a92c12b8182b7e8a151d0a3523e9c3b049b1 | [
"MIT"
] | null | null | null | metaworld/envs/mujoco/sawyer_xyz/sawyer_push_wall_v2.py | Shushman/metaworld | af48a92c12b8182b7e8a151d0a3523e9c3b049b1 | [
"MIT"
] | null | null | null | """Version 2 of SawyerPushWallEnv."""
import numpy as np
from gym.spaces import Box
from metaworld.envs.env_util import get_asset_full_path
from metaworld.envs.mujoco.sawyer_xyz.base import SawyerXYZEnv, _assert_task_is_set
class SawyerPushWallEnvV2(SawyerXYZEnv):
"""
SawyerPushEnvV2 updates SawyerReachPushP... | 36.569832 | 98 | 0.610755 |
459f4fecadda39ea54c92a84f49b85a5e327c8be | 281 | py | Python | ooni/tests/test_safe_represent.py | irl/ooni-probe | c21861c28ca6bd667715872d099006fab87222fd | [
"BSD-2-Clause"
] | 24 | 2018-12-23T12:53:57.000Z | 2022-01-19T19:50:53.000Z | ooni/tests/test_safe_represent.py | Acidburn0zzz/ooni-probe | 22720e383093c0d30fd1b6ca44794d3b29031f91 | [
"BSD-2-Clause"
] | 64 | 2018-09-13T08:26:20.000Z | 2022-02-11T03:48:34.000Z | ooni/tests/test_safe_represent.py | Acidburn0zzz/ooni-probe | 22720e383093c0d30fd1b6ca44794d3b29031f91 | [
"BSD-2-Clause"
] | 9 | 2019-06-10T01:41:48.000Z | 2022-01-08T08:46:25.000Z | import yaml
from twisted.trial import unittest
from ooni.reporter import OSafeDumper
from scapy.all import IP, UDP
class TestScapyRepresent(unittest.TestCase):
def test_represent_scapy(self):
data = IP() / UDP()
yaml.dump_all([data], Dumper=OSafeDumper)
| 17.5625 | 49 | 0.725979 |
ccc15fab4fe8a7e5e5e2ffb08f85278e401fbc65 | 4,235 | py | Python | indico/modules/events/blueprint.py | EdverCompany/indico | c4b5e7b2e3a47355d850a342ed527c09334ef336 | [
"MIT"
] | null | null | null | indico/modules/events/blueprint.py | EdverCompany/indico | c4b5e7b2e3a47355d850a342ed527c09334ef336 | [
"MIT"
] | 1 | 2016-10-28T13:42:20.000Z | 2016-10-28T13:42:20.000Z | indico/modules/events/blueprint.py | pferreir/indico | f0d41c7aa1b38b0eab819297dd7b3b48f2ee85a0 | [
"MIT"
] | null | null | null | # This file is part of Indico.
# Copyright (C) 2002 - 2021 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from indico.modules.events.controllers.admin import (RHCreateEventLabel, RHCreateReferenceType, RHDeleteEv... | 58.819444 | 119 | 0.732231 |
772b654e1ec1a9a1e3adcf605ae1a9e270b96004 | 38,825 | py | Python | NXcrypt/NXcrypt.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 4 | 2021-04-23T15:39:17.000Z | 2021-12-27T22:53:24.000Z | NXcrypt/NXcrypt.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | null | null | null | NXcrypt/NXcrypt.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 2 | 2021-04-19T08:28:54.000Z | 2022-01-19T13:23:29.000Z | #!/usr/bin/python2
#! coding : utf-8
"""
Usage :
# encrypt a python file
sudo ./nxcrypt.py --file=file_to_encrypt.py
sudo ./nxcrypt.py --file=file_to_encrypt.py --output=output_file.py
# inject a malicious python file into a normal python file
sudo ./nxcrypt --file=normal_file.py --backdoor-file=msf_listener.py -... | 72.03154 | 1,882 | 0.758094 |
8029b7ae36921958559cd794d38c7aca1f57b2a3 | 2,862 | py | Python | tests/functional/gtcs/test_crash_of_group_by_varchar_4000.py | FirebirdSQL/firebird-qa | 96af2def7f905a06f178e2a80a2c8be4a4b44782 | [
"MIT"
] | 1 | 2022-02-05T11:37:13.000Z | 2022-02-05T11:37:13.000Z | tests/functional/gtcs/test_crash_of_group_by_varchar_4000.py | FirebirdSQL/firebird-qa | 96af2def7f905a06f178e2a80a2c8be4a4b44782 | [
"MIT"
] | 1 | 2021-09-03T11:47:00.000Z | 2021-09-03T12:42:10.000Z | tests/functional/gtcs/test_crash_of_group_by_varchar_4000.py | FirebirdSQL/firebird-qa | 96af2def7f905a06f178e2a80a2c8be4a4b44782 | [
"MIT"
] | 1 | 2021-06-30T14:14:16.000Z | 2021-06-30T14:14:16.000Z | #coding:utf-8
#
# id: functional.gtcs.crash_of_group_by_varchar_4000
# title: GTCS/tests/CF_ISQL_33. Crash on attempt to GROUP BY on table with varchar(4000) field
# decription:
# ::: NB :::
# ### Name of original test has no any relation with actual task of this test:... | 28.058824 | 104 | 0.603075 |
d6e3f07fc82278066283e37c36bec73afe2847d8 | 17,638 | py | Python | gammapy/modeling/models/core.py | vikasj78/gammapy | 46deb872bbcbf36748df71e659dc3fa592f6dc27 | [
"BSD-3-Clause"
] | null | null | null | gammapy/modeling/models/core.py | vikasj78/gammapy | 46deb872bbcbf36748df71e659dc3fa592f6dc27 | [
"BSD-3-Clause"
] | null | null | null | gammapy/modeling/models/core.py | vikasj78/gammapy | 46deb872bbcbf36748df71e659dc3fa592f6dc27 | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import collections.abc
import copy
from os.path import split
import numpy as np
import astropy.units as u
from astropy.table import Table
import yaml
from gammapy.modeling import Covariance, Parameter, Parameters
from gammapy.utils.scripts import make_name... | 31.440285 | 105 | 0.559587 |
d3a627c7f8077e72523725d86413e90ebfba6a5c | 12,699 | py | Python | src/Moods/PianoSolo.py | emilyttran/senior-comps-watson-beat | fecc16f09e2e9df762918e4ce4884f49337b268e | [
"Apache-2.0"
] | null | null | null | src/Moods/PianoSolo.py | emilyttran/senior-comps-watson-beat | fecc16f09e2e9df762918e4ce4884f49337b268e | [
"Apache-2.0"
] | null | null | null | src/Moods/PianoSolo.py | emilyttran/senior-comps-watson-beat | fecc16f09e2e9df762918e4ce4884f49337b268e | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
from Skeleton import MusicTheory
from Skeleton import Constants
from Skeleton import BassRhythms
from Arranging.Arranging import *
import InitializeSectionsHelper
import InitializeChordsAndPhraseHelper
import sys
import math
import random
import collections
class PianoSolo:
... | 45.844765 | 115 | 0.536105 |
ea485d1a89e1e41ee2b220fbeb2282ff4242c853 | 3,431 | py | Python | tests/_repl_db.py | curtjen/deck-berry-py | e0fbf79ca1b0e3b6a1455093abee207bba6b3561 | [
"MIT"
] | null | null | null | tests/_repl_db.py | curtjen/deck-berry-py | e0fbf79ca1b0e3b6a1455093abee207bba6b3561 | [
"MIT"
] | null | null | null | tests/_repl_db.py | curtjen/deck-berry-py | e0fbf79ca1b0e3b6a1455093abee207bba6b3561 | [
"MIT"
] | null | null | null | import test
import repl_db as db
import json
# --- DB CALLS ---
mock_data = {
'test_string': 'This is a test string.',
'test_integer': 123,
'test_decimal': 12.345,
'test_json': {
'foo': 'biz',
'lorem': 'impsum',
'answer': 5,
}
}
# SET DATA
# requests.post(db_url, data = {'test': "Because I'm Bat... | 32.67619 | 116 | 0.673856 |
1a92d4f36c3513d514b8eaf4e1cceb6733d3f9ec | 3,672 | py | Python | skdesign/power/bioequivalence/individual.py | louden/scikit-design | c51259fd7de43d6bdb4bb49e71136321768c2acc | [
"BSD-3-Clause"
] | 2 | 2016-10-31T04:22:50.000Z | 2019-08-19T10:58:24.000Z | skdesign/power/bioequivalence/individual.py | louden/scikit-design | c51259fd7de43d6bdb4bb49e71136321768c2acc | [
"BSD-3-Clause"
] | null | null | null | skdesign/power/bioequivalence/individual.py | louden/scikit-design | c51259fd7de43d6bdb4bb49e71136321768c2acc | [
"BSD-3-Clause"
] | 2 | 2018-06-06T10:58:15.000Z | 2020-08-10T10:57:49.000Z | from skdesign.power import (PowerBase,
is_in_0_1,
is_numeric,
is_positive)
import scipy.stats as stats
import math
MAX_ITERATIONS = 1000
class Individual(PowerBase):
""" Sample Size calculations for tests of individual bioequival... | 37.090909 | 104 | 0.560458 |
eb6489544f0cbb075dced93d69beb815f61b007c | 2,607 | py | Python | tests/bdd/features/stepslib.py | slamavl/quantarhei | d822bc2db86152c418e330a9152e7866869776f7 | [
"MIT"
] | 14 | 2016-10-16T13:26:05.000Z | 2021-11-09T11:40:52.000Z | tests/bdd/features/stepslib.py | slamavl/quantarhei | d822bc2db86152c418e330a9152e7866869776f7 | [
"MIT"
] | 61 | 2016-09-19T10:45:56.000Z | 2021-11-10T13:53:06.000Z | tests/bdd/features/stepslib.py | slamavl/quantarhei | d822bc2db86152c418e330a9152e7866869776f7 | [
"MIT"
] | 21 | 2016-08-30T09:09:28.000Z | 2022-03-30T03:16:35.000Z | # -*- coding: utf-8 -*-
from aloe import step
from aloe import world
import numpy
import pkg_resources
from unittest import TestCase
from quantarhei import TimeAxis
from quantarhei import FrequencyAxis
@step(r'upper-half TimeAxis with parameters')
def upper_half_time_axis(self):
for row in self.hashes:
... | 27.442105 | 74 | 0.618719 |
0d205d4c610d6b6a9d2d9fc9e616869f75ec023b | 1,362 | py | Python | Testing/03_use_type_hint/type_hint_complicated.py | t2y/python-study | 52a132ea600d4696164e540d8a8f8f5fc58e097a | [
"Apache-2.0"
] | 18 | 2016-08-15T00:24:44.000Z | 2020-11-30T15:11:52.000Z | Testing/03_use_type_hint/type_hint_complicated.py | t2y/python-study | 52a132ea600d4696164e540d8a8f8f5fc58e097a | [
"Apache-2.0"
] | null | null | null | Testing/03_use_type_hint/type_hint_complicated.py | t2y/python-study | 52a132ea600d4696164e540d8a8f8f5fc58e097a | [
"Apache-2.0"
] | 6 | 2016-09-28T10:47:03.000Z | 2020-10-14T10:20:06.000Z | # -*- coding: utf-8 -*-
from typing import Union, Any, List, cast
# To find out what type mypy infers for an expression anywhere in
# your program, wrap it in reveal_type. Mypy will print an error
# message with the type; remove it again before running the code.
reveal_type(1) # -> error: Revealed type is 'builtins.... | 42.5625 | 86 | 0.713656 |
713254c5ff839c3530fe1266ad457bc9994d1a36 | 8,309 | py | Python | mapclientplugins/electrodearraydetectorstep/view/ui_electrodearraydetectorwidget.py | Tehsurfer/mapclientplugins.electrodearraydetectorstep | bbcb9f0e2e03d93d7d1d16a24c295e2afa6fd22a | [
"Apache-2.0"
] | null | null | null | mapclientplugins/electrodearraydetectorstep/view/ui_electrodearraydetectorwidget.py | Tehsurfer/mapclientplugins.electrodearraydetectorstep | bbcb9f0e2e03d93d7d1d16a24c295e2afa6fd22a | [
"Apache-2.0"
] | null | null | null | mapclientplugins/electrodearraydetectorstep/view/ui_electrodearraydetectorwidget.py | Tehsurfer/mapclientplugins.electrodearraydetectorstep | bbcb9f0e2e03d93d7d1d16a24c295e2afa6fd22a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'mapclientplugins\electrodearraydetectorstep\qt\electrodearraydetectorwidget.ui'
#
# Created: Mon Nov 12 14:24:49 2018
# by: pyside-uic 0.2.15 running on PySide 1.2.4
#
# WARNING! All changes made in this file will be lost!
from PySide ... | 70.415254 | 179 | 0.774341 |
bc76a6511aa264968810297191e70a18bae31a0d | 287 | py | Python | a.py | nevi20-meet/meet2018y1final-proj | cee9ff36c6259e38b71f91b4ec2cf44a59c7e0dc | [
"MIT"
] | null | null | null | a.py | nevi20-meet/meet2018y1final-proj | cee9ff36c6259e38b71f91b4ec2cf44a59c7e0dc | [
"MIT"
] | null | null | null | a.py | nevi20-meet/meet2018y1final-proj | cee9ff36c6259e38b71f91b4ec2cf44a59c7e0dc | [
"MIT"
] | null | null | null | from turtle import Turtle, Screen
def dragging(x, y):
yertle.ondrag(None)
yertle.setheading(yertle.towards(x, y))
yertle.goto(x, y)
yertle.ondrag(dragging)
screen = Screen()
yertle = Turtle('turtle')
yertle.speed('fastest')
yertle.ondrag(dragging)
screen.mainloop()
| 16.882353 | 43 | 0.703833 |
6d7f06f43ec6b93ac1ddb94c2d241161ebdd1134 | 3,561 | py | Python | src/util/data.py | arthurflor/signatures | e6ae5e5996df438e533420d80eda288d849db28c | [
"MIT"
] | null | null | null | src/util/data.py | arthurflor/signatures | e6ae5e5996df438e533420d80eda288d849db28c | [
"MIT"
] | null | null | null | src/util/data.py | arthurflor/signatures | e6ae5e5996df438e533420d80eda288d849db28c | [
"MIT"
] | 1 | 2020-09-05T19:10:26.000Z | 2020-09-05T19:10:26.000Z | from sklearn.tree import export_graphviz
import graphviz
import time
import os
import sys
import cv2
import numpy as np
import util.path as path
import pdi.image as image
DATASET = ""
def loadDataset(dataset, extract):
print("Loading data...")
images, labels = fetchFromPath(dataset)
print("Preprocess... | 32.972222 | 154 | 0.636338 |
1d3ac7000eb9f88239d2b892849aa01b33215b33 | 1,157 | py | Python | src/templates/html_template.py | PY-GZKY/fconversion | f1da069ac258444c8a6b2a5fe77d0e1295a0d4e4 | [
"Apache-2.0"
] | 1 | 2022-02-11T09:39:08.000Z | 2022-02-11T09:39:08.000Z | src/templates/html_template.py | PY-GZKY/fconversion | f1da069ac258444c8a6b2a5fe77d0e1295a0d4e4 | [
"Apache-2.0"
] | null | null | null | src/templates/html_template.py | PY-GZKY/fconversion | f1da069ac258444c8a6b2a5fe77d0e1295a0d4e4 | [
"Apache-2.0"
] | null | null | null | html_ = '''
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimal-ui">
<title>{title_}</title>
<link rel="stylesheet" href="../../src/static/linenum.css">
<link rel="stylesheet" href="../../src/static/markdown.css">
<link rel="s... | 42.851852 | 112 | 0.665514 |
7e3281183025c1d5ff41356de63ecc23e9d680f9 | 8,982 | py | Python | sprokit/tests/bindings/python/sprokit/pipeline/test-process.py | neal-siekierski/kwiver | 1c97ad72c8b6237cb4b9618665d042be16825005 | [
"BSD-3-Clause"
] | null | null | null | sprokit/tests/bindings/python/sprokit/pipeline/test-process.py | neal-siekierski/kwiver | 1c97ad72c8b6237cb4b9618665d042be16825005 | [
"BSD-3-Clause"
] | null | null | null | sprokit/tests/bindings/python/sprokit/pipeline/test-process.py | neal-siekierski/kwiver | 1c97ad72c8b6237cb4b9618665d042be16825005 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
#ckwg +28
# Copyright 2011-2013, 2019 by Kitware, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright n... | 30.972414 | 100 | 0.688377 |
d0faf60418de14c362b09b7068749df049f8e29d | 1,082 | py | Python | 2020/7/1.py | hectcastro/aoc | 6b5a6a103eaa1cb89ef8c799ae9411750448968b | [
"Apache-2.0"
] | null | null | null | 2020/7/1.py | hectcastro/aoc | 6b5a6a103eaa1cb89ef8c799ae9411750448968b | [
"Apache-2.0"
] | 18 | 2021-05-12T05:30:23.000Z | 2022-03-16T12:05:51.000Z | 2020/7/1.py | hectcastro/aoc | 6b5a6a103eaa1cb89ef8c799ae9411750448968b | [
"Apache-2.0"
] | null | null | null | import fileinput
import re
from fileinput import FileInput
from typing import Dict, List, Tuple
GRAPH: Dict[str, List[Tuple[str, str]]] = {}
COLOR_TO_MATCH = "shiny gold"
def contains_shiny_gold_bag(color: str) -> bool:
if color == COLOR_TO_MATCH:
return True
return any(contains_shiny_gold_bag(bag_c... | 26.390244 | 83 | 0.66451 |
d08c8c5cb789c3540e5813e35028846c9f35a952 | 74 | py | Python | pm4pymdl/algo/mvp/gen_framework2/md_petri_inductive/__init__.py | dorian1000/pm4py-mdl | 71e0c2425abb183da293a58d31e25e50137c774f | [
"MIT"
] | 5 | 2021-01-31T22:45:29.000Z | 2022-02-22T14:26:06.000Z | pm4pymdl/algo/mvp/gen_framework2/md_petri_inductive/__init__.py | Javert899/pm4py-mdl | 4cc875999100f3f1ad60b925a20e40cf52337757 | [
"MIT"
] | 3 | 2021-07-07T15:32:55.000Z | 2021-07-07T16:15:36.000Z | pm4pymdl/algo/mvp/gen_framework2/md_petri_inductive/__init__.py | dorian1000/pm4py-mdl | 71e0c2425abb183da293a58d31e25e50137c774f | [
"MIT"
] | 9 | 2020-09-23T15:34:11.000Z | 2022-03-17T09:15:40.000Z | from pm4pymdl.algo.mvp.gen_framework2.md_petri_inductive import discovery
| 37 | 73 | 0.891892 |
97742d434f756859171175e1ee026361918f8086 | 3,151 | py | Python | blueprints/portfolio/build.py | andrenasturas/hausse | 58e7cb71d5105cf1d6ec7d294e85668855bf8336 | [
"MIT"
] | null | null | null | blueprints/portfolio/build.py | andrenasturas/hausse | 58e7cb71d5105cf1d6ec7d294e85668855bf8336 | [
"MIT"
] | 1 | 2021-08-30T21:41:46.000Z | 2021-08-30T21:41:46.000Z | blueprints/portfolio/build.py | andrenasturas/hausse | 58e7cb71d5105cf1d6ec7d294e85668855bf8336 | [
"MIT"
] | 1 | 2021-08-31T19:27:32.000Z | 2021-08-31T19:27:32.000Z | from hausse import Hausse
from hausse.plugins import (
Assets,
DiscoverPartials,
Drop,
Handlebars,
Markdown,
MetadataMarkdown,
Relations,
Collection,
Collections
)
# Collections preparations
# By default, all files in "src/formations" folder will be grouped in this collection
Links... | 41.460526 | 96 | 0.70676 |
02f63e1f45670eef70a07e540b149b0dd0cfef8a | 9,574 | py | Python | aslack/slack_bot/bot.py | textbook/aslack | b930dbdfa761512845979d183b06b41e4248a920 | [
"0BSD"
] | 16 | 2016-01-27T08:24:41.000Z | 2021-03-29T00:55:38.000Z | aslack/slack_bot/bot.py | textbook/aslack | b930dbdfa761512845979d183b06b41e4248a920 | [
"0BSD"
] | 17 | 2015-12-30T23:48:40.000Z | 2021-12-13T19:41:53.000Z | aslack/slack_bot/bot.py | textbook/aslack | b930dbdfa761512845979d183b06b41e4248a920 | [
"0BSD"
] | 6 | 2016-05-16T05:22:07.000Z | 2017-06-30T02:39:44.000Z | """A Slack bot using the real-time messaging API."""
from itertools import count
import json
import logging
from random import randint
from textwrap import dedent
from aiohttp import MsgType, ws_connect
from aslack import __name__ as mod_name, __version__
from aslack.slack_api import SlackApiError, SlackBotApi
from ... | 33.475524 | 79 | 0.584395 |
1b966c5eba075b3a80f70333e4a1a52d688d28a3 | 2,229 | py | Python | Configuration/EcalTB/python/readConfiguration2004_v2_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | Configuration/EcalTB/python/readConfiguration2004_v2_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | Configuration/EcalTB/python/readConfiguration2004_v2_cff.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
src1 = cms.ESSource("PoolDBESSource",
loadAll = cms.bool(True),
toGet = cms.VPSet(cms.PSet(
record = cms.string('EcalPedestalsRcd'),
tag = cms.string('EcalPedestals')
),
cms.PSet(
record = cms.string('EcalTBWeightsRcd'),
... | 34.292308 | 111 | 0.588156 |
e454c0580f977b93300240e32dcfa350f3940501 | 1,388 | py | Python | src/main/resources/assets/openpython/opos/v1.1/lib/micropython/socket.py | fossabot/OpenPython | 8fe3f794f2a6c543d96c1ef5c097ffa18f90b680 | [
"PSF-2.0",
"Apache-2.0",
"CC0-1.0",
"MIT"
] | 41 | 2018-10-25T06:15:31.000Z | 2022-02-20T11:20:43.000Z | src/main/resources/assets/openpython/opos/v1.1/lib/micropython/socket.py | fossabot/OpenPython | 8fe3f794f2a6c543d96c1ef5c097ffa18f90b680 | [
"PSF-2.0",
"Apache-2.0",
"CC0-1.0",
"MIT"
] | 16 | 2018-03-20T12:25:27.000Z | 2018-03-25T13:34:44.000Z | src/main/resources/assets/openpython/opos/v1.1/lib/micropython/socket.py | fossabot/OpenPython | 8fe3f794f2a6c543d96c1ef5c097ffa18f90b680 | [
"PSF-2.0",
"Apache-2.0",
"CC0-1.0",
"MIT"
] | 8 | 2018-11-04T02:03:15.000Z | 2022-01-13T11:46:28.000Z | from usocket import *
import usocket as _socket
_GLOBAL_DEFAULT_TIMEOUT = 30
IPPROTO_IP = 0
IP_ADD_MEMBERSHIP = 35
IP_DROP_MEMBERSHIP = 36
INADDR_ANY = 0
error = OSError
def _resolve_addr(addr):
if isinstance(addr, (bytes, bytearray)):
return addr
family = _socket.AF_INET
if len(addr) != 2:
... | 23.133333 | 66 | 0.605908 |
cf7ec2f036f3056c17d1eecd33f7009cc317c97b | 32,928 | py | Python | venv/Lib/site-packages/sphinx/writers/html.py | kavanAdeshara/Expense_Tracker | b3e4810e858a7786e05cda6b91ba674b73b87981 | [
"Apache-2.0"
] | 1 | 2021-04-10T18:14:50.000Z | 2021-04-10T18:14:50.000Z | venv/Lib/site-packages/sphinx/writers/html.py | kavanAdeshara/Expense_Tracker | b3e4810e858a7786e05cda6b91ba674b73b87981 | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/sphinx/writers/html.py | kavanAdeshara/Expense_Tracker | b3e4810e858a7786e05cda6b91ba674b73b87981 | [
"Apache-2.0"
] | null | null | null | """
sphinx.writers.html
~~~~~~~~~~~~~~~~~~~
docutils writers handling Sphinx' custom nodes.
:copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import copy
import os
import posixpath
import re
import warnings
from typing import Any, Iterabl... | 38.968047 | 105 | 0.600674 |
4c732f018099503d8e952d8e0a97502c0fa7c827 | 28,267 | py | Python | sgkit_plink/_open_bed.py | CarlKCarlK/sgkit-plink | 4a46a448d1b25e009f4abc868353761fee47aa53 | [
"Apache-2.0"
] | null | null | null | sgkit_plink/_open_bed.py | CarlKCarlK/sgkit-plink | 4a46a448d1b25e009f4abc868353761fee47aa53 | [
"Apache-2.0"
] | null | null | null | sgkit_plink/_open_bed.py | CarlKCarlK/sgkit-plink | 4a46a448d1b25e009f4abc868353761fee47aa53 | [
"Apache-2.0"
] | null | null | null | #!!!cmk todo: Offer to ignore some or all fam bim fields
#!!!cmk add typing info
#!!!cmk run flake8, isort, etc
import os
import numpy as np
import numbers
import pandas as pd
import logging
from pathlib import Path
import multiprocessing
from dataclasses import dataclass
import math
from typing import Any, List, Opti... | 36.80599 | 153 | 0.508402 |
9b025e9cccceb66acd96f028312aab6f6aa3cf36 | 9,919 | py | Python | nova/api/openstack/compute/contrib/quotas.py | bopopescu/plumgrid-nova | 87579b67ed9a2d62f04d3540d6fb817cc002cead | [
"Apache-2.0"
] | null | null | null | nova/api/openstack/compute/contrib/quotas.py | bopopescu/plumgrid-nova | 87579b67ed9a2d62f04d3540d6fb817cc002cead | [
"Apache-2.0"
] | null | null | null | nova/api/openstack/compute/contrib/quotas.py | bopopescu/plumgrid-nova | 87579b67ed9a2d62f04d3540d6fb817cc002cead | [
"Apache-2.0"
] | 1 | 2020-07-24T08:52:14.000Z | 2020-07-24T08:52:14.000Z | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 OpenStack Foundation
# 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.apach... | 39.517928 | 79 | 0.581913 |
fb193e6881f22c841d67a703b63325449d2924c5 | 352 | py | Python | tests/data/config/n.py | jinliwei1997/mmcv | f8d46df4a9fa32fb44d2e92a4ca5e7b26ee9cb79 | [
"Apache-2.0"
] | 3,748 | 2018-10-12T08:39:46.000Z | 2022-03-31T17:22:55.000Z | tests/data/config/n.py | jinliwei1997/mmcv | f8d46df4a9fa32fb44d2e92a4ca5e7b26ee9cb79 | [
"Apache-2.0"
] | 1,637 | 2018-10-12T06:06:18.000Z | 2022-03-31T02:20:53.000Z | tests/data/config/n.py | jinliwei1997/mmcv | f8d46df4a9fa32fb44d2e92a4ca5e7b26ee9cb79 | [
"Apache-2.0"
] | 1,234 | 2018-10-12T09:28:20.000Z | 2022-03-31T15:56:24.000Z | test_item1 = [1, 2]
bool_item2 = True
str_item3 = 'test'
dict_item4 = dict(
a={
'c/d': 'path/d',
'f': 's3//f',
6: '2333',
'2333': 'number'
},
b={'8': 543},
c={9: 678},
d={'a': 0},
f=dict(a='69'))
dict_item5 = {'x/x': {'a.0': 233}}
dict_list_item6 = {'x/x': [{'a.0'... | 20.705882 | 64 | 0.409091 |
95d7c5da44d12f1102475cb4f701a26a193c00e7 | 3,265 | py | Python | tests/common/test_run/l2normalize_ad_run.py | laekov/akg | 5316b8cb2340bbf71bdc724dc9d81513a67b3104 | [
"Apache-2.0"
] | 1 | 2020-08-31T02:43:43.000Z | 2020-08-31T02:43:43.000Z | tests/common/test_run/l2normalize_ad_run.py | laekov/akg | 5316b8cb2340bbf71bdc724dc9d81513a67b3104 | [
"Apache-2.0"
] | null | null | null | tests/common/test_run/l2normalize_ad_run.py | laekov/akg | 5316b8cb2340bbf71bdc724dc9d81513a67b3104 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 38.411765 | 144 | 0.611945 |
10d4679ad19cb67bcd67ae853e1fbbee902d9e82 | 1,126 | py | Python | ABC/abc151-abc200/abc175/d/main.py | KATO-Hiro/AtCoder | cbbdb18e95110b604728a54aed83a6ed6b993fde | [
"CC0-1.0"
] | 2 | 2020-06-12T09:54:23.000Z | 2021-05-04T01:34:07.000Z | ABC/abc151-abc200/abc175/d/main.py | KATO-Hiro/AtCoder | cbbdb18e95110b604728a54aed83a6ed6b993fde | [
"CC0-1.0"
] | 961 | 2020-06-23T07:26:22.000Z | 2022-03-31T21:34:52.000Z | ABC/abc151-abc200/abc175/d/main.py | KATO-Hiro/AtCoder | cbbdb18e95110b604728a54aed83a6ed6b993fde | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
def main():
import sys
input = sys.stdin.readline
n, k = map(int, input().split())
p = list(map(lambda x: int(x) - 1, input().split()))
c = list(map(int, input().split()))
ans = -float("inf")
# 開始位置を全探索[0, n)
for si in range(n):
scores = list()
... | 21.245283 | 57 | 0.48135 |
acf4c7d2d9161eee5bf5930634ce169a033b1675 | 1,917 | py | Python | DQM/HLXMonitor/test/hlx_dqm_sourceclient_vme22_cfg.py | NTrevisani/cmssw | a212a27526f34eb9507cf8b875c93896e6544781 | [
"Apache-2.0"
] | 3 | 2018-08-24T19:10:26.000Z | 2019-02-19T11:45:32.000Z | DQM/HLXMonitor/test/hlx_dqm_sourceclient_vme22_cfg.py | NTrevisani/cmssw | a212a27526f34eb9507cf8b875c93896e6544781 | [
"Apache-2.0"
] | 7 | 2016-07-17T02:34:54.000Z | 2019-08-13T07:58:37.000Z | DQM/HLXMonitor/test/hlx_dqm_sourceclient_vme22_cfg.py | NTrevisani/cmssw | a212a27526f34eb9507cf8b875c93896e6544781 | [
"Apache-2.0"
] | 5 | 2018-08-21T16:37:52.000Z | 2020-01-09T13:33:17.000Z | import FWCore.ParameterSet.Config as cms
process = cms.Process("hlxdqmlive")
process.load("DQMServices.Components.MessageLogger_cfi")
process.load("DQM.HLXMonitor.hlx_dqm_sourceclient_vme22_cfi")
## For private server vme22 use an empty source
process.source = cms.Source("EmptySource")
## For testing dqmEnv ... for... | 38.34 | 111 | 0.784559 |
1e29fbfdc10c1ebfcdec5060d52925bfa4ce3dce | 2,260 | py | Python | convclassi.py | jerinka/LSTM_Video_classifier | 46dd9f8bf6f4cc00619a4ee7108fd5d0e3896269 | [
"Apache-2.0"
] | 4 | 2020-07-09T08:36:16.000Z | 2022-01-04T16:35:27.000Z | convclassi.py | jerinka/LSTM_Video_classifier | 46dd9f8bf6f4cc00619a4ee7108fd5d0e3896269 | [
"Apache-2.0"
] | null | null | null | convclassi.py | jerinka/LSTM_Video_classifier | 46dd9f8bf6f4cc00619a4ee7108fd5d0e3896269 | [
"Apache-2.0"
] | null | null | null | import numpy as np
from sklearn.model_selection import train_test_split
from keras.utils import to_categorical
from keras.models import Sequential
from keras.layers import Conv2D
from keras.layers import MaxPooling2D
from keras.layers import LSTM, ConvLSTM2D
from keras.layers import Dense
from keras.layers import Flatt... | 29.736842 | 104 | 0.734956 |
134876e62e75a474485d77489a42b13cb8c0d639 | 3,747 | py | Python | ricerca_app/migrations/0032_progettoambitoterritoriale_progettodatibase_progettoresponsabilescientifico_progettotipologiaprogram.py | UniversitaDellaCalabria/Ricerca | b46157d3182d1c59cff4d36cc63b9e89f2f320c9 | [
"Apache-2.0"
] | null | null | null | ricerca_app/migrations/0032_progettoambitoterritoriale_progettodatibase_progettoresponsabilescientifico_progettotipologiaprogram.py | UniversitaDellaCalabria/Ricerca | b46157d3182d1c59cff4d36cc63b9e89f2f320c9 | [
"Apache-2.0"
] | 1 | 2020-08-03T15:12:46.000Z | 2020-09-03T22:12:16.000Z | ricerca_app/migrations/0032_progettoambitoterritoriale_progettodatibase_progettoresponsabilescientifico_progettotipologiaprogram.py | UniversitaDellaCalabria/Ricerca | b46157d3182d1c59cff4d36cc63b9e89f2f320c9 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.2.7 on 2021-11-26 04:55
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('ricerca_app', '0031_alter_brevettoinventori_matricola_inventore'),
]
operations = [
migrations.CreateModel(... | 52.774648 | 214 | 0.616493 |
4da49dfdd274538e3b41557e932b949761f8e326 | 153 | py | Python | src/garage/torch/embeddings/__init__.py | fangqyi/garage | ddafba385ef005f46f913ab352f9638760e5b412 | [
"MIT"
] | 1 | 2021-03-02T08:43:20.000Z | 2021-03-02T08:43:20.000Z | src/garage/torch/embeddings/__init__.py | fangqyi/garage | ddafba385ef005f46f913ab352f9638760e5b412 | [
"MIT"
] | null | null | null | src/garage/torch/embeddings/__init__.py | fangqyi/garage | ddafba385ef005f46f913ab352f9638760e5b412 | [
"MIT"
] | null | null | null | """PyTorch embedding modules for meta-learning algorithms."""
from garage.torch.embeddings.mlp_encoder import MLPEncoder
__all__ = ['MLPEncoder']
| 25.5 | 62 | 0.764706 |
f653028d85cf532f1b9a4d70c3315aa1aa74c0a1 | 5,189 | py | Python | server/fase2/team08/Server/server.py | webdev188/tytus | 847071edb17b218f51bb969d335a8ec093d13f94 | [
"MIT"
] | null | null | null | server/fase2/team08/Server/server.py | webdev188/tytus | 847071edb17b218f51bb969d335a8ec093d13f94 | [
"MIT"
] | null | null | null | server/fase2/team08/Server/server.py | webdev188/tytus | 847071edb17b218f51bb969d335a8ec093d13f94 | [
"MIT"
] | null | null | null | #TyTusDB server.
#Dev by Group 4
#BD1 2020
import sys
sys.path.append('../../../../parser/team26/G26')
sys.path.append('../../../../parser/team26/G26/Utils')
sys.path.append('../../../../parser/team26/G26/Expresiones')
sys.path.append('../../../../parser/team26/G26/Instrucciones')
sys.path.append('../../../../parser/t... | 35.29932 | 83 | 0.579495 |
8f7aa216066ebaf1dc2a5626697b747131d5184e | 1,967 | py | Python | conftest.py | peruana80/python_training_mantis | 16113cbff646fd2280d62433090f26402dafa23c | [
"Apache-2.0"
] | null | null | null | conftest.py | peruana80/python_training_mantis | 16113cbff646fd2280d62433090f26402dafa23c | [
"Apache-2.0"
] | null | null | null | conftest.py | peruana80/python_training_mantis | 16113cbff646fd2280d62433090f26402dafa23c | [
"Apache-2.0"
] | null | null | null | import importlib
import jsonpickle
import pytest
from fixture.application import Application
import json
import os.path
fixture = None
target = None
def load_config(file):
global target
if target is None:
config_file = os.path.join(os.path.dirname(os.path.abspath(__file__)), file)
with open ... | 30.261538 | 118 | 0.691917 |
1812d620c441606ea9b8f61720c5213279e03f17 | 144 | py | Python | Exercicios em python/ex23.py | GabrielSantos25/Python | 208eec0144587aa4e0aa7fa00da29ffa0478eac8 | [
"MIT"
] | null | null | null | Exercicios em python/ex23.py | GabrielSantos25/Python | 208eec0144587aa4e0aa7fa00da29ffa0478eac8 | [
"MIT"
] | null | null | null | Exercicios em python/ex23.py | GabrielSantos25/Python | 208eec0144587aa4e0aa7fa00da29ffa0478eac8 | [
"MIT"
] | null | null | null | from gettext import find
cidade = str(input('Escreva o nome de uma cidade: '))
dividido = cidade.split()
print(dividido[0] in 'SANTO' 'santo') | 24 | 53 | 0.715278 |
c0043bff0cfc5efff9b7869b1440d5b0cb73fd43 | 4,279 | py | Python | dft_scripts/model_bands__v4.py | raulf2012/CHEMENG185B_DFT | bd16a3dbda472ea4f64bb0a7b0a0427aff61fd1c | [
"MIT"
] | null | null | null | dft_scripts/model_bands__v4.py | raulf2012/CHEMENG185B_DFT | bd16a3dbda472ea4f64bb0a7b0a0427aff61fd1c | [
"MIT"
] | null | null | null | dft_scripts/model_bands__v4.py | raulf2012/CHEMENG185B_DFT | bd16a3dbda472ea4f64bb0a7b0a0427aff61fd1c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#| - SLURM HEADER
#################
#SBATCH --job-name=test00
#################
#SBATCH --time=460:00
#################
#SBATCH --ntasks=8
#################
#SBATCH --nodes=1
#################
#SBATCH --mem-per-cpu=6G
#################
#get emailed about job BEGIN, END, and FAIL
#SBATCH --mail-typ... | 22.760638 | 90 | 0.501753 |
e801a74ce9b706916239548580cf85fa45972dbd | 126 | py | Python | about/views.py | averwhy/azurite.earth | bfca9de94ac16cf2848a6173751eaac6c5cd9974 | [
"MIT"
] | null | null | null | about/views.py | averwhy/azurite.earth | bfca9de94ac16cf2848a6173751eaac6c5cd9974 | [
"MIT"
] | null | null | null | about/views.py | averwhy/azurite.earth | bfca9de94ac16cf2848a6173751eaac6c5cd9974 | [
"MIT"
] | null | null | null | from django.http import HttpResponse
def index(request):
return HttpResponse("Hello, world. You're at the about index.") | 25.2 | 67 | 0.753968 |
a48581d093081c8244a4ac8cf2ecc12a8afc97da | 1,148 | py | Python | cabot/cabotapp/admin.py | boringusername99/cabot | 56cfed43c006e145931f46cb68e316fbaccf75cd | [
"MIT"
] | 3,865 | 2015-01-01T11:37:14.000Z | 2022-03-30T01:02:50.000Z | cabot/cabotapp/admin.py | boringusername99/cabot | 56cfed43c006e145931f46cb68e316fbaccf75cd | [
"MIT"
] | 550 | 2015-01-02T18:06:08.000Z | 2021-11-04T23:39:47.000Z | cabot/cabotapp/admin.py | boringusername99/cabot | 56cfed43c006e145931f46cb68e316fbaccf75cd | [
"MIT"
] | 598 | 2015-01-22T12:17:53.000Z | 2022-03-25T17:32:21.000Z | from django.contrib import admin
from polymorphic.admin import (PolymorphicChildModelAdmin,
PolymorphicParentModelAdmin)
from .alert import AlertPlugin, AlertPluginUserData
from .models import (AlertAcknowledgement, Instance, JenkinsConfig, Service,
ServiceStatusSnap... | 33.764706 | 76 | 0.792683 |
a6e4ca82e28d2e4069ace74dd85ed05494062778 | 847 | py | Python | proxypool/crawlers/daili66.py | ccfleaf/Python3WebSpider | 9ebb54af28dab930d44a70443be6ad1ab8daa693 | [
"MIT"
] | null | null | null | proxypool/crawlers/daili66.py | ccfleaf/Python3WebSpider | 9ebb54af28dab930d44a70443be6ad1ab8daa693 | [
"MIT"
] | null | null | null | proxypool/crawlers/daili66.py | ccfleaf/Python3WebSpider | 9ebb54af28dab930d44a70443be6ad1ab8daa693 | [
"MIT"
] | null | null | null | from pyquery import PyQuery as pq
from proxypool.schemas.proxy import Proxy
from proxypool.crawlers.base import BaseCrawler
BASE_URL = 'http://www.664ip.cn/{page}.html'
MAX_PAGE = 5
class Daili66Crawler(BaseCrawler):
"""
daili66 crawler, http://www.66ip.cn/1.html
"""
urls = [BASE_URL.format(page=pag... | 25.666667 | 74 | 0.597403 |
c53dbc045e6308a07eea0d4fbabee17f8a86ba05 | 35,898 | py | Python | emc2/core/instruments.py | rcjackson/EMC2 | 6792472d8cbee13c7e411f90617c2fb6afde7c92 | [
"BSD-3-Clause"
] | 8 | 2019-10-14T15:08:37.000Z | 2022-03-23T20:34:27.000Z | emc2/core/instruments.py | rcjackson/EMC2 | 6792472d8cbee13c7e411f90617c2fb6afde7c92 | [
"BSD-3-Clause"
] | 20 | 2020-01-10T16:30:16.000Z | 2022-03-23T20:17:45.000Z | emc2/core/instruments.py | rcjackson/EMC2 | 6792472d8cbee13c7e411f90617c2fb6afde7c92 | [
"BSD-3-Clause"
] | 4 | 2019-10-07T14:58:24.000Z | 2021-04-27T18:47:12.000Z | """
=====================
emc2.core.instruments
=====================
This module stores example instruments.
"""
import numpy as np
import xarray as xr
import os
from .instrument import Instrument, ureg, quantity
from ..io import load_mie_file, load_scat_file, load_bulk_scat_file
from ..scattering import calc_microw... | 51.577586 | 114 | 0.587832 |
b2c4f25df766a3cd1a2cd301fc7dfb0ffe6c065f | 74 | py | Python | gm-pepm-2018/src/magic.py | nuprl/retic_performance | 621211c2f40251ce5364c33e72e4067e34a32013 | [
"MIT"
] | 3 | 2018-08-03T02:41:29.000Z | 2021-03-19T03:18:47.000Z | gm-pepm-2018/src/magic.py | nuprl/retic_performance | 621211c2f40251ce5364c33e72e4067e34a32013 | [
"MIT"
] | 3 | 2018-02-04T17:53:56.000Z | 2018-11-10T17:06:57.000Z | gm-pepm-2018/src/magic.py | nuprl/retic_performance | 621211c2f40251ce5364c33e72e4067e34a32013 | [
"MIT"
] | 1 | 2018-08-04T00:14:12.000Z | 2018-08-04T00:14:12.000Z | def add_one(xs)->List(Int):
return xs + [1]
print(add_one(["A", "B"]))
| 14.8 | 27 | 0.567568 |
1d7c840ec16390632b10d6f721016a31abb440d4 | 4,627 | py | Python | experiments/ashvin/vae/old/pointmass/test_vae2.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/vae/old/pointmass/test_vae2.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/vae/old/pointmass/test_vae2.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | from rlkit.envs.multitask.multitask_env import MultitaskToFlatEnv
from rlkit.envs.multitask.point2d import MultitaskImagePoint2DEnv
from rlkit.envs.mujoco.pusher2d import Pusher2DEnv
from rlkit.envs.wrappers import NormalizedBoxEnv
from rlkit.exploration_strategies.base import (
PolicyWrappedWithExplorationStrategy... | 32.356643 | 96 | 0.653987 |
a8b593e32531bfb46022a81eecdf351e794d4952 | 522 | py | Python | 20211026_1.py | ghdtjf/Beakjon | 5e2e05540c53f277397a64a367294c6ba4dbeb43 | [
"MIT"
] | null | null | null | 20211026_1.py | ghdtjf/Beakjon | 5e2e05540c53f277397a64a367294c6ba4dbeb43 | [
"MIT"
] | null | null | null | 20211026_1.py | ghdtjf/Beakjon | 5e2e05540c53f277397a64a367294c6ba4dbeb43 | [
"MIT"
] | null | null | null | class 전화기():
def __init__(self):
self.isOpen = False
self.dialog = ""
def getDialog(self):
return self.dialog
def 버튼누르기(self, 입력):
if self.isOpen == True:
self.dialog = 입력
def 전원제어(self):
# 꺼져 있을 때
if self.isOpen == False:
se... | 19.333333 | 32 | 0.507663 |
a9ffaac87744045275584b3c2c210ccbe9ed2014 | 697 | py | Python | apple_orange.py | rodincode/python | 5bcc53b6103e53b37a3e40635502cbca53fec43e | [
"MIT"
] | 1 | 2021-02-11T04:42:28.000Z | 2021-02-11T04:42:28.000Z | apple_orange.py | rodincode/python | 5bcc53b6103e53b37a3e40635502cbca53fec43e | [
"MIT"
] | null | null | null | apple_orange.py | rodincode/python | 5bcc53b6103e53b37a3e40635502cbca53fec43e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Dec 20 12:45:09 2019
@author: LENOVO
"""
from sklearn import tree
features = [[140,1], [130,1], [150,0], [170, 0]]
labels = [0,0,1,1]
target_names = ["Apple","orange"]
features_name = ["weight","texture"]
clf = tree.DecisionTreeClassifier()
clf = clf.fit(feature... | 31.681818 | 139 | 0.715925 |
b01b136f544ab4fc4c7a312cef0e14088d21040c | 1,924 | py | Python | demos/flask_app/relayr_provider.py | lenniboy/python-sdk | 7932c4ae22e1d543fa14b03ba21e22a5dac65d32 | [
"MIT"
] | 1 | 2018-06-20T19:37:31.000Z | 2018-06-20T19:37:31.000Z | demos/flask_app/relayr_provider.py | lenniboy/python-sdk | 7932c4ae22e1d543fa14b03ba21e22a5dac65d32 | [
"MIT"
] | 8 | 2015-12-10T21:20:06.000Z | 2017-03-16T16:56:27.000Z | demos/flask_app/relayr_provider.py | interoberlin/Wunderbar-Python-SDK | 20d860a8de811da1bde2a67722703acb4f4499c9 | [
"MIT"
] | 1 | 2021-01-20T11:46:37.000Z | 2021-01-20T11:46:37.000Z | import json
import authomatic.core as core
from authomatic.providers.oauth2 import OAuth2, PROVIDER_ID_MAP
from relayr import Client
class Relayr(OAuth2):
"""
Relayr |oauth2| provider.
.. warning::
|no-csrf|
* Dashboard: https://developer.relayr.io
* Docs: https://developer.relayr.... | 27.884058 | 88 | 0.654886 |
f00cef4616b0e263066985eb70fb16e2d7c73982 | 2,069 | py | Python | fmp/yang_pb2.py | barryCrunch/cloudvision-python | bafb55a57743141ef419ce8b6f3adda31a18ca42 | [
"Apache-2.0"
] | 8 | 2020-10-22T13:19:00.000Z | 2021-12-16T02:16:47.000Z | fmp/yang_pb2.py | barryCrunch/cloudvision-python | bafb55a57743141ef419ce8b6f3adda31a18ca42 | [
"Apache-2.0"
] | 6 | 2020-12-16T11:31:03.000Z | 2021-11-19T10:00:37.000Z | fmp/yang_pb2.py | barryCrunch/cloudvision-python | bafb55a57743141ef419ce8b6f3adda31a18ca42 | [
"Apache-2.0"
] | 7 | 2020-12-04T01:30:34.000Z | 2021-11-11T21:40:12.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: fmp/yang.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protob... | 28.736111 | 153 | 0.757854 |
318a53285747d99ff8546ea8d86c75cd0f1cf01b | 369 | py | Python | fatf/accountability/__init__.py | So-Cool/fat-forensics | 6fa252a1d90fe543242ef030a5f8a3f9c9f692fe | [
"BSD-3-Clause"
] | 48 | 2019-09-12T04:54:48.000Z | 2022-02-27T01:49:55.000Z | fatf/accountability/__init__.py | So-Cool/fat-forensics | 6fa252a1d90fe543242ef030a5f8a3f9c9f692fe | [
"BSD-3-Clause"
] | 4 | 2019-11-04T00:01:15.000Z | 2021-01-27T16:35:29.000Z | fatf/accountability/__init__.py | So-Cool/fat-forensics | 6fa252a1d90fe543242ef030a5f8a3f9c9f692fe | [
"BSD-3-Clause"
] | 11 | 2019-09-17T13:39:43.000Z | 2021-07-27T11:04:33.000Z | """
The :mod:`fatf.accountability` module holds a range of accountability methods.
This module holds a variety of techniques that can be used to assess *privacy*,
*security* and *robustness* of artificial intelligence pipelines and the
machine learning process: *data*, *models* and *predictions*.
"""
# Author: Kacper ... | 36.9 | 79 | 0.758808 |
237208519482aeacac8d9a4d13b183703f2de4c8 | 4,648 | py | Python | tests/integration/tools/test_reset_tool.py | goncaloperes/bokeh | b857d2d17d7c19779bb0a7be2601d8238fb1d5e9 | [
"BSD-3-Clause"
] | 1 | 2021-04-09T02:57:29.000Z | 2021-04-09T02:57:29.000Z | tests/integration/tools/test_reset_tool.py | goncaloperes/bokeh | b857d2d17d7c19779bb0a7be2601d8238fb1d5e9 | [
"BSD-3-Clause"
] | 1 | 2021-03-01T14:04:56.000Z | 2021-03-01T14:04:56.000Z | tests/integration/tools/test_reset_tool.py | goncaloperes/bokeh | b857d2d17d7c19779bb0a7be2601d8238fb1d5e9 | [
"BSD-3-Clause"
] | null | null | null | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2021, Anaconda, Inc. All rights reserved.
#
# Powered by the Bokeh Development Team.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#---------------------------------------------------... | 33.927007 | 112 | 0.548193 |
133979c31edb16bbf8e9997bf500a0a88e144d57 | 855 | py | Python | blue/demo.py | matsuh/pws-handson3 | 67477b69ec7f58a5de4e29fd16a6a9ab3ce802e3 | [
"MIT"
] | null | null | null | blue/demo.py | matsuh/pws-handson3 | 67477b69ec7f58a5de4e29fd16a6a9ab3ce802e3 | [
"MIT"
] | null | null | null | blue/demo.py | matsuh/pws-handson3 | 67477b69ec7f58a5de4e29fd16a6a9ab3ce802e3 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import os
import uuid
import urlparse
import json
from flask import Flask
app = Flask(__name__)
port = int(os.getenv("PORT"))
myuuid = str(uuid.uuid1())
myinstance = str(os.getenv("CF_INSTANCE_INDEX", 0))
@app.route('/')
def main():
return """
<html>
<head>
<title> Pivotal Cloud F... | 21.923077 | 81 | 0.557895 |
e7d950d7578b6947b83d45133206eac7cdbb8c1c | 26,575 | py | Python | pyrayt/components.py | rfrazier716/PyRayT | f0511303ddc52ea02e0029b9ec80210e4764c432 | [
"MIT"
] | 20 | 2021-04-30T03:25:56.000Z | 2022-02-25T10:42:42.000Z | pyrayt/components.py | rfrazier716/PyRayT | f0511303ddc52ea02e0029b9ec80210e4764c432 | [
"MIT"
] | 3 | 2021-09-12T22:08:08.000Z | 2022-03-23T16:21:00.000Z | pyrayt/components.py | rfrazier716/PyRayT | f0511303ddc52ea02e0029b9ec80210e4764c432 | [
"MIT"
] | 3 | 2021-09-07T17:31:13.000Z | 2022-03-10T22:36:13.000Z | import abc
from functools import lru_cache
from functools import wraps
from typing import Union, Tuple
import numpy as np
import pyrayt
import pyrayt.materials as matl
from tinygfx import g3d as cg
def _lens(func):
"""
Decorator to add kwargs common to all lenses.
:param func:
:return:
"""
... | 40.082956 | 284 | 0.66969 |
707bee9a06421ab718ae73081d1ac94b0b68d4ed | 23,554 | py | Python | python/test/test_builder.py | EliotCao/xviz | 57429ba8f76a8bb7ac0889d021a12e22a52f8e7e | [
"Apache-2.0"
] | 26 | 2022-01-24T18:02:54.000Z | 2022-03-30T05:38:50.000Z | python/test/test_builder.py | EliotCao/xviz | 57429ba8f76a8bb7ac0889d021a12e22a52f8e7e | [
"Apache-2.0"
] | 14 | 2022-01-20T21:10:03.000Z | 2022-03-14T00:04:18.000Z | python/test/test_builder.py | assalmeftahi/xviz | b9f05ade77b1fe4f0fd478e6075e4f62456ec6a0 | [
"Apache-2.0"
] | 5 | 2022-02-07T07:11:32.000Z | 2022-03-30T02:49:13.000Z | import json
from easydict import EasyDict as edict
from xviz_avs.builder import XVIZBuilder, XVIZUIPrimitiveBuilder, XVIZTimeSeriesBuilder, XVIZVariableBuilder
import unittest
PRIMARY_POSE_STREAM = '/vehicle_pose'
DEFAULT_POSE = edict(
timestamp=1.0,
map_origin=edict(longitude=1.1, latitude=2.2, altitude=3.3),
... | 32.623269 | 108 | 0.369831 |
197a73d0fdab301ac93f96006492ec9deef3923b | 19,700 | py | Python | venv/lib/python2.7/site-packages/tensorflow/python/framework/function.py | sunlum/Deep-Semantic-Space-NST | 468ac2590385f48e65df12c1a3c9db0ed8d49477 | [
"MIT"
] | null | null | null | venv/lib/python2.7/site-packages/tensorflow/python/framework/function.py | sunlum/Deep-Semantic-Space-NST | 468ac2590385f48e65df12c1a3c9db0ed8d49477 | [
"MIT"
] | null | null | null | venv/lib/python2.7/site-packages/tensorflow/python/framework/function.py | sunlum/Deep-Semantic-Space-NST | 468ac2590385f48e65df12c1a3c9db0ed8d49477 | [
"MIT"
] | null | null | null | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 34.867257 | 80 | 0.684315 |
aac6856ff55baa90c15bd8d2625aba292729ff70 | 3,482 | py | Python | bindings/python/ensmallen/datasets/string/acidovoraxsproot217.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 5 | 2021-02-17T00:44:45.000Z | 2021-08-09T16:41:47.000Z | bindings/python/ensmallen/datasets/string/acidovoraxsproot217.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 18 | 2021-01-07T16:47:39.000Z | 2021-08-12T21:51:32.000Z | bindings/python/ensmallen/datasets/string/acidovoraxsproot217.py | AnacletoLAB/ensmallen | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 3 | 2021-01-14T02:20:59.000Z | 2021-08-04T19:09:52.000Z | """
This file offers the methods to automatically retrieve the graph Acidovorax sp. Root217.
The graph is automatically retrieved from the STRING repository.
References
---------------------
Please cite the following if you use the data:
```bib
@article{szklarczyk2019string,
title={STRING v11: protein--protein... | 33.161905 | 223 | 0.67691 |
a19cdd803f9c57008c3c88b42c6382e96bb56a93 | 2,352 | py | Python | ev3dev2simulator/robotpart/color_sensor.py | lechszym/cosc343_ev3dev2simulator | 03d00ba162f44f8d4ef74e4b0599b0b85e7a2248 | [
"MIT"
] | null | null | null | ev3dev2simulator/robotpart/color_sensor.py | lechszym/cosc343_ev3dev2simulator | 03d00ba162f44f8d4ef74e4b0599b0b85e7a2248 | [
"MIT"
] | null | null | null | ev3dev2simulator/robotpart/color_sensor.py | lechszym/cosc343_ev3dev2simulator | 03d00ba162f44f8d4ef74e4b0599b0b85e7a2248 | [
"MIT"
] | 1 | 2021-03-25T01:58:18.000Z | 2021-03-25T01:58:18.000Z | """
The color_sensor module contains the class ColorSensor class which represents an ev3dev light sensor.
"""
from ev3dev2simulator.config.config import get_simulation_settings
from ev3dev2simulator.robotpart.body_part import BodyPart
from ev3dev2simulator.util.dimensions import Dimensions
COLORS = dict()
COLORS[0] ... | 31.36 | 119 | 0.653912 |
5effc158f03c951bb75a2289ccfde305a23e8512 | 3,636 | py | Python | src/tools/git/mffr.py | jxjnjjn/chromium | 435c1d02fd1b99001dc9e1e831632c894523580d | [
"Apache-2.0"
] | 9 | 2018-09-21T05:36:12.000Z | 2021-11-15T15:14:36.000Z | tools/git/mffr.py | devasia1000/chromium | 919a8a666862fb866a6bb7aa7f3ae8c0442b4828 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | tools/git/mffr.py | devasia1000/chromium | 919a8a666862fb866a6bb7aa7f3ae8c0442b4828 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 3 | 2018-11-28T14:54:13.000Z | 2020-07-02T07:36:07.000Z | #!/usr/bin/env python
# Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Usage: mffr.py [-d] [-g *.h] [-g *.cc] REGEXP REPLACEMENT
This tool performs a fast find-and-replace operation on files in
the ... | 31.617391 | 75 | 0.65099 |
85a4e212c0a4425d436229632258e81b13499941 | 1,334 | py | Python | drawing_rectangle.py | kaanbykr/OpenCV_exercises | 7a94b7323803397116313f95f1e91c4cae565505 | [
"MIT"
] | null | null | null | drawing_rectangle.py | kaanbykr/OpenCV_exercises | 7a94b7323803397116313f95f1e91c4cae565505 | [
"MIT"
] | null | null | null | drawing_rectangle.py | kaanbykr/OpenCV_exercises | 7a94b7323803397116313f95f1e91c4cae565505 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Mar 5 20:32:58 2021
@author: Kaan Baykara
"""
import cv2 as cv
from matplotlib import pyplot as plt
def rescale_image(image, scale=0.50):
"""
With this function, you can resize your picture by specifying the scale factor.
If you do not en... | 21.868852 | 93 | 0.602699 |
74b2be300db949926a2d97f92a33dd583f166877 | 34,122 | py | Python | applications/popart/bert/bert_data/squad_utils.py | Splendon/examples | ed4a8a01857b6ddca49559141acf5d0986eb01e1 | [
"MIT"
] | 2 | 2020-04-07T23:46:17.000Z | 2021-12-05T10:29:34.000Z | applications/popart/bert/bert_data/squad_utils.py | Splendon/examples | ed4a8a01857b6ddca49559141acf5d0986eb01e1 | [
"MIT"
] | 5 | 2020-01-28T23:13:33.000Z | 2022-02-10T00:34:57.000Z | applications/popart/bert/bert_data/squad_utils.py | Splendon/examples | ed4a8a01857b6ddca49559141acf5d0986eb01e1 | [
"MIT"
] | 1 | 2020-04-07T23:46:29.000Z | 2020-04-07T23:46:29.000Z |
# coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, 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 License.
# You may obtain a co... | 41.918919 | 142 | 0.590587 |
73c192ae0e34516d5ca18ba6881902eb82a09220 | 976 | py | Python | isi_sdk_8_2_0/test/test_healthcheck_items_extended.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_2_0/test/test_healthcheck_items_extended.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_2_0/test/test_healthcheck_items_extended.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 7
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import isi_sdk_8_2_0
from i... | 23.804878 | 106 | 0.727459 |
ac0ff9e0f33b0cb202b93bb9fc6135a339f35d99 | 9,878 | py | Python | pypoa.py | Dukezo/PyPOA | 46e58f16ebf39788a39f8ee402f649d5a1dcfef9 | [
"MIT"
] | 1 | 2020-07-04T08:57:30.000Z | 2020-07-04T08:57:30.000Z | pypoa.py | Dukezo/PyPOA | 46e58f16ebf39788a39f8ee402f649d5a1dcfef9 | [
"MIT"
] | null | null | null | pypoa.py | Dukezo/PyPOA | 46e58f16ebf39788a39f8ee402f649d5a1dcfef9 | [
"MIT"
] | null | null | null | """
A module for performing the Padding Oracle Attack.
"""
import binascii
def encrypt(plaintext, block_size, oracle, verbose=True):
"""
Encrypts the plaintext using the oracle.
Parameters:
plaintext (str): The unpadded plaintext to encrypt.
block_size (int): The block size o... | 39.830645 | 147 | 0.593237 |
24e3105bc69c63e5dc1dac4c83154aafcd9e88dc | 7,317 | py | Python | final_project/process.py | Tiffanyzth/CSYE7370-Assignment | 5dea5438b52e7dad33f0cccd889437874715fa59 | [
"MIT"
] | null | null | null | final_project/process.py | Tiffanyzth/CSYE7370-Assignment | 5dea5438b52e7dad33f0cccd889437874715fa59 | [
"MIT"
] | null | null | null | final_project/process.py | Tiffanyzth/CSYE7370-Assignment | 5dea5438b52e7dad33f0cccd889437874715fa59 | [
"MIT"
] | null | null | null | import re
import os
import json
import opencc
import numpy as np
from config import Config
def _parseRawData(author=None, constrain=None, src='./data/tang/', category="poet.tang"):
"""
code from https://github.com/justdark/pytorch-poetry-gen/blob/master/dataHandler.py
处理json文件,返回诗歌内容
@param: author: ... | 34.677725 | 97 | 0.544212 |
d9c21d8c0d687af6d4565278067b037ef83ea453 | 24,671 | py | Python | src/scripts/learn_curve.py | NickleDave/compare-seg-models | dd98954509344abfe39ba676646c1ab374a9ff88 | [
"BSD-3-Clause"
] | null | null | null | src/scripts/learn_curve.py | NickleDave/compare-seg-models | dd98954509344abfe39ba676646c1ab374a9ff88 | [
"BSD-3-Clause"
] | null | null | null | src/scripts/learn_curve.py | NickleDave/compare-seg-models | dd98954509344abfe39ba676646c1ab374a9ff88 | [
"BSD-3-Clause"
] | null | null | null | import sys
import os
import shutil
import copy
import logging
import pickle
from datetime import datetime
from configparser import ConfigParser, NoOptionError
import tensorflow as tf
from tensorflow.python import debug as tf_debug
import numpy as np
import joblib
from seg_nets.graphs import get_full_gra... | 52.380042 | 119 | 0.522557 |
c5e0944df2ddcef9a4b4b050186effa3017c0a7c | 1,637 | py | Python | qiskit/converters/dag_to_dagdependency.py | ewinston/qiskit-sdk-py | 4d64125aba4ff31f15d0054b90437bcef352782e | [
"Apache-2.0"
] | null | null | null | qiskit/converters/dag_to_dagdependency.py | ewinston/qiskit-sdk-py | 4d64125aba4ff31f15d0054b90437bcef352782e | [
"Apache-2.0"
] | 2 | 2022-03-30T10:09:44.000Z | 2022-03-30T10:09:45.000Z | qiskit/converters/dag_to_dagdependency.py | ewinston/qiskit-sdk-py | 4d64125aba4ff31f15d0054b90437bcef352782e | [
"Apache-2.0"
] | null | null | null | # This code is part of Qiskit.
#
# (C) Copyright IBM 2020.
#
# 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 modifications or derivative wo... | 30.886792 | 82 | 0.721442 |
70c996e52b15977d3f42c549c38522fd9f524930 | 621 | py | Python | lintly/backends/dummy.py | spockNinja/Lintly | b31386514140ccfa42648865557f867ce8d2fed4 | [
"MIT"
] | null | null | null | lintly/backends/dummy.py | spockNinja/Lintly | b31386514140ccfa42648865557f867ce8d2fed4 | [
"MIT"
] | null | null | null | lintly/backends/dummy.py | spockNinja/Lintly | b31386514140ccfa42648865557f867ce8d2fed4 | [
"MIT"
] | null | null | null | from .base import BaseGitBackend
class DummyGitBackend(BaseGitBackend):
"""
A Git backend class that returns dummy data for all of the abstract methods.
"""
supports_pr_reviews = False
def get_pull_request(self, pr):
pass
def create_pull_request_comment(self, pr, comment):
p... | 22.178571 | 80 | 0.68438 |
36311f6676cbdf7aa0dd6eb655f6ac5b79736bc8 | 1,030 | py | Python | personal-python/stat_correlation.py | PhilMcDaniel/rocket-league-stats | de61cbdfc269ecac62265541add311ebf26b3f1c | [
"MIT"
] | 1 | 2021-02-13T19:37:53.000Z | 2021-02-13T19:37:53.000Z | personal-python/stat_correlation.py | PhilMcDaniel/rocket-league-stats | de61cbdfc269ecac62265541add311ebf26b3f1c | [
"MIT"
] | 3 | 2021-04-19T17:13:16.000Z | 2022-03-12T00:58:46.000Z | personal-python/stat_correlation.py | PhilMcDaniel/rocket-league-stats | de61cbdfc269ecac62265541add311ebf26b3f1c | [
"MIT"
] | null | null | null | import pandas as pd
import seaborn as sn
import matplotlib.pyplot as plt
#read csv source file
all_player_stats = pd.read_csv("MNCS/MNCS_S3_PlayerRatingData.csv", sep=',')
#change data type to numeric so correlation works
all_player_stats['Game Win %'] = all_player_stats['Game Win %'].str.replace('%','').astype(float)... | 36.785714 | 97 | 0.799029 |
52049323a5063aacf819065c8b6962e53eab5045 | 231 | py | Python | zhangqi/20180402/2.py | python20180319howmework/homework | c826d7aa4c52f8d22f739feb134d20f0b2c217cd | [
"Apache-2.0"
] | null | null | null | zhangqi/20180402/2.py | python20180319howmework/homework | c826d7aa4c52f8d22f739feb134d20f0b2c217cd | [
"Apache-2.0"
] | null | null | null | zhangqi/20180402/2.py | python20180319howmework/homework | c826d7aa4c52f8d22f739feb134d20f0b2c217cd | [
"Apache-2.0"
] | null | null | null | #2. d = {"name":"python", “age”:18, “fun”:"all"},生成一个列表["name=python", “age=18”, “fun=all”]
d = {"name":"python", "age":18, "fun":"all"}
l = []
for key, value in d.items():
l.append(str(key) + "=" + str(value))
print(l)
| 14.4375 | 92 | 0.515152 |
38a3830d4a3eabb70007577b933f9cc41a8a818b | 366 | py | Python | cowcv/cowparse/facefind.py | hbldh/cowcv | bfb04d836a774f6639acb6d2f6cb89ed33e1caf2 | [
"MIT"
] | null | null | null | cowcv/cowparse/facefind.py | hbldh/cowcv | bfb04d836a774f6639acb6d2f6cb89ed33e1caf2 | [
"MIT"
] | null | null | null | cowcv/cowparse/facefind.py | hbldh/cowcv | bfb04d836a774f6639acb6d2f6cb89ed33e1caf2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
facefind
-----------
:copyright: 2016-09-27 by hbldh <henrik.blidh@nedomkull.com>
"""
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import absolute_import
import cv2
def find_cowface(im... | 18.3 | 60 | 0.721311 |
69f8a79a01d84fbe904f183ba5cb5a18827a2b05 | 1,586 | py | Python | vgg/model/layers/VGGBlock.py | tallamjr/dnn | b1a8555d610a80b2c5356b1ae0e5ecf9bc5eea7c | [
"MIT"
] | 1 | 2021-05-01T19:33:57.000Z | 2021-05-01T19:33:57.000Z | vgg/model/layers/VGGBlock.py | tallamjr/dnn | b1a8555d610a80b2c5356b1ae0e5ecf9bc5eea7c | [
"MIT"
] | null | null | null | vgg/model/layers/VGGBlock.py | tallamjr/dnn | b1a8555d610a80b2c5356b1ae0e5ecf9bc5eea7c | [
"MIT"
] | null | null | null | import tensorflow as tf
class Block(tf.keras.Model):
def __init__(self, filters, kernel_size, repetitions, pool_size=2, strides=2):
super(Block, self).__init__()
self.filters = filters
self.kernel_size = kernel_size
self.repetitions = repetitions
# Define a conv2D_0, conv2... | 35.244444 | 112 | 0.621059 |
15e11ccd94a86d3a33255eb8ff9e523d98dfb75f | 688 | py | Python | 02. Conditional Statements/P13 World Swimming Record.py | KrisBestTech/Python-Basics | 10bd961bf16d15ddb94bbea53327b4fc5bfdba4c | [
"MIT"
] | null | null | null | 02. Conditional Statements/P13 World Swimming Record.py | KrisBestTech/Python-Basics | 10bd961bf16d15ddb94bbea53327b4fc5bfdba4c | [
"MIT"
] | null | null | null | 02. Conditional Statements/P13 World Swimming Record.py | KrisBestTech/Python-Basics | 10bd961bf16d15ddb94bbea53327b4fc5bfdba4c | [
"MIT"
] | null | null | null | import math
record_in_seconds = float(input())
pool_length = float(input())
time_for_swimming_one_meter = float(input())
water_resistance_time = pool_length // 15 * 12.5
time_without_water_resistance = pool_length * time_for_swimming_one_meter
total_time = water_resistance_time + time_without_water_resistance
exceede... | 36.210526 | 82 | 0.795058 |
3bafc02e947af28ce841f7580c6157794c057bf1 | 2,191 | py | Python | pyasn1_alt_modules/rfc4476.py | russhousley/pyasn1-modules | d1ac91975c1d67e8a2b79b6a2a34ae62754bbaa8 | [
"BSD-2-Clause"
] | null | null | null | pyasn1_alt_modules/rfc4476.py | russhousley/pyasn1-modules | d1ac91975c1d67e8a2b79b6a2a34ae62754bbaa8 | [
"BSD-2-Clause"
] | null | null | null | pyasn1_alt_modules/rfc4476.py | russhousley/pyasn1-modules | d1ac91975c1d67e8a2b79b6a2a34ae62754bbaa8 | [
"BSD-2-Clause"
] | null | null | null | #
# This file is part of pyasn1-alt-modules software.
#
# Created by Russ Housley with assistance from asn1ate v.0.6.0.
# Modified by Russ Housley to include the opentypemap manager.
#
# Copyright (c) 2019-2021, Vigil Security, LLC
# License: http://vigilsec.com/pyasn1-alt-modules-license.txt
#
# Attribute Certificate ... | 21.91 | 73 | 0.768142 |
6a4886dc247a468faa00711d7ddef02a9f0a4152 | 10,264 | py | Python | example_workflows/coalice_experiment/feature_detection.py | aubartlett/TomoEncoders | f6c32f3cb2742b24417b71514ad33f808de25f1c | [
"BSD-3-Clause"
] | null | null | null | example_workflows/coalice_experiment/feature_detection.py | aubartlett/TomoEncoders | f6c32f3cb2742b24417b71514ad33f808de25f1c | [
"BSD-3-Clause"
] | null | null | null | example_workflows/coalice_experiment/feature_detection.py | aubartlett/TomoEncoders | f6c32f3cb2742b24417b71514ad33f808de25f1c | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
class implementations for real-time 3D feature extraction
"""
import pandas as pd
import os
import glob
import numpy as np
# from skimage.feature import match_template
# from tomopy import normalize, minus_log, angles, recon, circ_mask
# from scipy.ndimage.filters... | 37.59707 | 174 | 0.552221 |
e13d9ad5131d6928bf32c9c1d6aed1cc1d222ef7 | 2,127 | py | Python | intelligence/anthill/src/util/ES_Client.py | FoxComm/highlander | 1aaf8f9e5353b94c34d574c2a92206a1c363b5be | [
"MIT"
] | 10 | 2018-04-12T22:29:52.000Z | 2021-10-18T17:07:45.000Z | intelligence/anthill/src/util/ES_Client.py | FoxComm/highlander | 1aaf8f9e5353b94c34d574c2a92206a1c363b5be | [
"MIT"
] | null | null | null | intelligence/anthill/src/util/ES_Client.py | FoxComm/highlander | 1aaf8f9e5353b94c34d574c2a92206a1c363b5be | [
"MIT"
] | 1 | 2018-07-06T18:42:05.000Z | 2018-07-06T18:42:05.000Z | import json
import http.client
def products_list_query(prod_ids):
"""products_list_query
elasticsearch query string to get full products from
a list of product ids
"""
return json.dumps({
'query': {
'bool': {
'filter':[
{'term': {'context': 'd... | 27.986842 | 71 | 0.562764 |
b139f9c742abe2472c0c7e448594505fd420e03e | 2,827 | py | Python | amfe/forces.py | sivasanarul/amfe_topopt | ba7fa1ce756e7ea6e4fd7b2bdb609b83bbfac472 | [
"BSD-3-Clause"
] | null | null | null | amfe/forces.py | sivasanarul/amfe_topopt | ba7fa1ce756e7ea6e4fd7b2bdb609b83bbfac472 | [
"BSD-3-Clause"
] | null | null | null | amfe/forces.py | sivasanarul/amfe_topopt | ba7fa1ce756e7ea6e4fd7b2bdb609b83bbfac472 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2018, Lehrstuhl für Angewandte Mechanik, Technische Universität München.
#
# Distributed under BSD-3-Clause License. See LICENSE-File for more information
#
"""
Forces module of AMfe.
In this module you can find some examples for force-functions. You can apply them to your model as Neumann-conditions.... | 20.049645 | 118 | 0.518925 |
017ea3e123de7e28df3e412a72037b6db3a664f2 | 2,345 | py | Python | python/util/file_object_adapter.py | taymonbeal/tink | aedd6d6bbe8dc93cba0c501f8608ba6d84162d0b | [
"Apache-2.0"
] | 1 | 2020-02-20T17:42:08.000Z | 2020-02-20T17:42:08.000Z | python/util/file_object_adapter.py | taymonbeal/tink | aedd6d6bbe8dc93cba0c501f8608ba6d84162d0b | [
"Apache-2.0"
] | null | null | null | python/util/file_object_adapter.py | taymonbeal/tink | aedd6d6bbe8dc93cba0c501f8608ba6d84162d0b | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 32.123288 | 80 | 0.722388 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.