hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f7636b4dd5437878bc271ebde1414ddeed4f14a6
4,993
py
Python
research/object_detection/dataset_tools/oid_tfrecord_creation.py
vincentcheny/models
afb1a59fc1bc792ac72d1a3e22e2469020529788
[ "Apache-2.0" ]
1
2019-09-11T09:41:11.000Z
2019-09-11T09:41:11.000Z
research/object_detection/dataset_tools/oid_tfrecord_creation.py
vincentcheny/models
afb1a59fc1bc792ac72d1a3e22e2469020529788
[ "Apache-2.0" ]
null
null
null
research/object_detection/dataset_tools/oid_tfrecord_creation.py
vincentcheny/models
afb1a59fc1bc792ac72d1a3e22e2469020529788
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
46.663551
81
0.695574
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf from object_detection.core import standard_fields from object_detection.utils import dataset_util def tf_example_from_annotations_data_frame(annotations_data_frame, label_ma...
true
true
f7636c95d1328a0682b631903884a8eb6e774477
1,274
py
Python
nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSClipInferior.py
Conxz/nipype
1281723ae56eacd103597ff4081a205583706e62
[ "Apache-2.0" ]
null
null
null
nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSClipInferior.py
Conxz/nipype
1281723ae56eacd103597ff4081a205583706e62
[ "Apache-2.0" ]
2
2017-10-05T21:08:38.000Z
2018-10-09T23:01:23.000Z
nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSClipInferior.py
Conxz/nipype
1281723ae56eacd103597ff4081a205583706e62
[ "Apache-2.0" ]
1
2016-10-11T19:18:53.000Z
2016-10-11T19:18:53.000Z
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from .....testing import assert_equal from ..brains import BRAINSClipInferior def test_BRAINSClipInferior_inputs(): input_map = dict(BackgroundFillValue=dict(argstr='--BackgroundFillValue %s', ), acLowerBound=dict(argstr='--acLowerBound %f', ), ...
28.954545
80
0.671115
from .....testing import assert_equal from ..brains import BRAINSClipInferior def test_BRAINSClipInferior_inputs(): input_map = dict(BackgroundFillValue=dict(argstr='--BackgroundFillValue %s', ), acLowerBound=dict(argstr='--acLowerBound %f', ), args=dict(argstr='%s', ), environ=dict(nohash...
true
true
f7636d831f93cd48d86500b301c206f8ad4c51b5
511
py
Python
src/lib.py
vladiibine/master-thesis
2b4c61e69c402150b33031e7f242d7ad4ab8ae66
[ "MIT" ]
null
null
null
src/lib.py
vladiibine/master-thesis
2b4c61e69c402150b33031e7f242d7ad4ab8ae66
[ "MIT" ]
null
null
null
src/lib.py
vladiibine/master-thesis
2b4c61e69c402150b33031e7f242d7ad4ab8ae66
[ "MIT" ]
null
null
null
''' Created on Apr 14, 2013 @author: Vlad ''' import sys,os def importFunc(funcName,moduleName,fileName): '''Imports the function specified and returns it''' dirName = fileName[0:fileName.rindex(moduleName)].rstrip('/').rstrip('\\') moduleAbsolutePath = "%s/%s"%(os.getcwd(),dirName) sys.pat...
28.388889
79
0.663405
import sys,os def importFunc(funcName,moduleName,fileName): dirName = fileName[0:fileName.rindex(moduleName)].rstrip('/').rstrip('\\') moduleAbsolutePath = "%s/%s"%(os.getcwd(),dirName) sys.path.append(moduleAbsolutePath) try: cust_module = __import__(moduleName) return getattr(...
true
true
f7636e3ebe19b085571c108b45a37337563810b7
22,491
py
Python
puresnmp/aio/api/raw.py
kocunop/puresnmp
737cb2eebacff7fa6a94de824fbd53e2ec742e47
[ "MIT" ]
66
2016-09-10T16:38:50.000Z
2022-03-24T12:04:56.000Z
puresnmp/aio/api/raw.py
kocunop/puresnmp
737cb2eebacff7fa6a94de824fbd53e2ec742e47
[ "MIT" ]
91
2016-09-12T03:02:08.000Z
2022-01-20T11:52:42.000Z
puresnmp/aio/api/raw.py
kocunop/puresnmp
737cb2eebacff7fa6a94de824fbd53e2ec742e47
[ "MIT" ]
22
2016-09-12T03:53:41.000Z
2021-07-15T06:40:45.000Z
""" This module contains a high-level API to SNMP functions. The arguments and return values of these functions have types which are internal to ``puresnmp`` (subclasses of :py:class:`x690.Type`). Alternatively, there is :py:mod:`puresnmp.aio.api.pythonic` which converts these values into pure Python types. This make...
34.978227
128
0.594549
import logging from collections import OrderedDict from typing import TYPE_CHECKING, Any, Dict, List, Tuple, cast from warnings import warn from x690.types import ( Integer, ObjectIdentifier, OctetString, Sequence, Type, ) from x690.util import to_bytes from ...const import DEFAULT_TIMEOUT, ERR...
true
true
f7636f9753e6e51d4efe86742d6ced6785e19427
3,858
py
Python
venv/Lib/site-packages/torch/fx/__init__.py
Westlanderz/AI-Plat1
1187c22819e5135e8e8189c99b86a93a0d66b8d8
[ "MIT" ]
1
2022-01-08T12:30:44.000Z
2022-01-08T12:30:44.000Z
venv/Lib/site-packages/torch/fx/__init__.py
Westlanderz/AI-Plat1
1187c22819e5135e8e8189c99b86a93a0d66b8d8
[ "MIT" ]
null
null
null
venv/Lib/site-packages/torch/fx/__init__.py
Westlanderz/AI-Plat1
1187c22819e5135e8e8189c99b86a93a0d66b8d8
[ "MIT" ]
null
null
null
r''' FX is a toolkit for developers to use to transform ``nn.Module`` instances. FX consists of three main components: a **symbolic tracer,** an **intermediate representation**, and **Python code generation**. A demonstration of these components in action: :: import torch # Simple module for demonstr...
42.866667
106
0.700622
from .graph_module import GraphModule from ._symbolic_trace import symbolic_trace, Tracer, wrap, PH, ProxyableClassMeta from .graph import Graph from .node import Node, map_arg from .proxy import Proxy from .interpreter import Interpreter as Interpreter, Transformer as Transformer from .subgraph_rewriter import...
true
true
f76370af85ea543daa66d8bbcc7851f12fc3fa6f
3,482
py
Python
sim/simple_model/loss_functions.py
bx3/perigee-bandit
73771672abe9321edbb7d455a59bfb072fafa33f
[ "MIT" ]
null
null
null
sim/simple_model/loss_functions.py
bx3/perigee-bandit
73771672abe9321edbb7d455a59bfb072fafa33f
[ "MIT" ]
null
null
null
sim/simple_model/loss_functions.py
bx3/perigee-bandit
73771672abe9321edbb7d455a59bfb072fafa33f
[ "MIT" ]
null
null
null
import torch import sys CONSTANT = 1e-10 class ClusterLoss(torch.nn.Module): def __init__(self): super().__init__() self.mse_fn = torch.nn.MSELoss(reduction='sum') self.softmax_func = torch.nn.Softmax(dim=0) # def forward(self, X, H, C, M, T, nM): # sim_loss = torch.tensor(0.0...
39.123596
115
0.521539
import torch import sys CONSTANT = 1e-10 class ClusterLoss(torch.nn.Module): def __init__(self): super().__init__() self.mse_fn = torch.nn.MSELoss(reduction='sum') self.softmax_func = torch.nn.Softmax(dim=0) ...
true
true
f76371897e3c7695d151eea68f31ed114dc2abbe
10,590
py
Python
kivymd/uix/selectioncontrol.py
adityabhawsingka/KivyMD
3603839404b10337ca675a92f7a3bbd2210a6c19
[ "MIT" ]
null
null
null
kivymd/uix/selectioncontrol.py
adityabhawsingka/KivyMD
3603839404b10337ca675a92f7a3bbd2210a6c19
[ "MIT" ]
null
null
null
kivymd/uix/selectioncontrol.py
adityabhawsingka/KivyMD
3603839404b10337ca675a92f7a3bbd2210a6c19
[ "MIT" ]
null
null
null
""" Selection Controls ================== Copyright (c) 2015 Andrés Rodríguez and KivyMD contributors - KivyMD library up to version 0.1.2 Copyright (c) 2019 Ivanov Yuri and KivyMD contributors - KivyMD library version 0.1.3 and higher For suggestions and questions: <kivydevelopment@gmail.com> This file is d...
32.786378
107
0.617469
from kivy.lang import Builder from kivy.properties import StringProperty, ListProperty, NumericProperty from kivy.uix.behaviors import ToggleButtonBehavior from kivy.uix.floatlayout import FloatLayout from kivy.properties import AliasProperty, BooleanProperty from kivy.metrics import dp, sp from kivy.animation import ...
true
true
f7637427e79410c360122eece4471e1dae7ae12d
3,772
py
Python
examples/DedicatedVmAddDataDisk.py
WeiZhixiong/ksc-sdk-python
a93237ce376e107eaae644678ef6b99819a9f8eb
[ "Apache-2.0" ]
53
2016-09-21T15:52:14.000Z
2021-12-23T09:23:00.000Z
examples/DedicatedVmAddDataDisk.py
WeiZhixiong/ksc-sdk-python
a93237ce376e107eaae644678ef6b99819a9f8eb
[ "Apache-2.0" ]
27
2016-09-21T15:24:43.000Z
2021-11-18T08:38:38.000Z
examples/DedicatedVmAddDataDisk.py
WeiZhixiong/ksc-sdk-python
a93237ce376e107eaae644678ef6b99819a9f8eb
[ "Apache-2.0" ]
68
2016-09-06T10:33:09.000Z
2021-11-16T07:13:03.000Z
#!/usr/bin/python # -*- encoding:utf-8 -*- #使用方法 ''' 专属宿主机批量挂盘 python Vm DedicatedVmAddDataDisk.py.py 50 filename 50 代表数据盘大小值 ''' #filename 的文件格式示例 ''' 192.168.1.1 192.268.1.2 ''' #示例文件 ''' DedicatedVmAddDataDisk ''' from kscore.session import get_session import sys import time from kscore.exceptions import ClientEr...
32.239316
171
0.539236
''' 专属宿主机批量挂盘 python Vm DedicatedVmAddDataDisk.py.py 50 filename 50 代表数据盘大小值 ''' ''' 192.168.1.1 192.268.1.2 ''' ''' DedicatedVmAddDataDisk ''' from kscore.session import get_session import sys import time from kscore.exceptions import ClientError ks_access_key_id ='ak' ks_secret_access_key = 'sk' def checkKecStat...
false
true
f76374574c03ed9438df24ae403c07f85075f76c
199
py
Python
DefaultTest.py
ReenExeCubeTime/CodewarsPython
5c6ad4e7566503a0adaf430df9b7635a3f94d396
[ "MIT" ]
1
2019-04-01T12:52:23.000Z
2019-04-01T12:52:23.000Z
DefaultTest.py
ReenExeCubeTime/CodewarsPython
5c6ad4e7566503a0adaf430df9b7635a3f94d396
[ "MIT" ]
21
2017-03-08T18:00:49.000Z
2017-03-22T22:22:47.000Z
DefaultTest.py
ReenExeCubeTime/CodewarsPython
5c6ad4e7566503a0adaf430df9b7635a3f94d396
[ "MIT" ]
null
null
null
import unittest from Default import Default class DefaultTest(unittest.TestCase): def test(self): default = Default() self.assertEqual(default.calculate(1), 1) unittest.main()
18.090909
49
0.703518
import unittest from Default import Default class DefaultTest(unittest.TestCase): def test(self): default = Default() self.assertEqual(default.calculate(1), 1) unittest.main()
true
true
f763746331e345f22b7c5a33a4edda7eac385dea
805
py
Python
Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/openedx/core/djangoapps/video_pipeline/forms.py
osoco/better-ways-of-thinking-about-software
83e70d23c873509e22362a09a10d3510e10f6992
[ "MIT" ]
3
2021-12-15T04:58:18.000Z
2022-02-06T12:15:37.000Z
Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/openedx/core/djangoapps/video_pipeline/forms.py
osoco/better-ways-of-thinking-about-software
83e70d23c873509e22362a09a10d3510e10f6992
[ "MIT" ]
null
null
null
Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/openedx/core/djangoapps/video_pipeline/forms.py
osoco/better-ways-of-thinking-about-software
83e70d23c873509e22362a09a10d3510e10f6992
[ "MIT" ]
1
2019-01-02T14:38:50.000Z
2019-01-02T14:38:50.000Z
""" Defines a form to provide validations for course-specific configuration. """ from django import forms from openedx.core.djangoapps.video_config.forms import CourseSpecificFlagAdminBaseForm from openedx.core.djangoapps.video_pipeline.models import ( CourseVideoUploadsEnabledByDefault, VEMPipelineIntegration...
26.833333
86
0.756522
from django import forms from openedx.core.djangoapps.video_config.forms import CourseSpecificFlagAdminBaseForm from openedx.core.djangoapps.video_pipeline.models import ( CourseVideoUploadsEnabledByDefault, VEMPipelineIntegration, ) class CourseVideoUploadsEnabledByDefaultAdminForm(CourseSpecificFlagAdminBa...
true
true
f7637523a6e3ed2b4271d23cf5f4dde64e71c9d4
3,841
py
Python
google/ads/google_ads/v1/proto/errors/change_status_error_pb2.py
jwygoda/google-ads-python
863892b533240cb45269d9c2cceec47e2c5a8b68
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v1/proto/errors/change_status_error_pb2.py
jwygoda/google-ads-python
863892b533240cb45269d9c2cceec47e2c5a8b68
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v1/proto/errors/change_status_error_pb2.py
jwygoda/google-ads-python
863892b533240cb45269d9c2cceec47e2c5a8b68
[ "Apache-2.0" ]
null
null
null
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/ads/googleads_v1/proto/errors/change_status_error.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message...
39.597938
638
0.795366
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db = _s...
true
true
f76375430d5753c3255f6a2e4ab5eff116ff6267
955
py
Python
userbot/plugins/hii.py
Zylern/HardcoreUserbot
2659849ac750122d6dd3ca05ba35ec83e3d8589c
[ "MIT" ]
3
2020-04-21T10:36:48.000Z
2020-08-11T11:51:25.000Z
userbot/plugins/hii.py
xditya/DexGram
80b999442f87105b6a151616c0bec1cb03774006
[ "MIT" ]
null
null
null
userbot/plugins/hii.py
xditya/DexGram
80b999442f87105b6a151616c0bec1cb03774006
[ "MIT" ]
3
2020-04-18T05:31:24.000Z
2020-08-11T11:51:29.000Z
"""COMMAND : .hii""" from telethon import events import asyncio from userbot.utils import admin_cmd @borg.on(admin_cmd(pattern="hii")) async def _(event): if event.fwd_from: return animation_interval = 3 animation_ttl = range(0, 103) #input_str = event.pattern_match.group(1) #if...
20.76087
57
0.495288
from telethon import events import asyncio from userbot.utils import admin_cmd @borg.on(admin_cmd(pattern="hii")) async def _(event): if event.fwd_from: return animation_interval = 3 animation_ttl = range(0, 103) await event.edit("👁👁") animation_chars = [ ...
true
true
f7637786ca517e78933c7639773d708e536a535f
844
py
Python
setup.py
AlphaGenes/alphafamimpute
6c97f696f155f54b13fde8d1a97c246b6edb5049
[ "MIT" ]
1
2020-10-07T15:30:13.000Z
2020-10-07T15:30:13.000Z
setup.py
HighlanderLab/AlphaFamImpute
6c97f696f155f54b13fde8d1a97c246b6edb5049
[ "MIT" ]
2
2021-11-24T12:00:20.000Z
2021-11-24T15:00:42.000Z
setup.py
HighlanderLab/AlphaFamImpute
6c97f696f155f54b13fde8d1a97c246b6edb5049
[ "MIT" ]
1
2021-09-27T08:53:59.000Z
2021-09-27T08:53:59.000Z
from setuptools import Extension, find_packages, setup setup( name="AlphaFamImpute", version="1.0.2", author="Andrew Whalen", author_email="awhalen@roslin.ed.ac.uk", description="An imputation program for phasing and imputation in a full sib family.", long_description="An imputation program for...
29.103448
95
0.661137
from setuptools import Extension, find_packages, setup setup( name="AlphaFamImpute", version="1.0.2", author="Andrew Whalen", author_email="awhalen@roslin.ed.ac.uk", description="An imputation program for phasing and imputation in a full sib family.", long_description="An imputation program for...
true
true
f76377b9c64203794699f8947df2866235dbdcec
1,726
py
Python
arjuna-samples/workspace/arjex/tests/modules/s01unitee_engine/ep03_what_i_assert/ex02_assert_true_false.py
test-mile/arjuna
21880b41e061e11bac2e600a3614684f8af75b2f
[ "Apache-2.0" ]
9
2018-11-15T10:09:17.000Z
2021-01-12T05:59:19.000Z
arjuna-samples/workspace/arjex/tests/modules/s01unitee_engine/ep03_what_i_assert/ex02_assert_true_false.py
test-mile/arjuna
21880b41e061e11bac2e600a3614684f8af75b2f
[ "Apache-2.0" ]
2
2019-07-01T15:33:46.000Z
2019-07-12T13:04:08.000Z
arjuna-samples/workspace/arjex/tests/modules/s01unitee_engine/ep03_what_i_assert/ex02_assert_true_false.py
test-mile/arjuna
21880b41e061e11bac2e600a3614684f8af75b2f
[ "Apache-2.0" ]
4
2018-12-02T15:14:04.000Z
2020-05-28T12:57:24.000Z
''' This file is a part of Test Mile Arjuna Copyright 2018 Test Mile Software Testing Pvt Ltd Website: www.TestMile.com Email: support [at] testmile.com Creator: Rahul Verma 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 ...
29.758621
80
0.779838
from arjuna.tpi.markup import * from arjuna.tpi.markup_helpers import * @test_function def assert_truth(my): my.steps.assert_true("Should Pass for True value.", True) my.steps.assert_false("Should Pass for False value.", False) @test_function def assert_true_fail_for_false(my): my.steps.assert_true("Sh...
true
true
f76377bee02851be8d8d8c9bd98cec44427aae45
1,520
py
Python
Discrete-Logarithm-Problem/Elliptic-Curve-DLP/brute_ecdlp.py
amoniaka-knabino/Crypton
91a91698050a384e7623eddc871dba1acecd585c
[ "MIT" ]
1,175
2018-06-13T07:05:56.000Z
2022-03-28T05:51:38.000Z
Discrete-Logarithm-Problem/Elliptic-Curve-DLP/brute_ecdlp.py
amoniaka-knabino/Crypton
91a91698050a384e7623eddc871dba1acecd585c
[ "MIT" ]
5
2019-10-12T15:43:52.000Z
2020-08-03T05:52:08.000Z
Discrete-Logarithm-Problem/Elliptic-Curve-DLP/brute_ecdlp.py
amoniaka-knabino/Crypton
91a91698050a384e7623eddc871dba1acecd585c
[ "MIT" ]
211
2018-02-13T11:06:08.000Z
2022-03-28T22:36:59.000Z
from sage.all import * import random def brute_ecdlp(P, Q, E): """ Brute Force algorithm to solve ECDLP and retrieve value of secret key `x`. Use only if group is very small. Includes memoization for faster computation [Warning]: Tested for Weierstrass Curves only :parameters: E : sage...
28.679245
98
0.576974
from sage.all import * import random def brute_ecdlp(P, Q, E): """ Brute Force algorithm to solve ECDLP and retrieve value of secret key `x`. Use only if group is very small. Includes memoization for faster computation [Warning]: Tested for Weierstrass Curves only :parameters: E : sage...
false
true
f76378552fe2e1833ed7a004e714b33cd9a993d5
714
py
Python
tests/test_rebuild_kernel.py
Tatsh/upkeep
7fa99ff54104e3dec15d611eb174910337cf1870
[ "MIT" ]
3
2019-04-24T10:17:00.000Z
2020-03-11T06:18:42.000Z
tests/test_rebuild_kernel.py
Tatsh/pezu
d5264b61a7113783ea29388180c16126cf185bdd
[ "MIT" ]
4
2020-04-27T19:56:29.000Z
2021-02-11T05:44:22.000Z
tests/test_rebuild_kernel.py
Tatsh/pezu
d5264b61a7113783ea29388180c16126cf185bdd
[ "MIT" ]
null
null
null
# SPDX-License-Identifier: MIT from pytest_mock.plugin import MockerFixture as MockFixture import pytest from upkeep import CONFIG_GZ, KernelConfigError, rebuild_kernel def test_rebuild_kernel_no_config_yes_gz(mocker: MockFixture) -> None: def isfile(x: str) -> bool: if x == '.config': return...
29.75
70
0.686275
from pytest_mock.plugin import MockerFixture as MockFixture import pytest from upkeep import CONFIG_GZ, KernelConfigError, rebuild_kernel def test_rebuild_kernel_no_config_yes_gz(mocker: MockFixture) -> None: def isfile(x: str) -> bool: if x == '.config': return False if x == CONFIG_G...
true
true
f7637855b547a753160353d834bdaefc65e5a835
16,203
py
Python
contrib/devtools/github-merge.py
lurchinms/Auroracoin
59492763afe46f15a2a2d737342e32d46b401c60
[ "MIT" ]
null
null
null
contrib/devtools/github-merge.py
lurchinms/Auroracoin
59492763afe46f15a2a2d737342e32d46b401c60
[ "MIT" ]
null
null
null
contrib/devtools/github-merge.py
lurchinms/Auroracoin
59492763afe46f15a2a2d737342e32d46b401c60
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2016-2017 DigiByte Core Developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # This script will locally construct a merge commit for a pull request on a # github repository, inspect it,...
42.085714
168
0.617602
# * pull/$PULL/head (the current state of the remote pull request) # * pull/$PULL/merge (github's merge) import os from sys import stdin,stdout,stderr import argparse import hashlib import subprocess import sys import json import codecs from urllib.request import Request, urlopen from urllib.error import HTTPError ...
true
true
f76379dd138060244ae20443875a360abdf12baa
4,962
py
Python
h/views/admin/organizations.py
julien-cheng/h
36c8ec044725720cf36f0986cdf025395aca8929
[ "BSD-2-Clause" ]
2
2019-08-04T07:22:11.000Z
2020-07-17T05:01:41.000Z
h/views/admin/organizations.py
11-eleven-11/h
91c7a4504ad7471ed3e30246763a03e6c1cc531b
[ "BSD-2-Clause" ]
null
null
null
h/views/admin/organizations.py
11-eleven-11/h
91c7a4504ad7471ed3e30246763a03e6c1cc531b
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from jinja2 import Markup from pyramid.view import view_config, view_defaults from pyramid.httpexceptions import HTTPFound from sqlalchemy import func from h import form from h import i18n from h import models from h.models.organization import Organizati...
30.62963
96
0.629585
from __future__ import unicode_literals from jinja2 import Markup from pyramid.view import view_config, view_defaults from pyramid.httpexceptions import HTTPFound from sqlalchemy import func from h import form from h import i18n from h import models from h.models.organization import Organization from h import paginat...
true
true
f76379ff2c0c1d50a3364509a4e36ba292247e5d
2,325
py
Python
src/meltano/cli/config.py
dotmesh-io/meltano
4616d44ded9dff4e9ad19a9004349e9baa16ddd5
[ "MIT" ]
4
2019-12-01T12:47:58.000Z
2021-02-09T00:42:52.000Z
src/meltano/cli/config.py
dotmesh-io/meltano
4616d44ded9dff4e9ad19a9004349e9baa16ddd5
[ "MIT" ]
38
2019-12-09T06:53:33.000Z
2022-03-29T22:29:19.000Z
src/meltano/cli/config.py
dotmesh-io/meltano
4616d44ded9dff4e9ad19a9004349e9baa16ddd5
[ "MIT" ]
1
2020-11-23T20:47:18.000Z
2020-11-23T20:47:18.000Z
import click from . import cli from .params import project from meltano.core.db import project_engine from meltano.core.project import Project from meltano.core.config_service import ConfigService from meltano.core.plugin.settings_service import PluginSettingsService @cli.group(invoke_without_command=True) @click.ar...
27.678571
87
0.693763
import click from . import cli from .params import project from meltano.core.db import project_engine from meltano.core.project import Project from meltano.core.config_service import ConfigService from meltano.core.plugin.settings_service import PluginSettingsService @cli.group(invoke_without_command=True) @click.ar...
true
true
f7637a48c713274af7520a9800d809c09e5629ec
3,518
py
Python
egta/envs/tragedy/tests/test_tragedy.py
instadeepai/EGTA-NMARL
544b2e0e4b5518edefc6819975f9de4573ff434c
[ "MIT" ]
6
2020-12-09T06:50:50.000Z
2022-01-29T19:15:06.000Z
egta/envs/tragedy/tests/test_tragedy.py
instadeepai/EGTA-NMARL
544b2e0e4b5518edefc6819975f9de4573ff434c
[ "MIT" ]
null
null
null
egta/envs/tragedy/tests/test_tragedy.py
instadeepai/EGTA-NMARL
544b2e0e4b5518edefc6819975f9de4573ff434c
[ "MIT" ]
2
2020-10-21T17:17:29.000Z
2021-02-14T11:20:07.000Z
import torch from ..env import Tragedy def test_defaults(): env = Tragedy(regen_properties={"type":"constant", "rate": 0.075}) obs = env.reset() print("start", obs) new_obs, reward, done, _ = env.step(torch.tensor([0,]*4)) print("obs", new_obs) print("reward", reward) print("done", done) ...
32.878505
97
0.544628
import torch from ..env import Tragedy def test_defaults(): env = Tragedy(regen_properties={"type":"constant", "rate": 0.075}) obs = env.reset() print("start", obs) new_obs, reward, done, _ = env.step(torch.tensor([0,]*4)) print("obs", new_obs) print("reward", reward) print("done", done) ...
true
true
f7637b39cd2c3fadae102556d7a9f37ebc43506b
427
py
Python
backend/ideapros_llc_home_s_32960/wsgi.py
crowdbotics-apps/ideapros-llc-home-s-32960
834b7e80e28f41ffb1275b3d657b4e92643697ca
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/ideapros_llc_home_s_32960/wsgi.py
crowdbotics-apps/ideapros-llc-home-s-32960
834b7e80e28f41ffb1275b3d657b4e92643697ca
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/ideapros_llc_home_s_32960/wsgi.py
crowdbotics-apps/ideapros-llc-home-s-32960
834b7e80e28f41ffb1275b3d657b4e92643697ca
[ "FTL", "AML", "RSA-MD" ]
null
null
null
""" WSGI config for ideapros_llc_home_s_32960 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/2.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdef...
25.117647
85
0.803279
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ideapros_llc_home_s_32960.settings') application = get_wsgi_application()
true
true
f7637b47a0cab7638f6392cab365bac321af1709
2,009
py
Python
src/bots/tower_bro.py
ForgedSnow/ScreepsPython
b57d38ad1c6bdf44bd2899a43be046c8dc8db47c
[ "MIT" ]
null
null
null
src/bots/tower_bro.py
ForgedSnow/ScreepsPython
b57d38ad1c6bdf44bd2899a43be046c8dc8db47c
[ "MIT" ]
null
null
null
src/bots/tower_bro.py
ForgedSnow/ScreepsPython
b57d38ad1c6bdf44bd2899a43be046c8dc8db47c
[ "MIT" ]
null
null
null
from defs import * __pragma__('noalias', 'name') __pragma__('noalias', 'undefined') __pragma__('noalias', 'Infinity') __pragma__('noalias', 'keys') __pragma__('noalias', 'get') __pragma__('noalias', 'set') __pragma__('noalias', 'type') __pragma__('noalias', 'update') def make_parts(max_energy): parts = [CARRY, C...
35.245614
114
0.607267
from defs import * __pragma__('noalias', 'name') __pragma__('noalias', 'undefined') __pragma__('noalias', 'Infinity') __pragma__('noalias', 'keys') __pragma__('noalias', 'get') __pragma__('noalias', 'set') __pragma__('noalias', 'type') __pragma__('noalias', 'update') def make_parts(max_energy): parts = [CARRY, C...
true
true
f7637cda304ca2560e9cd6a62e3df62ac9d2eab7
2,788
py
Python
post/coldJet/uucl_rxx0.py
BYUignite/ODT
7c320c776e50f4da5faf9e8e67161b6fa2737c24
[ "MIT" ]
6
2020-11-13T00:34:37.000Z
2022-02-16T19:06:39.000Z
post/coldJet/uucl_rxx0.py
ElsevierSoftwareX/SOFTX-D-20-00063
291d6ff9ae5813aed3135dc22525c9f0fc99282a
[ "MIT" ]
null
null
null
post/coldJet/uucl_rxx0.py
ElsevierSoftwareX/SOFTX-D-20-00063
291d6ff9ae5813aed3135dc22525c9f0fc99282a
[ "MIT" ]
5
2020-10-17T15:20:51.000Z
2021-09-04T13:27:54.000Z
#plots U/UcL vs. r/(x-x0) #plot file directory/name at end of function definition from __future__ import division import numpy as np from data_tools import get_inputFileParameter import matplotlib matplotlib.use('PDF') # or Agg (for png), SVG, PS import matplotlib.pyplot as plt from data_tools import commentHd...
43.5625
269
0.593615
from __future__ import division import numpy as np from data_tools import get_inputFileParameter import matplotlib matplotlib.use('PDF') import matplotlib.pyplot as plt from data_tools import commentHdr def uucl_rxx0(DI, profName="uvel"): cases=[] plotname="uucl_rxx0_xD" matplotlib.rcPa...
true
true
f7637daf05443578239ba7b833d49b9b5f77476f
698
py
Python
week05/affline_transformation.py
UIUC-iSchool-DataViz/spring2019online
e586cfafd90d6de38c308bf8ad072c9a4ed8485b
[ "BSD-3-Clause" ]
1
2019-08-11T04:03:24.000Z
2019-08-11T04:03:24.000Z
_site/week05/affline_transformation.py
UIUC-iSchool-DataViz/spring2019online
e586cfafd90d6de38c308bf8ad072c9a4ed8485b
[ "BSD-3-Clause" ]
1
2020-03-02T00:11:33.000Z
2020-03-02T00:11:33.000Z
_site/week05/affline_transformation.py
UIUC-iSchool-DataViz/spring2019online
e586cfafd90d6de38c308bf8ad072c9a4ed8485b
[ "BSD-3-Clause" ]
1
2020-03-09T16:13:34.000Z
2020-03-09T16:13:34.000Z
# put in the same directory as your ipynb file import math import PIL.Image as Image # we won't go through this in detail def ScaleRotateTranslate(image, angle, center = None, new_center = None, scale = None,expand=False): if center is None: return image.rotate(angle) angle = -angle/180.0*math.pi ...
26.846154
100
0.623209
import math import PIL.Image as Image def ScaleRotateTranslate(image, angle, center = None, new_center = None, scale = None,expand=False): if center is None: return image.rotate(angle) angle = -angle/180.0*math.pi nx,ny = x,y = center sx=sy=1.0 if new_center: (nx,ny) = new_center ...
true
true
f7637e5b899f9d04b30f9a33b7a7cc859625629e
5,417
py
Python
python/benbiohelpers/TkWrappers/DynamicSelector.py
bmorledge-hampton19/benbiohelpers
b4d4e93bf3b27236910dfc8b1a29276a85adc0df
[ "MIT" ]
null
null
null
python/benbiohelpers/TkWrappers/DynamicSelector.py
bmorledge-hampton19/benbiohelpers
b4d4e93bf3b27236910dfc8b1a29276a85adc0df
[ "MIT" ]
null
null
null
python/benbiohelpers/TkWrappers/DynamicSelector.py
bmorledge-hampton19/benbiohelpers
b4d4e93bf3b27236910dfc8b1a29276a85adc0df
[ "MIT" ]
null
null
null
# A Tk widget wich changes based on the state of a given "commander" widget. import tkinter as tk class DynamicSelector(tk.Frame): """ A Tk widget which changes based on the state of a given "commander" widget. """ def __init__(self, master, workingDirectory): self.workingDirectory = workin...
43.336
121
0.678051
import tkinter as tk class DynamicSelector(tk.Frame): def __init__(self, master, workingDirectory): self.workingDirectory = workingDirectory self.root = master.root super().__init__(master) self.controllerSetup = False self.controllerVar = None self.dynamicDispl...
true
true
f7637ea8790d74a65fcdec9f0370a1c3e0b4f3c5
1,139
py
Python
ascetic/contrib/versioning/registry.py
emacsway/ascetic
a9f2c10af90bfedaa3ec58589b40ef7a677cd712
[ "MIT" ]
17
2015-09-05T21:43:51.000Z
2022-03-05T13:28:15.000Z
ascetic/contrib/versioning/registry.py
emacsway/ascetic
a9f2c10af90bfedaa3ec58589b40ef7a677cd712
[ "MIT" ]
null
null
null
ascetic/contrib/versioning/registry.py
emacsway/ascetic
a9f2c10af90bfedaa3ec58589b40ef7a677cd712
[ "MIT" ]
null
null
null
from ascetic.contrib.versioning.exceptions import AlreadyRegistered, NotRegistered from ascetic.contrib.versioning.interfaces import IRegistry class Registry(IRegistry): def __init__(self): self._fields_mapping = dict() self._object_accessor_mapping = dict() def register(self, model, fields, ...
33.5
84
0.667252
from ascetic.contrib.versioning.exceptions import AlreadyRegistered, NotRegistered from ascetic.contrib.versioning.interfaces import IRegistry class Registry(IRegistry): def __init__(self): self._fields_mapping = dict() self._object_accessor_mapping = dict() def register(self, model, fields, ...
true
true
f7637ec9f17b4be392eef6d70942ef2787b35f3c
15,704
py
Python
tests/integration/test_copr_build.py
bocekm/packit
b5da23c0fa3f205537551b9ed212d8f77d00d705
[ "MIT" ]
null
null
null
tests/integration/test_copr_build.py
bocekm/packit
b5da23c0fa3f205537551b9ed212d8f77d00d705
[ "MIT" ]
null
null
null
tests/integration/test_copr_build.py
bocekm/packit
b5da23c0fa3f205537551b9ed212d8f77d00d705
[ "MIT" ]
null
null
null
# MIT License # # Copyright (c) 2020 Red Hat, Inc. # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge,...
34.820399
90
0.635507
import pytest from copr.v3 import ( ProjectProxy, Client, BuildProxy, CoprNoResultException, CoprRequestException, ) from flexmock import flexmock from munch import munchify from packit.copr_helper import CoprHelper from packit.exceptions import PackitCoprException, PackitCoprSettingsException ...
true
true
f7637efc86520a9e3874ef4cb5e6f28122e2f221
121,181
py
Python
duke-cs671-fall21-coupon-recommendation/outputs/rules/ID3/11_features/maxdepth_5/2/rules.py
apcarrik/kaggle
6e2d4db58017323e7ba5510bcc2598e01a4ee7bf
[ "MIT" ]
null
null
null
duke-cs671-fall21-coupon-recommendation/outputs/rules/ID3/11_features/maxdepth_5/2/rules.py
apcarrik/kaggle
6e2d4db58017323e7ba5510bcc2598e01a4ee7bf
[ "MIT" ]
null
null
null
duke-cs671-fall21-coupon-recommendation/outputs/rules/ID3/11_features/maxdepth_5/2/rules.py
apcarrik/kaggle
6e2d4db58017323e7ba5510bcc2598e01a4ee7bf
[ "MIT" ]
null
null
null
def findDecision(obj): #obj[0]: Passanger, obj[1]: Time, obj[2]: Coupon, obj[3]: Age, obj[4]: Education, obj[5]: Occupation, obj[6]: Bar, obj[7]: Coffeehouse, obj[8]: Restaurant20to50, obj[9]: Direction_same, obj[10]: Distance # {"feature": "Coupon", "instances": 8147, "metric_value": 0.4734, "depth": 1} if obj[2]>1:...
40.488139
226
0.48539
def findDecision(obj): if obj[2]>1: if obj[7]<=1.0: if obj[10]<=2: if obj[0]<=1: if obj[8]<=2.0: if obj[6]<=3.0: if obj[3]<=2: if obj[1]<=2: if obj[9]<=0: if obj[4]<=3: if obj[5]<=7.766891...
true
true
f76380b7485d9f8e4cdec60a419892cc53c91948
8,960
py
Python
src/seqdiag/elements.py
geekoftheweek/seqdiag
8a80bebacd4f58f41e8863fec86bfa6f2c21e946
[ "Apache-2.0" ]
null
null
null
src/seqdiag/elements.py
geekoftheweek/seqdiag
8a80bebacd4f58f41e8863fec86bfa6f2c21e946
[ "Apache-2.0" ]
null
null
null
src/seqdiag/elements.py
geekoftheweek/seqdiag
8a80bebacd4f58f41e8863fec86bfa6f2c21e946
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2011 Takeshi KOMIYA # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
28.444444
85
0.566071
import blockdiag.elements from blockdiag.utils import images, Size, XY from blockdiag.utils.logging import warning class NodeGroup(blockdiag.elements.NodeGroup): pass class DiagramNode(blockdiag.elements.DiagramNode): def __init__(self, _id): super(DiagramNode, self).__init__(_id) self.act...
true
true
f76380f5ad34fd390c08816ea0a6d70f5fafd048
2,369
py
Python
rich/jupyter.py
traviscook21/rich
eafd8569de22a2753791950710662c2b19e04d4c
[ "MIT" ]
2
2021-01-07T13:13:08.000Z
2021-04-09T11:59:53.000Z
rich/jupyter.py
traviscook21/rich
eafd8569de22a2753791950710662c2b19e04d4c
[ "MIT" ]
42
2020-12-16T07:03:59.000Z
2022-03-28T20:11:50.000Z
rich/jupyter.py
traviscook21/rich
eafd8569de22a2753791950710662c2b19e04d4c
[ "MIT" ]
1
2020-12-16T04:05:58.000Z
2020-12-16T04:05:58.000Z
from typing import Iterable, List, TYPE_CHECKING from . import get_console from .segment import Segment from .terminal_theme import DEFAULT_TERMINAL_THEME if TYPE_CHECKING: from .console import RenderableType JUPYTER_HTML_FORMAT = """\ <pre style="white-space:pre;overflow-x:auto;line-height:normal;font-family:Me...
29.6125
146
0.655551
from typing import Iterable, List, TYPE_CHECKING from . import get_console from .segment import Segment from .terminal_theme import DEFAULT_TERMINAL_THEME if TYPE_CHECKING: from .console import RenderableType JUPYTER_HTML_FORMAT = """\ <pre style="white-space:pre;overflow-x:auto;line-height:normal;font-family:Me...
true
true
f76381a314fb84fc340ffd136e9dca05a88d725c
195
py
Python
data_collection/gazette/spiders/ba_macajuba.py
kaiocp/querido-diario
86004049c6eee305e13066cf3607d30849bb099a
[ "MIT" ]
454
2018-04-07T03:32:57.000Z
2020-08-17T19:56:22.000Z
data_collection/gazette/spiders/ba_macajuba.py
kaiocp/querido-diario
86004049c6eee305e13066cf3607d30849bb099a
[ "MIT" ]
254
2020-08-18T14:09:43.000Z
2022-03-28T11:30:51.000Z
data_collection/gazette/spiders/ba_macajuba.py
kaiocp/querido-diario
86004049c6eee305e13066cf3607d30849bb099a
[ "MIT" ]
183
2018-04-11T15:09:37.000Z
2020-08-15T18:55:11.000Z
from gazette.spiders.base.doem import DoemGazetteSpider class BaMacajubaSpider(DoemGazetteSpider): TERRITORY_ID = "2919603" name = "ba_macajuba" state_city_url_part = "ba/macajuba"
24.375
55
0.769231
from gazette.spiders.base.doem import DoemGazetteSpider class BaMacajubaSpider(DoemGazetteSpider): TERRITORY_ID = "2919603" name = "ba_macajuba" state_city_url_part = "ba/macajuba"
true
true
f763822af6e5f13a5ec04a0939eedc9815e4ecd5
1,145
py
Python
setup.py
arusahni/dataclasses-json
c01a906bee95bf87d1fbad6ee5f4feca6ebca96f
[ "MIT" ]
null
null
null
setup.py
arusahni/dataclasses-json
c01a906bee95bf87d1fbad6ee5f4feca6ebca96f
[ "MIT" ]
null
null
null
setup.py
arusahni/dataclasses-json
c01a906bee95bf87d1fbad6ee5f4feca6ebca96f
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages with open('README.md', 'r', encoding='utf8') as f: readme = f.read() setup( name='dataclasses-json', version='0.5.1', packages=find_packages(exclude=('tests*',)), package_data={"dataclasses_json": ["py.typed"]}, author='lidatong', author_email='c...
21.203704
64
0.572052
from setuptools import setup, find_packages with open('README.md', 'r', encoding='utf8') as f: readme = f.read() setup( name='dataclasses-json', version='0.5.1', packages=find_packages(exclude=('tests*',)), package_data={"dataclasses_json": ["py.typed"]}, author='lidatong', author_email='c...
true
true
f763829f4001fd687bba30aeb802d6f1f9ba18ac
216
py
Python
Data Sources/COVID19/extraction.py
invest41/Studying_Reactions_to_VACCINES
a4b579cb1aa4ad5d7dde43bc93b7d99b5beaf74c
[ "CC0-1.0" ]
null
null
null
Data Sources/COVID19/extraction.py
invest41/Studying_Reactions_to_VACCINES
a4b579cb1aa4ad5d7dde43bc93b7d99b5beaf74c
[ "CC0-1.0" ]
null
null
null
Data Sources/COVID19/extraction.py
invest41/Studying_Reactions_to_VACCINES
a4b579cb1aa4ad5d7dde43bc93b7d99b5beaf74c
[ "CC0-1.0" ]
1
2021-11-28T01:26:10.000Z
2021-11-28T01:26:10.000Z
#1.0 from zipfile import ZipFile #2.0 file_name = "2021VAERSDATA.csv.zip" #3.0 with ZipFile(file_name, 'r') as zip: zip.printdir() #3.1 print('Extracting all the files now...') zip.extractall() print('Done!')
14.4
41
0.685185
from zipfile import ZipFile file_name = "2021VAERSDATA.csv.zip" with ZipFile(file_name, 'r') as zip: zip.printdir() print('Extracting all the files now...') zip.extractall() print('Done!')
true
true
f763830ae991d4a57380a23f170bf3e7b1142281
792
py
Python
services/rabbitmq/cypher.py
mrgrassho/geo-diff-2
4b89d36e247d389871d4fcd3f4df5c9a0203750f
[ "MIT" ]
null
null
null
services/rabbitmq/cypher.py
mrgrassho/geo-diff-2
4b89d36e247d389871d4fcd3f4df5c9a0203750f
[ "MIT" ]
11
2020-07-08T23:27:10.000Z
2022-02-27T07:45:57.000Z
services/rabbitmq/cypher.py
mrgrassho/geo-diff-2
4b89d36e247d389871d4fcd3f4df5c9a0203750f
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # rabbitMQ password hashing algo as laid out in: # http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/2011-May/012765.html from __future__ import print_function import base64 import os import hashlib import struct import sys # This is the password we wish to encode password = sys.argv[1] # ...
24.75
76
0.758838
from __future__ import print_function import base64 import os import hashlib import struct import sys password = sys.argv[1] salt = os.urandom(4) tmp0 = salt + password.encode('utf-8') tmp1 = hashlib.sha256(tmp0).digest() salted_hash = salt + tmp1 pass_hash = base64.b64encode(salted_hash) print(pass_hash.decod...
true
true
f76383fc3078c1dd112723dfe03d209e4a650bbf
3,842
py
Python
receiver.py
mohantyk/srd
4ca6573226edbde80ea3641f50637c53543e1edc
[ "MIT" ]
1
2022-01-02T16:05:45.000Z
2022-01-02T16:05:45.000Z
receiver.py
mohantyk/srd
4ca6573226edbde80ea3641f50637c53543e1edc
[ "MIT" ]
null
null
null
receiver.py
mohantyk/srd
4ca6573226edbde80ea3641f50637c53543e1edc
[ "MIT" ]
null
null
null
import numpy as np from scipy import signal from wavegen import cosine_wave from utilities import power #------------------------- # Helper functions def combine(iterator, num_elems): ''' Pairs up a fixed number of elements at a time ''' window = [iter(iterator)]*num_elems for combo in zip(*window): ...
29.328244
91
0.63873
import numpy as np from scipy import signal from wavegen import cosine_wave from utilities import power def combine(iterator, num_elems): window = [iter(iterator)]*num_elems for combo in zip(*window): yield combo def pam2letters(symbols): symbol_to_bits = {3: '11', 1: '10', -1: '01', -3: '00'} ...
true
true
f76386ac51bf75964637c8ddaaa498a95fdad38f
35,542
py
Python
indico/migrations/versions/20200619_1526_b6dd0a4ed40d_add_registration_form_to_event_acls.py
salevajo/indico
6f9cbabc20d1641caea907099388ae2b04965cf8
[ "MIT" ]
1
2018-11-12T21:29:26.000Z
2018-11-12T21:29:26.000Z
indico/migrations/versions/20200619_1526_b6dd0a4ed40d_add_registration_form_to_event_acls.py
salevajo/indico
6f9cbabc20d1641caea907099388ae2b04965cf8
[ "MIT" ]
9
2020-09-08T09:25:57.000Z
2022-01-13T02:59:05.000Z
indico/migrations/versions/20200619_1526_b6dd0a4ed40d_add_registration_form_to_event_acls.py
salevajo/indico
6f9cbabc20d1641caea907099388ae2b04965cf8
[ "MIT" ]
3
2020-07-20T09:09:44.000Z
2020-10-19T00:29:49.000Z
"""Add registration form to event acls Revision ID: b6dd0a4ed40d Revises: c0fc1e46888b Create Date: 2020-06-19 15:26:01.961716 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = 'b6dd0a4ed40d' down_revision = 'c0fc1e46888b' branch_labels = None depends_on = None ...
163.036697
385
0.76155
import sqlalchemy as sa from alembic import op revision = 'b6dd0a4ed40d' down_revision = 'c0fc1e46888b' branch_labels = None depends_on = None def upgrade(): op.add_column('attachment_principals', sa.Column('registration_form_id', sa.Integer()), schema='attachments') op.add_column('folder_principals', sa.C...
true
true
f76387c6487c773daa3732ec8812c763f1e8b6ae
6,129
py
Python
students/K33421/Khlestunova_Stefania/LR2/django_project_khlestunova/project_app/migrations/0001_initial.py
Stefania-K/ITMO_ICT_WebDevelopment_2021-2022
199a51566b7600f8a1d52c9bce83c363736fdfa4
[ "MIT" ]
null
null
null
students/K33421/Khlestunova_Stefania/LR2/django_project_khlestunova/project_app/migrations/0001_initial.py
Stefania-K/ITMO_ICT_WebDevelopment_2021-2022
199a51566b7600f8a1d52c9bce83c363736fdfa4
[ "MIT" ]
null
null
null
students/K33421/Khlestunova_Stefania/LR2/django_project_khlestunova/project_app/migrations/0001_initial.py
Stefania-K/ITMO_ICT_WebDevelopment_2021-2022
199a51566b7600f8a1d52c9bce83c363736fdfa4
[ "MIT" ]
null
null
null
# Generated by Django 3.2.8 on 2021-11-21 19:53 from django.conf import settings import django.contrib.auth.models import django.contrib.auth.validators from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True ...
59.504854
329
0.618372
from django.conf import settings import django.contrib.auth.models import django.contrib.auth.validators from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0012_alter...
true
true
f763882d9d63106d518020b483380194089ad0d7
2,667
py
Python
day22/day22.py
mcmathmo/Advent-of-Code-2020
06cb761d666946edd1bd06c594a64a64a40a7b2d
[ "MIT" ]
null
null
null
day22/day22.py
mcmathmo/Advent-of-Code-2020
06cb761d666946edd1bd06c594a64a64a40a7b2d
[ "MIT" ]
null
null
null
day22/day22.py
mcmathmo/Advent-of-Code-2020
06cb761d666946edd1bd06c594a64a64a40a7b2d
[ "MIT" ]
null
null
null
from time import perf_counter from collections import deque def combat(p1, p2): p1 = deque(p1) p2 = deque(p2) while p1 and p2: p1_card = p1.popleft() p2_card = p2.popleft() if p1_card > p2_card: p1.extend((p1_card, p2_card)) else: p2.extend((p2_card,...
30.655172
78
0.540682
from time import perf_counter from collections import deque def combat(p1, p2): p1 = deque(p1) p2 = deque(p2) while p1 and p2: p1_card = p1.popleft() p2_card = p2.popleft() if p1_card > p2_card: p1.extend((p1_card, p2_card)) else: p2.extend((p2_card,...
true
true
f763894d1404a9aa8995a99765b41b8f6d339d36
2,447
py
Python
IMLearn/learners/regressors/polynomial_fitting.py
luke-l7/IML.HUJI
dfa440c0c258c4049a4801c6b240f788b98d4639
[ "MIT" ]
null
null
null
IMLearn/learners/regressors/polynomial_fitting.py
luke-l7/IML.HUJI
dfa440c0c258c4049a4801c6b240f788b98d4639
[ "MIT" ]
null
null
null
IMLearn/learners/regressors/polynomial_fitting.py
luke-l7/IML.HUJI
dfa440c0c258c4049a4801c6b240f788b98d4639
[ "MIT" ]
null
null
null
from __future__ import annotations from typing import NoReturn from . import LinearRegression from ...base import BaseEstimator import numpy as np class PolynomialFitting(LinearRegression): """ Polynomial Fitting using Least Squares estimation """ def __init__(self, k: int) -> PolynomialFitting: ...
27.806818
83
0.578668
from __future__ import annotations from typing import NoReturn from . import LinearRegression from ...base import BaseEstimator import numpy as np class PolynomialFitting(LinearRegression): def __init__(self, k: int) -> PolynomialFitting: super().__init__() self._k = k def _fit(self, X: np.nd...
true
true
f763896309ba2595b242579ed4e5e9fc02734d51
405
py
Python
05_scrapy/python_03/python_03/items.py
2018-B-GR1-Python/Velasco-Yepez-Andres-David
0c017d6e5f169f31207ddec5ceffc8dd82d327eb
[ "MIT" ]
null
null
null
05_scrapy/python_03/python_03/items.py
2018-B-GR1-Python/Velasco-Yepez-Andres-David
0c017d6e5f169f31207ddec5ceffc8dd82d327eb
[ "MIT" ]
null
null
null
05_scrapy/python_03/python_03/items.py
2018-B-GR1-Python/Velasco-Yepez-Andres-David
0c017d6e5f169f31207ddec5ceffc8dd82d327eb
[ "MIT" ]
1
2019-10-21T19:27:12.000Z
2019-10-21T19:27:12.000Z
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # https://doc.scrapy.org/en/latest/topics/items.html import scrapy class Python03Item(scrapy.Item): # define the fields for your item here like: # name = scrapy.Field() pass class ProductoItem(scrapy.Item...
19.285714
52
0.676543
import scrapy class Python03Item(scrapy.Item): pass class ProductoItem(scrapy.Item): titulo = scrapy.Field() precio = scrapy.Field() link = scrapy.Field()
true
true
f7638a7def48225239054a35720fc6256195576d
35
py
Python
shopping_mall/celery_tasks/config.py
lzy00001/SHOP_CENTER
1e26b9694afc89d86f2f3db9c0b0ff1f98ab1369
[ "MIT" ]
1
2021-07-28T13:28:39.000Z
2021-07-28T13:28:39.000Z
meiduo_mall/celery_tasks/config.py
Vent-Any/meiduo_first_commit
75c5da7a29733d8135342f4cd357c67c10a40ae1
[ "MIT" ]
null
null
null
meiduo_mall/celery_tasks/config.py
Vent-Any/meiduo_first_commit
75c5da7a29733d8135342f4cd357c67c10a40ae1
[ "MIT" ]
null
null
null
broker_url = 'redis://127.0.0.1/15'
35
35
0.657143
broker_url = 'redis://127.0.0.1/15'
true
true
f7638af9ab101b09c0c0114183d7657684201226
900
py
Python
SDK/examples/cleanup.py
maxis1314/raspberry
54ec459f5b928e8f45b64a58ea859fe943bb3b1e
[ "Apache-2.0" ]
null
null
null
SDK/examples/cleanup.py
maxis1314/raspberry
54ec459f5b928e8f45b64a58ea859fe943bb3b1e
[ "Apache-2.0" ]
null
null
null
SDK/examples/cleanup.py
maxis1314/raspberry
54ec459f5b928e8f45b64a58ea859fe943bb3b1e
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2016 NXEZ.COM. # http://www.nxez.com # # Licensed under the GNU General Public 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.gnu.org/licen...
27.272727
77
0.738889
__author__ = 'Spoony' __version__ = 'version 0.0.2' __license__ = 'Copyright (c) 2016 NXEZ.COM' from sakshat import SAKSHAT import time import commands SAKS = SAKSHAT() SAKS.ledrow.off() SAKS.digital_display.off()
true
true
f7638b6baadcb504278f1eb2e88d734515d82aa2
3,937
py
Python
parlai/agents/mlb_vqa/loadstates.py
markr-fu-berlin/ParlAI
23f014c38ee502091fdd8623f5c8a6f2c3216e92
[ "BSD-3-Clause" ]
2
2020-03-22T10:18:09.000Z
2020-05-06T21:48:47.000Z
parlai/agents/mlb_vqa/loadstates.py
urvishdesai/dialogue-encoding-tasks-parlai
29743cc7b47c413c2181f68c0b7ef40a6f06a40f
[ "BSD-3-Clause" ]
1
2018-09-27T17:11:24.000Z
2018-09-27T17:11:24.000Z
parlai/agents/mlb_vqa/loadstates.py
urvishdesai/dialogue-encoding-tasks-parlai
29743cc7b47c413c2181f68c0b7ef40a6f06a40f
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. import os import numpy import torch from collections import OrderedD...
39.37
80
0.666497
import os import numpy import torch from collections import OrderedDict urls = {} urls['dictionary'] = 'http://www.cs.toronto.edu/~rkiros/models/dictionary.txt' urls['utable'] = 'http://www.cs.toronto.edu/~rkiros/models/utable.npy' urls['uni_skip'] = 'http://www.cs.toronto.edu/~rkiros/models/uni_skip.npz' def lo...
true
true
f7638ba588bb99887100e1c9f08d843ca37f8c4e
324
py
Python
YTReviewsAPI/app/api/tokens.py
porterehunley/OneReview_Data_Collection
043c5457f08c743c0cf28626f990420a0f374b87
[ "MIT" ]
1
2019-08-09T00:02:16.000Z
2019-08-09T00:02:16.000Z
YTReviewsAPI/app/api/tokens.py
porterehunley/OneReview_Data_Collection
043c5457f08c743c0cf28626f990420a0f374b87
[ "MIT" ]
44
2019-03-20T02:19:49.000Z
2021-12-13T20:09:36.000Z
YTReviewsAPI/app/api/tokens.py
porterehunley/OneReview_Data_Collection
043c5457f08c743c0cf28626f990420a0f374b87
[ "MIT" ]
null
null
null
from flask import jsonify, g from app import db from app.api import bp from app.api.auth import basic_auth @bp.route('/tokens', methods=['POST']) @basic_auth.login_required def get_token(): token = g.current_user.get_token() db.session.commit() return jsonify({'token': token}) def revoke_token(): ...
23.142857
38
0.709877
from flask import jsonify, g from app import db from app.api import bp from app.api.auth import basic_auth @bp.route('/tokens', methods=['POST']) @basic_auth.login_required def get_token(): token = g.current_user.get_token() db.session.commit() return jsonify({'token': token}) def revoke_token(): ...
true
true
f7638bb58009ff3e00eb1373f2faa5dc2f30100d
233
py
Python
detectron2/data/transforms/__init__.py
bruce1408/detectron2_modify
815df8c3cd68b1450e039fbafc27c6ab302d620b
[ "Apache-2.0" ]
707
2019-09-04T00:52:35.000Z
2022-03-31T07:46:41.000Z
detectron2/data/transforms/__init__.py
ZhanqiZhang66/detectron2
be0d7283297f6314c8e683e0d1ff80b668aa9f4a
[ "Apache-2.0" ]
89
2020-09-24T04:31:54.000Z
2022-03-31T07:46:22.000Z
detectron2/data/transforms/__init__.py
ZhanqiZhang66/detectron2
be0d7283297f6314c8e683e0d1ff80b668aa9f4a
[ "Apache-2.0" ]
149
2019-09-06T07:24:52.000Z
2022-03-22T04:55:03.000Z
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from .transform import * from fvcore.transforms.transform import * from .transform_gen import * __all__ = [k for k in globals().keys() if not k.startswith("_")]
33.285714
70
0.742489
from .transform import * from fvcore.transforms.transform import * from .transform_gen import * __all__ = [k for k in globals().keys() if not k.startswith("_")]
true
true
f7638c00b39513a058bc493ae3050c5fdce1ed64
6,769
py
Python
modules/MMM-Face-Reco-DNN/tools/facerecognition.py
sat-wik/magic-mirror
71c4ced73928179ee362f5de4b3af18047ac8921
[ "MIT" ]
null
null
null
modules/MMM-Face-Reco-DNN/tools/facerecognition.py
sat-wik/magic-mirror
71c4ced73928179ee362f5de4b3af18047ac8921
[ "MIT" ]
null
null
null
modules/MMM-Face-Reco-DNN/tools/facerecognition.py
sat-wik/magic-mirror
71c4ced73928179ee362f5de4b3af18047ac8921
[ "MIT" ]
null
null
null
# USAGE # python pi_face_recognition.py --cascade haarcascade_frontalface_default.xml --encodings encodings.pickle # import the necessary packages from imutils.video import FPS, VideoStream from datetime import datetime import face_recognition import argparse import imutils import pickle import time import cv2 import ...
32.700483
107
0.704535
from imutils.video import FPS, VideoStream from datetime import datetime import face_recognition import argparse import imutils import pickle import time import cv2 import json import sys import signal import os def printjson(type, message): print(json.dumps({type: message})) sys.stdout.flush() def signalHandler(s...
true
true
f7638c39bff252155da7adb06e54b50f885eeb9b
5,282
py
Python
trankit/adapter_transformers/data/datasets/glue.py
jsteggink/trankit
61ef593999bfa29751990d0d4bcf259daed05db4
[ "Apache-2.0" ]
613
2021-01-12T14:21:13.000Z
2022-03-29T19:51:47.000Z
trankit/adapter_transformers/data/datasets/glue.py
jsteggink/trankit
61ef593999bfa29751990d0d4bcf259daed05db4
[ "Apache-2.0" ]
38
2021-01-13T12:01:15.000Z
2022-03-31T14:13:44.000Z
trankit/adapter_transformers/data/datasets/glue.py
jsteggink/trankit
61ef593999bfa29751990d0d4bcf259daed05db4
[ "Apache-2.0" ]
77
2021-01-13T07:33:26.000Z
2022-03-29T19:51:50.000Z
import logging import os import time from dataclasses import dataclass, field from enum import Enum from typing import List, Optional, Union import torch from filelock import FileLock from torch.utils.data.dataset import Dataset from ...tokenization_roberta import RobertaTokenizer, RobertaTokenizerFast fr...
36.937063
120
0.606399
import logging import os import time from dataclasses import dataclass, field from enum import Enum from typing import List, Optional, Union import torch from filelock import FileLock from torch.utils.data.dataset import Dataset from ...tokenization_roberta import RobertaTokenizer, RobertaTokenizerFast fr...
true
true
f7638c435b3940098f4c76b03c8dec8d7db504b5
4,501
py
Python
pylasdev/las_lex_pars2.py
itohnobue/pylasdev
483d4b23c13d9ef409b1ccb39cc5355fbb75a4fc
[ "BSD-3-Clause" ]
13
2015-02-20T19:03:52.000Z
2022-03-15T17:13:59.000Z
pylasdev/las_lex_pars2.py
WildcatWell/pylasdev
483d4b23c13d9ef409b1ccb39cc5355fbb75a4fc
[ "BSD-3-Clause" ]
null
null
null
pylasdev/las_lex_pars2.py
WildcatWell/pylasdev
483d4b23c13d9ef409b1ccb39cc5355fbb75a4fc
[ "BSD-3-Clause" ]
4
2015-01-14T17:30:00.000Z
2020-02-02T20:40:11.000Z
# -*- coding: utf-8 -*- import ply.lex as lex import ply.yacc as yacc import re import numpy # This is a Lexer and Parser for LAS 1.2/2.0 files header las_info = {} gmnem_base = None las_info['version'] = {} las_info['well'] = {} las_info['parameters'] = {} las_info['logs'] = {} las_info['curves...
19.828194
137
0.546545
 import ply.lex as lex import ply.yacc as yacc import re import numpy las_info = {} gmnem_base = None las_info['version'] = {} las_info['well'] = {} las_info['parameters'] = {} las_info['logs'] = {} las_info['curves_order'] = [] tokens = ( 'SYMBOL', 'DOT', 'COLON', 'WS', 'TILD', 'SH...
false
true
f7638c91dfa57f64e066e216bd09ae840489aefb
6,676
py
Python
source/tf_process.py
YeongHyeon/Context-Encoder
30efe975a8970dca0dfa70c09c889efadf7c9c09
[ "MIT" ]
5
2020-06-29T05:37:35.000Z
2021-12-03T16:31:02.000Z
source/tf_process.py
YeongHyeon/Context-Encoder
30efe975a8970dca0dfa70c09c889efadf7c9c09
[ "MIT" ]
null
null
null
source/tf_process.py
YeongHyeon/Context-Encoder
30efe975a8970dca0dfa70c09c889efadf7c9c09
[ "MIT" ]
1
2021-03-26T10:11:55.000Z
2021-03-26T10:11:55.000Z
import os, inspect, time, math import tensorflow as tf import numpy as np import matplotlib.pyplot as plt from random import * from PIL import Image from sklearn.decomposition import PCA PACK_PATH = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))+"/.." def make_dir(path): try: os.mkdi...
33.21393
115
0.624626
import os, inspect, time, math import tensorflow as tf import numpy as np import matplotlib.pyplot as plt from random import * from PIL import Image from sklearn.decomposition import PCA PACK_PATH = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))+"/.." def make_dir(path): try: os.mkdi...
true
true
f7638e201d37de9c7bd44bf73b57db3cfc89b9fc
6,735
py
Python
saleor/payment/gateways/braintree/plugin.py
elwoodxblues/saleor
5e4e4a4259a011d24b04ebd24c77c689de843fa1
[ "CC-BY-4.0" ]
8
2018-07-17T13:13:21.000Z
2022-03-01T17:02:34.000Z
saleor/payment/gateways/braintree/plugin.py
elwoodxblues/saleor
5e4e4a4259a011d24b04ebd24c77c689de843fa1
[ "CC-BY-4.0" ]
1
2021-03-10T07:55:59.000Z
2021-03-10T07:55:59.000Z
saleor/payment/gateways/braintree/plugin.py
elwoodxblues/saleor
5e4e4a4259a011d24b04ebd24c77c689de843fa1
[ "CC-BY-4.0" ]
null
null
null
from typing import TYPE_CHECKING, List from django.utils.translation import pgettext_lazy from saleor.extensions import ConfigurationTypeField from saleor.extensions.base_plugin import BasePlugin from . import ( GatewayConfig, authorize, capture, create_form, get_client_token, list_client_sou...
35.447368
83
0.604306
from typing import TYPE_CHECKING, List from django.utils.translation import pgettext_lazy from saleor.extensions import ConfigurationTypeField from saleor.extensions.base_plugin import BasePlugin from . import ( GatewayConfig, authorize, capture, create_form, get_client_token, list_client_sou...
true
true
f7638e5bc383c6acff5a2eb0d72e85b2af44c207
1,196
py
Python
tf_explain/utils/image.py
sicara/mentat
fbcfbbe71042740f05e0b1e368bb747c8e0d10ee
[ "MIT" ]
940
2019-07-23T08:51:03.000Z
2022-03-31T08:12:14.000Z
tf_explain/utils/image.py
sicara/mentat
fbcfbbe71042740f05e0b1e368bb747c8e0d10ee
[ "MIT" ]
97
2019-07-23T07:32:18.000Z
2022-03-21T10:45:40.000Z
tf_explain/utils/image.py
sicara/mentat
fbcfbbe71042740f05e0b1e368bb747c8e0d10ee
[ "MIT" ]
102
2019-07-31T17:33:12.000Z
2022-03-06T19:06:43.000Z
""" Module for image operations """ import numpy as np import tensorflow as tf def apply_grey_patch(image, top_left_x, top_left_y, patch_size): """ Replace a part of the image with a grey patch. Args: image (numpy.ndarray): Input image top_left_x (int): Top Left X position of the applied ...
26.577778
85
0.669732
import numpy as np import tensorflow as tf def apply_grey_patch(image, top_left_x, top_left_y, patch_size): patched_image = np.array(image, copy=True) patched_image[ top_left_y : top_left_y + patch_size, top_left_x : top_left_x + patch_size, : ] = 127.5 return patched_image @tf.function def...
true
true
f763905fc1e484faccb751330d3a21585b76358a
7,212
py
Python
dmb/modeling/stereo/backbones/FC_PSMNet.py
jiaw-z/FCStereo
f76c3317e0951986b49a3bb794028a8ae067d410
[ "MIT" ]
7
2022-03-22T07:35:26.000Z
2022-03-31T01:57:44.000Z
dmb/modeling/stereo/backbones/FC_PSMNet.py
jiaw-z/FCStereo
f76c3317e0951986b49a3bb794028a8ae067d410
[ "MIT" ]
null
null
null
dmb/modeling/stereo/backbones/FC_PSMNet.py
jiaw-z/FCStereo
f76c3317e0951986b49a3bb794028a8ae067d410
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F from dmb.modeling.stereo.layers.basic_layers import conv_bn, conv_bn_relu, BasicBlock from dmb.modeling.stereo.layers.basic_layers import conv_in_relu, BasicBlock_IN class PSM_Encoder_Instance(nn.Module): """ Backbone proposed in PSMNet. A...
37.5625
102
0.6033
import torch import torch.nn as nn import torch.nn.functional as F from dmb.modeling.stereo.layers.basic_layers import conv_bn, conv_bn_relu, BasicBlock from dmb.modeling.stereo.layers.basic_layers import conv_in_relu, BasicBlock_IN class PSM_Encoder_Instance(nn.Module): def __init__(self, in_planes=3, batch_nor...
true
true
f76390940a3515ea92274262405bb59fcf2cd1d0
2,310
py
Python
3_comparison_mlp_and_rbf/rbf_net/RBFNetwork.py
Talendar/deep_learning_exercises
4c375ac478434d085b4b67b7f631d43da9f8a4a1
[ "MIT" ]
null
null
null
3_comparison_mlp_and_rbf/rbf_net/RBFNetwork.py
Talendar/deep_learning_exercises
4c375ac478434d085b4b67b7f631d43da9f8a4a1
[ "MIT" ]
null
null
null
3_comparison_mlp_and_rbf/rbf_net/RBFNetwork.py
Talendar/deep_learning_exercises
4c375ac478434d085b4b67b7f631d43da9f8a4a1
[ "MIT" ]
null
null
null
""" Implementation of a Radial Basis Function (RBF) Network. @author Gabriel Nogueira (Talendar) @author Marcel Otoboni """ from mlp.multilayer_perceptron import MultilayerPerceptron import numpy as np from sklearn.cluster import KMeans class RBFNetwork: """ Implementation of a Radial Basis Function (RBF) Netwo...
42.777778
116
0.65974
from mlp.multilayer_perceptron import MultilayerPerceptron import numpy as np from sklearn.cluster import KMeans class RBFNetwork: def __init__(self, num_output_neurons, num_clusters=8): self._num_clusters = num_clusters self._kmeans = None self._mlp = MultilayerPerceptron(num_clusters, ...
true
true
f76393b04c4eca590f51e2e26126536b11d54d6f
1,779
py
Python
tests/integration/test_create_from_full_info.py
superannotateai/superannotate-python-sdk
e2ce848b61efed608265fa64f3781fd5a17c929b
[ "MIT" ]
26
2020-09-25T06:25:06.000Z
2022-01-30T16:44:07.000Z
tests/integration/test_create_from_full_info.py
superannotateai/superannotate-python-sdk
e2ce848b61efed608265fa64f3781fd5a17c929b
[ "MIT" ]
12
2020-12-21T19:59:48.000Z
2022-01-21T10:32:07.000Z
tests/integration/test_create_from_full_info.py
superannotateai/superannotate-python-sdk
e2ce848b61efed608265fa64f3781fd5a17c929b
[ "MIT" ]
11
2020-09-17T13:39:19.000Z
2022-03-02T18:12:29.000Z
import os from os.path import dirname from unittest import TestCase import src.superannotate as sa class TestCloneProject(TestCase): PROJECT_NAME_1 = "test create from full info1" PROJECT_NAME_2 = "test create from full info2" PROJECT_DESCRIPTION = "desc" PROJECT_TYPE = "Vector" TEST_FOLDER_PATH...
37.0625
109
0.720067
import os from os.path import dirname from unittest import TestCase import src.superannotate as sa class TestCloneProject(TestCase): PROJECT_NAME_1 = "test create from full info1" PROJECT_NAME_2 = "test create from full info2" PROJECT_DESCRIPTION = "desc" PROJECT_TYPE = "Vector" TEST_FOLDER_PATH...
true
true
f763940733dde9cf76d68317d0f49c37fd6a3562
1,678
py
Python
tests/logreceivers/test_redis_logging.py
zillionare/zeta
e537ce4bad34bde3f5135c65fa309cb4ebb1b83f
[ "MIT" ]
null
null
null
tests/logreceivers/test_redis_logging.py
zillionare/zeta
e537ce4bad34bde3f5135c65fa309cb4ebb1b83f
[ "MIT" ]
null
null
null
tests/logreceivers/test_redis_logging.py
zillionare/zeta
e537ce4bad34bde3f5135c65fa309cb4ebb1b83f
[ "MIT" ]
null
null
null
import asyncio import logging import os import shutil import unittest import rlog from omega.logreceivers.redis import RedisLogReceiver from tests import init_test_env class TestRedisLogging(unittest.IsolatedAsyncioTestCase): async def asyncSetUp(self) -> None: self.cfg = init_test_env() async def ...
30.509091
104
0.604291
import asyncio import logging import os import shutil import unittest import rlog from omega.logreceivers.redis import RedisLogReceiver from tests import init_test_env class TestRedisLogging(unittest.IsolatedAsyncioTestCase): async def asyncSetUp(self) -> None: self.cfg = init_test_env() async def ...
true
true
f76394b5e5ddb0e4c9bdb870490f2f0b6c1f179a
489
py
Python
Outros/sequencecount.py
BlackDereker/Universidade
bfd96689df0aab0905ddcc7ef6fff2098f838e51
[ "MIT" ]
1
2018-02-27T11:47:34.000Z
2018-02-27T11:47:34.000Z
Outros/sequencecount.py
BlackDereker/Universidade
bfd96689df0aab0905ddcc7ef6fff2098f838e51
[ "MIT" ]
null
null
null
Outros/sequencecount.py
BlackDereker/Universidade
bfd96689df0aab0905ddcc7ef6fff2098f838e51
[ "MIT" ]
null
null
null
text = input("Texto: ") sequence = input("Sequencia: ") count = 0 for word in text.split(): temp = "" sequenceIndex = 0 for i in range(len(word)): if word[i] == sequence[sequenceIndex]: sequenceIndex += 1 temp += word[i] if temp == sequence: coun...
23.285714
64
0.482618
text = input("Texto: ") sequence = input("Sequencia: ") count = 0 for word in text.split(): temp = "" sequenceIndex = 0 for i in range(len(word)): if word[i] == sequence[sequenceIndex]: sequenceIndex += 1 temp += word[i] if temp == sequence: coun...
true
true
f763957b3f97500894ab429e8de7a6bdbe92ca12
6,780
py
Python
tools/tensorflow_docs/api_generator/public_api.py
brijeshchauhan12/docs
1b2f3ee2647d600f2b7b4140cf907787abc31d6c
[ "Apache-2.0" ]
3
2020-01-28T11:36:06.000Z
2020-01-28T12:15:04.000Z
tools/tensorflow_docs/api_generator/public_api.py
brijeshchauhan12/docs
1b2f3ee2647d600f2b7b4140cf907787abc31d6c
[ "Apache-2.0" ]
2
2020-03-21T20:21:57.000Z
2020-03-21T20:22:11.000Z
tools/tensorflow_docs/api_generator/public_api.py
brijeshchauhan12/docs
1b2f3ee2647d600f2b7b4140cf907787abc31d6c
[ "Apache-2.0" ]
1
2020-03-04T00:12:25.000Z
2020-03-04T00:12:25.000Z
# Lint as: python3 # Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
33.9
80
0.673451
import inspect from tensorflow_docs.api_generator import doc_controls import typing _TYPING = frozenset(id(value) for value in typing.__dict__.values()) def ignore_typing(path, parent, children): del path del parent children = [ (name, value) for (name, value) in children if id(value) not in _TYPING ...
true
true
f76396fc772352a8863d1b3fc7802072e760ff2f
5,090
py
Python
tests/test_static_remote/S3MockedForStaticTest.py
Maarten0110/snakemake
ccddf98521774bb7a6662c3a0b0b8dcf6e8a31de
[ "MIT" ]
null
null
null
tests/test_static_remote/S3MockedForStaticTest.py
Maarten0110/snakemake
ccddf98521774bb7a6662c3a0b0b8dcf6e8a31de
[ "MIT" ]
null
null
null
tests/test_static_remote/S3MockedForStaticTest.py
Maarten0110/snakemake
ccddf98521774bb7a6662c3a0b0b8dcf6e8a31de
[ "MIT" ]
null
null
null
__author__ = "Christopher Tomkins-Tinch" __copyright__ = "Copyright 2022, Christopher Tomkins-Tinch" __email__ = "tomkinsc@broadinstitute.org" __license__ = "MIT" # built-ins import os, sys from contextlib import contextmanager import pickle import time import threading import functools # intra-module from snakemake....
31.419753
88
0.649509
__author__ = "Christopher Tomkins-Tinch" __copyright__ = "Copyright 2022, Christopher Tomkins-Tinch" __email__ = "tomkinsc@broadinstitute.org" __license__ = "MIT" import os, sys from contextlib import contextmanager import pickle import time import threading import functools from snakemake.remote.S3 import ( Remo...
true
true
f76397e43f54c7c7a4c13e4029925f785d9d5f31
2,681
py
Python
mlprodict/onnxrt/doc/nb_helper.py
henrywu2019/mlprodict
4c09dc39d5ba7a7235fa321d80c81b5bf4f078ad
[ "MIT" ]
null
null
null
mlprodict/onnxrt/doc/nb_helper.py
henrywu2019/mlprodict
4c09dc39d5ba7a7235fa321d80c81b5bf4f078ad
[ "MIT" ]
null
null
null
mlprodict/onnxrt/doc/nb_helper.py
henrywu2019/mlprodict
4c09dc39d5ba7a7235fa321d80c81b5bf4f078ad
[ "MIT" ]
null
null
null
""" @file @brief Helpers for notebooks. """ from IPython.core.magic import magics_class, line_magic from jyquickhelper import RenderJsDot from pyquickhelper.ipythonhelper import MagicCommandParser, MagicClassWithHelpers from pyquickhelper.cli.cli_helper import create_cli_parser from ..onnx_inference import OnnxInferenc...
30.816092
81
0.643044
from IPython.core.magic import magics_class, line_magic from jyquickhelper import RenderJsDot from pyquickhelper.ipythonhelper import MagicCommandParser, MagicClassWithHelpers from pyquickhelper.cli.cli_helper import create_cli_parser from ..onnx_inference import OnnxInference def onnxview(graph, recursive=False, loc...
true
true
f763992894e6c8c8ff5c2ae174609a94847a5c10
1,345
py
Python
example/optimade_api_poscar_collection/convert_to_poscar.py
kdmsit/qmpy_rester
fe9b4d7053b68a943fa3eb9367a95220a631e3d0
[ "MIT" ]
9
2019-06-01T01:36:10.000Z
2022-01-17T19:12:32.000Z
example/optimade_api_poscar_collection/convert_to_poscar.py
kdmsit/qmpy_rester
fe9b4d7053b68a943fa3eb9367a95220a631e3d0
[ "MIT" ]
11
2019-06-26T17:49:10.000Z
2021-12-30T11:03:55.000Z
example/optimade_api_poscar_collection/convert_to_poscar.py
kdmsit/qmpy_rester
fe9b4d7053b68a943fa3eb9367a95220a631e3d0
[ "MIT" ]
6
2019-07-04T05:17:13.000Z
2021-12-06T01:44:16.000Z
import json import os import glob if not os.path.exists('poscars'): os.mkdir('poscars') def write_poscar(data, output): oqmd_id = data['_oqmd_entry_id'] atoms = {} for s in data['_oqmd_sites']: ele = s.strip().split('@')[0].strip() pos = s.strip().split('@')[1].strip() if ele...
25.377358
83
0.522677
import json import os import glob if not os.path.exists('poscars'): os.mkdir('poscars') def write_poscar(data, output): oqmd_id = data['_oqmd_entry_id'] atoms = {} for s in data['_oqmd_sites']: ele = s.strip().split('@')[0].strip() pos = s.strip().split('@')[1].strip() if ele...
true
true
f7639b27eccebca8b7b8777b43cef3efbac0cb11
150
py
Python
rllib/util/losses/__init__.py
sebimarkgraf/rllib
a00052ae735f4f7160055ebb42c83f69486df948
[ "MIT" ]
null
null
null
rllib/util/losses/__init__.py
sebimarkgraf/rllib
a00052ae735f4f7160055ebb42c83f69486df948
[ "MIT" ]
null
null
null
rllib/util/losses/__init__.py
sebimarkgraf/rllib
a00052ae735f4f7160055ebb42c83f69486df948
[ "MIT" ]
null
null
null
"""Losses utilities used in algorithms.""" from .entropy_loss import EntropyLoss from .kl_loss import KLLoss from .pathwise_loss import PathwiseLoss
25
42
0.813333
from .entropy_loss import EntropyLoss from .kl_loss import KLLoss from .pathwise_loss import PathwiseLoss
true
true
f7639b77d4281ae4619afdb9039b4c8317f9df8d
2,586
py
Python
units/energies.py
Impre-visible/UltimateConverter
b5a9775a4f21d06d914589679e12653157ae5652
[ "MIT" ]
1
2022-02-08T05:29:57.000Z
2022-02-08T05:29:57.000Z
units/energies.py
Impre-visible/UltimateConverter
b5a9775a4f21d06d914589679e12653157ae5652
[ "MIT" ]
null
null
null
units/energies.py
Impre-visible/UltimateConverter
b5a9775a4f21d06d914589679e12653157ae5652
[ "MIT" ]
null
null
null
from time import * from base import * def convert(): print("\n"+f"""\ {CRed}Valeur à convertir{CEnd} """) energies = float(input(cmdline)) energiesChoices(energies) def energiesChoices(quantity): print("\n"+f"""\ {CRed}Unité de vitesses de base \n ...
35.424658
74
0.564192
from time import * from base import * def convert(): print("\n"+f"""\ {CRed}Valeur à convertir{CEnd} """) energies = float(input(cmdline)) energiesChoices(energies) def energiesChoices(quantity): print("\n"+f"""\ {CRed}Unité de vitesses de base \n ...
true
true
f7639c57bd9dd40e8ae337e51dd3a9f933ed4cb9
1,392
py
Python
ROS/src/object_detection/src/QR/zbar-0.10/setup.py
nicolasiscoding/IEEEOpenCV2016
081203024b133f223d78e7c75e4f9e26836ce0ef
[ "MIT" ]
2
2016-03-12T22:18:12.000Z
2018-10-13T17:49:31.000Z
ROS/src/object_detection/src/QR/zbar-0.10/setup.py
nicolasiscoding/IEEEOpenCV2016
081203024b133f223d78e7c75e4f9e26836ce0ef
[ "MIT" ]
2
2015-04-17T06:37:55.000Z
2015-05-28T06:17:43.000Z
ROS/src/object_detection/src/QR/zbar-0.10/setup.py
nicolasiscoding/IEEEOpenCV2016
081203024b133f223d78e7c75e4f9e26836ce0ef
[ "MIT" ]
null
null
null
#!/usr/bin/env python from distutils.core import setup, Extension setup( name = 'zbar', version = '0.10', author = 'Jeff Brown', author_email = 'spadix@users.sourceforge.net', url = 'http://zbar.sourceforge.net', description = 'read barcodes from images or video', license = 'LGPL', long...
30.933333
89
0.50431
from distutils.core import setup, Extension setup( name = 'zbar', version = '0.10', author = 'Jeff Brown', author_email = 'spadix@users.sourceforge.net', url = 'http://zbar.sourceforge.net', description = 'read barcodes from images or video', license = 'LGPL', long_description = open('R...
true
true
f7639c6229b8d29dfd2141ec52ff0c64883adbe2
2,502
py
Python
venv/Lib/site-packages/pybtex/markup/__init__.py
PeerHerholz/guideline_jupyter_book
ce445e4be0d53370b67708a22550565b90d71ac6
[ "BSD-3-Clause" ]
2
2021-02-16T16:17:07.000Z
2021-11-08T20:27:13.000Z
venv/Lib/site-packages/pybtex/markup/__init__.py
PeerHerholz/guideline_jupyter_book
ce445e4be0d53370b67708a22550565b90d71ac6
[ "BSD-3-Clause" ]
null
null
null
venv/Lib/site-packages/pybtex/markup/__init__.py
PeerHerholz/guideline_jupyter_book
ce445e4be0d53370b67708a22550565b90d71ac6
[ "BSD-3-Clause" ]
4
2020-11-14T17:05:36.000Z
2020-11-16T18:44:54.000Z
from __future__ import unicode_literals # Copyright (c) 2006-2019 Andrey Golovigin # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the r...
39.09375
73
0.648681
from __future__ import unicode_literals from pybtex.scanner import Scanner, Literal, PybtexSyntaxError from pybtex.richtext import String, Text, Protected class LaTeXParser(Scanner): LBRACE = Literal(u'{') RBRACE = Literal(u'}') def parse(self, level=0): return Text(*self.iter_string_parts(lev...
true
true
f7639dd29d731a54833d20de1ef4ab3c4cecc5fc
456
py
Python
homedisplay/control_milight/migrations/0014_auto_20160330_1449.py
ojarva/home-info-display
873d022308732baff94d0dc2381cf9dc7dce23b7
[ "BSD-3-Clause" ]
1
2016-11-28T04:35:06.000Z
2016-11-28T04:35:06.000Z
homedisplay/control_milight/migrations/0014_auto_20160330_1449.py
ojarva/home-info-display
873d022308732baff94d0dc2381cf9dc7dce23b7
[ "BSD-3-Clause" ]
160
2015-01-01T20:59:29.000Z
2016-04-25T13:36:52.000Z
homedisplay/control_milight/migrations/0014_auto_20160330_1449.py
ojarva/home-info-display
873d022308732baff94d0dc2381cf9dc7dce23b7
[ "BSD-3-Clause" ]
1
2015-02-25T21:24:01.000Z
2015-02-25T21:24:01.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-03-30 11:49 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('control_milight', '0013_lightgroup_on_until_task'), ] operations = [ migrations.Dele...
20.727273
61
0.618421
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('control_milight', '0013_lightgroup_on_until_task'), ] operations = [ migrations.DeleteModel( name='LightAutomation', ), migratio...
true
true
f7639eae98d06da8aab07b6f2545abe7c72cc2fb
2,490
py
Python
yotta/version.py
microbit-foundation/yotta
82d854b43d391abb5a006b05e7beffe7d0d6ffbf
[ "Apache-2.0" ]
176
2015-01-02T07:31:59.000Z
2022-03-21T12:40:02.000Z
yotta/version.py
microbit-foundation/yotta
82d854b43d391abb5a006b05e7beffe7d0d6ffbf
[ "Apache-2.0" ]
549
2015-01-05T16:19:54.000Z
2021-01-15T13:46:42.000Z
yotta/version.py
microbit-foundation/yotta
82d854b43d391abb5a006b05e7beffe7d0d6ffbf
[ "Apache-2.0" ]
84
2015-01-10T21:01:00.000Z
2022-03-24T16:04:42.000Z
# Copyright 2014 ARM Limited # # Licensed under the Apache License, Version 2.0 # See LICENSE file for details. # standard library modules, , , import argparse import logging import os # version, , represent versions and specifications, internal from yotta.lib import version # Component, , represents an installed com...
30
105
0.586345
import argparse import logging import os from yotta.lib import version from yotta.lib import component from yotta.lib import target from yotta.lib import vcs def addOptions(parser): def patchType(s): if s.lower() in ('major', 'minor', 'patch'): return s.lower() try: return...
true
true
f7639fdeeb42c584d5b8d4e027c8be9ddad9ed1b
2,306
py
Python
android_resources_checker/app.py
fabiocarballo/android-resources-checker
b4c35ab14789599775423bf4519b7348e0d1ce9b
[ "MIT" ]
40
2021-03-29T18:19:49.000Z
2022-01-07T18:34:52.000Z
android_resources_checker/app.py
fabiocarballo/android-resources-checker
b4c35ab14789599775423bf4519b7348e0d1ce9b
[ "MIT" ]
6
2021-03-31T13:52:41.000Z
2021-11-11T19:56:23.000Z
android_resources_checker/app.py
fabiocarballo/android-resources-checker
b4c35ab14789599775423bf4519b7348e0d1ce9b
[ "MIT" ]
3
2021-04-10T05:11:50.000Z
2021-09-01T23:03:55.000Z
import sys from rich.console import Console from android_resources_checker.validator import UnusedResourcesException class Application(object): def __init__( self, resources_fetcher, resources_modifier, analyzer, reporter, validator ): self.resources_fetcher = resources_fetcher self....
36.03125
84
0.636167
import sys from rich.console import Console from android_resources_checker.validator import UnusedResourcesException class Application(object): def __init__( self, resources_fetcher, resources_modifier, analyzer, reporter, validator ): self.resources_fetcher = resources_fetcher self....
true
true
f7639fdfd1c81876235b0d816ccef91c2a2888bb
903
py
Python
spellingcorrector/utils/count.py
NazcaLines/spelling-corrector
ae315a3988e94ee46f60ff4ac7d2ee7609ebc24b
[ "MIT" ]
null
null
null
spellingcorrector/utils/count.py
NazcaLines/spelling-corrector
ae315a3988e94ee46f60ff4ac7d2ee7609ebc24b
[ "MIT" ]
null
null
null
spellingcorrector/utils/count.py
NazcaLines/spelling-corrector
ae315a3988e94ee46f60ff4ac7d2ee7609ebc24b
[ "MIT" ]
null
null
null
import os import functools CORPUS_DIR = str(os.getcwd())[:str(os.getcwd()).index('spellingcorrector/')] \ + 'data/corpus.txt' NWORD = {} def checkCorpus(fn): @functools.wraps(fn) def new_func(*args, **kwargs): t = os.path.isfile(CORPUS_DIR) if t == False: raise IOEr...
19.630435
78
0.572536
import os import functools CORPUS_DIR = str(os.getcwd())[:str(os.getcwd()).index('spellingcorrector/')] \ + 'data/corpus.txt' NWORD = {} def checkCorpus(fn): @functools.wraps(fn) def new_func(*args, **kwargs): t = os.path.isfile(CORPUS_DIR) if t == False: raise IOEr...
false
true
f7639ff77e37dee591996763f64726117774f9cb
370
py
Python
plugin_example/plugin.py
nlaurance/fasture
f666dcbc6c1cac4a1638d969fc1f005fbcae2156
[ "MIT" ]
null
null
null
plugin_example/plugin.py
nlaurance/fasture
f666dcbc6c1cac4a1638d969fc1f005fbcae2156
[ "MIT" ]
null
null
null
plugin_example/plugin.py
nlaurance/fasture
f666dcbc6c1cac4a1638d969fc1f005fbcae2156
[ "MIT" ]
null
null
null
from fasture import specs import time def some_func(one, two): """This takes time to compute""" time.sleep(25) return one + two @specs.fasture_job_impl def fasture_job(json_payload: dict) -> dict: """Show this as summary in openAPI and the rest as long description """ # some validation ...
19.473684
44
0.675676
from fasture import specs import time def some_func(one, two): time.sleep(25) return one + two @specs.fasture_job_impl def fasture_job(json_payload: dict) -> dict: res = some_func(**json_payload) return res
true
true
f763a075ca0d75a67e4baebdc0e81a5a75407c9b
268
py
Python
spikes/pytest/testdata/example/stderr_test.py
sjansen/mecha
2bcfb2eb54052038b0566754c55e6173fcb52d24
[ "Apache-2.0" ]
3
2019-01-04T20:32:33.000Z
2020-02-20T00:46:12.000Z
spikes/pytest/testdata/example/stderr_test.py
sjansen/mecha
2bcfb2eb54052038b0566754c55e6173fcb52d24
[ "Apache-2.0" ]
null
null
null
spikes/pytest/testdata/example/stderr_test.py
sjansen/mecha
2bcfb2eb54052038b0566754c55e6173fcb52d24
[ "Apache-2.0" ]
null
null
null
from sys import stderr from time import sleep stderr.write("loading... ") def test__stderr__1(): sleep(0.25) stderr.write("Spoon!\n") def test__stderr__2(): sleep(0.25) stderr.write("Kilroy was here.\n") assert False stderr.write("done\n")
13.4
38
0.660448
from sys import stderr from time import sleep stderr.write("loading... ") def test__stderr__1(): sleep(0.25) stderr.write("Spoon!\n") def test__stderr__2(): sleep(0.25) stderr.write("Kilroy was here.\n") assert False stderr.write("done\n")
true
true
f763a2c67c63a0f3557d0a253fb3ab19d8a8b96c
7,298
py
Python
facets_atlasmaker/montage.py
winnerineast/facets
32c2f6ef6d4c74df04dc91859c186bc06be51c2e
[ "Apache-2.0" ]
7,209
2017-07-07T14:53:43.000Z
2022-03-30T19:47:56.000Z
facets_atlasmaker/montage.py
winnerineast/facets
32c2f6ef6d4c74df04dc91859c186bc06be51c2e
[ "Apache-2.0" ]
188
2017-07-10T14:27:59.000Z
2021-12-28T12:41:50.000Z
facets_atlasmaker/montage.py
winnerineast/facets
32c2f6ef6d4c74df04dc91859c186bc06be51c2e
[ "Apache-2.0" ]
935
2017-07-10T18:52:50.000Z
2022-03-25T01:55:08.000Z
"""Utilities to combine converted images into atlas and to create manifest.""" import math import os from absl import logging from PIL import Image # Manifest Key names MANIFEST_IMAGE_NAME_KEY = 'image_name' MANIFEST_SOURCE_IMAGE_KEY = 'source_image' MANIFEST_OFFSET_X_KEY = 'offset_x' MANIFEST_OFFSET_Y_KEY = 'offset_...
35.427184
80
0.683201
import math import os from absl import logging from PIL import Image MANIFEST_IMAGE_NAME_KEY = 'image_name' MANIFEST_SOURCE_IMAGE_KEY = 'source_image' MANIFEST_OFFSET_X_KEY = 'offset_x' MANIFEST_OFFSET_Y_KEY = 'offset_y' MANIFEST_IMAGE_FAIL_KEY = 'errors' class SpriteAtlasSettings(object): def __init__(self, img...
true
true
f763a339a49ceac3f97008705d7bfbb0c4447b83
574
py
Python
src/my_examples_pkg/scripts/simple_service_server.py
euivmar/pruebasROS
97954e87eb2400a42b997ed9b38f1ee2bf282b69
[ "MIT" ]
null
null
null
src/my_examples_pkg/scripts/simple_service_server.py
euivmar/pruebasROS
97954e87eb2400a42b997ed9b38f1ee2bf282b69
[ "MIT" ]
null
null
null
src/my_examples_pkg/scripts/simple_service_server.py
euivmar/pruebasROS
97954e87eb2400a42b997ed9b38f1ee2bf282b69
[ "MIT" ]
null
null
null
#! /usr/bin/env python import rospy from std_srvs.srv import Empty, EmptyResponse # you import the service message python classes generated from Empty.srv. def my_callback(request): print("My_callback has been called") return EmptyResponse() # the service Response class, in this case EmptyResponse #retur...
41
127
0.773519
import rospy from std_srvs.srv import Empty, EmptyResponse def my_callback(request): print("My_callback has been called") return EmptyResponse() rospy.init_node('service_server') my_service = rospy.Service('/my_service', Empty , my_callback) rospy.spin()
true
true
f763a405340bcd5cedd5523402a5e800fcde481d
27,148
py
Python
dcos/marathon.py
dirkjonker/dcos-python
33fbb12ca825cd590cb567193e7a4b31ad451b02
[ "Apache-2.0" ]
1
2019-06-27T13:15:15.000Z
2019-06-27T13:15:15.000Z
dcos/marathon.py
dirkjonker/dcos-python
33fbb12ca825cd590cb567193e7a4b31ad451b02
[ "Apache-2.0" ]
1
2019-07-17T08:17:42.000Z
2019-07-17T08:30:25.000Z
dcos/marathon.py
dirkjonker/dcos-python
33fbb12ca825cd590cb567193e7a4b31ad451b02
[ "Apache-2.0" ]
null
null
null
import json from six.moves import urllib from dcos import config, http, rpcclient, util from dcos.errors import DCOSException, DCOSHTTPException logger = util.get_logger(__name__) def create_client(toml_config=None): """Creates a Marathon client with the supplied configuration. :param toml_config: configu...
32.204033
79
0.599418
import json from six.moves import urllib from dcos import config, http, rpcclient, util from dcos.errors import DCOSException, DCOSHTTPException logger = util.get_logger(__name__) def create_client(toml_config=None): if toml_config is None: toml_config = config.get_config() marathon_url = _get_ma...
true
true
f763a59fde923e7ac78fb299eeb61cf4f9d9afdf
986
py
Python
var/spack/repos/builtin/packages/mpe2/package.py
jeanbez/spack
f4e51ce8f366c85bf5aa0eafe078677b42dae1ba
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/mpe2/package.py
jeanbez/spack
f4e51ce8f366c85bf5aa0eafe078677b42dae1ba
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
8
2021-11-09T20:28:40.000Z
2022-03-15T03:26:33.000Z
var/spack/repos/builtin/packages/mpe2/package.py
jeanbez/spack
f4e51ce8f366c85bf5aa0eafe078677b42dae1ba
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2019-02-08T20:37:20.000Z
2019-03-31T15:19:26.000Z
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack.package import * class Mpe2(AutotoolsPackage): """Message Passing Extensions (MPE): Parallel, shared X wi...
29
95
0.670385
from spack.package import * class Mpe2(AutotoolsPackage): homepage = "https://www.mcs.anl.gov/research/projects/perfvis/software/MPE/" url = "https://ftp.mcs.anl.gov/pub/mpi/mpe/mpe2-1.3.0.tar.gz" version('1.3.0', sha256='0faf32f9adab6fd882be30be913089ebf75272f8b5e4a012bb20c54abc21c0be') patc...
true
true
f763a5ba0e4928b374640fc1556b9e5f12da2117
569
py
Python
messenger/urls.py
lautarianoo/django_social_network
ec83af7267f830a2463cb591138dae1a088f9a4e
[ "BSD-3-Clause" ]
3
2021-11-21T20:46:00.000Z
2021-12-02T14:47:18.000Z
messenger/urls.py
lautarianoo/django_social_network
ec83af7267f830a2463cb591138dae1a088f9a4e
[ "BSD-3-Clause" ]
null
null
null
messenger/urls.py
lautarianoo/django_social_network
ec83af7267f830a2463cb591138dae1a088f9a4e
[ "BSD-3-Clause" ]
null
null
null
from django.urls import path from .views import * urlpatterns = [ path('', AllMessages.as_view(), name='messages'), path('im', RoomView.as_view(), name='room_view'), path('seroo', SearchRoom.as_view(), name='searching-room'), path('dialog-add/<str:username>/', DialogAddView.as_view(), name='add-dialog'...
47.416667
93
0.692443
from django.urls import path from .views import * urlpatterns = [ path('', AllMessages.as_view(), name='messages'), path('im', RoomView.as_view(), name='room_view'), path('seroo', SearchRoom.as_view(), name='searching-room'), path('dialog-add/<str:username>/', DialogAddView.as_view(), name='add-dialog'...
true
true
f763a65648da370f6d5d29a962446391ab3531af
1,184
py
Python
mhclovac/config.py
stefs304/mhclovac
efd8e0e228cb377ab080848ddcd1295af992006c
[ "MIT" ]
5
2018-12-07T12:53:43.000Z
2021-09-24T00:03:16.000Z
mhclovac/config.py
stefs304/mhclovac
efd8e0e228cb377ab080848ddcd1295af992006c
[ "MIT" ]
5
2020-04-15T19:24:08.000Z
2022-01-13T03:33:32.000Z
mhclovac/config.py
stefs304/mhclovac
efd8e0e228cb377ab080848ddcd1295af992006c
[ "MIT" ]
null
null
null
""" ROSM880102 - Side chain hydropathy, corrected for solvation (Roseman, 1988) - 0.28197135416666663 ZIMJ680104 - Isoelectric point (Zimmerman et al., 1968) - 0.2740677083333333 OOBM770104 - Average non-bonded energy per residue (Oobatake-Ooi, 1977) - 0.24981510416666666 SNEP660101 - Principal component I (Sneath, 196...
53.818182
175
0.77027
class Config: INDEX_ID_LIST = ['ROSM880102', 'ZIMJ680104', 'OOBM770104', 'SNEP660101', 'ROBB760111', 'CHAM830102', 'RACS820104', 'WERD780103', 'KARS160120'] SIGMA = 0.8 OVERLAP_DISTANCE = 1 N_DISCRETE_POINTS = 10
true
true
f763a65868fc20b564394b58f8f64530410fc024
5,115
py
Python
racelines/reInvent2019_track-1000-4-2019-11-09-113228.py
dungviettran89/deepracer-k1999-race-lines
dc7d16cf9ce84f1bdeb7d036df9c852850eabeca
[ "MIT" ]
73
2019-10-12T06:50:13.000Z
2022-03-31T01:45:48.000Z
racelines/reInvent2019_track-1000-4-2019-11-09-113228.py
monocipher/deepracer-k1999-race-lines
118e7bca07a2a2b2c9daa90948c7f975d9311e93
[ "MIT" ]
1
2019-11-09T09:02:45.000Z
2019-11-12T03:22:19.000Z
racelines/reInvent2019_track-1000-4-2019-11-09-113228.py
monocipher/deepracer-k1999-race-lines
118e7bca07a2a2b2c9daa90948c7f975d9311e93
[ "MIT" ]
53
2019-10-31T07:42:04.000Z
2022-03-31T07:18:52.000Z
array([[0.63069109, 2.80611932], [0.63367125, 2.69079621], [0.6467188 , 2.57569291], [0.66972231, 2.46183988], [0.70251506, 2.35022569], [0.74487589, 2.24177514], [0.79652923, 2.1373277 ], [0.85714459, 2.03761659], [0.92633571, 1.94324872], [1.00365975, 1.8...
33
33
0.538221
array([[0.63069109, 2.80611932], [0.63367125, 2.69079621], [0.6467188 , 2.57569291], [0.66972231, 2.46183988], [0.70251506, 2.35022569], [0.74487589, 2.24177514], [0.79652923, 2.1373277 ], [0.85714459, 2.03761659], [0.92633571, 1.94324872], [1.00365975, 1.8...
true
true
f763a6d9ba3aa0a9fda3ed16c01f39993c085b74
16,342
py
Python
mycroft/client/speech/hotword_factory.py
damorosodaragona/mycroft-core
367542b5504c4ab3c9e5c46e3c8e3b150c01d3d0
[ "Apache-2.0" ]
null
null
null
mycroft/client/speech/hotword_factory.py
damorosodaragona/mycroft-core
367542b5504c4ab3c9e5c46e3c8e3b150c01d3d0
[ "Apache-2.0" ]
null
null
null
mycroft/client/speech/hotword_factory.py
damorosodaragona/mycroft-core
367542b5504c4ab3c9e5c46e3c8e3b150c01d3d0
[ "Apache-2.0" ]
2
2020-09-28T01:38:34.000Z
2020-12-03T03:14:32.000Z
# Copyright 2017 Mycroft AI Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
36.154867
78
0.615408
from time import time, sleep import os import platform import posixpath import struct import sys import tempfile import requests from contextlib import suppress from glob import glob from os.path import dirname, exists, join, abspath, expanduser, isfile, isdir from shutil import rmtree from threading import Timer, Thre...
true
true
f763a7918a826db30a7ff613001540deb00f4f87
383,997
py
Python
uiautomation/uiautomation.py
spacegithub/Python-UIAutomation-for-Windows
555fcadd05599b39ebc226fdce109f173bcbcb53
[ "Apache-2.0" ]
null
null
null
uiautomation/uiautomation.py
spacegithub/Python-UIAutomation-for-Windows
555fcadd05599b39ebc226fdce109f173bcbcb53
[ "Apache-2.0" ]
null
null
null
uiautomation/uiautomation.py
spacegithub/Python-UIAutomation-for-Windows
555fcadd05599b39ebc226fdce109f173bcbcb53
[ "Apache-2.0" ]
null
null
null
#!python3 # -*- coding: utf-8 -*- """ uiautomation for Python 3. Author: yinkaisheng@live.com Source: https://github.com/yinkaisheng/Python-UIAutomation-for-Windows This module is for UIAutomation on Windows(Windows XP with SP3, Windows Vista and Windows 7/8/8.1/10). It supports UIAutomation for the applications which...
45.043636
300
0.664971
import os import sys import time import datetime import re import threading import ctypes import ctypes.wintypes import comtypes import comtypes.client from typing import (Any, Callable, Dict, List, Iterable, Tuple) TreeNode = Any AUTHOR_MAIL = 'yinkaisheng@live.com' METRO_WINDOW_CLASS_NAME = 'Windows.UI.Core.CoreW...
true
true
f763a7b1515fc71c631771b9dbb01e3736714680
13,004
py
Python
LPES-video/10.03-routing_ip/10.03.02-routing.py
opcode-eu-org-website/LPES-wyklady-src
dd4d413f2bb5560790b6365fa7e68e8f1a8a65b0
[ "MIT" ]
null
null
null
LPES-video/10.03-routing_ip/10.03.02-routing.py
opcode-eu-org-website/LPES-wyklady-src
dd4d413f2bb5560790b6365fa7e68e8f1a8a65b0
[ "MIT" ]
null
null
null
LPES-video/10.03-routing_ip/10.03.02-routing.py
opcode-eu-org-website/LPES-wyklady-src
dd4d413f2bb5560790b6365fa7e68e8f1a8a65b0
[ "MIT" ]
1
2021-07-03T16:43:47.000Z
2021-07-03T16:43:47.000Z
# Copyright (c) 2020-2021 Matematyka dla Ciekawych Świata (http://ciekawi.icm.edu.pl/) # Copyright (c) 2020-2021 Robert Ryszard Paciorek <rrp@opcode.eu.org> # # MIT License # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Soft...
69.170213
229
0.716164
try: clipData except NameError: clipData = [] code_ipr_output = r"""::1 dev lo proto kernel metric 256 pref medium 2001:0db8:1317::1d:0/112 dev eth0 proto kernel metric 256 pref medium 2001:0db8:1317::ff1d:0/112 dev eth1 proto kernel metric 256 pref medium 2001:0db8:6411::/64 via 2001:0db8:1317::1d:113 dev eth0 metri...
true
true
f763ac9b26f9878666887f4c400b306cc34eaa0f
7,645
py
Python
Navigable/win-btfy.py
ronejfourn/campus-scripts
cc0ec3990598f98cb66955708f852a5f3688c949
[ "CC0-1.0" ]
10
2021-04-28T08:44:36.000Z
2021-05-17T11:44:55.000Z
Navigable/win-btfy.py
ronejfourn/campus-scripts
cc0ec3990598f98cb66955708f852a5f3688c949
[ "CC0-1.0" ]
null
null
null
Navigable/win-btfy.py
ronejfourn/campus-scripts
cc0ec3990598f98cb66955708f852a5f3688c949
[ "CC0-1.0" ]
6
2021-04-28T06:16:02.000Z
2021-06-24T15:12:12.000Z
import argparse import os import collections from os import system import re from collections import defaultdict parser = argparse.ArgumentParser() parser.add_argument( "-f", "--folder", default=".", help="Specifies which folder to make the naviagtable bat file", ) parser.add_argument( "-n", ...
22.28863
144
0.494441
import argparse import os import collections from os import system import re from collections import defaultdict parser = argparse.ArgumentParser() parser.add_argument( "-f", "--folder", default=".", help="Specifies which folder to make the naviagtable bat file", ) parser.add_argument( "-n", ...
true
true
f763ad947187302a9dd1e44e1f9f520dbaa9f591
2,687
py
Python
e3dc/_RSCPEncryptDecrypt.py
is00709/python-e3dc
668ccc5294043a85cdec86d543b43e070ab4fca8
[ "MIT" ]
37
2018-04-28T16:48:13.000Z
2022-03-23T07:51:47.000Z
e3dc/_RSCPEncryptDecrypt.py
is00709/python-e3dc
668ccc5294043a85cdec86d543b43e070ab4fca8
[ "MIT" ]
52
2018-11-08T21:31:55.000Z
2022-03-12T19:24:13.000Z
e3dc/_RSCPEncryptDecrypt.py
is00709/python-e3dc
668ccc5294043a85cdec86d543b43e070ab4fca8
[ "MIT" ]
22
2019-04-21T19:41:30.000Z
2022-03-06T07:39:26.000Z
from py3rijndael import RijndaelCbc, ZeroPadding import math KEY_SIZE = 32 BLOCK_SIZE = 32 class ParameterError(Exception): pass def zeroPad_multiple(string, value): l = len(string) if l % value == 0: return string newL = int(value * math.ceil(float(l)/value)) return string.ljust(newL, b...
35.355263
163
0.633792
from py3rijndael import RijndaelCbc, ZeroPadding import math KEY_SIZE = 32 BLOCK_SIZE = 32 class ParameterError(Exception): pass def zeroPad_multiple(string, value): l = len(string) if l % value == 0: return string newL = int(value * math.ceil(float(l)/value)) return string.ljust(newL, b...
true
true
f763aea951998a20bf354e48c18cda28593201c6
12,636
py
Python
zeitcoinutility.py
mmgrant73/zeitcoin
ae04d37e66c2f278c9c83525eb0d0d1c6ecf9fe0
[ "MIT" ]
1
2017-07-03T17:00:16.000Z
2017-07-03T17:00:16.000Z
zeitcoinutility.py
mmgrant73/zeitcoin
ae04d37e66c2f278c9c83525eb0d0d1c6ecf9fe0
[ "MIT" ]
null
null
null
zeitcoinutility.py
mmgrant73/zeitcoin
ae04d37e66c2f278c9c83525eb0d0d1c6ecf9fe0
[ "MIT" ]
null
null
null
#!/usr/bin/env python ############################################ # Zeitcoin Utility, Log and Encyption Class ############################################ import uuid, time, hashlib, shutil, random, os, sys from M2Crypto import Rand, RSA, BIO, EVP from twisted.internet import defer from zeitcoindb import hashtable fr...
29.943128
106
0.708215
import uuid, time, hashlib, shutil, random, os, sys from M2Crypto import Rand, RSA, BIO, EVP from twisted.internet import defer from zeitcoindb import hashtable from twisted.web.client import getPage from twisted.internet import reactor ADDRESS='127.0.0.1' FNAME='zeitcoin' PORT=1234 class utility: def __init__(sel...
false
true
f763b06c665bbfe7f5a653b56b82667c547365a3
1,722
py
Python
AWS/get_data.py
ls-2018/tips
1f5f5195d7181b5dd4616db02166f7f92c97f1cd
[ "MIT" ]
2
2019-05-07T03:08:25.000Z
2020-05-22T10:10:00.000Z
AWS/get_data.py
ls-2018/tips
1f5f5195d7181b5dd4616db02166f7f92c97f1cd
[ "MIT" ]
7
2020-05-22T13:29:42.000Z
2021-09-23T23:30:25.000Z
AWS/get_data.py
ls-2018/py
1f5f5195d7181b5dd4616db02166f7f92c97f1cd
[ "MIT" ]
null
null
null
# encoding=utf-8 """ @Time: 2019/7/8 10:09 @Author: liushuo @File: get_data.py @Desc: @Software: PyCharm """ import boto3 import pandas as pd # s3 = boto3.resource('s3') # bucket = s3.Bucket('s3-billing') # data1 = data2 = None # for obj in bucket.objects.all(): # if '936669166135-aws-billing-csv-2017-10.csv' =...
28.229508
115
0.509872
import boto3 import pandas as pd df1 = pd.DataFrame({'a': [1, 2, 3, 4, 5], 'b': [1, 2, 3, 5, 4], 'c': [1, 2, 3, 5, 4], 'd': [1, 2, 3, 5, 4]}) df = pd.DataFrame({}).append([{'A': 16, 'B': 17, 'C': 18, 'D': 19}, {'A': 20, 'B': 21, 'C': 22, 'D': 23}], ignore_index=True) df2 = pd.DataFra...
true
true
f763b0a573c896dca96abcd9f6789fea6880e150
10,242
py
Python
torba/torba/server/env.py
xeddmc/lbry
af1c8ec35ce394d6b09acc02ed650879ef06a2f4
[ "MIT" ]
null
null
null
torba/torba/server/env.py
xeddmc/lbry
af1c8ec35ce394d6b09acc02ed650879ef06a2f4
[ "MIT" ]
null
null
null
torba/torba/server/env.py
xeddmc/lbry
af1c8ec35ce394d6b09acc02ed650879ef06a2f4
[ "MIT" ]
null
null
null
# Copyright (c) 2016, Neil Booth # # All rights reserved. # # See the file "LICENCE" for information about the copyright # and warranty status of this software. import re import resource from os import environ from collections import namedtuple from ipaddress import ip_address from torba.server.util import class_log...
40.007813
97
0.607206
import re import resource from os import environ from collections import namedtuple from ipaddress import ip_address from torba.server.util import class_logger from torba.server.coins import Coin import torba.server.util as lib_util NetIdentity = namedtuple('NetIdentity', 'host tcp_port ssl_port nick_suffix') cl...
true
true
f763b104f4a81ae43892d85e74326570bd67afa8
25,582
py
Python
rlx2nix/converter.py
relacs/rlx2nix
be66f02a78a225b01ee391dd706969c789ce28e8
[ "BSD-3-Clause" ]
null
null
null
rlx2nix/converter.py
relacs/rlx2nix
be66f02a78a225b01ee391dd706969c789ce28e8
[ "BSD-3-Clause" ]
null
null
null
rlx2nix/converter.py
relacs/rlx2nix
be66f02a78a225b01ee391dd706969c789ce28e8
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright © 2022, Neuroethology Lab Uni Tuebingen # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted under the terms of the BSD License. See # LICENSE file in the root of the Project. import re import os import glob imp...
44.959578
128
0.549722
import re import os import glob import odml import logging import subprocess import numpy as np import nixio as nix from .config import ConfigFile from .traces import EventTrace, RawTrace from .stimuli import StimuliDat from .util import parse_value, odml2nix, only_number from .stimdescription import parse_stimulus_de...
true
true
f763b2093f347d7e7327faa14bb1fcd986f640bc
6,365
py
Python
mac/google-cloud-sdk/lib/third_party/kubernetes/client/models/v1beta1_api_service_condition.py
bopopescu/cndw
ee432efef88a4351b355f3d6d5350defc7f4246b
[ "Apache-2.0" ]
2
2019-11-10T09:17:07.000Z
2019-12-18T13:44:08.000Z
mac/google-cloud-sdk/lib/third_party/kubernetes/client/models/v1beta1_api_service_condition.py
bopopescu/cndw
ee432efef88a4351b355f3d6d5350defc7f4246b
[ "Apache-2.0" ]
11
2020-02-29T02:51:12.000Z
2022-03-30T23:20:08.000Z
mac/google-cloud-sdk/lib/third_party/kubernetes/client/models/v1beta1_api_service_condition.py
bopopescu/cndw
ee432efef88a4351b355f3d6d5350defc7f4246b
[ "Apache-2.0" ]
1
2020-07-25T01:40:19.000Z
2020-07-25T01:40:19.000Z
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.14.4 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re ...
26.410788
80
0.630636
from pprint import pformat from six import iteritems import re class V1beta1APIServiceCondition(object): swagger_types = { 'last_transition_time': 'datetime', 'message': 'str', 'reason': 'str', 'status': 'str', 'type': 'str' } attribute_map = { 'last_transition_time': 'last...
true
true
f763b22d4abc701c1b493759f7807b3167fce5f9
1,343
py
Python
setup.py
petarmaric/fsm_strip_length_damage_analysis
e7146a711f56c6ce27099d88b1f919e3679faf48
[ "BSD-3-Clause" ]
null
null
null
setup.py
petarmaric/fsm_strip_length_damage_analysis
e7146a711f56c6ce27099d88b1f919e3679faf48
[ "BSD-3-Clause" ]
null
null
null
setup.py
petarmaric/fsm_strip_length_damage_analysis
e7146a711f56c6ce27099d88b1f919e3679faf48
[ "BSD-3-Clause" ]
null
null
null
from setuptools import setup, find_packages setup( name='fsm_strip_length_damage_analysis', version='1.0.1', url='https://github.com/petarmaric/fsm_strip_length_damage_analysis', license='BSD', author='Petar Maric', author_email='petarmaric@uns.ac.rs', description='Console app and Python A...
39.5
102
0.662695
from setuptools import setup, find_packages setup( name='fsm_strip_length_damage_analysis', version='1.0.1', url='https://github.com/petarmaric/fsm_strip_length_damage_analysis', license='BSD', author='Petar Maric', author_email='petarmaric@uns.ac.rs', description='Console app and Python A...
true
true
f763b264059d8d2a820abecab802ad895869d08a
12,348
py
Python
src/native_client_sdk/src/build_tools/sdk_tools/sdk_update_main.py
jxjnjjn/chromium
435c1d02fd1b99001dc9e1e831632c894523580d
[ "Apache-2.0" ]
9
2018-09-21T05:36:12.000Z
2021-11-15T15:14:36.000Z
native_client_sdk/src/build_tools/sdk_tools/sdk_update_main.py
devasia1000/chromium
919a8a666862fb866a6bb7aa7f3ae8c0442b4828
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
native_client_sdk/src/build_tools/sdk_tools/sdk_update_main.py
devasia1000/chromium
919a8a666862fb866a6bb7aa7f3ae8c0442b4828
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
3
2018-11-28T14:54:13.000Z
2020-07-02T07:36:07.000Z
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # CMD code copied from git_cl.py in depot_tools. import config import cStringIO import download import logging import optparse imp...
28.850467
80
0.678976
import config import cStringIO import download import logging import optparse import os import re import sdk_update_common from sdk_update_common import Error import sys import urllib2 SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) PARENT_DIR = os.path.dirname(SCRIPT_DIR) sys.path.append(os.path.dirname(SC...
false
true
f763b31c9f61fcdacb4d29aa1ce9af505a4de340
690
py
Python
project/migrations/0001_initial.py
thtorun/simple-ecommerce
f93a9161c2e25e872dc1ccb71fa21ef79dc403e1
[ "MIT" ]
null
null
null
project/migrations/0001_initial.py
thtorun/simple-ecommerce
f93a9161c2e25e872dc1ccb71fa21ef79dc403e1
[ "MIT" ]
null
null
null
project/migrations/0001_initial.py
thtorun/simple-ecommerce
f93a9161c2e25e872dc1ccb71fa21ef79dc403e1
[ "MIT" ]
null
null
null
# Generated by Django 3.0.5 on 2020-04-18 17:36 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Destination', fields=[ ('id...
27.6
115
0.542029
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Destination', fields=[ ('id', models.AutoField(auto_created=True, primary_ke...
true
true
f763b31d22a18403f09408ff9fb27ff0159623d5
1,159
py
Python
seq2seq/inputter/embedder.py
LinjianLi/Seq2Seq-PyTorch
671bd10ac1a2620fb4d5ceaacdff9c0e9f4738a2
[ "Apache-2.0" ]
null
null
null
seq2seq/inputter/embedder.py
LinjianLi/Seq2Seq-PyTorch
671bd10ac1a2620fb4d5ceaacdff9c0e9f4738a2
[ "Apache-2.0" ]
null
null
null
seq2seq/inputter/embedder.py
LinjianLi/Seq2Seq-PyTorch
671bd10ac1a2620fb4d5ceaacdff9c0e9f4738a2
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- ################################################################################ # # Copyright (c) 2019 Baidu.com, Inc. All Rights Reserved # ################################################################################ """ File: source/encoders/embedder.py """ import l...
27.595238
80
0.491803
import logging import torch import torch.nn as nn logger = logging.getLogger(__name__) class Embedder(nn.Embedding): def load_embeddings(self, embeds, scale=0.05): assert len(embeds) == self.num_embeddings embeds = torch.tensor(embeds) num_known = 0 for i in range(len(embeds)):...
true
true
f763b3658e147184bd9c22641388859c94ea0c88
3,577
py
Python
ecxclient/cli/ecxcli.py
catalogicsoftware/ecxclient
fa37484bac47bd25f2526905a57999459f995c78
[ "Apache-2.0" ]
6
2017-02-18T03:22:09.000Z
2021-04-23T08:24:40.000Z
ecxclient/cli/ecxcli.py
catalogicsoftware/ecxclient
fa37484bac47bd25f2526905a57999459f995c78
[ "Apache-2.0" ]
null
null
null
ecxclient/cli/ecxcli.py
catalogicsoftware/ecxclient
fa37484bac47bd25f2526905a57999459f995c78
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python #-*- mode: Python;-*- import ConfigParser import json import logging import os import sys import tempfile import traceback import click from requests.exceptions import HTTPError from ecxclient.sdk import client import util cmd_folder = os.path.abspath(os.path.join(os.path.dirname(__file__), 'c...
29.561983
115
0.657255
import ConfigParser import json import logging import os import sys import tempfile import traceback import click from requests.exceptions import HTTPError from ecxclient.sdk import client import util cmd_folder = os.path.abspath(os.path.join(os.path.dirname(__file__), 'commands')) class MyCLI(click.MultiCommand):...
true
true
f763b3fc306fe6d03d918327792778c43edc5617
16,967
py
Python
sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_deleted_servers_operations.py
sacheu/azure-sdk-for-python
8ab8d653458b04f9251e62072bf5ac73b42bfd5f
[ "MIT" ]
1
2021-12-07T13:43:54.000Z
2021-12-07T13:43:54.000Z
sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_deleted_servers_operations.py
RGKarthik/azure-sdk-for-python
7927f8468808a6938972d32bad69448c98297c03
[ "MIT" ]
1
2019-10-14T19:43:52.000Z
2019-10-14T19:43:52.000Z
sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_deleted_servers_operations.py
sacheu/azure-sdk-for-python
8ab8d653458b04f9251e62072bf5ac73b42bfd5f
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
47.794366
182
0.660753
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pi...
true
true
f763b49618740646ea8e05180b80de8ced918c50
933
py
Python
Kidera/kidera.py
IdoSpringer/TCR-PEP-Classification
1cca1551ca71359239a5f5caea7f13ec01f4982b
[ "MIT" ]
1
2019-04-30T12:31:44.000Z
2019-04-30T12:31:44.000Z
Kidera/kidera.py
IdoSpringer/TCR-PEP-Classification
1cca1551ca71359239a5f5caea7f13ec01f4982b
[ "MIT" ]
null
null
null
Kidera/kidera.py
IdoSpringer/TCR-PEP-Classification
1cca1551ca71359239a5f5caea7f13ec01f4982b
[ "MIT" ]
null
null
null
import pandas import os path, _ = os.path.split(__file__) kidera_factors = pandas.read_csv(os.path.join(path, 'kidera.csv'), header=None, index_col=0) symbol_lookup = { 'ALA': 'A', 'ARG': 'R', 'ASN': 'N', 'ASP': 'D', ...
34.555556
69
0.434084
import pandas import os path, _ = os.path.split(__file__) kidera_factors = pandas.read_csv(os.path.join(path, 'kidera.csv'), header=None, index_col=0) symbol_lookup = { 'ALA': 'A', 'ARG': 'R', 'ASN': 'N', 'ASP': 'D', ...
true
true
f763b4cab176cfb767c1c6c69b9e3e634ed80ec0
4,630
py
Python
alfred/database.py
iticus/alfred
68893d2e4af642099465cf188fd57c415be5f26a
[ "MIT" ]
1
2022-02-11T03:28:28.000Z
2022-02-11T03:28:28.000Z
alfred/database.py
iticus/alfred
68893d2e4af642099465cf188fd57c415be5f26a
[ "MIT" ]
null
null
null
alfred/database.py
iticus/alfred
68893d2e4af642099465cf188fd57c415be5f26a
[ "MIT" ]
1
2022-01-05T19:07:39.000Z
2022-01-05T19:07:39.000Z
""" Created on Dec 17, 2017 @author: ionut """ import datetime import logging import momoko import psycopg2 from tornado.gen import coroutine class DBClient: """ Handle database communication using momoko """ def __init__(self, dsn, io_loop=None): self.dsn = dsn self.io_loop = io_lo...
29.490446
99
0.593305
import datetime import logging import momoko import psycopg2 from tornado.gen import coroutine class DBClient: def __init__(self, dsn, io_loop=None): self.dsn = dsn self.io_loop = io_loop self.connection = None self.connected = False @coroutine def connect(self): ...
true
true
f763b50d56b531bc659599c89d467e89b5cc9948
712
py
Python
examples/basic/robot.py
benjiboy50fonz/robotpy-ctre-draft
36810d1ca8f02b774f361df3c514d8d8bba00159
[ "Apache-2.0" ]
null
null
null
examples/basic/robot.py
benjiboy50fonz/robotpy-ctre-draft
36810d1ca8f02b774f361df3c514d8d8bba00159
[ "Apache-2.0" ]
null
null
null
examples/basic/robot.py
benjiboy50fonz/robotpy-ctre-draft
36810d1ca8f02b774f361df3c514d8d8bba00159
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import wpilib import ctre class MyRobot(wpilib.IterativeRobot): """ This is a short sample program demonstrating how to use the basic throttle mode of the TalonSRX """ def robotInit(self): self.motor = ctre.WPI_TalonSRX(1) # Initialize the TalonSRX on device 1. ...
24.551724
81
0.65309
import wpilib import ctre class MyRobot(wpilib.IterativeRobot): def robotInit(self): self.motor = ctre.WPI_TalonSRX(1) def disabledPeriodic(self): self.motor.disable() def teleopPeriodic(self): # This takes a number from -1 (100% speed in reverse) to +1 (100% ...
true
true
f763b5753042846eda75d576e6c4d87fc2a93415
16,419
py
Python
notebooks/nb074_ensembles.py
hoelzl/ML-Course
efa7ccb7c6583753675bbcda569d3184d1ca98d2
[ "MIT" ]
1
2022-03-02T15:59:11.000Z
2022-03-02T15:59:11.000Z
notebooks/nb074_ensembles.py
hoelzl/ML-Course
efa7ccb7c6583753675bbcda569d3184d1ca98d2
[ "MIT" ]
null
null
null
notebooks/nb074_ensembles.py
hoelzl/ML-Course
efa7ccb7c6583753675bbcda569d3184d1ca98d2
[ "MIT" ]
null
null
null
# --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: percent # format_version: '1.3' # jupytext_version: 1.13.7 # kernelspec: # display_name: Python 3 (ipykernel) # language: python # name: python3 # --- # %% [markdown] slideshow={"slide_type":...
32.194118
117
0.700043
import numpy as np import matplotlib.pyplot as plt import seaborn as sns from sklearn.metrics import mean_absolute_error, mean_squared_error from sklearn.linear_model import LinearRegression from sklearn.tree import DecisionTreeRegressor sns.set_theme() rng = np.random.default_rng(42) x = rng.uniform(size=(150, 1)...
true
true
f763b74ba1f7658c79952bf142cc990afe71658d
8,718
py
Python
gem5/configs/common/Benchmarks.py
ayoubg/gem5-graphics_v1
d74a968d5854dc02797139558430ccda1f71108e
[ "BSD-3-Clause" ]
1
2019-01-26T10:34:02.000Z
2019-01-26T10:34:02.000Z
gem5/configs/common/Benchmarks.py
ayoubg/gem5-graphics_v1
d74a968d5854dc02797139558430ccda1f71108e
[ "BSD-3-Clause" ]
null
null
null
gem5/configs/common/Benchmarks.py
ayoubg/gem5-graphics_v1
d74a968d5854dc02797139558430ccda1f71108e
[ "BSD-3-Clause" ]
1
2021-07-06T10:40:34.000Z
2021-07-06T10:40:34.000Z
# Copyright (c) 2006-2007 The Regents of The University of Michigan # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above copyright # notice, this ...
53.158537
127
0.612182
from SysPaths import script, disk, binary from os import environ as env from m5.defines import buildEnv class SysConfig: def __init__(self, script=None, mem=None, disk=None, rootdev=None, os_type='linux'): self.scriptname = script self.diskname = disk self.memsize = mem ...
false
true
f763b923517b8b6c794fe226da21b451b35c7c95
10,774
py
Python
sympy/logic/tests/test_inference.py
msgoff/sympy
1e7daef7514902f5e89718fa957b7b36c6669a10
[ "BSD-3-Clause" ]
null
null
null
sympy/logic/tests/test_inference.py
msgoff/sympy
1e7daef7514902f5e89718fa957b7b36c6669a10
[ "BSD-3-Clause" ]
null
null
null
sympy/logic/tests/test_inference.py
msgoff/sympy
1e7daef7514902f5e89718fa957b7b36c6669a10
[ "BSD-3-Clause" ]
null
null
null
"""For more tests on satisfiability, see test_dimacs""" from sympy import symbols, Q from sympy.logic.boolalg import And, Implies, Equivalent, true, false from sympy.logic.inference import ( literal_symbol, pl_true, satisfiable, valid, entails, PropKB, ) from sympy.logic.algorithms.dpll import ...
34.643087
88
0.576202
from sympy import symbols, Q from sympy.logic.boolalg import And, Implies, Equivalent, true, false from sympy.logic.inference import ( literal_symbol, pl_true, satisfiable, valid, entails, PropKB, ) from sympy.logic.algorithms.dpll import ( dpll, dpll_satisfiable, find_pure_symbol, ...
true
true
f763ba32935158c951c80f85dcef0e705750d4c8
11,309
py
Python
nnutils/loss_utils.py
MayankR/cmr
6c898a5294954899334d430ec71e0a0692a0d99e
[ "MIT" ]
null
null
null
nnutils/loss_utils.py
MayankR/cmr
6c898a5294954899334d430ec71e0a0692a0d99e
[ "MIT" ]
null
null
null
nnutils/loss_utils.py
MayankR/cmr
6c898a5294954899334d430ec71e0a0692a0d99e
[ "MIT" ]
null
null
null
""" Loss Utils. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import torch from . import geom_utils import numpy as np def mask_dt_loss(proj_verts, dist_transf): """ proj_verts: B x N x 2 (In normalized coordinate [-1, 1]) dist_transf...
29.374026
100
0.585551
from __future__ import absolute_import from __future__ import division from __future__ import print_function import torch from . import geom_utils import numpy as np def mask_dt_loss(proj_verts, dist_transf): sample_grid = proj_verts.unsqueeze(1) dist_transf = torch.nn.functional.grid_sample(dist_tra...
true
true