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
f762e38900552748b2d1409001008e960a2a3d18
22,914
py
Python
src/etc/htmldocck.py
randomicon00/rust
4e02a9281dd8c74cf5c04df044659b5e03b17571
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
src/etc/htmldocck.py
randomicon00/rust
4e02a9281dd8c74cf5c04df044659b5e03b17571
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
src/etc/htmldocck.py
randomicon00/rust
4e02a9281dd8c74cf5c04df044659b5e03b17571
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- r""" htmldocck.py is a custom checker script for Rustdoc HTML outputs. # How and why? The principle is simple: This script receives a path to generated HTML documentation and a "template" script, which has a series of check commands like `@has` or `@matches`. Each comman...
34.876712
144
0.601685
from __future__ import absolute_import, print_function, unicode_literals import codecs import io import sys import os.path import re import shlex from collections import namedtuple try: from html.parser import HTMLParser except ImportError: from HTMLParser import HTMLParser try: from xml.etree import cEl...
true
true
f762e3e031502b0fbce15f188d5e6282fc5a1607
1,700
py
Python
simple_api/adapters/graphql/registry.py
karlosss/simple_api
03f87035c648f161d5e7a59b24f4e04bd34399f1
[ "MIT" ]
2
2020-11-13T14:00:06.000Z
2020-12-19T11:50:22.000Z
simple_api/adapters/graphql/registry.py
ladal1/simple_api
1b5d560476bccad9f68a7331d092dbdb68c48bf7
[ "MIT" ]
5
2021-02-04T14:27:43.000Z
2021-06-04T23:22:24.000Z
simple_api/adapters/graphql/registry.py
ladal1/simple_api
1b5d560476bccad9f68a7331d092dbdb68c48bf7
[ "MIT" ]
1
2021-01-06T13:54:38.000Z
2021-01-06T13:54:38.000Z
import graphene from simple_api.adapters.graphql.constants import INPUT_CLASS_SUFFIX from simple_api.utils import ClassStub, Storage class InputClassStorage(Storage): def get(self, cls_str, cls): if cls_str not in self.storage: self.storage[cls_str] = ClassStub("{}{}".format(cls.__name__, INP...
34
118
0.684118
import graphene from simple_api.adapters.graphql.constants import INPUT_CLASS_SUFFIX from simple_api.utils import ClassStub, Storage class InputClassStorage(Storage): def get(self, cls_str, cls): if cls_str not in self.storage: self.storage[cls_str] = ClassStub("{}{}".format(cls.__name__, INP...
true
true
f762e5620f920cfa5750eb807b28a806c187a6d6
5,050
py
Python
test.py
FOLEFAC/InstantReact
ba0e00ef4c84710accfe6b278000da06ee2d6438
[ "MIT" ]
null
null
null
test.py
FOLEFAC/InstantReact
ba0e00ef4c84710accfe6b278000da06ee2d6438
[ "MIT" ]
null
null
null
test.py
FOLEFAC/InstantReact
ba0e00ef4c84710accfe6b278000da06ee2d6438
[ "MIT" ]
null
null
null
# Imports import torch from torchvision import datasets, models, transforms # All torchvision modules import torch.nn as nn # All neural network modules, nn.Linear, nn.Conv2d, Loss functions,.. import torch.optim as optim # For all Optimization algorithms, SGD, Adam,... import torch.nn.functional as F # All...
32.580645
170
0.697822
import torch from torchvision import datasets, models, transforms import torch.nn as nn import torch.optim as optim import torch.nn.functional as F from torch.utils.data import (DataLoader,Dataset) # Gives easier dataset managment and creates mini batches import torchvision.datasets as datasets # Has standar...
true
true
f762e5796e518f10f087a26e3a8addec7ce579e9
2,889
py
Python
rastervision/runner/aws_batch_experiment_runner.py
aaron8tang/raster-vision
a1af78bafb8f19ccc40c476adb551bdc23a33611
[ "Apache-2.0" ]
1
2018-12-20T22:58:18.000Z
2018-12-20T22:58:18.000Z
rastervision/runner/aws_batch_experiment_runner.py
aaron8tang/raster-vision
a1af78bafb8f19ccc40c476adb551bdc23a33611
[ "Apache-2.0" ]
null
null
null
rastervision/runner/aws_batch_experiment_runner.py
aaron8tang/raster-vision
a1af78bafb8f19ccc40c476adb551bdc23a33611
[ "Apache-2.0" ]
null
null
null
import uuid import click from rastervision.runner import OutOfProcessExperimentRunner from rastervision.rv_config import RVConfig class AwsBatchExperimentRunner(OutOfProcessExperimentRunner): def __init__(self): super().__init__() rv_config = RVConfig.get_instance() batch_config = rv_co...
31.747253
81
0.572516
import uuid import click from rastervision.runner import OutOfProcessExperimentRunner from rastervision.rv_config import RVConfig class AwsBatchExperimentRunner(OutOfProcessExperimentRunner): def __init__(self): super().__init__() rv_config = RVConfig.get_instance() batch_config = rv_co...
true
true
f762e57b92cd64d83c3193bdbdd351ad99644c45
24,115
py
Python
py-hocr-detect-columns.py
opengulf/nyc-directories-support-scripts
e22582b8f4cb3c365e9aac1d860d9c36831277a5
[ "MIT" ]
1
2021-09-07T20:41:00.000Z
2021-09-07T20:41:00.000Z
py-hocr-detect-columns.py
opengulf/nyc-directories-support-scripts
e22582b8f4cb3c365e9aac1d860d9c36831277a5
[ "MIT" ]
null
null
null
py-hocr-detect-columns.py
opengulf/nyc-directories-support-scripts
e22582b8f4cb3c365e9aac1d860d9c36831277a5
[ "MIT" ]
2
2021-09-07T20:49:14.000Z
2021-11-05T02:03:47.000Z
import numpy as np from bs4 import BeautifulSoup from sklearn.cluster import KMeans from math import sqrt from statistics import mean from PIL import Image, ImageOps, ImageDraw import re import json import argparse import os import uuid from cdparser import Classifier, Features, LabeledEntry, Utils import sys def bui...
46.734496
176
0.540659
import numpy as np from bs4 import BeautifulSoup from sklearn.cluster import KMeans from math import sqrt from statistics import mean from PIL import Image, ImageOps, ImageDraw import re import json import argparse import os import uuid from cdparser import Classifier, Features, LabeledEntry, Utils import sys def bui...
true
true
f762e658fce1ed46bc24252af33dbde54607d445
664
py
Python
src/pysonata/sonata/reports/compartment/compartment_report.py
AllenInstitute/project7
901350cdf5c57a56b7efece2a309c72bdf5f2608
[ "BSD-3-Clause" ]
35
2018-04-10T13:54:27.000Z
2022-03-12T09:22:31.000Z
src/pysonata/sonata/reports/compartment/compartment_report.py
AllenInstitute/project7
901350cdf5c57a56b7efece2a309c72bdf5f2608
[ "BSD-3-Clause" ]
92
2018-03-19T10:14:18.000Z
2022-01-29T15:21:47.000Z
src/pysonata/sonata/reports/compartment/compartment_report.py
AllenInstitute/project7
901350cdf5c57a56b7efece2a309c72bdf5f2608
[ "BSD-3-Clause" ]
25
2018-03-16T23:14:42.000Z
2022-02-09T19:37:05.000Z
from .compartment_reader import CompartmentReaderVer01 as SonataReaderDefault from .compartment_writer import CompartmentWriterv01 as SonataWriterDefault """ try: from mpi4py import MPI comm = MPI.COMM_WORLD rank = comm.Get_rank() nhosts = comm.Get_size() except Exception as exc: pass """ class C...
27.666667
77
0.650602
from .compartment_reader import CompartmentReaderVer01 as SonataReaderDefault from .compartment_writer import CompartmentWriterv01 as SonataWriterDefault class CompartmentReport(object): def __new__(cls, path, mode='r', adaptor=None, *args, **kwargs): if adaptor is not None: return adaptor ...
true
true
f762e6935be2c223cf1365d81e2d5913af049bca
1,171
py
Python
userbot/plugins/gps.py
sairam1103/JARVISUSERBOT
fec03605a22cb62d79031d6859ded866afb21852
[ "MIT" ]
null
null
null
userbot/plugins/gps.py
sairam1103/JARVISUSERBOT
fec03605a22cb62d79031d6859ded866afb21852
[ "MIT" ]
null
null
null
userbot/plugins/gps.py
sairam1103/JARVISUSERBOT
fec03605a22cb62d79031d6859ded866afb21852
[ "MIT" ]
null
null
null
# Credits ;- @mrconfused from geopy.geocoders import Nominatim from userbot.utils import admin_cmd from telethon.tl import types from userbot import CMD_HELP @borg.on(admin_cmd(pattern="gps ?(.*)")) async def gps(event): if event.fwd_from: return reply_to_id = event.message if event.reply_to_msg_...
26.022222
69
0.615713
from geopy.geocoders import Nominatim from userbot.utils import admin_cmd from telethon.tl import types from userbot import CMD_HELP @borg.on(admin_cmd(pattern="gps ?(.*)")) async def gps(event): if event.fwd_from: return reply_to_id = event.message if event.reply_to_msg_id: reply_to_id =...
true
true
f762e75d1c7cb239b38140a590be9c34dff025da
683
bzl
Python
test_expect_failure/missing_direct_deps/internal_deps/custom-jvm-rule.bzl
virusdave/rules_scala
545b461065e41fa0bb43845f5bba4344388627c1
[ "Apache-2.0" ]
326
2016-02-24T18:28:10.000Z
2022-03-30T08:51:08.000Z
test_expect_failure/missing_direct_deps/internal_deps/custom-jvm-rule.bzl
virusdave/rules_scala
545b461065e41fa0bb43845f5bba4344388627c1
[ "Apache-2.0" ]
1,157
2016-02-24T04:26:27.000Z
2022-03-31T05:59:14.000Z
test_expect_failure/missing_direct_deps/internal_deps/custom-jvm-rule.bzl
virusdave/rules_scala
545b461065e41fa0bb43845f5bba4344388627c1
[ "Apache-2.0" ]
262
2016-02-24T18:29:21.000Z
2022-03-24T21:39:20.000Z
#This rule is an example for a jvm rule that doesn't support Jars2Labels def _custom_jvm_impl(ctx): # TODO(#8867): Migrate away from the placeholder jar hack when #8867 is fixed. jar = ctx.file.jar provider = JavaInfo( output_jar = jar, compile_jar = jar, deps = [target[JavaInfo] for...
31.045455
114
0.641288
def _custom_jvm_impl(ctx): # TODO(#8867): Migrate away from the placeholder jar hack when #8867 is fixed. jar = ctx.file.jar provider = JavaInfo( output_jar = jar, compile_jar = jar, deps = [target[JavaInfo] for target in ctx.attr.deps], ) return [provider] custom_jvm = rule...
true
true
f762e8cb9872c76ee7979db073612961dba4a1bc
1,500
py
Python
vcr/errors.py
arthurHamon2/vcrpy
b203fd4113fb865bd02e39c862e21e90c73a896d
[ "MIT" ]
null
null
null
vcr/errors.py
arthurHamon2/vcrpy
b203fd4113fb865bd02e39c862e21e90c73a896d
[ "MIT" ]
null
null
null
vcr/errors.py
arthurHamon2/vcrpy
b203fd4113fb865bd02e39c862e21e90c73a896d
[ "MIT" ]
null
null
null
class CannotOverwriteExistingCassetteException(Exception): def __init__(self, *args, **kwargs): message = self._get_message(kwargs["cassette"], kwargs["failed_request"]) super(CannotOverwriteExistingCassetteException, self).__init__(message) def _get_message(self, cassette, failed_request): ...
45.454545
86
0.640667
class CannotOverwriteExistingCassetteException(Exception): def __init__(self, *args, **kwargs): message = self._get_message(kwargs["cassette"], kwargs["failed_request"]) super(CannotOverwriteExistingCassetteException, self).__init__(message) def _get_message(self, cassette, failed_request): ...
true
true
f762ea1b5558856651184247a16769fa76e61910
2,055
py
Python
kubernetes/test/test_coordination_v1beta1_api.py
TomasTomecek/kubernetes-python
c37c074303a13c72662b9201ccc023fb0ca45755
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_coordination_v1beta1_api.py
TomasTomecek/kubernetes-python
c37c074303a13c72662b9201ccc023fb0ca45755
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_coordination_v1beta1_api.py
TomasTomecek/kubernetes-python
c37c074303a13c72662b9201ccc023fb0ca45755
[ "Apache-2.0" ]
1
2020-05-09T07:16:55.000Z
2020-05-09T07:16:55.000Z
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.12.4 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys i...
18.853211
105
0.618978
from __future__ import absolute_import import os import sys import unittest import kubernetes.client from kubernetes.client.rest import ApiException from kubernetes.client.apis.coordination_v1beta1_api import CoordinationV1beta1Api class TestCoordinationV1beta1Api(unittest.TestCase): def setUp(self): ...
true
true
f762eb11c4fc386a0887062d5e6eef7a7cd33577
12,583
py
Python
tests/test_forward_ref.py
oridistor/pydantic
31bc2435d7968fdf8d1f0c5c67f0f851c1bef54e
[ "MIT" ]
2
2021-07-13T17:21:51.000Z
2021-07-25T20:16:43.000Z
tests/test_forward_ref.py
oridistor/pydantic
31bc2435d7968fdf8d1f0c5c67f0f851c1bef54e
[ "MIT" ]
144
2020-07-29T06:19:02.000Z
2022-03-28T22:08:56.000Z
tests/test_forward_ref.py
wyfo/pydantic
685303237273eb21f379227b721295e0bf7e253b
[ "MIT" ]
1
2020-12-29T05:28:06.000Z
2020-12-29T05:28:06.000Z
import sys import pytest from pydantic import ConfigError, ValidationError skip_pre_37 = pytest.mark.skipif(sys.version_info < (3, 7), reason='testing >= 3.7 behaviour only') @skip_pre_37 def test_postponed_annotations(create_module): module = create_module( # language=Python """ from __future_...
26.214583
114
0.536994
import sys import pytest from pydantic import ConfigError, ValidationError skip_pre_37 = pytest.mark.skipif(sys.version_info < (3, 7), reason='testing >= 3.7 behaviour only') @skip_pre_37 def test_postponed_annotations(create_module): module = create_module( """ from __future__ import annotatio...
true
true
f762eb7cbe9dcde26f73940787739a02774f4d5f
2,261
py
Python
Lib/site-packages/selenium/webdriver/firefox/service.py
inging44/python3
fcd8d9d2ee54b46b757ecf34f284b4e60a43097a
[ "bzip2-1.0.6" ]
99
2017-09-18T20:12:04.000Z
2022-01-21T15:26:54.000Z
Lib/site-packages/selenium/webdriver/firefox/service.py
inging44/python3
fcd8d9d2ee54b46b757ecf34f284b4e60a43097a
[ "bzip2-1.0.6" ]
51
2021-04-08T11:39:59.000Z
2021-05-07T12:01:27.000Z
Lib/site-packages/selenium/webdriver/firefox/service.py
inging44/python3
fcd8d9d2ee54b46b757ecf34f284b4e60a43097a
[ "bzip2-1.0.6" ]
58
2017-09-23T08:16:42.000Z
2022-03-25T09:10:13.000Z
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
41.109091
92
0.703671
from selenium.webdriver.common import service class Service(service.Service): def __init__(self, executable_path, port=0, service_args=None, log_path="geckodriver.log", env=None): log_file = open(log_path, "a+") if log_path is not None and log_path != "" else None service.Servi...
true
true
f762ebb59dba81df8bd0e2334576027f33216e17
206
py
Python
collector.py
MosesDastmard/ADM2019_HW03
8ba2511b5df9d8565c8e312e127c4f57496d6203
[ "MIT" ]
1
2020-11-15T18:42:56.000Z
2020-11-15T18:42:56.000Z
collector.py
MosesDastmard/movie_search_engine
8ba2511b5df9d8565c8e312e127c4f57496d6203
[ "MIT" ]
null
null
null
collector.py
MosesDastmard/movie_search_engine
8ba2511b5df9d8565c8e312e127c4f57496d6203
[ "MIT" ]
null
null
null
import collector_utils movies_urls = [collector_utils.get_urls(i) for i in range(1,3)] #%% movies_urls[0].update(movies_urls[1]) movies_urls = movies_urls[0].copy() collector_utils.scraping(movies_urls, 1)
29.428571
63
0.781553
import collector_utils movies_urls = [collector_utils.get_urls(i) for i in range(1,3)] movies_urls[0].update(movies_urls[1]) movies_urls = movies_urls[0].copy() collector_utils.scraping(movies_urls, 1)
true
true
f762ed1afe64339aa2de0a25d9004481db409546
112
py
Python
Cryptography/Cryptography/Programming2.py
alexandrustanimir/cryptography
6be6b4e5cbd7081527eacb35192c6e110366ad4e
[ "MIT" ]
null
null
null
Cryptography/Cryptography/Programming2.py
alexandrustanimir/cryptography
6be6b4e5cbd7081527eacb35192c6e110366ad4e
[ "MIT" ]
null
null
null
Cryptography/Cryptography/Programming2.py
alexandrustanimir/cryptography
6be6b4e5cbd7081527eacb35192c6e110366ad4e
[ "MIT" ]
null
null
null
import binascii from Crypto.Cipher import AES s=binascii.unhexlify("140b41b22a29beb4061bda66b6747e14") print(s)
22.4
56
0.848214
import binascii from Crypto.Cipher import AES s=binascii.unhexlify("140b41b22a29beb4061bda66b6747e14") print(s)
true
true
f762ed8a51b6c1cbaedd599fc4e4202645413910
30
py
Python
doll/__init__.py
badge/doll
36d99d9dd8ab6ff2e155e8daa8dad28619e46ef7
[ "Apache-2.0" ]
2
2016-12-17T23:10:50.000Z
2020-04-29T23:03:31.000Z
doll/__init__.py
badge/doll
36d99d9dd8ab6ff2e155e8daa8dad28619e46ef7
[ "Apache-2.0" ]
3
2015-08-30T16:11:50.000Z
2015-09-01T19:59:50.000Z
doll/__init__.py
badge/doll
36d99d9dd8ab6ff2e155e8daa8dad28619e46ef7
[ "Apache-2.0" ]
null
null
null
__author__ = 'Matthew Badger'
15
29
0.766667
__author__ = 'Matthew Badger'
true
true
f762eda96f55da64a43bcbb1f52a4832713e9e4d
6,216
py
Python
synapse/api/constants.py
eachchat/synapse
889a5f3e011a859a0b2fe432429933f3aba1a8ce
[ "Apache-2.0" ]
null
null
null
synapse/api/constants.py
eachchat/synapse
889a5f3e011a859a0b2fe432429933f3aba1a8ce
[ "Apache-2.0" ]
null
null
null
synapse/api/constants.py
eachchat/synapse
889a5f3e011a859a0b2fe432429933f3aba1a8ce
[ "Apache-2.0" ]
null
null
null
# Copyright 2014-2016 OpenMarket Ltd # Copyright 2017 Vector Creations Ltd # Copyright 2018-2019 New Vector Ltd # Copyright 2019 The Matrix.org Foundation C.I.C. # # 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...
26.564103
88
0.708655
MAX_PDU_SIZE = 65536 MAX_DEPTH = 2 ** 63 - 1 MAX_ALIAS_LENGTH = 255 MAX_USERID_LENGTH = 255 MAX_GROUPID_LENGTH = 255 MAX_GROUP_CATEGORYID_LENGTH = 255 MAX_GROUP_ROLEID_LENGTH = 255 class Membership: INVITE = "invite" JOIN = "join" KNOCK = "knock" LEAVE = "leave" BAN = "ban" LIST = (INV...
true
true
f762ee3958174b64d3b7859c42fca799e1431ac8
614
gyp
Python
binding.gyp
anoChick/node-sqlserver
558b4f65bd0851c13eb935b0e0fb948dce377638
[ "Apache-2.0" ]
260
2015-01-08T01:30:13.000Z
2021-11-09T10:45:30.000Z
binding.gyp
anoChick/node-sqlserver
558b4f65bd0851c13eb935b0e0fb948dce377638
[ "Apache-2.0" ]
85
2015-01-09T10:02:16.000Z
2020-06-17T23:50:34.000Z
binding.gyp
anoChick/node-sqlserver
558b4f65bd0851c13eb935b0e0fb948dce377638
[ "Apache-2.0" ]
66
2015-01-21T01:48:43.000Z
2021-10-19T06:30:28.000Z
{ 'targets': [ { 'target_name': 'sqlserver', 'sources': [ 'src/Column.cpp', 'src/Connection.cpp', 'src/OdbcConnection.cpp', 'src/OdbcError.cpp', 'src/OdbcOperation.cpp', 'src/ResultSet.cpp', 'src/stdafx.cpp', 'src/Utility.c...
17.055556
34
0.364821
{ 'targets': [ { 'target_name': 'sqlserver', 'sources': [ 'src/Column.cpp', 'src/Connection.cpp', 'src/OdbcConnection.cpp', 'src/OdbcError.cpp', 'src/OdbcOperation.cpp', 'src/ResultSet.cpp', 'src/stdafx.cpp', 'src/Utility.c...
true
true
f762eee87f0ee5d6370270a921f5f176ab9358f7
567
py
Python
fastapi_healthcheck/__init__.py
flagman/fastapi-healthcheck
0c92ba37bf2e330fda2663aa100727c708627bad
[ "MIT" ]
3
2020-05-27T11:05:16.000Z
2020-10-10T14:34:58.000Z
fastapi_healthcheck/__init__.py
flagman/fastapi-healthcheck
0c92ba37bf2e330fda2663aa100727c708627bad
[ "MIT" ]
2
2020-12-03T21:58:31.000Z
2021-02-25T15:31:26.000Z
fastapi_healthcheck/__init__.py
flagman/fastapi-healthcheck
0c92ba37bf2e330fda2663aa100727c708627bad
[ "MIT" ]
4
2020-10-10T14:36:56.000Z
2021-02-18T14:51:16.000Z
from .checkers import redis from .checkers import base def add_health_route(app, name="Application Name", checkers=[], version=1.0): async def health_route(): checks = [] for checker in checkers: checks.append(await checker.check()) status = True ...
37.8
85
0.582011
from .checkers import redis from .checkers import base def add_health_route(app, name="Application Name", checkers=[], version=1.0): async def health_route(): checks = [] for checker in checkers: checks.append(await checker.check()) status = True ...
true
true
f762ef13da5f70adf27661e2f883adaced920ec0
1,053
py
Python
pydefect/analyzer/dash_components/supercell_component_demo.py
KazMorita/pydefect
681e4bfe92c53edfe8b50cb72768114b28daabc9
[ "MIT" ]
1
2021-09-10T05:07:39.000Z
2021-09-10T05:07:39.000Z
pydefect/analyzer/dash_components/supercell_component_demo.py
obaica/pydefect-1
31e5ad774845f436554ef15000b8eba3b168a65c
[ "MIT" ]
null
null
null
pydefect/analyzer/dash_components/supercell_component_demo.py
obaica/pydefect-1
31e5ad774845f436554ef15000b8eba3b168a65c
[ "MIT" ]
1
2022-01-07T10:14:16.000Z
2022-01-07T10:14:16.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2020 Kumagai group. # standard Dash imports # import for this example import argparse import sys # standard Crystal Toolkit import import crystal_toolkit.components as ctc import dash import dash_html_components as html from pydefect.analyzer.dash_components.supercell_componen...
25.071429
67
0.7151
import argparse import sys import crystal_toolkit.components as ctc import dash import dash_html_components as html from pydefect.analyzer.dash_components.supercell_component import \ SupercellComponent from pymatgen import loadfn def parse_args(args): parser = argparse.ArgumentParser(description="") pa...
true
true
f762f047053236a0741cf1017a78351ce439f83b
2,100
py
Python
Assessment4.py
polekstulod/ipt-codes
7ef70f292de721f1fa97d91c7b0cdcbab0c9ce3f
[ "MIT" ]
null
null
null
Assessment4.py
polekstulod/ipt-codes
7ef70f292de721f1fa97d91c7b0cdcbab0c9ce3f
[ "MIT" ]
null
null
null
Assessment4.py
polekstulod/ipt-codes
7ef70f292de721f1fa97d91c7b0cdcbab0c9ce3f
[ "MIT" ]
null
null
null
print("-----Output-----") # * Number 1 answers # a. [1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5] # b. [1, 2, 3, 4, 5, 11, 12, 13, 14, 15] # c. TypeError # d. 2 # e. 1 # f. 5 # g. [1, 2, 3, 4, 5] # h. [3, 4] # i. [2, 4] # j. [1, 2] # k. [1, 3, 5] # * Number 2 items = [] def num2(items): items...
19.811321
62
0.49619
print("-----Output-----") items = [] def num2(items): items.append(67) items.append(62.9) items.append("hi") items.append(False) items += [8] items += [67] items += ['apple'] items += [6.5] print(items) def num3(items): num2(items) items.append("banana...
true
true
f762f090633d85dfcabf15a35c0b6acdb70640b5
739
py
Python
week2_algorithmic_warmup/6_last_digit_of_the_sum_of_fibonacci_numbers/fibonacci_sum_last_digit.py
ahmedmeshref/Data-Structures-and-Algorithms-assignments
2301ca8c25d2b8f53d631b2b1ca43352daa34b2a
[ "MIT" ]
null
null
null
week2_algorithmic_warmup/6_last_digit_of_the_sum_of_fibonacci_numbers/fibonacci_sum_last_digit.py
ahmedmeshref/Data-Structures-and-Algorithms-assignments
2301ca8c25d2b8f53d631b2b1ca43352daa34b2a
[ "MIT" ]
null
null
null
week2_algorithmic_warmup/6_last_digit_of_the_sum_of_fibonacci_numbers/fibonacci_sum_last_digit.py
ahmedmeshref/Data-Structures-and-Algorithms-assignments
2301ca8c25d2b8f53d631b2b1ca43352daa34b2a
[ "MIT" ]
null
null
null
# Uses python3 import sys # def fibonacci_sum_naive(n): # if n <= 1: # return n # # previous = 0 # current = 1 # sum = 1 # # for _ in range(n - 1): # previous, current = current, (previous + current)%10 # sum += current # # return sum % 10 memo = {} def calc_fib(n): ...
16.795455
62
0.491204
import sys memo = {} def calc_fib(n): if n <= 1: return n if n in memo: return memo[n] else: f = calc_fib(n - 1) + calc_fib(n - 2) memo[n] = f return f def fibonacci_sum(n): if n < 2: return n return (calc_fib(n + 2) - 1) % 10 if __name__ == '__ma...
true
true
f762f12b18add46f27538c1cbb29082e743825a8
5,366
py
Python
samples/test/lightweight_python_functions_v2_pipeline.py
k-gupta/pipelines
4ea6eb66175399ee2bcd4de7a520b13f7b1385a0
[ "Apache-2.0" ]
null
null
null
samples/test/lightweight_python_functions_v2_pipeline.py
k-gupta/pipelines
4ea6eb66175399ee2bcd4de7a520b13f7b1385a0
[ "Apache-2.0" ]
null
null
null
samples/test/lightweight_python_functions_v2_pipeline.py
k-gupta/pipelines
4ea6eb66175399ee2bcd4de7a520b13f7b1385a0
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 The Kubeflow Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
38.328571
83
0.698099
from typing import Dict, List import os from kfp import dsl from kfp.dsl import Input, InputPath, Output, OutputPath, Dataset, Model, component import kfp.compiler as compiler _KFP_PACKAGE_PATH = os.getenv('KFP_PACKAGE_PATH') @component(kfp_package_path=_KFP_PACKAGE_PATH) def preprocess( message: str, ...
true
true
f762f182a4cd6b5e23a1a2ff7e04a9cf6550082f
10,108
py
Python
src/python/zquantum/qcbm/ansatz.py
Ben-Foxman/z-quantum-qcbm
6e0aff5283f4a1b2b788317c3a12f8ef8c562a29
[ "Apache-2.0" ]
null
null
null
src/python/zquantum/qcbm/ansatz.py
Ben-Foxman/z-quantum-qcbm
6e0aff5283f4a1b2b788317c3a12f8ef8c562a29
[ "Apache-2.0" ]
null
null
null
src/python/zquantum/qcbm/ansatz.py
Ben-Foxman/z-quantum-qcbm
6e0aff5283f4a1b2b788317c3a12f8ef8c562a29
[ "Apache-2.0" ]
null
null
null
import numpy as np import sympy from zquantum.core.circuit import Circuit, Qubit, Gate, create_layer_of_gates from zquantum.core.interfaces.ansatz import Ansatz from zquantum.core.interfaces.ansatz_utils import ( ansatz_property, invalidates_parametrized_circuit, ) from typing import Optional, List from .ansatz...
40.432
137
0.527602
import numpy as np import sympy from zquantum.core.circuit import Circuit, Qubit, Gate, create_layer_of_gates from zquantum.core.interfaces.ansatz import Ansatz from zquantum.core.interfaces.ansatz_utils import ( ansatz_property, invalidates_parametrized_circuit, ) from typing import Optional, List from .ansatz...
true
true
f762f1d09d075fde76ac5f98d9e8b14c3729e6d2
265
py
Python
tests/artificial/transf_None/trend_Lag1Trend/cycle_12/ar_/test_artificial_32_None_Lag1Trend_12__100.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
tests/artificial/transf_None/trend_Lag1Trend/cycle_12/ar_/test_artificial_32_None_Lag1Trend_12__100.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
1
2019-11-30T23:39:38.000Z
2019-12-01T04:34:35.000Z
tests/artificial/transf_None/trend_Lag1Trend/cycle_12/ar_/test_artificial_32_None_Lag1Trend_12__100.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
import pyaf.Bench.TS_datasets as tsds import pyaf.tests.artificial.process_artificial_dataset as art art.process_dataset(N = 32 , FREQ = 'D', seed = 0, trendtype = "Lag1Trend", cycle_length = 12, transform = "None", sigma = 0.0, exog_count = 100, ar_order = 0);
37.857143
160
0.728302
import pyaf.Bench.TS_datasets as tsds import pyaf.tests.artificial.process_artificial_dataset as art art.process_dataset(N = 32 , FREQ = 'D', seed = 0, trendtype = "Lag1Trend", cycle_length = 12, transform = "None", sigma = 0.0, exog_count = 100, ar_order = 0);
true
true
f762f2ec2f396082a9a82ff8326095e8206a0e9f
846
py
Python
webots/controllers/ur_controller/kinematics/kinematics.py
EmilRyberg/P8LH7Grounding
406fdf4ce9afd160df3d7105fedea563a284974b
[ "MIT" ]
1
2021-02-09T12:13:28.000Z
2021-02-09T12:13:28.000Z
webots/controllers/ur_controller/kinematics/kinematics.py
EmilRyberg/P8LH7Grounding
406fdf4ce9afd160df3d7105fedea563a284974b
[ "MIT" ]
null
null
null
webots/controllers/ur_controller/kinematics/kinematics.py
EmilRyberg/P8LH7Grounding
406fdf4ce9afd160df3d7105fedea563a284974b
[ "MIT" ]
null
null
null
import numpy as np from kinematics.dhparameters import DHParameters class Kinematics: def __init__(self): self.joint1_dh = DHParameters(0, 0.1625, 0) self.joint2_dh = DHParameters(0, 0, np.pi / 2) self.joint3_dh = DHParameters(-0.425, 0, 0) self.joint4_dh = DHParameters(-0.39225, ...
30.214286
62
0.568558
import numpy as np from kinematics.dhparameters import DHParameters class Kinematics: def __init__(self): self.joint1_dh = DHParameters(0, 0.1625, 0) self.joint2_dh = DHParameters(0, 0, np.pi / 2) self.joint3_dh = DHParameters(-0.425, 0, 0) self.joint4_dh = DHParameters(-0.39225, ...
true
true
f762f3059899f29d7c7a052e09421dc98a524fa2
9,550
py
Python
sdk/python/pulumi_azure_nextgen/network/v20181101/p2s_vpn_gateway.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_nextgen/network/v20181101/p2s_vpn_gateway.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_nextgen/network/v20181101/p2s_vpn_gateway.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
47.75
1,351
0.674241
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs from ._inputs import * __all__ = ['P2sVpnGateway'] class P2sVpnGateway(pulumi.CustomResource): def __init__(__self__, resource...
true
true
f762f47589475a0e7bc111c4949b2b46875a97a4
5,433
py
Python
src/diem/txnmetadata.py
firstdag/client-sdk-python
fbdbc155fbe304ca22f2123b70fc6c988f57e81e
[ "Apache-2.0" ]
null
null
null
src/diem/txnmetadata.py
firstdag/client-sdk-python
fbdbc155fbe304ca22f2123b70fc6c988f57e81e
[ "Apache-2.0" ]
null
null
null
src/diem/txnmetadata.py
firstdag/client-sdk-python
fbdbc155fbe304ca22f2123b70fc6c988f57e81e
[ "Apache-2.0" ]
null
null
null
# Copyright (c) The Diem Core Contributors # SPDX-License-Identifier: Apache-2.0 """LIP-4 Transaction Metadata Utilities This module implements utility functions for application to create transaction metadata and metadata signature. See https://dip.diem.com/dip-4 for more details """ from dataclasses import datacl...
37.993007
119
0.741395
from dataclasses import dataclass import typing from . import diem_types, serde_types, bcs, jsonrpc, utils class InvalidEventMetadataForRefundError(Exception): pass @dataclass class Attest: metadata: diem_types.Metadata sender_address: diem_types.AccountAddress amount: serde_types.uint64 ...
true
true
f762f5b8bf51da2156874ac019be4c831b8600da
3,523
py
Python
aiohttp/web_middlewares.py
dfroger/aiohttp
03d83b082fce200ddece85de1dbcb2232bcb885c
[ "Apache-2.0" ]
2
2018-12-09T05:30:39.000Z
2020-02-22T09:35:39.000Z
aiohttp/web_middlewares.py
dfroger/aiohttp
03d83b082fce200ddece85de1dbcb2232bcb885c
[ "Apache-2.0" ]
1
2019-01-24T09:33:42.000Z
2019-01-24T09:33:42.000Z
aiohttp/web_middlewares.py
dfroger/aiohttp
03d83b082fce200ddece85de1dbcb2232bcb885c
[ "Apache-2.0" ]
2
2019-05-23T09:06:25.000Z
2021-07-07T10:33:58.000Z
import re from aiohttp.web_exceptions import HTTPMovedPermanently from aiohttp.web_urldispatcher import SystemRoute __all__ = ( 'middleware', 'normalize_path_middleware', ) async def _check_request_resolves(request, path): alt_request = request.clone(rel_url=path) match_info = await request.app.ro...
32.62037
77
0.648311
import re from aiohttp.web_exceptions import HTTPMovedPermanently from aiohttp.web_urldispatcher import SystemRoute __all__ = ( 'middleware', 'normalize_path_middleware', ) async def _check_request_resolves(request, path): alt_request = request.clone(rel_url=path) match_info = await request.app.ro...
true
true
f762f5d98730991abacf3db1b3b0ecc3495e6d83
1,543
py
Python
Lib/distutils/tests/test_bdist.py
Hadron/python
73137f499ed658169f49273eee46845e3b53e800
[ "PSF-2.0" ]
486
2016-05-28T18:51:54.000Z
2022-03-20T17:30:31.000Z
Lib/distutils/tests/test_bdist.py
Hadron/python
73137f499ed658169f49273eee46845e3b53e800
[ "PSF-2.0" ]
42
2018-05-25T15:57:08.000Z
2021-01-17T18:39:59.000Z
Lib/distutils/tests/test_bdist.py
Hadron/python
73137f499ed658169f49273eee46845e3b53e800
[ "PSF-2.0" ]
74
2015-05-29T17:18:53.000Z
2022-01-15T14:06:44.000Z
"""Tests for distutils.command.bdist.""" import os import unittest from test.support import run_unittest from distutils.command.bdist import bdist from distutils.tests import support class BuildTestCase(support.TempdirManager, unittest.TestCase): def test_formats(self): # let's creat...
30.254902
90
0.609203
import os import unittest from test.support import run_unittest from distutils.command.bdist import bdist from distutils.tests import support class BuildTestCase(support.TempdirManager, unittest.TestCase): def test_formats(self): # we can set the format dist = self.cr...
true
true
f762f5e8ba1dd2323da6c17635296cfd66cf9b74
640
py
Python
python/hash_table/linked_list.py
samuelclark907/data-structures-and-algorithms
8aca5d8cf341207457a71872d3febe7e154f6331
[ "MIT" ]
null
null
null
python/hash_table/linked_list.py
samuelclark907/data-structures-and-algorithms
8aca5d8cf341207457a71872d3febe7e154f6331
[ "MIT" ]
2
2020-12-21T00:18:06.000Z
2021-01-19T06:55:11.000Z
python/repeated_word/linked_list.py
samuelclark907/data-structures-and-algorithms
8aca5d8cf341207457a71872d3febe7e154f6331
[ "MIT" ]
null
null
null
class Node: def __init__(self, data): self.data = data self.next = None class LinkedList: def __init__(self): self.head = None def add(self, data): node = Node(data) # if list is empty if not self.head: self.head = node else: ...
22.857143
39
0.509375
class Node: def __init__(self, data): self.data = data self.next = None class LinkedList: def __init__(self): self.head = None def add(self, data): node = Node(data) if not self.head: self.head = node else: current = self.hea...
true
true
f762f810a4664dbc73d108fbc62b00bcd660aa27
1,130
py
Python
centrifuge/repository/crawler_arxiv_repo.py
datadonK23/Engine
8f69747fcf18325d1e72dc1ee970e1367db66f68
[ "Apache-2.0" ]
15
2018-05-04T21:17:39.000Z
2021-11-14T11:41:34.000Z
centrifuge/repository/crawler_arxiv_repo.py
datadonK23/Engine
8f69747fcf18325d1e72dc1ee970e1367db66f68
[ "Apache-2.0" ]
10
2018-07-19T16:06:57.000Z
2018-10-12T09:33:32.000Z
centrifuge/repository/crawler_arxiv_repo.py
datadonK23/Engine
8f69747fcf18325d1e72dc1ee970e1367db66f68
[ "Apache-2.0" ]
4
2018-04-25T12:34:28.000Z
2020-04-09T15:19:19.000Z
import urllib.request import feedparser import ujson from centrifuge.domain import document as ad class CrawlerArxivRepo: """ This is a helper class to parse arxiv.org site. It uses the arxiv.org REST API to search for articles. based on karpathy's arxiv-sanity: https://github.com/karpathy/arxiv-...
26.27907
82
0.634513
import urllib.request import feedparser import ujson from centrifuge.domain import document as ad class CrawlerArxivRepo: base_url = 'https://keepcurrent-crawler.herokuapp.com/' def list(self, filters=None): if not filters: return self.fetch_papers() def run_query(self)...
true
true
f762f84a2d94552356b8acb30a0a87dd39442839
4,673
py
Python
examples/python/route_guide/route_guide_server.py
sarthakpati/grpc
1e27b888c4401d4d6462f4c6d9e23fd4345c98bd
[ "Apache-2.0" ]
null
null
null
examples/python/route_guide/route_guide_server.py
sarthakpati/grpc
1e27b888c4401d4d6462f4c6d9e23fd4345c98bd
[ "Apache-2.0" ]
null
null
null
examples/python/route_guide/route_guide_server.py
sarthakpati/grpc
1e27b888c4401d4d6462f4c6d9e23fd4345c98bd
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
33.618705
78
0.645838
from concurrent import futures import time import math import logging import grpc import route_guide_pb2 import route_guide_pb2_grpc import route_guide_resources def get_feature(feature_db, point): for feature in feature_db: if feature.location == point: return feature return None def...
true
true
f762fa9a3f44165d11754d98c8cea13b84b39a7c
6,916
py
Python
werobot/messages/events.py
wrndlb/WeRoBot
c23c003a8d425c74bc65c71ed92fdcfe68f0a813
[ "MIT" ]
1,904
2018-04-26T02:05:13.000Z
2022-03-31T11:38:46.000Z
werobot/messages/events.py
wongjanwei/WeRoBot
63a868172ad992658185c024d6c2f33b95ec3687
[ "MIT" ]
422
2018-05-02T14:56:00.000Z
2022-03-29T00:20:01.000Z
werobot/messages/events.py
wongjanwei/WeRoBot
63a868172ad992658185c024d6c2f33b95ec3687
[ "MIT" ]
393
2018-04-28T15:02:09.000Z
2022-03-25T16:24:16.000Z
# -*- coding: utf-8 -*- from werobot.messages.entries import StringEntry, IntEntry, FloatEntry from werobot.messages.base import WeRoBotMetaClass class EventMetaClass(WeRoBotMetaClass): pass class WeChatEvent(object, metaclass=EventMetaClass): target = StringEntry('ToUserName') source = StringEntry('Fr...
28.113821
72
0.737276
from werobot.messages.entries import StringEntry, IntEntry, FloatEntry from werobot.messages.base import WeRoBotMetaClass class EventMetaClass(WeRoBotMetaClass): pass class WeChatEvent(object, metaclass=EventMetaClass): target = StringEntry('ToUserName') source = StringEntry('FromUserName') time = ...
true
true
f762fb68bc806af142b891a0dacaf38c6742cec2
212
py
Python
algorithms/888. Fair Candy Swap.py
woozway/py3-leetcode
e51a9ce7a6bb3e35c0fcb8c8f4f6cd5763708dbf
[ "MIT" ]
1
2020-12-02T13:54:30.000Z
2020-12-02T13:54:30.000Z
algorithms/888. Fair Candy Swap.py
woozway/py3-leetcode
e51a9ce7a6bb3e35c0fcb8c8f4f6cd5763708dbf
[ "MIT" ]
null
null
null
algorithms/888. Fair Candy Swap.py
woozway/py3-leetcode
e51a9ce7a6bb3e35c0fcb8c8f4f6cd5763708dbf
[ "MIT" ]
null
null
null
class Solution: def fairCandySwap(self, A: List[int], B: List[int]) -> List[int]: Sa, Sb = sum(A), sum(B) setB = set(B) for x in A: if x + (Sb-Sa)/2 in setB: return [x, x + (Sb-Sa)/2]
26.5
67
0.518868
class Solution: def fairCandySwap(self, A: List[int], B: List[int]) -> List[int]: Sa, Sb = sum(A), sum(B) setB = set(B) for x in A: if x + (Sb-Sa)/2 in setB: return [x, x + (Sb-Sa)/2]
true
true
f762fc310664929c1464047a5b6c1402337d221b
1,771
py
Python
backend/server/apps/ml/income_classifier/extra_trees.py
omkarudawant/ML-Service
cb612585cbe9619b86c6ea44dd9069a1bc28a8f8
[ "MIT" ]
1
2020-05-04T08:19:31.000Z
2020-05-04T08:19:31.000Z
backend/server/apps/ml/income_classifier/extra_trees.py
omkarudawant/ML-Service
cb612585cbe9619b86c6ea44dd9069a1bc28a8f8
[ "MIT" ]
1
2020-05-01T18:22:51.000Z
2020-05-01T18:22:51.000Z
backend/server/apps/ml/income_classifier/extra_trees.py
omkarudawant/ML-Service
cb612585cbe9619b86c6ea44dd9069a1bc28a8f8
[ "MIT" ]
null
null
null
import joblib import pandas as pd class ExtraTreesClassifier: def __init__(self): path_to_artifacts = "../../research/" self.values_fill_missing = joblib.load(path_to_artifacts + "train_mode.joblib") self.encoders = joblib.load(path_to_artifac...
34.057692
77
0.573123
import joblib import pandas as pd class ExtraTreesClassifier: def __init__(self): path_to_artifacts = "../../research/" self.values_fill_missing = joblib.load(path_to_artifacts + "train_mode.joblib") self.encoders = joblib.load(path_to_artifac...
true
true
f762fd75ac9af524aa4035cbcc17a91dab1610e1
3,832
py
Python
qiskit/_compositegate.py
charlesastaylor/qiskit-terra
8670669171bae8d619b6eaee6d08f8630e99f012
[ "Apache-2.0" ]
null
null
null
qiskit/_compositegate.py
charlesastaylor/qiskit-terra
8670669171bae8d619b6eaee6d08f8630e99f012
[ "Apache-2.0" ]
1
2019-04-09T02:22:38.000Z
2019-04-09T02:22:38.000Z
qiskit/_compositegate.py
charlesastaylor/qiskit-terra
8670669171bae8d619b6eaee6d08f8630e99f012
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2017, IBM. # # This source code is licensed under the Apache License, Version 2.0 found in # the LICENSE.txt file in the root directory of this source tree. """ Composite gate, a container for a sequence of unitary gates. """ from ._gate import Gate from ._qiskiterror import QISKit...
32.201681
77
0.612213
from ._gate import Gate from ._qiskiterror import QISKitError class CompositeGate(Gate): def __init__(self, name, param, qargs, circuit=None, inverse_name=None): super().__init__(name, param, qargs, circuit) self.data = [] self.inverse_flag = False self.inverse_name = inverse_n...
true
true
f762fdbbe974e0e70e65297cd27a35c1622b9f69
2,994
py
Python
moanna/helper/SurvivalHelperFunctions.py
rlupat/moanna
81e97b95033a2c1004429c17c41d1c660e62bc83
[ "MIT" ]
2
2021-02-13T18:24:43.000Z
2022-01-23T04:17:06.000Z
moanna/helper/SurvivalHelperFunctions.py
rlupat/moanna
81e97b95033a2c1004429c17c41d1c660e62bc83
[ "MIT" ]
null
null
null
moanna/helper/SurvivalHelperFunctions.py
rlupat/moanna
81e97b95033a2c1004429c17c41d1c660e62bc83
[ "MIT" ]
1
2021-06-29T13:39:13.000Z
2021-06-29T13:39:13.000Z
def map_label(df, column, mapping): df[column] = df[column].replace(mapping) return df def map_mult_labels(df, columns, labels): for column in columns: df = map_label(df, labels[column][0], labels[column][1]) return df #https://stackoverflow.com/questions/26886653/pandas-create-new-column...
41.013699
124
0.659653
def map_label(df, column, mapping): df[column] = df[column].replace(mapping) return df def map_mult_labels(df, columns, labels): for column in columns: df = map_label(df, labels[column][0], labels[column][1]) return df def surv_event(row, surv_year): if row['Event'] in ["DECEASED", "R...
true
true
f762fdd0a32a00837e073c5832aea0709c1f677a
1,444
py
Python
Repitope_Prioritization_MHCII.py
masato-ogishi/Repitope-Python
19b040c24ffc023c3d13cebd67dea338818d1c42
[ "MIT" ]
2
2019-10-10T08:47:14.000Z
2020-06-23T15:36:11.000Z
Repitope_Prioritization_MHCII.py
masato-ogishi/Repitope-Python
19b040c24ffc023c3d13cebd67dea338818d1c42
[ "MIT" ]
1
2021-11-25T17:08:50.000Z
2021-11-25T17:08:50.000Z
Repitope_Prioritization_MHCII.py
masato-ogishi/Repitope-Python
19b040c24ffc023c3d13cebd67dea338818d1c42
[ "MIT" ]
null
null
null
cpu = str(4) memory = "60G" pept_len_range = "11:30" ## For MHC-II prediction home = "C:/Repitope" target_peptide_file = home + "/peptide_test.txt" tcr_frag_file = home + "/FragmentLibrary.fst" mhcii_feature_file = home + "/FeatureDF_MHCII_Weighted.10000.fst" import pyper r = pyper.R() command = "options...
28.88
114
0.67867
cpu = str(4) memory = "60G" pept_len_range = "11:30" home = "C:/Repitope" target_peptide_file = home + "/peptide_test.txt" tcr_frag_file = home + "/FragmentLibrary.fst" mhcii_feature_file = home + "/FeatureDF_MHCII_Weighted.10000.fst" import pyper r = pyper.R() command = "options(java.parameters='-Xmx" + ...
true
true
f762fe6ab67a51d00167aa4d951192c1f1575559
2,411
py
Python
latest/protocol/ip.py
Soldie/Nscan-scanner-ip
4a507ca97a9f8b7f3fa4766c835f108671dbbcd6
[ "Apache-2.0" ]
574
2015-01-30T13:02:42.000Z
2022-03-13T17:12:12.000Z
latest/protocol/ip.py
DiamondLink/Nscan
21a8986358107e5b86952cf9276510d14afc5ab6
[ "Apache-2.0" ]
10
2015-01-31T15:36:21.000Z
2021-11-17T10:46:33.000Z
latest/protocol/ip.py
DiamondLink/Nscan
21a8986358107e5b86952cf9276510d14afc5ab6
[ "Apache-2.0" ]
173
2015-01-30T13:05:36.000Z
2022-01-22T10:18:10.000Z
''' Class define IP protocol ''' import socket import struct from common import checksum class layer(object): pass class IP(object): def __init__(self, src, dst, proto=socket.IPPROTO_TCP): self.version = 4 self.ihl = 5 # Internet Header Length self.tos = 0 # Type of Service ...
30.1375
64
0.469515
import socket import struct from common import checksum class layer(object): pass class IP(object): def __init__(self, src, dst, proto=socket.IPPROTO_TCP): self.version = 4 self.ihl = 5 self.tos = 0 self.length = 40 self.id = 54321 self.flags = 0 self.of...
true
true
f762fe6d3bc79b3efc46c420859dc1520fa0d66a
25,099
py
Python
venv/lib/python3.6/site-packages/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_asm_policy_signature_set.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
1
2020-01-22T13:11:23.000Z
2020-01-22T13:11:23.000Z
venv/lib/python3.6/site-packages/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_asm_policy_signature_set.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
12
2020-02-21T07:24:52.000Z
2020-04-14T09:54:32.000Z
venv/lib/python3.6/site-packages/ansible_collections/f5networks/f5_modules/plugins/modules/bigip_asm_policy_signature_set.py
usegalaxy-no/usegalaxy
75dad095769fe918eb39677f2c887e681a747f3a
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2018, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = r''' --- module: bigip_asm_policy_signat...
35.201964
120
0.6162
from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = r''' --- module: bigip_asm_policy_signature_set short_description: Manages Signature Sets on an ASM policy description: - Manages Signature Sets on an ASM policy. version_added: "1.0.0" options: name: descrip...
true
true
f76302f3a6162d9e3edca786afc6f0fc0cf35ca9
654
py
Python
12.py
theseana/pesteh
1125dc1055e3b8466c3c539c4afc2149d663dd46
[ "MIT" ]
1
2022-01-16T00:33:57.000Z
2022-01-16T00:33:57.000Z
12.py
theseana/pesteh
1125dc1055e3b8466c3c539c4afc2149d663dd46
[ "MIT" ]
null
null
null
12.py
theseana/pesteh
1125dc1055e3b8466c3c539c4afc2149d663dd46
[ "MIT" ]
null
null
null
from tkinter import * def avg(): a = int(e1.get()) + int(e2.get()) + int(e3.get()) a = a/3 l4['text'] = a root = Tk() l1 = Label(root, text='Math') l1.grid(row=0, column=0) l2 = Label(root, text='Science') l2.grid(row=1, column=0) l3 = Label(root, text='History') l3.grid(row=2, column=0) e1 = Entry(r...
16.35
54
0.622324
from tkinter import * def avg(): a = int(e1.get()) + int(e2.get()) + int(e3.get()) a = a/3 l4['text'] = a root = Tk() l1 = Label(root, text='Math') l1.grid(row=0, column=0) l2 = Label(root, text='Science') l2.grid(row=1, column=0) l3 = Label(root, text='History') l3.grid(row=2, column=0) e1 = Entry(r...
true
true
f76302fdd32732a3af8c06eed2014cb405fc1e7b
688
py
Python
mayan/apps/announcements/permissions.py
nattangwiwat/Mayan-EDMS-recitation
fcf16afb56eae812fb99144d65ae1ae6749de0b7
[ "Apache-2.0" ]
343
2015-01-05T14:19:35.000Z
2018-12-10T19:07:48.000Z
mayan/apps/announcements/permissions.py
nattangwiwat/Mayan-EDMS-recitation
fcf16afb56eae812fb99144d65ae1ae6749de0b7
[ "Apache-2.0" ]
191
2015-01-03T00:48:19.000Z
2018-11-30T09:10:25.000Z
mayan/apps/announcements/permissions.py
nattangwiwat/Mayan-EDMS-recitation
fcf16afb56eae812fb99144d65ae1ae6749de0b7
[ "Apache-2.0" ]
257
2019-05-14T10:26:37.000Z
2022-03-30T03:37:36.000Z
from django.utils.translation import ugettext_lazy as _ from mayan.apps.permissions import PermissionNamespace namespace = PermissionNamespace( label=_('Announcements'), name='announcements' ) permission_announcement_create = namespace.add_permission( label=_('Create announcements'), name='announcement_creat...
32.761905
63
0.803779
from django.utils.translation import ugettext_lazy as _ from mayan.apps.permissions import PermissionNamespace namespace = PermissionNamespace( label=_('Announcements'), name='announcements' ) permission_announcement_create = namespace.add_permission( label=_('Create announcements'), name='announcement_creat...
true
true
f763059eb7944793f5098af41af78aa79fa2ad52
20,125
py
Python
pandaharvester/harvesterfifo/mysql_fifo.py
tsulaiav/harvester
ca3f78348019dd616738f2da7d50e81700a8e6b9
[ "Apache-2.0" ]
null
null
null
pandaharvester/harvesterfifo/mysql_fifo.py
tsulaiav/harvester
ca3f78348019dd616738f2da7d50e81700a8e6b9
[ "Apache-2.0" ]
null
null
null
pandaharvester/harvesterfifo/mysql_fifo.py
tsulaiav/harvester
ca3f78348019dd616738f2da7d50e81700a8e6b9
[ "Apache-2.0" ]
null
null
null
import time import functools import warnings from pandaharvester.harvestercore import core_utils from pandaharvester.harvestercore.plugin_base import PluginBase from pandaharvester.harvesterconfig import harvester_config warnings.simplefilter("ignore") class MysqlFifo(PluginBase): # constructor def __init__...
37.546642
129
0.523627
import time import functools import warnings from pandaharvester.harvestercore import core_utils from pandaharvester.harvestercore.plugin_base import PluginBase from pandaharvester.harvesterconfig import harvester_config warnings.simplefilter("ignore") class MysqlFifo(PluginBase): def __init__(self, **kwarg...
true
true
f763069c36b3dc5b8c207df96c9561b4183169b6
8,819
py
Python
datasets/xnli/xnli.py
zidingz/datasets
02edd9ebc79f715adb1c718d1439fda83dc356f1
[ "Apache-2.0" ]
2
2021-08-28T06:48:02.000Z
2021-08-28T23:18:34.000Z
datasets/xnli/xnli.py
zidingz/datasets
02edd9ebc79f715adb1c718d1439fda83dc356f1
[ "Apache-2.0" ]
8
2021-10-01T12:00:18.000Z
2021-10-08T18:50:05.000Z
datasets/xnli/xnli.py
zidingz/datasets
02edd9ebc79f715adb1c718d1439fda83dc356f1
[ "Apache-2.0" ]
4
2021-07-25T17:09:39.000Z
2022-02-12T03:30:08.000Z
# coding=utf-8 # Copyright 2020 The TensorFlow Datasets Authors and the HuggingFace Datasets Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LI...
41.403756
112
0.542692
import collections import csv import os from contextlib import ExitStack import datasets _CITATION = """\ @InProceedings{conneau2018xnli, author = {Conneau, Alexis and Rinott, Ruty and Lample, Guillaume and Williams, Adina and Bowman, Samuel R....
true
true
f76307b8e82d371926f8b8aa3cf0f81008d8245d
8,933
py
Python
elements_sdk/models/aws_account_partial_update.py
elements-storage/elements-sdk-python
39c365fe079dcd5928c5fe1bbaa67389bd5a3d81
[ "MIT" ]
6
2020-11-16T23:15:18.000Z
2022-03-14T03:56:12.000Z
elements_sdk/models/aws_account_partial_update.py
elements-storage/elements-sdk-python
39c365fe079dcd5928c5fe1bbaa67389bd5a3d81
[ "MIT" ]
1
2021-07-28T13:03:49.000Z
2021-08-25T12:24:01.000Z
elements_sdk/models/aws_account_partial_update.py
elements-storage/elements-sdk-python
39c365fe079dcd5928c5fe1bbaa67389bd5a3d81
[ "MIT" ]
null
null
null
# coding: utf-8 """ ELEMENTS API The version of the OpenAPI document: 2 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from elements_sdk.configuration import Configuration class AWSAccountPartialUpdate(object): """NOTE: This class is auto genera...
35.875502
334
0.627561
import pprint import re import six from elements_sdk.configuration import Configuration class AWSAccountPartialUpdate(object): openapi_types = { 'name': 'str', 'access_key_id': 'str', 'secret_access_key': 'str', 'endpoint_url': 'str', 'default_region': 'str' } ...
true
true
f763083499562ae3f574584a919f8a0d954b4f8e
60,586
py
Python
entsoe/entsoe.py
ment911/entsoe-py
67cb4386796c242c112512fbf1f50b68723c861a
[ "MIT" ]
null
null
null
entsoe/entsoe.py
ment911/entsoe-py
67cb4386796c242c112512fbf1f50b68723c861a
[ "MIT" ]
null
null
null
entsoe/entsoe.py
ment911/entsoe-py
67cb4386796c242c112512fbf1f50b68723c861a
[ "MIT" ]
null
null
null
import logging from functools import wraps from socket import gaierror from time import sleep from typing import Union, Optional, Dict import pandas as pd from pandas.tseries.offsets import YearBegin, YearEnd import pytz import requests from bs4 import BeautifulSoup from entsoe.exceptions import InvalidPSRTypeError, ...
33.362335
116
0.573581
import logging from functools import wraps from socket import gaierror from time import sleep from typing import Union, Optional, Dict import pandas as pd from pandas.tseries.offsets import YearBegin, YearEnd import pytz import requests from bs4 import BeautifulSoup from entsoe.exceptions import InvalidPSRTypeError, ...
true
true
f76309b7675f3bdc67373879851d4f830e62eaf9
6,821
py
Python
samples/client/petstore/python/petstore_api/model/additional_properties_boolean.py
gasugesu/openapi-generator
e1c43f135639b9f300350f788fec98bbc375c932
[ "Apache-2.0" ]
3
2021-05-19T03:12:48.000Z
2022-01-28T19:15:42.000Z
samples/client/petstore/python/petstore_api/model/additional_properties_boolean.py
gasugesu/openapi-generator
e1c43f135639b9f300350f788fec98bbc375c932
[ "Apache-2.0" ]
3
2021-05-11T23:55:26.000Z
2022-02-27T11:17:21.000Z
samples/client/petstore/python/petstore_api/model/additional_properties_boolean.py
gasugesu/openapi-generator
e1c43f135639b9f300350f788fec98bbc375c932
[ "Apache-2.0" ]
1
2020-10-05T11:13:04.000Z
2020-10-05T11:13:04.000Z
""" OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech """ import re # noq...
38.977143
174
0.586278
import re import sys import nulltype from petstore_api.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_compose...
true
true
f76309c6018a7b1af25fb2019cbd12bf1b1febf4
3,649
py
Python
smartsheet/models/folder.py
bromic007/smartsheet-python-sdk
ef256b7421a65a56a7138dc2b3eb5d69a1a06590
[ "Apache-2.0" ]
106
2015-02-21T14:26:32.000Z
2022-03-31T05:56:53.000Z
smartsheet/models/folder.py
bromic007/smartsheet-python-sdk
ef256b7421a65a56a7138dc2b3eb5d69a1a06590
[ "Apache-2.0" ]
94
2015-02-09T13:16:00.000Z
2022-03-16T06:37:41.000Z
smartsheet/models/folder.py
bromic007/smartsheet-python-sdk
ef256b7421a65a56a7138dc2b3eb5d69a1a06590
[ "Apache-2.0" ]
85
2015-02-06T22:05:25.000Z
2022-03-16T06:22:59.000Z
# pylint: disable=C0111,R0902,R0904,R0912,R0913,R0915,E1101 # Smartsheet Python SDK. # # Copyright 2018 Smartsheet.com, 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....
24.165563
78
0.641272
from __future__ import absolute_import from .report import Report from .sheet import Sheet from .sight import Sight from .template import Template from ..types import * from ..util import serialize from ..util import deserialize class Folder(object): def __init__(self, props=None, base_obj=None): self...
true
true
f7630a10a62153920e29a9cd82c37b1fb2e8c461
211
py
Python
Web crawler/db_write.py
Alex-NKG/gun-violence-news-data-analysis
5946097a5785c87bda9f99ec8d5c0cc3cfa225a5
[ "MIT" ]
null
null
null
Web crawler/db_write.py
Alex-NKG/gun-violence-news-data-analysis
5946097a5785c87bda9f99ec8d5c0cc3cfa225a5
[ "MIT" ]
null
null
null
Web crawler/db_write.py
Alex-NKG/gun-violence-news-data-analysis
5946097a5785c87bda9f99ec8d5c0cc3cfa225a5
[ "MIT" ]
null
null
null
import db_con class write_db: def __init__(self): self.db = db_con.connect_DB() def write_db(self, sql_query, vals): self.db.query(sql_query, vals) self.db.commit()
9.590909
40
0.597156
import db_con class write_db: def __init__(self): self.db = db_con.connect_DB() def write_db(self, sql_query, vals): self.db.query(sql_query, vals) self.db.commit()
true
true
f7630b43bce91255d30da2916eca8e787c7cdfaf
2,928
py
Python
stripedWords.py
lisprolog/python
3d2acea2721873d57418b9158ed3bed6e160eb16
[ "BSD-3-Clause" ]
null
null
null
stripedWords.py
lisprolog/python
3d2acea2721873d57418b9158ed3bed6e160eb16
[ "BSD-3-Clause" ]
null
null
null
stripedWords.py
lisprolog/python
3d2acea2721873d57418b9158ed3bed6e160eb16
[ "BSD-3-Clause" ]
null
null
null
''' Vowels -- A E I O U Y Consonants -- B C D F G H J K L M N P Q R S T V W X Z You are given a block of text with different words. These words are separated by white-spaces and punctuation marks. Numbers are not considered words in this mission (a mix of letters and digits is not a word either). You should count the ...
19.390728
523
0.569331
VOWELS = "AEIOUY0123456789" CONSONANTS = "BCDFGHJKLMNPQRSTVWXZ" def checkio(text): text = text.upper() newWord = [] for letter in text: if letter in VOWELS: newWord.append(0) elif letter in CONSONANTS: newWord.append(1) else: n...
true
true
f7630bd8d326c05d52e312709a0d075d1e0a60e1
3,176
py
Python
sdks/python/apache_beam/options/value_provider.py
szewi/beam
ae0de1bb5f44ab39969442932c662ecde668bce3
[ "Apache-2.0" ]
1
2020-11-08T07:49:18.000Z
2020-11-08T07:49:18.000Z
sdks/python/apache_beam/options/value_provider.py
szewi/beam
ae0de1bb5f44ab39969442932c662ecde668bce3
[ "Apache-2.0" ]
12
2019-11-13T04:59:52.000Z
2021-12-14T21:13:47.000Z
sdks/python/apache_beam/options/value_provider.py
szewi/beam
ae0de1bb5f44ab39969442932c662ecde668bce3
[ "Apache-2.0" ]
2
2017-09-23T14:41:17.000Z
2018-08-29T02:57:03.000Z
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
28.612613
74
0.72796
from functools import wraps from apache_beam import error __all__ = [ 'ValueProvider', 'StaticValueProvider', 'RuntimeValueProvider', 'check_accessible', ] class ValueProvider(object): def is_accessible(self): raise NotImplementedError( 'ValueProvider.is_accessible implemented i...
true
true
f7630cd0780351df00ac60b7294a76e0e5e87f26
7,062
py
Python
src/BELLA/results.py
noemiefedon/BELLA
ca86e5cd6f593478235c64aa4d0409b0e78dbcbb
[ "MIT" ]
null
null
null
src/BELLA/results.py
noemiefedon/BELLA
ca86e5cd6f593478235c64aa4d0409b0e78dbcbb
[ "MIT" ]
null
null
null
src/BELLA/results.py
noemiefedon/BELLA
ca86e5cd6f593478235c64aa4d0409b0e78dbcbb
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Class for the results of an optimisation with BELLA with several ply-drop layout """ __version__ = '2.0' __author__ = 'Noemie Fedon' import numpy as np #import sys #sys.path.append(r'C:\BELLA') #from src.divers.pretty_print import print_lampam, print_ss, print_list_ss class ...
36.973822
83
0.621637
__version__ = '2.0' __author__ = 'Noemie Fedon' import numpy as np class BELLA_Results(): def __init__(self, constraints, multipanel, parameters=None): if parameters is None: n_ini_ply_drops = 1 else: n_ini_ply_drops = parameters.n_ini_ply_drops s...
true
true
f7630d8555d790a1bc3ee14e75acce73d0ee8abe
23,745
py
Python
workflow/mtcnn_detector.py
lao-jiu/Facecluster
1603c99ae9f1f1d1d37f60ea30b20dde6cd4568e
[ "MIT" ]
null
null
null
workflow/mtcnn_detector.py
lao-jiu/Facecluster
1603c99ae9f1f1d1d37f60ea30b20dde6cd4568e
[ "MIT" ]
null
null
null
workflow/mtcnn_detector.py
lao-jiu/Facecluster
1603c99ae9f1f1d1d37f60ea30b20dde6cd4568e
[ "MIT" ]
null
null
null
# coding: utf-8 import os import mxnet as mx import numpy as np import math import cv2 from multiprocessing import Pool from itertools import repeat try: from itertools import izip except ImportError: izip = zip from helper import nms, adjust_input, generate_bbox, detect_first_stage_warpper class MtcnnDetecto...
35.977273
124
0.496778
import os import mxnet as mx import numpy as np import math import cv2 from multiprocessing import Pool from itertools import repeat try: from itertools import izip except ImportError: izip = zip from helper import nms, adjust_input, generate_bbox, detect_first_stage_warpper class MtcnnDetector(object): d...
true
true
f7630e936a54405eae84feaad8eca36e493604f3
10,291
py
Python
src/Services/FaceRecognition/face_recognition/managers/base.py
Amir-Shamsi/facial-recognition-login-api
e37e9cdf63f98a53693b3d07a0fb79b1304d4ab9
[ "CC0-1.0" ]
8
2019-02-25T14:09:21.000Z
2021-12-24T07:48:18.000Z
src/Services/FaceRecognition/face_recognition/managers/base.py
Amir-Shamsi/facial-recognition-login-api
e37e9cdf63f98a53693b3d07a0fb79b1304d4ab9
[ "CC0-1.0" ]
7
2019-03-20T14:40:34.000Z
2021-10-03T13:13:09.000Z
src/Services/FaceRecognition/face_recognition/managers/base.py
Amir-Shamsi/facial-recognition-login-api
e37e9cdf63f98a53693b3d07a0fb79b1304d4ab9
[ "CC0-1.0" ]
3
2021-02-10T20:25:39.000Z
2022-02-10T14:11:54.000Z
""" Defines base FacePP resource manager class and it's infrastructure. """ from .. import exceptions, resultsets, utilities class ResourceManager(object): """ Manages given FacePP resource class with the help of facepp object. """ def __init__(self, facepp, resource_class): """ :para...
35.857143
113
0.650277
from .. import exceptions, resultsets, utilities class ResourceManager(object): def __init__(self, facepp, resource_class): self.url = '' self.params = {} self.container = None self.facepp = facepp self.resource_class = resource_class def to_resource(self, resource): ...
true
true
f7630f71fb95342c2f58def5329083168fb9419e
138
py
Python
pylox/exceptions/ScannerExceptions.py
hculpan/pylox
a5bde624f289115575e9e01bd171b6271c2e899a
[ "MIT" ]
1
2018-05-18T08:16:02.000Z
2018-05-18T08:16:02.000Z
pylox/exceptions/ScannerExceptions.py
hculpan/pylox
a5bde624f289115575e9e01bd171b6271c2e899a
[ "MIT" ]
null
null
null
pylox/exceptions/ScannerExceptions.py
hculpan/pylox
a5bde624f289115575e9e01bd171b6271c2e899a
[ "MIT" ]
null
null
null
class ScannerException(Exception): def __init__(self, message, token=None): self.message = message self.token = token
27.6
44
0.673913
class ScannerException(Exception): def __init__(self, message, token=None): self.message = message self.token = token
true
true
f7631072040b7244589824600313b40799c26dd5
114
py
Python
copyright/models.py
arteria/django-copyright
573caffc9d919c0b390b2c115f8d2e973eeefc69
[ "BSD-3-Clause" ]
1
2015-10-20T05:02:16.000Z
2015-10-20T05:02:16.000Z
copyright/models.py
arteria/django-copyright
573caffc9d919c0b390b2c115f8d2e973eeefc69
[ "BSD-3-Clause" ]
null
null
null
copyright/models.py
arteria/django-copyright
573caffc9d919c0b390b2c115f8d2e973eeefc69
[ "BSD-3-Clause" ]
2
2015-01-28T10:15:20.000Z
2019-08-19T20:09:04.000Z
from django.db import models # class Example(models.Model): # text = models.TextField(blank=True, null=True)
19
51
0.72807
from django.db import models
true
true
f7631105f655055c0fd09ed2cc2bcff4b5aff8d9
340
py
Python
yaaf/agents/__init__.py
ilvieira/yaaf
931bde3dbad521bf5fb2744793f54791ca7add11
[ "Apache-2.0" ]
18
2019-06-01T17:17:25.000Z
2022-01-21T16:09:20.000Z
yaaf/agents/__init__.py
ilvieira/yaaf
931bde3dbad521bf5fb2744793f54791ca7add11
[ "Apache-2.0" ]
null
null
null
yaaf/agents/__init__.py
ilvieira/yaaf
931bde3dbad521bf5fb2744793f54791ca7add11
[ "Apache-2.0" ]
2
2021-02-15T10:11:41.000Z
2021-03-20T21:38:34.000Z
from yaaf.agents.Agent import Agent from yaaf.agents.GreedyMDPAgent import GreedyMDPAgent from yaaf.agents.HumanAgent import HumanAgent from yaaf.agents.QLearningAgent import QLearningAgent from yaaf.agents.SARSAAgent import SARSAAgent from yaaf.agents.RandomAgent import RandomAgent DummyAgent = RandomAgent OptimalAge...
34
53
0.867647
from yaaf.agents.Agent import Agent from yaaf.agents.GreedyMDPAgent import GreedyMDPAgent from yaaf.agents.HumanAgent import HumanAgent from yaaf.agents.QLearningAgent import QLearningAgent from yaaf.agents.SARSAAgent import SARSAAgent from yaaf.agents.RandomAgent import RandomAgent DummyAgent = RandomAgent OptimalAge...
true
true
f7631173b912f47f3f617ab589a7e2343fe9b4e2
564
py
Python
spider/master_neg.py
iecasszyjy/tweet_search-master
e4978521a39964c22ae46bf35d6ff17710e8e6c6
[ "MIT" ]
null
null
null
spider/master_neg.py
iecasszyjy/tweet_search-master
e4978521a39964c22ae46bf35d6ff17710e8e6c6
[ "MIT" ]
2
2021-03-31T18:54:16.000Z
2021-12-13T19:49:08.000Z
spider/master_neg.py
iecasszyjy/tweet_search-master
e4978521a39964c22ae46bf35d6ff17710e8e6c6
[ "MIT" ]
null
null
null
import re import json import random random.seed(1) from Config import get_config _,db,r = get_config() stopwords_en = db.event_metadata.find_one({'name':'stopwords_en'})['data'] def get_stopwords(): return stopwords_en[random.randint(0,len(stopwords_en)-1)] def get_task(): for item in db.dataset.find({},{'_id':1...
22.56
74
0.689716
import re import json import random random.seed(1) from Config import get_config _,db,r = get_config() stopwords_en = db.event_metadata.find_one({'name':'stopwords_en'})['data'] def get_stopwords(): return stopwords_en[random.randint(0,len(stopwords_en)-1)] def get_task(): for item in db.dataset.find({},{'_id':1...
false
true
f7631177ec5146d78599744e9c3d6e2053416d96
1,284
py
Python
clients/client/python/test/test_self_service_settings_flow.py
ory/sdk-generator
958314d130922ad6f20f439b5230141a832231a5
[ "Apache-2.0" ]
null
null
null
clients/client/python/test/test_self_service_settings_flow.py
ory/sdk-generator
958314d130922ad6f20f439b5230141a832231a5
[ "Apache-2.0" ]
null
null
null
clients/client/python/test/test_self_service_settings_flow.py
ory/sdk-generator
958314d130922ad6f20f439b5230141a832231a5
[ "Apache-2.0" ]
null
null
null
""" Ory APIs Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers. # noqa: E501 The version of the OpenAPI document: v0.0.1-alpha.187 Contact: support@ory.sh Generated by: ht...
29.860465
194
0.755452
import sys import unittest import ory_client from ory_client.model.identity import Identity from ory_client.model.self_service_settings_flow_state import SelfServiceSettingsFlowState from ory_client.model.ui_container import UiContainer globals()['Identity'] = Identity globals()['SelfServiceSettingsFlowState'] = Sel...
true
true
f76311a631d72f3b451fb4fc5730adb81412b02d
439
py
Python
test/integration/test_compilers.py
srjustice/kubos
ff33c17a7b5335d981cd0a49c65874f9f733338d
[ "Apache-2.0" ]
60
2017-01-12T18:14:33.000Z
2018-01-05T00:15:13.000Z
test/integration/test_compilers.py
srjustice/kubos
ff33c17a7b5335d981cd0a49c65874f9f733338d
[ "Apache-2.0" ]
120
2016-10-26T20:18:32.000Z
2018-01-05T23:27:36.000Z
test/integration/test_compilers.py
srjustice/kubos
ff33c17a7b5335d981cd0a49c65874f9f733338d
[ "Apache-2.0" ]
20
2016-11-23T15:25:37.000Z
2018-01-06T21:52:07.000Z
import unittest import re import subprocess class TestCompilers(unittest.TestCase): def test_latest_kubos_installed(self): bashCommand = "vagrant ssh -c 'mspdebug --version'" process = subprocess.Popen(bashCommand.split()) output, error = process.communicate() regex = re.compile(r"M...
29.266667
59
0.692483
import unittest import re import subprocess class TestCompilers(unittest.TestCase): def test_latest_kubos_installed(self): bashCommand = "vagrant ssh -c 'mspdebug --version'" process = subprocess.Popen(bashCommand.split()) output, error = process.communicate() regex = re.compile(r"M...
true
true
f76312bf5e624c925cd3c2fd2181e13a5ade7293
179
py
Python
tests/__init__.py
JordanReiter/let-me-in
f9ec8ae5460fbc9b9eb4708499bc0994c96d95a3
[ "MIT" ]
44
2018-07-16T13:29:31.000Z
2021-03-03T20:23:10.000Z
tests/__init__.py
JordanReiter/let-me-in
f9ec8ae5460fbc9b9eb4708499bc0994c96d95a3
[ "MIT" ]
1
2018-07-16T15:34:58.000Z
2018-07-16T16:50:16.000Z
tests/__init__.py
JordanReiter/let-me-in
f9ec8ae5460fbc9b9eb4708499bc0994c96d95a3
[ "MIT" ]
null
null
null
import sys import os __appname = 'letmein' __path_to_app = os.path.abspath(os.path.join(os.path.dirname(os.path.dirname(__file__)), __appname)) sys.path.insert(0, __path_to_app)
25.571429
100
0.776536
import sys import os __appname = 'letmein' __path_to_app = os.path.abspath(os.path.join(os.path.dirname(os.path.dirname(__file__)), __appname)) sys.path.insert(0, __path_to_app)
true
true
f76313c10223d2d74ff57c7f58d7c2d5e45d95fd
13,564
py
Python
pyqt数据库系统/仓库管理/Ui_product.py
yxg995995/yxg-code
7dd23f3dfb13d68ebc44bf7d5a344fb661c33136
[ "MIT" ]
1
2021-03-15T02:07:50.000Z
2021-03-15T02:07:50.000Z
pyqt数据库系统/仓库管理/Ui_product.py
yxg995995/yxg-code
7dd23f3dfb13d68ebc44bf7d5a344fb661c33136
[ "MIT" ]
null
null
null
pyqt数据库系统/仓库管理/Ui_product.py
yxg995995/yxg-code
7dd23f3dfb13d68ebc44bf7d5a344fb661c33136
[ "MIT" ]
1
2021-03-15T02:07:55.000Z
2021-03-15T02:07:55.000Z
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'fun.ui' # # Created by: PyQt5 UI code generator 5.12 # # WARNING! All changes made in this file will be lost! from PyQt5.QtWidgets import (QWidget , QHBoxLayout , QVBoxLayout , QApplication, QPushButton, QLineE...
44.618421
93
0.675022
from PyQt5.QtWidgets import (QWidget , QHBoxLayout , QVBoxLayout , QApplication, QPushButton, QLineEdit ,QLabel , QSplitter , QTableView , QHeaderView , QMessageBox ) from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtCore import Qt from PyQt5.Qt impor...
true
true
f7631449b4dedd2a104bc7894e2aea188002004b
8,369
py
Python
scripts/experiments.py
braineniac/adapt_kalman
a29a0740420959d2221d548a414031c17fa25cf8
[ "Apache-2.0" ]
null
null
null
scripts/experiments.py
braineniac/adapt_kalman
a29a0740420959d2221d548a414031c17fa25cf8
[ "Apache-2.0" ]
null
null
null
scripts/experiments.py
braineniac/adapt_kalman
a29a0740420959d2221d548a414031c17fa25cf8
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright (c) 2019 Daniel Hammer. 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 re...
37.868778
79
0.595531
import numpy as np from matplotlib import pyplot as plt from kalman_estimator import KalmanFilter from kalman_estimator import SysIO, KalmanEstimator from kalman_estimator import StateEstimator, EstimationPlots class Experiment(object): def __init__(self, sys_IO=None, kalman_...
true
true
f76315ce81a62a006766c33011ccc678bfc61d77
631
py
Python
Python/Cracking the Coding Interview/Chapter 4_Trees and Graphs/Queue.py
honghaoz/Interview-Algorithm-in-Swift
b8895b4e05a510e2a5d13d744c084a768f042d0c
[ "MIT" ]
1
2020-12-17T02:10:57.000Z
2020-12-17T02:10:57.000Z
Python/Cracking the Coding Interview/Chapter 4_Trees and Graphs/Queue.py
honghaoz/DataStructure-Algorithm
b8895b4e05a510e2a5d13d744c084a768f042d0c
[ "MIT" ]
null
null
null
Python/Cracking the Coding Interview/Chapter 4_Trees and Graphs/Queue.py
honghaoz/DataStructure-Algorithm
b8895b4e05a510e2a5d13d744c084a768f042d0c
[ "MIT" ]
null
null
null
# Linked List implementation class Queue: def __init__(self): self._privateList = [] def enqueue(self, newElement): self._privateList.append(newElement) def dequeue(self): if len(self._privateList) == 0: return None first = self._privateList[0] del self._privateList[0] return first def peek(self...
17.527778
38
0.66878
class Queue: def __init__(self): self._privateList = [] def enqueue(self, newElement): self._privateList.append(newElement) def dequeue(self): if len(self._privateList) == 0: return None first = self._privateList[0] del self._privateList[0] return first def peek(self): if len(self._privateList...
true
true
f76315d2c2902fb826d7c0761e49c7dfc8d816a2
159
py
Python
debug_cog/setup.py
ilovetocode2019/Debug-Cog
56eee66dfd3877d11d91b184a3b44b7dd191ebc1
[ "MIT" ]
1
2020-07-16T14:08:06.000Z
2020-07-16T14:08:06.000Z
debug_cog/setup.py
ilovetocode2019/Debug-Cog
56eee66dfd3877d11d91b184a3b44b7dd191ebc1
[ "MIT" ]
null
null
null
debug_cog/setup.py
ilovetocode2019/Debug-Cog
56eee66dfd3877d11d91b184a3b44b7dd191ebc1
[ "MIT" ]
null
null
null
from .cog import Debug from . import config def setup(bot): bot.add_cog(Debug(bot, name=config.name)) def configure(name="Debug"): config.name = name
19.875
45
0.704403
from .cog import Debug from . import config def setup(bot): bot.add_cog(Debug(bot, name=config.name)) def configure(name="Debug"): config.name = name
true
true
f763174566a01dea762609c756230e49ec593c12
5,007
py
Python
clade/abstract.py
kateya/clade
f2c091be8055156ab3e6ce6b8f855c4b01d2b6f3
[ "Apache-2.0" ]
11
2018-10-15T08:46:00.000Z
2022-02-14T14:03:15.000Z
clade/abstract.py
kateya/clade
f2c091be8055156ab3e6ce6b8f855c4b01d2b6f3
[ "Apache-2.0" ]
136
2018-08-07T11:11:29.000Z
2022-03-31T19:02:21.000Z
clade/abstract.py
kateya/clade
f2c091be8055156ab3e6ce6b8f855c4b01d2b6f3
[ "Apache-2.0" ]
6
2018-11-09T12:52:39.000Z
2022-02-19T20:34:25.000Z
# Copyright (c) 2019 ISP RAS (http://www.ispras.ru) # Ivannikov Institute for System Programming of the Russian Academy of Sciences # # 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 # # htt...
36.021583
144
0.65708
import abc import os import shlex import subprocess import tempfile from clade.cmds import get_last_id from clade.utils import get_logger from clade.server import PreprocessServer class Intercept(metaclass=abc.ABCMeta): def __init__(self, command, cwd=os.getcwd(), output: str = "cmds.txt", append=False, interc...
true
true
f76317d14b04bf3048cb2ef7c735e4966580f934
2,876
py
Python
qa/rpc-tests/zapwallettxes.py
gtacoin-dev/gtacoin
f66f063b47ba973856c200074db1b95abf5ab794
[ "MIT" ]
null
null
null
qa/rpc-tests/zapwallettxes.py
gtacoin-dev/gtacoin
f66f063b47ba973856c200074db1b95abf5ab794
[ "MIT" ]
null
null
null
qa/rpc-tests/zapwallettxes.py
gtacoin-dev/gtacoin
f66f063b47ba973856c200074db1b95abf5ab794
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Gtacoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import GtacoinTestFramework from test_framework.util import * class ...
36.871795
106
0.642559
from test_framework.test_framework import GtacoinTestFramework from test_framework.util import * class ZapWalletTXesTest (GtacoinTestFramework): def __init__(self): super().__init__() self.setup_clean_chain = True self.num_nodes = 3 def setup_network(self, split=False): self...
true
true
f76319d350bc261b6a56e2dbde7fd82503cce40e
1,393
py
Python
hazm/__init__.py
ahangarha/hazm
8fc785d32bb07b954ea45e4ccdf9796cbf9fa449
[ "MIT" ]
3
2018-09-08T07:30:48.000Z
2021-11-07T07:05:02.000Z
hazm/__init__.py
ahangarha/hazm
8fc785d32bb07b954ea45e4ccdf9796cbf9fa449
[ "MIT" ]
null
null
null
hazm/__init__.py
ahangarha/hazm
8fc785d32bb07b954ea45e4ccdf9796cbf9fa449
[ "MIT" ]
null
null
null
from .WordTokenizer import WordTokenizer from .SentenceTokenizer import SentenceTokenizer from .HamshahriReader import HamshahriReader from .PersicaReader import PersicaReader from .BijankhanReader import BijankhanReader from .PeykareReader import PeykareReader from .VerbValencyReader import VerbValencyReader from .Da...
36.657895
74
0.8514
from .WordTokenizer import WordTokenizer from .SentenceTokenizer import SentenceTokenizer from .HamshahriReader import HamshahriReader from .PersicaReader import PersicaReader from .BijankhanReader import BijankhanReader from .PeykareReader import PeykareReader from .VerbValencyReader import VerbValencyReader from .Da...
true
true
f7631b2d6fd6668a6e5a8be88d0918742cb580e4
893
py
Python
apps/polls/urls.py
dannychung66/polls
3081e5191e2709f929daa07ebee98754d948808e
[ "MIT" ]
null
null
null
apps/polls/urls.py
dannychung66/polls
3081e5191e2709f929daa07ebee98754d948808e
[ "MIT" ]
null
null
null
apps/polls/urls.py
dannychung66/polls
3081e5191e2709f929daa07ebee98754d948808e
[ "MIT" ]
null
null
null
"""zz2 URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based ...
31.892857
79
0.676372
from django.urls import path, re_path from . import views app_name="polls" urlpatterns = [ re_path('^$', views.index, name="index"), re_path(r'^(?P<id>\d+)/', views.detail, name="detail"), re_path(r'^vote/', views.vote, name="vote"), ]
true
true
f7631c0081bd6f2ace4ab985850eacc44321cc04
3,105
py
Python
python-dtf/tests/integration/pm/test_pm_repo.py
jakev/dtf
a761ace77cea051bfb88d56df65ae6b83f664480
[ "Apache-2.0" ]
58
2015-01-13T16:24:31.000Z
2016-11-21T16:00:58.000Z
python-dtf/tests/integration/pm/test_pm_repo.py
jakev/dtf
a761ace77cea051bfb88d56df65ae6b83f664480
[ "Apache-2.0" ]
51
2015-03-11T20:42:21.000Z
2017-01-18T02:49:10.000Z
python-dtf/tests/integration/pm/test_pm_repo.py
jakev/dtf
a761ace77cea051bfb88d56df65ae6b83f664480
[ "Apache-2.0" ]
15
2016-02-01T00:37:21.000Z
2016-12-09T07:03:36.000Z
# Android Device Testing Framework ("dtf") # Copyright 2013-2017 Jake Valletta (@jake_valletta) # # 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 ...
27.972973
78
0.652818
from __future__ import absolute_import import dtf.testutils as testutils class PmRepoTests(testutils.BasicIntegrationTest): def test_no_args(self): rtn = self.run_cmd("pm repo") assert(rtn.return_code == 0) def test_invalid_cmd(self): rtn = self.run_cmd("pm repo NOTHING") ...
true
true
f7631c34c36c490d7a20c38d3042c0ffe26306e8
870
py
Python
functions/prints.py
theyadev/Python-Rubik-s-Cube
e2bddec17b4040ca6cb180fe97bc25db4bebc349
[ "MIT" ]
null
null
null
functions/prints.py
theyadev/Python-Rubik-s-Cube
e2bddec17b4040ca6cb180fe97bc25db4bebc349
[ "MIT" ]
null
null
null
functions/prints.py
theyadev/Python-Rubik-s-Cube
e2bddec17b4040ca6cb180fe97bc25db4bebc349
[ "MIT" ]
null
null
null
from variables import * def printAt(x, y, text): print(f"\033[{y};{x}H{text}") def printCube(): for z in range(len(cube)): for y in range(len(cube[z])): row = "" for x in range(len(cube[z][y])): if cube[z][y][x] == 6: row += f"🔳" ...
30
52
0.313793
from variables import * def printAt(x, y, text): print(f"\033[{y};{x}H{text}") def printCube(): for z in range(len(cube)): for y in range(len(cube[z])): row = "" for x in range(len(cube[z][y])): if cube[z][y][x] == 6: row += f"🔳" ...
true
true
f7631cd70ddc91ad0ed418a3d6b388515b13a255
581
py
Python
parsl/tests/configs/workqueue_blocks.py
cylondata/parsl
00ff9372bd841dafef8a0b3566c79ffe68f0e367
[ "Apache-2.0" ]
323
2017-07-28T21:31:27.000Z
2022-03-05T13:06:05.000Z
parsl/tests/configs/workqueue_blocks.py
cylondata/parsl
00ff9372bd841dafef8a0b3566c79ffe68f0e367
[ "Apache-2.0" ]
1,286
2017-06-01T16:50:00.000Z
2022-03-31T16:45:14.000Z
parsl/tests/configs/workqueue_blocks.py
cylondata/parsl
00ff9372bd841dafef8a0b3566c79ffe68f0e367
[ "Apache-2.0" ]
113
2017-06-03T11:38:40.000Z
2022-03-26T16:43:05.000Z
from parsl.config import Config from parsl.executors import WorkQueueExecutor from parsl.data_provider.http import HTTPInTaskStaging from parsl.data_provider.ftp import FTPInTaskStaging from parsl.data_provider.file_noop import NoOpFileStaging from parsl.providers import LocalProvider config = Config(executors=[Work...
44.692308
121
0.716007
from parsl.config import Config from parsl.executors import WorkQueueExecutor from parsl.data_provider.http import HTTPInTaskStaging from parsl.data_provider.ftp import FTPInTaskStaging from parsl.data_provider.file_noop import NoOpFileStaging from parsl.providers import LocalProvider config = Config(executors=[Work...
true
true
f7631cd88c4a10dbfbb32bc0f1dddb6845c04d2f
2,320
py
Python
fritzconnection/cli/fritzcall.py
linusg/fritzconnection
1297daf542c7f3cc55a91d9573228bc8df041aa6
[ "MIT" ]
213
2016-11-17T19:54:27.000Z
2022-03-30T19:52:13.000Z
fritzconnection/cli/fritzcall.py
linusg/fritzconnection
1297daf542c7f3cc55a91d9573228bc8df041aa6
[ "MIT" ]
128
2019-05-02T21:59:49.000Z
2022-03-26T12:13:02.000Z
fritzconnection/cli/fritzcall.py
linusg/fritzconnection
1297daf542c7f3cc55a91d9573228bc8df041aa6
[ "MIT" ]
59
2017-09-19T06:33:58.000Z
2022-03-24T16:55:27.000Z
""" fritzcall.py Module to inspect the FritzBox phone API. CLI interface. This module is part of the FritzConnection package. https://github.com/kbr/fritzconnection License: MIT (https://opensource.org/licenses/MIT) Author: Klaus Bremer """ from ..lib.fritzcall import FritzCall from . utils import get_cli_arguments,...
30.12987
70
0.606897
from ..lib.fritzcall import FritzCall from . utils import get_cli_arguments, get_instance, print_header def report_calls(fc, arguments): print('FritzCall:') days = arguments.days num = arguments.num if not days else None if arguments.type == 'in': calls = fc.get_received_calls(num=num, days=d...
true
true
f7631cdc9f23ff330a174ffa5986eb15c2a0f10e
4,158
py
Python
setup.py
gbmarc1/Ax
9428fa64a621cf4562c7e2c63881a0ca2fa2780b
[ "MIT" ]
null
null
null
setup.py
gbmarc1/Ax
9428fa64a621cf4562c7e2c63881a0ca2fa2780b
[ "MIT" ]
null
null
null
setup.py
gbmarc1/Ax
9428fa64a621cf4562c7e2c63881a0ca2fa2780b
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import subprocess import numpy from Cython.Build import cythonize from setuptools import find_packages, setup from setuptools.extension import Extension EXTENSIONS = [ Extension( "ax.utils.stats.sobol", ...
29.28169
79
0.631794
import subprocess import numpy from Cython.Build import cythonize from setuptools import find_packages, setup from setuptools.extension import Extension EXTENSIONS = [ Extension( "ax.utils.stats.sobol", ["ax/utils/stats/sobol.pyx"], include_dirs=[numpy.get_include()], ) ] REQUIRES =...
true
true
f7631dc386d62c61e48b71e12625c3041fe7ede4
6,336
py
Python
test/unit/metrics/test_metrics_engine_dicts.py
seralexger/fairlearn
c3ee7b5a45eb3394fc1b8d17b991e3d970970c05
[ "MIT" ]
null
null
null
test/unit/metrics/test_metrics_engine_dicts.py
seralexger/fairlearn
c3ee7b5a45eb3394fc1b8d17b991e3d970970c05
[ "MIT" ]
null
null
null
test/unit/metrics/test_metrics_engine_dicts.py
seralexger/fairlearn
c3ee7b5a45eb3394fc1b8d17b991e3d970970c05
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation and Fairlearn contributors. # Licensed under the MIT License. import pytest import numpy as np import fairlearn.metrics as metrics # ====================================================== y_true = [0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1] y_pred = [1, 0, 1, 0, 1, 0...
46.933333
97
0.696812
import pytest import numpy as np import fairlearn.metrics as metrics y_true = [0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1] y_pred = [1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1] sf_binary = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1] metric_group_summary_results = { metrics.true_p...
true
true
f7631ddc2a3d34dcf72feb3fd51cf1d99205e959
4,540
py
Python
ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_service_check.py
wbear2/ambari
a1891193984da47015cd5483b5b95e040677d7df
[ "Apache-2.0" ]
5
2018-06-03T05:19:40.000Z
2021-04-16T17:10:49.000Z
ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_service_check.py
wbear2/ambari
a1891193984da47015cd5483b5b95e040677d7df
[ "Apache-2.0" ]
null
null
null
ambari-server/src/test/python/stacks/2.0.6/HIVE/test_hive_service_check.py
wbear2/ambari
a1891193984da47015cd5483b5b95e040677d7df
[ "Apache-2.0" ]
6
2019-05-07T13:24:39.000Z
2021-02-15T14:12:37.000Z
#!/usr/bin/env python ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License")...
45.858586
194
0.571366
''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this...
false
true
f7631e18862e3ee1e334b3a5a8c757433920465f
683
py
Python
Python Data Structures/Assignments/Assignment_8_4.py
aja512/Python-Lab
8f9c57d6d7f835e31a595223cdddf9c52ebe1cc9
[ "Apache-2.0" ]
null
null
null
Python Data Structures/Assignments/Assignment_8_4.py
aja512/Python-Lab
8f9c57d6d7f835e31a595223cdddf9c52ebe1cc9
[ "Apache-2.0" ]
null
null
null
Python Data Structures/Assignments/Assignment_8_4.py
aja512/Python-Lab
8f9c57d6d7f835e31a595223cdddf9c52ebe1cc9
[ "Apache-2.0" ]
null
null
null
""" Open the file romeo.txt and read it line by line. For each line, split the line into a list of words using the split() method. The program should build a list of words. For each word on each line check to see if the word is already in the list and if not append it to the list. When the program completes, sort and...
37.944444
151
0.713031
fajl = input("Enter file name: ") fajlOpen = open(fajl) listica = [] linije = [line.split() for line in fajlOpen] for i in linije: for j in i: if j not in listica: listica.append(j) listica.sort() print(listica)
true
true
f7631e5d12834f6d00dab064026cc47717022601
6,697
py
Python
tensorflow_federated/python/core/impl/tensorflow_context/tensorflow_serialization_test.py
j35tor/federated
d92bfa6b8e3c9ebbac51ff7a3a180c2baaa08730
[ "Apache-2.0" ]
1
2021-04-01T08:35:06.000Z
2021-04-01T08:35:06.000Z
tensorflow_federated/python/core/impl/tensorflow_context/tensorflow_serialization_test.py
j35tor/federated
d92bfa6b8e3c9ebbac51ff7a3a180c2baaa08730
[ "Apache-2.0" ]
null
null
null
tensorflow_federated/python/core/impl/tensorflow_context/tensorflow_serialization_test.py
j35tor/federated
d92bfa6b8e3c9ebbac51ff7a3a180c2baaa08730
[ "Apache-2.0" ]
null
null
null
# Copyright 2018, The TensorFlow Federated Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
44.059211
93
0.705988
import collections import numpy as np import tensorflow as tf from tensorflow_federated.python.common_libs import serialization_utils from tensorflow_federated.python.common_libs import test_utils from tensorflow_federated.python.core.api import computation_types from tensorflow_federated.python.core.api import test...
true
true
f7631ef311fe262b2179d69844223fe5b86f602a
3,885
py
Python
src/streamdeck/models.py
daniel-rudrich/Py-Stream
6ad0308fe2b9580ed39c2e68e7e1fb96c3475359
[ "MIT" ]
null
null
null
src/streamdeck/models.py
daniel-rudrich/Py-Stream
6ad0308fe2b9580ed39c2e68e7e1fb96c3475359
[ "MIT" ]
null
null
null
src/streamdeck/models.py
daniel-rudrich/Py-Stream
6ad0308fe2b9580ed39c2e68e7e1fb96c3475359
[ "MIT" ]
null
null
null
from django.db import models from pathlib import Path import os BASE_DIR = Path(__file__).resolve().parent.parent DEFAULT_IMAGE = os.path.join(BASE_DIR, "media/assets/default_image.png") def get_image_path(instance, filename): return os.path.join('images', str(instance.id), filename) def get_image_path_streamd...
37
94
0.701673
from django.db import models from pathlib import Path import os BASE_DIR = Path(__file__).resolve().parent.parent DEFAULT_IMAGE = os.path.join(BASE_DIR, "media/assets/default_image.png") def get_image_path(instance, filename): return os.path.join('images', str(instance.id), filename) def get_image_path_streamd...
true
true
f7631f3f22a01b4d96afaa17574ab21bd71579d0
4,781
py
Python
pyjobs_web/pyjobsweb/config/app_cfg.py
pyjobs/web
183742ae571ee83d4fe4b34f1f0ce9f2204c449e
[ "MIT" ]
8
2016-01-29T13:06:26.000Z
2020-11-02T07:23:57.000Z
pyjobs_web/pyjobsweb/config/app_cfg.py
pyjobs/web
183742ae571ee83d4fe4b34f1f0ce9f2204c449e
[ "MIT" ]
18
2016-02-11T08:17:13.000Z
2022-03-02T14:53:38.000Z
pyjobs_web/pyjobsweb/config/app_cfg.py
pyjobs/web
183742ae571ee83d4fe4b34f1f0ce9f2204c449e
[ "MIT" ]
5
2016-02-05T08:57:12.000Z
2018-01-15T08:19:43.000Z
# -*- coding: utf-8 -*- """ Global configuration file for TG2-specific settings in pyjobsweb. This file complements development/deployment.ini. """ from tg.configuration import AppConfig import pyjobsweb from pyjobsweb import model base_config = AppConfig() base_config.renderers = [] # True to prevent dispatcher f...
34.395683
82
0.722234
from tg.configuration import AppConfig import pyjobsweb from pyjobsweb import model base_config = AppConfig() base_config.renderers = [] base_config.disable_request_extensions = False base_config.dispatch_path_translator = True base_config.prefer_toscawidgets2 = True base_config.package = pyjobsweb base_config.r...
true
true
f7631f9cb5e4b8a9544e9e08cb43bcffb969e451
4,669
py
Python
tensorflow_federated/python/simulation/datasets/file_per_user_client_data.py
alessiomora/federated
3b501067ed7062aaec3cc8830aaec0a7cf8f0942
[ "Apache-2.0" ]
null
null
null
tensorflow_federated/python/simulation/datasets/file_per_user_client_data.py
alessiomora/federated
3b501067ed7062aaec3cc8830aaec0a7cf8f0942
[ "Apache-2.0" ]
null
null
null
tensorflow_federated/python/simulation/datasets/file_per_user_client_data.py
alessiomora/federated
3b501067ed7062aaec3cc8830aaec0a7cf8f0942
[ "Apache-2.0" ]
null
null
null
# Copyright 2018, The TensorFlow Federated Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
38.270492
82
0.733133
import collections import os.path from typing import Callable, Mapping import tensorflow as tf from tensorflow_federated.python.common_libs import py_typecheck from tensorflow_federated.python.simulation.datasets import client_data from tensorflow_federated.python.tensorflow_libs import tensor_utils class FilePerU...
true
true
f7632063f9dc89d09addaa245de9238805ca970e
6,098
py
Python
qa/rpc-tests/proxy_test.py
testwallet/testnep
285f82c5f8d24602b3feb89cc6a322bd8535e8b7
[ "MIT" ]
null
null
null
qa/rpc-tests/proxy_test.py
testwallet/testnep
285f82c5f8d24602b3feb89cc6a322bd8535e8b7
[ "MIT" ]
null
null
null
qa/rpc-tests/proxy_test.py
testwallet/testnep
285f82c5f8d24602b3feb89cc6a322bd8535e8b7
[ "MIT" ]
4
2018-06-21T17:23:48.000Z
2019-06-17T22:14:33.000Z
#!/usr/bin/env python2 # Copyright (c) 2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import socket import traceback, sys from binascii import hexlify import time, os from socks5 import Socks5Conf...
41.767123
145
0.653001
import socket import traceback, sys from binascii import hexlify import time, os from socks5 import Socks5Configuration, Socks5Command, Socks5Server, AddressType from test_framework import BitcoinTestFramework from util import * class ProxyTest(BitcoinTestFramework): def __init__(self): se...
true
true
f76320b73969475f8901237fabeb831a7702d0dd
1,087
py
Python
services/sync-app/core/apis/rate_limit_status.py
shawnhankim/distributed-rate-limiting-solution
5bd8a46f1aeccbb7e9e09d2ebfef76e98e411c3c
[ "MIT" ]
null
null
null
services/sync-app/core/apis/rate_limit_status.py
shawnhankim/distributed-rate-limiting-solution
5bd8a46f1aeccbb7e9e09d2ebfef76e98e411c3c
[ "MIT" ]
null
null
null
services/sync-app/core/apis/rate_limit_status.py
shawnhankim/distributed-rate-limiting-solution
5bd8a46f1aeccbb7e9e09d2ebfef76e98e411c3c
[ "MIT" ]
null
null
null
"""Business Logic for Rate Limiter Status API""" from core.common.constants import RateLimitPer as Per from core.common.utils import data_not_found from http import HTTPStatus class RateLimitStatus: """Business Logic for Rate Limit Status API""" def __init__(self, namespace=None, datastore=None): se...
31.057143
62
0.632015
from core.common.constants import RateLimitPer as Per from core.common.utils import data_not_found from http import HTTPStatus class RateLimitStatus: def __init__(self, namespace=None, datastore=None): self.namespace = namespace self.datastore = datastore def list(self): res = [] ...
true
true
f76322719d8f35345f67905088e40b6faf89a356
179
py
Python
vega/networks/pytorch/__init__.py
zjzh/vega
aa6e7b8c69024262fc483ee06113b4d1bd5156d8
[ "Apache-2.0" ]
null
null
null
vega/networks/pytorch/__init__.py
zjzh/vega
aa6e7b8c69024262fc483ee06113b4d1bd5156d8
[ "Apache-2.0" ]
null
null
null
vega/networks/pytorch/__init__.py
zjzh/vega
aa6e7b8c69024262fc483ee06113b4d1bd5156d8
[ "Apache-2.0" ]
null
null
null
from . import backbones from . import heads from . import blocks from . import customs from . import detectors from . import necks from . import losses from . import cyclesrbodys
19.888889
26
0.776536
from . import backbones from . import heads from . import blocks from . import customs from . import detectors from . import necks from . import losses from . import cyclesrbodys
true
true
f76323a305086306ef563cd2a6d0c8682f9be9f3
6,713
py
Python
conan/tools/cmake/presets.py
sthagen/conan-io-conan
12b4c90d911ef848d8a6d9aeccd551a5441003f3
[ "MIT" ]
null
null
null
conan/tools/cmake/presets.py
sthagen/conan-io-conan
12b4c90d911ef848d8a6d9aeccd551a5441003f3
[ "MIT" ]
null
null
null
conan/tools/cmake/presets.py
sthagen/conan-io-conan
12b4c90d911ef848d8a6d9aeccd551a5441003f3
[ "MIT" ]
null
null
null
import json import os import platform from conan.tools.cmake.layout import get_build_folder_vars_suffix from conan.tools.cmake.utils import is_multi_configuration from conans.errors import ConanException from conans.util.files import save, load def _add_build_preset(conanfile, multiconfig): build_type = conanfil...
43.590909
101
0.67332
import json import os import platform from conan.tools.cmake.layout import get_build_folder_vars_suffix from conan.tools.cmake.utils import is_multi_configuration from conans.errors import ConanException from conans.util.files import save, load def _add_build_preset(conanfile, multiconfig): build_type = conanfil...
true
true
f76323f93f41e7f85e15895d6add2a8415b3a115
4,401
py
Python
tests/in/part/test_part.py
evereux/catia_python
08948585899b12587b0415ce3c9191a408b34897
[ "MIT" ]
90
2019-02-21T10:05:28.000Z
2022-03-19T01:53:41.000Z
tests/in/part/test_part.py
evereux/catia_python
08948585899b12587b0415ce3c9191a408b34897
[ "MIT" ]
99
2019-05-21T08:29:12.000Z
2022-03-25T09:55:15.000Z
tests/in/part/test_part.py
evereux/catia_python
08948585899b12587b0415ce3c9191a408b34897
[ "MIT" ]
26
2019-04-04T06:31:36.000Z
2022-03-30T07:24:47.000Z
#! /usr/bin/python3.6 import pytest from pycatia import CATIADocHandler from pycatia.mec_mod_interfaces.part import Part from pycatia.exception_handling.exceptions import CATIAApplicationException from tests.source_files import cat_part_measurable from tests.source_files import cat_product def test_activation(): ...
27.166667
86
0.668257
import pytest from pycatia import CATIADocHandler from pycatia.mec_mod_interfaces.part import Part from pycatia.exception_handling.exceptions import CATIAApplicationException from tests.source_files import cat_part_measurable from tests.source_files import cat_product def test_activation(): with CATIADocHandler...
true
true
f7632426f4c05f2918e629698dfcaf3e84327cc1
4,638
py
Python
CAIL2020/lawsplit/torch_server.py
ShenDezhou/CAIL
c4cfa98ab4ecedbce34a7a5a186830486047540c
[ "Apache-2.0" ]
71
2020-07-16T01:49:27.000Z
2022-03-27T16:55:00.000Z
CAIL2020/lawsplit/torch_server.py
ShenDezhou/CAIL
c4cfa98ab4ecedbce34a7a5a186830486047540c
[ "Apache-2.0" ]
11
2020-09-18T14:26:25.000Z
2022-02-09T23:49:33.000Z
CAIL2020/lawsplit/torch_server.py
ShenDezhou/CAIL
c4cfa98ab4ecedbce34a7a5a186830486047540c
[ "Apache-2.0" ]
16
2020-07-15T07:24:30.000Z
2022-03-19T05:41:11.000Z
import argparse import logging import time import falcon from falcon_cors import CORS import json import waitress import re import pandas logging.basicConfig(level=logging.INFO, format='%(asctime)-18s %(message)s') logger = logging.getLogger() cors_allow_all = CORS(allow_all_origins=True, allo...
33.128571
76
0.545709
import argparse import logging import time import falcon from falcon_cors import CORS import json import waitress import re import pandas logging.basicConfig(level=logging.INFO, format='%(asctime)-18s %(message)s') logger = logging.getLogger() cors_allow_all = CORS(allow_all_origins=True, allo...
true
true
f76324a4e4aa79fbf21ce42b6b5932b8a8bf23f0
870
py
Python
size_checking_xdp/send_udp.py
Oliryc/monobpf
cf035221f00b97c4a552a16f059e429418016c6a
[ "MIT" ]
null
null
null
size_checking_xdp/send_udp.py
Oliryc/monobpf
cf035221f00b97c4a552a16f059e429418016c6a
[ "MIT" ]
null
null
null
size_checking_xdp/send_udp.py
Oliryc/monobpf
cf035221f00b97c4a552a16f059e429418016c6a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import socket from sys import argv, exit from time import sleep UDP_IP = "127.0.0.1" UDP_PORT = 5005 MESSAGE = "Hello, World!\n" if __name__ == '__main__': print("UDP target IP:", UDP_IP) print("UDP target port:", UDP_PORT) print("message:", MESSAGE) sock = socket.socket(socke...
26.363636
78
0.635632
import socket from sys import argv, exit from time import sleep UDP_IP = "127.0.0.1" UDP_PORT = 5005 MESSAGE = "Hello, World!\n" if __name__ == '__main__': print("UDP target IP:", UDP_IP) print("UDP target port:", UDP_PORT) print("message:", MESSAGE) sock = socket.socket(socket.AF_INET, socket.SOCK_...
true
true
f7632621c00a218032085d2dac38f4d952271159
518
py
Python
taiga/users/migrations/0005_alter_user_photo.py
threefoldtech/Threefold-Circles
cbc433796b25cf7af9a295af65d665a4a279e2d6
[ "Apache-2.0" ]
1
2017-05-29T19:01:06.000Z
2017-05-29T19:01:06.000Z
docker-images/taigav2/taiga-back/taiga/users/migrations/0005_alter_user_photo.py
mattcongy/itshop
6be025a9eaa7fe7f495b5777d1f0e5a3184121c9
[ "MIT" ]
12
2019-11-25T14:08:32.000Z
2021-06-24T10:35:51.000Z
taiga/users/migrations/0005_alter_user_photo.py
threefoldtech/Threefold-Circles
cbc433796b25cf7af9a295af65d665a4a279e2d6
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import taiga.users.models class Migration(migrations.Migration): dependencies = [ ('users', '0004_auto_20140913_1914'), ] operations = [ migrations.AlterField( model_name...
24.666667
145
0.65251
from __future__ import unicode_literals from django.db import models, migrations import taiga.users.models class Migration(migrations.Migration): dependencies = [ ('users', '0004_auto_20140913_1914'), ] operations = [ migrations.AlterField( model_name='user', nam...
true
true
f76326fdc91495748a542565be26b0c4d54507b6
4,042
py
Python
p2pamodel/handlers/distributor/client.py
XDatum/prodsys-pa-model
8ca9f492c87695221b28e46a7ff4f22aa0b12995
[ "Apache-2.0" ]
null
null
null
p2pamodel/handlers/distributor/client.py
XDatum/prodsys-pa-model
8ca9f492c87695221b28e46a7ff4f22aa0b12995
[ "Apache-2.0" ]
null
null
null
p2pamodel/handlers/distributor/client.py
XDatum/prodsys-pa-model
8ca9f492c87695221b28e46a7ff4f22aa0b12995
[ "Apache-2.0" ]
null
null
null
# # Copyright European Organization for Nuclear Research (CERN), # National Research Centre "Kurchatov Institute" (NRC KI) # # 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 # # ht...
32.861789
79
0.60762
import numpy as np from pyspark import SparkContext from pyspark.sql import SQLContext from ...providers.deftclient import DEFTClient as ExternalService try: from ...providers.p2paclient import P2PAClient as InternalService except ImportError: use_internal_service = False else: use_internal_service = Tr...
true
true
f76328d8935b4c347cc2d77471aadde54c8947dd
16,711
py
Python
db_factory/manager.py
ankit-shrivastava/db-factory
75ff83e94a5bdbc324f95c5b5ff82a28fb489486
[ "MIT" ]
1
2021-01-04T13:39:55.000Z
2021-01-04T13:39:55.000Z
database_factory/manager.py
shrivastava-v-ankit/db-factory
d83de125cf392969036a5da9581db3b38e5fa047
[ "MIT" ]
null
null
null
database_factory/manager.py
shrivastava-v-ankit/db-factory
d83de125cf392969036a5da9581db3b38e5fa047
[ "MIT" ]
1
2021-03-16T03:04:13.000Z
2021-03-16T03:04:13.000Z
#!/usr/bin/env python """ File holds the module of Migration database manager and decide to connect with multiple databases using the configuration parameters. URI of database handled automatically for multiple databases using SQLAlchemy """ import os import logging import traceback from urllib.parse import quote_plu...
41.673317
124
0.510323
import os import logging import traceback from urllib.parse import quote_plus as urlquote from pandas import DataFrame from sqlalchemy import create_engine from sqlalchemy.orm import scoped_session from sqlalchemy.orm import sessionmaker from sqlalchemy import MetaData from .common.common import Common from .operati...
true
true
f76329c1d78649abeeb490c7eafe2c242ad494c0
2,159
py
Python
NeteaseRadioToRSS.py
nathan21hz/NeteaseRadioToRSS
fafe14284f43964c72ac080433a0e34ef2c612e9
[ "MIT" ]
null
null
null
NeteaseRadioToRSS.py
nathan21hz/NeteaseRadioToRSS
fafe14284f43964c72ac080433a0e34ef2c612e9
[ "MIT" ]
null
null
null
NeteaseRadioToRSS.py
nathan21hz/NeteaseRadioToRSS
fafe14284f43964c72ac080433a0e34ef2c612e9
[ "MIT" ]
null
null
null
import urllib import urllib.request import os import json import re import PyRSS2Gen import datetime from os import path,system headers = {"Cookie": "appver=1.5.0.75771", "Referer":"http://music.163.com/", "User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrom...
32.223881
131
0.695229
import urllib import urllib.request import os import json import re import PyRSS2Gen import datetime from os import path,system headers = {"Cookie": "appver=1.5.0.75771", "Referer":"http://music.163.com/", "User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrom...
true
true
f7632b2e4d0558c7a2c284f95204d999db69fb5d
1,993
py
Python
data/example.py
zen-juen/AutoCalendar
05cf9cec07dd0bceb2965970d9513faf8fec461c
[ "MIT" ]
3
2020-10-18T05:14:12.000Z
2021-12-05T10:22:53.000Z
data/example.py
zen-juen/AutoCalendar
05cf9cec07dd0bceb2965970d9513faf8fec461c
[ "MIT" ]
null
null
null
data/example.py
zen-juen/AutoCalendar
05cf9cec07dd0bceb2965970d9513faf8fec461c
[ "MIT" ]
1
2021-12-28T19:02:45.000Z
2021-12-28T19:02:45.000Z
import autocalendar as autocalendar # Set up Oauth to access Google API service = autocalendar.setup_oath(token_path='token.pkl', client_path='client_secret.json') # Read and tidy excel sheet participants = autocalendar.preprocess_file('participant_schedules.xlsx', header_row=2) ###...
52.447368
276
0.71149
import autocalendar as autocalendar service = autocalendar.setup_oath(token_path='token.pkl', client_path='client_secret.json') participants = autocalendar.preprocess_file('participant_schedules.xlsx', header_row=2) dates, start_points, end_points, locations, to_add = autocalendar....
true
true
f7632c12fa6ff0116ed090871f3ba5d588796f66
9,804
py
Python
RockSteady/core/behaviors/navbox.py
RnoB/droneSwarm
e629702f775456a5e659defc7035a7ad58b7d8fd
[ "MIT" ]
79
2015-02-10T23:45:23.000Z
2021-06-17T18:30:48.000Z
RockSteady/core/behaviors/navbox.py
RnoB/droneSwarm
e629702f775456a5e659defc7035a7ad58b7d8fd
[ "MIT" ]
17
2015-03-15T20:49:30.000Z
2022-03-31T20:37:38.000Z
RockSteady/core/behaviors/navbox.py
RnoB/droneSwarm
e629702f775456a5e659defc7035a7ad58b7d8fd
[ "MIT" ]
40
2015-02-22T23:54:09.000Z
2021-11-06T07:14:30.000Z
#!/usr/bin/python """ ARDrone3 autonomous landing on ARDrone2 box with Orinted Roundel usage: !!! WORK IN PROGRESS !!! ./navbox.py <task> [<metalog> [<F>]] | --test <image|video> [<stopAt index>] """ import sys import math import cv2 import os import numpy as np import inspect BEBOP_ROOT = os.path.rea...
32.463576
126
0.561098
""" ARDrone3 autonomous landing on ARDrone2 box with Orinted Roundel usage: !!! WORK IN PROGRESS !!! ./navbox.py <task> [<metalog> [<F>]] | --test <image|video> [<stopAt index>] """ import sys import math import cv2 import os import numpy as np import inspect BEBOP_ROOT = os.path.realpath(os.path.absp...
false
true
f7632cc5f5d47fffd46e04497b24ba35720fddfa
8,580
py
Python
eval_fm.py
keuntaeklee/pytorch-PPUU
0ba8c953df9cdb1e9937e301ed3384ac6b66ea73
[ "MIT" ]
159
2019-01-23T07:17:36.000Z
2022-03-29T14:33:31.000Z
eval_fm.py
keuntaeklee/pytorch-PPUU
0ba8c953df9cdb1e9937e301ed3384ac6b66ea73
[ "MIT" ]
44
2019-04-29T15:11:44.000Z
2022-02-21T18:28:46.000Z
eval_fm.py
keuntaeklee/pytorch-PPUU
0ba8c953df9cdb1e9937e301ed3384ac6b66ea73
[ "MIT" ]
61
2019-01-23T12:31:54.000Z
2022-03-07T09:25:20.000Z
import argparse import os import random import numpy as np import torch import torch.nn.functional as fun import utils from dataloader import DataLoader parser = argparse.ArgumentParser(fromfile_prefix_chars='@') parser.add_argument('-dataset', type=str, default='i80') parser.add_argument('-debug', action='store_tru...
45.396825
117
0.647319
import argparse import os import random import numpy as np import torch import torch.nn.functional as fun import utils from dataloader import DataLoader parser = argparse.ArgumentParser(fromfile_prefix_chars='@') parser.add_argument('-dataset', type=str, default='i80') parser.add_argument('-debug', action='store_tru...
true
true
f7632d7298aeecefa2a5f05588c0dfea16cef677
790
py
Python
src/enstore_admin.py
moibenko/enstore
6f2ff5b67ff73872a9e68f2a68b0bdaa70cef9b9
[ "Intel", "Unlicense" ]
4
2021-10-17T11:17:59.000Z
2022-02-28T16:58:40.000Z
src/enstore_admin.py
moibenko/enstore
6f2ff5b67ff73872a9e68f2a68b0bdaa70cef9b9
[ "Intel", "Unlicense" ]
17
2021-10-05T21:44:06.000Z
2022-03-31T16:58:40.000Z
src/enstore_admin.py
moibenko/enstore
6f2ff5b67ff73872a9e68f2a68b0bdaa70cef9b9
[ "Intel", "Unlicense" ]
8
2021-09-02T18:55:49.000Z
2022-03-09T21:05:28.000Z
#!/usr/bin/env python ############################################################################### # src/$RCSfile$ $Revision$ # try: #Sometime after python 2.2.3 but before 2.4.3 this python library was # added. It causes a problem with freeze if not imported explicitly. # The problem being that the ex...
25.483871
79
0.622785
try: import _strptime __pychecker__ = "no-import" except ImportError: pass import enstore def do_work(): mode = 0 intf = enstore.EnstoreInterface(mode) if intf.error is None: en = enstore.Enstore(intf) en.do_work() if __name__ == "__main__" : do_work()
false
true
f7632d9eed8c9a068e5638a8530a393a38a71ec8
7,863
py
Python
docs/conf.py
mariocesar/django-rocket
e1fc6ca5152526777fa1b8033f172b368bde0469
[ "MIT" ]
38
2015-02-10T18:24:32.000Z
2021-12-15T11:22:56.000Z
docs/conf.py
mariocesar/django-rocket
e1fc6ca5152526777fa1b8033f172b368bde0469
[ "MIT" ]
9
2015-05-14T07:40:57.000Z
2022-02-10T08:30:08.000Z
docs/conf.py
mariocesar/django-rocket
e1fc6ca5152526777fa1b8033f172b368bde0469
[ "MIT" ]
7
2016-01-25T08:58:30.000Z
2021-11-13T14:48:31.000Z
# -*- coding: utf-8 -*- # # Django Rocket documentation build configuration file, created by # sphinx-quickstart on Sat Nov 16 17:35:25 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. #...
32.093878
86
0.716775
import sys, os extensions = [] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'Django Rocket' copyright = u'2013, Mario César Señoranis Ayala' # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. ver...
true
true
f7632e9bbeec21a9ebe9d0a457d842bcb1dcf8df
21,756
py
Python
desktop/core/src/desktop/tests.py
lonely7345/hue
bd4bee0e4e05ff220d9940f28c161a7b7c587b7b
[ "Apache-2.0" ]
1
2021-01-13T05:40:47.000Z
2021-01-13T05:40:47.000Z
desktop/core/src/desktop/tests.py
bitsom/hue
0125266148bdcbab051f1ebc7480c4ca2ca8543b
[ "Apache-2.0" ]
null
null
null
desktop/core/src/desktop/tests.py
bitsom/hue
0125266148bdcbab051f1ebc7480c4ca2ca8543b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (...
34.533333
150
0.736395
import desktop import desktop.urls import desktop.conf import logging import json import os import time import desktop.views as views import proxy.conf from nose.plugins.attrib import attr from nose.plugins.skip import SkipTest from nose.tools import assert_true, assert_false, assert_equal, assert_not_equal, assert_...
true
true
f7632f08b7fc7739d63525b5fbb6987099698853
48,643
py
Python
src/tests/test_pagure_flask_rebase.py
yifengyou/learn-pagure
e54ba955368918c92ad2be6347b53bb2c24a228c
[ "Unlicense" ]
null
null
null
src/tests/test_pagure_flask_rebase.py
yifengyou/learn-pagure
e54ba955368918c92ad2be6347b53bb2c24a228c
[ "Unlicense" ]
null
null
null
src/tests/test_pagure_flask_rebase.py
yifengyou/learn-pagure
e54ba955368918c92ad2be6347b53bb2c24a228c
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- """ (c) 2018 - Copyright Red Hat Inc Authors: Pierre-Yves Chibon <pingou@pingoured.fr> """ from __future__ import unicode_literals, absolute_import import datetime import unittest import shutil import sys import os import json import pagure_messages from fedora_messaging import api, t...
41.468883
95
0.433731
from __future__ import unicode_literals, absolute_import import datetime import unittest import shutil import sys import os import json import pagure_messages from fedora_messaging import api, testing from mock import ANY, patch, MagicMock sys.path.insert( 0, os.path.join(os.path.dirname(os.path.abspath(__file...
true
true
f7632f7506354edca5426b558f0cc4eacff0c546
13,448
py
Python
src/oscar/apps/partner/strategy.py
iicc/django-oscar
67ebe6bc21c242e9b0750b9f306b2f46a2758199
[ "BSD-3-Clause" ]
3
2020-08-03T18:28:24.000Z
2021-09-07T02:59:29.000Z
src/oscar/apps/partner/strategy.py
iicc/django-oscar
67ebe6bc21c242e9b0750b9f306b2f46a2758199
[ "BSD-3-Clause" ]
10
2020-05-11T20:33:31.000Z
2022-03-12T00:24:28.000Z
src/oscar/apps/partner/strategy.py
iicc/django-oscar
67ebe6bc21c242e9b0750b9f306b2f46a2758199
[ "BSD-3-Clause" ]
3
2019-03-20T16:17:58.000Z
2022-02-25T09:38:38.000Z
from collections import namedtuple from decimal import Decimal as D from oscar.core.loading import get_class Unavailable = get_class('partner.availability', 'Unavailable') Available = get_class('partner.availability', 'Available') StockRequiredAvailability = get_class('partner.availability', 'StockRequired') Unavaila...
35.112272
87
0.66746
from collections import namedtuple from decimal import Decimal as D from oscar.core.loading import get_class Unavailable = get_class('partner.availability', 'Unavailable') Available = get_class('partner.availability', 'Available') StockRequiredAvailability = get_class('partner.availability', 'StockRequired') Unavaila...
true
true