hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | 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 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | 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 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
675c672977a46ec740f1a913b376d847b4aabb59 | 4,212 | py | Python | examples/turbulent_condensate/run.py | chrisjbillington/parpde | 4f882cbbb9ad6c57814e4422e9ba063fa27886a0 | [
"BSD-2-Clause"
] | null | null | null | examples/turbulent_condensate/run.py | chrisjbillington/parpde | 4f882cbbb9ad6c57814e4422e9ba063fa27886a0 | [
"BSD-2-Clause"
] | null | null | null | examples/turbulent_condensate/run.py | chrisjbillington/parpde | 4f882cbbb9ad6c57814e4422e9ba063fa27886a0 | [
"BSD-2-Clause"
] | null | null | null | # An example of a turbulent BEC in a harmonic trap. The groundstate is found
# and then some vortices randomly printed about with a phase printing. Some
# evolution in imaginary time is then performed to smooth things out before
# evolving the BEC in time.
# Run with 'mpirun -n <N CPUs> python run_example.py'
from __... | 39.364486 | 116 | 0.626068 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,514 | 0.359449 |
675c80c6427e7f597a41119f9db761e49256c6ca | 3,918 | py | Python | src/Test_Sfepy_NavierStokes.py | somu15/Small_Pf_code | 35f3d28faab2aa80f2332499f5e7ab19b040eabe | [
"MIT"
] | null | null | null | src/Test_Sfepy_NavierStokes.py | somu15/Small_Pf_code | 35f3d28faab2aa80f2332499f5e7ab19b040eabe | [
"MIT"
] | null | null | null | src/Test_Sfepy_NavierStokes.py | somu15/Small_Pf_code | 35f3d28faab2aa80f2332499f5e7ab19b040eabe | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Dec 28 09:33:53 2020
@author: dhulls
"""
from __future__ import print_function
from __future__ import absolute_import
from argparse import ArgumentParser
import numpy as nm
import sys
sys.path.append('.')
from sfepy.base.base import IndexedStruct, St... | 41.242105 | 234 | 0.70342 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 840 | 0.214395 |
675d0fb6b3b1a21973d25abe79cafce5b94844f8 | 4,063 | py | Python | nd_customization/api/lab_test.py | libermatic/nd_customization | 4ee14c661651b09ef16aaf64952ceedc67bb602d | [
"MIT"
] | null | null | null | nd_customization/api/lab_test.py | libermatic/nd_customization | 4ee14c661651b09ef16aaf64952ceedc67bb602d | [
"MIT"
] | 10 | 2018-11-12T21:53:56.000Z | 2019-04-27T06:24:13.000Z | nd_customization/api/lab_test.py | libermatic/nd_customization | 4ee14c661651b09ef16aaf64952ceedc67bb602d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import frappe
import json
from frappe.utils import now, cint
from functools import partial
from toolz import compose
@frappe.whitelist()
def deliver_result(lab_test, revert=0, delivery_time=None):
doc = frappe.get_doc("Lab Test", lab_test)
if doc... | 36.603604 | 87 | 0.628846 | 0 | 0 | 0 | 0 | 1,614 | 0.397243 | 0 | 0 | 496 | 0.122077 |
675e10e80e4d185d1bb67fc4f8ca4f7d8148f472 | 2,283 | py | Python | build-flask-app.py | Abdur-rahmaanJ/build-flask-app | 476d1f0e0c505a60acadde13397b2787f49bd7dc | [
"MIT"
] | 1 | 2020-02-24T04:09:25.000Z | 2020-02-24T04:09:25.000Z | build-flask-app.py | Abdur-rahmaanJ/build-flask-app | 476d1f0e0c505a60acadde13397b2787f49bd7dc | [
"MIT"
] | null | null | null | build-flask-app.py | Abdur-rahmaanJ/build-flask-app | 476d1f0e0c505a60acadde13397b2787f49bd7dc | [
"MIT"
] | 1 | 2020-07-15T05:03:18.000Z | 2020-07-15T05:03:18.000Z | #!/usr/bin/env python3
from scripts.workflow import get_app_name, is_name_valid
from scripts.workflow import get_args, is_args_valid
from scripts.workflow import create_dir, create_app, create_templates_folder, create_static_folder, create_dockerfile
from scripts.manual import print_manual
from scripts.messages import... | 31.708333 | 117 | 0.616732 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 706 | 0.309242 |
675e7374895c08103fdfc9d9f90f2f45da303fe7 | 2,960 | py | Python | stacker/assembler.py | unrahul/stacker | f94e9e6ad9351fd8fa94bef4ae0c4ed0afc8305d | [
"Apache-2.0"
] | null | null | null | stacker/assembler.py | unrahul/stacker | f94e9e6ad9351fd8fa94bef4ae0c4ed0afc8305d | [
"Apache-2.0"
] | 11 | 2020-01-23T16:45:07.000Z | 2020-02-08T16:53:22.000Z | stacker/assembler.py | unrahul/stacker | f94e9e6ad9351fd8fa94bef4ae0c4ed0afc8305d | [
"Apache-2.0"
] | 2 | 2020-01-29T18:18:20.000Z | 2020-01-29T19:55:25.000Z | import os
from pathlib import Path
from jinja2 import Template
import parser
from utils import write_to_file
from utils import mkdir_p
parser.init()
# parse and assign to vars
spec = parser.spec
def _concat(slice: str) -> str:
"""helper to concatenate each template slice."""
return "{}\n".format(slice)
... | 33.636364 | 82 | 0.65777 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 805 | 0.271959 |
675e9236debc2ccf610756e1ddfa6942ba31102c | 621 | py | Python | akshare/fx/cons.py | PKUuu/akshare | 03967312b6c8afdec32e081fb23ae5916b674936 | [
"MIT"
] | 1 | 2020-05-14T13:20:48.000Z | 2020-05-14T13:20:48.000Z | akshare/fx/cons.py | 13767849/akshare | 5b7e4daaa80b1ccaf3f5a980a1205848e2e8570d | [
"MIT"
] | null | null | null | akshare/fx/cons.py | 13767849/akshare | 5b7e4daaa80b1ccaf3f5a980a1205848e2e8570d | [
"MIT"
] | 2 | 2020-09-23T08:50:14.000Z | 2020-09-28T09:57:07.000Z | # -*- coding:utf-8 -*-
# /usr/bin/env python
"""
Author: Albert King
date: 2019/10/20 10:58
contact: [email protected]
desc: 外汇配置文件
"""
# headers
SHORT_HEADERS = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.91 Safari/537.36'
}
# url
FX_SPOT_URL ... | 29.571429 | 134 | 0.698873 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 527 | 0.832543 |
675ffb2c535d8805575601fc596c61d52191a22a | 1,283 | py | Python | entropylab/tests/test_issue_204.py | qguyk/entropy | e43077026c83fe84de022cf8636b2c9d42f1d330 | [
"BSD-3-Clause"
] | null | null | null | entropylab/tests/test_issue_204.py | qguyk/entropy | e43077026c83fe84de022cf8636b2c9d42f1d330 | [
"BSD-3-Clause"
] | null | null | null | entropylab/tests/test_issue_204.py | qguyk/entropy | e43077026c83fe84de022cf8636b2c9d42f1d330 | [
"BSD-3-Clause"
] | 1 | 2022-03-29T11:47:31.000Z | 2022-03-29T11:47:31.000Z | import os
from datetime import datetime
import pytest
from entropylab import ExperimentResources, SqlAlchemyDB, PyNode, Graph
@pytest.mark.skipif(
datetime.utcnow() > datetime(2022, 6, 25),
reason="Please remove after two months have passed since the fix was merged",
)
def test_issue_204(initialized_project... | 26.729167 | 85 | 0.681216 | 0 | 0 | 0 | 0 | 1,152 | 0.897896 | 0 | 0 | 346 | 0.26968 |
67607806f4f757a440672ca409795cb6fc24a8c8 | 97 | py | Python | src/__init__.py | PY-GZKY/fconversion | f1da069ac258444c8a6b2a5fe77d0e1295a0d4e4 | [
"Apache-2.0"
] | 1 | 2022-02-11T09:39:08.000Z | 2022-02-11T09:39:08.000Z | src/__init__.py | PY-GZKY/fconversion | f1da069ac258444c8a6b2a5fe77d0e1295a0d4e4 | [
"Apache-2.0"
] | null | null | null | src/__init__.py | PY-GZKY/fconversion | f1da069ac258444c8a6b2a5fe77d0e1295a0d4e4 | [
"Apache-2.0"
] | null | null | null | from .file_core import FileEngine
from src.utils.utils import *
from .version import __version__
| 24.25 | 33 | 0.824742 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
676261a506ad81b93b8c0f929316b27e9a10621d | 169 | py | Python | app/app/calc.py | benning55/recipe-app-api | a63366c7bb576fefbc755fe873731d2edf3e74d2 | [
"MIT"
] | null | null | null | app/app/calc.py | benning55/recipe-app-api | a63366c7bb576fefbc755fe873731d2edf3e74d2 | [
"MIT"
] | null | null | null | app/app/calc.py | benning55/recipe-app-api | a63366c7bb576fefbc755fe873731d2edf3e74d2 | [
"MIT"
] | null | null | null | #
# def add(x, y):
# """
# Add Number Together
# """
# return x+y
#
#
# def subtract(x, y):
# """
# Subtract x from y
# """
# return x-y
| 12.071429 | 25 | 0.402367 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 156 | 0.923077 |
676411e3c65abd02fa317570d558db02833381e4 | 7,673 | py | Python | open_anafi/lib/indicator_tools.py | Cour-des-comptes/open-anafi-backend | 1d3ebcfe7b46315e91618f540ef1c95b4e20d9af | [
"MIT"
] | 7 | 2020-01-10T09:34:52.000Z | 2020-01-27T13:51:12.000Z | open_anafi/lib/indicator_tools.py | Cour-des-comptes/open-anafi-backend | 1d3ebcfe7b46315e91618f540ef1c95b4e20d9af | [
"MIT"
] | 6 | 2020-01-26T20:38:07.000Z | 2022-02-10T12:12:53.000Z | open_anafi/lib/indicator_tools.py | Cour-des-comptes/open-anafi-backend | 1d3ebcfe7b46315e91618f540ef1c95b4e20d9af | [
"MIT"
] | 4 | 2020-01-27T16:44:31.000Z | 2021-02-11T16:52:26.000Z | from open_anafi.models import Indicator, IndicatorParameter, IndicatorLibelle
from open_anafi.serializers import IndicatorSerializer
from .frame_tools import FrameTools
from open_anafi.lib import parsing_tools
from open_anafi.lib.ply.parsing_classes import Indic
import re
from django.db import transaction
from django.c... | 37.985149 | 129 | 0.639776 | 7,309 | 0.952065 | 0 | 0 | 7,177 | 0.93487 | 0 | 0 | 2,360 | 0.307412 |
67656a05cc2aa8785f99e903c16b411d139ad81d | 3,576 | py | Python | src/python/commands/LikeImpl.py | plewis/phycas | 9f5a4d9b2342dab907d14a46eb91f92ad80a5605 | [
"MIT"
] | 3 | 2015-09-24T23:12:57.000Z | 2021-04-12T07:07:01.000Z | src/python/commands/LikeImpl.py | plewis/phycas | 9f5a4d9b2342dab907d14a46eb91f92ad80a5605 | [
"MIT"
] | null | null | null | src/python/commands/LikeImpl.py | plewis/phycas | 9f5a4d9b2342dab907d14a46eb91f92ad80a5605 | [
"MIT"
] | 1 | 2015-11-23T10:35:43.000Z | 2015-11-23T10:35:43.000Z | import os,sys,math,random
from phycas import *
from MCMCManager import LikelihoodCore
from phycas.utilities.PhycasCommand import *
from phycas.readnexus import NexusReader
from phycas.utilities.CommonFunctions import CommonFunctions
class LikeImpl(CommonFunctions):
#---+----|----+----|----+----|----+----|----+----... | 39.733333 | 131 | 0.576622 | 3,341 | 0.934284 | 0 | 0 | 0 | 0 | 0 | 0 | 837 | 0.23406 |
67659e478a5e5c7c61b17fe40c449153891a0e5c | 291 | py | Python | app/models.py | dangger/awesome-flask-todo | 8eb2ec5357a028a76015035940d6f7844623ff98 | [
"MIT"
] | null | null | null | app/models.py | dangger/awesome-flask-todo | 8eb2ec5357a028a76015035940d6f7844623ff98 | [
"MIT"
] | null | null | null | app/models.py | dangger/awesome-flask-todo | 8eb2ec5357a028a76015035940d6f7844623ff98 | [
"MIT"
] | null | null | null | from app import db
import datetime
from flask_mongoengine.wtf import model_form
class Todo(db.Document):
content = db.StringField(required=True, max_length=20)
time = db.DateTimeField(default=datetime.datetime.now())
status = db.IntField(default=0)
TodoForm = model_form(Todo)
| 26.454545 | 60 | 0.766323 | 180 | 0.618557 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6767a8053401b419268988cde796fcad2ed726b3 | 157 | py | Python | Python/Mundo01/teste/teste2.py | eStev4m/CursoPython | 8b52a618e67c80d66518ef91c1d4596a2bfddc22 | [
"MIT"
] | null | null | null | Python/Mundo01/teste/teste2.py | eStev4m/CursoPython | 8b52a618e67c80d66518ef91c1d4596a2bfddc22 | [
"MIT"
] | null | null | null | Python/Mundo01/teste/teste2.py | eStev4m/CursoPython | 8b52a618e67c80d66518ef91c1d4596a2bfddc22 | [
"MIT"
] | null | null | null | dia = int(input('Dia = '))
mes = str(input('Mês = '))
ano = int(input('Ano = '))
print('Você nasceu no dia {} de {} de {}. Correto?' .format(dia, mes, ano))
| 31.4 | 75 | 0.56051 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 71 | 0.446541 |
6767ec882d17e62fa49469a5e7630e14c022c42d | 16,089 | py | Python | firebirdsql/services.py | dand-oss/pyfirebirdsql | 1b8148f8937929cdd74774fef2611dd55ea6a757 | [
"BSD-2-Clause"
] | 31 | 2015-03-28T09:43:53.000Z | 2022-02-27T18:20:06.000Z | firebirdsql/services.py | dand-oss/pyfirebirdsql | 1b8148f8937929cdd74774fef2611dd55ea6a757 | [
"BSD-2-Clause"
] | 24 | 2015-01-16T03:00:33.000Z | 2022-02-08T00:06:05.000Z | firebirdsql/services.py | dand-oss/pyfirebirdsql | 1b8148f8937929cdd74774fef2611dd55ea6a757 | [
"BSD-2-Clause"
] | 21 | 2015-01-15T23:00:26.000Z | 2020-11-04T08:30:13.000Z | ##############################################################################
# Copyright (c) 2009-2021, Hajime Nakagami<[email protected]>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * ... | 38.675481 | 85 | 0.604139 | 14,306 | 0.889179 | 0 | 0 | 0 | 0 | 0 | 0 | 1,576 | 0.097955 |
6768a012fa3b71acafcce223de6b3ec16122e616 | 763 | py | Python | source/utils/converters.py | GoBoopADog/maelstrom | fce79fa964578dfee5d7beb4ec440deec5f8f25d | [
"MIT"
] | 2 | 2021-03-02T15:37:01.000Z | 2021-04-21T10:45:32.000Z | source/utils/converters.py | GoBoopADog/maelstrom | fce79fa964578dfee5d7beb4ec440deec5f8f25d | [
"MIT"
] | 1 | 2021-02-28T20:26:04.000Z | 2021-03-01T17:55:55.000Z | source/utils/converters.py | GoBoopADog/maelstrom | fce79fa964578dfee5d7beb4ec440deec5f8f25d | [
"MIT"
] | 4 | 2021-02-28T04:08:03.000Z | 2021-09-05T17:16:44.000Z | from discord.ext import commands
from typing import Union
from types import ModuleType
from .context import Context
class SourceConverter(commands.Converter):
"""A Converter that converts a string to a Command, Cog or Extension."""
async def convert(
self, ctx: Context, argument: str
) -> Union[... | 30.52 | 77 | 0.655308 | 643 | 0.842726 | 0 | 0 | 0 | 0 | 518 | 0.678899 | 119 | 0.155963 |
6769164b195db417c53c603f5e118948e48af7f8 | 8,230 | py | Python | credstuffer/db/creator.py | bierschi/credstuffer | 1a37aef30654028885d0d2caa456f38f58af4def | [
"MIT"
] | null | null | null | credstuffer/db/creator.py | bierschi/credstuffer | 1a37aef30654028885d0d2caa456f38f58af4def | [
"MIT"
] | null | null | null | credstuffer/db/creator.py | bierschi/credstuffer | 1a37aef30654028885d0d2caa456f38f58af4def | [
"MIT"
] | 1 | 2020-10-05T12:10:32.000Z | 2020-10-05T12:10:32.000Z | import logging
from credstuffer.db.connector import DBConnector
from credstuffer.exceptions import DBCreatorError
class Database:
""" class Database to build a sql string for Database creation
USAGE:
Database(name="web")
"""
def __init__(self, name):
self.logger = logging.getLogg... | 31.776062 | 116 | 0.615188 | 8,100 | 0.984204 | 0 | 0 | 0 | 0 | 0 | 0 | 2,872 | 0.348967 |
67692e8a3e167b8004f399714ed1c11e30cf9ebb | 897 | py | Python | src/poetry/core/masonry/builder.py | DavidVujic/poetry-core | d7b5572aabc762f138e4d15f461f13a28c8258d6 | [
"MIT"
] | null | null | null | src/poetry/core/masonry/builder.py | DavidVujic/poetry-core | d7b5572aabc762f138e4d15f461f13a28c8258d6 | [
"MIT"
] | null | null | null | src/poetry/core/masonry/builder.py | DavidVujic/poetry-core | d7b5572aabc762f138e4d15f461f13a28c8258d6 | [
"MIT"
] | null | null | null | from __future__ import annotations
from pathlib import Path
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from poetry.core.poetry import Poetry
class Builder:
def __init__(self, poetry: Poetry) -> None:
from poetry.core.masonry.builders.sdist import SdistBuilder
from poetry.core.masonr... | 27.181818 | 76 | 0.630992 | 738 | 0.822742 | 0 | 0 | 0 | 0 | 0 | 0 | 43 | 0.047938 |
676b193319b9f06972fcafcb462e36e367c9d59d | 659 | py | Python | migrations/versions/429d596c43a7_users_country.py | bilginfurkan/Anonimce | 7d73c13ae8d5c873b6863878370ad83ec9ee5acc | [
"Apache-2.0"
] | 2 | 2021-02-15T12:56:58.000Z | 2021-02-21T12:38:47.000Z | migrations/versions/429d596c43a7_users_country.py | bilginfurkan/Anonimce | 7d73c13ae8d5c873b6863878370ad83ec9ee5acc | [
"Apache-2.0"
] | null | null | null | migrations/versions/429d596c43a7_users_country.py | bilginfurkan/Anonimce | 7d73c13ae8d5c873b6863878370ad83ec9ee5acc | [
"Apache-2.0"
] | null | null | null | """users.country
Revision ID: 429d596c43a7
Revises: 77e0c0edaa04
Create Date: 2020-10-23 21:26:55.598146
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '429d596c43a7'
down_revision = '77e0c0edaa04'
branch_labels = None
depends_on = None
def upgrade():
# ... | 22.724138 | 84 | 0.691958 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 392 | 0.594841 |
676bce0736ccad204cb3cef87d200632b75f487f | 4,535 | py | Python | tweet_processor.py | cristynhoward/connectfour | a6727cbe47696a0a3dd278a3929d81dc6e158999 | [
"MIT"
] | 1 | 2018-06-28T09:45:59.000Z | 2018-06-28T09:45:59.000Z | tweet_processor.py | cristynhoward/connectfour | a6727cbe47696a0a3dd278a3929d81dc6e158999 | [
"MIT"
] | null | null | null | tweet_processor.py | cristynhoward/connectfour | a6727cbe47696a0a3dd278a3929d81dc6e158999 | [
"MIT"
] | null | null | null | """ Module for processing mentions of the bot via the Twitter API.
"""
from ConnectFourGame import *
from databasehelpers import *
from helpers import *
from minimax import *
def process_mentions():
""" Scan through recent mentions and send them to be processed.
"""
api = get_twitter_api()
first = Tru... | 39.780702 | 114 | 0.613892 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,521 | 0.335391 |
676c11480ace0b3ea4cda5237879a07a2c1fe362 | 3,448 | py | Python | code/seasonality.py | geangohn/RecSys | f53d0322fed414caa820cebf23bef5a0a9237517 | [
"MIT"
] | 2 | 2019-07-22T09:42:25.000Z | 2021-03-31T09:29:29.000Z | code/seasonality.py | geangohn/RecSys | f53d0322fed414caa820cebf23bef5a0a9237517 | [
"MIT"
] | null | null | null | code/seasonality.py | geangohn/RecSys | f53d0322fed414caa820cebf23bef5a0a9237517 | [
"MIT"
] | null | null | null | import pandas as pd
def get_seasonality_weekly(bills, date_column='dates', group_column='level_4_name',
regular_only=False, promo_fact_column=None):
bills['week'] = pd.to_datetime(bills[date_column]).dt.week
bills['year'] = pd.to_datetime(bills[date_column]).dt.year
# - Группиру... | 74.956522 | 120 | 0.690255 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,967 | 0.482108 |
676d15fe9000290c81a06864a2972f44722d480f | 1,729 | py | Python | discord_api/applications.py | tuna2134/discord-api.py | 0e5e9f469d852f81e6fc0b561c54a78ea6fe8fcb | [
"MIT"
] | 10 | 2021-11-30T06:22:20.000Z | 2021-12-16T00:36:14.000Z | discord_api/applications.py | tuna2134/discord-api.py | 0e5e9f469d852f81e6fc0b561c54a78ea6fe8fcb | [
"MIT"
] | 5 | 2021-12-03T10:21:15.000Z | 2022-01-18T11:08:48.000Z | discord_api/applications.py | tuna2134/discord-api.py | 0e5e9f469d852f81e6fc0b561c54a78ea6fe8fcb | [
"MIT"
] | 3 | 2021-12-10T08:34:28.000Z | 2022-01-21T11:59:46.000Z | from .command import Command, ApiCommand
class Application:
def __init__(self, client):
self.client = client
self.http = client.http
self.__commands = []
async def fetch_commands(self) -> List[ApiCommand]:
"""
This can fetch discord application commands from dis... | 28.816667 | 72 | 0.520532 | 1,686 | 0.97513 | 0 | 0 | 0 | 0 | 947 | 0.547715 | 534 | 0.308849 |
676d466a108d99b100b2c3a5a8c5c61b4428733b | 280 | py | Python | SinglePackage/tests/test_single.py | CJosephides/PythonApplicationStructures | b82385f7a35f3097eac08011d24d9d1429cee171 | [
"RSA-MD"
] | 1 | 2019-02-05T11:45:11.000Z | 2019-02-05T11:45:11.000Z | SinglePackage/tests/test_single.py | CJosephides/PythonApplicationStructures | b82385f7a35f3097eac08011d24d9d1429cee171 | [
"RSA-MD"
] | null | null | null | SinglePackage/tests/test_single.py | CJosephides/PythonApplicationStructures | b82385f7a35f3097eac08011d24d9d1429cee171 | [
"RSA-MD"
] | null | null | null | from unittest import TestCase, main
from single_package.single import Single
class SingleTests(TestCase):
def setUp(self):
self.single = Single()
def test_Single(self):
self.assertIsInstance(self.single, Single)
if __name__ == "__main__":
main()
| 17.5 | 50 | 0.692857 | 160 | 0.571429 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.035714 |
676d7655b19bd0498b46ef17e54ab70538bcef0d | 1,563 | py | Python | tests/spot/sub_account/test_sub_account_deposit_address.py | Banging12/binance-connector-python | dc6fbbd0bb64fb08d73ad8b31e0b81d776efa30b | [
"MIT"
] | 512 | 2021-06-15T08:52:44.000Z | 2022-03-31T09:49:53.000Z | tests/spot/sub_account/test_sub_account_deposit_address.py | Banging12/binance-connector-python | dc6fbbd0bb64fb08d73ad8b31e0b81d776efa30b | [
"MIT"
] | 75 | 2021-06-20T13:49:50.000Z | 2022-03-30T02:45:31.000Z | tests/spot/sub_account/test_sub_account_deposit_address.py | Banging12/binance-connector-python | dc6fbbd0bb64fb08d73ad8b31e0b81d776efa30b | [
"MIT"
] | 156 | 2021-06-18T11:56:36.000Z | 2022-03-29T16:34:22.000Z | import responses
from tests.util import random_str
from tests.util import mock_http_response
from binance.spot import Spot as Client
from binance.lib.utils import encoded_string
from binance.error import ParameterRequiredError
mock_item = {"key_1": "value_1", "key_2": "value_2"}
key = random_str()
secret = random_st... | 26.05 | 79 | 0.690339 | 0 | 0 | 0 | 0 | 363 | 0.232246 | 0 | 0 | 415 | 0.265515 |
676e003414de3f2f5ddecf2d26540316287d4189 | 6,232 | py | Python | tools/telemetry/telemetry/results/page_test_results.py | Fusion-Rom/android_external_chromium_org | d8b126911c6ea9753e9f526bee5654419e1d0ebd | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2020-01-25T09:58:49.000Z | 2020-01-25T09:58:49.000Z | tools/telemetry/telemetry/results/page_test_results.py | Fusion-Rom/android_external_chromium_org | d8b126911c6ea9753e9f526bee5654419e1d0ebd | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | tools/telemetry/telemetry/results/page_test_results.py | Fusion-Rom/android_external_chromium_org | d8b126911c6ea9753e9f526bee5654419e1d0ebd | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2020-11-04T06:34:36.000Z | 2020-11-04T06:34:36.000Z | # Copyright 2014 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.
import collections
import copy
import traceback
from telemetry import value as value_module
from telemetry.results import page_run
from telemetry.results im... | 33.869565 | 75 | 0.72914 | 5,789 | 0.928915 | 0 | 0 | 1,372 | 0.220154 | 0 | 0 | 1,736 | 0.278562 |
676fd905727818efa8eda82566b5e796e9f06ce8 | 11,273 | py | Python | src/utils/gradcam.py | xmuyzz/IVContrast | f3100e54f1808e1a796acd97ef5d23d0a2fd4f6c | [
"MIT"
] | 3 | 2022-02-23T09:05:45.000Z | 2022-02-23T20:18:18.000Z | src/utils/gradcam.py | xmuyzz/IVContrast | f3100e54f1808e1a796acd97ef5d23d0a2fd4f6c | [
"MIT"
] | null | null | null | src/utils/gradcam.py | xmuyzz/IVContrast | f3100e54f1808e1a796acd97ef5d23d0a2fd4f6c | [
"MIT"
] | null | null | null | from tensorflow.keras.models import Model
import tensorflow as tf
from tensorflow import keras
import matplotlib.pyplot as plt
import matplotlib.cm as cm
import numpy as np
import cv2
import numpy as np
import pandas as pd
from tensorflow.keras.models import load_model
import tensorflow as tf
import os
#--------------... | 37.327815 | 86 | 0.593808 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,739 | 0.509093 |
677019eb7c18145cccb4dc9a2d50f339eddc7e89 | 5,038 | py | Python | start.py | xylovedd/yangyang | 4cb99491c0f046da9a39f7c916e0c85cb473c002 | [
"Apache-2.0"
] | 20 | 2019-11-14T02:53:53.000Z | 2022-03-26T02:44:04.000Z | start.py | janlle/12306 | 73b1d5423492013447ebdbbfcc6f1fe3a719ee0b | [
"Apache-2.0"
] | 9 | 2019-11-17T09:16:37.000Z | 2022-03-12T00:07:14.000Z | start.py | xylovedd/yangyang | 4cb99491c0f046da9a39f7c916e0c85cb473c002 | [
"Apache-2.0"
] | 7 | 2019-12-05T09:26:09.000Z | 2020-11-15T15:13:16.000Z | # coding:utf-8
"""
start rob task good luck!
> python start.py
"""
import datetime
import time
from sys import version_info
import threadpool
import ticket_config as config
from config.stations import check_station_exists
from train.login import Login
from train.order import Order
from train.ticket import Ticket
f... | 37.044118 | 117 | 0.502382 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 659 | 0.126197 |
6770f980c35e8599c5cad58c26a50fad3654f206 | 2,769 | py | Python | frameworks/PHP/cakephp/setup.py | idlewan/FrameworkBenchmarks | f187ec69752f369d84ef5a262efaef85c3a6a5ab | [
"BSD-3-Clause"
] | null | null | null | frameworks/PHP/cakephp/setup.py | idlewan/FrameworkBenchmarks | f187ec69752f369d84ef5a262efaef85c3a6a5ab | [
"BSD-3-Clause"
] | null | null | null | frameworks/PHP/cakephp/setup.py | idlewan/FrameworkBenchmarks | f187ec69752f369d84ef5a262efaef85c3a6a5ab | [
"BSD-3-Clause"
] | null | null | null |
import subprocess
import sys
import os
import setup_util
from os.path import expanduser
def start(args, logfile, errfile):
fwroot = args.fwroot
setup_util.replace_text("cakephp/app/Config/database.php", "'host' => '.*',", "'host' => '" + args.database_host + "',")
setup_util.replace_text("cakephp/app/Config/cor... | 57.6875 | 186 | 0.717226 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,412 | 0.509931 |
67719e766692980e9b9fa0f337632160d3b1343e | 624 | py | Python | Functions/parsetool.py | AlessandroChen/KindleHelper | 7b102fec44e80585ba7a4b425429f11f0c2ca4e1 | [
"Apache-2.0"
] | 19 | 2019-02-23T02:17:28.000Z | 2022-03-17T16:27:10.000Z | Functions/parsetool.py | AlessandroChen/KindleHelper | 7b102fec44e80585ba7a4b425429f11f0c2ca4e1 | [
"Apache-2.0"
] | 1 | 2019-05-05T09:11:22.000Z | 2019-06-15T04:48:29.000Z | Functions/parsetool.py | AlessandroChen/KindleHelper | 7b102fec44e80585ba7a4b425429f11f0c2ca4e1 | [
"Apache-2.0"
] | 3 | 2019-06-09T01:53:48.000Z | 2019-09-09T07:04:51.000Z | import os, stat
def addPermission(Filename):
os.chmod(Filename, os.stat(Filename).st_mode | stat.S_IXUSR);
def transform(content):
name = '';
for i in range(0, len(content)):
if (content[i] == ' ' and content[i + 1] == ' '):
name += '\n';
else:
name += content[i];
... | 26 | 65 | 0.464744 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 27 | 0.043269 |
6772f47be90751a8ab2cbacfba1c7b99baa2b64a | 102 | py | Python | caiman/models.py | Rockstreet/usman_min | c15145a444cbc913a1349b69dffc0b8a45e38dbb | [
"MIT"
] | null | null | null | caiman/models.py | Rockstreet/usman_min | c15145a444cbc913a1349b69dffc0b8a45e38dbb | [
"MIT"
] | null | null | null | caiman/models.py | Rockstreet/usman_min | c15145a444cbc913a1349b69dffc0b8a45e38dbb | [
"MIT"
] | null | null | null | from django.db import models
from django.utils.translation import ugettext_lazy as _, ugettext
| 10.2 | 65 | 0.784314 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
677367dc85c6f920d38d59e7cc33a0e5eafc5a8c | 6,987 | py | Python | Code/utils.py | minna-ust/SemanticMapGeneration | ab50ed853552713d4d4447b4c1d44e0b8f147318 | [
"BSD-3-Clause"
] | 8 | 2020-01-15T02:49:35.000Z | 2021-11-26T08:29:50.000Z | Code/utils.py | Hezip/SemanticMapGeneration | 98920045c1da5812f6691e6eb75bcc3413406035 | [
"BSD-3-Clause"
] | null | null | null | Code/utils.py | Hezip/SemanticMapGeneration | 98920045c1da5812f6691e6eb75bcc3413406035 | [
"BSD-3-Clause"
] | 6 | 2020-03-05T06:40:24.000Z | 2022-02-16T04:56:38.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Common utility functions
Created on Sun May 27 16:37:42 2018
@author: chen
"""
import math
import cv2
import os
from imutils import paths
import numpy as np
import scipy.ndimage
def rotate_cooridinate(cooridinate_og,rotate_angle,rotate_center):
"""
calculat... | 32.347222 | 123 | 0.640046 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,683 | 0.240876 |
6773e2cae4ca1a7fe539b33cf15047934bd21fc6 | 1,225 | py | Python | py_git/working_with_github/main.py | gabrieldemarmiesse/my_work_environment | 6175afbee154d0108992259633a1c89e560fd12f | [
"MIT"
] | 1 | 2021-02-27T19:34:43.000Z | 2021-02-27T19:34:43.000Z | py_git/working_with_github/main.py | gabrieldemarmiesse/my_work_environment | 6175afbee154d0108992259633a1c89e560fd12f | [
"MIT"
] | null | null | null | py_git/working_with_github/main.py | gabrieldemarmiesse/my_work_environment | 6175afbee154d0108992259633a1c89e560fd12f | [
"MIT"
] | null | null | null | import os
import sys
from subprocess import CalledProcessError
from working_with_github.utils import run
def checkout_pr():
user, branch = sys.argv[1].split(":")
_checkout_pr(user, branch)
def _checkout_pr(user, branch):
run(f"git remote add {user} [email protected]:{user}/addons.git", fail_ok=True)
r... | 26.630435 | 80 | 0.646531 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 539 | 0.44 |
67752967909d812410a7c0a4e3e611d417d432d0 | 4,144 | py | Python | main.py | Lee-Kevin/Danboard | 28b4b0ecada4f29a7106bb3af38f608c0bd681b2 | [
"MIT"
] | null | null | null | main.py | Lee-Kevin/Danboard | 28b4b0ecada4f29a7106bb3af38f608c0bd681b2 | [
"MIT"
] | null | null | null | main.py | Lee-Kevin/Danboard | 28b4b0ecada4f29a7106bb3af38f608c0bd681b2 | [
"MIT"
] | null | null | null | import logging
import time
import re
import serial
from threading import Thread, Event
from respeaker import Microphone
from respeaker import BingSpeechAPI
from respeaker import PixelRing,pixel_ring
BING_KEY = '95e4fe8b3a324389be4595bd1813121c'
ser = serial.Serial('/dev/ttyS1',115200,timeout=0)
data=[0xAA,0x01,0x64,... | 30.925373 | 129 | 0.516651 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 550 | 0.132722 |
677586a1690b5ab7c02ad679b07e602f0cadd49c | 1,063 | py | Python | apis/vote_message/account_voteCredit.py | DerWalundDieKatze/Yumekui | cb3174103ced7474ce6d1abd774b399557dcaf4f | [
"Apache-2.0"
] | null | null | null | apis/vote_message/account_voteCredit.py | DerWalundDieKatze/Yumekui | cb3174103ced7474ce6d1abd774b399557dcaf4f | [
"Apache-2.0"
] | null | null | null | apis/vote_message/account_voteCredit.py | DerWalundDieKatze/Yumekui | cb3174103ced7474ce6d1abd774b399557dcaf4f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
'''
@author: caroline
@license: (C) Copyright 2019-2022, Node Supply Chain Manager Corporation Limited.
@contact: [email protected]
@software: pycharm
@file: account_voteCredit.py
@time: 2020/1/8 11:23 上午
@desc:
'''
from apis.API import request_Api
def voteCredit(api_... | 31.264706 | 265 | 0.74318 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 862 | 0.759471 |
67761a50a32aba1e5e8aa2095f886f17d951b648 | 1,582 | py | Python | src/pla.py | socofels/ML_base_alg | 2f84a2a35b0217d31cbcd39a881ab5eb2eff1772 | [
"MIT"
] | null | null | null | src/pla.py | socofels/ML_base_alg | 2f84a2a35b0217d31cbcd39a881ab5eb2eff1772 | [
"MIT"
] | null | null | null | src/pla.py | socofels/ML_base_alg | 2f84a2a35b0217d31cbcd39a881ab5eb2eff1772 | [
"MIT"
] | null | null | null | import numpy as np
from matplotlib import pyplot as plt
def sign(y_pred):
y_pred = (y_pred >= 0) * 2 - 1
return y_pred
def plot(x, w):
plt.scatter(x[:, 1][pos_index], x[:, 2][pos_index], marker="P")
plt.scatter(x[:, 1][neg_index], x[:, 2][neg_index], marker=0)
x = [-1, 100]
y = -(w[0] + w[1]... | 28.763636 | 98 | 0.506953 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 115 | 0.069782 |
6776496cc3fbe1aa360c8eaeeea056808934a9e1 | 5,974 | py | Python | pupa/scrape/vote_event.py | azban/pupa | 158378e19bcc322796aa4fb766784cbd4fd08413 | [
"BSD-3-Clause"
] | 62 | 2015-01-08T05:46:46.000Z | 2022-01-31T03:27:14.000Z | pupa/scrape/vote_event.py | azban/pupa | 158378e19bcc322796aa4fb766784cbd4fd08413 | [
"BSD-3-Clause"
] | 199 | 2015-01-10T03:19:37.000Z | 2021-05-21T20:34:58.000Z | pupa/scrape/vote_event.py | azban/pupa | 158378e19bcc322796aa4fb766784cbd4fd08413 | [
"BSD-3-Clause"
] | 35 | 2015-03-09T19:41:42.000Z | 2021-06-22T20:01:35.000Z | from ..utils import _make_pseudo_id
from .base import BaseModel, cleanup_list, SourceMixin
from .bill import Bill
from .popolo import pseudo_organization
from .schemas.vote_event import schema
from pupa.exceptions import ScrapeValueError
import re
class VoteEvent(BaseModel, SourceMixin):
_type = 'vote_event'
... | 37.810127 | 99 | 0.610311 | 5,720 | 0.957482 | 0 | 0 | 0 | 0 | 0 | 0 | 2,053 | 0.343656 |
6776771ca007095afc605ceffe189d17a91d3508 | 2,472 | py | Python | Q/questionnaire/models/models_publications.py | ES-DOC/esdoc-questionnaire | 9301eda375c4046323265b37ba96d94c94bf8b11 | [
"MIT"
] | null | null | null | Q/questionnaire/models/models_publications.py | ES-DOC/esdoc-questionnaire | 9301eda375c4046323265b37ba96d94c94bf8b11 | [
"MIT"
] | 477 | 2015-01-07T18:22:27.000Z | 2017-07-17T15:05:48.000Z | Q/questionnaire/models/models_publications.py | ES-DOC/esdoc-questionnaire | 9301eda375c4046323265b37ba96d94c94bf8b11 | [
"MIT"
] | null | null | null | ####################
# ES-DOC CIM Questionnaire
# Copyright (c) 2017 ES-DOC. All rights reserved.
#
# University of Colorado, Boulder
# http://cires.colorado.edu/
#
# This project is distributed according to the terms of the MIT license [http://www.opensource.org/licenses/MIT].
####################
from djan... | 29.783133 | 137 | 0.666667 | 1,533 | 0.620146 | 0 | 0 | 0 | 0 | 0 | 0 | 581 | 0.235032 |
67779dcfb1a4b8df315b4a6173872f0c4446530e | 3,902 | py | Python | tests/management/commands/test_create_command.py | kaozdl/django-extensions | bbc3ae686d2cba9c0bb0a6b88f5e71ddf1a6af36 | [
"MIT"
] | null | null | null | tests/management/commands/test_create_command.py | kaozdl/django-extensions | bbc3ae686d2cba9c0bb0a6b88f5e71ddf1a6af36 | [
"MIT"
] | null | null | null | tests/management/commands/test_create_command.py | kaozdl/django-extensions | bbc3ae686d2cba9c0bb0a6b88f5e71ddf1a6af36 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import shutil
from django.conf import settings
from django.core.management import call_command
from django.test import TestCase
from six import StringIO
try:
from unittest.mock import patch
except ImportError:
from mock import patch
class CreateCommandTests(TestCase):
"... | 41.073684 | 163 | 0.686315 | 3,622 | 0.928242 | 0 | 0 | 2,168 | 0.555613 | 0 | 0 | 639 | 0.163762 |
6777f51fd9e946ab36c26ec73ae09aa80a69635c | 4,032 | py | Python | pca.py | mghaffarynia/PCA | 4f6a041b56bcba0d772c696dc83500b83fbc0215 | [
"Apache-2.0"
] | null | null | null | pca.py | mghaffarynia/PCA | 4f6a041b56bcba0d772c696dc83500b83fbc0215 | [
"Apache-2.0"
] | null | null | null | pca.py | mghaffarynia/PCA | 4f6a041b56bcba0d772c696dc83500b83fbc0215 | [
"Apache-2.0"
] | null | null | null |
import pandas as pd
import numpy as np
from cvxopt import matrix
from cvxopt import solvers
import math
def read_csv_input(filename):
df = pd.read_csv(filename, header = None).to_numpy()
y = df[:, [-1]]
X = df[:, range(df.shape[1]-1)]
return X, y
def opt(X, y, c):
m, n = X.shape
P_top = np.concatenate(... | 33.6 | 82 | 0.640377 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 458 | 0.113591 |
6778560530351b13b5aa71d380046a6c4d5f1c9f | 307 | py | Python | pyadds/__init__.py | wabu/pyadds | a09ac4ca89a809fecffe4e9f63b29b20df7c2872 | [
"MIT"
] | null | null | null | pyadds/__init__.py | wabu/pyadds | a09ac4ca89a809fecffe4e9f63b29b20df7c2872 | [
"MIT"
] | null | null | null | pyadds/__init__.py | wabu/pyadds | a09ac4ca89a809fecffe4e9f63b29b20df7c2872 | [
"MIT"
] | null | null | null | class AnythingType(set):
def __contains__(self, other):
return True
def intersection(self, other):
return other
def union(self, other):
return self
def __str__(self):
return '*'
def __repr__(self):
return "Anything"
Anything = AnythingType()
| 17.055556 | 34 | 0.602606 | 279 | 0.908795 | 0 | 0 | 0 | 0 | 0 | 0 | 13 | 0.042345 |
6778c22f5231a134154a3cc716c3a2ed3620a01a | 626 | py | Python | lookup.py | apinkney97/IP2Location-Python | 5841dcdaf826f7f0ef3e26e91524319552f4c7f8 | [
"MIT"
] | 90 | 2015-01-21T01:15:56.000Z | 2022-02-25T05:12:16.000Z | lookup.py | Guantum/IP2Location-Python | dfa5710cd527ddbd446bbd2206242de6c62758fc | [
"MIT"
] | 17 | 2015-11-09T12:48:44.000Z | 2022-03-21T00:29:00.000Z | lookup.py | Guantum/IP2Location-Python | dfa5710cd527ddbd446bbd2206242de6c62758fc | [
"MIT"
] | 36 | 2016-01-12T11:33:56.000Z | 2021-10-02T12:34:39.000Z | import os, IP2Location, sys, ipaddress
# database = IP2Location.IP2Location(os.path.join("data", "IPV6-COUNTRY.BIN"), "SHARED_MEMORY")
database = IP2Location.IP2Location(os.path.join("data", "IPV6-COUNTRY.BIN"))
try:
ip = sys.argv[1]
if ip == '' :
print ('You cannot enter an empty IP address.')
... | 25.04 | 95 | 0.618211 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 221 | 0.353035 |
677a3f9b4fdf1b1623975d077e5ac1590631e821 | 1,927 | py | Python | ADTs/ADT_of_staff.py | hitachinsk/DataStructure | 91214dd56d9c0493458e8a36af27a46b0a2fdc03 | [
"MIT"
] | null | null | null | ADTs/ADT_of_staff.py | hitachinsk/DataStructure | 91214dd56d9c0493458e8a36af27a46b0a2fdc03 | [
"MIT"
] | null | null | null | ADTs/ADT_of_staff.py | hitachinsk/DataStructure | 91214dd56d9c0493458e8a36af27a46b0a2fdc03 | [
"MIT"
] | null | null | null | import ADT_of_person as AP
import datetime as dm
#ADT Staff()
# Staff(self, str name, str sex, tuple birthday, tuple entey_date, int salary, str position)
# name(self)
# sex(self)
# en_year(self)
# salary(self)
# set_salary(self, new_salary)
# position(self)
# set_position(self, new_position... | 28.338235 | 95 | 0.570317 | 1,562 | 0.810586 | 0 | 0 | 179 | 0.092891 | 0 | 0 | 357 | 0.185262 |
677a7514628e1106435199d272ca3cc1956ae53f | 5,734 | py | Python | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/openedx/tests/completion_integration/test_handlers.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/tests/completion_integration/test_handlers.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/tests/completion_integration/test_handlers.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | 1 | 2019-01-02T14:38:50.000Z | 2019-01-02T14:38:50.000Z | """
Test signal handlers for completion.
"""
from datetime import datetime
from unittest.mock import patch
import ddt
import pytest
from completion import handlers
from completion.models import BlockCompletion
from completion.test_utils import CompletionSetUpMixin
from django.test import TestCase
from pytz import utc... | 34.751515 | 109 | 0.678758 | 5,145 | 0.897279 | 0 | 0 | 4,750 | 0.828392 | 0 | 0 | 767 | 0.133764 |
677b8b180da6f57636a31d49b5e83be1a6466cab | 907 | py | Python | objects/moving_wall.py | krzysztofarendt/ballroom | 7e99d14278e71be873edaf415e7253e87bc81724 | [
"MIT"
] | null | null | null | objects/moving_wall.py | krzysztofarendt/ballroom | 7e99d14278e71be873edaf415e7253e87bc81724 | [
"MIT"
] | 1 | 2020-04-05T16:46:16.000Z | 2020-04-05T16:46:16.000Z | objects/moving_wall.py | krzysztofarendt/ballroom | 7e99d14278e71be873edaf415e7253e87bc81724 | [
"MIT"
] | null | null | null | from typing import Tuple
import pygame
import numpy as np
from .wall import Wall
class MovingWall(Wall):
def __init__(self,
top: int = 0,
left: int = 0,
bottom: int = 1,
right: int = 1):
super().__init__(top, left, bottom, right)
... | 25.194444 | 67 | 0.566703 | 821 | 0.905182 | 0 | 0 | 0 | 0 | 0 | 0 | 125 | 0.137817 |
677b969f256bb511f2d6671783f23985dd593352 | 1,962 | py | Python | src/example/4.Color_sensor/color_sensor.light_up.py | rundhall/ESP-LEGO-SPIKE-Simulator | dc83b895ff2aac5cf2fe576d0ba98426fea60827 | [
"MIT"
] | null | null | null | src/example/4.Color_sensor/color_sensor.light_up.py | rundhall/ESP-LEGO-SPIKE-Simulator | dc83b895ff2aac5cf2fe576d0ba98426fea60827 | [
"MIT"
] | null | null | null | src/example/4.Color_sensor/color_sensor.light_up.py | rundhall/ESP-LEGO-SPIKE-Simulator | dc83b895ff2aac5cf2fe576d0ba98426fea60827 | [
"MIT"
] | null | null | null | light_up(light_1, light_2, light_3)
Sets the brightness of the individual lights on the Color Sensor.
This causes the Color Sensor to change modes, which can affect your program in unexpected ways. For example, the Color Sensor can't read colors when it's in light up mode.
Parameters
light_1
The desired brightness of ... | 22.044944 | 171 | 0.761468 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 94 | 0.04791 |
677c27e42ac69be12805363f7ae3e1fa6d495b1b | 7,711 | py | Python | utils.py | gbene/pydip | e16647c46611f597910a10651b38cd62191a9eaf | [
"MIT"
] | null | null | null | utils.py | gbene/pydip | e16647c46611f597910a10651b38cd62191a9eaf | [
"MIT"
] | null | null | null | utils.py | gbene/pydip | e16647c46611f597910a10651b38cd62191a9eaf | [
"MIT"
] | null | null | null | '''
Script by: Gabriele Bendetti
date: 25/06/2021
Utilities functions. This file is used to have a more organized main script. It contains:
+ Random plane orientation generator that can be used to practice plane attitude interpretation
+ Random fold generator
+ Plotter
+ Data converter from pandas dataframe to dic... | 36.372642 | 436 | 0.727143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,615 | 0.46875 |
677ca1e5c9f7d3101dacf177a4ff6c8f860424e0 | 3,574 | py | Python | debug/free_transition_vi_lofar_dr2_realdata.py | Joshuaalbert/bayes_filter | 2997d60d8cf07f875e42c0b5f07944e9ab7e9d33 | [
"Apache-2.0"
] | null | null | null | debug/free_transition_vi_lofar_dr2_realdata.py | Joshuaalbert/bayes_filter | 2997d60d8cf07f875e42c0b5f07944e9ab7e9d33 | [
"Apache-2.0"
] | 3 | 2019-02-21T16:00:53.000Z | 2020-03-31T01:33:00.000Z | debug/free_transition_vi_lofar_dr2_realdata.py | Joshuaalbert/bayes_filter | 2997d60d8cf07f875e42c0b5f07944e9ab7e9d33 | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
import os
from bayes_filter import logging
from bayes_filter.filters import FreeTransitionVariationalBayes
from bayes_filter.feeds import DatapackFeed, IndexFeed
from bayes_filter.misc import make_example_datapack, maybe_create_posterior_solsets, get_screen_directions
from bayes_filter.datapack ... | 56.730159 | 159 | 0.640179 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,105 | 0.309177 |
677d0d25d6f511de2789f723ba24d4b56d61d93f | 13,237 | py | Python | train.py | Aoi-hosizora/NER-BiLSTM-CRF-Affix-PyTorch | 2ab7f218c11854f75b3fbb626f257672baaf7572 | [
"MIT"
] | null | null | null | train.py | Aoi-hosizora/NER-BiLSTM-CRF-Affix-PyTorch | 2ab7f218c11854f75b3fbb626f257672baaf7572 | [
"MIT"
] | null | null | null | train.py | Aoi-hosizora/NER-BiLSTM-CRF-Affix-PyTorch | 2ab7f218c11854f75b3fbb626f257672baaf7572 | [
"MIT"
] | null | null | null | import argparse
import json
import matplotlib.pyplot as plt
import numpy as np
import pickle
import time
import torch
from torch import optim
from typing import Tuple, List, Dict
import dataset
from model import BiLSTM_CRF
import utils
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument(... | 46.939716 | 212 | 0.64637 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,746 | 0.131903 |
677d56032178efeb016755dc92a217e0030b9013 | 926 | py | Python | utils/exceptions.py | acatiadroid/util-bot | 2a91aa4335c4a844f5335d70cb7c7c32dd8010be | [
"MIT"
] | 1 | 2021-06-02T18:59:34.000Z | 2021-06-02T18:59:34.000Z | utils/exceptions.py | acatiadroid/util-bot | 2a91aa4335c4a844f5335d70cb7c7c32dd8010be | [
"MIT"
] | null | null | null | utils/exceptions.py | acatiadroid/util-bot | 2a91aa4335c4a844f5335d70cb7c7c32dd8010be | [
"MIT"
] | 1 | 2021-05-22T19:53:43.000Z | 2021-05-22T19:53:43.000Z | from pymongo.errors import PyMongoError
class IdNotFound(PyMongoError):
"""Raised when _id was not found in the database collection."""
def __init__(self, *args):
if args:
self.message = args[0]
else:
self.message = self.__doc__
def __str__(self):
return s... | 22.047619 | 67 | 0.552916 | 616 | 0.665227 | 0 | 0 | 0 | 0 | 0 | 0 | 171 | 0.184665 |
677f07bacda33862018d0c3f5ae887b33c4fb2d4 | 45,205 | py | Python | envs/flatland/utils/gym_env_wrappers.py | netceteragroup/Flatland-Challenge | 4292e8aa778d264d025ad6d32926840864b22a21 | [
"MIT"
] | 4 | 2021-01-15T10:49:33.000Z | 2021-12-31T08:11:35.000Z | envs/flatland/utils/gym_env_wrappers.py | netceteragroup/Flatland-Challenge | 4292e8aa778d264d025ad6d32926840864b22a21 | [
"MIT"
] | null | null | null | envs/flatland/utils/gym_env_wrappers.py | netceteragroup/Flatland-Challenge | 4292e8aa778d264d025ad6d32926840864b22a21 | [
"MIT"
] | null | null | null |
from typing import Dict, Any, Optional, List
import gym
import numpy as np
from collections import defaultdict
from flatland.core.grid.grid4_utils import get_new_position
from flatland.envs.agent_utils import EnvAgent, RailAgentStatus
from flatland.envs.rail_env import RailEnv, RailEnvActions
from envs.flatland.obse... | 48.659849 | 224 | 0.596284 | 40,530 | 0.896582 | 0 | 0 | 3,379 | 0.074748 | 0 | 0 | 11,916 | 0.263599 |
677f502efc17cc81872e696789bcab5852c8b1a5 | 1,226 | py | Python | acceptability/models/cbow_classifier.py | nyu-mll/CoLA-baselines | dd095d3646ed05a315280aaa8ed4ec84ba435b3e | [
"MIT"
] | 54 | 2018-05-31T22:57:28.000Z | 2022-03-17T13:25:49.000Z | acceptability/models/cbow_classifier.py | nyu-mll/CoLA-baselines | dd095d3646ed05a315280aaa8ed4ec84ba435b3e | [
"MIT"
] | 4 | 2018-06-06T14:15:10.000Z | 2020-08-07T16:35:50.000Z | acceptability/models/cbow_classifier.py | nyu-mll/CoLA-baselines | dd095d3646ed05a315280aaa8ed4ec84ba435b3e | [
"MIT"
] | 18 | 2018-07-10T12:18:17.000Z | 2022-03-02T22:19:22.000Z | import torch
from torch import nn
class CBOWClassifier(nn.Module):
"""
Continuous bag of words classifier.
"""
def __init__(self, hidden_size, input_size, max_pool, dropout=0.5):
"""
:param hidden_size:
:param input_size:
:param max_pool: if true then max pool over word ... | 34.055556 | 71 | 0.577488 | 1,190 | 0.970636 | 0 | 0 | 0 | 0 | 0 | 0 | 240 | 0.195759 |
677f53508c3acb6aa3c5210a9a7139a828c94921 | 14,637 | py | Python | tests/test_validators.py | yaaminu/yaval | 32f04ecfa092c978fc026f6b7f58d6cf2defd8c9 | [
"MIT"
] | 14 | 2021-02-12T19:04:21.000Z | 2021-03-12T18:18:09.000Z | tests/test_validators.py | yaaminu/yaval | 32f04ecfa092c978fc026f6b7f58d6cf2defd8c9 | [
"MIT"
] | 5 | 2021-02-12T16:04:37.000Z | 2021-04-14T12:05:02.000Z | tests/test_validators.py | yaaminu/yaval | 32f04ecfa092c978fc026f6b7f58d6cf2defd8c9 | [
"MIT"
] | null | null | null | import datetime
from mock import Mock, call
import pytest
from finicky import ValidationException, is_int, is_float, is_str, is_date, is_dict, is_list
# noinspection PyShadowingBuiltins
class TestIntValidator:
def test_must_raise_validation_exception_when_input_is_none_and_required_is_true(self):
with p... | 52.841155 | 122 | 0.683678 | 14,327 | 0.978821 | 0 | 0 | 9,259 | 0.632575 | 0 | 0 | 2,780 | 0.18993 |
677f77f661f042444b5b6e3515ca7ba65cf1bbd5 | 583 | py | Python | polygon.py | SYED-RAFI-NAQVI/10hourcodingchallenge | 20c7c3aee52a2eb281381a9db4d57075cbf38446 | [
"MIT"
] | null | null | null | polygon.py | SYED-RAFI-NAQVI/10hourcodingchallenge | 20c7c3aee52a2eb281381a9db4d57075cbf38446 | [
"MIT"
] | null | null | null | polygon.py | SYED-RAFI-NAQVI/10hourcodingchallenge | 20c7c3aee52a2eb281381a9db4d57075cbf38446 | [
"MIT"
] | null | null | null | import numpy as np
import cv2 as cv
img = cv.imread('1.jpeg',cv.IMREAD_COLOR)
#for polygon we need to have set of points so we create a numpy array. and pts is an object.
pts = np.array([[20,33],[300,120], [67,79], [123,111], [144,134]], np.int32)
#the method polylines will actully draws a polygon by taking differe... | 32.388889 | 117 | 0.711835 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 328 | 0.562607 |
67805442e518a6adbf84390b3eb7ec7d3ff5cd9c | 3,871 | py | Python | lib/fathead/firefox_about_config/parse.py | aeisenberg/zeroclickinfo-fathead | 9be00a038d812ca9ccd0d601220afde777ab2f8e | [
"Apache-2.0"
] | 1 | 2021-01-05T16:48:23.000Z | 2021-01-05T16:48:23.000Z | lib/fathead/firefox_about_config/parse.py | aeisenberg/zeroclickinfo-fathead | 9be00a038d812ca9ccd0d601220afde777ab2f8e | [
"Apache-2.0"
] | null | null | null | lib/fathead/firefox_about_config/parse.py | aeisenberg/zeroclickinfo-fathead | 9be00a038d812ca9ccd0d601220afde777ab2f8e | [
"Apache-2.0"
] | 1 | 2016-06-12T06:12:02.000Z | 2016-06-12T06:12:02.000Z | #!/usr/bin/env python2
from BeautifulSoup import BeautifulSoup, NavigableString
import urllib
import string
import re
class Entry(object):
def __init__(self, name, value, description, url):
self.name = name
self.value = value
self.description = description
self.url = url
def ... | 42.538462 | 92 | 0.422113 | 3,528 | 0.911392 | 0 | 0 | 0 | 0 | 0 | 0 | 644 | 0.166365 |
6781793ae8fc13e5299017f4d13600e84c029c5a | 547 | py | Python | sources/simulators/multiprocessing_simulator/start_client.py | M4rukku/impact_of_non_iid_data_in_federated_learning | c818db03699c82e42217d56f8ddd4cc2081c8bb1 | [
"MIT"
] | null | null | null | sources/simulators/multiprocessing_simulator/start_client.py | M4rukku/impact_of_non_iid_data_in_federated_learning | c818db03699c82e42217d56f8ddd4cc2081c8bb1 | [
"MIT"
] | null | null | null | sources/simulators/multiprocessing_simulator/start_client.py | M4rukku/impact_of_non_iid_data_in_federated_learning | c818db03699c82e42217d56f8ddd4cc2081c8bb1 | [
"MIT"
] | null | null | null | import flwr as fl
import flwr.client
from sources.utils.simulation_parameters import DEFAULT_SERVER_ADDRESS
from sources.simulators.base_client_provider import BaseClientProvider
def start_client(client_provider: BaseClientProvider, client_identifier):
client = client_provider(str(client_identifier))
if isi... | 39.071429 | 90 | 0.824497 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6785745e950d85dea8868d37187f8f6ecdfbf12a | 23,056 | py | Python | aea/helpers/pipe.py | bryanchriswhite/agents-aea | d3f177a963eb855d9528555167255bf2b478f4ba | [
"Apache-2.0"
] | 126 | 2019-09-07T09:32:44.000Z | 2022-03-29T14:28:41.000Z | aea/helpers/pipe.py | salman6049/agents-aea | d3f177a963eb855d9528555167255bf2b478f4ba | [
"Apache-2.0"
] | 1,814 | 2019-08-24T10:08:07.000Z | 2022-03-31T14:28:36.000Z | aea/helpers/pipe.py | salman6049/agents-aea | d3f177a963eb855d9528555167255bf2b478f4ba | [
"Apache-2.0"
] | 46 | 2019-09-03T22:13:58.000Z | 2022-03-22T01:25:16.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2018-2019 Fetch.AI Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You ma... | 32.022222 | 88 | 0.600885 | 20,226 | 0.877255 | 0 | 0 | 2,030 | 0.088046 | 12,868 | 0.558119 | 8,300 | 0.359993 |
6785ebdaa0a0f8a5a088b840a1b64f1e5c59a6a9 | 6,046 | py | Python | src/config/svc-monitor/svc_monitor/tests/test_port_tuple.py | UbuntuEvangelist/contrail-controller | 4e8a992230f8f8e91e4f753e19b5442d9e1b446d | [
"Apache-2.0"
] | null | null | null | src/config/svc-monitor/svc_monitor/tests/test_port_tuple.py | UbuntuEvangelist/contrail-controller | 4e8a992230f8f8e91e4f753e19b5442d9e1b446d | [
"Apache-2.0"
] | null | null | null | src/config/svc-monitor/svc_monitor/tests/test_port_tuple.py | UbuntuEvangelist/contrail-controller | 4e8a992230f8f8e91e4f753e19b5442d9e1b446d | [
"Apache-2.0"
] | 18 | 2017-01-12T09:28:44.000Z | 2019-04-18T20:47:42.000Z | import mock
from mock import patch
import unittest
from vnc_api.vnc_api import *
from svc_monitor.port_tuple import PortTupleAgent
from svc_monitor.config_db import *
import test_common_utils as test_utils
class PortTupleTest(unittest.TestCase):
def setUp(self):
InstanceIpSM._cassandra = mock.MagicMock()
... | 48.368 | 93 | 0.664406 | 5,838 | 0.965597 | 0 | 0 | 0 | 0 | 0 | 0 | 1,877 | 0.310453 |
6786e2d4a6f307e6300a31ab2c4e829094e2410e | 5,672 | py | Python | pearll/agents/ga.py | LondonNode/Anvil | bc50fd7b16af36051157814e2548a98e787b03de | [
"MIT"
] | 13 | 2022-01-17T14:43:05.000Z | 2022-03-10T04:05:36.000Z | pearll/agents/ga.py | LondonNode/Anvil | bc50fd7b16af36051157814e2548a98e787b03de | [
"MIT"
] | 3 | 2022-02-24T18:29:12.000Z | 2022-03-22T11:09:07.000Z | pearll/agents/ga.py | LondonNode/Anvil | bc50fd7b16af36051157814e2548a98e787b03de | [
"MIT"
] | null | null | null | from functools import partial
from typing import Callable, List, Optional, Type
import numpy as np
from gym.vector.vector_env import VectorEnv
from pearll.agents.base_agents import BaseAgent
from pearll.buffers import RolloutBuffer
from pearll.buffers.base_buffer import BaseBuffer
from pearll.callbacks.base_callback ... | 38.849315 | 99 | 0.701164 | 4,349 | 0.766749 | 0 | 0 | 0 | 0 | 0 | 0 | 1,352 | 0.238364 |
6787612d23eda8ccb35a41398442232a6c1a614e | 17,643 | py | Python | src/tequila/optimizers/optimizer_scipy.py | snc2/tequila | 6767ced9215408f7d055c22df7a66ccd610b00fb | [
"MIT"
] | null | null | null | src/tequila/optimizers/optimizer_scipy.py | snc2/tequila | 6767ced9215408f7d055c22df7a66ccd610b00fb | [
"MIT"
] | null | null | null | src/tequila/optimizers/optimizer_scipy.py | snc2/tequila | 6767ced9215408f7d055c22df7a66ccd610b00fb | [
"MIT"
] | null | null | null | import scipy, numpy, typing, numbers
from tequila.objective import Objective
from tequila.objective.objective import assign_variable, Variable, format_variable_dictionary, format_variable_list
from .optimizer_base import Optimizer
from ._containers import _EvalContainer, _GradContainer, _HessContainer, _QngContainer
fr... | 44.55303 | 141 | 0.590829 | 11,181 | 0.633736 | 0 | 0 | 194 | 0.010996 | 0 | 0 | 5,481 | 0.310661 |
67884e5df8d269868ffffa5bd0b7c492cbdd5945 | 12,051 | py | Python | Section_3.3_simul_3/2_Runtime/bsolar.py | isaac2math/solar | 92a2a869cd902e15edce7aa5ed5af10f148763d9 | [
"Intel"
] | null | null | null | Section_3.3_simul_3/2_Runtime/bsolar.py | isaac2math/solar | 92a2a869cd902e15edce7aa5ed5af10f148763d9 | [
"Intel"
] | null | null | null | Section_3.3_simul_3/2_Runtime/bsolar.py | isaac2math/solar | 92a2a869cd902e15edce7aa5ed5af10f148763d9 | [
"Intel"
] | null | null | null | import numpy as np
import time
import warnings
from sklearn.linear_model import LinearRegression
from solar import solar
from sklearn.exceptions import ConvergenceWarning
# For recent version of Scikit-learn: since the class 'Lars' may rely on the Cholesky decomposition and hence may have potential c... | 46.528958 | 265 | 0.64866 | 8,464 | 0.702348 | 0 | 0 | 0 | 0 | 0 | 0 | 7,367 | 0.611319 |
6788b2d4a5d2258670eff8708364f1ba49cb5189 | 615 | py | Python | solutions/nelum_pokuna.py | UdeshUK/RxH5-Prextreme | 6f329b13d552d9c7e9ad927e2fe607c7cc0964f6 | [
"Apache-2.0"
] | 1 | 2018-10-14T12:47:03.000Z | 2018-10-14T12:47:03.000Z | solutions/nelum_pokuna.py | Team-RxH5/Prextreme | 6f329b13d552d9c7e9ad927e2fe607c7cc0964f6 | [
"Apache-2.0"
] | null | null | null | solutions/nelum_pokuna.py | Team-RxH5/Prextreme | 6f329b13d552d9c7e9ad927e2fe607c7cc0964f6 | [
"Apache-2.0"
] | null | null | null | cases=int(raw_input())
for case in range(cases):
answers=[0,0]
grid=[[0 for x in range(4)] for y in range(2)]
common=[]
for i in range(2):
answers[i]=int(raw_input())
for j in range(4):
grid[i][j]=raw_input().split()
grid[i][j] = map(int, grid[i][j])
# Code... | 23.653846 | 50 | 0.518699 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 48 | 0.078049 |
6788c25e7a00ed595c0a516765861ce2d8e549e1 | 69,067 | py | Python | resources/mgltools_x86_64Linux2_1.5.6/MGLToolsPckgs/MolKit/data/allct_dat.py | J-E-J-S/aaRS-Pipeline | 43f59f28ab06e4b16328c3bc405cdddc6e69ac44 | [
"MIT"
] | 9 | 2021-03-06T04:24:28.000Z | 2022-01-03T09:53:07.000Z | MolKit/data/allct_dat.py | e-mayo/autodocktools-prepare-py3k | 2dd2316837bcb7c19384294443b2855e5ccd3e01 | [
"BSD-3-Clause"
] | 3 | 2021-03-07T05:37:16.000Z | 2021-09-19T15:06:54.000Z | MolKit/data/allct_dat.py | e-mayo/autodocktools-prepare-py3k | 2dd2316837bcb7c19384294443b2855e5ccd3e01 | [
"BSD-3-Clause"
] | 4 | 2019-08-28T23:11:39.000Z | 2021-11-27T08:43:36.000Z | allct_dat = {
"TYR": { "HB2":{'torsion': 300.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 9, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'},
"HB3":{'torsion': 60.0, 'tree': 'E', 'NC': 4, 'NB': 6, 'NA': 8, 'I': 10, 'angle': 109.5, 'blen': 1.09, 'charge': 0.038, 'type': 'HC'},
"impropTors":[['-M', 'CA'... | 116.274411 | 251 | 0.447768 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 37,382 | 0.541243 |
678c13af2d3d4847271449c6ae5791e470d46e78 | 39,961 | py | Python | chi/_mechanistic_models.py | DavAug/erlotinib | 9d113257de52b56359ed6451ba7db455645315d1 | [
"BSD-3-Clause"
] | null | null | null | chi/_mechanistic_models.py | DavAug/erlotinib | 9d113257de52b56359ed6451ba7db455645315d1 | [
"BSD-3-Clause"
] | 221 | 2020-11-06T13:03:32.000Z | 2021-07-30T08:17:58.000Z | chi/_mechanistic_models.py | DavAug/erlotinib | 9d113257de52b56359ed6451ba7db455645315d1 | [
"BSD-3-Clause"
] | 1 | 2021-02-10T13:03:58.000Z | 2021-02-10T13:03:58.000Z | #
# This file is part of the chi repository
# (https://github.com/DavAug/chi/) which is released under the
# BSD 3-clause license. See accompanying LICENSE.md for copyright notice and
# full license details.
#
import copy
import myokit
import myokit.formats.sbml as sbml
import numpy as np
class MechanisticModel(obj... | 35.332449 | 79 | 0.620205 | 39,657 | 0.992393 | 0 | 0 | 0 | 0 | 0 | 0 | 21,652 | 0.541828 |
678d54c4f215c915ab40d1921519e8d17b0d89cd | 4,954 | py | Python | smartlicense/settings/__init__.py | coblo/smartlicense | 288b40496646c225716fa3bf5f43b48ff645b96c | [
"MIT"
] | 6 | 2018-04-26T05:54:29.000Z | 2021-04-03T05:08:46.000Z | smartlicense/settings/__init__.py | coblo/smartlicense | 288b40496646c225716fa3bf5f43b48ff645b96c | [
"MIT"
] | 13 | 2018-03-31T07:58:02.000Z | 2022-02-10T10:35:28.000Z | smartlicense/settings/__init__.py | coblo/smartlicense | 288b40496646c225716fa3bf5f43b48ff645b96c | [
"MIT"
] | 2 | 2019-06-13T21:42:21.000Z | 2021-04-03T05:09:02.000Z | # -*- coding: utf-8 -*-
"""
Django settings for smartlicense project.
Generated by 'django-admin startproject' using Django 2.0.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/re... | 27.370166 | 91 | 0.677836 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,358 | 0.677836 |
678e1041a75c67c39856bfcf8a9561f7bd5138f9 | 2,226 | py | Python | firmwire/memory_map.py | j4s0n/FirmWire | d3a20e2429cb4827f538d1a16163afde8b45826b | [
"BSD-3-Clause"
] | null | null | null | firmwire/memory_map.py | j4s0n/FirmWire | d3a20e2429cb4827f538d1a16163afde8b45826b | [
"BSD-3-Clause"
] | null | null | null | firmwire/memory_map.py | j4s0n/FirmWire | d3a20e2429cb4827f538d1a16163afde8b45826b | [
"BSD-3-Clause"
] | null | null | null | ## Copyright (c) 2022, Team FirmWire
## SPDX-License-Identifier: BSD-3-Clause
from enum import Enum, auto
from .hw.soc import SOCPeripheral
class MemoryMapEntryType(Enum):
GENERIC = auto()
FILE_BACKED = auto()
PERIPHERAL = auto()
ANNOTATION = auto()
class MemoryMapEntry:
def __init__(self, ty, s... | 28.177215 | 81 | 0.591195 | 2,077 | 0.933064 | 0 | 0 | 0 | 0 | 0 | 0 | 207 | 0.092992 |
678eb98334509fe0bad64239aa78922c47d0b166 | 1,688 | py | Python | src/resources/Land.py | noancloarec/mapisto-api | b2458f6b12b229babb116f906b3e4f7e8b7b8a71 | [
"MIT"
] | null | null | null | src/resources/Land.py | noancloarec/mapisto-api | b2458f6b12b229babb116f906b3e4f7e8b7b8a71 | [
"MIT"
] | 1 | 2020-07-08T07:12:31.000Z | 2020-07-08T07:12:31.000Z | src/resources/Land.py | noancloarec/mapisto-api | b2458f6b12b229babb116f906b3e4f7e8b7b8a71 | [
"MIT"
] | null | null | null | from .helper import fill_optional_fields
from maps_geometry.feature_extraction import get_bounding_box
from .MapistoShape import MapistoShape
from .BoundingBox import BoundingBox
class Land:
def __init__(self, land_id, representations: list, bounding_box=None):
assert isinstance(bounding_box, BoundingBox... | 35.166667 | 101 | 0.65936 | 1,506 | 0.89218 | 0 | 0 | 336 | 0.199052 | 0 | 0 | 77 | 0.045616 |
6790c65796ad1cfbe5e6c6ab2a2c1453d34ad7fb | 298 | py | Python | reexercises/two_sum_target.py | R0bertWell/interview_questions | f8a65a842dfe03ac28c865bb8370422ff2071137 | [
"MIT"
] | null | null | null | reexercises/two_sum_target.py | R0bertWell/interview_questions | f8a65a842dfe03ac28c865bb8370422ff2071137 | [
"MIT"
] | null | null | null | reexercises/two_sum_target.py | R0bertWell/interview_questions | f8a65a842dfe03ac28c865bb8370422ff2071137 | [
"MIT"
] | null | null | null | from typing import List
def two_sum(lis: List[int], target: int):
dici = {}
for i, value in enumerate(lis):
objetive = target - value
if objetive in dici:
return [dici[objetive], i]
dici[value] = i
return []
print(two_sum([1, 2, 3, 4, 5, 6], 7))
| 19.866667 | 41 | 0.553691 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
6792c61e36032efcbcd6f3d46a42dbabd2400582 | 1,032 | py | Python | vue/decorators/base.py | adamlwgriffiths/vue.py | f4256454256ddfe54a8be6dea493d3fc915ef1a2 | [
"MIT"
] | 274 | 2018-07-07T00:57:17.000Z | 2022-03-22T23:49:53.000Z | vue/decorators/base.py | adamlwgriffiths/vue.py | f4256454256ddfe54a8be6dea493d3fc915ef1a2 | [
"MIT"
] | 25 | 2018-11-24T17:19:44.000Z | 2022-03-23T22:30:18.000Z | vue/decorators/base.py | adamlwgriffiths/vue.py | f4256454256ddfe54a8be6dea493d3fc915ef1a2 | [
"MIT"
] | 18 | 2019-07-04T07:18:18.000Z | 2022-03-22T23:49:55.000Z | from vue.bridge import Object
import javascript
class VueDecorator:
__key__ = None
__parents__ = ()
__id__ = None
__value__ = None
def update(self, vue_dict):
base = vue_dict
for parent in self.__parents__:
base = vue_dict.setdefault(parent, {})
if self.__id__... | 28.666667 | 74 | 0.602713 | 593 | 0.574612 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
679841fb13e9e1b6f465dd6a052897627ff56964 | 40,992 | py | Python | datalabeling/google/cloud/datalabeling_v1beta1/proto/data_labeling_service_pb2_grpc.py | DaveCheez/google-cloud-python | fc03d4d41f13e9d13db7206438163b3a471fdabd | [
"Apache-2.0"
] | 2 | 2021-11-26T07:08:43.000Z | 2022-03-07T20:20:04.000Z | datalabeling/google/cloud/datalabeling_v1beta1/proto/data_labeling_service_pb2_grpc.py | DaveCheez/google-cloud-python | fc03d4d41f13e9d13db7206438163b3a471fdabd | [
"Apache-2.0"
] | 6 | 2019-05-27T22:05:58.000Z | 2019-08-05T16:46:16.000Z | datalabeling/google/cloud/datalabeling_v1beta1/proto/data_labeling_service_pb2_grpc.py | DaveCheez/google-cloud-python | fc03d4d41f13e9d13db7206438163b3a471fdabd | [
"Apache-2.0"
] | 1 | 2019-03-29T18:26:16.000Z | 2019-03-29T18:26:16.000Z | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
from google.cloud.datalabeling_v1beta1.proto import (
annotation_spec_set_pb2 as google_dot_cloud_dot_datalabeling__v1beta1_dot_proto_dot_annotation__spec__set__pb2,
)
from google.cloud.datalabeling_v1beta1.proto import (
data_la... | 63.553488 | 169 | 0.782616 | 25,893 | 0.63166 | 0 | 0 | 0 | 0 | 0 | 0 | 8,013 | 0.195477 |
67988b46e3108d80c389257b2f89c3e8f006472d | 6,777 | py | Python | keras_version/utils.py | nunu0910/BiO-Net | 2038eadb16f200c4e9de8346af5e3d23422eb438 | [
"MIT"
] | 44 | 2020-07-07T06:40:13.000Z | 2022-03-24T10:15:39.000Z | keras_version/utils.py | nunu0910/BiO-Net | 2038eadb16f200c4e9de8346af5e3d23422eb438 | [
"MIT"
] | 12 | 2020-11-18T01:27:08.000Z | 2021-09-22T08:19:14.000Z | keras_version/utils.py | nunu0910/BiO-Net | 2038eadb16f200c4e9de8346af5e3d23422eb438 | [
"MIT"
] | 14 | 2020-07-26T14:10:09.000Z | 2021-11-18T23:20:44.000Z | import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
import keras
from keras.models import Model, load_model
from keras import backend as K
from keras.preprocessing.image import ImageDataGenerator
import tensorflow as tf
tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR) # mute deprecation warnings
from kera... | 32.425837 | 182 | 0.703261 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,483 | 0.218828 |
6798bb647c9031d2653050d76cd3f241dd42a5cd | 2,734 | py | Python | sdk/python/pulumi_azure_native/batch/__init__.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/batch/__init__.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/batch/__init__.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
from .. import _utilities
import typing
# Export this package's modules as members:
from ._enums import *
from .application import *
from .application_... | 43.396825 | 80 | 0.793343 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 681 | 0.249086 |
6799287dad3bb8281070f0e2070fafa75ab7324c | 1,853 | py | Python | setup.py | tgolsson/appJar | 5e2f8bff44e927e7c2bae17fccddc6dbf79952f0 | [
"Apache-2.0"
] | 666 | 2016-11-14T18:17:40.000Z | 2022-03-29T03:53:22.000Z | setup.py | tgolsson/appJar | 5e2f8bff44e927e7c2bae17fccddc6dbf79952f0 | [
"Apache-2.0"
] | 598 | 2016-10-20T21:04:09.000Z | 2022-03-15T22:44:49.000Z | setup.py | tgolsson/appJar | 5e2f8bff44e927e7c2bae17fccddc6dbf79952f0 | [
"Apache-2.0"
] | 95 | 2017-01-19T12:23:58.000Z | 2022-03-06T18:16:21.000Z | from setuptools import setup, find_packages
__name__ = "appJar"
__version__ = "0.94.0"
__author__ = "Richard Jarvis"
__desc__ = "An easy-to-use, feature-rich GUI wrapper for tKinter. Designed specifically for use in the classroom, but powerful enough to be used anywhere."
__author_email_... | 37.06 | 180 | 0.658392 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,071 | 0.577982 |
67995960cafd98e838927288e205c58078f19735 | 141,788 | py | Python | pertama/andir.py | alitkurniawan48/BelajarGIS | c52556bc6fa74b849b9c3461410805807b742967 | [
"MIT"
] | 2 | 2020-02-09T14:47:07.000Z | 2020-02-09T14:47:12.000Z | pertama/andir.py | alitkurniawan48/BelajarGIS | c52556bc6fa74b849b9c3461410805807b742967 | [
"MIT"
] | 12 | 2019-12-11T06:45:59.000Z | 2020-01-06T09:35:35.000Z | pertama/andir.py | alitkurniawan48/BelajarGIS | c52556bc6fa74b849b9c3461410805807b742967 | [
"MIT"
] | 71 | 2019-12-09T13:52:54.000Z | 2021-05-28T16:19:09.000Z | import shapefile
class Andir:
def __init__(self):
self.kelurahan = shapefile.Writer(
'kelurahan_andir', shapeType=shapefile.POLYGON)
self.kelurahan.shapeType
self.kelurahan.field('kelurahan_di_andir', 'C')
self.kantor = shapefile.Writer(
'kantor_kelurahan_a... | 36.383885 | 64 | 0.471471 | 141,769 | 0.999866 | 0 | 0 | 0 | 0 | 0 | 0 | 162 | 0.001143 |
679d339786e1a3d3431ad8eb7251f79813420fa0 | 8,226 | py | Python | sparseconvnet/utils.py | THU-luvision/Occuseg | 163e1fba6f5d9afd4ee2a4202118bc81d8f7c5e4 | [
"BSD-3-Clause"
] | 1 | 2022-03-29T18:26:11.000Z | 2022-03-29T18:26:11.000Z | sparseconvnet/utils.py | THU-luvision/Occuseg | 163e1fba6f5d9afd4ee2a4202118bc81d8f7c5e4 | [
"BSD-3-Clause"
] | null | null | null | sparseconvnet/utils.py | THU-luvision/Occuseg | 163e1fba6f5d9afd4ee2a4202118bc81d8f7c5e4 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2016-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
import torch, glob, os
from .sparseConvNetTensor import SparseConvNetTensor
from .metadata import Metadata
import sparsecon... | 35.153846 | 155 | 0.600049 | 609 | 0.074034 | 531 | 0.064551 | 0 | 0 | 0 | 0 | 484 | 0.058838 |
679e2250d3e4704bdc0cc067419d5a8f3eb454fa | 12,983 | py | Python | python-numpy-lists/numpylists.py | tosinayanda/python-starter-kit | 9faee168ff82e46b6ef8102ae72ea936fd099961 | [
"MIT"
] | null | null | null | python-numpy-lists/numpylists.py | tosinayanda/python-starter-kit | 9faee168ff82e46b6ef8102ae72ea936fd099961 | [
"MIT"
] | null | null | null | python-numpy-lists/numpylists.py | tosinayanda/python-starter-kit | 9faee168ff82e46b6ef8102ae72ea936fd099961 | [
"MIT"
] | null | null | null | #
import numpy as np
#create numpy arrays
#
#Generate array
height=np.round(np.random.normal(1.75,0.20,5000),2)
weight=np.round(np.random.normal(60.32,15,5000),2)
np_city=np.column_stack((height,weight))
print(np_city.shape)
cars=["Toyota","Chevrolet","Ford","Honda","Brabus"]
cars_np=np.array(cars)
weight=[20.12,2... | 177.849315 | 4,931 | 0.484942 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 477 | 0.03674 |
679f8e5b12103c54dd655de826901d7a4752b208 | 11,818 | py | Python | sysinv/sysinv/sysinv/sysinv/puppet/nfv.py | MarioCarrilloA/config | 06a6f142d154970ce658e979822cd84ce447f612 | [
"Apache-2.0"
] | null | null | null | sysinv/sysinv/sysinv/sysinv/puppet/nfv.py | MarioCarrilloA/config | 06a6f142d154970ce658e979822cd84ce447f612 | [
"Apache-2.0"
] | null | null | null | sysinv/sysinv/sysinv/sysinv/puppet/nfv.py | MarioCarrilloA/config | 06a6f142d154970ce658e979822cd84ce447f612 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2017-2018 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
from sysinv.common import constants
from sysinv.common import utils
from sysinv.helm import helm
from sysinv.puppet import openstack
class NfvPuppet(openstack.OpenstackBasePuppet):
"""Class to encapsulate puppet opera... | 42.358423 | 76 | 0.582924 | 11,585 | 0.980284 | 0 | 0 | 0 | 0 | 0 | 0 | 4,002 | 0.338636 |
679fc8ee35fed0b83bbf337e8c352e97186a807c | 1,151 | py | Python | qualif16/timeline.py | valenca/hashcode16 | ac47b6f480a9c2ce78446aa3510178cc32f26ea5 | [
"WTFPL"
] | 1 | 2016-02-08T17:23:18.000Z | 2016-02-08T17:23:18.000Z | qualif16/timeline.py | valenca/hashcode16 | ac47b6f480a9c2ce78446aa3510178cc32f26ea5 | [
"WTFPL"
] | null | null | null | qualif16/timeline.py | valenca/hashcode16 | ac47b6f480a9c2ce78446aa3510178cc32f26ea5 | [
"WTFPL"
] | null | null | null | from data import *
from heapq import *
class Timeline:
def __init__(self):
self.events=[]
def addEvent(self, event):
heappush(self.events, event)
def nextEvent(self):
assert(self.events != [])
return heappop(self.events)
def nextEvents(self):
if self.events == []:
return []
cur_time = self.event... | 19.508475 | 89 | 0.652476 | 765 | 0.664639 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 0.071242 |
67a10756dbb9e4be6d237dca1eb33c024676daf2 | 5,394 | py | Python | cfgov/v1/util/migrations.py | hkeeler/cfgov-refresh | 33977186a8e9cb972e63cc22baa357d381316aec | [
"CC0-1.0"
] | null | null | null | cfgov/v1/util/migrations.py | hkeeler/cfgov-refresh | 33977186a8e9cb972e63cc22baa357d381316aec | [
"CC0-1.0"
] | null | null | null | cfgov/v1/util/migrations.py | hkeeler/cfgov-refresh | 33977186a8e9cb972e63cc22baa357d381316aec | [
"CC0-1.0"
] | null | null | null | import json
from django.core.exceptions import ObjectDoesNotExist
from django.db import transaction
from treebeard.mp_tree import MP_Node
try:
from wagtail.core.blocks import StreamValue
except ImportError: # pragma: no cover; fallback for Wagtail < 2.0
from wagtail.wagtailcore.blocks import StreamValue
... | 32.299401 | 78 | 0.678532 | 0 | 0 | 0 | 0 | 1,808 | 0.335187 | 0 | 0 | 1,043 | 0.193363 |
67a10b0fb92da7a2ec247253549979648e850cef | 8,436 | py | Python | source/codes.py | Very1Fake/monitor | bb47352cffebd8b99bafac0a342324b042b3d826 | [
"Apache-2.0",
"MIT"
] | null | null | null | source/codes.py | Very1Fake/monitor | bb47352cffebd8b99bafac0a342324b042b3d826 | [
"Apache-2.0",
"MIT"
] | null | null | null | source/codes.py | Very1Fake/monitor | bb47352cffebd8b99bafac0a342324b042b3d826 | [
"Apache-2.0",
"MIT"
] | null | null | null | from typing import Dict
_codes: Dict[int, str] = {
# Debug (1xxxx)
# System (100xx)
10000: 'Test debug',
# Pipe (103xx)
10301: 'Reindexing parser',
# Resolver (109xx)
10901: 'Executing catalog',
10902: 'Executing target',
10903: 'Catalog executed',
10904: 'Target executed',
... | 30.345324 | 95 | 0.641062 | 990 | 0.117354 | 0 | 0 | 0 | 0 | 0 | 0 | 5,411 | 0.641418 |
67a1409839afbcce2cc6a08bb9dc1126a5b4df90 | 937 | py | Python | Stack.py | jdegene/ArcGIS-scripts | 8821adc32b89525039591db83c762083a4ef750f | [
"MIT"
] | null | null | null | Stack.py | jdegene/ArcGIS-scripts | 8821adc32b89525039591db83c762083a4ef750f | [
"MIT"
] | null | null | null | Stack.py | jdegene/ArcGIS-scripts | 8821adc32b89525039591db83c762083a4ef750f | [
"MIT"
] | null | null | null | # Erstellt aus vielen TIFF Datei eine stacked Datei mit dem ArcGIS
# Tool composite bands
import arcpy
import os
arcpy.env.overwriteOutput = True # Ueberschreiben fuer ArcGIS aktivieren
arcpy.env.pyramid = "NONE" # Verhindert dass Pyramiden berechnet werden
arcpy.env.rasterStatistics = "NONE" # Verhindert dass ... | 28.393939 | 92 | 0.640342 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 445 | 0.47492 |
67a2a922aab66937ea10eabfea17b426aac61814 | 2,106 | py | Python | tests/test_frozenordereddict.py | tirkarthi/frozenordereddict | 8837a7e2b55cf8531793b0ec5ad40d56c500ec0f | [
"MIT"
] | 2 | 2016-01-14T18:03:42.000Z | 2020-11-03T22:13:03.000Z | tests/test_frozenordereddict.py | tirkarthi/frozenordereddict | 8837a7e2b55cf8531793b0ec5ad40d56c500ec0f | [
"MIT"
] | 4 | 2017-10-24T06:03:24.000Z | 2020-11-03T22:23:06.000Z | tests/test_frozenordereddict.py | tirkarthi/frozenordereddict | 8837a7e2b55cf8531793b0ec5ad40d56c500ec0f | [
"MIT"
] | 6 | 2015-12-02T11:34:33.000Z | 2021-11-04T04:31:11.000Z | from collections import OrderedDict
from unittest import TestCase
from frozenordereddict import FrozenOrderedDict
class TestFrozenOrderedDict(TestCase):
ITEMS_1 = (
("b", 2),
("a", 1),
)
ITEMS_2 = (
("d", 4),
("c", 3),
)
ODICT_1 = OrderedDict(ITEMS_1)
ODICT_2 ... | 27.350649 | 85 | 0.625831 | 1,983 | 0.941595 | 0 | 0 | 0 | 0 | 0 | 0 | 15 | 0.007123 |
67a4b479d6f75f2f17d3b85691a149733addfde8 | 7,560 | py | Python | tests/test_data_gateway/test_dummy_serial.py | aerosense-ai/data-gateway | 019b8e4a114e16d363a3167171a457cefdbf004f | [
"Apache-2.0"
] | null | null | null | tests/test_data_gateway/test_dummy_serial.py | aerosense-ai/data-gateway | 019b8e4a114e16d363a3167171a457cefdbf004f | [
"Apache-2.0"
] | 34 | 2021-12-20T14:51:57.000Z | 2022-03-30T16:47:04.000Z | tests/test_data_gateway/test_dummy_serial.py | aerosense-ai/data-gateway | 019b8e4a114e16d363a3167171a457cefdbf004f | [
"Apache-2.0"
] | null | null | null | import random
import unittest
from serial.serialutil import SerialException
from data_gateway.dummy_serial import DummySerial, constants, exceptions, random_bytes, random_string
from tests.base import BaseTestCase
class DummySerialTest(BaseTestCase):
def setUp(self):
"""Set up the test environment:
... | 41.538462 | 119 | 0.694577 | 7,292 | 0.96455 | 0 | 0 | 0 | 0 | 0 | 0 | 1,243 | 0.164418 |
67a4dc5dd5440ed57b743f18f84e2d218d7c1ec4 | 5,216 | py | Python | site/flask/lib/python2.7/site-packages/speaklater.py | theholyhades1/tartanHacks2015 | a801b473f21cfbd136e2a5a74423e8c72d14f900 | [
"MIT"
] | 32 | 2015-01-19T12:13:26.000Z | 2021-11-11T00:11:22.000Z | site/flask/lib/python2.7/site-packages/speaklater.py | theholyhades1/tartanHacks2015 | a801b473f21cfbd136e2a5a74423e8c72d14f900 | [
"MIT"
] | 10 | 2020-06-05T19:42:26.000Z | 2022-03-11T23:38:35.000Z | site/flask/lib/python2.7/site-packages/speaklater.py | theholyhades1/tartanHacks2015 | a801b473f21cfbd136e2a5a74423e8c72d14f900 | [
"MIT"
] | 9 | 2015-07-18T01:03:56.000Z | 2019-05-24T09:36:40.000Z | # -*- coding: utf-8 -*-
r"""
speaklater
~~~~~~~~~~
A module that provides lazy strings for translations. Basically you
get an object that appears to be a string but changes the value every
time the value is evaluated based on a callable you provide.
For example you can have a global `lazy_get... | 25.950249 | 78 | 0.637078 | 2,253 | 0.43194 | 0 | 0 | 0 | 0 | 0 | 0 | 2,778 | 0.532592 |
67a75973cb787f7c7e91d28c32afde2e4db5408b | 848 | py | Python | test/test_graph.py | mits58/Python-Graph-Library | aa85788ad63e356944d77a4c251ad707562dd9c0 | [
"MIT"
] | null | null | null | test/test_graph.py | mits58/Python-Graph-Library | aa85788ad63e356944d77a4c251ad707562dd9c0 | [
"MIT"
] | null | null | null | test/test_graph.py | mits58/Python-Graph-Library | aa85788ad63e356944d77a4c251ad707562dd9c0 | [
"MIT"
] | null | null | null | import unittest
import numpy as np
from graph import Graph
class TestGraphClass(unittest.TestCase):
"""
Test Class for Graph Class
"""
def test_generating_graph_object(self):
"""
Testing Generation of Graph Object from Adjacent Matrix
"""
# setup
A = np.array(... | 24.941176 | 78 | 0.483491 | 735 | 0.866745 | 0 | 0 | 0 | 0 | 0 | 0 | 175 | 0.206368 |
67a783ee0f0ec9ab1fa4d600a15705146b7bc899 | 260 | py | Python | 09_cumledeki_kelime_sayisi.py | kabatasmirac/We_WantEd_OrnekCozumler | 0f022361659fb78cd3f644910f3611d45df64317 | [
"MIT"
] | 1 | 2020-06-09T13:09:23.000Z | 2020-06-09T13:09:23.000Z | 09_cumledeki_kelime_sayisi.py | kabatasmirac/We_WantEd_OrnekCozumler | 0f022361659fb78cd3f644910f3611d45df64317 | [
"MIT"
] | null | null | null | 09_cumledeki_kelime_sayisi.py | kabatasmirac/We_WantEd_OrnekCozumler | 0f022361659fb78cd3f644910f3611d45df64317 | [
"MIT"
] | null | null | null | def kelime_sayisi(string):
counter = 1
for i in range(0,len(string)):
if string[i] == ' ':
counter += 1
return counter
cumle = input("Cumlenizi giriniz : ")
print("Cumlenizdeki kelime sayisi = {}".format(kelime_sayisi(cumle))) | 26 | 69 | 0.615385 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 58 | 0.223077 |
67a9204ea3bc6abf715d94ea6ccb879d61991881 | 909 | py | Python | pdns-mysql-domain-exp/lib/db.py | kilgoretrout1985/pdns-mysql-domain-exp | 9692971da82d625b242c740d9be8e2130a483249 | [
"MIT"
] | null | null | null | pdns-mysql-domain-exp/lib/db.py | kilgoretrout1985/pdns-mysql-domain-exp | 9692971da82d625b242c740d9be8e2130a483249 | [
"MIT"
] | null | null | null | pdns-mysql-domain-exp/lib/db.py | kilgoretrout1985/pdns-mysql-domain-exp | 9692971da82d625b242c740d9be8e2130a483249 | [
"MIT"
] | null | null | null | import MySQLdb
def domains_from_db(connection_data: dict, at_a_time: int = 1000) -> list:
domains = []
for connect_params in connection_data:
if 'charset' not in connect_params:
connect_params['charset'] = 'utf8'
db = MySQLdb.connect(**connect_params)
cursor = db.cursor()
... | 34.961538 | 104 | 0.537954 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 128 | 0.140814 |
67a972ea6a872e759ef7065f8c8e54aa921e3f54 | 3,370 | py | Python | barni/_result.py | Thrameos/barni | e5ba76f9bb04a15a272b5159b25e6425733102c4 | [
"MIT"
] | 8 | 2020-03-16T23:21:59.000Z | 2021-08-12T12:26:44.000Z | barni/_result.py | johnromo04/barni | 3d758f21a9317b8826019261548339c047923b96 | [
"MIT"
] | 6 | 2020-03-17T16:57:14.000Z | 2020-08-04T17:51:45.000Z | barni/_result.py | johnromo04/barni | 3d758f21a9317b8826019261548339c047923b96 | [
"MIT"
] | 3 | 2020-03-17T00:47:28.000Z | 2020-07-29T18:19:10.000Z | ###############################################################################
# Copyright (c) 2019 Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory
#
# Written by M. Monterial, K. Nelson
# [email protected]
#
# LLNL-CODE-805904
#
# All rights reserved.
#
# Permissi... | 34.387755 | 81 | 0.67003 | 379 | 0.112463 | 0 | 0 | 0 | 0 | 0 | 0 | 1,801 | 0.534421 |
67a9af0c056744f8b59776cc12a80777352c44e7 | 2,976 | py | Python | work/code/5fold/paddle_model.py | kkoren/2021CCFBDCI-QAmatch-rank5 | 379f89ad43ffcfbd2c15ad6ac4f93e8fa5b27dc3 | [
"Apache-2.0"
] | null | null | null | work/code/5fold/paddle_model.py | kkoren/2021CCFBDCI-QAmatch-rank5 | 379f89ad43ffcfbd2c15ad6ac4f93e8fa5b27dc3 | [
"Apache-2.0"
] | null | null | null | work/code/5fold/paddle_model.py | kkoren/2021CCFBDCI-QAmatch-rank5 | 379f89ad43ffcfbd2c15ad6ac4f93e8fa5b27dc3 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on %(date)s
@author: %Christian
"""
"""
#BASE +BN层
#dropout改为0.15
"""
import paddle
import paddle.nn as nn
import paddle.nn.functional as F
import paddlenlp as ppnlp
class QuestionMatching_base(nn.Layer):
'''
base模型
dropout改为0.15
'''
de... | 30.367347 | 108 | 0.584341 | 2,897 | 0.923788 | 0 | 0 | 0 | 0 | 0 | 0 | 791 | 0.252232 |
67aa649ee72d5a267bbc9cdfc568c9bcaf20b9fc | 21,917 | py | Python | q2_mlab/plotting/app.py | patrickimran/regression-benchmarking | 90a9dd1f4196d76145d17d733dffc13830fd95fa | [
"BSD-3-Clause"
] | null | null | null | q2_mlab/plotting/app.py | patrickimran/regression-benchmarking | 90a9dd1f4196d76145d17d733dffc13830fd95fa | [
"BSD-3-Clause"
] | 29 | 2020-04-22T16:39:02.000Z | 2021-08-02T15:43:11.000Z | q2_mlab/plotting/app.py | patrickimran/regression-benchmarking | 90a9dd1f4196d76145d17d733dffc13830fd95fa | [
"BSD-3-Clause"
] | 4 | 2019-12-30T17:06:04.000Z | 2020-08-14T17:55:31.000Z | from functools import partialmethod
import pandas as pd
from sqlalchemy.orm import sessionmaker
from sqlalchemy import create_engine
import sqlite3
import click
import json
import pkg_resources
from itertools import combinations
from q2_mlab.db.schema import RegressionScore
from q2_mlab.plotting.components import (
... | 33.927245 | 79 | 0.578409 | 16,969 | 0.774239 | 0 | 0 | 425 | 0.019391 | 0 | 0 | 2,387 | 0.108911 |
67add2205d4190930f5b032323a1238d7a058e8c | 6,378 | py | Python | gpn/distributions/base.py | WodkaRHR/Graph-Posterior-Network | 139e7c45c37324c9286e0cca60360a4978b3f411 | [
"MIT"
] | 23 | 2021-11-16T01:31:55.000Z | 2022-03-04T05:49:03.000Z | gpn/distributions/base.py | WodkaRHR/Graph-Posterior-Network | 139e7c45c37324c9286e0cca60360a4978b3f411 | [
"MIT"
] | 1 | 2021-12-17T01:25:16.000Z | 2021-12-20T10:38:30.000Z | gpn/distributions/base.py | WodkaRHR/Graph-Posterior-Network | 139e7c45c37324c9286e0cca60360a4978b3f411 | [
"MIT"
] | 7 | 2021-12-03T11:13:44.000Z | 2022-02-06T03:12:10.000Z | import torch
import torch.distributions as D
class ExponentialFamily(D.ExponentialFamily):
"""
Shared base distribution for exponential family distributions.
"""
@property
def is_sparse(self):
"""
Whether the distribution's parameters are sparse. Just returns `False`.
"""
... | 33.21875 | 100 | 0.607087 | 6,022 | 0.944183 | 0 | 0 | 3,056 | 0.479147 | 0 | 0 | 4,973 | 0.779712 |
67addac624c1ac8a0bc388113f31ef1180a2d2c5 | 557 | py | Python | demos/python/3_statements.py | denfromufa/mipt-course | ad828f9f3777b68727090bcd69feb0dd91f17465 | [
"BSD-3-Clause"
] | null | null | null | demos/python/3_statements.py | denfromufa/mipt-course | ad828f9f3777b68727090bcd69feb0dd91f17465 | [
"BSD-3-Clause"
] | null | null | null | demos/python/3_statements.py | denfromufa/mipt-course | ad828f9f3777b68727090bcd69feb0dd91f17465 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
condition = 42
# IMPORTANT: colons, _indentation_ are significant!
if condition:
print "Condition is true!"
elif True: # not 'true'!
print "I said it's true! :)"
else:
print "Condition is false :("
# of course, elif/else are optional
assert True == (not False)
# Equivalent of `for (in... | 19.892857 | 51 | 0.601436 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 276 | 0.495512 |
67ae4667834ab686277782bd3ef57e5f23b602fc | 6,492 | py | Python | dedupe/training.py | BrianSipple/dedupe | d276da675e319d5cc6e7cafd4963deebde0d485d | [
"MIT"
] | 1 | 2015-11-06T01:33:04.000Z | 2015-11-06T01:33:04.000Z | dedupe/training.py | BrianSipple/dedupe | d276da675e319d5cc6e7cafd4963deebde0d485d | [
"MIT"
] | null | null | null | dedupe/training.py | BrianSipple/dedupe | d276da675e319d5cc6e7cafd4963deebde0d485d | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# provides functions for selecting a sample of training data
from itertools import combinations, islice
import blocking
import core
import numpy
import logging
import random
import sys
def findUncertainPairs(field_distances, data_model, bias=0.5):
"""
Given a set of ... | 31.362319 | 91 | 0.590881 | 0 | 0 | 1,042 | 0.160505 | 0 | 0 | 0 | 0 | 1,079 | 0.166205 |
67aebac6e47b438aae9ad595766760877ca83a55 | 166 | py | Python | Chapter04/listcmp1.py | kaushalkumarshah/Learn-Python-in-7-Days | 2663656767c8959ace836f0c0e272f3e501bbe6e | [
"MIT"
] | 12 | 2018-07-09T16:20:31.000Z | 2022-03-21T22:52:15.000Z | Chapter04/listcmp1.py | kaushalkumarshah/Learn-Python-in-7-Days | 2663656767c8959ace836f0c0e272f3e501bbe6e | [
"MIT"
] | null | null | null | Chapter04/listcmp1.py | kaushalkumarshah/Learn-Python-in-7-Days | 2663656767c8959ace836f0c0e272f3e501bbe6e | [
"MIT"
] | 19 | 2018-01-09T12:49:06.000Z | 2021-11-23T08:05:55.000Z | list1 = [10,9,3,7,2,1,23,1,561,1,1,96,1]
def cmp1(x,y):
if x == 1 or y==1:
c = y-x
else:
c = x-y
return c
list1.sort(cmp = cmp1)
print list1 | 12.769231 | 41 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
67aefde1df9dfdcb55a1ab80ea64b075758a46e0 | 520 | py | Python | ObitSystem/ObitTalk/test/template.py | sarrvesh/Obit | e4ce6029e9beb2a8c0316ee81ea710b66b2b7986 | [
"Linux-OpenIB"
] | 5 | 2019-08-26T06:53:08.000Z | 2020-10-20T01:08:59.000Z | ObitSystem/ObitTalk/test/template.py | sarrvesh/Obit | e4ce6029e9beb2a8c0316ee81ea710b66b2b7986 | [
"Linux-OpenIB"
] | null | null | null | ObitSystem/ObitTalk/test/template.py | sarrvesh/Obit | e4ce6029e9beb2a8c0316ee81ea710b66b2b7986 | [
"Linux-OpenIB"
] | 8 | 2017-08-29T15:12:32.000Z | 2022-03-31T12:16:08.000Z | from AIPS import AIPS
from AIPSTask import AIPSTask
from AIPSData import AIPSImage
from ObitTask import ObitTask
AIPS.userno = 103
image = AIPSImage('MANDELBROT', 'MANDL', 1, 1)
mandl = AIPSTask('mandl')
mandl.outdata = image
mandl.imsize[1:] = [ 512, 512 ]
mandl.go()
try:
template = ObitTask('Template')
te... | 20.8 | 46 | 0.701923 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 42 | 0.080769 |
67afb6f388c98096e84a0f8aa3dc9e79c6d38f5b | 5,186 | py | Python | src/voxelize.py | Beskamir/BlenderDepthMaps | ba1201effde617078fb35f23d534372de3dd39c3 | [
"MIT"
] | null | null | null | src/voxelize.py | Beskamir/BlenderDepthMaps | ba1201effde617078fb35f23d534372de3dd39c3 | [
"MIT"
] | null | null | null | src/voxelize.py | Beskamir/BlenderDepthMaps | ba1201effde617078fb35f23d534372de3dd39c3 | [
"MIT"
] | null | null | null | import bpy
import bmesh
import numpy
from random import randint
import time
# pointsToVoxels() has been modified from the function generate_blocks() in https://github.com/cagcoach/BlenderPlot/blob/master/blendplot.py
# Some changes to accomodate Blender 2.8's API changes were made,
# and the function has been made m... | 42.508197 | 140 | 0.636521 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,072 | 0.399537 |
67b5f86ef31a000c3511435b9060d1043c35b90a | 2,182 | py | Python | storage/lustre_client_iops/lustre_client_iops.py | jssfy/toolpedia | 084d592f7f1de373e6acae5856dfbb8b06b2f7a1 | [
"Apache-2.0"
] | null | null | null | storage/lustre_client_iops/lustre_client_iops.py | jssfy/toolpedia | 084d592f7f1de373e6acae5856dfbb8b06b2f7a1 | [
"Apache-2.0"
] | null | null | null | storage/lustre_client_iops/lustre_client_iops.py | jssfy/toolpedia | 084d592f7f1de373e6acae5856dfbb8b06b2f7a1 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#-*-coding:utf-8-*-
import json
import sys
import time
# TBD: auto discovery
# data_path = "/proc/fs/lustre/llite/nvmefs-ffff883f8a4f2800/stats"
data_path = "/proc/fs/lustre/lmv/shnvme3-clilmv-ffff8859d3e2d000/md_stats"
# use a dic1/dic2 to hold sampling data
def load_data(dic):
# Open file ... | 26.289157 | 85 | 0.61824 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 944 | 0.432631 |
67b63f883548e6cabc6d6344eb2af1aa23104352 | 5,716 | py | Python | test/lsh_test.py | titusz/datasketch | a483b39fe4e444c372792e5c91c86d9d8d27a4a5 | [
"MIT"
] | 1 | 2022-03-21T05:36:15.000Z | 2022-03-21T05:36:15.000Z | test/lsh_test.py | tomzhang/datasketch | a483b39fe4e444c372792e5c91c86d9d8d27a4a5 | [
"MIT"
] | null | null | null | test/lsh_test.py | tomzhang/datasketch | a483b39fe4e444c372792e5c91c86d9d8d27a4a5 | [
"MIT"
] | 2 | 2018-11-12T18:00:52.000Z | 2022-03-21T05:36:20.000Z | import unittest
from hashlib import sha1
import pickle
import numpy as np
from datasketch.lsh import MinHashLSH
from datasketch.minhash import MinHash
from datasketch.weighted_minhash import WeightedMinHashGenerator
class TestMinHashLSH(unittest.TestCase):
def test_init(self):
lsh = MinHashLSH(threshold=... | 32.662857 | 64 | 0.561407 | 5,446 | 0.952764 | 0 | 0 | 0 | 0 | 0 | 0 | 220 | 0.038488 |
67b6738fcd0ebe0de56b7b545d7adc583f1c2d45 | 4,134 | py | Python | src/datasets/tsn_dataset.py | tomstark99/epic-kitchens-100-fyrp | cbc9e59569fb6110b900a51def1947b8a3c93699 | [
"Apache-2.0"
] | 2 | 2021-08-31T10:02:56.000Z | 2021-11-24T12:44:19.000Z | src/datasets/tsn_dataset.py | tomstark99/epic-kitchens-100-fyrp | cbc9e59569fb6110b900a51def1947b8a3c93699 | [
"Apache-2.0"
] | null | null | null | src/datasets/tsn_dataset.py | tomstark99/epic-kitchens-100-fyrp | cbc9e59569fb6110b900a51def1947b8a3c93699 | [
"Apache-2.0"
] | null | null | null | import logging
from typing import Callable
from typing import List
import numpy as np
import torch.utils.data
from .video_dataset import VideoDataset
from .video_dataset import VideoRecord
LOG = logging.getLogger(__name__)
# line_profiler injects a "profile" into __builtins__. When not running under
# line_profile... | 33.33871 | 87 | 0.60716 | 3,677 | 0.889453 | 0 | 0 | 352 | 0.085148 | 0 | 0 | 617 | 0.14925 |
67b70692a042775258dace6d02203639346f7fe2 | 5,947 | py | Python | ce_cli/function.py | maiot-io/cengine | 3a1946c449e8c5e1d216215df6eeab941eb1640a | [
"Apache-2.0"
] | 7 | 2020-10-13T12:47:32.000Z | 2021-03-12T12:00:14.000Z | ce_cli/function.py | maiot-io/cengine | 3a1946c449e8c5e1d216215df6eeab941eb1640a | [
"Apache-2.0"
] | null | null | null | ce_cli/function.py | maiot-io/cengine | 3a1946c449e8c5e1d216215df6eeab941eb1640a | [
"Apache-2.0"
] | 1 | 2021-01-23T02:19:42.000Z | 2021-01-23T02:19:42.000Z | import click
import ce_api
import base64
import os
from ce_cli.cli import cli, pass_info
from ce_cli.utils import check_login_status
from ce_cli.utils import api_client, api_call
from ce_api.models import FunctionCreate, FunctionVersionCreate
from ce_cli.utils import declare, notice
from tabulate import tabulate
from c... | 35.189349 | 86 | 0.648562 | 0 | 0 | 0 | 0 | 5,559 | 0.934757 | 0 | 0 | 1,191 | 0.200269 |
67ba0ceb8217748f29955b3f1f48be862f98b8da | 1,747 | py | Python | office-plugin/windows-office/program/wizards/ui/event/RadioDataAware.py | jerrykcode/kkFileView | 6efc3750665c9c4034798fb9fb3e74cd8144165c | [
"Apache-2.0"
] | 6,660 | 2018-01-13T12:16:53.000Z | 2022-03-31T15:15:28.000Z | office-plugin/windows-office/program/wizards/ui/event/RadioDataAware.py | jerrykcode/kkFileView | 6efc3750665c9c4034798fb9fb3e74cd8144165c | [
"Apache-2.0"
] | 208 | 2018-01-26T08:55:12.000Z | 2022-03-29T02:36:34.000Z | office-plugin/windows-office/program/wizards/ui/event/RadioDataAware.py | jerrykcode/kkFileView | 6efc3750665c9c4034798fb9fb3e74cd8144165c | [
"Apache-2.0"
] | 1,933 | 2018-01-15T13:08:40.000Z | 2022-03-31T11:28:59.000Z | #
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# This file incorporates work covered by the following license noti... | 35.653061 | 70 | 0.68403 | 861 | 0.492845 | 0 | 0 | 280 | 0.160275 | 0 | 0 | 794 | 0.454493 |
67ba1058171fe27c8c016baa860730f05f7fd4ed | 5,416 | py | Python | Allura/allura/lib/patches.py | shalithasuranga/allura | 4f7fba13415954d07f602a051ec697329dd3706b | [
"Apache-2.0"
] | 1 | 2019-03-17T04:16:15.000Z | 2019-03-17T04:16:15.000Z | Allura/allura/lib/patches.py | DalavanCloud/allura | a25329caed9e6d136a1004c33372e0632a16e352 | [
"Apache-2.0"
] | null | null | null | Allura/allura/lib/patches.py | DalavanCloud/allura | a25329caed9e6d136a1004c33372e0632a16e352 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (t... | 42.3125 | 94 | 0.675406 | 0 | 0 | 0 | 0 | 3,411 | 0.629801 | 0 | 0 | 1,932 | 0.356721 |