hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f71bbea834d6298b1b749394c01ad48a8ce0536c
76,454
py
Python
tests/lax_numpy_test.py
zhongwen/jax
76d2a87915863d3a32732837cc7bf61b7b2f9e5b
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
tests/lax_numpy_test.py
zhongwen/jax
76d2a87915863d3a32732837cc7bf61b7b2f9e5b
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
tests/lax_numpy_test.py
zhongwen/jax
76d2a87915863d3a32732837cc7bf61b7b2f9e5b
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
46.589884
100
0.651895
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import functools from functools import partial import itertools import operator import unittest from unittest import SkipTest from absl.testing import absltest from absl.testin...
true
true
f71bbf7a4a188527959ac45431aaf4fe7372b6f2
702
py
Python
google/ads/googleads/v6/services/services/keyword_plan_ad_group_service/__init__.py
wxxlouisa/google-ads-python
f24137966f6bfcb765a9b1fae79f2d23041825fe
[ "Apache-2.0" ]
null
null
null
google/ads/googleads/v6/services/services/keyword_plan_ad_group_service/__init__.py
wxxlouisa/google-ads-python
f24137966f6bfcb765a9b1fae79f2d23041825fe
[ "Apache-2.0" ]
null
null
null
google/ads/googleads/v6/services/services/keyword_plan_ad_group_service/__init__.py
wxxlouisa/google-ads-python
f24137966f6bfcb765a9b1fae79f2d23041825fe
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
33.428571
74
0.759259
from .client import KeywordPlanAdGroupServiceClient __all__ = ("KeywordPlanAdGroupServiceClient",)
true
true
f71bbf8502afa8422043b8e08ba0756892e46a96
3,593
py
Python
tutorial/settings.py
luotuo/spider-for-apple-store
b4b2bfb6227df8fce7f8e3ab635703e93bb89ed1
[ "MIT" ]
20
2017-12-17T08:07:12.000Z
2020-12-11T02:31:59.000Z
tutorial/settings.py
luotuo/spider-for-apple-store
b4b2bfb6227df8fce7f8e3ab635703e93bb89ed1
[ "MIT" ]
null
null
null
tutorial/settings.py
luotuo/spider-for-apple-store
b4b2bfb6227df8fce7f8e3ab635703e93bb89ed1
[ "MIT" ]
6
2017-12-17T08:07:14.000Z
2020-12-11T02:32:00.000Z
# -*- coding: utf-8 -*- # Scrapy settings for tutorial project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # http://doc.scrapy.org/en/latest/topics/settings.html # http://scrapy.readthedocs.org/en/lates...
34.548077
123
0.775953
BOT_NAME = 'tutorial' SPIDER_MODULES = ['tutorial.spiders'] NEWSPIDER_MODULE = 'tutorial.spiders' USER_AGENT = 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36' ROBOTSTXT_OBEY = False Y = 3 ...
true
true
f71bbfffc3a193e2f3f52cdb443e6740cf88b7e3
6,052
py
Python
Ensemble Learning/AdaBoost.py
DiogoRibeiro7/Machine-Learning
d2c789851f8b4eaf74cdd0c18af072f60cd45cb3
[ "Apache-2.0" ]
null
null
null
Ensemble Learning/AdaBoost.py
DiogoRibeiro7/Machine-Learning
d2c789851f8b4eaf74cdd0c18af072f60cd45cb3
[ "Apache-2.0" ]
null
null
null
Ensemble Learning/AdaBoost.py
DiogoRibeiro7/Machine-Learning
d2c789851f8b4eaf74cdd0c18af072f60cd45cb3
[ "Apache-2.0" ]
null
null
null
""" @Filename: AdaptiveBoost.py @Author: Diogo Ribeiro @Create Date: 2019-05-03 @Update Date: 2019-05-03 @Description: Implement of Adaptive Boosting """ import numpy as np import preProcess import pickle import random import SVM import math class Adaboost: def __init__(self, norm_type="Nor...
34.982659
100
0.607403
import numpy as np import preProcess import pickle import random import SVM import math class Adaboost: def __init__(self, norm_type="Normalization", iterations=5, base_classifier="SVM"): self.iterations = iterations self.norm_type = norm_type self.base_classifier = SVM.SVMClassifier() ...
true
true
f71bc02fee45fb7edf6e131216efbc2de8692361
1,173
py
Python
examples/example2.py
hangvane/lpsolve_wrapper
cff5ffa827c10420bdc6b3ceb5d9a3852c91281d
[ "Apache-2.0" ]
4
2021-01-27T14:47:30.000Z
2021-05-06T03:16:11.000Z
examples/example2.py
hangvane/lpsolve_wrapper
cff5ffa827c10420bdc6b3ceb5d9a3852c91281d
[ "Apache-2.0" ]
null
null
null
examples/example2.py
hangvane/lpsolve_wrapper
cff5ffa827c10420bdc6b3ceb5d9a3852c91281d
[ "Apache-2.0" ]
1
2022-03-25T13:22:45.000Z
2022-03-25T13:22:45.000Z
# http://web.mit.edu/lpsolve/doc/Python.htm # P = (110)(1.30)x + (30)(2.00)y + (125)(1.56) = 143x + 60y + 195z # 120x + 210y + 150.75z <= 15000 # 110x + 30y + 125z <= 4000 # x + y + z <= 75 # x >= 0, y >= 0, z >= 0 import lpsolve_wrapper as lw model = lw.Model( notations={ 'x': lw.notation( lo...
19.881356
66
0.491901
import lpsolve_wrapper as lw model = lw.Model( notations={ 'x': lw.notation( lower_bound=0, ), 'y': lw.notation( lower_bound=0, ), 'z': lw.notation( lower_bound=0, ) }) model.add_constr( coefs=[ lw.coef('x', ...
true
true
f71bc084b54b7d6c91980ac0cca1fd8f504aca87
1,277
py
Python
ganzige/urls.py
kekehurry/ganzige.site
4fc2fce6c03b302e115feccae6e02bd9e1e8231d
[ "MIT" ]
null
null
null
ganzige/urls.py
kekehurry/ganzige.site
4fc2fce6c03b302e115feccae6e02bd9e1e8231d
[ "MIT" ]
null
null
null
ganzige/urls.py
kekehurry/ganzige.site
4fc2fce6c03b302e115feccae6e02bd9e1e8231d
[ "MIT" ]
null
null
null
"""ganzige URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-bas...
38.69697
77
0.697729
from django.conf.urls import include, url from django.contrib import admin from django.conf.urls.static import static from django.conf import settings urlpatterns = [ url(r'^$', include('home.urls', namespace='home')), url(r'webhook/', include('webhook.urls', namespace='webhook')), url(r'^admin/', include(...
true
true
f71bc0fe58921e92e78ae069e621bc45875ba2a5
1,047
py
Python
src/unity/python/doc/source/sphinx_turicreate_ext/pycon.py
shreyasvj25/turicreate
32e84ca16aef8d04aff3d49ae9984bd49326bffd
[ "BSD-3-Clause" ]
2
2019-02-08T08:45:27.000Z
2020-09-07T05:55:18.000Z
src/unity/python/doc/source/sphinx_turicreate_ext/pycon.py
shreyasvj25/turicreate
32e84ca16aef8d04aff3d49ae9984bd49326bffd
[ "BSD-3-Clause" ]
3
2022-02-15T04:42:24.000Z
2022-03-12T01:05:15.000Z
src/unity/python/doc/source/sphinx_turicreate_ext/pycon.py
ZeroInfinite/turicreate
dd210c2563930881abd51fd69cb73007955b33fd
[ "BSD-3-Clause" ]
1
2019-06-01T18:49:28.000Z
2019-06-01T18:49:28.000Z
# -*- coding: utf-8 -*- # Copyright © 2017 Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can # be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import sys from code import InteractiveInterpreter def main(): """ Print l...
26.846154
85
0.598854
import sys from code import InteractiveInterpreter def main(): """ Print lines of input along with output. """ source_lines = (line.rstrip() for line in sys.stdin) console = InteractiveInterpreter() console.runsource('import turicreate') source = '' try: while True: ...
false
true
f71bc16b49327031ea7d379964913ab43a1e9c34
3,176
py
Python
microchain/chain.py
ciknight/microchain
d740571fd84f18bc1b635b2fccb9f349180709fa
[ "MIT" ]
null
null
null
microchain/chain.py
ciknight/microchain
d740571fd84f18bc1b635b2fccb9f349180709fa
[ "MIT" ]
40
2018-07-30T21:14:20.000Z
2021-06-25T15:15:20.000Z
microchain/chain.py
ciknight/microchain
d740571fd84f18bc1b635b2fccb9f349180709fa
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import logging from typing import List from microchain.block import Block __all__ = ["Chain"] class Chain: _interval = 10 # second def __init__(self, blocks: List[Block] = None) -> None: self.blocks = blocks or [Chain.genesis()] def __len__(self): return self.l...
30.247619
107
0.588791
import logging from typing import List from microchain.block import Block __all__ = ["Chain"] class Chain: _interval = 10 def __init__(self, blocks: List[Block] = None) -> None: self.blocks = blocks or [Chain.genesis()] def __len__(self): return self.length def __repr__(self): ...
true
true
f71bc1a8abff19dc9122898c70187b1df427ad48
5,311
py
Python
duty/my_signals/templates/template.py
ximetov/IrCa-Duty
666c2d26c9cd7d314798cfb222ad91dfeee4a5b6
[ "MIT" ]
6
2020-05-18T21:53:27.000Z
2020-07-06T12:48:00.000Z
duty/my_signals/templates/template.py
ximetov/IrCa-Duty
666c2d26c9cd7d314798cfb222ad91dfeee4a5b6
[ "MIT" ]
null
null
null
duty/my_signals/templates/template.py
ximetov/IrCa-Duty
666c2d26c9cd7d314798cfb222ad91dfeee4a5b6
[ "MIT" ]
6
2020-05-13T16:16:15.000Z
2020-06-23T12:05:09.000Z
import re from typing import Tuple from duty.utils import att_parse, format_response from duty.objects import MySignalEvent, dp def delete_template(name: str, templates: list) -> Tuple[list, bool]: for template in templates: if template['name'].lower() == name: templates.remove(template) ...
32.384146
105
0.591226
import re from typing import Tuple from duty.utils import att_parse, format_response from duty.objects import MySignalEvent, dp def delete_template(name: str, templates: list) -> Tuple[list, bool]: for template in templates: if template['name'].lower() == name: templates.remove(template) ...
true
true
f71bc2338b924e040d6847a96eaeabd0904e440e
405
py
Python
env/Lib/site-packages/plotly/validators/scatter3d/marker/_sizeref.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
11,750
2015-10-12T07:03:39.000Z
2022-03-31T20:43:15.000Z
env/Lib/site-packages/plotly/validators/scatter3d/marker/_sizeref.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
2,951
2015-10-12T00:41:25.000Z
2022-03-31T22:19:26.000Z
env/Lib/site-packages/plotly/validators/scatter3d/marker/_sizeref.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
2,623
2015-10-15T14:40:27.000Z
2022-03-28T16:05:50.000Z
import _plotly_utils.basevalidators class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="sizeref", parent_name="scatter3d.marker", **kwargs): super(SizerefValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
33.75
88
0.679012
import _plotly_utils.basevalidators class SizerefValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="sizeref", parent_name="scatter3d.marker", **kwargs): super(SizerefValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
true
true
f71bc27ffeefbaa07e53e1ac517b08578d7e83f3
35,940
py
Python
tools/run_tests/xds_k8s_test_driver/framework/infrastructure/traffic_director.py
lungati/grpc
cd9730d2d28626c57431253208f23507d466c825
[ "BSD-3-Clause" ]
5
2019-11-12T04:30:55.000Z
2021-08-11T23:04:12.000Z
tools/run_tests/xds_k8s_test_driver/framework/infrastructure/traffic_director.py
bwncp/grpc
779701ab76c552affa9f5c7815c2b598c996ea54
[ "Apache-2.0" ]
10
2015-03-03T06:51:51.000Z
2022-03-23T14:10:56.000Z
tools/run_tests/xds_k8s_test_driver/framework/infrastructure/traffic_director.py
bwncp/grpc
779701ab76c552affa9f5c7815c2b598c996ea54
[ "Apache-2.0" ]
1
2015-08-22T15:20:59.000Z
2015-08-22T15:20:59.000Z
# Copyright 2020 gRPC authors. # # 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...
40.748299
80
0.636171
import functools import logging import random from typing import Any, Dict, List, Optional, Set from framework import xds_flags from framework.infrastructure import gcp logger = logging.getLogger(__name__) _ComputeV1 = gcp.compute.ComputeV1 GcpResource = _ComputeV1.GcpResource HealthCheckProtocol = _C...
true
true
f71bc2a2616d37575b4b7913e3c9a01e51b63aa1
3,636
py
Python
client/chat/main.py
rrsilaya/spaceteam
eca853d82f14d1d5f5f892977dfb35d20da40d0b
[ "MIT" ]
null
null
null
client/chat/main.py
rrsilaya/spaceteam
eca853d82f14d1d5f5f892977dfb35d20da40d0b
[ "MIT" ]
null
null
null
client/chat/main.py
rrsilaya/spaceteam
eca853d82f14d1d5f5f892977dfb35d20da40d0b
[ "MIT" ]
null
null
null
import sys from threading import Thread from connection import TcpConnection from proto.tcp_packet_pb2 import TcpPacket class Chat(): def __init__(self): self.connection = TcpConnection() self.packet = TcpPacket() def createLobby(self, maxPlayers, *args): payload = self.packet.CreateLobbyPacket() ...
27.969231
82
0.686469
import sys from threading import Thread from connection import TcpConnection from proto.tcp_packet_pb2 import TcpPacket class Chat(): def __init__(self): self.connection = TcpConnection() self.packet = TcpPacket() def createLobby(self, maxPlayers, *args): payload = self.packet.CreateLobbyPacket() ...
true
true
f71bc4b4bf4d80efae10e1ebc5854fc9aae76ce2
605
py
Python
OrderManagement/migrations/0006_auto_20201114_0349.py
glen-s-abraham/OnlineDelivery
138356e17e52d0a4d4a1778f9c440006ce28ae5c
[ "MIT" ]
null
null
null
OrderManagement/migrations/0006_auto_20201114_0349.py
glen-s-abraham/OnlineDelivery
138356e17e52d0a4d4a1778f9c440006ce28ae5c
[ "MIT" ]
null
null
null
OrderManagement/migrations/0006_auto_20201114_0349.py
glen-s-abraham/OnlineDelivery
138356e17e52d0a4d4a1778f9c440006ce28ae5c
[ "MIT" ]
null
null
null
# Generated by Django 3.1.2 on 2020-11-14 03:49 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('OrderManagement', '0005_...
27.5
131
0.682645
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('OrderManagement', '0005_auto_20201107_0415'), ] operations = [...
true
true
f71bc4c5740b27cfc91942e00a13eeb0e9219ee7
8,569
py
Python
SNAPPacket.py
MydonSolutions/SNAPpyPackets
65565ad7edf98371bcfb2b6780a20680afb10347
[ "Apache-2.0" ]
null
null
null
SNAPPacket.py
MydonSolutions/SNAPpyPackets
65565ad7edf98371bcfb2b6780a20680afb10347
[ "Apache-2.0" ]
null
null
null
SNAPPacket.py
MydonSolutions/SNAPpyPackets
65565ad7edf98371bcfb2b6780a20680afb10347
[ "Apache-2.0" ]
null
null
null
mask4bits = ((1 << 4) -1) import numpy as np mask8bits = ((1 << 8) -1) mask16bits = ((1 << 16) -1) mask64bits = ((1 << 64) -1) class SNAPPacket(object): """ ATA SNAP Firmware Manual, Release 2.0.0 --------------------------------------- Section 2.3.2 "Output Data Formats: Voltage Packets", pg 5 ht...
38.95
119
0.555257
mask4bits = ((1 << 4) -1) import numpy as np mask8bits = ((1 << 8) -1) mask16bits = ((1 << 16) -1) mask64bits = ((1 << 64) -1) class SNAPPacket(object): def __init__(self, fwVersion: int = None, packetType: bool = None, channels: int = None, cha...
true
true
f71bc5652835fe64720685b82cd43fc0850879a0
1,794
py
Python
tools/ncbi_blast_plus/check_no_duplicates.py
globusgenomics/galaxy
7caf74d9700057587b3e3434c64e82c5b16540f1
[ "CC-BY-3.0" ]
1
2021-02-05T13:19:58.000Z
2021-02-05T13:19:58.000Z
tools/ncbi_blast_plus/check_no_duplicates.py
globusgenomics/galaxy
7caf74d9700057587b3e3434c64e82c5b16540f1
[ "CC-BY-3.0" ]
null
null
null
tools/ncbi_blast_plus/check_no_duplicates.py
globusgenomics/galaxy
7caf74d9700057587b3e3434c64e82c5b16540f1
[ "CC-BY-3.0" ]
null
null
null
#!/usr/bin/env python """Check for duplicate sequence identifiers in FASTA files. This is run as a pre-check before makeblastdb, in order to avoid a regression bug in BLAST+ 2.2.28 which fails to catch this. See: http://blastedbio.blogspot.co.uk/2012/10/my-ids-not-good-enough-for-ncbi-blast.html This script takes one...
30.931034
83
0.627648
import gzip import os import sys if "-v" in sys.argv or "--version" in sys.argv: print("v0.0.23") sys.exit(0) identifiers = set() files = 0 for filename in sys.argv[1:]: if not os.path.isfile(filename): sys.stderr.write("Missing FASTA file %r\n" % filename) sys.exit(2) files += 1 ...
true
true
f71bc619e7d4702a0d959637f7bce8d52e79debf
3,636
py
Python
LaserCommandConstants.py
jaredly/meerk40t
446427e29104cb89fd2ee17ad824fc801d44afe0
[ "MIT" ]
null
null
null
LaserCommandConstants.py
jaredly/meerk40t
446427e29104cb89fd2ee17ad824fc801d44afe0
[ "MIT" ]
null
null
null
LaserCommandConstants.py
jaredly/meerk40t
446427e29104cb89fd2ee17ad824fc801d44afe0
[ "MIT" ]
null
null
null
""" Laser Commands are a middle language of commands for spooling and interpreting. NOTE: Never use the integer value, only the command name. The integer values are permitted to change. COMMAND_PLOT: takes a plot object to generate simple plot commands. COMMAND_RASTER: takes a raster plot object which generate...
52.695652
117
0.764851
COMMAND_LASER_OFF = 1 COMMAND_LASER_ON = 2 COMMAND_LASER_DISABLE = 5 COMMAND_LASER_ENABLE = 6 COMMAND_MOVE = 10 COMMAND_CUT = 11 COMMAND_WAIT = 20 COMMAND_WAIT_FINISH = 21 COMMAND_MODE_RAPID = 50 COMMAND_MODE_PROGRAM = 51 COMMAND_MODE_FINISHED = 52 COMMAND_PLOT = 100 COMMAND_RASTER = 101 ...
true
true
f71bc6339bf87bae3cb6fd9ee3932e6b87b290b9
4,496
py
Python
tools/demo.py
Nikym/PoseCNN
a63f51ee79adfb0a5be9d9aaac8e22cd8d55efbb
[ "MIT" ]
655
2018-03-21T19:55:45.000Z
2022-03-25T20:41:21.000Z
tools/demo.py
SergioRAgostinho/PoseCNN
da9eaae850eed7521a2a48a4d27474d655caab42
[ "MIT" ]
122
2018-04-04T13:57:49.000Z
2022-03-18T09:28:44.000Z
tools/demo.py
SergioRAgostinho/PoseCNN
da9eaae850eed7521a2a48a4d27474d655caab42
[ "MIT" ]
226
2018-03-22T01:40:04.000Z
2022-03-17T11:56:14.000Z
#!/usr/bin/env python # -------------------------------------------------------- # FCN # Copyright (c) 2016 RSE at UW # Licensed under The MIT License [see LICENSE for details] # Written by Yu Xiang # -------------------------------------------------------- """Test a FCN on an image database.""" import _init_paths f...
34.584615
101
0.59008
"""Test a FCN on an image database.""" import _init_paths from fcn.test import test_net_images from fcn.config import cfg, cfg_from_file from datasets.factory import get_imdb import argparse import pprint import time, os, sys import tensorflow as tf import os.path as osp import numpy as np def parse_args(): ...
false
true
f71bc67e5ca5a22411122ca46bcf374816eb0293
2,950
py
Python
alipay/aop/api/domain/AlipayFundAuthOperationCancelModel.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/AlipayFundAuthOperationCancelModel.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/AlipayFundAuthOperationCancelModel.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.constant.ParamConstants import * class AlipayFundAuthOperationCancelModel(object): def __init__(self): self._auth_no = None self._operation_id = None self._out_order_no = None self._out_re...
29.207921
79
0.594576
import simplejson as json from alipay.aop.api.constant.ParamConstants import * class AlipayFundAuthOperationCancelModel(object): def __init__(self): self._auth_no = None self._operation_id = None self._out_order_no = None self._out_request_no = None self._remark = None ...
true
true
f71bc6ac3785acf1ddb69695bfccc9bb6edc5daf
155
py
Python
pangram/pangram.py
pierrebeaucamp/Exercism-Python
910b764c6726e9f131fb3a394c70d9b5bb167be9
[ "Unlicense" ]
null
null
null
pangram/pangram.py
pierrebeaucamp/Exercism-Python
910b764c6726e9f131fb3a394c70d9b5bb167be9
[ "Unlicense" ]
null
null
null
pangram/pangram.py
pierrebeaucamp/Exercism-Python
910b764c6726e9f131fb3a394c70d9b5bb167be9
[ "Unlicense" ]
null
null
null
import string import regex def is_pangram(i): l = sorted(list(set(regex.sub(r'[^a-z]', "", i.lower())))) return l == list(string.ascii_lowercase)
22.142857
62
0.645161
import string import regex def is_pangram(i): l = sorted(list(set(regex.sub(r'[^a-z]', "", i.lower())))) return l == list(string.ascii_lowercase)
true
true
f71bc6f28b8786902b54ebafec07bd4a22b0c3b6
763
py
Python
my_blog/my_blog/apps/blogs/migrations/0002_articlecomment.py
TNTfeizai/my_Blog
71c3720a27fab49a0d25d21029bdeb5f68e4965b
[ "MIT" ]
null
null
null
my_blog/my_blog/apps/blogs/migrations/0002_articlecomment.py
TNTfeizai/my_Blog
71c3720a27fab49a0d25d21029bdeb5f68e4965b
[ "MIT" ]
7
2020-06-06T00:53:43.000Z
2022-03-12T00:19:03.000Z
my_blog/my_blog/apps/blogs/migrations/0002_articlecomment.py
TNTfeizai/my_Blog
71c3720a27fab49a0d25d21029bdeb5f68e4965b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.11 on 2020-03-13 02:46 from __future__ import unicode_literals from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('blogs', '0001_initial'), ] operations = [ mig...
29.346154
114
0.605505
from __future__ import unicode_literals from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('blogs', '0001_initial'), ] operations = [ migrations.CreateModel( name='ArticleComment', fiel...
true
true
f71bc746826b79bd70dea70d0dd90cfcbd116ff4
2,525
py
Python
confirm.py
Pckool/GCG
cee786d04ea30f3995e910bca82635f442b2a6a8
[ "MIT" ]
null
null
null
confirm.py
Pckool/GCG
cee786d04ea30f3995e910bca82635f442b2a6a8
[ "MIT" ]
null
null
null
confirm.py
Pckool/GCG
cee786d04ea30f3995e910bca82635f442b2a6a8
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'confirm.ui' # # Created by: PyQt5 UI code generator 5.9.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Dialog(object): def setupUi(self, Dialog): Dialog.setObjectN...
44.298246
122
0.717624
from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Dialog(object): def setupUi(self, Dialog): Dialog.setObjectName("Dialog") Dialog.resize(400, 120) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding) sizePolicy...
true
true
f71bc76ba618eb3ac748680ddd30d14592adde8c
3,556
py
Python
src/bindings/python/DocStrings/CDLTransform.py
jmertic/OpenColorIO
9b18fd69f981288a6a3640e283b8d9968a15423e
[ "BSD-3-Clause" ]
1
2019-11-18T21:49:25.000Z
2019-11-18T21:49:25.000Z
src/bindings/python/DocStrings/CDLTransform.py
KevinJW/OpenColorIO
412aa7ba273616867e607de646e4975791198812
[ "BSD-3-Clause" ]
1
2020-06-12T19:10:09.000Z
2020-06-12T19:10:09.000Z
src/bindings/python/DocStrings/CDLTransform.py
KevinJW/OpenColorIO
412aa7ba273616867e607de646e4975791198812
[ "BSD-3-Clause" ]
null
null
null
# SPDX-License-Identifier: BSD-3-Clause # Copyright Contributors to the OpenColorIO Project. class CDLTransform: """ CDLTransform """ def __init__(self): pass def equals(self, cdl): """ equals(cdl) :param cdl: a cdl transform :type cdl: :py:clas...
21.815951
101
0.497469
class CDLTransform: def __init__(self): pass def equals(self, cdl): pass def validate(self): pass def CreateFromFile(self, src, cccid): pass def getXML(self): pass def setXML(self, xmltext): pass def getSlope(se...
true
true
f71bc81b29ea3c83e679fc75c90333cfc9ee5e00
3,351
py
Python
django_jinja/base.py
akx/django-jinja
2f1c0a74990d6d564350079692a8307c8c6f5b9f
[ "BSD-3-Clause" ]
210
2015-05-21T16:54:05.000Z
2022-01-06T01:24:52.000Z
django_jinja/base.py
akx/django-jinja
2f1c0a74990d6d564350079692a8307c8c6f5b9f
[ "BSD-3-Clause" ]
139
2015-05-15T11:01:03.000Z
2022-03-29T21:13:04.000Z
django_jinja/base.py
akx/django-jinja
2f1c0a74990d6d564350079692a8307c8c6f5b9f
[ "BSD-3-Clause" ]
84
2015-05-15T09:35:22.000Z
2021-09-03T13:14:44.000Z
import re import os.path as path from importlib import import_module from django.template.context import BaseContext def dict_from_context(context): """ Converts context to native python dict. """ if isinstance(context, BaseContext): new_dict = {} for i in reversed(list(context)): ...
30.463636
74
0.675321
import re import os.path as path from importlib import import_module from django.template.context import BaseContext def dict_from_context(context): if isinstance(context, BaseContext): new_dict = {} for i in reversed(list(context)): new_dict.update(dict_from_context(i)) retu...
true
true
f71bc829a4dec68143103f059f2183f57ed5bcb0
903
py
Python
beacontools/structs/estimote.py
nasa-watchdog/beacontools-ucsb
37e60b14f73935501c8edc3277917a6a40bcfdba
[ "MIT" ]
null
null
null
beacontools/structs/estimote.py
nasa-watchdog/beacontools-ucsb
37e60b14f73935501c8edc3277917a6a40bcfdba
[ "MIT" ]
1
2018-12-08T01:43:02.000Z
2018-12-08T01:43:02.000Z
beacontools/structs/estimote.py
nasa-watchdog/beacontools-ucsb
37e60b14f73935501c8edc3277917a6a40bcfdba
[ "MIT" ]
null
null
null
"""All low level structures used for parsing Estimote packets.""" from construct import Struct, Byte, Switch, Int8sl, Array, Int8ul from ..const import ESTIMOTE_TELEMETRY_SUBFRAME_A, ESTIMOTE_TELEMETRY_SUBFRAME_B # pylint: disable=invalid-name EstimoteTelemetrySubFrameA = Struct( "acceleration" / Array(3, Int8sl...
30.1
80
0.723145
from construct import Struct, Byte, Switch, Int8sl, Array, Int8ul from ..const import ESTIMOTE_TELEMETRY_SUBFRAME_A, ESTIMOTE_TELEMETRY_SUBFRAME_B EstimoteTelemetrySubFrameA = Struct( "acceleration" / Array(3, Int8sl), "previous_motion" / Byte, "current_motion" / Byte, "combined_fields" / Array(5, B...
true
true
f71bc88e1e773fe6f8bdbbed540d8fa994959788
1,394
py
Python
setup.py
michaelimfeld/private-telegram-bot
f5a9cec3c430d46bab3f1e57faa4d62013f93fd1
[ "MIT" ]
37
2016-05-02T18:50:55.000Z
2021-09-21T17:53:44.000Z
setup.py
michaelimfeld/private-telegram-bot
f5a9cec3c430d46bab3f1e57faa4d62013f93fd1
[ "MIT" ]
12
2016-04-23T21:58:42.000Z
2020-03-25T18:31:29.000Z
setup.py
michaelimfeld/private-telegram-bot
f5a9cec3c430d46bab3f1e57faa4d62013f93fd1
[ "MIT" ]
8
2016-05-09T17:37:21.000Z
2021-09-21T17:53:45.000Z
# -*- coding: utf-8 -*- # pylint: disable=missing-docstring from setuptools import setup setup( name="ownbot", version="0.0.4", license="MIT", description="Python module to create private telegram bots.", author="Michael Imfeld", author_email="michaelimfeld@crooked.ch", maintainer="Michael...
30.977778
65
0.60043
from setuptools import setup setup( name="ownbot", version="0.0.4", license="MIT", description="Python module to create private telegram bots.", author="Michael Imfeld", author_email="michaelimfeld@crooked.ch", maintainer="Michael Imfeld", maintainer_email="michaelimfeld@crooked.ch",...
true
true
f71bc8aff2afd70932bd36b53d5ab0c39172c419
2,379
py
Python
hw1/run_expert.py
Sebastianvarv/rl-homework
b7526ac3c86cbaae6b796856c31fc4c671a32663
[ "MIT" ]
1
2018-12-06T18:16:58.000Z
2018-12-06T18:16:58.000Z
hw1/run_expert.py
Sebastianvarv/rl-homework
b7526ac3c86cbaae6b796856c31fc4c671a32663
[ "MIT" ]
null
null
null
hw1/run_expert.py
Sebastianvarv/rl-homework
b7526ac3c86cbaae6b796856c31fc4c671a32663
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ Code to load an expert policy and generate roll-out data for behavioral cloning. Example usage: python run_expert.py experts/Humanoid-v1.pkl Humanoid-v1 --render \ --num_rollouts 20 Author of this script and included expert policies: Jonathan Ho (hoj@openai.com) """ import o...
30.5
83
0.580076
import os import pickle import tensorflow as tf import numpy as np import tf_util import gym import load_policy def main(): import argparse parser = argparse.ArgumentParser() parser.add_argument('expert_policy_file', type=str) parser.add_argument('envname', type=str) parser.add_argument('--rende...
true
true
f71bc95531a6537981172b3ab30077c9090d2668
669
py
Python
Latest/venv/Lib/site-packages/envisage/unknown_extension.py
adamcvj/SatelliteTracker
49a8f26804422fdad6f330a5548e9f283d84a55d
[ "Apache-2.0" ]
1
2022-01-09T20:04:31.000Z
2022-01-09T20:04:31.000Z
Latest/venv/Lib/site-packages/envisage/unknown_extension.py
adamcvj/SatelliteTracker
49a8f26804422fdad6f330a5548e9f283d84a55d
[ "Apache-2.0" ]
1
2022-02-15T12:01:57.000Z
2022-03-24T19:48:47.000Z
Latest/venv/Lib/site-packages/envisage/unknown_extension.py
adamcvj/SatelliteTracker
49a8f26804422fdad6f330a5548e9f283d84a55d
[ "Apache-2.0" ]
null
null
null
# (C) Copyright 2007-2019 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in LICENSE.txt and may be redistributed only # under the conditions described in the aforementioned license. The license # is also available online a...
39.352941
79
0.678625
class UnknownExtension(Exception):
true
true
f71bc9ee1184e124fd8b7941320776f895fa5014
88,529
py
Python
clearml/storage/helper.py
mmiller-max/clearml
fd2d6c6f5d46cad3e406e88eeb4d805455b5b3d8
[ "Apache-2.0" ]
null
null
null
clearml/storage/helper.py
mmiller-max/clearml
fd2d6c6f5d46cad3e406e88eeb4d805455b5b3d8
[ "Apache-2.0" ]
null
null
null
clearml/storage/helper.py
mmiller-max/clearml
fd2d6c6f5d46cad3e406e88eeb4d805455b5b3d8
[ "Apache-2.0" ]
null
null
null
from __future__ import with_statement import errno import getpass import itertools import json import os import shutil import sys import threading from abc import ABCMeta, abstractmethod from collections import namedtuple from concurrent.futures import ThreadPoolExecutor from copy import copy from datetime import date...
37.369776
120
0.599702
from __future__ import with_statement import errno import getpass import itertools import json import os import shutil import sys import threading from abc import ABCMeta, abstractmethod from collections import namedtuple from concurrent.futures import ThreadPoolExecutor from copy import copy from datetime import date...
true
true
f71bca0add55e9dbed05726a9b8f1b5d8f31a0fe
544
py
Python
loja.py
Felipe-Gs/Exerciccios-Python3
bdbd49e7daa48df336b83ef3a2e36e42ede297ab
[ "MIT" ]
3
2021-06-01T14:11:58.000Z
2022-03-20T02:30:13.000Z
loja.py
Felipe-Gs/Exercicios-Python3
bdbd49e7daa48df336b83ef3a2e36e42ede297ab
[ "MIT" ]
null
null
null
loja.py
Felipe-Gs/Exercicios-Python3
bdbd49e7daa48df336b83ef3a2e36e42ede297ab
[ "MIT" ]
null
null
null
'''quantidade = int(input('quantos produtos o senhor comprou?')) preco = quantidade * 1.99 print(preco)''' print("====TABELA DE PREÇOS====") for c in range(1, 51): print(c, "- R$", c * 1.99) quantidade = int(input('quantos produtos o senhor comprou?')) preco = quantidade * 1.99 print(preco, " é o preço que voce t...
32
66
0.665441
print("====TABELA DE PREÇOS====") for c in range(1, 51): print(c, "- R$", c * 1.99) quantidade = int(input('quantos produtos o senhor comprou?')) preco = quantidade * 1.99 print(preco, " é o preço que voce tem que pagar!") dinheiro = float(input('com quanto dinheiro vc pretende pagar?')) if dinheiro <= preco: ...
true
true
f71bca13cf7f1910de2246a9b822851a12529735
11,981
py
Python
downstream/tinypersons/mmdet/datasets/pipelines/formating.py
bwconrad/solo-learn
ec510d803a4428d7d8803b90fa1484c42cb9cb52
[ "MIT" ]
271
2021-06-19T08:41:11.000Z
2022-03-31T05:42:42.000Z
downstream/tinypersons/mmdet/datasets/pipelines/formating.py
bwconrad/solo-learn
ec510d803a4428d7d8803b90fa1484c42cb9cb52
[ "MIT" ]
48
2021-07-06T07:17:12.000Z
2022-03-14T11:38:36.000Z
downstream/tinypersons/mmdet/datasets/pipelines/formating.py
bwconrad/solo-learn
ec510d803a4428d7d8803b90fa1484c42cb9cb52
[ "MIT" ]
54
2021-07-07T08:40:49.000Z
2022-03-16T05:02:35.000Z
from collections.abc import Sequence import mmcv import numpy as np import torch from mmcv.parallel import DataContainer as DC from ..builder import PIPELINES def to_tensor(data): """Convert objects of various python types to :obj:`torch.Tensor`. Supported types are: :class:`numpy.ndarray`, :class:`torch.T...
32.824658
79
0.591687
from collections.abc import Sequence import mmcv import numpy as np import torch from mmcv.parallel import DataContainer as DC from ..builder import PIPELINES def to_tensor(data): if isinstance(data, torch.Tensor): return data elif isinstance(data, np.ndarray): return torch.from_numpy(data)...
true
true
f71bcae3ada7450e03517099c8f34cabe1579cb5
1,307
py
Python
trust_simple_three/tests.py
gerhardriener/cherry_picking_code
5dbcd32ad2e9929eac785eb06e7d44c60b1ffc18
[ "MIT" ]
null
null
null
trust_simple_three/tests.py
gerhardriener/cherry_picking_code
5dbcd32ad2e9929eac785eb06e7d44c60b1ffc18
[ "MIT" ]
null
null
null
trust_simple_three/tests.py
gerhardriener/cherry_picking_code
5dbcd32ad2e9929eac785eb06e7d44c60b1ffc18
[ "MIT" ]
null
null
null
from otree.api import Currency as c, currency_range, SubmissionMustFail from . import pages from ._builtin import Bot from .models import Constants class PlayerBot(Bot): cases = [ {'offer': 1, 'return_1': 1, 'return_2': 1, 'return_2_A': 1, 'return_2_B': 1, 'p1_payoff': 5, 'p2_payoff': 5...
34.394737
77
0.55394
from otree.api import Currency as c, currency_range, SubmissionMustFail from . import pages from ._builtin import Bot from .models import Constants class PlayerBot(Bot): cases = [ {'offer': 1, 'return_1': 1, 'return_2': 1, 'return_2_A': 1, 'return_2_B': 1, 'p1_payoff': 5, 'p2_payoff': 5...
true
true
f71bcbceeb060b7a31ed8e3353c036d8c37f27b4
621
py
Python
supriya/ugens/BRF.py
deeuu/supriya
14fcb5316eccb4dafbe498932ceff56e1abb9d27
[ "MIT" ]
null
null
null
supriya/ugens/BRF.py
deeuu/supriya
14fcb5316eccb4dafbe498932ceff56e1abb9d27
[ "MIT" ]
null
null
null
supriya/ugens/BRF.py
deeuu/supriya
14fcb5316eccb4dafbe498932ceff56e1abb9d27
[ "MIT" ]
null
null
null
import collections from supriya import CalculationRate from supriya.ugens.Filter import Filter class BRF(Filter): """ A 2nd order Butterworth band-reject filter. :: >>> source = supriya.ugens.In.ar(bus=0) >>> b_r_f =supriya.ugens.BRF.ar(source=source) >>> b_r_f BRF.ar() ...
21.413793
79
0.645733
import collections from supriya import CalculationRate from supriya.ugens.Filter import Filter class BRF(Filter): _ordered_input_names = collections.OrderedDict( [("source", None), ("frequency", 440.0), ("reciprocal_of_q", 1.0)] ) _valid_calculation_rates = (CalculationRate.AUDIO, Calculat...
true
true
f71bcc0ec5e7d7ea7b83b7093e62b94f604e0b6e
1,989
py
Python
visualizer.py
shaandesai1/transfer_diffeq
29ab4f3ff16a58bc7b1751428e540a3bb135778c
[ "MIT" ]
null
null
null
visualizer.py
shaandesai1/transfer_diffeq
29ab4f3ff16a58bc7b1751428e540a3bb135778c
[ "MIT" ]
null
null
null
visualizer.py
shaandesai1/transfer_diffeq
29ab4f3ff16a58bc7b1751428e540a3bb135778c
[ "MIT" ]
null
null
null
import numpy as np import torch import matplotlib.pyplot as plt from neurodiffeq import diff # the differentiation operation from neurodiffeq.conditions import IVP # the initial condition from neurodiffeq.networks import FCNN # fully-connect neural network from neurodiffeq.solvers import Solver1D from neurodiffeq.c...
40.591837
85
0.64002
import numpy as np import torch import matplotlib.pyplot as plt from neurodiffeq import diff from neurodiffeq.conditions import IVP from neurodiffeq.networks import FCNN from neurodiffeq.solvers import Solver1D from neurodiffeq.callbacks import WeightCallback from neurodiffeq.callbacks import WeightCallback1, So...
true
true
f71bcd5fb6a9e9c5a061b59f9eb248ca4c085954
5,479
py
Python
create_7segment_dataset.py
Kazuhito00/7seg-image-generator
2ab059814348800b289c033f839c7a255b72a1ac
[ "Apache-2.0" ]
null
null
null
create_7segment_dataset.py
Kazuhito00/7seg-image-generator
2ab059814348800b289c033f839c7a255b72a1ac
[ "Apache-2.0" ]
null
null
null
create_7segment_dataset.py
Kazuhito00/7seg-image-generator
2ab059814348800b289c033f839c7a255b72a1ac
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import random import argparse import cv2 as cv import numpy as np from tqdm import tqdm from create_7segment_image import create_7segment_image def get_args(): parser = argparse.ArgumentParser() parser.add_argument("--width", help='ima...
38.048611
80
0.592626
import os import random import argparse import cv2 as cv import numpy as np from tqdm import tqdm from create_7segment_image import create_7segment_image def get_args(): parser = argparse.ArgumentParser() parser.add_argument("--width", help='image width', type=int, default=96) parser.a...
true
true
f71bcdce19046a219d824e7ae538b1d15a34fb6e
27,412
py
Python
sklearn/preprocessing/tests/test_polynomial.py
talahajeer/scikit-learn
d66b42708a5912039740cd08f747229433e579b5
[ "BSD-3-Clause" ]
1
2021-12-28T09:33:38.000Z
2021-12-28T09:33:38.000Z
sklearn/preprocessing/tests/test_polynomial.py
talahajeer/scikit-learn
d66b42708a5912039740cd08f747229433e579b5
[ "BSD-3-Clause" ]
null
null
null
sklearn/preprocessing/tests/test_polynomial.py
talahajeer/scikit-learn
d66b42708a5912039740cd08f747229433e579b5
[ "BSD-3-Clause" ]
2
2017-01-16T17:53:31.000Z
2017-04-22T06:13:07.000Z
import numpy as np import pytest from scipy import sparse from scipy.sparse import random as sparse_random from sklearn.utils._testing import assert_array_almost_equal from numpy.testing import assert_allclose, assert_array_equal from scipy.interpolate import BSpline from sklearn.linear_model import LinearRegression f...
31.948718
88
0.583212
import numpy as np import pytest from scipy import sparse from scipy.sparse import random as sparse_random from sklearn.utils._testing import assert_array_almost_equal from numpy.testing import assert_allclose, assert_array_equal from scipy.interpolate import BSpline from sklearn.linear_model import LinearRegression f...
true
true
f71bce762094aac77e775115a4361cc778bec8f7
22,413
py
Python
tests/test_iso_parsing.py
mtauban/OWSLib
0b64e7a8f7eb9e1fca369716f9803821066bf0f3
[ "BSD-3-Clause" ]
null
null
null
tests/test_iso_parsing.py
mtauban/OWSLib
0b64e7a8f7eb9e1fca369716f9803821066bf0f3
[ "BSD-3-Clause" ]
null
null
null
tests/test_iso_parsing.py
mtauban/OWSLib
0b64e7a8f7eb9e1fca369716f9803821066bf0f3
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import io from owslib import util from owslib.etree import etree from owslib.iso import ( MD_Metadata, ) from owslib.namespaces import Namespaces def get_md_resource(file_path): """Read the file and parse into an XML tree. Parameters ---------- file_path : str Pa...
37.923858
126
0.664659
import io from owslib import util from owslib.etree import etree from owslib.iso import ( MD_Metadata, ) from owslib.namespaces import Namespaces def get_md_resource(file_path): namespaces = Namespaces().get_namespaces(keys=('gmd', 'gmi')) with io.open(file_path, mode='r', encoding='utf-8') as f: ...
true
true
f71bcee66968f36d4da1975fc465b3d5f8cf8ea5
1,789
py
Python
tegaki/core.py
RShirohara/handwriting_detection
f24aba8ac695fef064d090db78229ab482f342cd
[ "MIT" ]
null
null
null
tegaki/core.py
RShirohara/handwriting_detection
f24aba8ac695fef064d090db78229ab482f342cd
[ "MIT" ]
1
2021-02-24T00:31:12.000Z
2021-02-26T00:11:24.000Z
tegaki/core.py
RShirohara/handwriting_detection
f24aba8ac695fef064d090db78229ab482f342cd
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # author: @RShirohara # TODO: #8 from time import sleep from .detect import DetectArea from .googleapis import DetectText, GetTTS from .send import PlayMP3 from .util import VideoStream, QueueConnector class Tegaki: """HandWriting Detection core class. Attributes: capture (...
26.308824
77
0.57071
from time import sleep from .detect import DetectArea from .googleapis import DetectText, GetTTS from .send import PlayMP3 from .util import VideoStream, QueueConnector class Tegaki: def __init__(self, model_dir, src=0, width=None, height=None, maxsize=0): self.capture = VideoStream( src...
true
true
f71bceeb4b6085939b05dc07c82d4eea47511809
865
py
Python
OpenPGPAbs/gpgBackends/__init__.py
KOLANICH/OpenPGPAbs
1052422a74c3970990491972f81be8eb142d2dd7
[ "Unlicense" ]
null
null
null
OpenPGPAbs/gpgBackends/__init__.py
KOLANICH/OpenPGPAbs
1052422a74c3970990491972f81be8eb142d2dd7
[ "Unlicense" ]
null
null
null
OpenPGPAbs/gpgBackends/__init__.py
KOLANICH/OpenPGPAbs
1052422a74c3970990491972f81be8eb142d2dd7
[ "Unlicense" ]
null
null
null
_backendsNames = ("bouncyCastle", "pgpy") from pathlib import Path from os.path import expanduser from enum import IntFlag from abc import ABC, abstractmethod keyringPath = Path(expanduser("~/.gnupg/pubring.kbx")) class SecurityIssues(IntFlag): OK = 0 wrongSig = (1 << 0) expired = (1 << 1) disabled = (1 << 2) r...
26.212121
137
0.713295
_backendsNames = ("bouncyCastle", "pgpy") from pathlib import Path from os.path import expanduser from enum import IntFlag from abc import ABC, abstractmethod keyringPath = Path(expanduser("~/.gnupg/pubring.kbx")) class SecurityIssues(IntFlag): OK = 0 wrongSig = (1 << 0) expired = (1 << 1) disabled = (1 << 2) r...
true
true
f71bcf92d85264acc7dde6e6008f78b323781cda
417
py
Python
pinaxcon/hooks.py
n6151h/pyconau2017
092de5fd60d2b0dd207242cf2585e16ec6843392
[ "MIT" ]
7
2015-12-15T22:54:42.000Z
2018-12-29T03:31:51.000Z
pinaxcon/hooks.py
n6151h/pyconau2017
092de5fd60d2b0dd207242cf2585e16ec6843392
[ "MIT" ]
59
2017-08-09T02:19:42.000Z
2021-11-30T03:16:58.000Z
config/hooks.py
pyung/pycon-ng
fc7d1709e5da6f3013886d7a3099bd3d617b0df1
[ "MIT" ]
11
2016-01-03T18:04:58.000Z
2021-09-19T06:01:25.000Z
import markdown import pinax.boxes.hooks import pinax.pages.hooks def markup_renderer(content): return markdown.markdown(content) class PinaxBoxesHookSet(pinax.boxes.hooks.DefaultHookSet): def parse_content(self, content): return markup_renderer(content) class PinaxPagesHookSet(pinax.pages.hooks...
19.857143
58
0.772182
import markdown import pinax.boxes.hooks import pinax.pages.hooks def markup_renderer(content): return markdown.markdown(content) class PinaxBoxesHookSet(pinax.boxes.hooks.DefaultHookSet): def parse_content(self, content): return markup_renderer(content) class PinaxPagesHookSet(pinax.pages.hooks...
true
true
f71bcffe0e1b5a79ea7623d2e1090e3853c423db
1,399
py
Python
vixautotimer/src/WebChilds/UploadResource.py
wedebe/enigma2-plugins
58e1897866ad65294283970e96e5f2841c3cb6e2
[ "OLDAP-2.3" ]
null
null
null
vixautotimer/src/WebChilds/UploadResource.py
wedebe/enigma2-plugins
58e1897866ad65294283970e96e5f2841c3cb6e2
[ "OLDAP-2.3" ]
null
null
null
vixautotimer/src/WebChilds/UploadResource.py
wedebe/enigma2-plugins
58e1897866ad65294283970e96e5f2841c3cb6e2
[ "OLDAP-2.3" ]
null
null
null
from os import write as os_write, close as os_close, O_WRONLY as os_O_WRONLY, O_CREAT as os_O_CREAT, open as os_open, remove as os_remove from twisted.web import resource, http class UploadResource(resource.Resource): FILENAME = "/tmp/autotimer_backup.tar" def __init__(self, session): self.session = session re...
31.088889
137
0.676197
from os import write as os_write, close as os_close, O_WRONLY as os_O_WRONLY, O_CREAT as os_O_CREAT, open as os_open, remove as os_remove from twisted.web import resource, http class UploadResource(resource.Resource): FILENAME = "/tmp/autotimer_backup.tar" def __init__(self, session): self.session = session re...
false
true
f71bd131825e1190622a69fa2bed7b9d67ded123
7,429
py
Python
selam/prepdata.py
tsoonjin/selam
fbbb355490271bf09056e05b23245be1b75ae24d
[ "MIT" ]
3
2020-10-14T06:05:26.000Z
2021-07-21T15:43:54.000Z
selam/prepdata.py
tsoonjin/selam
fbbb355490271bf09056e05b23245be1b75ae24d
[ "MIT" ]
null
null
null
selam/prepdata.py
tsoonjin/selam
fbbb355490271bf09056e05b23245be1b75ae24d
[ "MIT" ]
1
2020-05-08T12:59:35.000Z
2020-05-08T12:59:35.000Z
#!/bin/bash import os import sys import random import cv2 import numpy as np import xgboost as xgb from sklearn import preprocessing from sklearn.decomposition import PCA, NMF from sklearn.model_selection import train_test_split, GridSearchCV from sklearn.svm import SVC from sklearn.ensemble import RandomForestClassif...
34.714953
98
0.629964
import os import sys import random import cv2 import numpy as np import xgboost as xgb from sklearn import preprocessing from sklearn.decomposition import PCA, NMF from sklearn.model_selection import train_test_split, GridSearchCV from sklearn.svm import SVC from sklearn.ensemble import RandomForestClassifier from sk...
true
true
f71bd2ea8e759bf953972aa21026569e55e95cd0
3,360
py
Python
RLAgents/lib_common/WrapperSuperMario.py
michalnand/reinforcement_learning_agents
45f02c23b1135c87311dce5a52f6e643e4313fc3
[ "MIT" ]
2
2021-08-05T20:50:41.000Z
2021-12-25T11:00:38.000Z
RLAgents/lib_common/WrapperSuperMario.py
michalnand/reinforcement_learning_agents
45f02c23b1135c87311dce5a52f6e643e4313fc3
[ "MIT" ]
null
null
null
RLAgents/lib_common/WrapperSuperMario.py
michalnand/reinforcement_learning_agents
45f02c23b1135c87311dce5a52f6e643e4313fc3
[ "MIT" ]
null
null
null
import gym import numpy from PIL import Image from nes_py.wrappers import JoypadSpace from gym_super_mario_bros.actions import COMPLEX_MOVEMENT class NopOpsEnv(gym.Wrapper): def __init__(self, env=None, max_count=30): super(NopOpsEnv, self).__init__(env) self.max_count = max_count def reset(s...
27.540984
103
0.612798
import gym import numpy from PIL import Image from nes_py.wrappers import JoypadSpace from gym_super_mario_bros.actions import COMPLEX_MOVEMENT class NopOpsEnv(gym.Wrapper): def __init__(self, env=None, max_count=30): super(NopOpsEnv, self).__init__(env) self.max_count = max_count def reset(s...
true
true
f71bd2ef2fd1cafd83ccb890af0c057046ca9fa8
46,217
py
Python
facebook_business/adobjects/advideo.py
alternativshik/facebook-python-business-sdk
83be60d162ae34ffca186104597fdbb7d1fb7cf2
[ "CNRI-Python" ]
null
null
null
facebook_business/adobjects/advideo.py
alternativshik/facebook-python-business-sdk
83be60d162ae34ffca186104597fdbb7d1fb7cf2
[ "CNRI-Python" ]
null
null
null
facebook_business/adobjects/advideo.py
alternativshik/facebook-python-business-sdk
83be60d162ae34ffca186104597fdbb7d1fb7cf2
[ "CNRI-Python" ]
1
2021-04-09T22:44:52.000Z
2021-04-09T22:44:52.000Z
# Copyright 2014 Facebook, Inc. # You are hereby granted a non-exclusive, worldwide, royalty-free license to # use, copy, modify, and distribute this software in source code or binary # form for use in connection with the web services and APIs provided by # Facebook. # As with any software that integrates with the Fa...
39.400682
122
0.624857
from facebook_business.adobjects.abstractobject import AbstractObject from facebook_business.adobjects.abstractcrudobject import AbstractCrudObject from facebook_business.adobjects.objectparser import ObjectParser from facebook_business.api import FacebookRequest from facebook_business.typechecker i...
true
true
f71bd3a0366aa96de99eb6814ff7287178cc8592
1,849
py
Python
solver.py
gtxn/wordle-solver
48e8317bd1930884fa65d5bd0559b0341af456b6
[ "MIT" ]
1
2022-02-25T06:11:26.000Z
2022-02-25T06:11:26.000Z
solver.py
gtxn/wordle-solver
48e8317bd1930884fa65d5bd0559b0341af456b6
[ "MIT" ]
null
null
null
solver.py
gtxn/wordle-solver
48e8317bd1930884fa65d5bd0559b0341af456b6
[ "MIT" ]
null
null
null
from multiprocessing.sharedctypes import Value from global_vars import * from utils import * def state_inp_to_str(state_inp): state_str = '' for ch in state_inp: state_str += str((['b', 'y', 'g'].index(ch))) return state_str def get_state_input(): valid = False while not valid: ...
22.277108
190
0.60411
from multiprocessing.sharedctypes import Value from global_vars import * from utils import * def state_inp_to_str(state_inp): state_str = '' for ch in state_inp: state_str += str((['b', 'y', 'g'].index(ch))) return state_str def get_state_input(): valid = False while not valid: ...
true
true
f71bd4c71e4fbf7580c2aedbde090cc21504f482
1,367
py
Python
mysite/urls.py
vansjyo/OSVI-RemoteControl
6d3dd6aa1cceac2254171d57b33975df08cda2a8
[ "MIT" ]
null
null
null
mysite/urls.py
vansjyo/OSVI-RemoteControl
6d3dd6aa1cceac2254171d57b33975df08cda2a8
[ "MIT" ]
null
null
null
mysite/urls.py
vansjyo/OSVI-RemoteControl
6d3dd6aa1cceac2254171d57b33975df08cda2a8
[ "MIT" ]
null
null
null
"""mysite URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based ...
37.972222
77
0.702999
from django.contrib import admin from django.urls import path, include, re_path from django.views.generic.base import TemplateView from django.conf import settings from django.views.static import serve from django.conf.urls.static import static urlpatterns = [ path('admin/', admin.site.urls), path('accounts/',...
true
true
f71bd4cab6d4e1f08fe404d5664c23ec2a6f827b
319
py
Python
openapi2ceres/main.py
laulin/openapi2ceres
16622d399b0baed0159f62bd44f405ab2565126c
[ "Apache-2.0" ]
null
null
null
openapi2ceres/main.py
laulin/openapi2ceres
16622d399b0baed0159f62bd44f405ab2565126c
[ "Apache-2.0" ]
null
null
null
openapi2ceres/main.py
laulin/openapi2ceres
16622d399b0baed0159f62bd44f405ab2565126c
[ "Apache-2.0" ]
null
null
null
from pprint import pprint from .args import get_args from .openapifile import OpenAPIFile from .ceresfile import CeresFile def main(): args = get_args() input_file = OpenAPIFile() input_file.load(args.input) output_producer = CeresFile(input_file, args.output_dir) output_producer.process()
22.785714
60
0.742947
from pprint import pprint from .args import get_args from .openapifile import OpenAPIFile from .ceresfile import CeresFile def main(): args = get_args() input_file = OpenAPIFile() input_file.load(args.input) output_producer = CeresFile(input_file, args.output_dir) output_producer.process()
true
true
f71bd4d65ed44d77bfd69c5414311187e9b51c70
1,447
py
Python
setup.py
fusion-energy/openmc_mesh_tally_to_vtk
b0a9077da79363dbf758d951ca68e5e5365d09ad
[ "MIT" ]
null
null
null
setup.py
fusion-energy/openmc_mesh_tally_to_vtk
b0a9077da79363dbf758d951ca68e5e5365d09ad
[ "MIT" ]
3
2021-11-19T23:32:23.000Z
2022-02-15T19:58:40.000Z
setup.py
fusion-energy/openmc_mesh_tally_to_vtk
b0a9077da79363dbf758d951ca68e5e5365d09ad
[ "MIT" ]
null
null
null
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="openmc_mesh_tally_to_vtk", version="develop", author="The Regular Mesh Plotter Development Team", author_email="mail@jshimwell.com", description="A Python package for converting OpenMC mes...
31.456522
119
0.612301
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="openmc_mesh_tally_to_vtk", version="develop", author="The Regular Mesh Plotter Development Team", author_email="mail@jshimwell.com", description="A Python package for converting OpenMC mes...
true
true
f71bd54ef148217f90cdec13b843fb943c0543ba
18,592
py
Python
saleor/order/models.py
vantrong291/saleor
d4820d53f7f9825510c7ea0c41cacbda6b612452
[ "CC-BY-4.0" ]
null
null
null
saleor/order/models.py
vantrong291/saleor
d4820d53f7f9825510c7ea0c41cacbda6b612452
[ "CC-BY-4.0" ]
null
null
null
saleor/order/models.py
vantrong291/saleor
d4820d53f7f9825510c7ea0c41cacbda6b612452
[ "CC-BY-4.0" ]
null
null
null
from decimal import Decimal from operator import attrgetter from uuid import uuid4 from django.conf import settings from django.contrib.postgres.fields import JSONField from django.core.validators import MinValueValidator from django.db import models from django.db.models import F, Max, Sum from django.urls import rev...
34.113761
186
0.677765
from decimal import Decimal from operator import attrgetter from uuid import uuid4 from django.conf import settings from django.contrib.postgres.fields import JSONField from django.core.validators import MinValueValidator from django.db import models from django.db.models import F, Max, Sum from django.urls import rev...
true
true
f71bd651d2401162ae8d5fd7fa574451af7b41e4
3,518
py
Python
check_updates.py
kunansy/CheckDependencyUpdates
56ef905b7baf568e38c66ce39ca71115438a758b
[ "MIT" ]
null
null
null
check_updates.py
kunansy/CheckDependencyUpdates
56ef905b7baf568e38c66ce39ca71115438a758b
[ "MIT" ]
null
null
null
check_updates.py
kunansy/CheckDependencyUpdates
56ef905b7baf568e38c66ce39ca71115438a758b
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import argparse import asyncio import re import sys from itertools import groupby from pathlib import Path from typing import Optional, NamedTuple, AsyncIterable import aiofiles import aiohttp PYPI_URL = "https://pypi.org/pypi/{package_name}/json" class Package(NamedTuple): name: str ...
26.451128
69
0.610006
import argparse import asyncio import re import sys from itertools import groupby from pathlib import Path from typing import Optional, NamedTuple, AsyncIterable import aiofiles import aiohttp PYPI_URL = "https://pypi.org/pypi/{package_name}/json" class Package(NamedTuple): name: str required_version: str...
true
true
f71bd6747f7fe25f8bd69690c6d90ecfa7797cb2
27,045
py
Python
amos/observe/traits.py
WithPrecedent/amos
35b2f5b8d493eac946b583dfcd9d0553e7565292
[ "Apache-2.0" ]
null
null
null
amos/observe/traits.py
WithPrecedent/amos
35b2f5b8d493eac946b583dfcd9d0553e7565292
[ "Apache-2.0" ]
null
null
null
amos/observe/traits.py
WithPrecedent/amos
35b2f5b8d493eac946b583dfcd9d0553e7565292
[ "Apache-2.0" ]
null
null
null
""" traits: tools for examining classes, instances, and other python objects Corey Rayburn Yung <coreyrayburnyung@gmail.com> Copyright 2021, Corey Rayburn Yung License: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. ...
34.147727
80
0.614346
from __future__ import annotations from collections.abc import ( Container, Hashable, Iterable, Mapping, MutableSequence, Sequence, Set) import functools import inspect import types from typing import Any, Optional, Type, Union from ..repair import modify @functools.singledispatch def contains( item: object, ...
true
true
f71bd6d48a0ed9d4e130a00c843f740473f02ef1
14,332
py
Python
TaskList/Task.py
CaptainDesAstres/Blender-Render-Manager
39082e7833383bbe7dd414381f1b295e3b778439
[ "MIT" ]
5
2015-07-22T03:02:17.000Z
2018-10-11T10:07:42.000Z
TaskList/Task.py
CaptainDesAstres/Blender-Render-Manager
39082e7833383bbe7dd414381f1b295e3b778439
[ "MIT" ]
null
null
null
TaskList/Task.py
CaptainDesAstres/Blender-Render-Manager
39082e7833383bbe7dd414381f1b295e3b778439
[ "MIT" ]
1
2018-10-11T10:07:43.000Z
2018-10-11T10:07:43.000Z
#!/usr/bin/python3.4 # -*-coding:Utf-8 -* '''module to manage task settings''' import xml.etree.ElementTree as xmlMod import os, uuid, subprocess, shlex, time, datetime, threading from save import * from usefullFunctions import * from Preferences.PresetList.Preset.Preset import * from TaskList.FileInfo.FileInfo import ...
25.321555
140
0.629431
import xml.etree.ElementTree as xmlMod import os, uuid, subprocess, shlex, time, datetime, threading from save import * from usefullFunctions import * from Preferences.PresetList.Preset.Preset import * from TaskList.FileInfo.FileInfo import * from TaskList.TaskLog.TaskLog import * class Task: def __init__(self,...
true
true
f71bd874cf71759c3ef1a835fde21dc3e3e05f61
3,201
py
Python
Finetune/cosface_finetune.py
yuhaoooo/FaceAdv
73e27b7ca01243a9a3d115f5fabd1008b2afb34a
[ "MIT" ]
1
2022-03-04T09:18:04.000Z
2022-03-04T09:18:04.000Z
Finetune/cosface_finetune.py
yuhaoooo/FaceAdv
73e27b7ca01243a9a3d115f5fabd1008b2afb34a
[ "MIT" ]
null
null
null
Finetune/cosface_finetune.py
yuhaoooo/FaceAdv
73e27b7ca01243a9a3d115f5fabd1008b2afb34a
[ "MIT" ]
null
null
null
import os import torch import random import numpy as np import torch.optim as optim from torch.utils.data import DataLoader from torchvision import transforms, datasets from module.units.cosface_module import CosFace def accuracy(logits, y): _, preds = torch.max(logits, 1) return (preds == y).float().mean() ...
31.07767
114
0.590753
import os import torch import random import numpy as np import torch.optim as optim from torch.utils.data import DataLoader from torchvision import transforms, datasets from module.units.cosface_module import CosFace def accuracy(logits, y): _, preds = torch.max(logits, 1) return (preds == y).float().mean() ...
true
true
f71bd9829999b0a992bd60e9355172969776fbbe
881
py
Python
tests.py
gmr/ecs-pipeline-deploy
1e3e93a2497f4697c01de093c73a5cd78eebad63
[ "BSD-3-Clause" ]
2
2018-08-13T17:48:58.000Z
2018-10-29T20:10:11.000Z
tests.py
gmr/ecs-pipeline-deploy
1e3e93a2497f4697c01de093c73a5cd78eebad63
[ "BSD-3-Clause" ]
null
null
null
tests.py
gmr/ecs-pipeline-deploy
1e3e93a2497f4697c01de093c73a5cd78eebad63
[ "BSD-3-Clause" ]
1
2018-08-09T18:34:58.000Z
2018-08-09T18:34:58.000Z
# coding=utf-8 import unittest from ecs_pipeline_deploy import cli class TestImageParsing(unittest.TestCase): IMAGES = { 'alpine': (None, 'alpine', 'latest'), 'alpine:3.7': (None, 'alpine', '3.7'), 'docker.aweber.io/_/alpine:3.7': ('docker.aweber.io', '_/alpine', '3.7'), ...
32.62963
64
0.61521
import unittest from ecs_pipeline_deploy import cli class TestImageParsing(unittest.TestCase): IMAGES = { 'alpine': (None, 'alpine', 'latest'), 'alpine:3.7': (None, 'alpine', '3.7'), 'docker.aweber.io/_/alpine:3.7': ('docker.aweber.io', '_/alpine', '3.7'), 'docker.awe...
true
true
f71bd9cfe2794743457c4c581ce15146ca56acf0
3,438
py
Python
trac_captcha/release.py
FelixSchwarz/trac-captcha
90eb4d3b4dae297e23f09a99a91bcfabcd099dc6
[ "MIT" ]
1
2020-10-23T14:59:42.000Z
2020-10-23T14:59:42.000Z
trac_captcha/release.py
FelixSchwarz/trac-captcha
90eb4d3b4dae297e23f09a99a91bcfabcd099dc6
[ "MIT" ]
null
null
null
trac_captcha/release.py
FelixSchwarz/trac-captcha
90eb4d3b4dae297e23f09a99a91bcfabcd099dc6
[ "MIT" ]
null
null
null
# -*- coding: UTF-8 -*- name = 'TracCaptcha' version = '0.4dev' description = 'pluggable captcha infrastructure for Trac with reCAPTCHA included' long_description = ''' TracCaptcha is a Trac plugin to embed a captcha in the ticket page in addition to Trac's regular permission checks so that spammers are kept out. **...
38.629213
155
0.726294
name = 'TracCaptcha' version = '0.4dev' description = 'pluggable captcha infrastructure for Trac with reCAPTCHA included' long_description = ''' TracCaptcha is a Trac plugin to embed a captcha in the ticket page in addition to Trac's regular permission checks so that spammers are kept out. **"It just works":** Inst...
true
true
f71bdaca1e11f3f5800e7701806de0a2ef37a0d7
4,092
py
Python
setup.py
greedyuser/kur
ba6588ebfa5dec66d1e462c180618cc115fd38ef
[ "Apache-2.0" ]
867
2016-12-05T20:24:23.000Z
2022-02-18T09:07:14.000Z
setup.py
greedyuser/kur
ba6588ebfa5dec66d1e462c180618cc115fd38ef
[ "Apache-2.0" ]
90
2017-01-14T22:46:23.000Z
2021-02-09T13:32:27.000Z
setup.py
greedyuser/kur
ba6588ebfa5dec66d1e462c180618cc115fd38ef
[ "Apache-2.0" ]
135
2017-01-18T19:21:20.000Z
2022-01-24T16:57:59.000Z
""" Copyright 2016 Deepgram Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distri...
25.575
80
0.585533
true
true
f71bdb90d7af4d9b66887e0eed93bbd899a25113
1,264
py
Python
tests/test_blog.py
Geerocktricks/Blogs4Keeps
5a91a1c9ec38ecc50b5831d526dd376463a56210
[ "MIT" ]
null
null
null
tests/test_blog.py
Geerocktricks/Blogs4Keeps
5a91a1c9ec38ecc50b5831d526dd376463a56210
[ "MIT" ]
null
null
null
tests/test_blog.py
Geerocktricks/Blogs4Keeps
5a91a1c9ec38ecc50b5831d526dd376463a56210
[ "MIT" ]
null
null
null
from app.models import Blog , User from app import db def setUp(self): self.user_Gerald = User(username = 'Gerald',password = 'potato', email = 'geerockface4@gmail.com') self.new_blog = Blog(id=12345,title='Full stack development',content='Is it safe to go the full-stack way or better the Android path'...
40.774194
224
0.699367
from app.models import Blog , User from app import db def setUp(self): self.user_Gerald = User(username = 'Gerald',password = 'potato', email = 'geerockface4@gmail.com') self.new_blog = Blog(id=12345,title='Full stack development',content='Is it safe to go the full-stack way or better the Android path'...
false
true
f71bdbabe6cef239bb72385c05db3589ac1298ec
1,226
py
Python
redash/cli/queries.py
zero1number/redash
caabc4afa4e60e273782a46d84099857821c6500
[ "BSD-2-Clause" ]
20,680
2015-11-16T15:38:37.000Z
2022-03-31T21:43:43.000Z
redash/cli/queries.py
zero1number/redash
caabc4afa4e60e273782a46d84099857821c6500
[ "BSD-2-Clause" ]
3,934
2015-11-16T14:46:49.000Z
2022-03-31T13:22:31.000Z
redash/cli/queries.py
zero1number/redash
caabc4afa4e60e273782a46d84099857821c6500
[ "BSD-2-Clause" ]
4,147
2015-11-17T15:57:23.000Z
2022-03-31T11:57:43.000Z
from click import argument from flask.cli import AppGroup from sqlalchemy.orm.exc import NoResultFound manager = AppGroup(help="Queries management commands.") @manager.command() @argument("query_id") @argument("tag") def add_tag(query_id, tag): from redash import models query_id = int(query_id) try: ...
18.861538
55
0.620718
from click import argument from flask.cli import AppGroup from sqlalchemy.orm.exc import NoResultFound manager = AppGroup(help="Queries management commands.") @manager.command() @argument("query_id") @argument("tag") def add_tag(query_id, tag): from redash import models query_id = int(query_id) try: ...
true
true
f71bdc17b0e03a9554e767de798e80d4152e68b0
4,093
py
Python
scripts/mk_copy_coords.py
diogomart/Meeko
8af7466fd45a5d5de00a2d188ee3d4531b8372a5
[ "Apache-2.0" ]
4
2021-08-04T07:25:48.000Z
2021-09-22T09:57:35.000Z
scripts/mk_copy_coords.py
diogomart/Meeko
8af7466fd45a5d5de00a2d188ee3d4531b8372a5
[ "Apache-2.0" ]
4
2021-08-16T19:05:19.000Z
2021-10-04T22:21:35.000Z
scripts/mk_copy_coords.py
diogomart/Meeko
8af7466fd45a5d5de00a2d188ee3d4531b8372a5
[ "Apache-2.0" ]
2
2021-09-18T12:10:12.000Z
2021-09-22T06:13:02.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # # import argparse import os import sys from rdkit import Chem from rdkit.six import StringIO from meeko import PDBQTMolecule def cmd_lineparser(): parser = argparse.ArgumentParser(description='Copy atom coordinates from PDBQT (or DLG) file \ ...
46.511364
117
0.636697
import argparse import os import sys from rdkit import Chem from rdkit.six import StringIO from meeko import PDBQTMolecule def cmd_lineparser(): parser = argparse.ArgumentParser(description='Copy atom coordinates from PDBQT (or DLG) file \ to original molec...
true
true
f71bdcb3835402e5205a96a5e1e0df7c469df44e
160
py
Python
bidfx/__init__.py
bidfx/bidfx-api-py
6b5e2c5efaa547b2d97a5556ef8d21d1de807f68
[ "Apache-2.0" ]
3
2020-04-29T09:19:56.000Z
2021-03-08T11:12:05.000Z
bidfx/__init__.py
bidfx/bidfx-api-py
6b5e2c5efaa547b2d97a5556ef8d21d1de807f68
[ "Apache-2.0" ]
3
2020-03-08T21:54:02.000Z
2021-02-02T22:33:51.000Z
bidfx/__init__.py
bidfx/bidfx-api-py
6b5e2c5efaa547b2d97a5556ef8d21d1de807f68
[ "Apache-2.0" ]
2
2020-06-13T10:52:18.000Z
2022-03-02T17:29:45.000Z
from .exceptions import * from .pricing import * from .session import * __all__ = session.__all__ + pricing.__all__ + exceptions.__all__ __version__ = "1.0.2"
22.857143
64
0.75
from .exceptions import * from .pricing import * from .session import * __all__ = session.__all__ + pricing.__all__ + exceptions.__all__ __version__ = "1.0.2"
true
true
f71bdcb6632ab0a396bd37cc7b250ad677eaebe8
12,992
py
Python
examples/PPO_super_mario_bros/env.py
hybug/RL_Lab
0748e143a0fb60b9912ca28fbebc25e8f97a2fe4
[ "Unlicense" ]
3
2020-12-31T02:20:15.000Z
2021-11-16T02:26:57.000Z
examples/PPO_super_mario_bros/env.py
hybug/RL_Lab
0748e143a0fb60b9912ca28fbebc25e8f97a2fe4
[ "Unlicense" ]
null
null
null
examples/PPO_super_mario_bros/env.py
hybug/RL_Lab
0748e143a0fb60b9912ca28fbebc25e8f97a2fe4
[ "Unlicense" ]
null
null
null
''' Author: hanyu Date: 2020-11-06 13:04:12 LastEditTime: 2021-01-09 09:07:08 LastEditors: hanyu Description: environment FilePath: /test_ppo/examples/PPO_super_mario_bros/env.py ''' import logging import numpy as np from collections import namedtuple # todo, to common def padding(input, seqlen, dtype): input = ...
34.831099
94
0.491379
import logging import numpy as np from collections import namedtuple def padding(input, seqlen, dtype): input = np.array(input, dtype=dtype) if len(input) >= seqlen: return input shape = input.shape pad = np.tile( np.zeros_like(input[0:1], dtype=dtype), [seqlen - shape[0]] + ...
true
true
f71bdd846d5f411d42153fd29bd618659a976fad
17,083
py
Python
orio/module/loop/submodule/composite/composite.py
phrb/orio_experiments
934ba192301cb4e23d98b9f79e91799152bf76b1
[ "MIT" ]
null
null
null
orio/module/loop/submodule/composite/composite.py
phrb/orio_experiments
934ba192301cb4e23d98b9f79e91799152bf76b1
[ "MIT" ]
null
null
null
orio/module/loop/submodule/composite/composite.py
phrb/orio_experiments
934ba192301cb4e23d98b9f79e91799152bf76b1
[ "MIT" ]
null
null
null
# # Loop transformation submodule.that implements a combination of various loop transformations. # import sys import orio.module.loop.submodule.submodule, transformation import orio.module.loop.submodule.tile.tile import orio.module.loop.submodule.permut.permut import orio.module.loop.submodule.regtile.regtile import ...
48.121127
139
0.572967
import sys import orio.module.loop.submodule.submodule, transformation import orio.module.loop.submodule.tile.tile import orio.module.loop.submodule.permut.permut import orio.module.loop.submodule.regtile.regtile import orio.module.loop.submodule.unrolljam.unrolljam import orio.module.loop.submodule.scalarreplace.s...
false
true
f71bdd99c5f2350a22133188e60716a5121147ae
403
py
Python
SentyectorAPI/SentyectorAPI/wsgi.py
vaibhavarora102/Sentyector
c9023fe38e3517bd39b932a3282f5aebe5e84fbf
[ "MIT" ]
null
null
null
SentyectorAPI/SentyectorAPI/wsgi.py
vaibhavarora102/Sentyector
c9023fe38e3517bd39b932a3282f5aebe5e84fbf
[ "MIT" ]
null
null
null
SentyectorAPI/SentyectorAPI/wsgi.py
vaibhavarora102/Sentyector
c9023fe38e3517bd39b932a3282f5aebe5e84fbf
[ "MIT" ]
3
2021-04-10T06:33:07.000Z
2021-04-10T12:04:19.000Z
""" WSGI config for SentyectorAPI project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO...
23.705882
78
0.791563
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'SentyectorAPI.settings') application = get_wsgi_application()
true
true
f71bddb9bef15222e2b3b6e6039b80e283a19bf6
11,278
py
Python
src/model/dataProcessing/coco_utils.py
monkeypants/CartridgeOCR
a2cdaa72e3839a881118b85f5ff7b4515579004b
[ "MIT" ]
2
2021-07-12T02:37:46.000Z
2021-12-28T23:03:20.000Z
src/model/dataProcessing/coco_utils.py
monkeypants/CartridgeOCR
a2cdaa72e3839a881118b85f5ff7b4515579004b
[ "MIT" ]
28
2021-12-29T00:51:24.000Z
2022-03-24T08:03:59.000Z
src/model/dataProcessing/coco_utils.py
monkeypants/CartridgeOCR
a2cdaa72e3839a881118b85f5ff7b4515579004b
[ "MIT" ]
4
2021-09-24T16:13:43.000Z
2022-03-09T17:52:35.000Z
import copy import os import torch import torch.utils.data import torchvision from pycocotools import mask as coco_mask from pycocotools.coco import COCO import dataProcessing.transforms as T import logging class FilterAndRemapCocoCategories(object): def __init__(self, categories, remap=True): self.catego...
34.916409
107
0.605604
import copy import os import torch import torch.utils.data import torchvision from pycocotools import mask as coco_mask from pycocotools.coco import COCO import dataProcessing.transforms as T import logging class FilterAndRemapCocoCategories(object): def __init__(self, categories, remap=True): self.catego...
true
true
f71bdfb4494b0ea7e8661dce26911937bbed2de0
1,952
py
Python
facility_management/facility_management/doctype/fm_dashboard/fm_dashboard.py
odoochain/facility_management
545146db4e58e90311934a9d39c77def2d2a3e70
[ "MIT" ]
13
2020-06-23T23:44:16.000Z
2022-03-19T14:40:49.000Z
facility_management/facility_management/doctype/fm_dashboard/fm_dashboard.py
pazari/fmt
649618d47cd5cdefce93b5dc7efe5c25c299ad9c
[ "MIT" ]
2
2021-06-04T06:18:09.000Z
2021-06-06T08:41:36.000Z
facility_management/facility_management/doctype/fm_dashboard/fm_dashboard.py
pazari/fmt
649618d47cd5cdefce93b5dc7efe5c25c299ad9c
[ "MIT" ]
18
2020-02-18T10:57:13.000Z
2022-01-26T09:01:21.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2020, 9T9IT and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class FMDashboard(Document): def make_outstanding_balances(self): """ Make outstanding balances ...
29.134328
111
0.749488
from __future__ import unicode_literals import frappe from frappe.model.document import Document class FMDashboard(Document): def make_outstanding_balances(self): self.outstanding_balances = None outstanding_balances = _get_outstanding_balances(_get_properties(self.real_estate_property)) for outstanding_b...
true
true
f71be05c5a13840628f874af73f7d2dd87d4c2db
765
py
Python
ImagePoster/urls.py
AllyxMiko/ImagePoster
70b95a74b3ddb639e658f6b780dae5351947d6d6
[ "MIT" ]
null
null
null
ImagePoster/urls.py
AllyxMiko/ImagePoster
70b95a74b3ddb639e658f6b780dae5351947d6d6
[ "MIT" ]
null
null
null
ImagePoster/urls.py
AllyxMiko/ImagePoster
70b95a74b3ddb639e658f6b780dae5351947d6d6
[ "MIT" ]
null
null
null
"""ImagePoster URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-b...
34.772727
77
0.709804
from django.urls import path from django.urls.conf import include urlpatterns = [ path('images/', include('images.urls')), ]
true
true
f71be08bb68624aa77a36c61980a89daf8d0c77e
1,386
py
Python
setup.py
audiosamsung/brentvollebregt
077bbb8601b6c179d7b750a7e31ee141bd5b0644
[ "MIT" ]
1
2021-11-09T10:24:40.000Z
2021-11-09T10:24:40.000Z
setup.py
audiosamsung/brentvollebregt
077bbb8601b6c179d7b750a7e31ee141bd5b0644
[ "MIT" ]
null
null
null
setup.py
audiosamsung/brentvollebregt
077bbb8601b6c179d7b750a7e31ee141bd5b0644
[ "MIT" ]
null
null
null
from io import open from setuptools import setup from auto_py_to_exe import __version__ as version setup( name='auto-py-to-exe', version=version, url='https://github.com/brentvollebregt/auto-py-to-exe', license='MIT', author='Brent Vollebregt', author_email='brent@nitratine.net', descriptio...
35.538462
78
0.629149
from io import open from setuptools import setup from auto_py_to_exe import __version__ as version setup( name='auto-py-to-exe', version=version, url='https://github.com/brentvollebregt/auto-py-to-exe', license='MIT', author='Brent Vollebregt', author_email='brent@nitratine.net', descriptio...
true
true
f71be0c7310b1e5a59e2faa1aa48d7c69c065244
41,236
py
Python
pyscf/fci/selected_ci.py
crisely09/pyscf
cb92f7974bd9c87c0ef5b2b52abf5d3219b3d6b6
[ "Apache-2.0" ]
1
2020-04-07T21:12:08.000Z
2020-04-07T21:12:08.000Z
pyscf/fci/selected_ci.py
crisely09/pyscf
cb92f7974bd9c87c0ef5b2b52abf5d3219b3d6b6
[ "Apache-2.0" ]
2
2019-09-16T17:58:31.000Z
2019-09-22T17:26:01.000Z
pyscf/fci/selected_ci.py
crisely09/pyscf
cb92f7974bd9c87c0ef5b2b52abf5d3219b3d6b6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright 2014-2019 The PySCF Developers. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
42.599174
105
0.607964
import ctypes import numpy from pyscf import lib from pyscf.lib import logger from pyscf import ao2mo from pyscf.fci import cistring from pyscf.fci import direct_spin1 from pyscf.fci import rdm from pyscf import __config__ libfci = lib.load_library('libfci') def contract_2e(eri, civec_strs, norb, n...
true
true
f71be110a2784a6f4b942989944478aaf8facaaa
18,030
py
Python
ultra/tests/test_evaluate.py
MCZhi/SMARTS
3ef5650b04ac6fb7145cf4e23d5534d73e0929fc
[ "MIT" ]
2
2021-12-13T12:41:54.000Z
2021-12-16T03:10:24.000Z
ultra/tests/test_evaluate.py
MCZhi/SMARTS
3ef5650b04ac6fb7145cf4e23d5534d73e0929fc
[ "MIT" ]
null
null
null
ultra/tests/test_evaluate.py
MCZhi/SMARTS
3ef5650b04ac6fb7145cf4e23d5534d73e0929fc
[ "MIT" ]
null
null
null
# MIT License # # Copyright (C) 2021. Huawei Technologies Co., Ltd. All rights reserved. # # 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 th...
35.916335
101
0.59279
import glob import os import pickle import re import shutil import time import unittest import dill import gym import ray from ultra.baselines.agent_spec import BaselineAgentSpec from ultra.baselines.sac.sac.policy import SACPolicy from ultra.evaluate import collect_evaluations, evaluate, evaluat...
true
true
f71be12c5aef84eac371279bc150835aa8551c7d
27
py
Python
tess_py_api/TessPyWrap/__init__.py
orel98/tess_py_api
538cbf64fa795318366ac2ceeec8b15d5cf9ae84
[ "MIT" ]
3
2022-03-16T09:11:33.000Z
2022-03-19T19:43:50.000Z
tess_py_api/TessPyWrap/__init__.py
orel98/tess_py_api
538cbf64fa795318366ac2ceeec8b15d5cf9ae84
[ "MIT" ]
null
null
null
tess_py_api/TessPyWrap/__init__.py
orel98/tess_py_api
538cbf64fa795318366ac2ceeec8b15d5cf9ae84
[ "MIT" ]
null
null
null
from .CpyAPI import CpyAPI
13.5
26
0.814815
from .CpyAPI import CpyAPI
true
true
f71be1fb130e1061491a135bc6bfa210726ceb66
650
py
Python
PythonDesafios/d076.py
adaatii/Python-Curso-em-Video-
30b37713b3685469558babb93b557b53210f010c
[ "MIT" ]
null
null
null
PythonDesafios/d076.py
adaatii/Python-Curso-em-Video-
30b37713b3685469558babb93b557b53210f010c
[ "MIT" ]
null
null
null
PythonDesafios/d076.py
adaatii/Python-Curso-em-Video-
30b37713b3685469558babb93b557b53210f010c
[ "MIT" ]
null
null
null
# Crie um programa que tenha uma tupla única com nomes de produtos # e seus respectivos preços, na sequência. No final, mostre uma # listagem de preços, organizando os dados em forma tabular. listagem = ('Lápis', 1.75, 'Borracha', 2, 'Caderno', 15.90, 'Estojo', 10, 'Comp...
28.26087
66
0.543077
listagem = ('Lápis', 1.75, 'Borracha', 2, 'Caderno', 15.90, 'Estojo', 10, 'Compasso', 7.95, 'Mochila', 150.45, 'Canetas', 22.30, 'Livro', 34.50) print('-'*40) print(f'{"LISTAGEM DE PREÇOS":^40}') print('-'*40) for i in range(0, len(...
true
true
f71be2a3c566dab4f1526507df28e4b0c96bd528
4,961
py
Python
NMT/dataset.py
MISStingting/NMTmodel
970115d6f9fcd015d7daf3ad0e4844055e2af5d3
[ "Apache-2.0" ]
null
null
null
NMT/dataset.py
MISStingting/NMTmodel
970115d6f9fcd015d7daf3ad0e4844055e2af5d3
[ "Apache-2.0" ]
null
null
null
NMT/dataset.py
MISStingting/NMTmodel
970115d6f9fcd015d7daf3ad0e4844055e2af5d3
[ "Apache-2.0" ]
null
null
null
import tensorflow as tf # tf.enable_eager_execution() class Dataset(object): def get_dataset(self, params, mode): if mode == tf.estimator.ModeKeys.TRAIN: features_path = params["train_features_file"] labels_path = params["train_labels_file"] elif mode == tf.estimator.Mod...
48.637255
118
0.504939
import tensorflow as tf class Dataset(object): def get_dataset(self, params, mode): if mode == tf.estimator.ModeKeys.TRAIN: features_path = params["train_features_file"] labels_path = params["train_labels_file"] elif mode == tf.estimator.ModeKeys.EVAL: featu...
true
true
f71be2a65e952c2d97ca924e09c67df982278f0e
66,367
py
Python
tools/run_tests/run_tests.py
jtcho/grpc
99673fcbe341a981c27d2becd572468863bff33b
[ "Apache-2.0" ]
1
2017-09-07T00:48:20.000Z
2017-09-07T00:48:20.000Z
tools/run_tests/run_tests.py
jtcho/grpc
99673fcbe341a981c27d2becd572468863bff33b
[ "Apache-2.0" ]
null
null
null
tools/run_tests/run_tests.py
jtcho/grpc
99673fcbe341a981c27d2becd572468863bff33b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright 2015 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
35.096245
135
0.566773
from __future__ import print_function import argparse import ast import collections import glob import itertools import json import logging import multiprocessing import os import os.path import pipes import platform import random import re import socket import subprocess import sys import tempfile impo...
true
true
f71be3b444baa4607d29128c718bb04ae6b2c311
32,709
py
Python
ryu/lib/ofctl_v1_4.py
vinaykothiyal/ryu
32551989c649311854215df29860ccb272c105c0
[ "Apache-2.0" ]
null
null
null
ryu/lib/ofctl_v1_4.py
vinaykothiyal/ryu
32551989c649311854215df29860ccb272c105c0
[ "Apache-2.0" ]
null
null
null
ryu/lib/ofctl_v1_4.py
vinaykothiyal/ryu
32551989c649311854215df29860ccb272c105c0
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2016 Nippon Telegraph and Telephone Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
33.965732
78
0.575897
import logging from ryu.ofproto import ether from ryu.ofproto import ofproto_v1_4 from ryu.ofproto import ofproto_v1_4_parser from ryu.lib import ofctl_utils LOG = logging.getLogger(__name__) DEFAULT_TIMEOUT = 1.0 UTIL = ofctl_utils.OFCtlUtil(ofproto_v1_4) str_to_int = ofctl_utils.str_to_int def to...
true
true
f71be3d981254befffd5928f1197ba90e0eb5617
15,646
py
Python
venv/Lib/site-packages/pooch/downloaders.py
Terrathaw/ba21_loma_2_py
eebf5104dd054cef1ab61f0b257933ff679e75ec
[ "MIT" ]
4
2021-03-29T19:15:29.000Z
2021-06-08T05:34:00.000Z
venv/Lib/site-packages/pooch/downloaders.py
Terrathaw/ba21_loma_2_py
eebf5104dd054cef1ab61f0b257933ff679e75ec
[ "MIT" ]
1
2021-06-08T06:03:51.000Z
2021-06-08T06:03:51.000Z
venv/Lib/site-packages/pooch/downloaders.py
Terrathaw/ba21_loma_2_py
eebf5104dd054cef1ab61f0b257933ff679e75ec
[ "MIT" ]
1
2021-01-31T18:58:54.000Z
2021-01-31T18:58:54.000Z
# Copyright (c) 2018 The Pooch Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause # # This code is part of the Fatiando a Terra project (https://www.fatiando.org) # """ The classes that actually handle the downloads. """ import sys import ftplib import reques...
35.803204
85
0.592612
import sys import ftplib import requests from .utils import parse_url try: from tqdm import tqdm except ImportError: tqdm = None try: import paramiko except ImportError: paramiko = None def choose_downloader(url): known_downloaders = { "ftp": FTPDownloader, "https": HTTPD...
true
true
f71be436acf919b617f27f823476c8b4531b4b98
7,043
py
Python
homeassistant/auth/providers/trusted_networks.py
petewill/home-assistant
5859dba4344f05fb8774aa1207e47ac28f627a67
[ "Apache-2.0" ]
3
2020-01-21T18:09:09.000Z
2022-01-17T08:06:03.000Z
homeassistant/auth/providers/trusted_networks.py
petewill/home-assistant
5859dba4344f05fb8774aa1207e47ac28f627a67
[ "Apache-2.0" ]
39
2016-12-16T12:40:34.000Z
2017-02-13T17:53:42.000Z
homeassistant/auth/providers/trusted_networks.py
petewill/home-assistant
5859dba4344f05fb8774aa1207e47ac28f627a67
[ "Apache-2.0" ]
6
2020-04-10T06:21:11.000Z
2021-07-01T08:53:38.000Z
"""Trusted Networks auth provider. It shows list of users if access from trusted network. Abort login flow if not access from trusted network. """ from ipaddress import ip_network, IPv4Address, IPv6Address, IPv4Network, IPv6Network from typing import Any, Dict, List, Optional, Union, cast import voluptuous as vol im...
34.18932
87
0.609115
from ipaddress import ip_network, IPv4Address, IPv6Address, IPv4Network, IPv6Network from typing import Any, Dict, List, Optional, Union, cast import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.core import callback from homeassistant.exceptions import HomeAssistantError f...
true
true
f71be5558aa2a08dbbb15648b144ea54b9b317ff
854
py
Python
graphgallery/nn/layers/tensorflow/dropout/dropout.py
EdisonLeeeee/GraphGallery
4eec9c5136bda14809bd22584b26cc346cdb633b
[ "MIT" ]
300
2020-08-09T04:27:41.000Z
2022-03-30T07:43:41.000Z
graphgallery/nn/layers/tensorflow/dropout/dropout.py
EdisonLeeeee/GraphGallery
4eec9c5136bda14809bd22584b26cc346cdb633b
[ "MIT" ]
5
2020-11-05T06:16:50.000Z
2021-12-11T05:05:22.000Z
graphgallery/nn/layers/tensorflow/dropout/dropout.py
EdisonLeeeee/GraphGallery
4eec9c5136bda14809bd22584b26cc346cdb633b
[ "MIT" ]
51
2020-09-23T15:37:12.000Z
2022-03-05T01:28:56.000Z
import tensorflow as tf import tensorflow.keras.backend as K from tensorflow.keras.layers import Layer, Dropout class SparseDropout(Layer): def __init__(self, p=0.5): super().__init__() self.p = p def call(self, x, training=None): if training is None: training ...
26.6875
69
0.591335
import tensorflow as tf import tensorflow.keras.backend as K from tensorflow.keras.layers import Layer, Dropout class SparseDropout(Layer): def __init__(self, p=0.5): super().__init__() self.p = p def call(self, x, training=None): if training is None: training ...
true
true
f71be5cc21797fff7f87730b2e377bc2fe651fa1
14,118
py
Python
clinica/pipelines/deeplearning_prepare_data/deeplearning_prepare_data_pipeline.py
Raelag0112/clinica
d301b1abfdf4d3b62dc4b329622340795ae51ef8
[ "MIT" ]
null
null
null
clinica/pipelines/deeplearning_prepare_data/deeplearning_prepare_data_pipeline.py
Raelag0112/clinica
d301b1abfdf4d3b62dc4b329622340795ae51ef8
[ "MIT" ]
null
null
null
clinica/pipelines/deeplearning_prepare_data/deeplearning_prepare_data_pipeline.py
Raelag0112/clinica
d301b1abfdf4d3b62dc4b329622340795ae51ef8
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Use hash instead of parameters for iterables folder names # Otherwise path will be too long and generate OSError from nipype import config import clinica.pipelines.engine as cpe cfg = dict(execution={"parameterize_dirs": False}) config.update_config(cfg) class DeepLearningPrepareData(cpe...
35.741772
116
0.541507
from nipype import config import clinica.pipelines.engine as cpe cfg = dict(execution={"parameterize_dirs": False}) config.update_config(cfg) class DeepLearningPrepareData(cpe.Pipeline): def check_custom_dependencies(self): def get_input_fields(self): return ["input_nifti"] def get_outpu...
true
true
f71be64382d9c7cd419601ae2aa3d28d776baa3a
2,261
py
Python
scripts/xml2txt.py
o8r/pytorch_cpp
70ba1e64270da6d870847c074ce33afb154f1ef8
[ "MIT" ]
181
2020-03-26T12:33:25.000Z
2022-03-28T04:04:25.000Z
scripts/xml2txt.py
o8r/pytorch_cpp
70ba1e64270da6d870847c074ce33afb154f1ef8
[ "MIT" ]
11
2020-07-26T13:18:50.000Z
2022-01-09T10:04:10.000Z
scripts/xml2txt.py
o8r/pytorch_cpp
70ba1e64270da6d870847c074ce33afb154f1ef8
[ "MIT" ]
38
2020-05-04T05:06:55.000Z
2022-03-29T19:10:51.000Z
import os import glob import argparse import xml.etree.ElementTree as ET parser = argparse.ArgumentParser() # Define parameter parser.add_argument('--input_dir', type=str) parser.add_argument('--output_dir', type=str) parser.add_argument('--class_list', type=str) args = parser.parse_args() # Set Class Names def s...
27.91358
101
0.632906
import os import glob import argparse import xml.etree.ElementTree as ET parser = argparse.ArgumentParser() parser.add_argument('--input_dir', type=str) parser.add_argument('--output_dir', type=str) parser.add_argument('--class_list', type=str) args = parser.parse_args() def set_class_names(class_list): f =...
true
true
f71be6b44b2393e0c5756152ad6854307836bc3b
20,079
py
Python
tests/test_data/test_datasets/test_kitti_dataset.py
ammaryasirnaich/mmdetection3d
5e549546abbb2a7b43aab59e40e87599f61dcc4a
[ "Apache-2.0" ]
null
null
null
tests/test_data/test_datasets/test_kitti_dataset.py
ammaryasirnaich/mmdetection3d
5e549546abbb2a7b43aab59e40e87599f61dcc4a
[ "Apache-2.0" ]
null
null
null
tests/test_data/test_datasets/test_kitti_dataset.py
ammaryasirnaich/mmdetection3d
5e549546abbb2a7b43aab59e40e87599f61dcc4a
[ "Apache-2.0" ]
null
null
null
# Copyright (c) OpenMMLab. All rights reserved. import math import os import tempfile import numpy as np import pytest import torch from mmdet3d.core.bbox import LiDARInstance3DBoxes, limit_period from mmdet3d.datasets import KittiDataset def _generate_kitti_dataset_config(): data_root = 'tests/data/kitti' ...
41.91858
79
0.619852
import math import os import tempfile import numpy as np import pytest import torch from mmdet3d.core.bbox import LiDARInstance3DBoxes, limit_period from mmdet3d.datasets import KittiDataset def _generate_kitti_dataset_config(): data_root = 'tests/data/kitti' ann_file = 'tests/data/kitti/kitti_infos_train....
true
true
f71be6eab3547a134de4d6606f48330f24f83fbe
8,080
py
Python
scripts/build_load_data.py
millingermarkus/pypsa-eur
2e39a21299036c0cec86fe4707de06a42ec15d62
[ "MIT" ]
null
null
null
scripts/build_load_data.py
millingermarkus/pypsa-eur
2e39a21299036c0cec86fe4707de06a42ec15d62
[ "MIT" ]
null
null
null
scripts/build_load_data.py
millingermarkus/pypsa-eur
2e39a21299036c0cec86fe4707de06a42ec15d62
[ "MIT" ]
null
null
null
# SPDX-FileCopyrightText: : 2020 @JanFrederickUnnewehr, The PyPSA-Eur Authors # # SPDX-License-Identifier: MIT """ This rule downloads the load data from `Open Power System Data Time series <https://data.open-power-system-data.org/time_series/>`_. For all countries in the network, the per country load timeseries with...
35.752212
415
0.653713
import logging logger = logging.getLogger(__name__) from _helpers import configure_logging import pandas as pd import numpy as np import dateutil from pandas import Timedelta as Delta def load_timeseries(fn, years, countries, powerstatistics=True): logger.info(f"Retrieving load data from '{fn}'.") patt...
true
true
f71be7330e1eaec34340d30bcdded8315ca8fdf3
5,076
py
Python
tests/unit/driver/generic/test_generic_sync_driver.py
haccht/scrapli
89589ee78c36296ee67813fcbedebee9b41b6bca
[ "MIT" ]
1
2020-02-09T17:43:43.000Z
2020-02-09T17:43:43.000Z
tests/unit/driver/generic/test_generic_sync_driver.py
haccht/scrapli
89589ee78c36296ee67813fcbedebee9b41b6bca
[ "MIT" ]
null
null
null
tests/unit/driver/generic/test_generic_sync_driver.py
haccht/scrapli
89589ee78c36296ee67813fcbedebee9b41b6bca
[ "MIT" ]
null
null
null
import pytest from scrapli.driver.generic.base_driver import ReadCallback from scrapli.exceptions import ScrapliValueError def test_get_prompt(monkeypatch, sync_generic_driver): # stupid test w/ the patch, but want coverage and in the future maybe the driver actually # does something to the prompt it gets fr...
35.496503
100
0.731678
import pytest from scrapli.driver.generic.base_driver import ReadCallback from scrapli.exceptions import ScrapliValueError def test_get_prompt(monkeypatch, sync_generic_driver): monkeypatch.setattr("scrapli.channel.sync_channel.Channel.get_prompt", lambda x: "scrapli>") assert sync_generic_driver.g...
true
true
f71be7afa0a994c58e2f0076275e35e23af1c2a5
16,119
py
Python
utils_twc/kg.py
daiki-kimura/commonsense-rl
5513926957b6501ce9cfa46f77f8f2c1c4892fa5
[ "Apache-2.0" ]
null
null
null
utils_twc/kg.py
daiki-kimura/commonsense-rl
5513926957b6501ce9cfa46f77f8f2c1c4892fa5
[ "Apache-2.0" ]
null
null
null
utils_twc/kg.py
daiki-kimura/commonsense-rl
5513926957b6501ce9cfa46f77f8f2c1c4892fa5
[ "Apache-2.0" ]
null
null
null
import sys import networkx as nx import logging import json import requests from pathlib import Path import numpy as np import matplotlib.pyplot as plt from collections import defaultdict from utils_twc.generic import escape_entities # Logging formatting FORMAT = '%(asctime)s %(message)s' logging.basicConfig(format=FO...
37.927059
136
0.578262
import sys import networkx as nx import logging import json import requests from pathlib import Path import numpy as np import matplotlib.pyplot as plt from collections import defaultdict from utils_twc.generic import escape_entities FORMAT = '%(asctime)s %(message)s' logging.basicConfig(format=FORMAT, level='INFO', ...
true
true
f71be86a3b944cd3f5b50d8b2127cb921b32bfb6
1,048
py
Python
lhc/io/bed/__main__.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
lhc/io/bed/__main__.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
lhc/io/bed/__main__.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
import argparse from .iterator import BedEntryIterator from lhc.io.bed.tools import depth, sort, filter from lhc.io.txt.tools import compress def iter_bed(fname): it = BedEntryIterator(fname) for entry in it: yield entry it.close() def main(): args = get_parser().parse_args() args.func(...
23.818182
55
0.719466
import argparse from .iterator import BedEntryIterator from lhc.io.bed.tools import depth, sort, filter from lhc.io.txt.tools import compress def iter_bed(fname): it = BedEntryIterator(fname) for entry in it: yield entry it.close() def main(): args = get_parser().parse_args() args.func(...
true
true
f71be8fe9b1bed16fe43ad8a1ea794cdbcec63d2
7,605
py
Python
tests/test_bootstrap.py
itewk/home-assistant
769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4
[ "Apache-2.0" ]
23
2017-11-15T21:03:53.000Z
2021-03-29T21:33:48.000Z
tests/test_bootstrap.py
itewk/home-assistant
769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4
[ "Apache-2.0" ]
6
2021-02-08T20:59:36.000Z
2022-03-12T00:52:11.000Z
tests/test_bootstrap.py
itewk/home-assistant
769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4
[ "Apache-2.0" ]
10
2018-01-01T00:12:51.000Z
2021-12-21T23:08:05.000Z
"""Test the bootstrapping.""" # pylint: disable=protected-access import asyncio import logging import os from unittest.mock import Mock, patch from homeassistant import bootstrap import homeassistant.config as config_util import homeassistant.util.dt as dt_util from tests.common import ( MockModule, get_test_...
32.224576
86
0.682446
import asyncio import logging import os from unittest.mock import Mock, patch from homeassistant import bootstrap import homeassistant.config as config_util import homeassistant.util.dt as dt_util from tests.common import ( MockModule, get_test_config_dir, mock_coro, mock_integration, patch_yaml_...
true
true
f71beaaf95d2695d9793e2cc7434d033c3c66f17
148
py
Python
cargo/infra/cargo_provider_impl.py
agiledragon/ddd-sample-in-python
5268e580845e599d8d3488c92bd1b44f4ece2378
[ "MIT" ]
2
2018-08-24T15:09:07.000Z
2018-10-29T01:45:21.000Z
cargo/infra/cargo_provider_impl.py
agiledragon/ddd-sample-in-python
5268e580845e599d8d3488c92bd1b44f4ece2378
[ "MIT" ]
null
null
null
cargo/infra/cargo_provider_impl.py
agiledragon/ddd-sample-in-python
5268e580845e599d8d3488c92bd1b44f4ece2378
[ "MIT" ]
3
2018-07-30T02:07:21.000Z
2021-02-18T07:04:21.000Z
from domain.model.base.provider import Provider class CargoProviderImpl(Provider): def confirm(self, cargo): print 'confirm cargo'
14.8
47
0.722973
from domain.model.base.provider import Provider class CargoProviderImpl(Provider): def confirm(self, cargo): print 'confirm cargo'
false
true
f71beb6536594f288089770f787a036271ea7c72
1,832
py
Python
lite/tests/unittest_py/op/common/test_unique_with_counts_op_base.py
714627034/Paddle-Lite
015ba88a4d639db0b73603e37f83e47be041a4eb
[ "Apache-2.0" ]
808
2018-04-17T17:43:12.000Z
2019-08-18T07:39:13.000Z
lite/tests/unittest_py/op/common/test_unique_with_counts_op_base.py
714627034/Paddle-Lite
015ba88a4d639db0b73603e37f83e47be041a4eb
[ "Apache-2.0" ]
728
2018-04-18T08:15:25.000Z
2019-08-16T07:14:43.000Z
lite/tests/unittest_py/op/common/test_unique_with_counts_op_base.py
714627034/Paddle-Lite
015ba88a4d639db0b73603e37f83e47be041a4eb
[ "Apache-2.0" ]
364
2018-04-18T17:05:02.000Z
2019-08-18T03:25:38.000Z
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
34.566038
125
0.68559
import sys sys.path.append('..') from program_config import TensorConfig, ProgramConfig, OpConfig, CxxConfig, TargetType, PrecisionType, DataLayoutType, Place import numpy as np from functools import partial from typing import Optional, List, Callable, Dict, Any, Set import unittest import hypothesis imp...
true
true
f71bebf8420c687bf788c8fe852634cda08565c9
54,956
py
Python
scikit-learn-master/sklearn/linear_model/ridge.py
lqkweb/learnMLflow
13c5decaebba95b1b90f92021be35e343b4764af
[ "Apache-2.0" ]
2
2019-02-21T10:43:16.000Z
2019-07-30T04:56:37.000Z
scikit-learn-master/sklearn/linear_model/ridge.py
lqkweb/learnMLflow
13c5decaebba95b1b90f92021be35e343b4764af
[ "Apache-2.0" ]
null
null
null
scikit-learn-master/sklearn/linear_model/ridge.py
lqkweb/learnMLflow
13c5decaebba95b1b90f92021be35e343b4764af
[ "Apache-2.0" ]
null
null
null
""" Ridge regression """ # Author: Mathieu Blondel <mathieu@mblondel.org> # Reuben Fletcher-Costin <reuben.fletchercostin@gmail.com> # Fabian Pedregosa <fabian@fseoane.net> # Michael Eickenberg <michael.eickenberg@nsup.org> # License: BSD 3 clause from abc import ABCMeta, abstractmethod impor...
38.32357
79
0.619951
from abc import ABCMeta, abstractmethod import warnings import numpy as np from scipy import linalg from scipy import sparse from scipy.sparse import linalg as sp_linalg from .base import LinearClassifierMixin, LinearModel, _rescale_data from .sag import sag_solver from ..base import RegressorMixin from ..uti...
true
true
f71bec5753bc8e9f3a6c6cc2541b07d58772b075
1,201
py
Python
tests/tests/test_design/test_randomcodons.py
klavinslab/coral
17f59591211562a59a051f474cd6cecba4829df9
[ "MIT" ]
34
2015-12-26T22:13:51.000Z
2021-11-17T11:46:37.000Z
tests/tests/test_design/test_randomcodons.py
klavinslab/coral
17f59591211562a59a051f474cd6cecba4829df9
[ "MIT" ]
13
2015-09-11T23:27:51.000Z
2018-06-25T20:44:28.000Z
tests/tests/test_design/test_randomcodons.py
klavinslab/coral
17f59591211562a59a051f474cd6cecba4829df9
[ "MIT" ]
14
2015-10-08T17:08:48.000Z
2022-02-22T04:25:54.000Z
''' Tests for RandomCodons class of analysis module. ''' from nose.tools import assert_equal, assert_not_equal, assert_raises from coral import design, reaction, RNA def test_randomcodons(): ''' This test is pretty basic right now - not sure how much checking can be done for a random DNA base generator....
32.459459
70
0.757702
from nose.tools import assert_equal, assert_not_equal, assert_raises from coral import design, reaction, RNA def test_randomcodons(): reference_seq = RNA('AUGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAG') reference_peptide = reaction.translate(reference_seq) output = design.random_codons(reference_peptide) ...
true
true
f71bec9bd1ce0214c2dc30775d89387898d9b1fb
328
py
Python
truck_app/migrations/0010_remove_truck_likes.py
Svetloni89/truck_project
e365d2a84f32e62f8dbc5c371a3355dbbe93557d
[ "MIT" ]
null
null
null
truck_app/migrations/0010_remove_truck_likes.py
Svetloni89/truck_project
e365d2a84f32e62f8dbc5c371a3355dbbe93557d
[ "MIT" ]
null
null
null
truck_app/migrations/0010_remove_truck_likes.py
Svetloni89/truck_project
e365d2a84f32e62f8dbc5c371a3355dbbe93557d
[ "MIT" ]
null
null
null
# Generated by Django 3.1.3 on 2020-11-14 08:22 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('truck_app', '0009_auto_20201112_1114'), ] operations = [ migrations.RemoveField( model_name='truck', name='likes', )...
18.222222
49
0.591463
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('truck_app', '0009_auto_20201112_1114'), ] operations = [ migrations.RemoveField( model_name='truck', name='likes', ), ]
true
true
f71bedbe0e1dd8d7b00f8bfa2461591aca993afa
2,299
py
Python
example/exampleapp/models.py
jphilip/django-treewidget
e2eff61f98ea7a520f29a4ed7395ec75d134246b
[ "MIT" ]
null
null
null
example/exampleapp/models.py
jphilip/django-treewidget
e2eff61f98ea7a520f29a4ed7395ec75d134246b
[ "MIT" ]
null
null
null
example/exampleapp/models.py
jphilip/django-treewidget
e2eff61f98ea7a520f29a4ed7395ec75d134246b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models from mptt.models import MPTTModel from treebeard.mp_tree import MP_Node from treebeard.al_tree import AL_Node from treebeard.ns_tree import NS_Node from treewidget.fields import TreeForeignKey, TreeManyToManyField from django.u...
35.921875
97
0.702044
from __future__ import unicode_literals from django.db import models from mptt.models import MPTTModel from treebeard.mp_tree import MP_Node from treebeard.al_tree import AL_Node from treebeard.ns_tree import NS_Node from treewidget.fields import TreeForeignKey, TreeManyToManyField from django.utils.encoding import py...
true
true
f71bf0329ac143d3243fa730424a4eebdde5ed63
2,519
py
Python
letsencrypt/constants.py
felixonmars/certbot
324ebf468db402dbe44ba780ed2df682ab99af86
[ "Apache-2.0" ]
null
null
null
letsencrypt/constants.py
felixonmars/certbot
324ebf468db402dbe44ba780ed2df682ab99af86
[ "Apache-2.0" ]
null
null
null
letsencrypt/constants.py
felixonmars/certbot
324ebf468db402dbe44ba780ed2df682ab99af86
[ "Apache-2.0" ]
null
null
null
"""Let's Encrypt constants.""" import os import logging from acme import challenges SETUPTOOLS_PLUGINS_ENTRY_POINT = "letsencrypt.plugins" """Setuptools entry point group name for plugins.""" CLI_DEFAULTS = dict( config_files=[ "/etc/letsencrypt/cli.ini", # http://freedesktop.org/wiki/Software/x...
27.086022
73
0.710599
import os import logging from acme import challenges SETUPTOOLS_PLUGINS_ENTRY_POINT = "letsencrypt.plugins" CLI_DEFAULTS = dict( config_files=[ "/etc/letsencrypt/cli.ini", os.path.join(os.environ.get("XDG_CONFIG_HOME", "~/.config"), "letsencrypt", "cli.ini"), ],...
true
true
f71bf03d595623a0ca93dde19a49a3566fbf4da1
2,082
py
Python
scraper.py
Luisf718/web_scraping
df599a1ea77a1475a05d97884f57a4c3761adec5
[ "MIT" ]
null
null
null
scraper.py
Luisf718/web_scraping
df599a1ea77a1475a05d97884f57a4c3761adec5
[ "MIT" ]
null
null
null
scraper.py
Luisf718/web_scraping
df599a1ea77a1475a05d97884f57a4c3761adec5
[ "MIT" ]
null
null
null
import requests import lxml.html as html import os import datetime #El text-fill es un h2 pero la libreria no identifica el h2 como tal sino como text-fill HOME_URL = 'https://www.larepublica.co/' XPATH_LINK_TO_ARTICLE = '//text-fill/a/@href' XPATH_TITLE = '//div[@class="mb-auto"]/text-fill/span//text()' XPATH_SUMMAR...
30.617647
88
0.548511
import requests import lxml.html as html import os import datetime HOME_URL = 'https://www.larepublica.co/' XPATH_LINK_TO_ARTICLE = '//text-fill/a/@href' XPATH_TITLE = '//div[@class="mb-auto"]/text-fill/span//text()' XPATH_SUMMARY = '//div[@class="lead"]/p//text()' XPATH_BODY = '//div[@class="html-content"]/p//text(...
true
true
f71bf0555abfc8db7bc79d24972ecc0523d5c881
5,928
py
Python
scaffold_generator/defaults.py
iamswaroopp/django-scaffold-generator
c9aa7269c3a3d9a618dbf41aac8e23649be64d48
[ "MIT" ]
6
2021-05-20T14:46:23.000Z
2022-01-24T07:07:55.000Z
scaffold_generator/defaults.py
iamswaroopp/django-scaffold-generator
c9aa7269c3a3d9a618dbf41aac8e23649be64d48
[ "MIT" ]
null
null
null
scaffold_generator/defaults.py
iamswaroopp/django-scaffold-generator
c9aa7269c3a3d9a618dbf41aac8e23649be64d48
[ "MIT" ]
null
null
null
DEFAULT_SETTINGS = { 'CREATE_HTML_VIEW_RESOURCES': True, 'CREATE_REST_VIEW_RESOURCES': True, 'DEFAULT_MODEL_IMPORTS': [], 'DEFAULT_FORM_IMPORTS': [ 'django.forms', ], 'FIELDS': {}, 'MODEL_EXTRA_IMPORT_CLASSES': [ 'django.db.models', ], 'MODEL_PARENT_CLASSES': ['django...
31.531915
103
0.624494
DEFAULT_SETTINGS = { 'CREATE_HTML_VIEW_RESOURCES': True, 'CREATE_REST_VIEW_RESOURCES': True, 'DEFAULT_MODEL_IMPORTS': [], 'DEFAULT_FORM_IMPORTS': [ 'django.forms', ], 'FIELDS': {}, 'MODEL_EXTRA_IMPORT_CLASSES': [ 'django.db.models', ], 'MODEL_PARENT_CLASSES': ['django...
true
true
f71bf0a388d2199024ab2f51328c979f5c521f72
9,018
py
Python
test/functional/wallet_abandonconflict.py
SbercoinCom/sbercoin.com
8fb386e59e4db8a6abb3a2c638a2ecc918f6b9dd
[ "MIT" ]
1
2021-05-17T06:06:57.000Z
2021-05-17T06:06:57.000Z
test/functional/wallet_abandonconflict.py
SbercoinCom/sbercoin.com
8fb386e59e4db8a6abb3a2c638a2ecc918f6b9dd
[ "MIT" ]
null
null
null
test/functional/wallet_abandonconflict.py
SbercoinCom/sbercoin.com
8fb386e59e4db8a6abb3a2c638a2ecc918f6b9dd
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the abandontransaction RPC. The abandontransaction RPC marks a transaction and all its in-wallet...
47.714286
138
0.66833
from decimal import Decimal from test_framework.test_framework import BitcoinTestFramework from test_framework.util import ( assert_equal, assert_raises_rpc_error, connect_nodes, disconnect_nodes, wait_until, ) from test_framework.sbercoinconfig import * class AbandonConflictTest(BitcoinTestFr...
true
true
f71bf12d2f88d3050797e3faff333cb5b247f6af
4,243
py
Python
BPR-example/tSNE_matlab/tsne_p.py
jsirait/selection-bias-code
5b89b2d9bc3c996e27dde4773be105698fd72db9
[ "BSD-3-Clause" ]
null
null
null
BPR-example/tSNE_matlab/tsne_p.py
jsirait/selection-bias-code
5b89b2d9bc3c996e27dde4773be105698fd72db9
[ "BSD-3-Clause" ]
null
null
null
BPR-example/tSNE_matlab/tsne_p.py
jsirait/selection-bias-code
5b89b2d9bc3c996e27dde4773be105698fd72db9
[ "BSD-3-Clause" ]
null
null
null
# Generated with SMOP 0.41 from libsmop import * # tsne_p.m @function def tsne_p(P=None,labels=None,no_dims=None,*args,**kwargs): varargin = tsne_p.varargin nargin = tsne_p.nargin #TSNE_P Performs symmetric t-SNE on affinity matrix P # mappedX = tsne_p(P, labels, no_dims) # The f...
27.732026
130
0.607825
from libsmop import * @function def tsne_p(P=None,labels=None,no_dims=None,*args,**kwargs): varargin = tsne_p.varargin nargin = tsne_p.nargin # The low-dimensional data representation is returned in mappedX. # (C) Laurens van der Maaten, 2010 # University of...
true
true
f71bf176600708ef5ff1a1e657e714c9aea3da7b
664
py
Python
dags/externaltasksensor_dag.py
vannguyen3007/Apache-Airflow
1c8a6f3c9c0022807cbae4c4f83de33b8454ae24
[ "Apache-2.0" ]
null
null
null
dags/externaltasksensor_dag.py
vannguyen3007/Apache-Airflow
1c8a6f3c9c0022807cbae4c4f83de33b8454ae24
[ "Apache-2.0" ]
null
null
null
dags/externaltasksensor_dag.py
vannguyen3007/Apache-Airflow
1c8a6f3c9c0022807cbae4c4f83de33b8454ae24
[ "Apache-2.0" ]
null
null
null
import pprint as pp import airflow.utils.dates from airflow import DAG from airflow.sensors.external_task_sensor import ExternalTaskSensor from airflow.operators.dummy_operator import DummyOperator from datetime import datetime, timedelta default_args = { "owner": "airflow", "start_date": airflow.util...
30.181818
104
0.733434
import pprint as pp import airflow.utils.dates from airflow import DAG from airflow.sensors.external_task_sensor import ExternalTaskSensor from airflow.operators.dummy_operator import DummyOperator from datetime import datetime, timedelta default_args = { "owner": "airflow", "start_date": airflow.util...
true
true
f71bf1d55740e24cffa947f3eb30e8b50f0271f3
198
py
Python
store_debug/store_debug/main.py
ruber0id/band-services-set
471bb4bf561ca5ec9e0e3a7bda75574b0c718fde
[ "Apache-2.0" ]
4
2018-08-27T05:36:37.000Z
2018-08-29T09:41:50.000Z
store_debug/store_debug/main.py
ruber0id/band-services-set
471bb4bf561ca5ec9e0e3a7bda75574b0c718fde
[ "Apache-2.0" ]
null
null
null
store_debug/store_debug/main.py
ruber0id/band-services-set
471bb4bf561ca5ec9e0e3a7bda75574b0c718fde
[ "Apache-2.0" ]
2
2020-05-20T14:50:59.000Z
2020-08-31T14:44:57.000Z
import asyncio import ujson from band import logger, expose """ Listen events and write to output """ @expose.listener() async def broadcast(**params): logger.info('Broadcast', params=params)
16.5
43
0.737374
import asyncio import ujson from band import logger, expose @expose.listener() async def broadcast(**params): logger.info('Broadcast', params=params)
true
true
f71bf5092e429695b0035e78d005436c626887d2
26,148
py
Python
python/mtap/deployment.py
benknoll-umn/mtap
67d506aa4ffc960acca1988ec12c5391c15ad736
[ "Apache-2.0" ]
3
2020-03-06T21:24:24.000Z
2021-03-21T06:38:00.000Z
python/mtap/deployment.py
benknoll-umn/mtap
67d506aa4ffc960acca1988ec12c5391c15ad736
[ "Apache-2.0" ]
40
2019-10-14T17:02:54.000Z
2022-03-09T13:35:54.000Z
python/mtap/deployment.py
benknoll-umn/mtap
67d506aa4ffc960acca1988ec12c5391c15ad736
[ "Apache-2.0" ]
2
2019-10-14T15:42:46.000Z
2020-03-05T23:29:01.000Z
# Copyright 2020 Regents of the University of Minnesota. # # 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 applic...
40.728972
105
0.618594
import argparse import logging import os import pathlib import shutil import subprocess import sys import threading import time from typing import Any, Dict, Iterable, List, Optional, Sequence, Tuple, Union import grpc from mtap import utilities, _config __all__ = [ 'Deployment', 'GlobalSettings', '...
true
true
f71bf509bb30658310cb6206ecdb34d8c4c8f548
6,084
py
Python
sphinx/testing/path.py
Symaxion/sphinx
f4f7936b5c3671153c2646387c8258b1c4e25e3c
[ "BSD-2-Clause" ]
8
2019-04-27T01:19:45.000Z
2020-09-21T03:31:01.000Z
sphinx/testing/path.py
JoeyCluett/sphinx
ff5031c96e90027510ad2d0251972e12da46402c
[ "BSD-2-Clause" ]
12
2021-03-09T03:01:16.000Z
2022-03-11T23:59:36.000Z
sphinx/testing/path.py
JoeyCluett/sphinx
ff5031c96e90027510ad2d0251972e12da46402c
[ "BSD-2-Clause" ]
5
2019-04-27T01:19:47.000Z
2020-09-20T15:15:19.000Z
""" sphinx.testing.path ~~~~~~~~~~~~~~~~~~~ :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import os import shutil import sys if False: # For type annotation import builtins # NOQA from typing import Any, Callable, IO, List # ...
27.160714
78
0.534845
import os import shutil import sys if False: import builtins from typing import Any, Callable, IO, List FILESYSTEMENCODING = sys.getfilesystemencoding() or sys.getdefaultencoding() class path(str): @property def parent(self): return self.__class__(os.path.dirname(self)) ...
true
true
f71bf51348a8a1504b096c6228f4179dd5875c54
1,538
py
Python
consort/tools/ClefSpannerExpression.py
josiah-wolf-oberholtzer/consort
6c7d511835d5ad883ad1ad52ae9cd48c4a7b5571
[ "MIT" ]
9
2015-02-11T09:35:40.000Z
2019-04-29T23:57:49.000Z
consort/tools/ClefSpannerExpression.py
josiah-wolf-oberholtzer/consort
6c7d511835d5ad883ad1ad52ae9cd48c4a7b5571
[ "MIT" ]
2
2016-02-07T18:54:47.000Z
2017-08-10T01:38:01.000Z
consort/tools/ClefSpannerExpression.py
josiah-wolf-oberholtzer/consort
6c7d511835d5ad883ad1ad52ae9cd48c4a7b5571
[ "MIT" ]
1
2019-05-13T12:37:15.000Z
2019-05-13T12:37:15.000Z
from abjad import attach from abjad import inspect from abjad import iterate from abjad.tools import abctools from abjad.tools import scoretools class ClefSpannerExpression(abctools.AbjadValueObject): r'''A clef spanner expression. ''' ### CLASS VARIABLES ### __slots__ = () ### INITIALIZER ### ...
31.387755
67
0.605982
from abjad import attach from abjad import inspect from abjad import iterate from abjad.tools import abctools from abjad.tools import scoretools class ClefSpannerExpression(abctools.AbjadValueObject): leaves = list(iterate(music).by_leaf()) weights = [] weighted_pitches = [] for lea...
true
true