hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f722240a67244d196847090cdf5dd01aa951f23d
61,618
py
Python
cumulusci/robotframework/Salesforce.py
leboff/CumulusCI
81edbb1d64f2cc215a951c570052a1e423821cc1
[ "BSD-3-Clause" ]
null
null
null
cumulusci/robotframework/Salesforce.py
leboff/CumulusCI
81edbb1d64f2cc215a951c570052a1e423821cc1
[ "BSD-3-Clause" ]
null
null
null
cumulusci/robotframework/Salesforce.py
leboff/CumulusCI
81edbb1d64f2cc215a951c570052a1e423821cc1
[ "BSD-3-Clause" ]
null
null
null
import importlib import logging import re import time from datetime import datetime from dateutil.parser import parse as parse_date, ParserError from pprint import pformat from robot.libraries.BuiltIn import BuiltIn, RobotNotRunningError from robot.utils import timestr_to_secs from cumulusci.robotframework.utils impor...
40.115885
134
0.628242
import importlib import logging import re import time from datetime import datetime from dateutil.parser import parse as parse_date, ParserError from pprint import pformat from robot.libraries.BuiltIn import BuiltIn, RobotNotRunningError from robot.utils import timestr_to_secs from cumulusci.robotframework.utils impor...
true
true
f72224100c9bc8d6e1fa39209af147abe4365ee7
2,044
py
Python
learning/alembic/env.py
koichiro8/learning
ffc0785dfeeeee4240aed0a1742a64b86ff28369
[ "MIT" ]
null
null
null
learning/alembic/env.py
koichiro8/learning
ffc0785dfeeeee4240aed0a1742a64b86ff28369
[ "MIT" ]
null
null
null
learning/alembic/env.py
koichiro8/learning
ffc0785dfeeeee4240aed0a1742a64b86ff28369
[ "MIT" ]
null
null
null
# type: ignore import os from logging.config import fileConfig from alembic import context from sqlalchemy import engine_from_config, pool from learning.entities import Base # this is the Alembic Config object, which provides # access to the values within the .ini file in use. config = context.config # Interpret th...
26.205128
81
0.716732
import os from logging.config import fileConfig from alembic import context from sqlalchemy import engine_from_config, pool from learning.entities import Base config = context.config fileConfig(config.config_file_name) # for 'autogenerate' support # from myapp import mymodel target_metadata = Base.metadata ...
true
true
f72225b6395da1cc12e591bea2de48caa9c295f3
19,777
py
Python
example/VCU118/fpga/tb/test_fpga_core.py
bmindur/xfcp
dd2eef2cb23a17209180b278b1e2640fd09fda28
[ "MIT" ]
35
2018-07-06T04:59:29.000Z
2022-03-08T22:45:11.000Z
example/VCU118/fpga/tb/test_fpga_core.py
bmindur/xfcp
dd2eef2cb23a17209180b278b1e2640fd09fda28
[ "MIT" ]
4
2021-04-23T15:24:32.000Z
2022-03-04T10:31:12.000Z
example/VCU118/fpga/tb/test_fpga_core.py
bmindur/xfcp
dd2eef2cb23a17209180b278b1e2640fd09fda28
[ "MIT" ]
15
2017-03-19T08:04:58.000Z
2022-02-11T18:38:59.000Z
#!/usr/bin/env python """ Copyright (c) 2017 Alex Forencich Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merg...
29.874622
107
0.630682
from myhdl import * import os import struct import xfcp import uart_ep import i2c import eth_ep import arp_ep import udp_ep import gmii_ep module = 'fpga_core' testbench = 'test_%s' % module srcs = [] srcs.append("../rtl/%s.v" % module) srcs.append("../lib/xfcp/rtl/xfcp_interface_uart.v") srcs.append("../lib/xfcp...
true
true
f72225b988b94880019a35eb225acab6e4b68b8a
604
py
Python
{{ cookiecutter.package_name }}/src/{{ cookiecutter.module_name }}/runner/decorators.py
toxinu/cookiecutter-django
687ae5fe93f46aa57ef8d8f7315e60ca66391382
[ "BSD-3-Clause" ]
3
2016-12-17T01:05:35.000Z
2016-12-23T10:03:34.000Z
{{ cookiecutter.package_name }}/src/{{ cookiecutter.module_name }}/runner/decorators.py
toxinu/cookiecutter-django
687ae5fe93f46aa57ef8d8f7315e60ca66391382
[ "BSD-3-Clause" ]
null
null
null
{{ cookiecutter.package_name }}/src/{{ cookiecutter.module_name }}/runner/decorators.py
toxinu/cookiecutter-django
687ae5fe93f46aa57ef8d8f7315e60ca66391382
[ "BSD-3-Clause" ]
null
null
null
import os def configuration(f): import click from functools import update_wrapper @click.pass_context def inner(ctx, *args, **kwargs): # HACK: We can't call `configure()` from within tests # since we don't load config files from disk, so we # need a way to bypass this initiali...
33.555556
93
0.650662
import os def configuration(f): import click from functools import update_wrapper @click.pass_context def inner(ctx, *args, **kwargs): # since we don't load config files from disk, so we if os.environ.get('_{{ cookiecutter.module_name|upper }}_SKIP_CONFIGURATION') !=...
false
true
f7222660525d88a831eb01f371001c0033a38be7
29,003
py
Python
neutron/plugins/openvswitch/ovs_neutron_plugin.py
petrutlucian94/neutron
44976d12bbe72331e536d92bb46e35a8835a75ce
[ "Apache-2.0" ]
null
null
null
neutron/plugins/openvswitch/ovs_neutron_plugin.py
petrutlucian94/neutron
44976d12bbe72331e536d92bb46e35a8835a75ce
[ "Apache-2.0" ]
null
null
null
neutron/plugins/openvswitch/ovs_neutron_plugin.py
petrutlucian94/neutron
44976d12bbe72331e536d92bb46e35a8835a75ce
[ "Apache-2.0" ]
null
null
null
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Nicira Networks, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apach...
46.703704
79
0.607937
import sys from oslo.config import cfg from neutron.agent import securitygroups_rpc as sg_rpc from neutron.api.rpc.agentnotifiers import dhcp_rpc_agent_api from neutron.api.rpc.agentnotifiers import l3_rpc_agent_api from neutron.api.v2 import attributes from neutron.common import constants as q...
true
true
f722268be4ed5165edfde83085c14b1b8daef1d5
10,704
py
Python
args/ft_args.py
humanlab/HaRT
ab5da16cb1bfdadc3fb77a99f0fda8123ea1fe02
[ "Apache-2.0" ]
null
null
null
args/ft_args.py
humanlab/HaRT
ab5da16cb1bfdadc3fb77a99f0fda8123ea1fe02
[ "Apache-2.0" ]
null
null
null
args/ft_args.py
humanlab/HaRT
ab5da16cb1bfdadc3fb77a99f0fda8123ea1fe02
[ "Apache-2.0" ]
null
null
null
from dataclasses import dataclass, field from typing import Optional @dataclass class DataTrainingArguments: """ Arguments pertaining to what data we are going to input our model for training and eval. Using `HfArgumentParser` we can turn this class into argparse arguments to be able to specify them o...
42.816
185
0.634529
from dataclasses import dataclass, field from typing import Optional @dataclass class DataTrainingArguments: task_type: Optional[str] = field( default=None, metadata={"help": "The type of task to train on: 'document' or 'user' -level"}, ) task_name: Optional[str] = field( default=N...
true
true
f7222707f0f7481e358da6ecdef7b27d9ff7da98
12,969
py
Python
office365/sharepoint/folders/folder.py
rikeshtailor/Office365-REST-Python-Client
ca7bfa1b22212137bb4e984c0457632163e89a43
[ "MIT" ]
null
null
null
office365/sharepoint/folders/folder.py
rikeshtailor/Office365-REST-Python-Client
ca7bfa1b22212137bb4e984c0457632163e89a43
[ "MIT" ]
null
null
null
office365/sharepoint/folders/folder.py
rikeshtailor/Office365-REST-Python-Client
ca7bfa1b22212137bb4e984c0457632163e89a43
[ "MIT" ]
null
null
null
from office365.runtime.client_result import ClientResult from office365.runtime.queries.create_entity_query import CreateEntityQuery from office365.runtime.queries.service_operation_query import ServiceOperationQuery from office365.runtime.queries.update_entity_query import UpdateEntityQuery from office365.runtime.reso...
40.783019
118
0.671524
from office365.runtime.client_result import ClientResult from office365.runtime.queries.create_entity_query import CreateEntityQuery from office365.runtime.queries.service_operation_query import ServiceOperationQuery from office365.runtime.queries.update_entity_query import UpdateEntityQuery from office365.runtime.reso...
true
true
f722280ec9e8ec0e2c0c2b5813f5b46b814656b3
5,621
py
Python
navigation/arena_local_planner/model_based/crowdnav_ros/scripts/crowd_nav/utils/explorer.py
kilinmao/sarl_star
dde9bb2b690c705a615195f4b570af3ea9dfe05e
[ "MIT" ]
7
2021-11-11T13:25:25.000Z
2021-12-25T21:34:41.000Z
navigation/arena_local_planner/model_based/crowdnav_ros/scripts/crowd_nav/utils/explorer.py
kilinmao/sarl_star
dde9bb2b690c705a615195f4b570af3ea9dfe05e
[ "MIT" ]
1
2021-11-20T20:34:14.000Z
2021-11-20T20:34:14.000Z
arena_navigation/arena_local_planner/model_based/crowdnav_ros/scripts/crowd_nav/utils/explorer.py
ignc-research/arena-marl
3b9b2521436ef7f364a250da71a01e915d840296
[ "MIT" ]
null
null
null
import logging import copy import torch from crowd_sim.envs.utils.info import * class Explorer(object): def __init__(self, env, robot, device, memory=None, gamma=None, target_policy=None): self.env = env self.robot = robot self.device = device self.memory = memory self.gamm...
42.263158
120
0.560754
import logging import copy import torch from crowd_sim.envs.utils.info import * class Explorer(object): def __init__(self, env, robot, device, memory=None, gamma=None, target_policy=None): self.env = env self.robot = robot self.device = device self.memory = memory self.gamm...
true
true
f722281aed4b588b7fe6bc868576317fb976354c
548
py
Python
books/migrations/0002_auto_20180205_0033.py
RandyRomero/library
2a150d76c1f656a885e56dbffd46dd1a33f562e9
[ "MIT" ]
null
null
null
books/migrations/0002_auto_20180205_0033.py
RandyRomero/library
2a150d76c1f656a885e56dbffd46dd1a33f562e9
[ "MIT" ]
null
null
null
books/migrations/0002_auto_20180205_0033.py
RandyRomero/library
2a150d76c1f656a885e56dbffd46dd1a33f562e9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2018-02-04 21:33 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('books', '0001_initial'), ] operations = [ migrations.RenameField( model_n...
21.076923
46
0.560219
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('books', '0001_initial'), ] operations = [ migrations.RenameField( model_name='book', old_name='pud_date', new_name='pu...
true
true
f7222871cfafe696b6c9c3fcdcc8754d53c48f2c
5,922
py
Python
kubernetes_asyncio/client/models/v1_component_condition.py
olitheolix/kubernetes_asyncio
344426793e4e4b653bcd8e4a29c6fa4766e1fff7
[ "Apache-2.0" ]
1
2020-03-25T01:24:27.000Z
2020-03-25T01:24:27.000Z
kubernetes_asyncio/client/models/v1_component_condition.py
olitheolix/kubernetes_asyncio
344426793e4e4b653bcd8e4a29c6fa4766e1fff7
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/client/models/v1_component_condition.py
olitheolix/kubernetes_asyncio
344426793e4e4b653bcd8e4a29c6fa4766e1fff7
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: v1.10.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import si...
29.462687
129
0.578352
import pprint import re import six class V1ComponentCondition(object): swagger_types = { 'error': 'str', 'message': 'str', 'status': 'str', 'type': 'str' } attribute_map = { 'error': 'error', 'message': 'message', 'status': 'status', ...
true
true
f722292fc89496c0e00f66e2a1ae564ccf20b115
452
py
Python
tests/components/switch_as_x/conftest.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
tests/components/switch_as_x/conftest.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
24,710
2016-04-13T08:27:26.000Z
2020-03-02T12:59:13.000Z
tests/components/switch_as_x/conftest.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""Fixtures for the Switch as X integration tests.""" from __future__ import annotations from collections.abc import Generator from unittest.mock import AsyncMock, patch import pytest @pytest.fixture def mock_setup_entry() -> Generator[AsyncMock, None, None]: """Mock setting up a config entry.""" with patch...
26.588235
83
0.745575
from __future__ import annotations from collections.abc import Generator from unittest.mock import AsyncMock, patch import pytest @pytest.fixture def mock_setup_entry() -> Generator[AsyncMock, None, None]: with patch( "homeassistant.components.switch_as_x.async_setup_entry", return_value=True ) as m...
true
true
f7222a9c5d62333400242377e8d452dae0e37caa
22,040
py
Python
rampage/daq/gpib.py
shreyaspotnis/rampage
e2565aef7ee16ee06523de975e8aa41aca14e3b2
[ "MIT" ]
null
null
null
rampage/daq/gpib.py
shreyaspotnis/rampage
e2565aef7ee16ee06523de975e8aa41aca14e3b2
[ "MIT" ]
null
null
null
rampage/daq/gpib.py
shreyaspotnis/rampage
e2565aef7ee16ee06523de975e8aa41aca14e3b2
[ "MIT" ]
null
null
null
import visa import numpy as np import logging from datetime import datetime resource_manager = visa.ResourceManager() class Aglient33250A(object): def __init__(self): self.instr = self.open_instrument() def open_instrument(self): resource_list = resource_manager.list_resources() gpi...
38.802817
132
0.562069
import visa import numpy as np import logging from datetime import datetime resource_manager = visa.ResourceManager() class Aglient33250A(object): def __init__(self): self.instr = self.open_instrument() def open_instrument(self): resource_list = resource_manager.list_resources() gpi...
true
true
f7222b09075fb515a1d8e1859b51f4740b705561
2,726
py
Python
diverse/cache.py
sakkada/django-diverse
dbd13bb13c3663d6149a28d94daaf06c1e47b0f4
[ "MIT" ]
null
null
null
diverse/cache.py
sakkada/django-diverse
dbd13bb13c3663d6149a28d94daaf06c1e47b0f4
[ "MIT" ]
null
null
null
diverse/cache.py
sakkada/django-diverse
dbd13bb13c3663d6149a28d94daaf06c1e47b0f4
[ "MIT" ]
null
null
null
import json from django.db.models import FieldDoesNotExist class BaseCache(object): def get(self, version): raise NotImplementedError def set(self, version, data): raise NotImplementedError def delete(self, version): raise NotImplementedError class ModelCache(object): updat...
30.629213
77
0.592443
import json from django.db.models import FieldDoesNotExist class BaseCache(object): def get(self, version): raise NotImplementedError def set(self, version, data): raise NotImplementedError def delete(self, version): raise NotImplementedError class ModelCache(object): updat...
true
true
f7222b1be63bc03e221db6dbd871a5a3495af7f2
2,543
py
Python
pyshield/io.py
heydude1337/pyshield
8f103ccc160e6208c8a6754264168416f62373cb
[ "MIT" ]
1
2021-02-08T14:58:31.000Z
2021-02-08T14:58:31.000Z
pyshield/io.py
heydude1337/pyshield
8f103ccc160e6208c8a6754264168416f62373cb
[ "MIT" ]
null
null
null
pyshield/io.py
heydude1337/pyshield
8f103ccc160e6208c8a6754264168416f62373cb
[ "MIT" ]
1
2020-06-25T22:23:19.000Z
2020-06-25T22:23:19.000Z
""" Functions to read resource files (.yml, .xls/.xlsx and images) """ # -*- coding: utf-8 -*- from os import path import pandas as pd import matplotlib.image as mpimg import numpy as np import yaml import pyshield as ps def load_item(item): """ Load yaml, image or excel or return value as is. """ if is...
25.178218
79
0.616201
from os import path import pandas as pd import matplotlib.image as mpimg import numpy as np import yaml import pyshield as ps def load_item(item): if isinstance(item, str): if is_yaml(item): try: item = read_yaml(item) except FileNotFoundError: ...
true
true
f7222b3625e9519e955bd6e39ca0f3136506ae0d
18,448
py
Python
plipify/_version.py
volkamerlab/plipify
c7b68bbf325aac904969867c7fbed5179f9670b7
[ "MIT" ]
6
2022-01-19T13:31:57.000Z
2022-02-09T05:48:08.000Z
plipify/_version.py
volkamerlab/plipify
c7b68bbf325aac904969867c7fbed5179f9670b7
[ "MIT" ]
4
2021-10-13T08:45:33.000Z
2022-02-11T15:56:09.000Z
plipify/_version.py
volkamerlab/plipify
c7b68bbf325aac904969867c7fbed5179f9670b7
[ "MIT" ]
2
2022-01-25T03:01:56.000Z
2022-03-21T09:26:31.000Z
# This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contains t...
35.408829
79
0.584508
import errno import os import re import subprocess import sys def get_keywords(): git_refnames = "$Format:%d$" git_full = "$Format:%H$" git_date = "$Format:%ci$" keywords = {"refnames": git_refnames, "full": git_full, "date": git_date} return keywords class Version...
true
true
f7222d14897ee68ad7e800ceebf5fae81a30b3c1
555
py
Python
profit/wallet/derivation_record.py
zcomputerwiz/profit-blockchain
d6d4337ea7c418c66f05f22a263e94190452aed6
[ "Apache-2.0" ]
7
2022-03-15T01:33:35.000Z
2022-03-26T21:29:45.000Z
profit/wallet/derivation_record.py
zcomputerwiz/profit-blockchain
d6d4337ea7c418c66f05f22a263e94190452aed6
[ "Apache-2.0" ]
3
2022-03-19T23:02:18.000Z
2022-03-19T23:02:19.000Z
profit/wallet/derivation_record.py
zcomputerwiz/profit-blockchain
d6d4337ea7c418c66f05f22a263e94190452aed6
[ "Apache-2.0" ]
null
null
null
from dataclasses import dataclass from blspy import G1Element from profit.types.blockchain_format.sized_bytes import bytes32 from profit.util.ints import uint32 from profit.wallet.util.wallet_types import WalletType @dataclass(frozen=True) class DerivationRecord: """ These are records representing a puzzle ...
25.227273
78
0.769369
from dataclasses import dataclass from blspy import G1Element from profit.types.blockchain_format.sized_bytes import bytes32 from profit.util.ints import uint32 from profit.wallet.util.wallet_types import WalletType @dataclass(frozen=True) class DerivationRecord: index: uint32 puzzle_hash: bytes32 pubk...
true
true
f7222e97526e2e34c659fdecffa4f7af1b6f47c0
8,349
py
Python
parsl/providers/ad_hoc/ad_hoc.py
cylondata/parsl
00ff9372bd841dafef8a0b3566c79ffe68f0e367
[ "Apache-2.0" ]
323
2017-07-28T21:31:27.000Z
2022-03-05T13:06:05.000Z
parsl/providers/ad_hoc/ad_hoc.py
cylondata/parsl
00ff9372bd841dafef8a0b3566c79ffe68f0e367
[ "Apache-2.0" ]
1,286
2017-06-01T16:50:00.000Z
2022-03-31T16:45:14.000Z
parsl/providers/ad_hoc/ad_hoc.py
cylondata/parsl
00ff9372bd841dafef8a0b3566c79ffe68f0e367
[ "Apache-2.0" ]
113
2017-06-03T11:38:40.000Z
2022-03-26T16:43:05.000Z
import logging import os import time from parsl.channels import LocalChannel from parsl.launchers import SimpleLauncher from parsl.providers.provider_base import ExecutionProvider, JobStatus, JobState from parsl.providers.error import ScriptPathError from parsl.utils import RepresentationMixin logger = logging.getLog...
33.130952
109
0.592526
import logging import os import time from parsl.channels import LocalChannel from parsl.launchers import SimpleLauncher from parsl.providers.provider_base import ExecutionProvider, JobStatus, JobState from parsl.providers.error import ScriptPathError from parsl.utils import RepresentationMixin logger = logging.getLog...
true
true
f7222f402986219a0e09068b7d7e002f2a798ee8
6,931
py
Python
streamer/node_base.py
shaka-bot/shaka-streamer
60588ea0be83074d29538fa851338fc0183f1909
[ "Apache-2.0" ]
154
2019-08-29T16:53:24.000Z
2022-02-25T00:29:56.000Z
streamer/node_base.py
shaka-bot/shaka-streamer
60588ea0be83074d29538fa851338fc0183f1909
[ "Apache-2.0" ]
101
2019-08-30T17:34:51.000Z
2022-03-02T18:46:22.000Z
streamer/node_base.py
shaka-bot/shaka-streamer
60588ea0be83074d29538fa851338fc0183f1909
[ "Apache-2.0" ]
56
2019-09-08T17:47:22.000Z
2022-02-23T17:35:11.000Z
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
32.848341
87
0.664118
import abc import enum import os import shlex import subprocess import sys import threading import time import traceback from . import node_base from typing import Any, Dict, IO, List, Optional, Union class ProcessStatus(enum.Enum): Finished = 0 Running = 1 Errored = 2 class NodeBase(obje...
true
true
f722306e60c10161ddfe9d5743fd65dcb873c5bb
3,778
py
Python
scrubber/models.py
adamyi/CrowdAnnotator
5b5e4703899d2f1f4640b9cf76894ccb3943f07f
[ "Apache-2.0" ]
3
2020-10-04T12:09:46.000Z
2021-09-20T19:25:11.000Z
scrubber/models.py
adamyi/CrowdAnnotator
5b5e4703899d2f1f4640b9cf76894ccb3943f07f
[ "Apache-2.0" ]
2
2020-06-05T21:18:09.000Z
2021-06-10T21:33:18.000Z
scrubber/models.py
adamyi/CrowdAnnotator
5b5e4703899d2f1f4640b9cf76894ccb3943f07f
[ "Apache-2.0" ]
null
null
null
from __future__ import unicode_literals from django.db import models import re import json # import nlp try: import Queue as Q #python version < 3.0 except ImportError: import queue as Q #python3.* class wordBlock(): def __init__(self, start, end, kind): self.start = start; self.end = en...
35.641509
143
0.622287
from __future__ import unicode_literals from django.db import models import re import json try: import Queue as Q except ImportError: import queue as Q class wordBlock(): def __init__(self, start, end, kind): self.start = start; self.end = end; self.kind = kind; def __lt__...
true
true
f722319c05ef4cef2543858c3137359ca5bc94e9
8,509
py
Python
mgtune/optinterface.py
ghbrown/mg_tune
674957e4eb24e94d9f033bffdf5e42a54b00f155
[ "MIT" ]
null
null
null
mgtune/optinterface.py
ghbrown/mg_tune
674957e4eb24e94d9f033bffdf5e42a54b00f155
[ "MIT" ]
null
null
null
mgtune/optinterface.py
ghbrown/mg_tune
674957e4eb24e94d9f033bffdf5e42a54b00f155
[ "MIT" ]
null
null
null
import pickle def write_params_file(params_file,type_file,lower_file,upper_file,obj_file,max_f_eval): """ assembles known problem info and settings for NOMAD into a plain text file ---Inputs--- ---Outputs--- """ #get data from pickles type_list = pickle.load(open(type_file,'rb')) ...
39.393519
104
0.670702
import pickle def write_params_file(params_file,type_file,lower_file,upper_file,obj_file,max_f_eval): type_list = pickle.load(open(type_file,'rb')) lower_bound_list = pickle.load(open(lower_file,'rb')) upper_bound_list = pickle.load(open(upper_file,'rb')) type_string = ' '.join(type_list)...
true
true
f7223385a23edc82057a8732fb5856bc89217e52
1,694
py
Python
setup.py
homeworkprod/boto3
753de6d98d2beec1f60ab304f83e92db82a8686a
[ "Apache-2.0" ]
null
null
null
setup.py
homeworkprod/boto3
753de6d98d2beec1f60ab304f83e92db82a8686a
[ "Apache-2.0" ]
null
null
null
setup.py
homeworkprod/boto3
753de6d98d2beec1f60ab304f83e92db82a8686a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """ distutils/setuptools install script. """ import os import re from setuptools import find_packages, setup ROOT = os.path.dirname(__file__) VERSION_RE = re.compile(r'''__version__ = ['"]([0-9.]+)['"]''') requires = [ 'botocore>=1.24.29,<1.25.0', 'jmespath>=0.7.1,<2.0.0', 's3tran...
28.711864
94
0.618064
import os import re from setuptools import find_packages, setup ROOT = os.path.dirname(__file__) VERSION_RE = re.compile(r'''__version__ = ['"]([0-9.]+)['"]''') requires = [ 'botocore>=1.24.29,<1.25.0', 'jmespath>=0.7.1,<2.0.0', 's3transfer>=0.5.0,<0.6.0', ] def get_version(): init = open(os.pat...
true
true
f72234cf15ad00ab2c9069cac16b7589616c73e1
2,888
py
Python
postgresqleu/accounting/backendviews.py
bradfordboyle/pgeu-system
bbe70e7a94092c10f11a0f74fda23079532bb018
[ "MIT" ]
11
2020-08-20T11:16:02.000Z
2022-03-12T23:25:04.000Z
postgresqleu/accounting/backendviews.py
bradfordboyle/pgeu-system
bbe70e7a94092c10f11a0f74fda23079532bb018
[ "MIT" ]
71
2019-11-18T10:11:22.000Z
2022-03-27T16:12:57.000Z
postgresqleu/accounting/backendviews.py
bradfordboyle/pgeu-system
bbe70e7a94092c10f11a0f74fda23079532bb018
[ "MIT" ]
18
2019-11-18T09:56:31.000Z
2022-01-08T03:16:43.000Z
from django.shortcuts import render from postgresqleu.util.backendviews import backend_list_editor from postgresqleu.util.auth import authenticate_backend_group from postgresqleu.util.db import exec_to_dict from postgresqleu.accounting.backendforms import BackendAccountClassForm from postgresqleu.accounting.backendfo...
35.654321
91
0.588296
from django.shortcuts import render from postgresqleu.util.backendviews import backend_list_editor from postgresqleu.util.auth import authenticate_backend_group from postgresqleu.util.db import exec_to_dict from postgresqleu.accounting.backendforms import BackendAccountClassForm from postgresqleu.accounting.backendfo...
true
true
f72235c0ef5c4f321a37023769e91aa94995bf56
7,756
py
Python
stl10/utee/misc.py
EricElmoznino/OrthogonalLowrankEmbedding
cce12ca5cb34f7cb888b04739724bdbbd18b1e2d
[ "MIT" ]
64
2017-12-16T18:37:36.000Z
2022-01-18T00:24:31.000Z
stl10/utee/misc.py
EricElmoznino/OrthogonalLowrankEmbedding
cce12ca5cb34f7cb888b04739724bdbbd18b1e2d
[ "MIT" ]
4
2018-05-17T12:09:13.000Z
2022-01-31T01:25:08.000Z
stl10/utee/misc.py
EricElmoznino/OrthogonalLowrankEmbedding
cce12ca5cb34f7cb888b04739724bdbbd18b1e2d
[ "MIT" ]
14
2017-12-06T12:31:54.000Z
2021-12-08T09:33:22.000Z
from __future__ import print_function import cv2 import os import shutil import pickle as pkl import time import numpy as np import hashlib from IPython import embed class Logger(object): def __init__(self): self._logger = None def init(self, logdir, name='log'): if self._logger is None: ...
33.868996
114
0.603533
from __future__ import print_function import cv2 import os import shutil import pickle as pkl import time import numpy as np import hashlib from IPython import embed class Logger(object): def __init__(self): self._logger = None def init(self, logdir, name='log'): if self._logger is None: ...
true
true
f722364d6824f270c535f653164145ae812490d3
2,405
py
Python
hardest/binary.py
proggga/hardest
234cb41115c30a756ee11ed7c5fa41c9979d3303
[ "MIT" ]
2
2018-02-03T13:43:25.000Z
2021-12-03T16:13:49.000Z
hardest/binary.py
proggga/hardest
234cb41115c30a756ee11ed7c5fa41c9979d3303
[ "MIT" ]
8
2017-08-16T08:34:59.000Z
2018-02-05T18:30:44.000Z
hardest/binary.py
proggga/hardest
234cb41115c30a756ee11ed7c5fa41c9979d3303
[ "MIT" ]
1
2018-02-05T18:26:20.000Z
2018-02-05T18:26:20.000Z
"""Binary class.""" import os from subprocess import CalledProcessError from subprocess import check_output from subprocess import STDOUT class Binary(object): # pylint: disable=too-few-public-methods """Represent Binary structure.""" def __init__(self, path): # type: (str) -> None """Binary...
32.945205
79
0.565489
import os from subprocess import CalledProcessError from subprocess import check_output from subprocess import STDOUT class Binary(object): def __init__(self, path): self.executable = os.path.basename(path) self.path = path self._version = '' ...
true
true
f7223666efc6621192cb49805d6a9c9dc5472b81
3,589
py
Python
open_spiel/python/examples/command_line_risk.py
JohnIsak/open_spiel-master
0590539991f04b68b4a20a1c3b553d1445e6696f
[ "Apache-2.0" ]
1
2021-09-16T11:19:12.000Z
2021-09-16T11:19:12.000Z
open_spiel/python/examples/command_line_risk.py
JohnIsak/open_spiel-master
0590539991f04b68b4a20a1c3b553d1445e6696f
[ "Apache-2.0" ]
null
null
null
open_spiel/python/examples/command_line_risk.py
JohnIsak/open_spiel-master
0590539991f04b68b4a20a1c3b553d1445e6696f
[ "Apache-2.0" ]
1
2021-03-25T00:41:02.000Z
2021-03-25T00:41:02.000Z
"""NFSP agents trained on simplified risk.""" from absl import app from absl import flags from absl import logging import tensorflow.compat.v1 as tf import numpy as np import igraph as ig import cairocffi import random import pyspiel from open_spiel.python import policy from open_spiel.python import rl_environment fr...
37
656
0.631931
from absl import app from absl import flags from absl import logging import tensorflow.compat.v1 as tf import numpy as np import igraph as ig import cairocffi import random import pyspiel from open_spiel.python import policy from open_spiel.python import rl_environment from open_spiel.python.algorithms import exploit...
true
true
f722368f08b8a4e011882311849f6584dcfca88a
3,800
py
Python
tests/test_core.py
Borealin/fastclasses-json
3318f02338624145bd488c1f38fd4d7bd6210410
[ "MIT" ]
null
null
null
tests/test_core.py
Borealin/fastclasses-json
3318f02338624145bd488c1f38fd4d7bd6210410
[ "MIT" ]
null
null
null
tests/test_core.py
Borealin/fastclasses-json
3318f02338624145bd488c1f38fd4d7bd6210410
[ "MIT" ]
null
null
null
from dataclasses import dataclass from enum import Enum from typing import List, Optional, Dict import textwrap from fastclasses_json.api import dataclass_json from fastclasses_json import core def test_to_dict_source(): @dataclass class A: x: int assert core._to_dict_source(A) == textwrap.dede...
18.811881
77
0.525
from dataclasses import dataclass from enum import Enum from typing import List, Optional, Dict import textwrap from fastclasses_json.api import dataclass_json from fastclasses_json import core def test_to_dict_source(): @dataclass class A: x: int assert core._to_dict_source(A) == textwrap.dede...
true
true
f72237fc84457838936f32dd89967d14328bc26d
5,984
py
Python
train-text2mel.py
TraceOnBrainOff/pytorch-dc-tts
993a0fbace561729b04df2179b41a0a7ea502e93
[ "MIT" ]
null
null
null
train-text2mel.py
TraceOnBrainOff/pytorch-dc-tts
993a0fbace561729b04df2179b41a0a7ea502e93
[ "MIT" ]
null
null
null
train-text2mel.py
TraceOnBrainOff/pytorch-dc-tts
993a0fbace561729b04df2179b41a0a7ea502e93
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Train the Text2Mel network. See: https://arxiv.org/abs/1710.08969""" __author__ = 'Erdene-Ochir Tuguldur' import sys import time import argparse from tqdm import * import numpy as np import torch import torch.nn.functional as F # project imports from models import Text2Mel from hyperparams ...
34.589595
117
0.639873
__author__ = 'Erdene-Ochir Tuguldur' import sys import time import argparse from tqdm import * import numpy as np import torch import torch.nn.functional as F from models import Text2Mel from hyperparams import HParams as hp from logger import Logger from utils import get_last_checkpoint_file_name, load_checkpoin...
true
true
f722384996b08f28631f548d4a200af6eb57a480
1,467
py
Python
config.py
emphasize/solaredge-pv-monitoring-skill
88b01e221fee42417b1d88c869b0f3525337812e
[ "Apache-2.0" ]
null
null
null
config.py
emphasize/solaredge-pv-monitoring-skill
88b01e221fee42417b1d88c869b0f3525337812e
[ "Apache-2.0" ]
null
null
null
config.py
emphasize/solaredge-pv-monitoring-skill
88b01e221fee42417b1d88c869b0f3525337812e
[ "Apache-2.0" ]
null
null
null
from sqlalchemy import Column, Integer, Float, DateTime SE_CREDENTIALS = {"apiKey": "XXXXXXXXX", "siteID": "12345"} SQL_CREDENTIALS = {"user": "user", "password": "password", "host": "ip:port" } SQL_SSL = {"CA": "/path/to/ca.pem", "C...
39.648649
69
0.576005
from sqlalchemy import Column, Integer, Float, DateTime SE_CREDENTIALS = {"apiKey": "XXXXXXXXX", "siteID": "12345"} SQL_CREDENTIALS = {"user": "user", "password": "password", "host": "ip:port" } SQL_SSL = {"CA": "/path/to/ca.pem", "C...
true
true
f722385a3832caaf47418725fb9eef7f7347a061
5,595
py
Python
tests/test.py
jonsim/tiny-backup
743a6dcc80d20046316a7d89da8b8c58691233a5
[ "MIT" ]
1
2017-06-04T00:23:33.000Z
2017-06-04T00:23:33.000Z
tests/test.py
jonsim/tiny-backup
743a6dcc80d20046316a7d89da8b8c58691233a5
[ "MIT" ]
null
null
null
tests/test.py
jonsim/tiny-backup
743a6dcc80d20046316a7d89da8b8c58691233a5
[ "MIT" ]
null
null
null
#!/usr/bin/env python # (c) Copyright 2017 Jonathan Simmonds # # Licensed under the MIT License # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limita...
29.919786
91
0.664164
""" Main test runner for tiny-backup. Maintained at https://github.com/jonsim/tiny-backup """ import os.path import subprocess import sys import unittest GPG_HOME = os.path.join(sys.path[0], 'gpg-test-homedir') def create_ascii_file(path, kb_size=16): """ Creates an ASCII fil...
false
true
f722389d760f4cedf63fda31313b14ec8ee7c7fa
12,423
py
Python
main/management/commands/updatecomponents.py
biojs/biojs-backend
8bbd34b7be455ecd1be99d549bf958e17623c1c5
[ "MIT" ]
1
2020-02-06T19:10:55.000Z
2020-02-06T19:10:55.000Z
main/management/commands/updatecomponents.py
biojs/biojs-backend
8bbd34b7be455ecd1be99d549bf958e17623c1c5
[ "MIT" ]
30
2018-05-30T22:58:27.000Z
2022-03-12T00:52:21.000Z
main/management/commands/updatecomponents.py
biojs/biojs-backend
8bbd34b7be455ecd1be99d549bf958e17623c1c5
[ "MIT" ]
2
2019-01-29T12:12:07.000Z
2019-02-20T04:19:31.000Z
from django.core.management import BaseCommand import urllib2, json, urllib, base64 from main.models import * try: from biojs.settings import GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET except: print('ERROR: Could not load config!') GITHUB_CLIENT_ID = '' GITHUB_CLIENT_SECRET = '' from datetime import datetim...
45.174545
163
0.5811
from django.core.management import BaseCommand import urllib2, json, urllib, base64 from main.models import * try: from biojs.settings import GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET except: print('ERROR: Could not load config!') GITHUB_CLIENT_ID = '' GITHUB_CLIENT_SECRET = '' from datetime import datetim...
false
true
f7223a217ef47f10efc81de17fba6dfba178144f
732
py
Python
agavepy/response_handlers.py
jchuahtacc/agavepy
5d4917739bb249051bf746cd21f5dcd363ffb287
[ "Python-2.0", "OLDAP-2.3" ]
null
null
null
agavepy/response_handlers.py
jchuahtacc/agavepy
5d4917739bb249051bf746cd21f5dcd363ffb287
[ "Python-2.0", "OLDAP-2.3" ]
null
null
null
agavepy/response_handlers.py
jchuahtacc/agavepy
5d4917739bb249051bf746cd21f5dcd363ffb287
[ "Python-2.0", "OLDAP-2.3" ]
null
null
null
""" response_hanlders.py """ from __future__ import print_function import sys def handle_bad_response_status_code(r): """ Handle a response with a bad status code """ ...
38.526316
80
0.344262
from __future__ import print_function import sys def handle_bad_response_status_code(r): if not r.ok: print("Bad {0} request to {1}, status code {2}".format( r.request.me...
true
true
f7223a8bdb7f3006647c4ab186561a8c97ffae82
15,374
py
Python
venv/lib/python3.5/site-packages/yapf/yapflib/subtype_assigner.py
prashant0598/CoffeeApp
4fa006aebf06e12ed34766450ddcfa548ee63307
[ "MIT" ]
null
null
null
venv/lib/python3.5/site-packages/yapf/yapflib/subtype_assigner.py
prashant0598/CoffeeApp
4fa006aebf06e12ed34766450ddcfa548ee63307
[ "MIT" ]
null
null
null
venv/lib/python3.5/site-packages/yapf/yapflib/subtype_assigner.py
prashant0598/CoffeeApp
4fa006aebf06e12ed34766450ddcfa548ee63307
[ "MIT" ]
null
null
null
# Copyright 2015-2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
38.435
79
0.664368
from lib2to3 import pytree from lib2to3.pgen2 import token from lib2to3.pygram import python_symbols as syms from yapf.yapflib import format_token from yapf.yapflib import pytree_utils from yapf.yapflib import pytree_visitor from yapf.yapflib import style def AssignSubtypes(tree): subtype_assigner = ...
true
true
f7223aed59c6c723e79013fc4c45714b63baace8
362
py
Python
examples/keyword_search.py
smilelight/lightTEXT
b015d0e3524722fb5a8ee5ea83b7fbbd7408f797
[ "Apache-2.0" ]
12
2020-01-26T09:16:21.000Z
2021-12-06T06:44:37.000Z
examples/keyword_search.py
smilelight/lightTEXT
b015d0e3524722fb5a8ee5ea83b7fbbd7408f797
[ "Apache-2.0" ]
null
null
null
examples/keyword_search.py
smilelight/lightTEXT
b015d0e3524722fb5a8ee5ea83b7fbbd7408f797
[ "Apache-2.0" ]
7
2020-04-30T00:37:32.000Z
2021-07-07T06:32:40.000Z
# -*- coding: utf-8 -*- # @Time : 2020/7/2 15:16 # @Author : lightsmile # @Software: PyCharm from lighttext import KeywordProcessor if __name__ == '__main__': kp = KeywordProcessor() kp.add_keyword("曹操") kp.add_keyword("曹丕") kp.add_keyword("司马懿") kp.add_keyword("司马") stn = "曹操、曹丕和司马懿一起去吃大...
20.111111
38
0.638122
from lighttext import KeywordProcessor if __name__ == '__main__': kp = KeywordProcessor() kp.add_keyword("曹操") kp.add_keyword("曹丕") kp.add_keyword("司马懿") kp.add_keyword("司马") stn = "曹操、曹丕和司马懿一起去吃大盘鸡。" print(kp.extract_keywords(stn))
true
true
f7223b5daa0d856c37c6a3df3dcc20d36542e51d
2,203
py
Python
feed/migrations/0001_initial.py
pabulumm/neighbors
59f3f3ae727fe52c7897beaf73d157b02cdcb7a3
[ "BSD-3-Clause" ]
null
null
null
feed/migrations/0001_initial.py
pabulumm/neighbors
59f3f3ae727fe52c7897beaf73d157b02cdcb7a3
[ "BSD-3-Clause" ]
null
null
null
feed/migrations/0001_initial.py
pabulumm/neighbors
59f3f3ae727fe52c7897beaf73d157b02cdcb7a3
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('markers', '__first__'), ('polls', '__first__'), ('neighborhood'...
36.716667
89
0.546074
from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('markers', '__first__'), ('polls', '__first__'), ('neighborhood', '__first__'), ...
true
true
f7223b8b41c3b79f80ac1b63c777994d997a08d9
544
py
Python
__init__.py
edbizarro/airflow_facebook_ads_plugin
53187111bdd00f2bf756bd21e2c853d58784f0a6
[ "Apache-2.0" ]
2
2019-06-19T13:46:11.000Z
2020-10-29T09:51:10.000Z
__init__.py
edbizarro/airflow_facebook_ads_plugin
53187111bdd00f2bf756bd21e2c853d58784f0a6
[ "Apache-2.0" ]
null
null
null
__init__.py
edbizarro/airflow_facebook_ads_plugin
53187111bdd00f2bf756bd21e2c853d58784f0a6
[ "Apache-2.0" ]
2
2019-07-24T21:12:44.000Z
2020-04-30T13:17:42.000Z
from airflow.plugins_manager import AirflowPlugin from facebook_ads_plugin.hooks.facebook_ads_hook import FacebookAdsHook from facebook_ads_plugin.operators.facebook_ads_to_s3_operator import ( FacebookAdsInsightsToS3Operator, FacebookAdsToS3Operator, ) class FacebookAdsPlugin(AirflowPlugin): name = "face...
30.222222
74
0.777574
from airflow.plugins_manager import AirflowPlugin from facebook_ads_plugin.hooks.facebook_ads_hook import FacebookAdsHook from facebook_ads_plugin.operators.facebook_ads_to_s3_operator import ( FacebookAdsInsightsToS3Operator, FacebookAdsToS3Operator, ) class FacebookAdsPlugin(AirflowPlugin): name = "face...
true
true
f7223bea8be2abbd0d7ea132889bc8827caeaa19
2,539
py
Python
samples/list_vmwaretools_status.py
jm66/pyvmomi-community-samples
5ca4a50b767500e07b9bce9fba70240bfa963a4e
[ "Apache-2.0" ]
6
2017-01-25T06:33:47.000Z
2021-01-28T22:20:24.000Z
samples/list_vmwaretools_status.py
zhangjiahaol/pyvmomi-community-samples
905ec34edfbd151531832e98b6a0748fa6ff5e0e
[ "Apache-2.0" ]
12
2019-04-17T02:47:25.000Z
2021-04-02T09:15:37.000Z
samples/list_vmwaretools_status.py
zhangjiahaol/pyvmomi-community-samples
905ec34edfbd151531832e98b6a0748fa6ff5e0e
[ "Apache-2.0" ]
15
2018-04-26T05:18:12.000Z
2021-11-06T04:44:58.000Z
#!/usr/bin/env python # # Written by JM Lopez # GitHub: https://github.com/jm66 # Email: jm@jmll.me # Website: http://jose-manuel.me # # Note: Example code For testing purposes only # # This code has been released under the terms of the Apache-2.0 license # http://opensource.org/licenses/Apache-2.0 # import atexit imp...
27.010638
78
0.625049
import atexit import requests from tools import cli from pyVmomi import vim from pyVim.connect import SmartConnect, Disconnect _columns_four = "{0:<20} {1:<30} {2:<30} {3:<20}" if hasattr(requests.packages.urllib3, 'disable_warnings'): requests.packages.urllib3.disable_warnings() def get_args(): ...
false
true
f7223d3f95314305c7c2ad1f785d545492de0057
6,233
py
Python
nemo_convert_png.py
threadreaper/nemo_convert_png
2961ad4b0ff7e57b59ba98104100707d54915a3d
[ "Apache-2.0" ]
null
null
null
nemo_convert_png.py
threadreaper/nemo_convert_png
2961ad4b0ff7e57b59ba98104100707d54915a3d
[ "Apache-2.0" ]
null
null
null
nemo_convert_png.py
threadreaper/nemo_convert_png
2961ad4b0ff7e57b59ba98104100707d54915a3d
[ "Apache-2.0" ]
null
null
null
'''Extension for Nemo's context menu to easily convert images to PNG and optimize their filesize with pngcrush.''' from __future__ import annotations import os import subprocess from urllib.parse import unquote_plus, urlparse from PIL import Image, UnidentifiedImageError import PySimpleGUI as sg import gi gi.require...
32.633508
109
0.590887
from __future__ import annotations import os import subprocess from urllib.parse import unquote_plus, urlparse from PIL import Image, UnidentifiedImageError import PySimpleGUI as sg import gi gi.require_version('Nemo', '3.0') from gi.repository import GObject, Nemo EXTENSIONS = ('jpg', 'jpeg', 'gif', 'tiff', 'bm...
true
true
f7223df604d66bf40e373b34878bc06930adef9d
25,280
py
Python
tensorflow/python/kernel_tests/signal/fft_ops_test.py
uve/tensorflow
e08079463bf43e5963acc41da1f57e95603f8080
[ "Apache-2.0" ]
null
null
null
tensorflow/python/kernel_tests/signal/fft_ops_test.py
uve/tensorflow
e08079463bf43e5963acc41da1f57e95603f8080
[ "Apache-2.0" ]
null
null
null
tensorflow/python/kernel_tests/signal/fft_ops_test.py
uve/tensorflow
e08079463bf43e5963acc41da1f57e95603f8080
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
41.374795
81
0.587935
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from six.moves import xrange from tensorflow.core.protobuf import config_pb2 from tensorflow.python.framework import dtypes from tensorflow.python.framework import ...
true
true
f7223e2bd6b862b236c58f7382bcb4dc65b65b5b
6,781
py
Python
swagger_client/models/docker_hub_subset.py
swat5421/swagger_portainer
e18b287dc906e171077912677515469ee3f4e5c2
[ "RSA-MD" ]
null
null
null
swagger_client/models/docker_hub_subset.py
swat5421/swagger_portainer
e18b287dc906e171077912677515469ee3f4e5c2
[ "RSA-MD" ]
null
null
null
swagger_client/models/docker_hub_subset.py
swat5421/swagger_portainer
e18b287dc906e171077912677515469ee3f4e5c2
[ "RSA-MD" ]
null
null
null
# coding: utf-8 """ Portainer API Portainer API is an HTTP API served by Portainer. It is used by the Portainer UI and everything you can do with the UI can be done using the HTTP API. Examples are available at https://gist.github.com/deviantony/77026d402366b4b43fa5918d41bc42f8 You can find out more about Por...
46.445205
2,674
0.668043
import pprint import re import six class DockerHubSubset(object): swagger_types = { 'authentication': 'bool', 'username': 'str' } attribute_map = { 'authentication': 'Authentication', 'username': 'Username' } def __init__(self, authentication=None, usernam...
true
true
f7223e8d03aa3063eacccb5aff0438e30ec28eaf
813
py
Python
World 3/Exercise 115/Main.py
NikiReis/Python--Exercises
2f50a3cd6900cec024edcf1a812d1cd86afcdea1
[ "MIT" ]
null
null
null
World 3/Exercise 115/Main.py
NikiReis/Python--Exercises
2f50a3cd6900cec024edcf1a812d1cd86afcdea1
[ "MIT" ]
null
null
null
World 3/Exercise 115/Main.py
NikiReis/Python--Exercises
2f50a3cd6900cec024edcf1a812d1cd86afcdea1
[ "MIT" ]
null
null
null
from Exercise_115.Interface import * from Exercise_115.Functions import * data_base = 'registers.txt' while True: screen() options = menu('Type a value: ') print(line()) if options == 1: if validation_file(data_base) == True: name = str(input('Type the name: ')) age =...
26.225806
67
0.570726
from Exercise_115.Interface import * from Exercise_115.Functions import * data_base = 'registers.txt' while True: screen() options = menu('Type a value: ') print(line()) if options == 1: if validation_file(data_base) == True: name = str(input('Type the name: ')) age =...
true
true
f7223e8d48f1678de1e1a6833f01ec581a312ecd
927
py
Python
tempest/util/cli_parser.py
KiranPawar72/tempest
1fef3dd92b083055793065dd0693454735ec2c01
[ "Apache-2.0" ]
null
null
null
tempest/util/cli_parser.py
KiranPawar72/tempest
1fef3dd92b083055793065dd0693454735ec2c01
[ "Apache-2.0" ]
null
null
null
tempest/util/cli_parser.py
KiranPawar72/tempest
1fef3dd92b083055793065dd0693454735ec2c01
[ "Apache-2.0" ]
1
2020-07-21T02:18:23.000Z
2020-07-21T02:18:23.000Z
import subprocess def cli_returncode(argument_string): p = subprocess.Popen(argument_string,shell=True,stdout=subprocess.PIPE) print str(p.communicate()[0]) p.wait() rc = p.returncode return rc def cli_output(argument_string): p = subprocess.Popen(argument_string,shell=True,stdout=subprocess...
27.264706
75
0.631068
import subprocess def cli_returncode(argument_string): p = subprocess.Popen(argument_string,shell=True,stdout=subprocess.PIPE) print str(p.communicate()[0]) p.wait() rc = p.returncode return rc def cli_output(argument_string): p = subprocess.Popen(argument_string,shell=True,stdout=subprocess...
false
true
f7223f884ccd6891aaf8a29566086baf481a946d
2,219
py
Python
ospurge/resources/swift.py
puppetlabs-operations/ospurge
3ea94225fc4ff55b740867c0590f07fde2d56fe5
[ "Apache-2.0" ]
null
null
null
ospurge/resources/swift.py
puppetlabs-operations/ospurge
3ea94225fc4ff55b740867c0590f07fde2d56fe5
[ "Apache-2.0" ]
5
2022-03-22T07:28:35.000Z
2022-03-22T07:29:16.000Z
ospurge/resources/swift.py
puppetlabs-operations/ospurge
3ea94225fc4ff55b740867c0590f07fde2d56fe5
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed u...
34.671875
78
0.688598
from typing import Any from typing import Dict from typing import Iterable from typing import Iterator from ospurge.resources import base from ospurge.resources.base import BaseServiceResource from ospurge.resources import glance class ListObjectsMixin(BaseServiceResource): def list_objects(self) -> I...
true
true
f7223fe30b9707fcca42785b0ca63b67d1192be3
5,830
py
Python
rl/replay/planner.py
Koen-AI/world-model-as-a-graph
cafde59ef7159d1b62ca508568c85c6498c1342c
[ "MIT" ]
null
null
null
rl/replay/planner.py
Koen-AI/world-model-as-a-graph
cafde59ef7159d1b62ca508568c85c6498c1342c
[ "MIT" ]
null
null
null
rl/replay/planner.py
Koen-AI/world-model-as-a-graph
cafde59ef7159d1b62ca508568c85c6498c1342c
[ "MIT" ]
null
null
null
import threading import numpy as np import torch import os.path as osp from rl.utils import mpi_utils #Replay buffer!!! def sample_her_transitions(buffer, reward_func, batch_size, future_step, future_p=1.0): assert all(k in buffer for k in ['ob', 'ag', 'bg', 'a']) buffer['o2'] = buffer['ob'][:, 1:, :] bu...
41.642857
115
0.61012
import threading import numpy as np import torch import os.path as osp from rl.utils import mpi_utils def sample_her_transitions(buffer, reward_func, batch_size, future_step, future_p=1.0): assert all(k in buffer for k in ['ob', 'ag', 'bg', 'a']) buffer['o2'] = buffer['ob'][:, 1:, :] buffer['ag2'] = buf...
true
true
f72240325176353661f8ec018555cfa01ce1bd7a
5,501
py
Python
derbot/names/admin.py
bdunnette/derbot-docker
b28fd0bf7f078dac1f72024dbd13c233d657c043
[ "MIT" ]
null
null
null
derbot/names/admin.py
bdunnette/derbot-docker
b28fd0bf7f078dac1f72024dbd13c233d657c043
[ "MIT" ]
11
2022-02-21T05:29:51.000Z
2022-03-31T05:33:10.000Z
derbot/names/admin.py
bdunnette/derbot-docker
b28fd0bf7f078dac1f72024dbd13c233d657c043
[ "MIT" ]
null
null
null
from django.conf import settings from django.contrib import admin from django.db import IntegrityError from django.db.models import Exists, OuterRef, Q from django.utils.translation import gettext as _ from import_export import resources from import_export.admin import ImportExportMixin, ImportExportModelAdmin from de...
31.797688
88
0.642065
from django.conf import settings from django.contrib import admin from django.db import IntegrityError from django.db.models import Exists, OuterRef, Q from django.utils.translation import gettext as _ from import_export import resources from import_export.admin import ImportExportMixin, ImportExportModelAdmin from de...
true
true
f722404009a7e9ec7dea247f4a90acdaa2b64d1d
4,678
py
Python
accelbyte_py_sdk/api/basic/models/country_group_object.py
encyphered/accelbyte-python-sdk
09c1e989d7251de308150fdcd3119d662ca2d205
[ "MIT" ]
null
null
null
accelbyte_py_sdk/api/basic/models/country_group_object.py
encyphered/accelbyte-python-sdk
09c1e989d7251de308150fdcd3119d662ca2d205
[ "MIT" ]
null
null
null
accelbyte_py_sdk/api/basic/models/country_group_object.py
encyphered/accelbyte-python-sdk
09c1e989d7251de308150fdcd3119d662ca2d205
[ "MIT" ]
null
null
null
# Auto-generated at 2021-09-27T17:12:38.701190+08:00 # from: Justice Basic Service (1.17.0) # Copyright (c) 2018 - 2021 AccelByte Inc. All Rights Reserved. # This is licensed software from AccelByte Inc, for limitations # and restrictions contact your company contract manager. # pylint: disable=duplicate-code # pylin...
35.709924
127
0.648782
from __future__ import annotations from typing import Any, Dict, List, Optional, Tuple, Union from ....core import Model from ..models.country_object import CountryObject class CountryGroupObject(Model): country_group_code: str ...
true
true
f722419c27153ef2e7230dd43ebd82a7ac439f73
3,127
py
Python
vertx/response.py
hugollm/vertx
d67dbfc08e275e2d0bca5e572fcda1fe58db8e03
[ "MIT" ]
null
null
null
vertx/response.py
hugollm/vertx
d67dbfc08e275e2d0bca5e572fcda1fe58db8e03
[ "MIT" ]
null
null
null
vertx/response.py
hugollm/vertx
d67dbfc08e275e2d0bca5e572fcda1fe58db8e03
[ "MIT" ]
null
null
null
from datetime import datetime from http.client import responses as STATUS_MESSAGES from http.cookies import SimpleCookie import mimetypes import os from .case_insensitive_dict import CaseInsensitiveDict class Response(BaseException): def __init__(self): self.status = 404 self.headers = CaseInsen...
31.27
121
0.574672
from datetime import datetime from http.client import responses as STATUS_MESSAGES from http.cookies import SimpleCookie import mimetypes import os from .case_insensitive_dict import CaseInsensitiveDict class Response(BaseException): def __init__(self): self.status = 404 self.headers = CaseInsen...
true
true
f72241b49458dd8302528f576568424dc16360f7
17,204
py
Python
Python/OneLang/Utils/TSOverviewGenerator.py
onelang/OneLang-CrossCompiled
ed67f2b57e7181712c7d8c2ba85f23b3812d8e3a
[ "MIT" ]
2
2020-11-15T23:38:23.000Z
2020-11-16T00:54:25.000Z
Python/OneLang/Utils/TSOverviewGenerator.py
onelang/OneLang-CrossCompiled
ed67f2b57e7181712c7d8c2ba85f23b3812d8e3a
[ "MIT" ]
null
null
null
Python/OneLang/Utils/TSOverviewGenerator.py
onelang/OneLang-CrossCompiled
ed67f2b57e7181712c7d8c2ba85f23b3812d8e3a
[ "MIT" ]
null
null
null
from onelang_core import * import OneLang.One.Ast.Expressions as exprs import OneLang.One.Ast.Statements as stats import OneLang.One.Ast.Types as types import OneLang.One.Ast.AstTypes as astTypes import OneLang.One.Ast.References as refs import OneLang.One.Ast.Interfaces as ints import onelang_core as one import json i...
66.42471
363
0.602592
from onelang_core import * import OneLang.One.Ast.Expressions as exprs import OneLang.One.Ast.Statements as stats import OneLang.One.Ast.Types as types import OneLang.One.Ast.AstTypes as astTypes import OneLang.One.Ast.References as refs import OneLang.One.Ast.Interfaces as ints import onelang_core as one import json i...
true
true
f72241d12600a83665a811559204ad355ea924e5
56,226
py
Python
pyx12/map_if.py
azoner/pyx12
f60ad528d54c0b0ae25044d2629a29faeefa2f5f
[ "BSD-3-Clause" ]
120
2015-01-30T07:17:26.000Z
2022-03-25T16:42:15.000Z
pyx12/map_if.py
azoner/pyx12
f60ad528d54c0b0ae25044d2629a29faeefa2f5f
[ "BSD-3-Clause" ]
43
2015-02-12T18:42:26.000Z
2021-12-12T22:22:20.000Z
pyx12/map_if.py
azoner/pyx12
f60ad528d54c0b0ae25044d2629a29faeefa2f5f
[ "BSD-3-Clause" ]
85
2015-02-12T16:44:28.000Z
2022-03-24T20:20:46.000Z
###################################################################### # Copyright (c) # All rights reserved. # # This software is licensed as described in the file LICENSE.txt, which # you should have received as part of this distribution. # ###################################################################### """ In...
36.204765
156
0.533543
possible = child.get_unique_key_id_element(id_val) if possible is not None: return child raise EngineError('getnodebypath failed. Path "%s" not found' % spath) def getnodebypath2(self, path_str): x12path = path.X12Path(path_str) i...
true
true
f7224303011a387772607dd8dc079207898f3c44
3,544
py
Python
guillotina/fields/dynamic.py
vinissimus/guillotina
4240adfa5607c022ff6dc5f7335e2c59c1f2217d
[ "BSD-2-Clause" ]
null
null
null
guillotina/fields/dynamic.py
vinissimus/guillotina
4240adfa5607c022ff6dc5f7335e2c59c1f2217d
[ "BSD-2-Clause" ]
null
null
null
guillotina/fields/dynamic.py
vinissimus/guillotina
4240adfa5607c022ff6dc5f7335e2c59c1f2217d
[ "BSD-2-Clause" ]
null
null
null
from collections import namedtuple from guillotina import configure from guillotina import schema from guillotina.component import get_adapter from guillotina.exceptions import ComponentLookupError from guillotina.exceptions import ValueDeserializationError from guillotina.fields.interfaces import IDynamicField from gu...
36.916667
86
0.738431
from collections import namedtuple from guillotina import configure from guillotina import schema from guillotina.component import get_adapter from guillotina.exceptions import ComponentLookupError from guillotina.exceptions import ValueDeserializationError from guillotina.fields.interfaces import IDynamicField from gu...
true
true
f722454298c1db6252d7edf5af2ce44da826cc10
86
py
Python
AtCoder/ABC114/A.py
takaaki82/Java-Lessons
c4f11462bf84c091527dde5f25068498bfb2cc49
[ "MIT" ]
1
2018-11-25T04:15:45.000Z
2018-11-25T04:15:45.000Z
AtCoder/ABC114/A.py
takaaki82/Java-Lessons
c4f11462bf84c091527dde5f25068498bfb2cc49
[ "MIT" ]
null
null
null
AtCoder/ABC114/A.py
takaaki82/Java-Lessons
c4f11462bf84c091527dde5f25068498bfb2cc49
[ "MIT" ]
2
2018-08-08T13:01:14.000Z
2018-11-25T12:38:36.000Z
n = int(input()) if n == 7 or n == 5 or n== 3: print("YES") else: print("NO")
14.333333
29
0.465116
n = int(input()) if n == 7 or n == 5 or n== 3: print("YES") else: print("NO")
true
true
f72245eef78fd33aa667b1d0ea796a7bf15d8024
8,219
py
Python
easyimap/easyimap.py
kujiy/easyimap
4da69d7b7fc051a3384b6e5208930c20dc2aad21
[ "BSD-3-Clause" ]
null
null
null
easyimap/easyimap.py
kujiy/easyimap
4da69d7b7fc051a3384b6e5208930c20dc2aad21
[ "BSD-3-Clause" ]
null
null
null
easyimap/easyimap.py
kujiy/easyimap
4da69d7b7fc051a3384b6e5208930c20dc2aad21
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import imaplib import email from email.header import decode_header import time import re import mimetypes import chardet try: unicode('') except NameError: # for python3 compatibility. unicode = str class MailObj(object): def __init__(self, message, uid=-1, raw=''): ...
31.490421
93
0.602993
import imaplib import email from email.header import decode_header import time import re import mimetypes import chardet try: unicode('') except NameError: unicode = str class MailObj(object): def __init__(self, message, uid=-1, raw=''): self._message = message self._uid = uid if ...
true
true
f722463f411f8a127a6d80dda1849d6cfca25b76
981
py
Python
estoque/migrations/0002_auto_20191003_1822.py
lucasgsouza03/NGKS_Shop
002efbb141a74c1df97479e6bd6f112e4617ff3d
[ "Unlicense" ]
1
2018-03-23T23:08:21.000Z
2018-03-23T23:08:21.000Z
estoque/migrations/0002_auto_20191003_1822.py
lucasgsouza03/NGKS_Shop
002efbb141a74c1df97479e6bd6f112e4617ff3d
[ "Unlicense" ]
7
2018-09-25T02:59:08.000Z
2022-03-11T23:35:05.000Z
estoque/migrations/0002_auto_20191003_1822.py
lucasgsouza03/NGKS_Shop
002efbb141a74c1df97479e6bd6f112e4617ff3d
[ "Unlicense" ]
2
2018-07-10T19:00:34.000Z
2018-08-14T21:05:47.000Z
# Generated by Django 2.0.6 on 2019-10-03 21:22 from django.db import migrations, models import django.db.models.expressions class Migration(migrations.Migration): dependencies = [ ('estoque', '0001_initial'), ] operations = [ migrations.CreateModel( name='Telefone_Fornecedo...
30.65625
142
0.602446
from django.db import migrations, models import django.db.models.expressions class Migration(migrations.Migration): dependencies = [ ('estoque', '0001_initial'), ] operations = [ migrations.CreateModel( name='Telefone_Fornecedor', fields=[ ('id',...
true
true
f72246c907433f3935cdad81e72759bec38c89c6
414
py
Python
server/db/models/book.py
thinkjones/AFSP-Seed
5a7766960c01394902c4898b764580b0320b6941
[ "MIT", "Unlicense" ]
1
2020-02-23T07:48:46.000Z
2020-02-23T07:48:46.000Z
server/db/models/book.py
thinkjones/AFSP-Seed
5a7766960c01394902c4898b764580b0320b6941
[ "MIT", "Unlicense" ]
null
null
null
server/db/models/book.py
thinkjones/AFSP-Seed
5a7766960c01394902c4898b764580b0320b6941
[ "MIT", "Unlicense" ]
null
null
null
from sqlalchemy import Column, Integer, String from server.db.database import Base class Book(Base): """ Books in a library """ __tablename__ = 'books' id = Column(Integer, primary_key=True) name = Column(String(50), unique=True) def __init__(self, name=None, email=None): self.name = name...
24.352941
46
0.640097
from sqlalchemy import Column, Integer, String from server.db.database import Base class Book(Base): __tablename__ = 'books' id = Column(Integer, primary_key=True) name = Column(String(50), unique=True) def __init__(self, name=None, email=None): self.name = name self.email = email ...
true
true
f72246ca5c7d73abd9b2276530d5bd66524ba63b
75,573
py
Python
sockeye/arguments.py
hanayashiki/sockeye
391996eec407d5c1c928e0b9cadd8881b846ac61
[ "Apache-2.0" ]
null
null
null
sockeye/arguments.py
hanayashiki/sockeye
391996eec407d5c1c928e0b9cadd8881b846ac61
[ "Apache-2.0" ]
null
null
null
sockeye/arguments.py
hanayashiki/sockeye
391996eec407d5c1c928e0b9cadd8881b846ac61
[ "Apache-2.0" ]
null
null
null
# Copyright 2017, 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You may not # use this file except in compliance with the License. A copy of the License # is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" fi...
55.243421
121
0.526193
import argparse import os import sys import types import yaml from typing import Any, Callable, Dict, List, Tuple, Optional from . import constants as C from . import data_io from .lr_scheduler import LearningRateSchedulerFixedStep class ConfigArgumentParser(argparse.ArgumentParser): def __init__(se...
true
true
f7224822f3ec084a854bf90a661c91aafcf101c5
12,571
py
Python
recipes/VoxCeleb/SpeakerRec/speaker_verification_plda.py
pnsafari/speechbrain
3a6956a838f3796ff6d041ee6a20bcdea55794cb
[ "Apache-2.0" ]
null
null
null
recipes/VoxCeleb/SpeakerRec/speaker_verification_plda.py
pnsafari/speechbrain
3a6956a838f3796ff6d041ee6a20bcdea55794cb
[ "Apache-2.0" ]
null
null
null
recipes/VoxCeleb/SpeakerRec/speaker_verification_plda.py
pnsafari/speechbrain
3a6956a838f3796ff6d041ee6a20bcdea55794cb
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 """Recipe for training a speaker verification system based on PLDA using the voxceleb dataset. The system employs a pre-trained model followed by a PLDA transformation. The pre-trained model is automatically downloaded from the web if not specified. To run this recipe, run the following command: ...
33.522667
94
0.649988
import os import sys import torch import torchaudio import logging import speechbrain as sb import numpy import pickle from tqdm.contrib import tqdm from hyperpyyaml import load_hyperpyyaml from speechbrain.utils.metric_stats import EER, minDCF from speechbrain.processing.PLDA_LDA import StatObject_SB from speechbrai...
true
true
f722484da1558b8fe0419c64530f9b4438f8aa08
1,757
py
Python
ratcave/utils/vertices.py
aforren1/ratcave
e3862cdaba100ac2c6c78c08c4b09638e0c88fd4
[ "MIT" ]
null
null
null
ratcave/utils/vertices.py
aforren1/ratcave
e3862cdaba100ac2c6c78c08c4b09638e0c88fd4
[ "MIT" ]
1
2018-06-09T14:53:19.000Z
2018-06-09T14:53:19.000Z
ratcave/utils/vertices.py
aforren1/ratcave
e3862cdaba100ac2c6c78c08c4b09638e0c88fd4
[ "MIT" ]
null
null
null
import itertools import numpy as np def pairwise(iterable): "s -> (s0,s1), (s1,s2), (s2, s3), ..." a, b = itertools.tee(iterable) next(b, None) return zip(a, b) def struct_to_ndarray(array): """Turns returns a view of a structured array as a regular ndarray.""" return array.view(array.dtype[0...
40.860465
146
0.692658
import itertools import numpy as np def pairwise(iterable): a, b = itertools.tee(iterable) next(b, None) return zip(a, b) def struct_to_ndarray(array): return array.view(array.dtype[0]).reshape((array.shape[0], -1)) def reindex_vertices(arrays=None): all_arrays = np.hstack(arrays) array_nc...
true
true
f722489cba16865871736137308362868fb163d9
2,886
py
Python
crawler/utils/urltool.py
DallasLJ/spider
53807439d4e8c3b63b8ff7f4b7d99109daf19a02
[ "Apache-2.0" ]
null
null
null
crawler/utils/urltool.py
DallasLJ/spider
53807439d4e8c3b63b8ff7f4b7d99109daf19a02
[ "Apache-2.0" ]
null
null
null
crawler/utils/urltool.py
DallasLJ/spider
53807439d4e8c3b63b8ff7f4b7d99109daf19a02
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 from urllib.parse import urlparse from crawler.error.urlerror import DomainUrlError from crawler.utils.strtool import find_last_index def start_with(str, prefix): if str[0: len(prefix)] == prefix: return True else: return False def get_domain_url(url): url_parse = urlpa...
32.426966
95
0.617117
from urllib.parse import urlparse from crawler.error.urlerror import DomainUrlError from crawler.utils.strtool import find_last_index def start_with(str, prefix): if str[0: len(prefix)] == prefix: return True else: return False def get_domain_url(url): url_parse = urlparse(url) if no...
true
true
f72248a7e8ac3765348e1d07ab9f7ec7004a9c8f
4,283
py
Python
tests/test_config_file.py
jberends/duplicity_backup
99e27060b20dabc0ff8ed416b6a4aeac98143cae
[ "Apache-2.0" ]
2
2019-12-16T10:42:16.000Z
2021-02-24T11:43:17.000Z
tests/test_config_file.py
jberends/duplicity_backup
99e27060b20dabc0ff8ed416b6a4aeac98143cae
[ "Apache-2.0" ]
null
null
null
tests/test_config_file.py
jberends/duplicity_backup
99e27060b20dabc0ff8ed416b6a4aeac98143cae
[ "Apache-2.0" ]
1
2020-06-30T22:57:06.000Z
2020-06-30T22:57:06.000Z
from pathlib import Path from tempfile import NamedTemporaryFile, SpooledTemporaryFile from unittest import TestCase from click.testing import CliRunner from duplicity_backup_s3.config import check_config_file class TestConfig(TestCase): def test_default_config_provided_by_package(self): from duplicity_...
30.375887
88
0.578333
from pathlib import Path from tempfile import NamedTemporaryFile, SpooledTemporaryFile from unittest import TestCase from click.testing import CliRunner from duplicity_backup_s3.config import check_config_file class TestConfig(TestCase): def test_default_config_provided_by_package(self): from duplicity_...
true
true
f722493a284aff97c889421d4a9f473fb5eff05a
39
py
Python
ind2/flights/__init__.py
LokiTheGodOfBitchez/Lab_2.13
57dce79bac021983e7ce7bf5ffeb3d6fb5df0c44
[ "MIT" ]
null
null
null
ind2/flights/__init__.py
LokiTheGodOfBitchez/Lab_2.13
57dce79bac021983e7ce7bf5ffeb3d6fb5df0c44
[ "MIT" ]
null
null
null
ind2/flights/__init__.py
LokiTheGodOfBitchez/Lab_2.13
57dce79bac021983e7ce7bf5ffeb3d6fb5df0c44
[ "MIT" ]
null
null
null
__all__ = ["get_fl", "disp", "select"]
19.5
38
0.589744
__all__ = ["get_fl", "disp", "select"]
true
true
f722496af521cef904cb46d4978debcf2cdb7ef7
967
py
Python
projects/PaLM/configs/palm_pretrain.py
Oneflow-Inc/libai
e473bd3962f07b1e37232d2be39c8257df0ec0f3
[ "Apache-2.0" ]
55
2021-12-10T08:47:06.000Z
2022-03-28T09:02:15.000Z
projects/PaLM/configs/palm_pretrain.py
Oneflow-Inc/libai
e473bd3962f07b1e37232d2be39c8257df0ec0f3
[ "Apache-2.0" ]
106
2021-11-03T05:16:45.000Z
2022-03-31T06:16:23.000Z
projects/PaLM/configs/palm_pretrain.py
Oneflow-Inc/libai
e473bd3962f07b1e37232d2be39c8257df0ec0f3
[ "Apache-2.0" ]
13
2021-12-29T08:12:08.000Z
2022-03-28T06:59:45.000Z
from libai.config import LazyCall, get_config from .models.palm_small import model from libai.evaluation import PPLEvaluator graph = get_config("common/models/graph.py").graph train = get_config("common/train.py").train optim = get_config("common/optim.py").optim data = get_config("common/data/gpt_dataset.py") datalo...
33.344828
73
0.813857
from libai.config import LazyCall, get_config from .models.palm_small import model from libai.evaluation import PPLEvaluator graph = get_config("common/models/graph.py").graph train = get_config("common/train.py").train optim = get_config("common/optim.py").optim data = get_config("common/data/gpt_dataset.py") datalo...
true
true
f7224b5ea5613d417453b2c977cbbf01d3da0e91
14,542
py
Python
py_kbible/kbible.py
sungcheolkim78/py_kbible
3a576c20e5e49f5e85be6ddede20accb6df14663
[ "Apache-2.0" ]
null
null
null
py_kbible/kbible.py
sungcheolkim78/py_kbible
3a576c20e5e49f5e85be6ddede20accb6df14663
[ "Apache-2.0" ]
null
null
null
py_kbible/kbible.py
sungcheolkim78/py_kbible
3a576c20e5e49f5e85be6ddede20accb6df14663
[ "Apache-2.0" ]
1
2021-12-27T00:32:48.000Z
2021-12-27T00:32:48.000Z
""" kbible.py - base bible object and commands """ import pandas as pd import yaml import os import subprocess __author__ = "Sungcheol Kim <sungcheol.kim78@gmail.com>" __docformat__ = "restructuredtext en" class KBible(object): """ Bible text object """ def __init__(self, version="개역한글판성경", debug=False, **k...
30.744186
153
0.536652
import pandas as pd import yaml import os import subprocess __author__ = "Sungcheol Kim <sungcheol.kim78@gmail.com>" __docformat__ = "restructuredtext en" class KBible(object): def __init__(self, version="개역한글판성경", debug=False, **kwargs): self._biblelist = [] self._versionlist = {} thi...
true
true
f7224ba8e912b27faf46182144d00f98d96be6c9
3,203
py
Python
test/packaging/place-files-in-subdirectory.py
moroten/scons
20927b42ed4f0cb87f51287fa3b4b6cf915afcf8
[ "MIT" ]
1
2015-11-04T22:22:10.000Z
2015-11-04T22:22:10.000Z
test/packaging/place-files-in-subdirectory.py
moroten/scons
20927b42ed4f0cb87f51287fa3b4b6cf915afcf8
[ "MIT" ]
1
2020-05-19T02:59:19.000Z
2020-05-21T09:05:19.000Z
test/packaging/place-files-in-subdirectory.py
moroten/scons
20927b42ed4f0cb87f51287fa3b4b6cf915afcf8
[ "MIT" ]
2
2018-01-16T11:29:16.000Z
2020-05-13T16:48:26.000Z
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
27.852174
77
0.667187
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" import os import TestSCons python = TestSCons.python test = TestSCons.TestSCons() tar = test.detect('TAR', 'tar') if not tar: test.skip_test('tar not found, skipping test\n') test.subdir('src') test.write('src/main.c', ...
true
true
f7224c2e58ee05e710df8793a015821ab6d25cf2
1,128
py
Python
imporTant_ModulE/complicated_code.py
bradchesney79/illacceptanything
4594ae4634fdb5e39263a6423dc255ed46c25208
[ "MIT" ]
1
2017-08-21T19:15:43.000Z
2017-08-21T19:15:43.000Z
imporTant_ModulE/complicated_code.py
bradchesney79/illacceptanything
4594ae4634fdb5e39263a6423dc255ed46c25208
[ "MIT" ]
null
null
null
imporTant_ModulE/complicated_code.py
bradchesney79/illacceptanything
4594ae4634fdb5e39263a6423dc255ed46c25208
[ "MIT" ]
1
2018-10-26T23:46:06.000Z
2018-10-26T23:46:06.000Z
def main(important_parameter, ignored_parameter): """ :return: The answer to everything """ important_field = important_parameter # this way the parameter was actually used, hence making it important. def realmain(): def actualrealrealmain(): def nownoteve...
2.96063
113
0.414007
def main(important_parameter, ignored_parameter): """ :return: The answer to everything """ important_field = important_parameter def realmain(): def actualrealrealmain(): def nownotevenkiddingtherealfunction(): print "The...
false
true
f7224cdc48875b4ef34c0499563e922d8a4ccc4b
509
py
Python
snake/food_obj.py
sradley/snake-py
90531c6a867e2eaaffab48218aeab5e2df6f5101
[ "MIT" ]
null
null
null
snake/food_obj.py
sradley/snake-py
90531c6a867e2eaaffab48218aeab5e2df6f5101
[ "MIT" ]
1
2018-07-18T16:18:14.000Z
2018-07-18T16:18:14.000Z
snake/food_obj.py
sradley/snake-py
90531c6a867e2eaaffab48218aeab5e2df6f5101
[ "MIT" ]
1
2019-12-11T16:48:25.000Z
2019-12-11T16:48:25.000Z
""" snake/food_obj.py author: Stephen Radley date: 2018/07/05 package: snake version: 0.0.1 """ from random import randint from snake.location_obj import Location from snake.functions import find_valid_locs """ Food ... """ class Food: """ __init__ ... """ def __ini...
18.851852
57
0.616896
from random import randint from snake.location_obj import Location from snake.functions import find_valid_locs class Food: def __init__(self, dim_x, dim_y, snake): valid_locs = find_valid_locs(dim_x, dim_y, snake) loc = valid_locs[randint(0, len(valid_locs)-1)] self.loc = Location(loc[0...
true
true
f7224cf70c4a227f3f15c140799654f94546b6af
2,709
py
Python
src/sot_talos_balance/test/test_zmpEstimator.py
imaroger/sot-talos-balance
5e56700b4e105273ecf6feb3474789beac469a77
[ "BSD-2-Clause" ]
null
null
null
src/sot_talos_balance/test/test_zmpEstimator.py
imaroger/sot-talos-balance
5e56700b4e105273ecf6feb3474789beac469a77
[ "BSD-2-Clause" ]
null
null
null
src/sot_talos_balance/test/test_zmpEstimator.py
imaroger/sot-talos-balance
5e56700b4e105273ecf6feb3474789beac469a77
[ "BSD-2-Clause" ]
null
null
null
from time import sleep import matplotlib.pyplot as plt import numpy as np from sot_talos_balance.utils.run_test_utils import evalCommandClient, run_ft_calibration, run_test, runCommandClient try: # Python 2 input = raw_input # noqa except NameError: pass run_test('appli_zmpEstimator.py') run_ft_calibr...
30.1
116
0.665559
from time import sleep import matplotlib.pyplot as plt import numpy as np from sot_talos_balance.utils.run_test_utils import evalCommandClient, run_ft_calibration, run_test, runCommandClient try: input = raw_input except NameError: pass run_test('appli_zmpEstimator.py') run_ft_calibration('robot.ftc...
true
true
f7224e7cd4f3a5fd5563d15fb1ff78a94c670d63
98,578
py
Python
hexapodengine2.py
jonathan-sung/Hexapod-GA-Gait
5e82c2f141f6bd88d8b6c0a7b658c8ce0c5be8f4
[ "MIT" ]
null
null
null
hexapodengine2.py
jonathan-sung/Hexapod-GA-Gait
5e82c2f141f6bd88d8b6c0a7b658c8ce0c5be8f4
[ "MIT" ]
null
null
null
hexapodengine2.py
jonathan-sung/Hexapod-GA-Gait
5e82c2f141f6bd88d8b6c0a7b658c8ce0c5be8f4
[ "MIT" ]
1
2022-03-10T12:57:56.000Z
2022-03-10T12:57:56.000Z
import pybullet as p import math import pybullet_data import time import random import numpy as np import serial def radToPwm(angle): return ((2000 * angle) / math.pi) + 1500 # t in ms; the closer t is to 0, more accuracy but less smooth motion def updateRealServos(ser, t): # right legs ser.write( ...
259.415789
5,640
0.809653
import pybullet as p import math import pybullet_data import time import random import numpy as np import serial def radToPwm(angle): return ((2000 * angle) / math.pi) + 1500 def updateRealServos(ser, t): ser.write( f'#0P{radToPwm(-p.getJointState(hexapod_ID, 8)[0])}T{t}#1P{radToPwm(p.getJoint...
true
true
f7224ef99c59f74d5cbe11ac856e1a968e88db76
190
py
Python
image_turk.py
kostyaev/image-turk
aa2a3519e74d23612f699e4b9cbe5ed5f1fdcba6
[ "BSD-2-Clause" ]
7
2016-06-18T11:22:43.000Z
2019-08-28T23:28:41.000Z
image_turk.py
kostyaev/image-turk
aa2a3519e74d23612f699e4b9cbe5ed5f1fdcba6
[ "BSD-2-Clause" ]
null
null
null
image_turk.py
kostyaev/image-turk
aa2a3519e74d23612f699e4b9cbe5ed5f1fdcba6
[ "BSD-2-Clause" ]
2
2016-12-12T07:40:42.000Z
2018-02-19T13:26:07.000Z
from web import app from gevent.pywsgi import WSGIServer if __name__ == '__main__': http_server = WSGIServer(('', 5000), app) http_server.start() http_server.serve_forever()
17.272727
45
0.705263
from web import app from gevent.pywsgi import WSGIServer if __name__ == '__main__': http_server = WSGIServer(('', 5000), app) http_server.start() http_server.serve_forever()
true
true
f7224f396301cfc76ade2e118f525a3fe4ace8c6
827
py
Python
pixelflow/distributions/normal.py
didriknielsen/pixelcnn_flow
9030f6a66d5ff83d7d299541ed55b20b20bb9a15
[ "MIT" ]
25
2020-02-12T00:35:48.000Z
2021-09-18T14:30:43.000Z
pixelflow/distributions/normal.py
didriknielsen/pixelcnn_flow
9030f6a66d5ff83d7d299541ed55b20b20bb9a15
[ "MIT" ]
1
2021-08-05T10:00:04.000Z
2021-08-10T11:11:16.000Z
pixelflow/distributions/normal.py
didriknielsen/pixelcnn_flow
9030f6a66d5ff83d7d299541ed55b20b20bb9a15
[ "MIT" ]
null
null
null
import math import torch from pixelflow.distributions import Distribution from pixelflow.utils import sum_except_batch from torch.distributions import Normal class StandardNormal(Distribution): """A multivariate Normal with zero mean and unit covariance.""" def __init__(self, shape): super(StandardNo...
34.458333
119
0.71705
import math import torch from pixelflow.distributions import Distribution from pixelflow.utils import sum_except_batch from torch.distributions import Normal class StandardNormal(Distribution): def __init__(self, shape): super(StandardNormal, self).__init__() self.shape = torch.Size(shape) ...
true
true
f7224fab731b69e54808a625abdf671ae47b423f
1,776
py
Python
aliyun-python-sdk-workbench-ide/aliyunsdkworkbench_ide/request/v20210121/SetAppEnvConfigRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-workbench-ide/aliyunsdkworkbench_ide/request/v20210121/SetAppEnvConfigRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-workbench-ide/aliyunsdkworkbench_ide/request/v20210121/SetAppEnvConfigRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
37
78
0.756757
from aliyunsdkcore.request import RpcRequest class SetAppEnvConfigRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'Workbench-ide', '2021-01-21', 'SetAppEnvConfig') self.set_method('POST') def get_DeployStage(self): return self.get_query_params().get('DeployStage') ...
true
true
f7224fb7697b3ac73408439748e830cf29800f8a
3,097
py
Python
AWS_Deployment/serve/predict.py
srimanthtenneti/Deep-Learning-NanoDegree
d99b09530a96f4aeca7adf3b9188e1d5fc4104d4
[ "Apache-2.0" ]
1
2021-04-25T08:29:39.000Z
2021-04-25T08:29:39.000Z
AWS_Deployment/serve/predict.py
srimanthtenneti/Deep-Learning-NanoDegree
d99b09530a96f4aeca7adf3b9188e1d5fc4104d4
[ "Apache-2.0" ]
null
null
null
AWS_Deployment/serve/predict.py
srimanthtenneti/Deep-Learning-NanoDegree
d99b09530a96f4aeca7adf3b9188e1d5fc4104d4
[ "Apache-2.0" ]
null
null
null
import argparse import json import os import pickle import sys import sagemaker_containers import pandas as pd import numpy as np import torch import torch.nn as nn import torch.optim as optim import torch.utils.data from model import LSTMClassifier from utils import review_to_words, convert_and_pad def model_fn(mod...
32.946809
107
0.698418
import argparse import json import os import pickle import sys import sagemaker_containers import pandas as pd import numpy as np import torch import torch.nn as nn import torch.optim as optim import torch.utils.data from model import LSTMClassifier from utils import review_to_words, convert_and_pad def model_fn(mod...
true
true
f72250448cf99a09119d7986eaa24621dace8924
100
py
Python
src/scraping/__init__.py
tuokri/ArgumentWinnerBot
3a8befc4fba5e50cb64e05df4527499a1a7625fc
[ "MIT" ]
null
null
null
src/scraping/__init__.py
tuokri/ArgumentWinnerBot
3a8befc4fba5e50cb64e05df4527499a1a7625fc
[ "MIT" ]
null
null
null
src/scraping/__init__.py
tuokri/ArgumentWinnerBot
3a8befc4fba5e50cb64e05df4527499a1a7625fc
[ "MIT" ]
null
null
null
from .scraping import evaluate_comment_reply_pair __all__ = [ "evaluate_comment_reply_pair", ]
16.666667
49
0.79
from .scraping import evaluate_comment_reply_pair __all__ = [ "evaluate_comment_reply_pair", ]
true
true
f72250b5bb01fc66955a6a49d7aaeab3b753695e
48,823
py
Python
epochServiceApi2/api_service_workspace.py
exastro-suite/epoch
c8ad14e9b1812310811320c9c099364917538021
[ "Apache-2.0" ]
5
2021-04-15T07:12:28.000Z
2022-02-03T12:36:20.000Z
epochServiceApi2/api_service_workspace.py
exastro-suite/epoch
c8ad14e9b1812310811320c9c099364917538021
[ "Apache-2.0" ]
29
2021-07-20T06:54:46.000Z
2022-03-25T01:49:34.000Z
epochServiceApi2/api_service_workspace.py
exastro-suite/epoch
c8ad14e9b1812310811320c9c099364917538021
[ "Apache-2.0" ]
10
2021-04-15T07:50:19.000Z
2021-12-08T05:40:37.000Z
# Copyright 2021 NEC Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
46.365622
184
0.543473
from flask import Flask, request, abort, jsonify, render_template from datetime import datetime from datetime import timedelta, timezone import inspect import os import json import tempfile import subprocess import time import re from urllib.parse import urlparse import base64 import requests from request...
true
true
f722512a52d85c2f133dde222b5d65e575bea90e
13,065
py
Python
qa/rpc-tests/test_framework/util.py
lambocoin-core/lambocoin
aa851cb2b9b8a4c733ef26d71e4502f45890859e
[ "MIT" ]
null
null
null
qa/rpc-tests/test_framework/util.py
lambocoin-core/lambocoin
aa851cb2b9b8a4c733ef26d71e4502f45890859e
[ "MIT" ]
null
null
null
qa/rpc-tests/test_framework/util.py
lambocoin-core/lambocoin
aa851cb2b9b8a4c733ef26d71e4502f45890859e
[ "MIT" ]
null
null
null
# Copyright (c) 2014 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Helpful routines for regression testing # # Add python-bitcoinrpc to module search path: import os import sys from decimal impor...
36.596639
110
0.647608
import os import sys from decimal import Decimal, ROUND_DOWN import json import random import shutil import subprocess import time import re from authproxy import AuthServiceProxy, JSONRPCException from util import * def p2p_port(n): return 11000 + n + os.getpid()%999 def rpc_port(n): return 12000 + ...
false
true
f72251726696c1e896ff03b3100c48683916efdc
92
py
Python
Software_University/python_basics/for_loop/lecture/numbers_n_to_1.py
Ivanazzz/SoftUni-W3resource-Python
892321a290e22a91ff2ac2fef5316179a93f2f17
[ "MIT" ]
1
2022-01-26T07:38:11.000Z
2022-01-26T07:38:11.000Z
Software_University/python_basics/for_loop/lecture/numbers_n_to_1.py
Ivanazzz/SoftUni-W3resource-Python
892321a290e22a91ff2ac2fef5316179a93f2f17
[ "MIT" ]
null
null
null
Software_University/python_basics/for_loop/lecture/numbers_n_to_1.py
Ivanazzz/SoftUni-W3resource-Python
892321a290e22a91ff2ac2fef5316179a93f2f17
[ "MIT" ]
null
null
null
number = int(input("Enter an integer number: ")) for i in range(number, 0, -1): print(i)
30.666667
48
0.641304
number = int(input("Enter an integer number: ")) for i in range(number, 0, -1): print(i)
true
true
f722528cdceebb50fb10ce727ffbd969111d6c3e
3,113
py
Python
youtube_dl/extractor/sbs.py
ajaivasudeve/youtube-dl
6f8cb72f689c0aac630e06e91785f8428f1ba3f3
[ "Unlicense" ]
55
2015-01-18T08:44:39.000Z
2021-09-15T19:49:52.000Z
youtube_dl/extractor/sbs.py
ajaivasudeve/youtube-dl
6f8cb72f689c0aac630e06e91785f8428f1ba3f3
[ "Unlicense" ]
14
2019-11-30T00:01:34.000Z
2019-12-17T16:04:53.000Z
youtube_dl/extractor/sbs.py
ajaivasudeve/youtube-dl
6f8cb72f689c0aac630e06e91785f8428f1ba3f3
[ "Unlicense" ]
36
2015-10-07T18:32:33.000Z
2021-01-28T10:06:15.000Z
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( smuggle_url, ExtractorError, ) class SBSIE(InfoExtractor): IE_DESC = 'sbs.com.au' _VALID_URL = r'https?://(?:www\.)?sbs\.com\.au/(?:ondemand(?:/video/(?:single/)?|.*?\bplay=)|news/(?:embeds...
40.960526
136
0.585609
from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( smuggle_url, ExtractorError, ) class SBSIE(InfoExtractor): IE_DESC = 'sbs.com.au' _VALID_URL = r'https?://(?:www\.)?sbs\.com\.au/(?:ondemand(?:/video/(?:single/)?|.*?\bplay=)|news/(?:embeds/)?video/)(?P<i...
true
true
f72252ba555ae2cebc8bddb12841fa7a995f772f
1,498
py
Python
code/fastai_ext/fastai_ext/hyperparameter.py
jandremarais/TabularLearner
7905b06a31fc6e0b0adf6a13a0fb445bdfe00c96
[ "MIT" ]
14
2019-07-15T07:38:36.000Z
2021-12-08T23:54:15.000Z
code/fastai_ext/fastai_ext/hyperparameter.py
jandremarais/TabularLearner
7905b06a31fc6e0b0adf6a13a0fb445bdfe00c96
[ "MIT" ]
2
2019-05-07T13:56:51.000Z
2019-08-08T01:27:58.000Z
code/fastai_ext/fastai_ext/hyperparameter.py
jandremarais/TabularLearner
7905b06a31fc6e0b0adf6a13a0fb445bdfe00c96
[ "MIT" ]
2
2021-03-23T11:06:45.000Z
2021-03-23T11:34:48.000Z
import pandas as pd import itertools from functools import partial from fastai.callbacks import CSVLogger def get_config_df(config): df = pd.DataFrame(list(itertools.product(*config.values())), columns=config.keys()) df.index = [f'model_{i+1}' for i in range(len(df))] return df def create_experiment(nm, ...
38.410256
112
0.688251
import pandas as pd import itertools from functools import partial from fastai.callbacks import CSVLogger def get_config_df(config): df = pd.DataFrame(list(itertools.product(*config.values())), columns=config.keys()) df.index = [f'model_{i+1}' for i in range(len(df))] return df def create_experiment(nm, ...
true
true
f72252fb17ff4e53251c9c88acde167184bfaac9
410
py
Python
supriya/assets/synthdefs/simple_sine.py
butayama/supriya
0c197324ecee4232381221880d1f40e109bb756c
[ "MIT" ]
191
2015-11-13T02:28:42.000Z
2022-03-29T10:26:44.000Z
supriya/assets/synthdefs/simple_sine.py
butayama/supriya
0c197324ecee4232381221880d1f40e109bb756c
[ "MIT" ]
130
2016-01-04T16:59:02.000Z
2022-02-26T15:37:20.000Z
supriya/assets/synthdefs/simple_sine.py
butayama/supriya
0c197324ecee4232381221880d1f40e109bb756c
[ "MIT" ]
22
2016-05-04T10:32:16.000Z
2022-02-26T19:22:45.000Z
import supriya def _build_synthdef(): with supriya.SynthDefBuilder(amplitude=0, bus=0, frequency=440) as builder: supriya.ugens.Out.ar( bus=builder["bus"], source=supriya.ugens.SinOsc.ar(frequency=builder["frequency"]) * builder["amplitude"], ) return builde...
22.777778
79
0.64878
import supriya def _build_synthdef(): with supriya.SynthDefBuilder(amplitude=0, bus=0, frequency=440) as builder: supriya.ugens.Out.ar( bus=builder["bus"], source=supriya.ugens.SinOsc.ar(frequency=builder["frequency"]) * builder["amplitude"], ) return builde...
true
true
f7225437013ea810afe0c5483e568e663d0f6c87
1,027
py
Python
my-third-web-app.py
thunderboltsid/snake-taming-101
2f3fef8303d20fd026adc5b995510f375bcaba22
[ "MIT" ]
1
2020-07-25T19:21:47.000Z
2020-07-25T19:21:47.000Z
talks/snake-taming-101/my-third-web-app.py
thunderboltsid/sshukla.de
a39d05cc3d3c74277b0e64d49847c1d7e3053a80
[ "CC-BY-3.0" ]
null
null
null
talks/snake-taming-101/my-third-web-app.py
thunderboltsid/sshukla.de
a39d05cc3d3c74277b0e64d49847c1d7e3053a80
[ "CC-BY-3.0" ]
null
null
null
#!/usr/bin/env python from flask import Flask, request app = Flask(__name__) # Shared storage for our list of tasks tasks = ["GenCS 1"] form = ("<form action='/' method='POST'>" "<input autofocus type='text' name='task' />" "<input type='submit' />" "</form>") def delete_form(idx): retur...
24.452381
94
0.552093
from flask import Flask, request app = Flask(__name__) tasks = ["GenCS 1"] form = ("<form action='/' method='POST'>" "<input autofocus type='text' name='task' />" "<input type='submit' />" "</form>") def delete_form(idx): return ("<form action='/delete' method='POST'>" ...
true
true
f7225447221fae0751d91a0b3b5cbbb1de9be1d8
3,535
py
Python
alipay/aop/api/domain/AlipayOpenPublicPartnerMenuOperateModel.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/domain/AlipayOpenPublicPartnerMenuOperateModel.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/domain/AlipayOpenPublicPartnerMenuOperateModel.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * class AlipayOpenPublicPartnerMenuOperateModel(object): def __init__(self): self._action_param = None self._action_type = None self._agreement_id = None self._public_id =...
30.474138
83
0.603395
import json from alipay.aop.api.constant.ParamConstants import * class AlipayOpenPublicPartnerMenuOperateModel(object): def __init__(self): self._action_param = None self._action_type = None self._agreement_id = None self._public_id = None self._third_account_id = None ...
true
true
f72254bb72393c444db26b25e01795cdaaecd70c
1,377
py
Python
annif/backend/dummy.py
ooduor/Annif
2fd7db9c709ef018e15671d8fafe3aa9cbd4f2cf
[ "Apache-2.0" ]
null
null
null
annif/backend/dummy.py
ooduor/Annif
2fd7db9c709ef018e15671d8fafe3aa9cbd4f2cf
[ "Apache-2.0" ]
null
null
null
annif/backend/dummy.py
ooduor/Annif
2fd7db9c709ef018e15671d8fafe3aa9cbd4f2cf
[ "Apache-2.0" ]
null
null
null
"""Dummy backend for testing basic interaction of projects and backends""" from annif.suggestion import SubjectSuggestion, ListSuggestionResult from . import backend class DummyBackend(backend.AnnifLearningBackend): name = "dummy" initialized = False uri = 'http://example.org/dummy' label = 'dummy' ...
36.236842
74
0.571532
from annif.suggestion import SubjectSuggestion, ListSuggestionResult from . import backend class DummyBackend(backend.AnnifLearningBackend): name = "dummy" initialized = False uri = 'http://example.org/dummy' label = 'dummy' def default_params(self): return backend.AnnifBackend.DEFAULT_...
true
true
f72255d3f9ce93464b0a41607b812236a3af47db
931
py
Python
tests/test_classical_names.py
hramezani/inflect
c16192f0197890f6e439a1186f3296c2ce4d7303
[ "MIT" ]
null
null
null
tests/test_classical_names.py
hramezani/inflect
c16192f0197890f6e439a1186f3296c2ce4d7303
[ "MIT" ]
null
null
null
tests/test_classical_names.py
hramezani/inflect
c16192f0197890f6e439a1186f3296c2ce4d7303
[ "MIT" ]
null
null
null
from nose.tools import eq_ import inflect def test_ancient_1(): p = inflect.engine() # DEFAULT... eq_(p.plural_noun("Sally"), "Sallys", msg="classical 'names' active") eq_(p.plural_noun("Jones", 0), "Joneses", msg="classical 'names' active") # "person" PLURALS ACTIVATED... p.classical(nam...
34.481481
86
0.663802
from nose.tools import eq_ import inflect def test_ancient_1(): p = inflect.engine() eq_(p.plural_noun("Sally"), "Sallys", msg="classical 'names' active") eq_(p.plural_noun("Jones", 0), "Joneses", msg="classical 'names' active") p.classical(names=True) eq_(p.plural_noun("Sally"), "S...
true
true
f722572e191342082a2d695c14606225fcf5fbef
2,485
py
Python
pages/base_page.py
bloodmilk44/stepik_final_task
897b32b5dba3a07e5cf720c1c3eb57887a0c24cb
[ "Apache-2.0" ]
null
null
null
pages/base_page.py
bloodmilk44/stepik_final_task
897b32b5dba3a07e5cf720c1c3eb57887a0c24cb
[ "Apache-2.0" ]
null
null
null
pages/base_page.py
bloodmilk44/stepik_final_task
897b32b5dba3a07e5cf720c1c3eb57887a0c24cb
[ "Apache-2.0" ]
null
null
null
import math import time from .locators import BasePageLocators from selenium.common.exceptions import NoSuchElementException, NoAlertPresentException, TimeoutException from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC class BasePage(): def __i...
35
104
0.654326
import math import time from .locators import BasePageLocators from selenium.common.exceptions import NoSuchElementException, NoAlertPresentException, TimeoutException from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC class BasePage(): def __i...
true
true
f722574172b83587f0c7ea3c96cb8a8b1454e86c
1,935
py
Python
aliyun-python-sdk-codeup/aliyunsdkcodeup/request/v20200414/UpdateRepositoryMemberRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
1,001
2015-07-24T01:32:41.000Z
2022-03-25T01:28:18.000Z
aliyun-python-sdk-codeup/aliyunsdkcodeup/request/v20200414/UpdateRepositoryMemberRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
363
2015-10-20T03:15:00.000Z
2022-03-08T12:26:19.000Z
aliyun-python-sdk-codeup/aliyunsdkcodeup/request/v20200414/UpdateRepositoryMemberRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
682
2015-09-22T07:19:02.000Z
2022-03-22T09:51:46.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
33.947368
78
0.762274
from aliyunsdkcore.request import RoaRequest class UpdateRepositoryMemberRequest(RoaRequest): def __init__(self): RoaRequest.__init__(self, 'codeup', '2020-04-14', 'UpdateRepositoryMember') self.set_uri_pattern('/api/v3/projects/[ProjectId]/members/[UserId]') self.set_method('PUT') def...
true
true
f72257798e083e50f24091ddc6e6f591079e6a2a
829
py
Python
home/urls.py
Adyyousf/ToDo-List
a5d200b0eab14702c927dc451b47535b80be3093
[ "MIT" ]
1
2021-07-08T05:37:05.000Z
2021-07-08T05:37:05.000Z
home/urls.py
Adyyousf/ToDo-List
a5d200b0eab14702c927dc451b47535b80be3093
[ "MIT" ]
null
null
null
home/urls.py
Adyyousf/ToDo-List
a5d200b0eab14702c927dc451b47535b80be3093
[ "MIT" ]
null
null
null
"""todoList URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-base...
34.541667
77
0.705669
from django.contrib import admin from django.urls import path, include from home import views urlpatterns = [ path('', views.home, name='home'), path('tasks', views.tasks, name='tasks') ]
true
true
f722586083347dd4e8df04b1cab2405526be06e0
396
py
Python
python/st.py
waytai/open
00fc6891a8fe8e7dc84067ebea8e69895e14e912
[ "BSD-2-Clause" ]
null
null
null
python/st.py
waytai/open
00fc6891a8fe8e7dc84067ebea8e69895e14e912
[ "BSD-2-Clause" ]
null
null
null
python/st.py
waytai/open
00fc6891a8fe8e7dc84067ebea8e69895e14e912
[ "BSD-2-Clause" ]
null
null
null
class Student(object): def __init__(self, name): self.name = name def __repr__(self): print "8"*20 return 'Student object (name: %s)' % self.name def __str__(self): print "*"*20 return 'Student object str (name: %s)' % self.name def __call__(self): print ...
22
58
0.578283
class Student(object): def __init__(self, name): self.name = name def __repr__(self): print "8"*20 return 'Student object (name: %s)' % self.name def __str__(self): print "*"*20 return 'Student object str (name: %s)' % self.name def __call__(self): print ...
false
true
f72258f0a94deb8548e6e4572af13c548a6b4b9e
13,349
py
Python
lib2to3/main.py
wrye-bash/2to3
a2cf203dc5bb7eb77a1b32d9138aa2f579cd94ba
[ "0BSD" ]
null
null
null
lib2to3/main.py
wrye-bash/2to3
a2cf203dc5bb7eb77a1b32d9138aa2f579cd94ba
[ "0BSD" ]
null
null
null
lib2to3/main.py
wrye-bash/2to3
a2cf203dc5bb7eb77a1b32d9138aa2f579cd94ba
[ "0BSD" ]
null
null
null
""" Main program for 2to3. """ from __future__ import with_statement, print_function import sys import os import difflib import logging import shutil import operator import optparse from . import refactor def diff_texts(a, b, filename): """Return a unified diff of two strings.""" a = a.splitlines() b =...
44.056106
83
0.589183
from __future__ import with_statement, print_function import sys import os import difflib import logging import shutil import operator import optparse from . import refactor def diff_texts(a, b, filename): a = a.splitlines() b = b.splitlines() return difflib.unified_diff(a, b, filename, filename, ...
true
true
f722591cc7fdff90b26972f0289a12c85a0e1d74
7,624
py
Python
facilyst/mocks/mock_types/features.py
ParthivNaresh/Facilyst
786932b0afcf07cd300b2e6ce55ccf7f9e4c49d9
[ "MIT" ]
null
null
null
facilyst/mocks/mock_types/features.py
ParthivNaresh/Facilyst
786932b0afcf07cd300b2e6ce55ccf7f9e4c49d9
[ "MIT" ]
3
2022-02-26T17:19:28.000Z
2022-03-01T09:34:19.000Z
facilyst/mocks/mock_types/features.py
ParthivNaresh/facilyst
786932b0afcf07cd300b2e6ce55ccf7f9e4c49d9
[ "MIT" ]
null
null
null
"""A mock type that returns features data.""" import pandas as pd import woodwork as ww from facilyst.mocks import MockBase from facilyst.mocks.mock_types.utils import mock_features_dtypes class Features(MockBase): """Class to manage mock data creation of features. :param num_rows: The number of observation...
45.380952
150
0.677859
import pandas as pd import woodwork as ww from facilyst.mocks import MockBase from facilyst.mocks.mock_types.utils import mock_features_dtypes class Features(MockBase): name = "Features" def __init__( self, num_rows=100, library="pandas", ints=True, rand_ints=True, ...
true
true
f7225955a80a43c4c49fab791ea51586ce36ebdf
1,887
py
Python
sopel/modules/spellcheck.py
CrushAndRun/sopel-Bodhi
98d9661663a59f91880df21749c4861d163020fe
[ "EFL-2.0" ]
2
2016-02-02T22:24:16.000Z
2016-02-02T22:50:05.000Z
sopel/modules/spellcheck.py
CrushAndRun/sopel-Bodhi
98d9661663a59f91880df21749c4861d163020fe
[ "EFL-2.0" ]
null
null
null
sopel/modules/spellcheck.py
CrushAndRun/sopel-Bodhi
98d9661663a59f91880df21749c4861d163020fe
[ "EFL-2.0" ]
null
null
null
# coding=utf-8 """ spellcheck.py - Sopel spell check Module Copyright © 2012, Elad Alfassa, <elad@fedoraproject.org> Copyright © 2012, Lior Ramati Licensed under the Eiffel Forum License 2. http://sopel.chat This module relies on pyenchant, on Fedora and Red Hat based system, it can be found in the package python-enc...
34.309091
114
0.660837
from __future__ import unicode_literals, absolute_import, print_function, division try: import enchant except ImportError: enchant = None from sopel.module import commands, example @commands('spellcheck', 'spell') @example('.spellcheck stuff') def spellcheck(bot, trigger): if not enchant: bot.say...
true
true
f7225a1eb55fafef881df8e0e24e41bf096ad066
14,358
py
Python
ThorLabs_motor_controller/ThorLabs_controller_rs232_driver.py
vstadnytskyi/drivers
3d4dbc43dac7d13ddec25b179252ccea18792bc7
[ "MIT" ]
null
null
null
ThorLabs_motor_controller/ThorLabs_controller_rs232_driver.py
vstadnytskyi/drivers
3d4dbc43dac7d13ddec25b179252ccea18792bc7
[ "MIT" ]
null
null
null
ThorLabs_motor_controller/ThorLabs_controller_rs232_driver.py
vstadnytskyi/drivers
3d4dbc43dac7d13ddec25b179252ccea18792bc7
[ "MIT" ]
null
null
null
#!/bin/env python """ ThorLabs TDC001 and KDC001 cubes Low Level code. This code specifies communication protocola for T snd K cubes. Valentyn Stadnytskyi valentyn.stadnytskyi@nih.gov The communication protocols: https://www.thorlabs.com/Software/Motion%20Control/APT_Communications_Protocol.pdf issue 20 """ from t...
33.704225
132
0.566792
from time import sleep, time from numpy import zeros, ones, mean, std, sign from serial import Serial from struct import pack, unpack from pdb import pm import logging from logging import debug, info, warn, error class Motor(object): def __init__(self): self.baudrate = 115200 self.controller = ''...
true
true
f7225f7016abfde0e482ac3eab7b4abbb27306bd
229
py
Python
ocumol/__init__.py
lqtza/OcuMOL_Leap
dcba934513535e3199c058a7e228603ee652b65d
[ "Apache-2.0" ]
4
2015-03-24T12:05:22.000Z
2015-09-30T12:24:09.000Z
ocumol/__init__.py
lqtza/OcuMOL_Leap
dcba934513535e3199c058a7e228603ee652b65d
[ "Apache-2.0" ]
null
null
null
ocumol/__init__.py
lqtza/OcuMOL_Leap
dcba934513535e3199c058a7e228603ee652b65d
[ "Apache-2.0" ]
null
null
null
import sys from ocumol.leapConfig import leapPath if leapPath not in sys.path: sys.path.append(leapPath) #from ocumol.src.hands.leap_only import PymolListener # from ocumol.src.pymol.pymolHmd import PymolHmd, pymolHmdScript
28.625
64
0.812227
import sys from ocumol.leapConfig import leapPath if leapPath not in sys.path: sys.path.append(leapPath)
true
true
f7225fff5d36c02275a0328a3bf2e93a987b9578
10,936
py
Python
cc/engine/tests/test_util.py
Abbas-000/cc.engine
eb4b5e5f6c695a16c7ab8bcc52036cf16a0fba22
[ "MIT" ]
6
2017-12-25T08:18:43.000Z
2021-01-02T09:02:59.000Z
cc/engine/tests/test_util.py
Abbas-000/cc.engine
eb4b5e5f6c695a16c7ab8bcc52036cf16a0fba22
[ "MIT" ]
39
2017-11-17T01:59:38.000Z
2021-12-14T19:14:12.000Z
cc/engine/tests/test_util.py
Abbas-000/cc.engine
eb4b5e5f6c695a16c7ab8bcc52036cf16a0fba22
[ "MIT" ]
17
2017-12-25T08:18:13.000Z
2021-04-12T12:50:35.000Z
import email import StringIO from nose.tools import assert_raises from lxml import etree from webob import Request import nose import cc.license from cc.engine import util util._activate_testing() class FakeAcceptLanguage(object): def __init__(self, best_matches): self._best_matches = best_matches ...
35.855738
896
0.684254
import email import StringIO from nose.tools import assert_raises from lxml import etree from webob import Request import nose import cc.license from cc.engine import util util._activate_testing() class FakeAcceptLanguage(object): def __init__(self, best_matches): self._best_matches = best_matches ...
true
true
f72260a0d9e69cc1728afa301a3238b988fe14f2
3,900
py
Python
attention_intervention_winobias.py
simassakenis/CausalMediationAnalysis
ad46c02cdda88e13e2e891e9968c365e093ecc99
[ "MIT" ]
null
null
null
attention_intervention_winobias.py
simassakenis/CausalMediationAnalysis
ad46c02cdda88e13e2e891e9968c365e093ecc99
[ "MIT" ]
null
null
null
attention_intervention_winobias.py
simassakenis/CausalMediationAnalysis
ad46c02cdda88e13e2e891e9968c365e093ecc99
[ "MIT" ]
null
null
null
"""Performs attention intervention on Winobias samples and saves results to JSON file.""" import json import fire from pandas import DataFrame from transformers import ( GPT2Tokenizer, TransfoXLTokenizer, XLNetTokenizer, BertTokenizer, DistilBertTokenizer, RobertaTokenizer ) import winobias from attention_ut...
45.348837
135
0.678718
import json import fire from pandas import DataFrame from transformers import ( GPT2Tokenizer, TransfoXLTokenizer, XLNetTokenizer, BertTokenizer, DistilBertTokenizer, RobertaTokenizer ) import winobias from attention_utils import perform_interventions, get_odds_ratio from experiment import Model def get_in...
true
true
f72260b9d6cb7e207bd2ab87653d3aa297dd46fb
11,973
py
Python
code/python/StocksAPIforDigitalPortals/v2/fds/sdk/StocksAPIforDigitalPortals/model/stock_notation_screener_search_data_simple_moving_average_trading_days_since_crossover_sma50vs200_number_days_maximum.py
factset/enterprise-sdk
3fd4d1360756c515c9737a0c9a992c7451d7de7e
[ "Apache-2.0" ]
6
2022-02-07T16:34:18.000Z
2022-03-30T08:04:57.000Z
code/python/StocksAPIforDigitalPortals/v2/fds/sdk/StocksAPIforDigitalPortals/model/stock_notation_screener_search_data_simple_moving_average_trading_days_since_crossover_sma50vs200_number_days_maximum.py
factset/enterprise-sdk
3fd4d1360756c515c9737a0c9a992c7451d7de7e
[ "Apache-2.0" ]
2
2022-02-07T05:25:57.000Z
2022-03-07T14:18:04.000Z
code/python/StocksAPIforDigitalPortals/v2/fds/sdk/StocksAPIforDigitalPortals/model/stock_notation_screener_search_data_simple_moving_average_trading_days_since_crossover_sma50vs200_number_days_maximum.py
factset/enterprise-sdk
3fd4d1360756c515c9737a0c9a992c7451d7de7e
[ "Apache-2.0" ]
null
null
null
""" Prime Developer Trial No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1 Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from fds.sdk.S...
45.352273
181
0.58373
import re import sys from fds.sdk.StocksAPIforDigitalPortals.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_...
true
true
f722630ddd2f0f9085208c0807dc71815ceb42e5
58,571
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_07_01/aio/operations/_application_gateways_operations.py
praveenkuttappan/azure-sdk-for-python
4b79413667b7539750a6c7dde15737013a3d4bd5
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_07_01/aio/operations/_application_gateways_operations.py
v-xuto/azure-sdk-for-python
9c6296d22094c5ede410bc83749e8df8694ccacc
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_07_01/aio/operations/_application_gateways_operations.py
v-xuto/azure-sdk-for-python
9c6296d22094c5ede410bc83749e8df8694ccacc
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
50.842882
219
0.678407
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure....
true
true
f722634ba5e70ca4a34dee0817bd68f32852423b
12,616
py
Python
assets/tools/ipfs_pinner.py
foxdproject/foxdcoin
9db505f6f32bd3e51bd2b2da533744c98cee23af
[ "MIT" ]
7
2020-06-19T20:49:02.000Z
2022-01-31T09:12:18.000Z
assets/tools/ipfs_pinner.py
foxdproject/foxdcoin
9db505f6f32bd3e51bd2b2da533744c98cee23af
[ "MIT" ]
1
2021-02-26T19:14:11.000Z
2021-02-26T19:14:11.000Z
assets/tools/ipfs_pinner.py
foxdproject/foxdcoin
9db505f6f32bd3e51bd2b2da533744c98cee23af
[ "MIT" ]
12
2020-05-02T20:01:44.000Z
2022-03-03T11:02:13.000Z
#!/usr/bin/env python3 # Install pip3 (if not there) # sudo apt-get install python3-pip # Install zmq with # pip3 install pyzmq # Install bitcoinrpc with # pip3 install python-bitcoinrpc # Install ipfsapi with # pip3 install ipfsapi import sys import argparse import zmq import struct import binascii imp...
28.097996
121
0.668912
import sys import argparse import zmq import struct import binascii import codecs import random import os import subprocess import json import signal JSON_ONLY_CHECK = False FILESIZE_THRESHOLD = 100000000 cli = "foxdcoin-cli" mode = "" rpc_port = 8766 rpc_user = 'rpcuser' rpc_pass = 'rpcpass555' ...
true
true
f7226478feaa40df2f49df721dfaa0ea3f1d2930
95
py
Python
diary/utils.py
sjwhole/diary-backend
5e72972e39c6417c394da44643c2c9054193eef5
[ "MIT" ]
1
2021-07-09T16:26:30.000Z
2021-07-09T16:26:30.000Z
diary/utils.py
sjwhole/diary-backend
5e72972e39c6417c394da44643c2c9054193eef5
[ "MIT" ]
1
2021-07-22T06:48:13.000Z
2021-07-22T07:09:02.000Z
diary/utils.py
sjwhole/diary-backend
5e72972e39c6417c394da44643c2c9054193eef5
[ "MIT" ]
null
null
null
def set_message(message): content = { "message": message } return content
13.571429
26
0.578947
def set_message(message): content = { "message": message } return content
true
true
f722649afa920019c781bd8ddba28544b387b710
766
py
Python
flamesense4.py
saaketporay/Stovetop-Flame-Notifier
2cc66e8f51046b14160cfd74e97e69647e95c526
[ "MIT" ]
2
2016-08-18T13:06:26.000Z
2019-12-17T00:31:31.000Z
flamesense4.py
saaketporay/Stovetop-Flame-Notifier
2cc66e8f51046b14160cfd74e97e69647e95c526
[ "MIT" ]
null
null
null
flamesense4.py
saaketporay/Stovetop-Flame-Notifier
2cc66e8f51046b14160cfd74e97e69647e95c526
[ "MIT" ]
null
null
null
import os import serial from time import sleep ser = serial.Serial('/dev/ttyACM0',9600) #counter = 32 flame = False newflame = False while True: #counter +=1 value = ser.readline() print(value) try: if int(value) > 400: newflame = True else: newflame = False ...
20.157895
72
0.498695
import os import serial from time import sleep ser = serial.Serial('/dev/ttyACM0',9600) flame = False newflame = False while True: value = ser.readline() print(value) try: if int(value) > 400: newflame = True else: newflame = False if newflame != flame...
false
true
f72267a505fe7d3afa184c0f7c8d907922327ad9
3,718
py
Python
api/app/tools/202104.py
yunfei07/vue-flask-in-action
8695f9a252bb3e2136609f421e02a0d3f01c0e58
[ "MIT" ]
null
null
null
api/app/tools/202104.py
yunfei07/vue-flask-in-action
8695f9a252bb3e2136609f421e02a0d3f01c0e58
[ "MIT" ]
null
null
null
api/app/tools/202104.py
yunfei07/vue-flask-in-action
8695f9a252bb3e2136609f421e02a0d3f01c0e58
[ "MIT" ]
null
null
null
from math import ceil def chunk(lst, size): return list( map(lambda x: lst[x * size:x * size + size], list(range(0, ceil(len(lst) / size))))) def find_str_index(str1, str2): if not str2: return "str2 not none" for x in str2: if x in str1: return str1.index...
17.961353
68
0.461001
from math import ceil def chunk(lst, size): return list( map(lambda x: lst[x * size:x * size + size], list(range(0, ceil(len(lst) / size))))) def find_str_index(str1, str2): if not str2: return "str2 not none" for x in str2: if x in str1: return str1.index...
true
true
f72267d179fcc6174846127af025da7c0e86fefe
4,008
py
Python
cookbook/c02/p19_descent_parser.py
Xiao-jiuguan/python3-cookbook
95d5a1d5cb59b5d88e816f6f10eb1e5befc25b05
[ "Apache-2.0" ]
3
2018-05-10T01:13:08.000Z
2018-06-17T12:34:07.000Z
cookbook/c02/p19_descent_parser.py
Xiao-jiuguan/python3-cookbook
95d5a1d5cb59b5d88e816f6f10eb1e5befc25b05
[ "Apache-2.0" ]
2
2020-09-19T17:10:23.000Z
2020-10-17T16:43:52.000Z
cookbook/c02/p19_descent_parser.py
Xiao-jiuguan/python3-cookbook
95d5a1d5cb59b5d88e816f6f10eb1e5befc25b05
[ "Apache-2.0" ]
1
2020-12-22T06:33:18.000Z
2020-12-22T06:33:18.000Z
#!/usr/bin/env python # -*- encoding: utf-8 -*- """ Topic: 下降解析器 Desc : """ import re import collections # Token specification NUM = r'(?P<NUM>\d+)' PLUS = r'(?P<PLUS>\+)' MINUS = r'(?P<MINUS>-)' TIMES = r'(?P<TIMES>\*)' DIVIDE = r'(?P<DIVIDE>/)' LPAREN = r'(?P<LPAREN>\()' RPAREN = r'(?P<RPAREN>\))' WS = r'(?P<WS>\s+...
30.363636
71
0.558633
import re import collections NUM = r'(?P<NUM>\d+)' PLUS = r'(?P<PLUS>\+)' MINUS = r'(?P<MINUS>-)' TIMES = r'(?P<TIMES>\*)' DIVIDE = r'(?P<DIVIDE>/)' LPAREN = r'(?P<LPAREN>\()' RPAREN = r'(?P<RPAREN>\))' WS = r'(?P<WS>\s+)' master_pat = re.compile('|'.join([NUM, PLUS, MINUS, TIMES, ...
true
true
f72268fc7af81ab7a500353a54e46fd7610982d8
1,517
py
Python
tools/GraphClust/Preprocessing/splitSHAPE.py
pavanvidem/galaxytools
339363f6c9d817bc2c35997b4dfdd3ca99a37055
[ "MIT" ]
null
null
null
tools/GraphClust/Preprocessing/splitSHAPE.py
pavanvidem/galaxytools
339363f6c9d817bc2c35997b4dfdd3ca99a37055
[ "MIT" ]
null
null
null
tools/GraphClust/Preprocessing/splitSHAPE.py
pavanvidem/galaxytools
339363f6c9d817bc2c35997b4dfdd3ca99a37055
[ "MIT" ]
null
null
null
import re import sys shape_file = sys.argv[1] pattern = re.compile("^>.*$") toWrite = "" count_for_id = 1 seq_counter = 0 new_id = "" seq_id = [] seq_string = [] orig_id = [] name_file = "FASTA/data.names" array_all_chunks = [] with open(name_file, "r") as f: for line in f: if len(line.strip()) == 0: ...
24.467742
77
0.566908
import re import sys shape_file = sys.argv[1] pattern = re.compile("^>.*$") toWrite = "" count_for_id = 1 seq_counter = 0 new_id = "" seq_id = [] seq_string = [] orig_id = [] name_file = "FASTA/data.names" array_all_chunks = [] with open(name_file, "r") as f: for line in f: if len(line.strip()) == 0: ...
true
true