hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 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
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f771339cb8df5ab30a9bdfc92686e200fe8dd381
1,242
py
Python
onkyo-rpi/command.py
ahaack/onkyo-rpi
8cd9a4e3d8786bc408f834c5458c5a41834f42d2
[ "MIT" ]
13
2018-04-27T14:11:04.000Z
2022-03-26T01:25:27.000Z
onkyo-rpi/command.py
ahaack/onkyo-rpi
8cd9a4e3d8786bc408f834c5458c5a41834f42d2
[ "MIT" ]
2
2019-11-08T17:57:05.000Z
2021-09-30T15:46:45.000Z
onkyo-rpi/command.py
ahaack/onkyo-rpi
8cd9a4e3d8786bc408f834c5458c5a41834f42d2
[ "MIT" ]
1
2022-03-08T18:39:04.000Z
2022-03-08T18:39:04.000Z
import time import pigpio class OnkyoCommand(): def __init__(self, pi, gpio): self.pi = pi self.gpio = gpio pi.set_mode(gpio, pigpio.OUTPUT) def _create_header_wave(self): wf = [] wf.append(pigpio.pulse(1 << self.gpio, 0, 3000)) wf.append(pigpio.pulse(0, 1 << ...
27
60
0.571659
import time import pigpio class OnkyoCommand(): def __init__(self, pi, gpio): self.pi = pi self.gpio = gpio pi.set_mode(gpio, pigpio.OUTPUT) def _create_header_wave(self): wf = [] wf.append(pigpio.pulse(1 << self.gpio, 0, 3000)) wf.append(pigpio.pulse(0, 1 << ...
true
true
f7713413955a262f89949e60a380c81ae088a1f3
5,030
py
Python
src/robot/variables/tablesetter.py
vprashanth777/Selenium
b3c48b75e73322891bb697f251b32a9a9d8b4dbe
[ "ECL-2.0", "Apache-2.0" ]
1
2018-03-10T11:10:20.000Z
2018-03-10T11:10:20.000Z
src/robot/variables/tablesetter.py
vprashanth777/Selenium
b3c48b75e73322891bb697f251b32a9a9d8b4dbe
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/robot/variables/tablesetter.py
vprashanth777/Selenium
b3c48b75e73322891bb697f251b32a9a9d8b4dbe
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Copyright 2008-2015 Nokia Solutions and Networks # # 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 l...
33.533333
76
0.640755
from contextlib import contextmanager from robot.errors import DataError from robot.utils import DotDict, is_string, split_from_equals, unic from .isvar import validate_var from .splitter import VariableSplitter class VariableTableSetter(object): def __init__(self, store): self._store = store def...
true
true
f77134ad856339086d49a349f339c6becf486478
433
py
Python
data/scripts/templates/object/tangible/component/vehicle/shared_military_e.py
obi-two/GameServer
7d37024e2291a97d49522610cd8f1dbe5666afc2
[ "MIT" ]
20
2015-02-23T15:11:56.000Z
2022-03-18T20:56:48.000Z
data/scripts/templates/object/tangible/component/vehicle/shared_military_e.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
null
null
null
data/scripts/templates/object/tangible/component/vehicle/shared_military_e.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
20
2015-04-04T16:35:59.000Z
2022-03-24T14:54:37.000Z
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/component/vehicle/shared_military_e.iff" result.attribute_template_...
25.470588
76
0.715935
from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/component/vehicle/shared_military_e.iff" result.attribute_template_id = -1 result.stfName("","") return result
true
true
f77134c2fab7829498a99c5b70512fb463068227
9,740
py
Python
netman/core/objects/exceptions.py
idjaw/netman
58ba898de6e450a24b4f1721ce274ad3e12f9d33
[ "Apache-2.0" ]
1
2016-01-28T17:56:51.000Z
2016-01-28T17:56:51.000Z
netman/core/objects/exceptions.py
idjaw/netman
58ba898de6e450a24b4f1721ce274ad3e12f9d33
[ "Apache-2.0" ]
2
2021-12-13T20:55:50.000Z
2022-03-29T22:07:13.000Z
netman/core/objects/exceptions.py
idjaw/netman
58ba898de6e450a24b4f1721ce274ad3e12f9d33
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 Internap. # # 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, so...
36.074074
161
0.734292
from netman.core.objects.access_groups import IN, OUT class NetmanException(Exception): pass class InvalidValue(NetmanException): def __init__(self, msg="Invalid Value"): super(InvalidValue, self).__init__(msg) class UnknownResource(NetmanException): def __init__(self, msg="Resource not found...
true
true
f771353688ecea5952261720e1e71b08929c8b04
1,922
py
Python
ASK/tests/POM_Forgot_password.py
SQAPractical/AssesmentControlePython
ac41cf4bf4df7ef5ca9fa718d26b0333468be6ca
[ "Apache-2.0" ]
null
null
null
ASK/tests/POM_Forgot_password.py
SQAPractical/AssesmentControlePython
ac41cf4bf4df7ef5ca9fa718d26b0333468be6ca
[ "Apache-2.0" ]
null
null
null
ASK/tests/POM_Forgot_password.py
SQAPractical/AssesmentControlePython
ac41cf4bf4df7ef5ca9fa718d26b0333468be6ca
[ "Apache-2.0" ]
null
null
null
import unittest from fixtures.base import BaseTestCase from pages.forgot_password_page import ForgotPasswordPage from pages.login_page import LoginPage from parameters.parameters import * class ForgotPasswordTestCase(BaseTestCase): def setUp(self): super(ForgotPasswordTestCase, self).setUp() self....
43.681818
96
0.776795
import unittest from fixtures.base import BaseTestCase from pages.forgot_password_page import ForgotPasswordPage from pages.login_page import LoginPage from parameters.parameters import * class ForgotPasswordTestCase(BaseTestCase): def setUp(self): super(ForgotPasswordTestCase, self).setUp() self....
true
true
f77135a29a1e0c362d000bf987fe51615d45d28d
14,360
py
Python
encryption/enc_basic.py
androdev4u/XFLTReaT
17d4ec857dd1b98d8f57fec2edc540fce7087b21
[ "MIT" ]
315
2017-08-25T04:17:56.000Z
2022-03-03T14:28:46.000Z
encryption/enc_basic.py
FDlucifer/XFLTReaT
17d4ec857dd1b98d8f57fec2edc540fce7087b21
[ "MIT" ]
8
2017-09-10T21:03:06.000Z
2020-01-24T15:48:58.000Z
encryption/enc_basic.py
FDlucifer/XFLTReaT
17d4ec857dd1b98d8f57fec2edc540fce7087b21
[ "MIT" ]
71
2017-08-25T06:01:43.000Z
2022-03-24T15:35:53.000Z
# MIT License # Copyright (c) 2018 Balazs Bucsay # 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, ...
44.458204
149
0.760376
import sys if "enc_basic.py" in sys.argv[0]: print("[-] Instead of poking around just try: python xfltreat.py --help") sys.exit(-1) import os import base64 from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.asymmetric import ec from cryptography.hazmat.primitives impo...
false
true
f77135b36d7afa6fa018c4aeaf95a94b2d9df44c
58,874
py
Python
neutron/agent/l3/router_info.py
congnt95/neutron
6a73a362c5ff5b7c28c15a49f47a9900c0d2b4e1
[ "Apache-2.0" ]
1,080
2015-01-04T08:35:00.000Z
2022-03-27T09:15:52.000Z
neutron/agent/l3/router_info.py
congnt95/neutron
6a73a362c5ff5b7c28c15a49f47a9900c0d2b4e1
[ "Apache-2.0" ]
24
2015-02-21T01:48:28.000Z
2021-11-26T02:38:56.000Z
neutron/agent/l3/router_info.py
congnt95/neutron
6a73a362c5ff5b7c28c15a49f47a9900c0d2b4e1
[ "Apache-2.0" ]
1,241
2015-01-02T10:47:10.000Z
2022-03-27T09:42:23.000Z
# Copyright (c) 2014 OpenStack Foundation # # 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 ...
44.433208
79
0.608741
import abc import collections import netaddr from neutron_lib import constants as lib_constants from neutron_lib.exceptions import l3 as l3_exc from neutron_lib.utils import helpers from oslo_log import log as logging from oslo_utils import netutils from pyroute2.netlink import exceptions \ as pyroute2_exc from...
true
true
f77135c058a1d73fcd26fa29d25998a0b5f4db26
6,967
py
Python
kubernetes/client/models/v1_container_port.py
redjohn/python
5e512ff564c244c50cab780d821542ed56aa965a
[ "Apache-2.0" ]
1
2019-04-14T23:51:35.000Z
2019-04-14T23:51:35.000Z
kubernetes/client/models/v1_container_port.py
redjohn/python
5e512ff564c244c50cab780d821542ed56aa965a
[ "Apache-2.0" ]
null
null
null
kubernetes/client/models/v1_container_port.py
redjohn/python
5e512ff564c244c50cab780d821542ed56aa965a
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.14.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re...
29.029167
202
0.584326
from pprint import pformat from six import iteritems import re class V1ContainerPort(object): swagger_types = { 'container_port': 'int', 'host_ip': 'str', 'host_port': 'int', 'name': 'str', 'protocol': 'str' } attribute_map = { 'container_port': 'conta...
true
true
f77136f0f45cadc21d9054e8e5497112756da897
21,753
py
Python
scripts/test_translator.py
sjvs/c2rust
0eb7359b35f9159c446074748d9dbd09fb212ce9
[ "BSD-3-Clause" ]
null
null
null
scripts/test_translator.py
sjvs/c2rust
0eb7359b35f9159c446074748d9dbd09fb212ce9
[ "BSD-3-Clause" ]
null
null
null
scripts/test_translator.py
sjvs/c2rust
0eb7359b35f9159c446074748d9dbd09fb212ce9
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 import errno import os import sys import logging import argparse import re from common import ( config as c, pb, Colors, get_cmd_or_die, get_rust_toolchain_libpath, NonZeroReturn, regex, setup_logging, die, ensure_dir, ) from enum import Enum from rust_fi...
33.312404
96
0.573898
import errno import os import sys import logging import argparse import re from common import ( config as c, pb, Colors, get_cmd_or_die, get_rust_toolchain_libpath, NonZeroReturn, regex, setup_logging, die, ensure_dir, ) from enum import Enum from rust_file import ( CrateTy...
true
true
f771375e538d41ef1f4dc7960f5371c3ca72fd0b
809
py
Python
main.py
latonaio/dummytool-for-throwing-cues-via-kanban
adc4798b70fe477923e12b32954d37e8ca20b0ea
[ "MIT" ]
1
2021-11-05T01:24:53.000Z
2021-11-05T01:24:53.000Z
main.py
latonaio/dummytool-for-throwing-cues-via-kanban
adc4798b70fe477923e12b32954d37e8ca20b0ea
[ "MIT" ]
null
null
null
main.py
latonaio/dummytool-for-throwing-cues-via-kanban
adc4798b70fe477923e12b32954d37e8ca20b0ea
[ "MIT" ]
null
null
null
import time import logging from aion.microservice import main_decorator, Options, WITH_KANBAN # services.ymlに記載するサービス名 SERVICE_NAME = "dummy-test-kanban" CONNECTION_KEY = "default" # @main_decorator は aion-statuskan と接続・マイクロサービスが正常に立ち上がったことを通知する @main_decorator(SERVICE_NAME, WITH_KANBAN) def main(opt: Options): c...
24.515152
66
0.587145
import time import logging from aion.microservice import main_decorator, Options, WITH_KANBAN SERVICE_NAME = "dummy-test-kanban" CONNECTION_KEY = "default" @main_decorator(SERVICE_NAME, WITH_KANBAN) def main(opt: Options): conn = opt.get_conn() try: while(1): logging.debug("sendmes...
true
true
f771381052bcee482c050ccd5243c6880172d699
16,959
py
Python
website/canvas/migrations/0115_update_scores_for_all_pop_page.py
bopopescu/drawquest-web
8d8f9149b6efeb65202809a5f8916386f58a1b3b
[ "BSD-3-Clause" ]
61
2015-11-10T17:13:46.000Z
2021-08-06T17:58:30.000Z
website/canvas/migrations/0115_update_scores_for_all_pop_page.py
bopopescu/drawquest-web
8d8f9149b6efeb65202809a5f8916386f58a1b3b
[ "BSD-3-Clause" ]
13
2015-11-11T07:49:41.000Z
2021-06-09T03:45:31.000Z
website/canvas/migrations/0115_update_scores_for_all_pop_page.py
bopopescu/drawquest-web
8d8f9149b6efeb65202809a5f8916386f58a1b3b
[ "BSD-3-Clause" ]
18
2015-11-11T04:50:04.000Z
2021-08-20T00:57:11.000Z
# encoding: utf-8 import datetime from south.db import db from south.v2 import DataMigration from django.db import models #from canvas.models import Comment, Category class Migration(DataMigration): def forwards(self, orm): # This only mattered for live instances at the time. """ for cate...
75.039823
195
0.553983
import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): def backwards(self, orm): models = { 'auth.group': { 'Meta': {'object_name': 'Group'}, 'id': ('django...
true
true
f77138e4692f7b5bfd7005e2ccc0a3619ddcfc03
576
py
Python
split_string_balanced.py
zubrik13/coding_intrv_prer
853a7c8357ad43601313daadcc1c494d403a9aa0
[ "MIT" ]
null
null
null
split_string_balanced.py
zubrik13/coding_intrv_prer
853a7c8357ad43601313daadcc1c494d403a9aa0
[ "MIT" ]
null
null
null
split_string_balanced.py
zubrik13/coding_intrv_prer
853a7c8357ad43601313daadcc1c494d403a9aa0
[ "MIT" ]
null
null
null
""" Balanced strings are those that have an equal quantity of 'L' and 'R' characters. Given a balanced string s, split it in the maximum amount of balanced strings. Return the maximum amount of split balanced strings. Input: s = "RLRRLLRLRL" Output: 4 Explanation: s can be split into "RL", "RRLL", "RL", "RL", each su...
19.2
81
0.640625
""" Balanced strings are those that have an equal quantity of 'L' and 'R' characters. Given a balanced string s, split it in the maximum amount of balanced strings. Return the maximum amount of split balanced strings. Input: s = "RLRRLLRLRL" Output: 4 Explanation: s can be split into "RL", "RRLL", "RL", "RL", each su...
false
true
f7713a56d4ba2255eb92725f89d3c803fdf91001
3,365
py
Python
src/oci/container_engine/models/create_node_shape_config_details.py
LaudateCorpus1/oci-python-sdk
b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/container_engine/models/create_node_shape_config_details.py
LaudateCorpus1/oci-python-sdk
b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/container_engine/models/create_node_shape_config_details.py
LaudateCorpus1/oci-python-sdk
b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# coding: utf-8 # Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
31.157407
245
0.657058
from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel from oci.decorators import init_model_state_from_kwargs @init_model_state_from_kwargs class CreateNodeShapeConfigDetails(object): def __init__(self, **kwargs): self.swagger_types = { 'ocpus': 'floa...
true
true
f7713aeee9fbc4a3504435e3412f6b231e32bc43
7,367
py
Python
trainer/trainer.py
vamsigp/EVA5
e03603cbf41f8d18d2e0ac149ddc5718371a360e
[ "MIT" ]
null
null
null
trainer/trainer.py
vamsigp/EVA5
e03603cbf41f8d18d2e0ac149ddc5718371a360e
[ "MIT" ]
1
2020-10-03T02:04:31.000Z
2020-10-03T02:04:31.000Z
trainer/trainer.py
vamsigp/EVA5
e03603cbf41f8d18d2e0ac149ddc5718371a360e
[ "MIT" ]
3
2020-08-30T12:38:31.000Z
2021-05-13T04:32:52.000Z
from __future__ import print_function import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from tqdm import tqdm class Trainer(): def __init__(self, model, device, train_loader, test_loader, optimizer, loss_func, lr_scheduler): self.is_last_epoch = False # ...
40.701657
174
0.576625
from __future__ import print_function import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from tqdm import tqdm class Trainer(): def __init__(self, model, device, train_loader, test_loader, optimizer, loss_func, lr_scheduler): self.is_last_epoch = False ...
true
true
f7713ba985433951f68486044c96ba2a95824bcf
48,390
py
Python
salt/modules/archive.py
sacren/salt
887336c6deaaad6f9ad4948b69472bd043962d56
[ "Apache-2.0" ]
null
null
null
salt/modules/archive.py
sacren/salt
887336c6deaaad6f9ad4948b69472bd043962d56
[ "Apache-2.0" ]
null
null
null
salt/modules/archive.py
sacren/salt
887336c6deaaad6f9ad4948b69472bd043962d56
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' A module to wrap (non-Windows) archive calls .. versionadded:: 2014.1.0 ''' from __future__ import absolute_import import contextlib # For < 2.7 compat import copy import errno import glob import logging import os import re import shlex import stat import subprocess import tarfile import z...
35.871016
124
0.575842
from __future__ import absolute_import import contextlib import copy import errno import glob import logging import os import re import shlex import stat import subprocess import tarfile import zipfile try: from shlex import quote as _quote except ImportError: from pipes import quote as _quote from salt.ext ...
true
true
f7713c441795414c0a00ac3cec56c3f0740a8649
3,220
py
Python
tests/test_project/settings.py
egregors/django-silly-search
03a4910345fbce0e17fa54288e4cda696fa10c82
[ "BSD-3-Clause" ]
3
2016-06-19T03:07:27.000Z
2016-06-27T08:34:31.000Z
tests/test_project/settings.py
Egregors/django-silly-search
03a4910345fbce0e17fa54288e4cda696fa10c82
[ "BSD-3-Clause" ]
1
2020-09-25T04:23:12.000Z
2020-09-28T04:22:25.000Z
tests/test_project/settings.py
Egregors/django-silly-search
03a4910345fbce0e17fa54288e4cda696fa10c82
[ "BSD-3-Clause" ]
null
null
null
""" Django settings for test_project project. Generated by 'django-admin startproject' using Django 1.9.7. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import ...
25.967742
91
0.697826
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = '4j@=ys*p@x+t+jhvhb+_5_d3sgn&$+ezmcj)ie%m%#r7+@p!9*' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes...
true
true
f7713d57d0f69cf151e15e73f39ef1a503d52cf1
992
py
Python
demos/hello/app.py
yunlinzi/helloflask
807568001f9aece974d31a806a1f1f314bc38b02
[ "MIT" ]
null
null
null
demos/hello/app.py
yunlinzi/helloflask
807568001f9aece974d31a806a1f1f314bc38b02
[ "MIT" ]
null
null
null
demos/hello/app.py
yunlinzi/helloflask
807568001f9aece974d31a806a1f1f314bc38b02
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ :author: Grey Li (李辉) :url: http://greyli.com :copyright: © 2018 Grey Li :license: MIT, see LICENSE for more details. """ import click from flask import Flask app = Flask(__name__) # the minimal Flask application # app.route()装饰器把根地址(/)和函数index()绑定起来,当用户访问该URL(/)时就触发此函数ind...
22.044444
64
0.659274
import click from flask import Flask app = Flask(__name__) @app.route('/') def index(): return '<h1>Hello, World!</h1>' @app.route('/hi') @app.route('/hello') def say_hello(): return '<h1>Hello, Flask!</h1>' @app.route('/greet', defaults={'name': 'Programmer'}) @app.route('/greet/<name>') def greet(name)...
true
true
f7713f0e3791fbaada238cee45739fa204637c13
192,238
py
Python
zgrab2_schemas/zgrab2/mysql_errors.py
aspacewalz/zgrab2
d9ed4f141dae102d65ba1e08bf2eb4179678d172
[ "Apache-2.0" ]
1,031
2016-11-29T15:12:05.000Z
2022-03-31T05:02:50.000Z
zgrab2_schemas/zgrab2/mysql_errors.py
vl4deee11/zgrab2
c859e9ef1173955dadae88416289ef8cc8910495
[ "Apache-2.0" ]
191
2017-07-24T17:27:57.000Z
2022-03-16T04:59:59.000Z
zgrab2_schemas/zgrab2/mysql_errors.py
vl4deee11/zgrab2
c859e9ef1173955dadae88416289ef8cc8910495
[ "Apache-2.0" ]
230
2017-11-14T07:25:57.000Z
2022-03-31T04:20:46.000Z
# Auto-generated at 2018/05/21 12:12:17 using data aggregated from: # https://dev.mysql.com/doc/refman/5.5/en/error-messages-server.html # https://dev.mysql.com/doc/refman/5.6/en/error-messages-server.html # https://dev.mysql.com/doc/refman/5.7/en/error-messages-server.html # https://dev.mysql.com/doc/refman/8....
42.333847
78
0.763684
mysql_error_code_to_id = { 0x03e8: "ER_HASHCHK", 0x03e9: "ER_NISAMCHK", 0x03ea: "ER_NO", 0x03eb: "ER_YES", 0x03ec: "ER_CANT_CREATE_FILE", 0x03ed: "ER_CANT_CREATE_TABLE", 0x03ee: "ER_CANT_CREATE_DB", 0x03ef: "ER_DB_CREATE_EXISTS", 0x03f0: "ER_DB_DROP_EXISTS", 0x03f1: "ER_DB_DROP_D...
true
true
f7713f275052977c41fa95ee44283d329520727c
900
py
Python
clusterweb/pbs/config.py
cweb-project/cweb-project
53e4b77018996533a8bae8e79c30abf62e81ea5a
[ "MIT" ]
2
2018-11-06T12:43:29.000Z
2019-01-09T15:23:18.000Z
clusterweb/pbs/config.py
cweb-project/cweb-project
53e4b77018996533a8bae8e79c30abf62e81ea5a
[ "MIT" ]
1
2018-11-06T20:37:57.000Z
2018-11-13T17:13:11.000Z
clusterweb/pbs/config.py
cweb-project/cweb-project
53e4b77018996533a8bae8e79c30abf62e81ea5a
[ "MIT" ]
3
2019-01-15T17:35:26.000Z
2020-03-01T18:53:03.000Z
#!/bin/env/python3 #-*- encdoing: utf-8 -*- """ """ from __future__ import print_function from __future__ import division import sys import os DEFAULT_NODES = 1 DEFAULT_CORES = 1 DEFAULT_WALLTIME = '1:00:00' DEFAULT_MEMORY = '8GB' DEFAULT_CPU = '1:00:00' DEFAULT_WAIT_TIME = 1 # Maximum number of nodes MAX_NODE...
16.363636
48
0.713333
from __future__ import print_function from __future__ import division import sys import os DEFAULT_NODES = 1 DEFAULT_CORES = 1 DEFAULT_WALLTIME = '1:00:00' DEFAULT_MEMORY = '8GB' DEFAULT_CPU = '1:00:00' DEFAULT_WAIT_TIME = 1 MAX_NODES = 5 MIN_NODES = 1 MIN_CORES = 1 MAX_MEMORY = 96000 MIN_MEMORY = 100 conf...
true
true
f7713f384970c998ed72b65a49c45a1c800768d9
11,246
py
Python
scripts/cgat_ruffus_profile.py
cdrakesmith/CGATPipelines
3c94ae4f9d87d51108255dc405c4b95af7c8b694
[ "MIT" ]
49
2015-04-13T16:49:25.000Z
2022-03-29T10:29:14.000Z
scripts/cgat_ruffus_profile.py
cdrakesmith/CGATPipelines
3c94ae4f9d87d51108255dc405c4b95af7c8b694
[ "MIT" ]
252
2015-04-08T13:23:34.000Z
2019-03-18T21:51:29.000Z
scripts/cgat_ruffus_profile.py
cdrakesmith/CGATPipelines
3c94ae4f9d87d51108255dc405c4b95af7c8b694
[ "MIT" ]
22
2015-05-21T00:37:52.000Z
2019-09-25T05:04:27.000Z
'''cgat_ruffus_profile.py - analyze ruffus logfile ================================================== Purpose ------- This script collects information about tasks that have completed or are still running in a pipeline. It works by examining the logfile :file:`pipeline.log` looking for the last active run. It will c...
33.975831
115
0.572915
import sys import os import re import datetime import collections import CGAT.Experiment as E import CGAT.IOTools as IOTools class Counter(object): def __init__(self): self._durations = collections.defaultdict(list) self._started = collections.defaultdict(int) self._calls = collection...
true
true
f7713f5d13f1cea41125c4618a1ff08a76880b9f
3,184
py
Python
finder.py
AlantheBenign/Minecraft-Stronghold-Finder
05d3eb89eaccd3620fa25cd4c828c907aecf2178
[ "MIT" ]
4
2020-06-11T04:13:10.000Z
2021-12-11T01:14:48.000Z
finder.py
AlantheBenign/Minecraft-Stronghold-Finder
05d3eb89eaccd3620fa25cd4c828c907aecf2178
[ "MIT" ]
1
2021-01-09T14:04:10.000Z
2021-01-09T16:25:51.000Z
finder.py
AlantheBenign/Minecraft-Stronghold-Finder
05d3eb89eaccd3620fa25cd4c828c907aecf2178
[ "MIT" ]
null
null
null
import numpy as np #hitCircle calculates where the first stronghold generation ring starts, where the player would "hit" it, moving directly forward #and calculates the position to the second ender eye throw def hitCircle(pX,pZ,angle): xHit = None yHit = None cos = np.cos(angle*np.pi/180) #if the stron...
30.615385
141
0.522613
import numpy as np def hitCircle(pX,pZ,angle): xHit = None yHit = None cos = np.cos(angle*np.pi/180) if cos >= 0: x = np.linspace(pX-10, 2700,2700) a = np.tan(angle*np.pi/180) b = pZ - pX * a y = a*x + b for i in range(len(x)): if x[i]*x[i] + y[i]...
true
true
f7713f697f706507a6fcd070bf88dedc5758afd6
1,844
py
Python
azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/operation_status_response_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2022-03-30T22:39:15.000Z
2022-03-30T22:39:15.000Z
azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/operation_status_response_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
54
2016-03-25T17:25:01.000Z
2018-10-22T17:27:54.000Z
azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/models/operation_status_response_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
2
2017-01-20T18:25:46.000Z
2017-05-12T21:31:47.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 ...
32.928571
76
0.578091
from msrest.serialization import Model class OperationStatusResponse(Model): _validation = { 'name': {'readonly': True}, 'status': {'readonly': True}, 'start_time': {'readonly': True}, 'end_time': {'readonly': True}, 'error': {'readonly': True}, } _attribute_map ...
true
true
f77140b2765b8f4622eaf7062204e0c13639ab9a
1,884
py
Python
scripts/optimize_tf_dialect.py
OliverScherf/mlir-emitc
af6a34bee5563bf71a218a93139da0e25cd9b2a5
[ "Apache-2.0" ]
1
2021-05-10T13:04:44.000Z
2021-05-10T13:04:44.000Z
scripts/optimize_tf_dialect.py
OliverScherf/mlir-emitc
af6a34bee5563bf71a218a93139da0e25cd9b2a5
[ "Apache-2.0" ]
null
null
null
scripts/optimize_tf_dialect.py
OliverScherf/mlir-emitc
af6a34bee5563bf71a218a93139da0e25cd9b2a5
[ "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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under ...
34.888889
78
0.645435
import argparse from tensorflow.python import pywrap_mlir def optimize(model_path: str, output_path: str): pass_pipeline = ",".join([ "symbol-dce", "tf-standard-pipeline", "func(tf-device-index-selector)", "inline", "canonicalize", "func(tf-device-decompose-resource-ops)", "fun...
true
true
f771429bdcfba9f0fc34f0e31b6c09b6575d51ae
448
py
Python
setup.py
david-macleod/mord
8236d546d92f807cc5c5ec46ed7355311914060f
[ "BSD-3-Clause" ]
237
2015-06-19T04:30:13.000Z
2022-03-10T15:37:47.000Z
setup.py
Moyookc/mord
ef578a79bf8374d84b77f246454b06d81a620630
[ "BSD-3-Clause" ]
24
2015-12-09T17:22:22.000Z
2021-04-02T16:45:52.000Z
setup.py
Moyookc/mord
ef578a79bf8374d84b77f246454b06d81a620630
[ "BSD-3-Clause" ]
67
2015-06-26T05:15:59.000Z
2022-03-09T09:32:03.000Z
from setuptools import setup, find_packages setup( name='mord', version="0.6", description='Ordinal regression models', long_description=open('README.rst').read(), author='Fabian Pedregosa', author_email='f@bianp.net', url='https://pypi.python.org/pypi/mord', packages=find_packages(excl...
29.866667
81
0.658482
from setuptools import setup, find_packages setup( name='mord', version="0.6", description='Ordinal regression models', long_description=open('README.rst').read(), author='Fabian Pedregosa', author_email='f@bianp.net', url='https://pypi.python.org/pypi/mord', packages=find_packages(excl...
true
true
f771432f35f55649a2334c6fa32cf26c31e7bd89
1,344
py
Python
hub_module/modules/text/semantic_model/slda_news/util.py
18621579069/PaddleHub-yu
15e8bcef2addf239081e235bdcfd039de12330e0
[ "Apache-2.0" ]
4
2021-02-25T03:27:38.000Z
2021-05-15T03:20:23.000Z
hub_module/modules/text/semantic_model/slda_news/util.py
18621579069/PaddleHub-yu
15e8bcef2addf239081e235bdcfd039de12330e0
[ "Apache-2.0" ]
null
null
null
hub_module/modules/text/semantic_model/slda_news/util.py
18621579069/PaddleHub-yu
15e8bcef2addf239081e235bdcfd039de12330e0
[ "Apache-2.0" ]
2
2021-03-01T07:04:01.000Z
2021-05-14T05:54:18.000Z
import time import yaml import numpy as np from paddlehub.common.logger import logger from slda_news.config import ModelType def load_prototxt(config_file, config): """ Args: config_file: model configuration file. config: ModelConfig class """ logger.info("Loading SLDA config.") ...
23.172414
76
0.635417
import time import yaml import numpy as np from paddlehub.common.logger import logger from slda_news.config import ModelType def load_prototxt(config_file, config): logger.info("Loading SLDA config.") with open(config_file, 'r') as f: yaml_dict = yaml.load(f, Loader=yaml.FullLoader) if yaml...
true
true
f7714479880c646783a75f65cce19090f913547e
423
py
Python
src/books/migrations/0005_auto_20210221_2218.py
Aleksander-Protasevich/django_project
49d7b0f5e86d544f94340d8343995f6d4b70bbd8
[ "Apache-2.0" ]
null
null
null
src/books/migrations/0005_auto_20210221_2218.py
Aleksander-Protasevich/django_project
49d7b0f5e86d544f94340d8343995f6d4b70bbd8
[ "Apache-2.0" ]
null
null
null
src/books/migrations/0005_auto_20210221_2218.py
Aleksander-Protasevich/django_project
49d7b0f5e86d544f94340d8343995f6d4b70bbd8
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.1.5 on 2021-02-21 19:18 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('books', '0004_auto_20210221_2043'), ] operations = [ migrations.AlterField( model_name='book', name='image', ...
22.263158
92
0.607565
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('books', '0004_auto_20210221_2043'), ] operations = [ migrations.AlterField( model_name='book', name='image', field=models.ImageField(null=True, upload_t...
true
true
f77144dedb49eed255d3c481f5056f1a1da9b130
486
py
Python
myxremap/key/modifiers.py
Hiroya-W/xremap-109-to-my-eucalyn
b70d4d5855cedecd97edd442fa84a48e73a8bac7
[ "MIT" ]
null
null
null
myxremap/key/modifiers.py
Hiroya-W/xremap-109-to-my-eucalyn
b70d4d5855cedecd97edd442fa84a48e73a8bac7
[ "MIT" ]
1
2022-03-01T02:20:38.000Z
2022-03-29T11:02:38.000Z
myxremap/key/modifiers.py
Hiroya-W/xremap-109-to-my-eucalyn
b70d4d5855cedecd97edd442fa84a48e73a8bac7
[ "MIT" ]
null
null
null
import itertools from enum import Flag, auto from typing import List class Modifier(Flag): NONE = 0 CTRL = auto() ALT = auto() SHIFT = auto() SUPER = auto() __MODIFIER_LIST = list(Modifier)[1:] ALL_PREFIXES: List[Modifier] = [] for bits in itertools.product([0, 1], repeat=len(__MODIFIER_LIST))...
20.25
67
0.648148
import itertools from enum import Flag, auto from typing import List class Modifier(Flag): NONE = 0 CTRL = auto() ALT = auto() SHIFT = auto() SUPER = auto() __MODIFIER_LIST = list(Modifier)[1:] ALL_PREFIXES: List[Modifier] = [] for bits in itertools.product([0, 1], repeat=len(__MODIFIER_LIST))...
true
true
f7714541603cdb1ca5cfa1c8b1965ddbc860b067
954
py
Python
rllib/agents/agent.py
ScottJordan/python-rllib
b4f7625a670743a1a0614a8379d025b1254df46b
[ "MIT" ]
null
null
null
rllib/agents/agent.py
ScottJordan/python-rllib
b4f7625a670743a1a0614a8379d025b1254df46b
[ "MIT" ]
null
null
null
rllib/agents/agent.py
ScottJordan/python-rllib
b4f7625a670743a1a0614a8379d025b1254df46b
[ "MIT" ]
null
null
null
import numpy as np from typing import Union, Tuple, Dict class Agent(object): def get_action(self, obs:np.ndarray, stochastic:bool=True)-> Tuple[Union[int, np.ndarray, Dict], float]: raise NotImplementedError def update(self, obs:np.ndarray, act:Union[int, np.ndarray, Dict], blogp:float, reward:float...
35.333333
159
0.701258
import numpy as np from typing import Union, Tuple, Dict class Agent(object): def get_action(self, obs:np.ndarray, stochastic:bool=True)-> Tuple[Union[int, np.ndarray, Dict], float]: raise NotImplementedError def update(self, obs:np.ndarray, act:Union[int, np.ndarray, Dict], blogp:float, reward:float...
true
true
f771456fba2626e3406d4d1c57ad4f675791a794
8,855
py
Python
hubspot/crm/tickets/models/standard_error.py
cclauss/hubspot-api-python
7c60c0f572b98c73e1f1816bf5981396a42735f6
[ "Apache-2.0" ]
null
null
null
hubspot/crm/tickets/models/standard_error.py
cclauss/hubspot-api-python
7c60c0f572b98c73e1f1816bf5981396a42735f6
[ "Apache-2.0" ]
null
null
null
hubspot/crm/tickets/models/standard_error.py
cclauss/hubspot-api-python
7c60c0f572b98c73e1f1816bf5981396a42735f6
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Tickets No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v3 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from hubsp...
28.656958
177
0.587578
import pprint import re import six from hubspot.crm.tickets.configuration import Configuration class StandardError(object): openapi_types = { 'status': 'str', 'id': 'str', 'category': 'ErrorCategory', 'sub_category': 'object', 'message': 'str', 'errors': 'lis...
true
true
f7714605c053ed4daa160ed58d9df22e3e4c0709
1,105
py
Python
netforce_portal/netforce_portal/__init__.py
nfco/netforce
35252eecd0a6633ab9d82162e9e3ff57d4da029a
[ "MIT" ]
27
2015-09-30T23:53:30.000Z
2021-06-07T04:56:25.000Z
netforce_portal/netforce_portal/__init__.py
nfco/netforce
35252eecd0a6633ab9d82162e9e3ff57d4da029a
[ "MIT" ]
191
2015-10-08T11:46:30.000Z
2019-11-14T02:24:36.000Z
netforce_portal/netforce_portal/__init__.py
nfco/netforce
35252eecd0a6633ab9d82162e9e3ff57d4da029a
[ "MIT" ]
32
2015-10-01T03:59:43.000Z
2022-01-13T07:31:05.000Z
# Copyright (c) 2012-2015 Netforce Co. Ltd. # # 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, publ...
52.619048
80
0.775566
true
true
f771465d185931fc4fd5e1ac2be143efb8abcfc6
80
py
Python
app/omnisearch/graphql.py
getmetamapper/metamapper
0b2f67eec03fbf7ece35ff9f58ea9bb2dde4d85f
[ "BSD-2-Clause" ]
53
2020-07-01T23:11:59.000Z
2022-03-31T19:10:28.000Z
app/omnisearch/graphql.py
metamapper-io/metamapper
376716e72bcaca62f1ec09ca9a13a0346e5502f9
[ "BSD-2-Clause" ]
5
2020-11-25T19:48:57.000Z
2022-02-27T23:50:18.000Z
app/omnisearch/graphql.py
metamapper-io/metamapper
376716e72bcaca62f1ec09ca9a13a0346e5502f9
[ "BSD-2-Clause" ]
5
2020-08-29T16:43:59.000Z
2022-01-17T19:05:30.000Z
# -*- coding: utf-8 -*- # flake8: noqa from app.omnisearch.queries import Query
20
40
0.6875
from app.omnisearch.queries import Query
true
true
f77147721e2e83b4febc07f266e48953cddd6c26
25,818
py
Python
dataService/dataService.py
V4I2021/V4IBack
88c6215d65eccae42cde18515d1da84d94c45ba6
[ "Apache-2.0" ]
null
null
null
dataService/dataService.py
V4I2021/V4IBack
88c6215d65eccae42cde18515d1da84d94c45ba6
[ "Apache-2.0" ]
null
null
null
dataService/dataService.py
V4I2021/V4IBack
88c6215d65eccae42cde18515d1da84d94c45ba6
[ "Apache-2.0" ]
null
null
null
import datetime import os import pandas as pd from flask_caching import Cache import seaborn as sns from scipy.stats import pearsonr import numpy as np import math from sklearn.cluster import DBSCAN from sklearn.linear_model import LinearRegression from sklearn.preprocessing import StandardScaler cache = Cache() FI...
45.939502
120
0.547176
import datetime import os import pandas as pd from flask_caching import Cache import seaborn as sns from scipy.stats import pearsonr import numpy as np import math from sklearn.cluster import DBSCAN from sklearn.linear_model import LinearRegression from sklearn.preprocessing import StandardScaler cache = Cache() FI...
true
true
f77148a0a6a7d03b8074210b75755fc94a7fed89
4,435
py
Python
lib/schemacfg/recipe.py
time-track-tool/time-track-tool
a1c280f32a7766e460c862633b748fa206256f24
[ "MIT" ]
null
null
null
lib/schemacfg/recipe.py
time-track-tool/time-track-tool
a1c280f32a7766e460c862633b748fa206256f24
[ "MIT" ]
1
2019-07-03T13:32:38.000Z
2019-07-03T13:32:38.000Z
lib/schemacfg/recipe.py
time-track-tool/time-track-tool
a1c280f32a7766e460c862633b748fa206256f24
[ "MIT" ]
1
2019-05-15T16:01:31.000Z
2019-05-15T16:01:31.000Z
# Copyright (C) 2020-21 Dr. Ralf Schlatterbeck Open Source Consulting. # Reichergasse 131, A-3411 Weidling. # Web: http://www.runtux.com Email: office@runtux.com # All rights reserved # **************************************************************************** # This program is free software; you can redistribute it ...
37.584746
78
0.492672
import common from schemacfg import schemadef def init (db, Link, Multilink, Number, String, Boolean, Class, ** kw) : export = {} substance = Class \ ( db, ''"substance" , name = String () , identifier = String () , is_raw_material = B...
true
true
f77148f79225a258b8c1454e870ce724acb60575
559
py
Python
theblog/migrations/0014_alter_post_category_alter_post_title_tag.py
clowdcap/ablog
1a31c8ec83777c35ff3fde5da8e5e89181bd5d34
[ "MIT" ]
null
null
null
theblog/migrations/0014_alter_post_category_alter_post_title_tag.py
clowdcap/ablog
1a31c8ec83777c35ff3fde5da8e5e89181bd5d34
[ "MIT" ]
null
null
null
theblog/migrations/0014_alter_post_category_alter_post_title_tag.py
clowdcap/ablog
1a31c8ec83777c35ff3fde5da8e5e89181bd5d34
[ "MIT" ]
null
null
null
# Generated by Django 4.0.1 on 2022-01-25 23:20 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('theblog', '0013_profile_github_url'), ] operations = [ migrations.AlterField( model_name='post', name='category', ...
23.291667
68
0.579606
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('theblog', '0013_profile_github_url'), ] operations = [ migrations.AlterField( model_name='post', name='category', field=models.CharField(default='Geral'...
true
true
f771495a86992ef9e20a76c11253eb39ef669e4c
3,130
py
Python
src/discriminators.py
tfederico/human_dynamics
ab7ab6aefce5ec33c208091710a37624a1a6ef4a
[ "BSD-2-Clause" ]
558
2019-05-16T00:12:03.000Z
2022-03-29T02:39:12.000Z
src/discriminators.py
tfederico/human_dynamics
ab7ab6aefce5ec33c208091710a37624a1a6ef4a
[ "BSD-2-Clause" ]
75
2019-05-17T10:06:24.000Z
2022-02-09T23:32:40.000Z
src/discriminators.py
tfederico/human_dynamics
ab7ab6aefce5ec33c208091710a37624a1a6ef4a
[ "BSD-2-Clause" ]
87
2019-05-16T00:57:11.000Z
2022-03-21T02:12:05.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import tensorflow.contrib.slim as slim class PoseDiscriminator(object): def __init__(self, weight_decay): self.vars = [] self.reuse = False self.wd = weight...
36.395349
76
0.464217
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import tensorflow.contrib.slim as slim class PoseDiscriminator(object): def __init__(self, weight_decay): self.vars = [] self.reuse = False self.wd = weight...
true
true
f77149ddeabffe3503733795d9b79d40e9f74d50
6,229
py
Python
Project/train/train.py
mohanadhammad/dlnd-sagemaker-deployment
ad1da6fc928e351f6782d1a9c180e0910b67b702
[ "MIT" ]
null
null
null
Project/train/train.py
mohanadhammad/dlnd-sagemaker-deployment
ad1da6fc928e351f6782d1a9c180e0910b67b702
[ "MIT" ]
null
null
null
Project/train/train.py
mohanadhammad/dlnd-sagemaker-deployment
ad1da6fc928e351f6782d1a9c180e0910b67b702
[ "MIT" ]
null
null
null
import argparse import json import os import pickle import sys import sagemaker_containers import pandas as pd import torch import torch.optim as optim import torch.utils.data from model import LSTMClassifier def model_fn(model_dir): """Load the PyTorch model from the `model_dir` directory.""" print("Loading ...
37.981707
107
0.658693
import argparse import json import os import pickle import sys import sagemaker_containers import pandas as pd import torch import torch.optim as optim import torch.utils.data from model import LSTMClassifier def model_fn(model_dir): print("Loading model.") model_info = {} model_info_path = os.path.j...
true
true
f7714a1d2e0e4b745aac11c2414eb8580483db5c
3,059
py
Python
py3status/modules/dropboxd_status.py
simon04/py3status
ee633bcd2405b9acfa7e7b82d2a9220d5af23533
[ "BSD-3-Clause" ]
null
null
null
py3status/modules/dropboxd_status.py
simon04/py3status
ee633bcd2405b9acfa7e7b82d2a9220d5af23533
[ "BSD-3-Clause" ]
null
null
null
py3status/modules/dropboxd_status.py
simon04/py3status
ee633bcd2405b9acfa7e7b82d2a9220d5af23533
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Display status of Dropbox daemon. Configuration parameters: cache_timeout: refresh interval for this module (default 10) format: display format for this module (default "Dropbox: {status}") status_busy: text for placeholder {status} when Dropbox is busy (default None) status...
28.06422
98
0.60608
STRING_ERROR = "Dropbox: command failed" STRING_NOT_INSTALLED = 'not installed' class Py3status: cache_timeout = 10 format = "Dropbox: {status}" status_busy = None status_off = "isn't running" status_on = "Up to date" class Meta: deprecated = { 'format_fix_unnamed_par...
true
true
f7714b7d11cde78743d9d39d2b31d68b9223d1ce
2,262
py
Python
DEND/Aiflow/lesson2/dags/lesson2_exercises/exercise2.py
bmareddy/Udacity
422076bd0aea67ae9baf70028d9b33c27bea64e7
[ "MIT" ]
1
2020-12-14T02:54:35.000Z
2020-12-14T02:54:35.000Z
DEND/Aiflow/lesson2/dags/lesson2_exercises/exercise2.py
bmareddy/Udacity
422076bd0aea67ae9baf70028d9b33c27bea64e7
[ "MIT" ]
null
null
null
DEND/Aiflow/lesson2/dags/lesson2_exercises/exercise2.py
bmareddy/Udacity
422076bd0aea67ae9baf70028d9b33c27bea64e7
[ "MIT" ]
1
2021-05-24T20:58:29.000Z
2021-05-24T20:58:29.000Z
#Instructions #1 - Revisit our bikeshare traffic #2 - Update our DAG with # a - @monthly schedule_interval # b - max_active_runs of 1 # c - start_date of 2018/01/01 # d - end_date of 2018/02/01 # Use Airflow’s backfill capabilities to analyze our trip data on a monthly basis over 2 historical runs import datetime...
27.925926
104
0.759505
import datetime import logging from airflow import DAG from airflow.contrib.hooks.aws_hook import AwsHook from airflow.hooks.postgres_hook import PostgresHook from airflow.operators.postgres_operator import PostgresOperator from airflow.operators.python_operator import PythonOperator import sql_statements def load...
true
true
f7714d4b85b872027b2ef616cc9630a09655c9c7
841
py
Python
bitshares_pricefeed/sources/okex_otc.py
technozhantomz/bitshares-pricefeed
5ce483c407f351ce0eb821fd67ffb90a97b866d7
[ "MIT" ]
14
2018-09-08T10:38:22.000Z
2021-09-08T13:45:48.000Z
bitshares_pricefeed/sources/okex_otc.py
technozhantomz/bitshares-pricefeed
5ce483c407f351ce0eb821fd67ffb90a97b866d7
[ "MIT" ]
8
2019-07-30T20:16:51.000Z
2021-09-27T21:01:56.000Z
bitshares_pricefeed/sources/okex_otc.py
technozhantomz/bitshares-pricefeed
5ce483c407f351ce0eb821fd67ffb90a97b866d7
[ "MIT" ]
25
2018-09-07T19:29:34.000Z
2021-12-14T09:03:15.000Z
import sys import requests import time from . import FeedSource, _request_headers class OkExOtc(FeedSource): def _fetch(self): feed = {} t = int(time.time()) for base in self.bases: for quote in self.quotes: if quote == base: continue ...
38.227273
200
0.577883
import sys import requests import time from . import FeedSource, _request_headers class OkExOtc(FeedSource): def _fetch(self): feed = {} t = int(time.time()) for base in self.bases: for quote in self.quotes: if quote == base: continue ...
true
true
f7714f2d4dae7945b985c529feac154f6b571a70
7,260
py
Python
veinmind-sensitive/scan.py
H4ckCgl/veinmind-tools
415aae9da5f0e31275ecdf61a2cef088c766d381
[ "MIT" ]
1
2022-02-25T10:18:39.000Z
2022-02-25T10:18:39.000Z
veinmind-sensitive/scan.py
lionkgxu/veinmind-tools
415aae9da5f0e31275ecdf61a2cef088c766d381
[ "MIT" ]
null
null
null
veinmind-sensitive/scan.py
lionkgxu/veinmind-tools
415aae9da5f0e31275ecdf61a2cef088c766d381
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import pytoml as toml import click import re import os import magic import logging import fnmatch import chardet import time import jsonpickle from veinmind import * from stat import * # logger formatter = logging.Formatter('%(asctime)s %(levelname)-8s %(message)s') handler = logging.StreamHandl...
41.724138
126
0.459366
import pytoml as toml import click import re import os import magic import logging import fnmatch import chardet import time import jsonpickle from veinmind import * from stat import * formatter = logging.Formatter('%(asctime)s %(levelname)-8s %(message)s') handler = logging.StreamHandler() handler.setFormatter(format...
true
true
f7714f4f717ad1770c5679c13319004189226f67
346
py
Python
bluebottle/projects/migrations/0058_merge_20171220_1342.py
terrameijar/bluebottle
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
[ "BSD-3-Clause" ]
10
2015-05-28T18:26:40.000Z
2021-09-06T10:07:03.000Z
bluebottle/projects/migrations/0058_merge_20171220_1342.py
terrameijar/bluebottle
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
[ "BSD-3-Clause" ]
762
2015-01-15T10:00:59.000Z
2022-03-31T15:35:14.000Z
bluebottle/projects/migrations/0058_merge_20171220_1342.py
terrameijar/bluebottle
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
[ "BSD-3-Clause" ]
9
2015-02-20T13:19:30.000Z
2022-03-08T14:09:17.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2017-12-20 12:42 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('projects', '0057_merge_20171205_1236'), ('projects', '0055_project_campaign_edited'), ] ...
20.352941
53
0.67052
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('projects', '0057_merge_20171205_1236'), ('projects', '0055_project_campaign_edited'), ] operations = [ ]
true
true
f7714f6819b265f3db878b7c423a7fbb1aac976d
4,778
py
Python
setup.py
simonvh/gimmemotifs
e40ab914a93210864c358b39ae677ac0792a80f2
[ "MIT" ]
20
2015-08-22T23:14:12.000Z
2018-07-24T15:41:58.000Z
setup.py
simonvh/gimmemotifs
e40ab914a93210864c358b39ae677ac0792a80f2
[ "MIT" ]
62
2015-05-01T10:02:47.000Z
2018-11-05T15:39:44.000Z
setup.py
simonvh/gimmemotifs
e40ab914a93210864c358b39ae677ac0792a80f2
[ "MIT" ]
8
2016-01-06T15:54:41.000Z
2018-08-24T15:26:12.000Z
from setuptools import setup, find_packages from setuptools import Extension import os from io import open from compile_externals import compile_all import subprocess as sp import versioneer CONFIG_NAME = "gimmemotifs.cfg" DESCRIPTION = "GimmeMotifs is a motif prediction pipeline." with open("README.md", encoding="u...
31.025974
87
0.584763
from setuptools import setup, find_packages from setuptools import Extension import os from io import open from compile_externals import compile_all import subprocess as sp import versioneer CONFIG_NAME = "gimmemotifs.cfg" DESCRIPTION = "GimmeMotifs is a motif prediction pipeline." with open("README.md", encoding="u...
true
true
f7714fbc1c812527a476fb2fe62f1f2194430d56
16,087
py
Python
python/ad_hmi/framework/Vehicle.py
suseme/xviz
c9f800b41395d3ab1d45cbebfc59543772cbde17
[ "Apache-2.0" ]
null
null
null
python/ad_hmi/framework/Vehicle.py
suseme/xviz
c9f800b41395d3ab1d45cbebfc59543772cbde17
[ "Apache-2.0" ]
null
null
null
python/ad_hmi/framework/Vehicle.py
suseme/xviz
c9f800b41395d3ab1d45cbebfc59543772cbde17
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ############################################################################# # @package ad_hmi.framework # @brief init methode of python package ad_hmi.framework. ############################################################################# # @author WANG Vincent # @copyright (c) All rights res...
34.154989
148
0.494996
from .Objet import Objet from .Signal import Signal from .Trajectory import Trajectory class Vehicle(Objet): TURN_SIGNALS = ['', 'left', 'right', 'both'] AUTO_STATES = ['autonomous', 'manual', 'error', 'unknown'] ( ST_INVALID, ST_AVAILABLE ) = range(2) ( GEAR_IN_VALID, ...
true
true
f77152345c4be8c965a010c3c8f7ca6c2c1ad5fb
2,705
py
Python
HypeMan3/hypeman_listener.py
robscallsign/HypeMan
a61886ef5ec051d5525d885e2276ea0654c9501a
[ "MIT" ]
11
2020-01-02T09:06:18.000Z
2022-01-21T20:49:42.000Z
HypeMan3/hypeman_listener.py
MahdiMZ80913/HypeMan
a61886ef5ec051d5525d885e2276ea0654c9501a
[ "MIT" ]
8
2020-03-09T08:30:30.000Z
2022-02-03T07:20:51.000Z
HypeMan3/hypeman_listener.py
MahdiMZ80913/HypeMan
a61886ef5ec051d5525d885e2276ea0654c9501a
[ "MIT" ]
6
2020-01-15T19:41:13.000Z
2022-01-18T01:25:09.000Z
# -*- coding: utf-8 -*- """ HypeMan in python """ import configparser import socketserver #import time import json import threading import discord import os config = configparser.ConfigParser() config.read('hypeman.ini') BOT_ID = config['HYPEMAN']['BOT_ID'] PORT = config.getint('HYPEMAN', 'PORT') HOST = config['HYPE...
26.782178
86
0.661738
import configparser import socketserver import json import threading import discord import os config = configparser.ConfigParser() config.read('hypeman.ini') BOT_ID = config['HYPEMAN']['BOT_ID'] PORT = config.getint('HYPEMAN', 'PORT') HOST = config['HYPEMAN']['HOST'] DEBUG_PRINT_UDP_MESSAGES = True print('Starting ...
true
true
f771526b178343c204846304a0521e7c92ec2ab1
3,337
py
Python
pyrobolearn/envs/sports/basketball.py
Pandinosaurus/pyrobolearn
9cd7c060723fda7d2779fa255ac998c2c82b8436
[ "Apache-2.0" ]
2
2021-01-21T21:08:30.000Z
2022-03-29T16:45:49.000Z
pyrobolearn/envs/sports/basketball.py
Pandinosaurus/pyrobolearn
9cd7c060723fda7d2779fa255ac998c2c82b8436
[ "Apache-2.0" ]
null
null
null
pyrobolearn/envs/sports/basketball.py
Pandinosaurus/pyrobolearn
9cd7c060723fda7d2779fa255ac998c2c82b8436
[ "Apache-2.0" ]
1
2020-09-29T21:25:39.000Z
2020-09-29T21:25:39.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- r"""Provide the basketball environment. """ # TODO: finish to implement this environment import pyrobolearn as prl from pyrobolearn.worlds.samples.sports.basketball import BasketBallWorld from pyrobolearn.envs.env import Env __author__ = "Brian Delhaisse" __copyright__ ...
33.37
118
0.637399
import pyrobolearn as prl from pyrobolearn.worlds.samples.sports.basketball import BasketBallWorld from pyrobolearn.envs.env import Env __author__ = "Brian Delhaisse" __copyright__ = "Copyright 2019, PyRoboLearn" __credits__ = ["Brian Delhaisse"] __license__ = "GNU GPLv3" __version__ = "1.0.0" __maintainer__ = "Bri...
true
true
f77153cf5d454f9259652c1c2d08a8232abeca00
8,876
py
Python
doc/conf.py
kalufinnle/pennylane-cirq
c239239a661cd01adb671ad7b7254a2fa3684c6b
[ "Apache-2.0" ]
1
2020-07-12T17:56:32.000Z
2020-07-12T17:56:32.000Z
doc/conf.py
kalufinnle/pennylane-cirq
c239239a661cd01adb671ad7b7254a2fa3684c6b
[ "Apache-2.0" ]
null
null
null
doc/conf.py
kalufinnle/pennylane-cirq
c239239a661cd01adb671ad7b7254a2fa3684c6b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # PennyLane-Cirq documentation build configuration file, created by # sphinx-quickstart on Tue Apr 17 11:43:51 2018. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in th...
31.928058
92
0.69164
import sys, os, re sys.path.insert(0, os.path.abspath('..')) sys.path.insert(0, os.path.abspath('_ext')) needs_sphinx = '1.6' extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.autosummary', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.mathjax', 'sphinx.ext.napoleon', 'sphinx.ext...
true
true
f771543d36dcc451dd84e55b8260b8c1c2c79f79
95
py
Python
xchainpy/xchainpy_thorchain/xchainpy_thorchain/__init__.py
tirinox/xchainpy-lib
e01f146993c45ca0dad3ca40f07e7b45ed65653e
[ "MIT" ]
null
null
null
xchainpy/xchainpy_thorchain/xchainpy_thorchain/__init__.py
tirinox/xchainpy-lib
e01f146993c45ca0dad3ca40f07e7b45ed65653e
[ "MIT" ]
null
null
null
xchainpy/xchainpy_thorchain/xchainpy_thorchain/__init__.py
tirinox/xchainpy-lib
e01f146993c45ca0dad3ca40f07e7b45ed65653e
[ "MIT" ]
null
null
null
"""Thorchain Module for XChainPY Clients .. moduleauthor:: Thorchain """ __version__ = '0.1.7'
19
40
0.715789
__version__ = '0.1.7'
true
true
f771553b6de33f0ff29cee1adb0be1b4db7fab76
536
py
Python
footballleagues/models/base.py
RicardoSilveira23/TonicAppChallenge
961107acbcdd93551bcd1b4b0ecd877fb4a7d813
[ "MIT" ]
null
null
null
footballleagues/models/base.py
RicardoSilveira23/TonicAppChallenge
961107acbcdd93551bcd1b4b0ecd877fb4a7d813
[ "MIT" ]
null
null
null
footballleagues/models/base.py
RicardoSilveira23/TonicAppChallenge
961107acbcdd93551bcd1b4b0ecd877fb4a7d813
[ "MIT" ]
null
null
null
from django.db import models from django.dispatch import receiver from django.db.models.signals import post_save, pre_save class BaseModel(models.Model): created_date = models.DateTimeField(auto_now_add=True) created_by = models.TextField(blank=True, null=True) updated_date = models.DateTimeField(auto_now...
29.777778
58
0.738806
from django.db import models from django.dispatch import receiver from django.db.models.signals import post_save, pre_save class BaseModel(models.Model): created_date = models.DateTimeField(auto_now_add=True) created_by = models.TextField(blank=True, null=True) updated_date = models.DateTimeField(auto_now...
true
true
f77156e37dd4900497c773964d13631aaffd1bf5
315
py
Python
lib/db/migrations/2014-08-08-01-add_edmodo_groups.py
plastr/extrasolar-game
1aad5971556d498e3617afe75f27e2f4132d4668
[ "MIT", "Unlicense" ]
null
null
null
lib/db/migrations/2014-08-08-01-add_edmodo_groups.py
plastr/extrasolar-game
1aad5971556d498e3617afe75f27e2f4132d4668
[ "MIT", "Unlicense" ]
null
null
null
lib/db/migrations/2014-08-08-01-add_edmodo_groups.py
plastr/extrasolar-game
1aad5971556d498e3617afe75f27e2f4132d4668
[ "MIT", "Unlicense" ]
null
null
null
forward = """ CREATE TABLE edmodo_groups ( group_id bigint(10) NOT NULL, sandbox tinyint(1) NOT NULL DEFAULT '0', created datetime NOT NULL, PRIMARY KEY (group_id), UNIQUE KEY group_id (group_id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; """ reverse = """ DROP TABLE edmodo_groups; """ step(forward, reverse)
22.5
42
0.71746
forward = """ CREATE TABLE edmodo_groups ( group_id bigint(10) NOT NULL, sandbox tinyint(1) NOT NULL DEFAULT '0', created datetime NOT NULL, PRIMARY KEY (group_id), UNIQUE KEY group_id (group_id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; """ reverse = """ DROP TABLE edmodo_groups; """ step(forward, reverse)
true
true
f7715979549cd08133e44ae56906ad6e333e9d88
16,043
py
Python
packages/syft/src/syft/core/node/common/client.py
yuhongsun96/PySyft
36f624ec47336d58fb73504c0817aa988a678626
[ "Apache-2.0" ]
null
null
null
packages/syft/src/syft/core/node/common/client.py
yuhongsun96/PySyft
36f624ec47336d58fb73504c0817aa988a678626
[ "Apache-2.0" ]
null
null
null
packages/syft/src/syft/core/node/common/client.py
yuhongsun96/PySyft
36f624ec47336d58fb73504c0817aa988a678626
[ "Apache-2.0" ]
null
null
null
# stdlib import sys from typing import Any from typing import Dict from typing import Iterator from typing import List from typing import Optional from typing import Tuple from typing import Union # third party from google.protobuf.reflection import GeneratedProtocolMessageType from nacl.signing import SigningKey from...
36.795872
118
0.616531
import sys from typing import Any from typing import Dict from typing import Iterator from typing import List from typing import Optional from typing import Tuple from typing import Union from google.protobuf.reflection import GeneratedProtocolMessageType from nacl.signing import SigningKey from nacl.signing import Ve...
true
true
f7715a28674483d53845ac83ed3ce7dd4c7220b3
1,510
py
Python
dataset/ss3.py
ibivu/protein-glue
47f68b4789c6750dfb9bf6d6ae382a9061514bfd
[ "CC0-1.0" ]
4
2021-12-27T01:42:50.000Z
2022-02-11T13:47:53.000Z
dataset/ss3.py
ibivu/protein-glue
47f68b4789c6750dfb9bf6d6ae382a9061514bfd
[ "CC0-1.0" ]
null
null
null
dataset/ss3.py
ibivu/protein-glue
47f68b4789c6750dfb9bf6d6ae382a9061514bfd
[ "CC0-1.0" ]
null
null
null
from numpy import float32 import tensorflow as tf import constants as c def _parse_example(example_proto): features = { "sequence": tf.io.FixedLenFeature((), tf.string, default_value=""), "ss3": tf.io.VarLenFeature(tf.int64), "ss8": tf.io.VarLenFeature(tf.int64) } parsed_features = ...
40.810811
126
0.695364
from numpy import float32 import tensorflow as tf import constants as c def _parse_example(example_proto): features = { "sequence": tf.io.FixedLenFeature((), tf.string, default_value=""), "ss3": tf.io.VarLenFeature(tf.int64), "ss8": tf.io.VarLenFeature(tf.int64) } parsed_features = ...
true
true
f7715b823cacffedea9e22d354defcc40bba2fa7
8,220
py
Python
fastjsonschema/__init__.py
StephenNneji/python-fastjsonschema
e7441c2efa40f5ac099a7788b8dafe6942146cf0
[ "BSD-3-Clause" ]
15
2020-06-29T08:33:39.000Z
2022-02-12T00:28:51.000Z
fastjsonschema/__init__.py
StephenNneji/python-fastjsonschema
e7441c2efa40f5ac099a7788b8dafe6942146cf0
[ "BSD-3-Clause" ]
4
2020-11-27T09:34:13.000Z
2021-04-30T21:13:41.000Z
fastjsonschema/__init__.py
StephenNneji/python-fastjsonschema
e7441c2efa40f5ac099a7788b8dafe6942146cf0
[ "BSD-3-Clause" ]
11
2020-06-29T08:40:24.000Z
2022-02-24T17:39:16.000Z
# ___ # \./ DANGER: This project implements some code generation # .--.O.--. techniques involving string concatenation. # \/ \/ If you look at it, you might die. # r""" Installation ************ .. code-block:: bash pip install fastjsonschema Support only for Python 3.3 and highe...
37.363636
119
0.681144
from .draft04 import CodeGeneratorDraft04 from .draft06 import CodeGeneratorDraft06 from .draft07 import CodeGeneratorDraft07 from .exceptions import JsonSchemaException, JsonSchemaDefinitionException from .ref_resolver import RefResolver from .version import VERSION __all__ = ('VERSION', 'JsonSchemaException', 'Jso...
true
true
f7715b86af443d855e769dd9e7fa6733765128c8
9,305
py
Python
v2.5.7/toontown/safezone/TTPlayground.py
TTOFFLINE-LEAK/ttoffline
bb0e91704a755d34983e94288d50288e46b68380
[ "MIT" ]
4
2019-07-01T15:46:43.000Z
2021-07-23T16:26:48.000Z
v2.5.7/toontown/safezone/TTPlayground.py
TTOFFLINE-LEAK/ttoffline
bb0e91704a755d34983e94288d50288e46b68380
[ "MIT" ]
1
2019-06-29T03:40:05.000Z
2021-06-13T01:15:16.000Z
v2.5.7/toontown/safezone/TTPlayground.py
TTOFFLINE-LEAK/ttoffline
bb0e91704a755d34983e94288d50288e46b68380
[ "MIT" ]
4
2019-07-28T21:18:46.000Z
2021-02-25T06:37:25.000Z
from panda3d.core import * from toontown.toonbase import ToontownGlobals import Playground, random, time from otp.nametag.NametagConstants import * from toontown.launcher import DownloadForceAcknowledge from direct.task.Task import Task from toontown.hood import ZoneUtil from toontown.election import SafezoneInvasionGl...
55.718563
1,676
0.667598
from panda3d.core import * from toontown.toonbase import ToontownGlobals import Playground, random, time from otp.nametag.NametagConstants import * from toontown.launcher import DownloadForceAcknowledge from direct.task.Task import Task from toontown.hood import ZoneUtil from toontown.election import SafezoneInvasionGl...
true
true
f7715c5839ee3902caa952e81255ebe3d5286b49
574
py
Python
tests/integration/test_identity.py
mattiskan/plaid-python
9149f2276d16cde6a269b82397cfef075e89ae76
[ "MIT" ]
null
null
null
tests/integration/test_identity.py
mattiskan/plaid-python
9149f2276d16cde6a269b82397cfef075e89ae76
[ "MIT" ]
null
null
null
tests/integration/test_identity.py
mattiskan/plaid-python
9149f2276d16cde6a269b82397cfef075e89ae76
[ "MIT" ]
null
null
null
from tests.integration.util import ( create_client, CREDENTIALS, SANDBOX_INSTITUTION, ) access_token = None def setup_module(module): client = create_client() response = client.Item.create( CREDENTIALS, SANDBOX_INSTITUTION, ['identity']) global access_token access_token = response...
21.259259
55
0.714286
from tests.integration.util import ( create_client, CREDENTIALS, SANDBOX_INSTITUTION, ) access_token = None def setup_module(module): client = create_client() response = client.Item.create( CREDENTIALS, SANDBOX_INSTITUTION, ['identity']) global access_token access_token = response...
true
true
f7715cf82c75b724d029b14f92203e6242b0b131
610
py
Python
pytests/dcp/constants.py
pavithra-mahamani/TAF
ff854adcc6ca3e50d9dc64e7756ca690251128d3
[ "Apache-2.0" ]
null
null
null
pytests/dcp/constants.py
pavithra-mahamani/TAF
ff854adcc6ca3e50d9dc64e7756ca690251128d3
[ "Apache-2.0" ]
null
null
null
pytests/dcp/constants.py
pavithra-mahamani/TAF
ff854adcc6ca3e50d9dc64e7756ca690251128d3
[ "Apache-2.0" ]
null
null
null
""" Test constants """ CONSUMER = "consumer" NOTIFIER = "notifier" PRODUCER = "producer" DEFAULT = "default" MCD = "mcd" DCP = "dcp" SUCCESS = 0 DEFAULT_CONN_NAME = "default_dcp_connection" """ Error Messages """ EINV_KEY = "ERROR: Received invalid key" EINV_RESPONSE = "ERROR: received invalid stream response" ENO_BUC...
30.5
60
0.740984
CONSUMER = "consumer" NOTIFIER = "notifier" PRODUCER = "producer" DEFAULT = "default" MCD = "mcd" DCP = "dcp" SUCCESS = 0 DEFAULT_CONN_NAME = "default_dcp_connection" EINV_KEY = "ERROR: Received invalid key" EINV_RESPONSE = "ERROR: received invalid stream response" ENO_BUCKET = "ERROR: unable to find bucket" ENO_CLIEN...
true
true
f7715dc658a7d2708b84646bc84a5baa5d212f3a
14,858
py
Python
tools/unit-test-app/tools/UnitTestParser.py
itmm/esp-idf
58df1d93bc17c74499d58e05390af9c309192a5c
[ "Apache-2.0" ]
1
2021-09-10T01:18:48.000Z
2021-09-10T01:18:48.000Z
tools/unit-test-app/tools/UnitTestParser.py
itmm/esp-idf
58df1d93bc17c74499d58e05390af9c309192a5c
[ "Apache-2.0" ]
null
null
null
tools/unit-test-app/tools/UnitTestParser.py
itmm/esp-idf
58df1d93bc17c74499d58e05390af9c309192a5c
[ "Apache-2.0" ]
1
2019-11-12T08:20:37.000Z
2019-11-12T08:20:37.000Z
from __future__ import print_function import yaml import os import re import shutil import subprocess from copy import deepcopy import CreateSectionTable TEST_CASE_PATTERN = { "initial condition": "UTINIT1", "SDK": "ESP32_IDF", "level": "Unit", "execution time": 0, "auto test": "Yes", "categor...
42.942197
120
0.601292
from __future__ import print_function import yaml import os import re import shutil import subprocess from copy import deepcopy import CreateSectionTable TEST_CASE_PATTERN = { "initial condition": "UTINIT1", "SDK": "ESP32_IDF", "level": "Unit", "execution time": 0, "auto test": "Yes", "categor...
true
true
f7715e3c8c4699832b3879989d0f2a093042fa17
630
py
Python
core/src/zeit/content/cp/browser/tests/test_admin.py
rickdg/vivi
16134ac954bf8425646d4ad47bdd1f372e089355
[ "BSD-3-Clause" ]
5
2019-05-16T09:51:29.000Z
2021-05-31T09:30:03.000Z
core/src/zeit/content/cp/browser/tests/test_admin.py
rickdg/vivi
16134ac954bf8425646d4ad47bdd1f372e089355
[ "BSD-3-Clause" ]
107
2019-05-24T12:19:02.000Z
2022-03-23T15:05:56.000Z
core/src/zeit/content/cp/browser/tests/test_admin.py
rickdg/vivi
16134ac954bf8425646d4ad47bdd1f372e089355
[ "BSD-3-Clause" ]
3
2020-08-14T11:01:17.000Z
2022-01-08T17:32:19.000Z
from zeit.content.cp.centerpage import CenterPage import zeit.content.cp.testing class TestAdminMenu(zeit.content.cp.testing.BrowserTestCase): login_as = 'zmgr:mgrpw' def test_smoke(self): self.repository['centerpage'] = CenterPage() b = self.browser b.open('http://localhost/++skin+...
30
61
0.639683
from zeit.content.cp.centerpage import CenterPage import zeit.content.cp.testing class TestAdminMenu(zeit.content.cp.testing.BrowserTestCase): login_as = 'zmgr:mgrpw' def test_smoke(self): self.repository['centerpage'] = CenterPage() b = self.browser b.open('http://localhost/++skin+...
true
true
f7715e58061544e2b7fd0f5972bcfeab584c296a
23,086
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/operations/_network_interface_tap_configurations_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
3
2020-06-23T02:25:27.000Z
2021-09-07T18:48:11.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/operations/_network_interface_tap_configurations_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
510
2019-07-17T16:11:19.000Z
2021-08-02T08:38:32.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/operations/_network_interface_tap_configurations_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
5
2019-09-04T12:51:37.000Z
2020-09-16T07:28:40.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 ...
52.230769
244
0.681798
from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpR...
true
true
f7715ea7eb32ac5d43693651552533bfb3807460
9,386
py
Python
intersight/model/adapter_eth_settings_all_of.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
5
2021-12-16T15:13:32.000Z
2022-03-29T16:09:54.000Z
intersight/model/adapter_eth_settings_all_of.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
4
2022-01-25T19:05:51.000Z
2022-03-29T20:18:37.000Z
intersight/model/adapter_eth_settings_all_of.py
CiscoDevNet/intersight-python
04b721f37c3044646a91c185c7259edfb991557a
[ "Apache-2.0" ]
2
2020-07-07T15:01:08.000Z
2022-01-31T04:27:35.000Z
""" Cisco Intersight Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advan...
50.462366
1,678
0.63648
import re import sys from intersight.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_composed_info, ) class Ad...
true
true
f7716014527642e2aa61fc9f27ae10a7bb4ff7a3
227
py
Python
authors/apps/articles/exceptions.py
deferral/ah-django
b80ad485339dbb02b74d9b2093543bf8173d51de
[ "BSD-3-Clause" ]
1
2019-04-12T08:34:10.000Z
2019-04-12T08:34:10.000Z
authors/apps/articles/exceptions.py
deferral/ah-django
b80ad485339dbb02b74d9b2093543bf8173d51de
[ "BSD-3-Clause" ]
18
2019-03-26T02:17:38.000Z
2019-04-26T08:57:47.000Z
authors/apps/articles/exceptions.py
deferral/ah-django
b80ad485339dbb02b74d9b2093543bf8173d51de
[ "BSD-3-Clause" ]
1
2019-11-22T11:52:32.000Z
2019-11-22T11:52:32.000Z
from rest_framework.exceptions import APIException class NoResultsMatch(APIException): """ Define error when search is not valid """ status_code = 400 default_detail = 'results matching search not found'
20.636364
56
0.726872
from rest_framework.exceptions import APIException class NoResultsMatch(APIException): status_code = 400 default_detail = 'results matching search not found'
true
true
f771608e1d934b8a26cb338650bbfd4f473d3368
4,640
py
Python
django/contrib/gis/geoip/tests.py
pegler/django
e9c6d0422422d7ea5ff3be8992ca73b5ba73bd0c
[ "BSD-3-Clause" ]
1
2015-11-06T01:03:07.000Z
2015-11-06T01:03:07.000Z
django/contrib/gis/geoip/tests.py
pegler/django
e9c6d0422422d7ea5ff3be8992ca73b5ba73bd0c
[ "BSD-3-Clause" ]
null
null
null
django/contrib/gis/geoip/tests.py
pegler/django
e9c6d0422422d7ea5ff3be8992ca73b5ba73bd0c
[ "BSD-3-Clause" ]
1
2020-12-24T01:28:30.000Z
2020-12-24T01:28:30.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os import unittest from unittest import skipUnless from django.conf import settings from django.contrib.gis.geos import HAS_GEOS from django.contrib.gis.geoip import HAS_GEOIP from django.utils import six if HAS_GEOIP: from . import GeoIP, G...
38.032787
89
0.617888
from __future__ import unicode_literals import os import unittest from unittest import skipUnless from django.conf import settings from django.contrib.gis.geos import HAS_GEOS from django.contrib.gis.geoip import HAS_GEOIP from django.utils import six if HAS_GEOIP: from . import GeoIP, GeoIPException if HAS_GE...
true
true
f77161e0b1df57e2cfbd9c0c12f17d33d9a64936
19,940
py
Python
genome.py
JackNg88/glbase3
4af190d06b89ef360dcba201d9e4e81f41ef8379
[ "MIT" ]
1
2021-04-01T14:35:06.000Z
2021-04-01T14:35:06.000Z
genome.py
JackNg88/glbase3
4af190d06b89ef360dcba201d9e4e81f41ef8379
[ "MIT" ]
null
null
null
genome.py
JackNg88/glbase3
4af190d06b89ef360dcba201d9e4e81f41ef8379
[ "MIT" ]
null
null
null
""" Genome ====== TODO: ----- . To be replaced by genome_sql """ import sys, os, csv from . import config, utils from .genelist import genelist from .errors import AssertionError from .location import location from .progress import progressbar from .format import sniffer, sniffer_tsv from .data import * class geno...
37.836812
150
0.563892
import sys, os, csv from . import config, utils from .genelist import genelist from .errors import AssertionError from .location import location from .progress import progressbar from .format import sniffer, sniffer_tsv from .data import * class genome(genelist): def __init__(self, name="None", filename=None, **...
true
true
f7716266e7c15fb1e51c85ddaa5fe31a2d98cab1
334
py
Python
converter.py
gabrieldemarmiesse/tracks_separation
81b0b1cb0bce269a76403ad5e16c3e0469160f40
[ "MIT" ]
null
null
null
converter.py
gabrieldemarmiesse/tracks_separation
81b0b1cb0bce269a76403ad5e16c3e0469160f40
[ "MIT" ]
null
null
null
converter.py
gabrieldemarmiesse/tracks_separation
81b0b1cb0bce269a76403ad5e16c3e0469160f40
[ "MIT" ]
null
null
null
from glob import glob from tqdm import tqdm as tq from scipy.io.wavfile import read, write from resampy import resample new_rate = 16000 path = "./data/DSD100_16kHz/Sources/*/*/*.wav" for file in tq(glob(path)): rate, array = read(file) new_array = resample(array,rate, new_rate, axis=0) write(file, new_rat...
27.833333
54
0.724551
from glob import glob from tqdm import tqdm as tq from scipy.io.wavfile import read, write from resampy import resample new_rate = 16000 path = "./data/DSD100_16kHz/Sources/*/*/*.wav" for file in tq(glob(path)): rate, array = read(file) new_array = resample(array,rate, new_rate, axis=0) write(file, new_rat...
true
true
f771646be515e144070f766f2b1a35aff0cf9b0a
2,334
py
Python
setup.py
laugustyniak/nlp-architect
7e9068657b575595a1f279eae59a172853cb4fe1
[ "Apache-2.0" ]
null
null
null
setup.py
laugustyniak/nlp-architect
7e9068657b575595a1f279eae59a172853cb4fe1
[ "Apache-2.0" ]
null
null
null
setup.py
laugustyniak/nlp-architect
7e9068657b575595a1f279eae59a172853cb4fe1
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # ****************************************************************************** # Copyright 2017-2018 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at ...
43.222222
80
0.573265
from setuptools import setup, find_packages VERSION = '0.1' FULLVERSION = VERSION requirements = [ ] setup(name='nlp_architect', version=VERSION, description="Intel AI Lab NLP Deep Learning framework for Research", author='Intel AI Lab NLP', author_email='nlp_architect@intel.com', url='...
true
true
f77167aeae2897d48b6785ebd80f3590d02e2d72
24,719
bzl
Python
bazel/repositories.bzl
ryanmcnamara/envoy
29b30911dbfb3f9760efeb28238ceac36e1a1a23
[ "Apache-2.0" ]
2
2020-03-09T19:20:47.000Z
2021-05-05T21:02:07.000Z
bazel/repositories.bzl
ryanmcnamara/envoy
29b30911dbfb3f9760efeb28238ceac36e1a1a23
[ "Apache-2.0" ]
22
2022-02-14T11:41:25.000Z
2022-03-30T11:34:09.000Z
bazel/repositories.bzl
membphis/envoy
2d90dd7157af272ec1fa082f4f8b58d703a58ece
[ "Apache-2.0" ]
2
2019-11-29T12:40:19.000Z
2019-12-13T14:09:55.000Z
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load(":dev_binding.bzl", "envoy_dev_binding") load(":genrule_repository.bzl", "genrule_repository") load("@envoy_api//bazel:envoy_http_archive.bzl", "envoy_http_archive") load(":repository_locations.bzl", "REPOSITORY_LOCATIONS") load("@com_google_goog...
31.05402
108
0.658077
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load(":dev_binding.bzl", "envoy_dev_binding") load(":genrule_repository.bzl", "genrule_repository") load("@envoy_api//bazel:envoy_http_archive.bzl", "envoy_http_archive") load(":repository_locations.bzl", "REPOSITORY_LOCATIONS") load("@com_google_goog...
true
true
f77168207f716c74d7532a30a2f85b5ba4b30f28
39,233
py
Python
grr/server/grr_response_server/gui/api_plugins/report_plugins/report_plugins_test.py
oueldz4/grr
8c60d9198cc0875a8ea80b90237eb0a8272082ff
[ "Apache-2.0" ]
null
null
null
grr/server/grr_response_server/gui/api_plugins/report_plugins/report_plugins_test.py
oueldz4/grr
8c60d9198cc0875a8ea80b90237eb0a8272082ff
[ "Apache-2.0" ]
null
null
null
grr/server/grr_response_server/gui/api_plugins/report_plugins/report_plugins_test.py
oueldz4/grr
8c60d9198cc0875a8ea80b90237eb0a8272082ff
[ "Apache-2.0" ]
1
2020-07-09T01:08:48.000Z
2020-07-09T01:08:48.000Z
#!/usr/bin/env python """Tests for report plugins.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import itertools import math from absl import app from future.builtins import range from grr_response_core import config from grr_response_core.lib impo...
38.463725
88
0.656947
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import itertools import math from absl import app from future.builtins import range from grr_response_core import config from grr_response_core.lib import rdfvalue from grr_response_core.lib.rdfvalues impor...
true
true
f7716854c7a7139601279b9e83e8951d32da2d20
7,177
py
Python
lib/spack/spack/util/module_cmd.py
STEllAR-GROUP/spack
4d794d63b5ac3c667446c74d367fe4eb7f1e2caf
[ "ECL-2.0", "Apache-2.0", "MIT" ]
null
null
null
lib/spack/spack/util/module_cmd.py
STEllAR-GROUP/spack
4d794d63b5ac3c667446c74d367fe4eb7f1e2caf
[ "ECL-2.0", "Apache-2.0", "MIT" ]
null
null
null
lib/spack/spack/util/module_cmd.py
STEllAR-GROUP/spack
4d794d63b5ac3c667446c74d367fe4eb7f1e2caf
[ "ECL-2.0", "Apache-2.0", "MIT" ]
null
null
null
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) """ This module contains routines related to the module command for accessing and parsing environment modules. """ import ...
37.575916
79
0.621012
import subprocess import os import sys import json import re import llnl.util.tty as tty module_change_commands = ['load', 'swap', 'unload', 'purge', 'use', 'unuse'] py_cmd = 'import os; import json; print(json.dumps(dict(os.environ)))' _test_mode = False def module(*args): module_cmd = 'module ' + ' '.join(a...
true
true
f77168c84c80f44e01574ed0a94d411f61a73e18
876
py
Python
pcg_gazebo/parsers/sdf/body_name.py
TForce1/pcg_gazebo
9ff88016b7b6903236484958ca7c6ed9f8ffb346
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
pcg_gazebo/parsers/sdf/body_name.py
TForce1/pcg_gazebo
9ff88016b7b6903236484958ca7c6ed9f8ffb346
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
pcg_gazebo/parsers/sdf/body_name.py
TForce1/pcg_gazebo
9ff88016b7b6903236484958ca7c6ed9f8ffb346
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Copyright (c) 2019 - The Procedural Generation for Gazebo authors # For information on the respective copyright owner see the NOTICE file # # 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 # #...
35.04
74
0.745434
from ..types import XMLString class BodyName(XMLString): _NAME = 'bodyName' _TYPE = 'sdf' def __init__(self, default='none'): super(BodyName, self).__init__(default)
true
true
f77168d5a15a1187d94edfc593ed43416e3d8946
1,979
py
Python
recipes/recipe_modules/cloudbuildhelper/test_api.py
allaparthi/monorail
e18645fc1b952a5a6ff5f06e0c740d75f1904473
[ "BSD-3-Clause" ]
null
null
null
recipes/recipe_modules/cloudbuildhelper/test_api.py
allaparthi/monorail
e18645fc1b952a5a6ff5f06e0c740d75f1904473
[ "BSD-3-Clause" ]
null
null
null
recipes/recipe_modules/cloudbuildhelper/test_api.py
allaparthi/monorail
e18645fc1b952a5a6ff5f06e0c740d75f1904473
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2019 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from hashlib import sha256 from recipe_engine import recipe_test_api class CloudBuildHelperTestApi(recipe_test_api.RecipeTestApi): def build_success_out...
30.921875
80
0.632137
from hashlib import sha256 from recipe_engine import recipe_test_api class CloudBuildHelperTestApi(recipe_test_api.RecipeTestApi): def build_success_output(self, image, target='target', canonical_tag=None): if not image: img = 'example.com/fake-registry/%s' % target digest = 'sha256:'+sha256(targe...
true
true
f7716c91047d74bc4d418e07106d19525495fbbc
868
py
Python
setup.py
RaSan147/python
e93257ff071e72ca8d97859cb962f06192c3d0df
[ "Apache-2.0" ]
283
2018-10-03T22:02:14.000Z
2022-03-31T14:57:23.000Z
setup.py
RaSan147/python
e93257ff071e72ca8d97859cb962f06192c3d0df
[ "Apache-2.0" ]
48
2018-10-30T15:22:07.000Z
2022-01-04T13:34:37.000Z
setup.py
RaSan147/python
e93257ff071e72ca8d97859cb962f06192c3d0df
[ "Apache-2.0" ]
84
2018-10-16T05:44:45.000Z
2022-03-11T16:12:54.000Z
from setuptools import setup from ipinfo.version import SDK_VERSION long_description = """ The official Python library for IPinfo. IPinfo prides itself on being the most reliable, accurate, and in-depth source of IP address data available anywhere. We process terabytes of data to produce our custom IP geolocation, c...
32.148148
117
0.739631
from setuptools import setup from ipinfo.version import SDK_VERSION long_description = """ The official Python library for IPinfo. IPinfo prides itself on being the most reliable, accurate, and in-depth source of IP address data available anywhere. We process terabytes of data to produce our custom IP geolocation, c...
true
true
f7716cc7403047c4575113f9a34f8523baef2e2b
1,584
py
Python
kats/tests/models/test_lstm_model.py
mike-scott1/Kats
7e2c35965bc156d333831204bc7db1e7fa9f8aae
[ "MIT" ]
null
null
null
kats/tests/models/test_lstm_model.py
mike-scott1/Kats
7e2c35965bc156d333831204bc7db1e7fa9f8aae
[ "MIT" ]
null
null
null
kats/tests/models/test_lstm_model.py
mike-scott1/Kats
7e2c35965bc156d333831204bc7db1e7fa9f8aae
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import io import os import pkgutil import unittest from unittest import TestCase import pandas as pd from kats.consts import TimeSeriesData fro...
29.886792
79
0.688131
import io import os import pkgutil import unittest from unittest import TestCase import pandas as pd from kats.consts import TimeSeriesData from kats.data.utils import load_air_passengers from kats.models.lstm import LSTMModel, LSTMParams def load_data(file_name): ROOT = "kats" if "kats" in os.getcwd().lowe...
true
true
f7716d154c4129f506d04590e1524fcb8b2888bb
7,011
py
Python
tabbi/gmm.py
Yu-AnChen/tabbi
bf4655905d0f3fc5b7dd49a1cd12c69cb83e5bb5
[ "MIT" ]
null
null
null
tabbi/gmm.py
Yu-AnChen/tabbi
bf4655905d0f3fc5b7dd49a1cd12c69cb83e5bb5
[ "MIT" ]
null
null
null
tabbi/gmm.py
Yu-AnChen/tabbi
bf4655905d0f3fc5b7dd49a1cd12c69cb83e5bb5
[ "MIT" ]
null
null
null
import sklearn.mixture import matplotlib.pyplot as plt import numpy as np from matplotlib import ticker import matplotlib.patheffects as mpatheffects def get_gmm_and_pos_label( array, n_components=2, n_steps=5000 ): gmm = sklearn.mixture.GaussianMixture( n_components=n_components, covarianc...
31.581081
97
0.601341
import sklearn.mixture import matplotlib.pyplot as plt import numpy as np from matplotlib import ticker import matplotlib.patheffects as mpatheffects def get_gmm_and_pos_label( array, n_components=2, n_steps=5000 ): gmm = sklearn.mixture.GaussianMixture( n_components=n_components, covarianc...
true
true
f7716d22c9a333b6d26c21c257926fd4d8e6bdb1
1,583
py
Python
sglib/_gene_annotation_functions/_merge_reduce_gene_regions.py
mvinyard/guideID
fec14c8713960428fc31f68ece7ac36a7b2bcab9
[ "MIT" ]
null
null
null
sglib/_gene_annotation_functions/_merge_reduce_gene_regions.py
mvinyard/guideID
fec14c8713960428fc31f68ece7ac36a7b2bcab9
[ "MIT" ]
null
null
null
sglib/_gene_annotation_functions/_merge_reduce_gene_regions.py
mvinyard/guideID
fec14c8713960428fc31f68ece7ac36a7b2bcab9
[ "MIT" ]
null
null
null
import seq_toolkit def _merge_reduce_gene_regions(feature_df, gene, feature): """ Often, when isolating a feature from a GTF for a given gene (ex: exons), there are many overlapping isoforms that can be collapsed to avoid redundancy in identifying sgRNAs. This function uses the more general `GenomicF...
31.66
105
0.659507
import seq_toolkit def _merge_reduce_gene_regions(feature_df, gene, feature): feature_bed_out_path = "{}.{}.bed".format(gene, feature) df_ = feature_df.copy() df_.columns = ["Start", "End", "Chromosome"] features = seq_toolkit.GenomicFeatures(df_[["Chromosome", "Start", "End"]]) feature...
true
true
f7716f9b103769ef46283c58ba028c18d6d20224
173
py
Python
Python_Basics/01_Simple_Operations_And_Calculations_Lab/04_Concatenate_data.py
Dochko0/Python
e9612c4e842cfd3d9a733526cc7485765ef2238f
[ "MIT" ]
null
null
null
Python_Basics/01_Simple_Operations_And_Calculations_Lab/04_Concatenate_data.py
Dochko0/Python
e9612c4e842cfd3d9a733526cc7485765ef2238f
[ "MIT" ]
null
null
null
Python_Basics/01_Simple_Operations_And_Calculations_Lab/04_Concatenate_data.py
Dochko0/Python
e9612c4e842cfd3d9a733526cc7485765ef2238f
[ "MIT" ]
null
null
null
firstNqma = input() secondName = input() age = int(input()) town = input() print('You are '+firstNqma+' '+ secondName+', a '+ str(age) +'-years old person from '+town+'.')
24.714286
96
0.624277
firstNqma = input() secondName = input() age = int(input()) town = input() print('You are '+firstNqma+' '+ secondName+', a '+ str(age) +'-years old person from '+town+'.')
true
true
f7716fdb594b92cdbbf929c50b144364642ae3f9
214
py
Python
UserStoryAndMockup/make_uss_script.py
N0t-A-G3n1us/RoRProject
5d787528a837644e9c0210846b248166fb340740
[ "MIT" ]
null
null
null
UserStoryAndMockup/make_uss_script.py
N0t-A-G3n1us/RoRProject
5d787528a837644e9c0210846b248166fb340740
[ "MIT" ]
4
2019-11-08T23:29:20.000Z
2020-03-04T11:19:49.000Z
UserStoryAndMockup/make_uss_script.py
N0t-A-G3n1us/RoRProject
5d787528a837644e9c0210846b248166fb340740
[ "MIT" ]
1
2018-11-04T21:40:51.000Z
2018-11-04T21:40:51.000Z
import sys FILENAME='uss.txt' f=open(FILENAME, 'w') for i in range(100): head="" if(i%10==0): head="\nSEZIONE\n" s=head + str(i)+". "+"As a "+ "I want to "+"\ so that I can \n " f.write(s);
13.375
53
0.518692
import sys FILENAME='uss.txt' f=open(FILENAME, 'w') for i in range(100): head="" if(i%10==0): head="\nSEZIONE\n" s=head + str(i)+". "+"As a "+ "I want to "+"\ so that I can \n " f.write(s);
true
true
f771709a50c3ede3408afb9d2c964e3a71d737bd
4,423
py
Python
layers/conv.py
Dtananaev/tf_lstm_depth
94f83e8671e8928eba24eac6936a02cd9d123686
[ "BSD-2-Clause" ]
7
2018-09-30T10:00:22.000Z
2022-03-23T12:32:48.000Z
layers/conv.py
Dtananaev/tf_lstm_depth
94f83e8671e8928eba24eac6936a02cd9d123686
[ "BSD-2-Clause" ]
null
null
null
layers/conv.py
Dtananaev/tf_lstm_depth
94f83e8671e8928eba24eac6936a02cd9d123686
[ "BSD-2-Clause" ]
1
2020-07-08T12:46:40.000Z
2020-07-08T12:46:40.000Z
# # Author: Denis Tananaev # File: conv.py # Date: 9.02.2017 # Description: convolution functions for neural networks # #include libs from __future__ import absolute_import from __future__ import division from __future__ import print_function #import os from six.moves import xrange #import os #import re #import sys #i...
34.554688
100
0.660638
from __future__ import absolute_import from __future__ import division from __future__ import print_function from six.moves import xrange import tensorflow as tf import layers.summary as sm def _variable_on_cpu(name, shape, initializer, FLOAT16=False): with tf.device('/cpu:0'): if(FLOAT16==True): dtype = ...
true
true
f7717250137fb67630823f7a43304e03835fa953
330
py
Python
koan_lib/errors.py
koans-for-pebble/koans-for-pebble
f9ca948cf4d477b43e7d18a38e5b4e60d8f87e17
[ "MIT" ]
null
null
null
koan_lib/errors.py
koans-for-pebble/koans-for-pebble
f9ca948cf4d477b43e7d18a38e5b4e60d8f87e17
[ "MIT" ]
null
null
null
koan_lib/errors.py
koans-for-pebble/koans-for-pebble
f9ca948cf4d477b43e7d18a38e5b4e60d8f87e17
[ "MIT" ]
null
null
null
class BuildError(Exception): def __init__(self, message="Build error."): self.message = message class TestError(Exception): def __init__(self, message="Test error."): self.message = message class InstallError(Exception): def __init__(self, message="Install error."): self.message ...
23.571429
49
0.678788
class BuildError(Exception): def __init__(self, message="Build error."): self.message = message class TestError(Exception): def __init__(self, message="Test error."): self.message = message class InstallError(Exception): def __init__(self, message="Install error."): self.message ...
true
true
f77172abb7254b49ff2c99b1081f9e929de46b71
9,701
py
Python
utils/convert.py
ravi-0841/spect-pitch-gan
ea4b9ea8396df753e25e0b2cb210288f683d3903
[ "MIT" ]
null
null
null
utils/convert.py
ravi-0841/spect-pitch-gan
ea4b9ea8396df753e25e0b2cb210288f683d3903
[ "MIT" ]
null
null
null
utils/convert.py
ravi-0841/spect-pitch-gan
ea4b9ea8396df753e25e0b2cb210288f683d3903
[ "MIT" ]
null
null
null
import argparse import os import numpy as np import librosa import scipy.io.wavfile as scwav import scipy.signal as scisig import pylab import numpy.matlib as npmat import utils.preprocess as preproc from utils.helper import smooth, generate_interpolation #from nn_models.model_embedding_wasserstein import VariationalC...
48.024752
150
0.61303
import argparse import os import numpy as np import librosa import scipy.io.wavfile as scwav import scipy.signal as scisig import pylab import numpy.matlib as npmat import utils.preprocess as preproc from utils.helper import smooth, generate_interpolation from nn_models.model_pitch_mfc_discriminate_wasserstein import ...
true
true
f77173820712e19bd0f5ea1d043b2ed897409624
20,694
py
Python
ExtentionPackages/pysmi/compiler.py
hongsofwing/PyQYT-master
9a112d9adbf9885a8b7535b7ef7759b60a0f9a29
[ "CNRI-Python" ]
null
null
null
ExtentionPackages/pysmi/compiler.py
hongsofwing/PyQYT-master
9a112d9adbf9885a8b7535b7ef7759b60a0f9a29
[ "CNRI-Python" ]
null
null
null
ExtentionPackages/pysmi/compiler.py
hongsofwing/PyQYT-master
9a112d9adbf9885a8b7535b7ef7759b60a0f9a29
[ "CNRI-Python" ]
null
null
null
# # This file is part of pysmi software. # # Copyright (c) 2015-2016, Ilya Etingof <ilya@glas.net> # License: http://pysmi.sf.net/license.html # import sys import os import time try: from pwd import getpwuid except ImportError: getpwuid = lambda x: ['<unknown>'] from pysmi import __name__ as packageName from py...
43.292887
266
0.589011
import sys import os import time try: from pwd import getpwuid except ImportError: getpwuid = lambda x: ['<unknown>'] from pysmi import __name__ as packageName from pysmi import __version__ as packageVersion from pysmi.mibinfo import MibInfo from pysmi.codegen.symtable import SymtableCodeGen from pysmi import e...
true
true
f77173c7d3e8b55f365e50648d510f8906510570
1,473
py
Python
esm_full_backup/console.py
aw-mfe/esm_full_backup
79bb99a93fd8285890a063c92abb33fe37c3f8f5
[ "ISC" ]
1
2017-11-18T00:06:03.000Z
2017-11-18T00:06:03.000Z
esm_full_backup/console.py
andywalden/esm_full_backup
79bb99a93fd8285890a063c92abb33fe37c3f8f5
[ "0BSD" ]
null
null
null
esm_full_backup/console.py
andywalden/esm_full_backup
79bb99a93fd8285890a063c92abb33fe37c3f8f5
[ "0BSD" ]
1
2019-12-04T05:41:30.000Z
2019-12-04T05:41:30.000Z
# -*- coding: utf-8 -*- import argparse import sys from configparser import ConfigParser, NoSectionError, MissingSectionHeaderError from esm_full_backup.esm_full_backup import Config, ESM, dehexify def main(): config = Config() try: host = config.esmhost except AttributeError: ...
29.46
166
0.59131
import argparse import sys from configparser import ConfigParser, NoSectionError, MissingSectionHeaderError from esm_full_backup.esm_full_backup import Config, ESM, dehexify def main(): config = Config() try: host = config.esmhost except AttributeError: print("Cannot find 'esmh...
true
true
f77173d1a330b27ed8a05a4301839b779b3c405e
992
py
Python
var/spack/repos/builtin/packages/netgauge/package.py
player1537-forks/spack
822b7632222ec5a91dc7b7cda5fc0e08715bd47c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
11
2015-10-04T02:17:46.000Z
2018-02-07T18:23:00.000Z
var/spack/repos/builtin/packages/netgauge/package.py
player1537-forks/spack
822b7632222ec5a91dc7b7cda5fc0e08715bd47c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
22
2017-08-01T22:45:10.000Z
2022-03-10T07:46:31.000Z
var/spack/repos/builtin/packages/netgauge/package.py
player1537-forks/spack
822b7632222ec5a91dc7b7cda5fc0e08715bd47c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
4
2016-06-10T17:57:39.000Z
2018-09-11T04:59:38.000Z
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os from spack import * class Netgauge(AutotoolsPackage): """Netgauge is a high-precision network parameter m...
34.206897
95
0.71371
import os from spack import * class Netgauge(AutotoolsPackage): homepage = "http://unixer.de/research/netgauge/" url = "http://unixer.de/research/netgauge/netgauge-2.4.6.tar.gz" version('2.4.6', sha256='dc9398e4e042efec70881f2c7074ff18cc5b74bc5ffc4b8a4aaf813b39f83444') depends_on("mpi") ...
true
true
f771740b6b81e65db75d747839e30f04360cc0f4
5,333
py
Python
scripts/revertbot.py
K-wachira/Outreachywikibot
11afd0c42b7e6c8c182f39ef58174adb901ba697
[ "MIT" ]
null
null
null
scripts/revertbot.py
K-wachira/Outreachywikibot
11afd0c42b7e6c8c182f39ef58174adb901ba697
[ "MIT" ]
null
null
null
scripts/revertbot.py
K-wachira/Outreachywikibot
11afd0c42b7e6c8c182f39ef58174adb901ba697
[ "MIT" ]
null
null
null
#!/usr/bin/python r""" This script can be used for reverting certain edits. The following command line parameters are supported: -username Edits of which user need to be reverted. Default is bot's username (site.username()) -rollback Rollback edits instead of reverting them. ...
29.793296
77
0.565348
from typing import Union import pywikibot from pywikibot import i18n from pywikibot.bot import OptionHandler from pywikibot.exceptions import APIError, Error from pywikibot.tools import deprecate_arg from pywikibot.tools.formatter import color_format class BaseRevertBot(OptionHandler): available_options = { ...
true
true
f7717438d5dda45aa9ef966658cdd0b75c32871d
4,127
py
Python
eoxserver/core/management.py
kalxas/eoxserver
8073447d926f3833923bde7b7061e8a1658dee06
[ "OML" ]
25
2015-08-10T19:34:34.000Z
2021-02-05T08:28:01.000Z
eoxserver/core/management.py
kalxas/eoxserver
8073447d926f3833923bde7b7061e8a1658dee06
[ "OML" ]
153
2015-01-20T08:35:49.000Z
2022-03-16T11:00:56.000Z
eoxserver/core/management.py
kalxas/eoxserver
8073447d926f3833923bde7b7061e8a1658dee06
[ "OML" ]
10
2015-01-23T15:48:30.000Z
2021-01-21T15:41:18.000Z
#------------------------------------------------------------------------------- # # Project: EOxServer <http://eoxserver.org> # Authors: Stephan Krause <stephan.krause@eox.at> # Stephan Meissl <stephan.meissl@eox.at> # Fabian Schindler <fabian.schindler@eox.at> # #------------------------------------...
32.753968
80
0.624667
import os import sys from optparse import make_option import django try: from django.utils.module_loading import import_module except ImportError: from django.utils.importlib import import_module from django.core.management import BaseCommand from django.core.management.base import CommandError from d...
true
true
f771744c54fdd8b90bb6ecc147199c66d0495d13
20,594
py
Python
pytorch3d/io/experimental_gltf_io.py
fabibo3/pytorch3d
36b7656753ae759aed2eb7ffb432b6eca4d42fe2
[ "BSD-3-Clause" ]
1
2022-03-30T19:52:34.000Z
2022-03-30T19:52:34.000Z
pytorch3d/io/experimental_gltf_io.py
fabibo3/pytorch3d
36b7656753ae759aed2eb7ffb432b6eca4d42fe2
[ "BSD-3-Clause" ]
null
null
null
pytorch3d/io/experimental_gltf_io.py
fabibo3/pytorch3d
36b7656753ae759aed2eb7ffb432b6eca4d42fe2
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. """ This module implements loading meshes from glTF 2 assets stored in a GLB container file or a glTF JSON file ...
35.815652
94
0.629747
import json import struct import warnings from base64 import b64decode from collections import deque from enum import IntEnum from io import BytesIO from typing import Any, BinaryIO, Dict, List, Optional, Tuple, Union, cast import numpy as np import torch from iopath.common.file_io import PathManager from PIL impor...
true
true
f771754048d761a48cc21e807c2b016619ae0603
14,884
py
Python
namedivider/name_divider.py
dmnlk/namedivider-python
d87a488d4696bc26d2f6444ed399d83a6a1911a7
[ "MIT" ]
161
2020-11-15T10:42:58.000Z
2022-03-24T03:14:16.000Z
namedivider/name_divider.py
dmnlk/namedivider-python
d87a488d4696bc26d2f6444ed399d83a6a1911a7
[ "MIT" ]
2
2020-11-17T07:35:43.000Z
2021-12-06T14:45:35.000Z
namedivider/name_divider.py
dmnlk/namedivider-python
d87a488d4696bc26d2f6444ed399d83a6a1911a7
[ "MIT" ]
4
2021-02-03T19:03:42.000Z
2022-03-24T03:14:05.000Z
import numpy as np import pandas as pd import regex from namedivider.divided_name import DividedName from namedivider.kanji_statistics import KanjiStatistics from pathlib import Path from typing import Optional CURRENT_DIR = Path(__file__).resolve().parent class NameDivider: def __init__(self, path_csv: str = f"{...
45.656442
118
0.613679
import numpy as np import pandas as pd import regex from namedivider.divided_name import DividedName from namedivider.kanji_statistics import KanjiStatistics from pathlib import Path from typing import Optional CURRENT_DIR = Path(__file__).resolve().parent class NameDivider: def __init__(self, path_csv: str = f"{...
true
true
f771755335ab60edaa820a7fc108bc43ff3280af
13,931
py
Python
src/common/Spline.py
daferro/Pilgrim
1cc2527857c180fad9d770b33fbf22fdd77a879b
[ "MIT" ]
6
2019-04-03T11:49:44.000Z
2022-03-03T19:09:00.000Z
src/common/Spline.py
daferro/Pilgrim
1cc2527857c180fad9d770b33fbf22fdd77a879b
[ "MIT" ]
null
null
null
src/common/Spline.py
daferro/Pilgrim
1cc2527857c180fad9d770b33fbf22fdd77a879b
[ "MIT" ]
3
2019-09-23T09:45:31.000Z
2021-08-30T04:00:17.000Z
#!/usr/bin/python2.7 ''' --------------------------- Licensing and Distribution --------------------------- Program name: Pilgrim Version : 1.0 License : MIT/x11 Copyright (c) 2019, David Ferro Costas (david.ferro@usc.es) and Antonio Fernandez Ramos (qf.ramos@usc.es) Permission is hereby granted, free of ch...
34.312808
78
0.494796
''' --------------------------- Licensing and Distribution --------------------------- Program name: Pilgrim Version : 1.0 License : MIT/x11 Copyright (c) 2019, David Ferro Costas (david.ferro@usc.es) and Antonio Fernandez Ramos (qf.ramos@usc.es) Permission is hereby granted, free of charge, to any person o...
false
true
f771765811b962ba6809f4f6530d4aef32e3cd6c
569
py
Python
model/model_group.py
anjel-ershova/python_training
b82c112c0932e4e3ceafdf6549d10289f20e81ca
[ "Apache-2.0" ]
null
null
null
model/model_group.py
anjel-ershova/python_training
b82c112c0932e4e3ceafdf6549d10289f20e81ca
[ "Apache-2.0" ]
null
null
null
model/model_group.py
anjel-ershova/python_training
b82c112c0932e4e3ceafdf6549d10289f20e81ca
[ "Apache-2.0" ]
null
null
null
from sys import maxsize class Group: def __init__(self, name=None, footer=None, header=None, id=None): self.name = name self.footer = footer self.header = header self.id = id def __repr__(self): return "%s:%s:%s:%s" % (self.id, self.name, self.footer, self.header) ...
25.863636
103
0.58348
from sys import maxsize class Group: def __init__(self, name=None, footer=None, header=None, id=None): self.name = name self.footer = footer self.header = header self.id = id def __repr__(self): return "%s:%s:%s:%s" % (self.id, self.name, self.footer, self.header) ...
true
true
f771782d9a014490c06309bc235d17da4ade0553
3,120
py
Python
app/app/settings.py
adnansabbir/recipe-app-api
5f0babddf25e2ebe706f28fbb3bda4f5680d4d65
[ "MIT" ]
null
null
null
app/app/settings.py
adnansabbir/recipe-app-api
5f0babddf25e2ebe706f28fbb3bda4f5680d4d65
[ "MIT" ]
null
null
null
app/app/settings.py
adnansabbir/recipe-app-api
5f0babddf25e2ebe706f28fbb3bda4f5680d4d65
[ "MIT" ]
null
null
null
""" Django settings for app project. Generated by 'django-admin startproject' using Django 3.0.3. For more information on this file, see https://docs.djangoproject.com/en/3.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.0/ref/settings/ """ import os # Bui...
25.365854
91
0.69391
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = '=3$xw4hkic0^f)02)wc4ie(gh50f!0*+6r*7g&#2q#&_mj0c9i' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes...
true
true
f7717866064029642ab77481540e29c54c4a6f5b
5,465
py
Python
kubernetes/client/api/openid_api.py
venukarnati92/python-1
3fabf9ed9f4758fb5133975a58fc147471e91d9d
[ "Apache-2.0" ]
1
2022-02-07T21:57:20.000Z
2022-02-07T21:57:20.000Z
kubernetes/client/api/openid_api.py
venukarnati92/python-1
3fabf9ed9f4758fb5133975a58fc147471e91d9d
[ "Apache-2.0" ]
1
2022-03-01T03:37:57.000Z
2022-03-01T03:37:57.000Z
kubernetes/client/api/openid_api.py
venukarnati92/python-1
3fabf9ed9f4758fb5133975a58fc147471e91d9d
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: release-1.22 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import r...
38.216783
124
0.614273
from __future__ import absolute_import import re import six from kubernetes.client.api_client import ApiClient from kubernetes.client.exceptions import ( ApiTypeError, ApiValueError ) class OpenidApi(object): def __init__(self, api_client=None): if api_client is None: api_clie...
true
true
f7717877a66398788069f3f711a3756d8ed57cea
23,593
py
Python
keras_ocr/recognition.py
siril-pivotchain/ETAG-OCR
216c27e8ab63acc5b3686da2948a6881da70350e
[ "MIT" ]
null
null
null
keras_ocr/recognition.py
siril-pivotchain/ETAG-OCR
216c27e8ab63acc5b3686da2948a6881da70350e
[ "MIT" ]
null
null
null
keras_ocr/recognition.py
siril-pivotchain/ETAG-OCR
216c27e8ab63acc5b3686da2948a6881da70350e
[ "MIT" ]
null
null
null
# pylint: disable=invalid-name,too-many-locals,too-many-arguments import typing import string import tensorflow as tf from tensorflow import keras import numpy as np import cv2 from . import tools DEFAULT_BUILD_PARAMS = { 'height': 31, 'width': 200, 'color': False, 'filters': (64, 128, 256, 256, 512,...
45.722868
106
0.591659
import typing import string import tensorflow as tf from tensorflow import keras import numpy as np import cv2 from . import tools DEFAULT_BUILD_PARAMS = { 'height': 31, 'width': 200, 'color': False, 'filters': (64, 128, 256, 256, 512, 512, 512), 'rnn_units': (128, 128), 'dropout': 0.25, ...
true
true
f77178ee045125babfc64dd65e55548651385ae6
2,727
py
Python
setup.py
Virtue-Gaming/sagemaker-run-notebook
070e6bfe885c1272c1c92aa1c830946a0213b21d
[ "Apache-2.0" ]
null
null
null
setup.py
Virtue-Gaming/sagemaker-run-notebook
070e6bfe885c1272c1c92aa1c830946a0213b21d
[ "Apache-2.0" ]
null
null
null
setup.py
Virtue-Gaming/sagemaker-run-notebook
070e6bfe885c1272c1c92aa1c830946a0213b21d
[ "Apache-2.0" ]
null
null
null
"""Setup Module to setup Python serverextension for the sagemaker run notebook extension. For non-dev installs, will also automatically build (if package.json is present) and install (if the labextension exists, eg the build succeeded) the corresponding labextension. """ import os from pathlib import Path from subproce...
28.705263
91
0.677301
import os from pathlib import Path from subprocess import CalledProcessError from setupbase import ( command_for_func, create_cmdclass, ensure_python, get_version, HERE, run, ) import setuptools name = "sagemaker_run_notebook" ensure_python(">=3.5") version = get_version(str(Path(HERE) / na...
true
true
f771792343c1a46131d712a7e698c3e1d1551133
1,616
py
Python
src/humorcalc.py
tomoino/GagRocket
1f0bbef1a48cc12774d11bc380f0b72b9ffaf9f1
[ "MIT" ]
null
null
null
src/humorcalc.py
tomoino/GagRocket
1f0bbef1a48cc12774d11bc380f0b72b9ffaf9f1
[ "MIT" ]
19
2020-10-11T04:21:22.000Z
2020-11-05T15:04:28.000Z
src/humorcalc.py
tomoino/GagRocket
1f0bbef1a48cc12774d11bc380f0b72b9ffaf9f1
[ "MIT" ]
null
null
null
import numpy as np from keras.models import load_model import MeCab import re def calc_humor_score(text, model, word_index): (words, reading) = morph(text) if not is_dajare(reading): return 0 return predict(words, model, word_index) def morph(text): words = [] # 単語の原形 reading = ""...
28.350877
121
0.55198
import numpy as np from keras.models import load_model import MeCab import re def calc_humor_score(text, model, word_index): (words, reading) = morph(text) if not is_dajare(reading): return 0 return predict(words, model, word_index) def morph(text): words = [] reading = "" ...
true
true
f771793edcb6482e9862c360a0b3f2d9a65adf58
943
py
Python
scraper/storage_spiders/cuahangvanngoccom.py
chongiadung/choinho
d2a216fe7a5064d73cdee3e928a7beef7f511fd1
[ "MIT" ]
null
null
null
scraper/storage_spiders/cuahangvanngoccom.py
chongiadung/choinho
d2a216fe7a5064d73cdee3e928a7beef7f511fd1
[ "MIT" ]
10
2020-02-11T23:34:28.000Z
2022-03-11T23:16:12.000Z
scraper/storage_spiders/cuahangvanngoccom.py
chongiadung/choinho
d2a216fe7a5064d73cdee3e928a7beef7f511fd1
[ "MIT" ]
3
2018-08-05T14:54:25.000Z
2021-06-07T01:49:59.000Z
# Auto generated by generator.py. Delete this line if you make modification. from scrapy.spiders import Rule from scrapy.linkextractors import LinkExtractor XPATH = { 'name' : "//div[@class='overview']/h1[@class='product-name']", 'price' : "//div[@class='prices']/span[@class='product-price']", 'category' :...
34.925926
91
0.64369
from scrapy.spiders import Rule from scrapy.linkextractors import LinkExtractor XPATH = { 'name' : "//div[@class='overview']/h1[@class='product-name']", 'price' : "//div[@class='prices']/span[@class='product-price']", 'category' : "//div[@class='breadcrumb']/ul/li/a", 'description' : "//form[@id='produ...
true
true
f771797aead57df375ce6c72044688dc6f11631e
89
py
Python
openpype/modules/job_queue/job_workers/__init__.py
jonclothcat/OpenPype
d1208cbebc0a7f378de0062ccd653295c6399195
[ "MIT" ]
87
2021-05-07T08:40:46.000Z
2022-03-19T00:36:25.000Z
openpype/modules/job_queue/job_workers/__init__.py
zafrs/OpenPype
4b8e7e1ed002fc55b31307efdea70b0feaed474f
[ "MIT" ]
1,019
2021-04-26T06:22:56.000Z
2022-03-31T16:30:43.000Z
openpype/modules/job_queue/job_workers/__init__.py
zafrs/OpenPype
4b8e7e1ed002fc55b31307efdea70b0feaed474f
[ "MIT" ]
33
2021-04-29T12:35:54.000Z
2022-03-25T14:48:42.000Z
from .base_worker import WorkerJobsConnection __all__ = ( "WorkerJobsConnection", )
14.833333
45
0.764045
from .base_worker import WorkerJobsConnection __all__ = ( "WorkerJobsConnection", )
true
true
f7717b0a10641fe51500652f508ef684e7b94fe9
987
py
Python
4-semester/programming/indepworkinvar4-2.py
Rakleed/rgpu
47ab2a05a8398c15be7e41e9e98fafe5c2a36627
[ "MIT" ]
null
null
null
4-semester/programming/indepworkinvar4-2.py
Rakleed/rgpu
47ab2a05a8398c15be7e41e9e98fafe5c2a36627
[ "MIT" ]
null
null
null
4-semester/programming/indepworkinvar4-2.py
Rakleed/rgpu
47ab2a05a8398c15be7e41e9e98fafe5c2a36627
[ "MIT" ]
null
null
null
""" Автор: Моисеенко Павел, группа № 1, подгруппа № 2. ИСР 4.2. Задание: создать программу по распределению списка со случайными значениями на два списка по определенному критерию (четность/нечетность, положительные/отрицательные числа). """ import random first_array = [] positive_numbers = [] negat...
28.2
72
0.723404
import random first_array = [] positive_numbers = [] negative_numbers = [] for i in range(10): first_array.append(int(random.random() * 15) - 8) for i in first_array: if i < 0: negative_numbers.append(i) elif i > 0: positive_numbers.append(i) print("Списики со случайными значениями (положи...
true
true
f7717bbb2ee9f675e21dd3a1292989a45c6c55c7
7,211
py
Python
nssrc/com/citrix/netscaler/nitro/resource/config/system/systemglobaldata.py
guardicore/nitro-python
5346a5086134aead80968f15a41ff527adaa0ec1
[ "Apache-2.0" ]
null
null
null
nssrc/com/citrix/netscaler/nitro/resource/config/system/systemglobaldata.py
guardicore/nitro-python
5346a5086134aead80968f15a41ff527adaa0ec1
[ "Apache-2.0" ]
null
null
null
nssrc/com/citrix/netscaler/nitro/resource/config/system/systemglobaldata.py
guardicore/nitro-python
5346a5086134aead80968f15a41ff527adaa0ec1
[ "Apache-2.0" ]
null
null
null
# # Copyright (c) 2021 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
26.126812
151
0.708501
from nssrc.com.citrix.netscaler.nitro.resource.base.base_resource import base_resource from nssrc.com.citrix.netscaler.nitro.resource.base.base_resource import base_response from nssrc.com.citrix.netscaler.nitro.service.options import options from nssrc.com.citrix.netscaler.nitro.exception.nitro_exception import nitro...
true
true
f7717c1ff1620752c312f752746f7accc4746a4b
11,907
py
Python
kge/model/hmcn_model.py
LukasDegitz/kge
0ff3d2623d520e0634374e81d4184d525c189a25
[ "MIT" ]
null
null
null
kge/model/hmcn_model.py
LukasDegitz/kge
0ff3d2623d520e0634374e81d4184d525c189a25
[ "MIT" ]
null
null
null
kge/model/hmcn_model.py
LukasDegitz/kge
0ff3d2623d520e0634374e81d4184d525c189a25
[ "MIT" ]
null
null
null
import torch from torch import Tensor from kge import Config, Dataset from kge.model.kge_model import KgeModel import json import os import numpy as np import time class hmcn_model(KgeModel): """ Implements hierarchical Multi-Label classification Network as defined in Wehrmann et al. (2018) Codes ...
43.937269
118
0.621231
import torch from torch import Tensor from kge import Config, Dataset from kge.model.kge_model import KgeModel import json import os import numpy as np import time class hmcn_model(KgeModel): def __init__( self, config: Config, dataset: Dataset, configuration_key=None, ini...
true
true
f7717cb487f97d6a9b2c8f10a438ed0439cca726
3,060
py
Python
mars/learn/contrib/statsmodels/api.py
HarshCasper/mars
4c12c968414d666c7a10f497bc22de90376b1932
[ "Apache-2.0" ]
2
2019-03-29T04:11:10.000Z
2020-07-08T10:19:54.000Z
mars/learn/contrib/statsmodels/api.py
JeffroMF/mars
2805241ac55b50c4f6319baa41113fbf8c723832
[ "Apache-2.0" ]
null
null
null
mars/learn/contrib/statsmodels/api.py
JeffroMF/mars
2805241ac55b50c4f6319baa41113fbf8c723832
[ "Apache-2.0" ]
null
null
null
# Copyright 1999-2020 Alibaba Group Holding Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
41.351351
94
0.711765
import pickle from .train import StatsModelsTrain from .predict import StatsModelsPredict try: from statsmodels.base.distributed_estimation import DistributedModel except ImportError: DistributedModel = None class MarsDistributedModel: def __init__(self, factor=None, num_partitions=None, model_class=N...
true
true
f7717d7a48f0f4cb60c128286ec3ef41aa3f112c
2,620
py
Python
stupidb/tests/test_ranking.py
mrcrnkovich/stupidb
4274f60b7f8f2455c0031c73e053964d4d3e3e1d
[ "Apache-2.0" ]
43
2018-12-29T22:14:55.000Z
2022-03-17T03:38:16.000Z
stupidb/tests/test_ranking.py
mrcrnkovich/stupidb
4274f60b7f8f2455c0031c73e053964d4d3e3e1d
[ "Apache-2.0" ]
102
2021-07-19T21:20:22.000Z
2022-03-22T02:57:02.000Z
stupidb/tests/test_ranking.py
mrcrnkovich/stupidb
4274f60b7f8f2455c0031c73e053964d4d3e3e1d
[ "Apache-2.0" ]
3
2021-12-04T19:14:33.000Z
2022-01-08T17:28:36.000Z
from __future__ import annotations from stupidb import Window, dense_rank, order_by, over, rank, row_number, select, table from stupidb.functions.ranking import Sentinel from .conftest import assert_rowset_equal def test_row_number(t_rows: list[dict]) -> None: window = Window.range(partition_by=[lambda r: r.nam...
29.111111
87
0.59313
from __future__ import annotations from stupidb import Window, dense_rank, order_by, over, rank, row_number, select, table from stupidb.functions.ranking import Sentinel from .conftest import assert_rowset_equal def test_row_number(t_rows: list[dict]) -> None: window = Window.range(partition_by=[lambda r: r.nam...
true
true
f7717f06df41389e5547f0a09b3ae14ca076e432
3,592
py
Python
basicsr/utils/options.py
NALLEIN/EDVR
010d29ae81d2b84ac98e7eefc69420c39b6ce65f
[ "Apache-2.0" ]
null
null
null
basicsr/utils/options.py
NALLEIN/EDVR
010d29ae81d2b84ac98e7eefc69420c39b6ce65f
[ "Apache-2.0" ]
null
null
null
basicsr/utils/options.py
NALLEIN/EDVR
010d29ae81d2b84ac98e7eefc69420c39b6ce65f
[ "Apache-2.0" ]
null
null
null
import yaml from collections import OrderedDict from os import path as osp def ordered_yaml(): """Support OrderedDict for yaml. Returns: yaml Loader and Dumper. """ try: from yaml import CDumper as Dumper from yaml import CLoader as Loader except ImportError: from ...
32.654545
78
0.571826
import yaml from collections import OrderedDict from os import path as osp def ordered_yaml(): try: from yaml import CDumper as Dumper from yaml import CLoader as Loader except ImportError: from yaml import Dumper, Loader _mapping_tag = yaml.resolver.BaseResolver.DEFAULT_MAPPING_T...
true
true