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
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f73138dea25be614ca8fc1cc6c899fbfc0321a36
6,537
py
Python
car_client.py
wangbiao0327/car
2632de357107beeb240b330f20ec5ac5fb568beb
[ "MIT" ]
1
2018-12-18T10:58:34.000Z
2018-12-18T10:58:34.000Z
car_client.py
wangbiao0327/car
2632de357107beeb240b330f20ec5ac5fb568beb
[ "MIT" ]
null
null
null
car_client.py
wangbiao0327/car
2632de357107beeb240b330f20ec5ac5fb568beb
[ "MIT" ]
null
null
null
""" 此模块做停车管理系统的客户端 Author:Recall Date: 2018-10-19 module: socket、multiprocessing、sys、os、time、signal Email: """ from socket import * from setting import * from messageAff import user_message from multiprocessing import Process import sys,os,time,signal class carClient(object): def __init__(self): self.so...
28.176724
120
0.528224
from socket import * from setting import * from messageAff import user_message from multiprocessing import Process import sys,os,time,signal class carClient(object): def __init__(self): self.sockfd = socket(AF_INET,SOCK_STREAM) self.sockfd.connect(ADDR) self.mes = user_message() s...
true
true
f73138feb9a7f803855bf63268835f5d0728508e
4,019
py
Python
ubicacion/migrations/0004_auto_20180426_1619.py
jlopez0591/SIGIA
e857e2273daa43ab64fa78df254275af2dbcc2a5
[ "MIT" ]
null
null
null
ubicacion/migrations/0004_auto_20180426_1619.py
jlopez0591/SIGIA
e857e2273daa43ab64fa78df254275af2dbcc2a5
[ "MIT" ]
7
2020-02-12T00:42:15.000Z
2022-03-11T23:23:48.000Z
ubicacion/migrations/0004_auto_20180426_1619.py
jlopez0591/SIGIA
e857e2273daa43ab64fa78df254275af2dbcc2a5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.8 on 2018-04-26 21:19 from __future__ import unicode_literals from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('ubicacion', '0003_auto_20180417_1603'), ] operations =...
34.646552
89
0.591689
from __future__ import unicode_literals from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('ubicacion', '0003_auto_20180417_1603'), ] operations = [ migrations.AddField( model_name='carrera', ...
true
true
f73139736d7eeb275bd78656e3b4701fb97eabe7
4,427
py
Python
azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/usage_operations.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2021-09-07T18:36:04.000Z
2021-09-07T18:36:04.000Z
azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/usage_operations.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
2
2019-10-02T23:37:38.000Z
2020-10-02T01:17:31.000Z
azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/operations/usage_operations.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2019-06-17T22:18:23.000Z
2019-06-17T22:18:23.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
40.990741
144
0.630901
import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError from .. import models class UsageOperations(object): models = models def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializ...
true
true
f7313beb6b36e0b6947bf44f357978b77188d33a
4,841
py
Python
radish/extensions/syslog_writer.py
tuxrosi/radish
b21fa751f8dfc4309451476151c810b44975babb
[ "MIT" ]
null
null
null
radish/extensions/syslog_writer.py
tuxrosi/radish
b21fa751f8dfc4309451476151c810b44975babb
[ "MIT" ]
null
null
null
radish/extensions/syslog_writer.py
tuxrosi/radish
b21fa751f8dfc4309451476151c810b44975babb
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ This module provides an extension to write all features, scenarios and steps to the syslog. """ from __future__ import unicode_literals from radish.terrain import world from radish.feature import Feature from radish.hookregistry import before, after from radish.extensionregistry impor...
29.339394
95
0.567445
from __future__ import unicode_literals from radish.terrain import world from radish.feature import Feature from radish.hookregistry import before, after from radish.extensionregistry import extension @extension class SyslogWriter(object): OPTIONS = [ ("--syslog", "log all of your features, scenarios,...
true
true
f7313bfac29687bff5e8a360d2fdc2e1ee3e5a5f
1,447
py
Python
setup_guide/migrations/0005_auto_20180327_1341.py
uktrade/invest
15b84c511839b46e81608fca9762d2df3f6df16c
[ "MIT" ]
1
2019-01-18T03:50:46.000Z
2019-01-18T03:50:46.000Z
setup_guide/migrations/0005_auto_20180327_1341.py
uktrade/invest
15b84c511839b46e81608fca9762d2df3f6df16c
[ "MIT" ]
50
2018-01-24T18:04:08.000Z
2019-01-03T03:30:30.000Z
setup_guide/migrations/0005_auto_20180327_1341.py
uktrade/invest
15b84c511839b46e81608fca9762d2df3f6df16c
[ "MIT" ]
2
2018-02-12T15:20:52.000Z
2019-01-18T03:51:52.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.11 on 2018-03-27 13:41 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('setup_guide', '0004_auto_20180322_1443'), ] operations = [ migrations.RenameField(...
28.372549
51
0.580511
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('setup_guide', '0004_auto_20180322_1443'), ] operations = [ migrations.RenameField( model_name='setupguidelandingpage', old_name='hea...
true
true
f7313c2994502b974b95d44f22df74068b470940
81,610
py
Python
dask/array/routines.py
leogao2/dask
4e5dfe7463028a39a90e026c7fb9220969093ab3
[ "BSD-3-Clause" ]
null
null
null
dask/array/routines.py
leogao2/dask
4e5dfe7463028a39a90e026c7fb9220969093ab3
[ "BSD-3-Clause" ]
null
null
null
dask/array/routines.py
leogao2/dask
4e5dfe7463028a39a90e026c7fb9220969093ab3
[ "BSD-3-Clause" ]
null
null
null
from __future__ import annotations import math import warnings from collections.abc import Iterable from functools import partial, reduce, wraps from numbers import Integral, Real import numpy as np from tlz import concat, interleave, sliding_window from dask.array import chunk from dask.array.core import ( Arra...
32.167915
112
0.609962
from __future__ import annotations import math import warnings from collections.abc import Iterable from functools import partial, reduce, wraps from numbers import Integral, Real import numpy as np from tlz import concat, interleave, sliding_window from dask.array import chunk from dask.array.core import ( Arra...
true
true
f7313e3ab3e8fc56b748beb5452013bcc48f9018
1,982
py
Python
lifegame.py
cuboktahedron/Rascon
7f754434424c6a0b5f61c96c33c5d2c4acf04a4c
[ "MIT" ]
null
null
null
lifegame.py
cuboktahedron/Rascon
7f754434424c6a0b5f61c96c33c5d2c4acf04a4c
[ "MIT" ]
null
null
null
lifegame.py
cuboktahedron/Rascon
7f754434424c6a0b5f61c96c33c5d2c4acf04a4c
[ "MIT" ]
null
null
null
import copy from datetime import datetime class LifeGame: def __init__(self, width, height): self.__width = width self.__height = height self.__cells = [[False for x in range(0, width)] for y in range(0, height)] self.__fps = 2 self._next_ts = datetime.now().timesta...
30.492308
95
0.519173
import copy from datetime import datetime class LifeGame: def __init__(self, width, height): self.__width = width self.__height = height self.__cells = [[False for x in range(0, width)] for y in range(0, height)] self.__fps = 2 self._next_ts = datetime.now().timesta...
true
true
f7313e94c331bb92c55fd8f8212ee3abca3087ee
4,287
py
Python
dockermon.py
CyberInt/dockermon
a8733b9395cb1b551971f17c31d7f4a8268bb969
[ "MIT" ]
10
2015-06-27T06:06:01.000Z
2021-02-15T04:04:02.000Z
dockermon.py
CyberInt/dockermon
a8733b9395cb1b551971f17c31d7f4a8268bb969
[ "MIT" ]
2
2015-08-09T14:10:25.000Z
2016-05-14T09:25:43.000Z
dockermon.py
CyberInt/dockermon
a8733b9395cb1b551971f17c31d7f4a8268bb969
[ "MIT" ]
7
2016-02-03T03:24:09.000Z
2021-02-15T04:08:40.000Z
#!/usr/bin/env python """docker monitor using docker /events HTTP streaming API""" from contextlib import closing from functools import partial from socket import socket, AF_UNIX from subprocess import Popen, PIPE from sys import stdout, version_info import json import shlex if version_info[:2] < (3, 0): from htt...
28.203947
77
0.601586
from contextlib import closing from functools import partial from socket import socket, AF_UNIX from subprocess import Popen, PIPE from sys import stdout, version_info import json import shlex if version_info[:2] < (3, 0): from httplib import OK as HTTP_OK from urlparse import urlparse else: from http.cli...
true
true
f7313f100d4294fe5183c05e8c3ad109ceb0c790
16,944
py
Python
pandas/tests/indexes/ranges/test_range.py
mujtahidalam/pandas
526468c8fe6fc5157aaf2fce327c5ab2a3350f49
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause" ]
1
2021-06-17T12:54:33.000Z
2021-06-17T12:54:33.000Z
pandas/tests/indexes/ranges/test_range.py
mujtahidalam/pandas
526468c8fe6fc5157aaf2fce327c5ab2a3350f49
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
pandas/tests/indexes/ranges/test_range.py
mujtahidalam/pandas
526468c8fe6fc5157aaf2fce327c5ab2a3350f49
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
import numpy as np import pytest from pandas.core.dtypes.common import ensure_platform_int import pandas as pd from pandas import ( Float64Index, Index, Int64Index, RangeIndex, ) import pandas._testing as tm from pandas.tests.indexes.test_numeric import Numeric # aliases to make some tests easier to ...
31.61194
86
0.578435
import numpy as np import pytest from pandas.core.dtypes.common import ensure_platform_int import pandas as pd from pandas import ( Float64Index, Index, Int64Index, RangeIndex, ) import pandas._testing as tm from pandas.tests.indexes.test_numeric import Numeric RI = RangeIndex I64 = Int64Index F64 = ...
true
true
f7313ff228df6f15c217111d85289fbb96c16a6e
7,086
py
Python
rpython/translator/backendopt/test/test_merge_if_blocks.py
nanjekyejoannah/pypy
e80079fe13c29eda7b2a6b4cd4557051f975a2d9
[ "Apache-2.0", "OpenSSL" ]
381
2018-08-18T03:37:22.000Z
2022-02-06T23:57:36.000Z
rpython/translator/backendopt/test/test_merge_if_blocks.py
nanjekyejoannah/pypy
e80079fe13c29eda7b2a6b4cd4557051f975a2d9
[ "Apache-2.0", "OpenSSL" ]
16
2018-09-22T18:12:47.000Z
2022-02-22T20:03:59.000Z
rpython/translator/backendopt/test/test_merge_if_blocks.py
nanjekyejoannah/pypy
e80079fe13c29eda7b2a6b4cd4557051f975a2d9
[ "Apache-2.0", "OpenSSL" ]
55
2015-08-16T02:41:30.000Z
2022-03-20T20:33:35.000Z
from rpython.translator.backendopt.merge_if_blocks import merge_if_blocks_once from rpython.translator.backendopt.merge_if_blocks import merge_if_blocks from rpython.translator.backendopt.all import backend_optimizations from rpython.translator.translator import TranslationContext, graphof as tgraphof from rpython.flow...
27.788235
81
0.576348
from rpython.translator.backendopt.merge_if_blocks import merge_if_blocks_once from rpython.translator.backendopt.merge_if_blocks import merge_if_blocks from rpython.translator.backendopt.all import backend_optimizations from rpython.translator.translator import TranslationContext, graphof as tgraphof from rpython.flow...
true
true
f7313ffd9372f0396f475d8a1a68661916b500ec
796
py
Python
leetcode/Algorithms/107.BinaryTreeLevelOrderTraversalII/Solution.py
liupangzi/codekata
079373707601198f79fb6215b876a4cbcab32ee9
[ "MIT" ]
58
2017-04-30T12:59:37.000Z
2020-08-05T14:23:57.000Z
leetcode/Algorithms/107.BinaryTreeLevelOrderTraversalII/Solution.py
liupangzi/codekata
079373707601198f79fb6215b876a4cbcab32ee9
[ "MIT" ]
null
null
null
leetcode/Algorithms/107.BinaryTreeLevelOrderTraversalII/Solution.py
liupangzi/codekata
079373707601198f79fb6215b876a4cbcab32ee9
[ "MIT" ]
6
2018-01-20T18:35:09.000Z
2020-07-22T14:20:27.000Z
# Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution(object): def levelOrderBottom(self, root): """ :type root: TreeNode :rtype: List[List[int]] """ ...
24.121212
54
0.520101
class Solution(object): def levelOrderBottom(self, root): if not root: return [] result = [[]] self.helper(result, root, 0) result.reverse() return result def helper(self, result, root, level): if len(result) == level: result.append([roo...
true
true
f7314057a11eff7d520a32457c96935f97b70271
24,185
py
Python
backend/lib/sites/facebook.py
kavish-p/youtube-search-dashboard
2810b0d098699f11086868f9d754e0cb6194d6ff
[ "MIT" ]
1
2021-03-26T05:19:48.000Z
2021-03-26T05:19:48.000Z
chat_downloader/sites/facebook.py
lbmaian/chat-replay-downloader
0f1b1326eec9fb45031d7fd58e0a4a9dd2297d5d
[ "MIT" ]
null
null
null
chat_downloader/sites/facebook.py
lbmaian/chat-replay-downloader
0f1b1326eec9fb45031d7fd58e0a4a9dd2297d5d
[ "MIT" ]
null
null
null
import json from json.decoder import JSONDecodeError import xml.etree.ElementTree as ET import isodate import re from .common import ( Chat, BaseChatDownloader, Remapper as r ) from requests.exceptions import RequestException from ..utils import ( remove_prefixes, multi_get, try_get_first_val...
31.697248
119
0.557081
import json from json.decoder import JSONDecodeError import xml.etree.ElementTree as ET import isodate import re from .common import ( Chat, BaseChatDownloader, Remapper as r ) from requests.exceptions import RequestException from ..utils import ( remove_prefixes, multi_get, try_get_first_val...
true
true
f73140c2dd100d80311a5c5ccca1e3c3caf4075d
3,746
py
Python
postcode_validator_uk/rules.py
ioannavlahou/postcode-validator-uk
e43b2919a7d7e940ae072b24ab5d07587e8e3df8
[ "MIT" ]
4
2020-02-08T15:02:00.000Z
2020-11-22T19:35:11.000Z
postcode_validator_uk/rules.py
ioannavlahou/postcode-validator-uk
e43b2919a7d7e940ae072b24ab5d07587e8e3df8
[ "MIT" ]
8
2021-06-23T12:36:40.000Z
2021-12-21T11:26:27.000Z
postcode_validator_uk/rules.py
ioannavlahou/postcode-validator-uk
e43b2919a7d7e940ae072b24ab5d07587e8e3df8
[ "MIT" ]
2
2020-12-04T10:47:07.000Z
2021-06-08T20:45:45.000Z
import re from .exceptions import InvalidPostcode class PostcodeRule: attr_applied = None applied_areas_regex = None rule_regex = None def __init__(self, postcode): self.postcode = postcode def validate(self): postcode_attr_value = getattr(self.postcode, self.attr_applied, None)...
32.017094
109
0.626535
import re from .exceptions import InvalidPostcode class PostcodeRule: attr_applied = None applied_areas_regex = None rule_regex = None def __init__(self, postcode): self.postcode = postcode def validate(self): postcode_attr_value = getattr(self.postcode, self.attr_applied, None)...
true
true
f73140d48b7cc619133309d7e0b2c6781efb1c0a
9,038
py
Python
twentyfortyeight/strategy/nn/data.py
ggould256/twentyfortyeight
7d2b88023077ba4c64b65617d493039c0a9998c3
[ "MIT" ]
null
null
null
twentyfortyeight/strategy/nn/data.py
ggould256/twentyfortyeight
7d2b88023077ba4c64b65617d493039c0a9998c3
[ "MIT" ]
null
null
null
twentyfortyeight/strategy/nn/data.py
ggould256/twentyfortyeight
7d2b88023077ba4c64b65617d493039c0a9998c3
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """Classes and functions related to dataset generation for learning Q functions. Datasets in this sense are mappings from board positions (represented as flattened arrays of tile numbers) to score values. """ import argparse import sys import numpy as np from game.common import * from game.b...
39.99115
80
0.610423
import argparse import sys import numpy as np from game.common import * from game.board import Board from game.game import Game EXAMPLE_WIDTH = Board.vector_width() MAX_BATCH_SIZE = 4096 class Dataset(object): def __init__(self): self._num_examples = 0 self._example_batches = [np.zeros((0, E...
true
true
f73142a29e58f8c444562a3781b8fbaa6e06ccc2
2,085
py
Python
scout/server/blueprints/institutes/controllers.py
gmc-norr/scout
ea8eaaa079c63e4033af6216ec08da4a314f9b5c
[ "BSD-3-Clause" ]
null
null
null
scout/server/blueprints/institutes/controllers.py
gmc-norr/scout
ea8eaaa079c63e4033af6216ec08da4a314f9b5c
[ "BSD-3-Clause" ]
null
null
null
scout/server/blueprints/institutes/controllers.py
gmc-norr/scout
ea8eaaa079c63e4033af6216ec08da4a314f9b5c
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import logging LOG = logging.getLogger(__name__) def institute(store, institute_id): """ Process institute data. Args: store(adapter.MongoAdapter) institute_id(str) Returns data(dict): includes institute obj and specific settings """ institute_ob...
27.8
76
0.664748
import logging LOG = logging.getLogger(__name__) def institute(store, institute_id): institute_obj = store.institute(institute_id) users = store.users(institute_id) data = {"institute": institute_obj, "users": users} return data def update_institute_settings(store, institute_obj, form): sange...
true
true
f731432c913f3ccfd7e302c02503a7537510ff9a
2,720
py
Python
pipenv/vendor/pythonfinder/models/windows.py
Enzime/pipenv
d4f710be4a39e09a82a5133b7b3a277ee9bfb13a
[ "MIT" ]
null
null
null
pipenv/vendor/pythonfinder/models/windows.py
Enzime/pipenv
d4f710be4a39e09a82a5133b7b3a277ee9bfb13a
[ "MIT" ]
null
null
null
pipenv/vendor/pythonfinder/models/windows.py
Enzime/pipenv
d4f710be4a39e09a82a5133b7b3a277ee9bfb13a
[ "MIT" ]
1
2021-07-03T03:30:45.000Z
2021-07-03T03:30:45.000Z
# -*- coding=utf-8 -*- from __future__ import print_function, absolute_import import attr import operator from collections import defaultdict from . import BaseFinder from .path import PathEntry from .python import PythonVersion, VersionMap from ..exceptions import InvalidPythonVersion from ..utils import ensure_path ...
31.627907
88
0.608088
from __future__ import print_function, absolute_import import attr import operator from collections import defaultdict from . import BaseFinder from .path import PathEntry from .python import PythonVersion, VersionMap from ..exceptions import InvalidPythonVersion from ..utils import ensure_path @attr.s class WindowsF...
true
true
f73143b9c73994a32651383e17bb04174dee2b85
915
py
Python
python/test/test_volume.py
adriangonz/seldon-deploy-sdk
c5504838630a87053387cec57ec2e1e7251971e2
[ "Apache-2.0" ]
6
2021-02-18T14:37:54.000Z
2022-01-13T13:27:43.000Z
python/test/test_volume.py
adriangonz/seldon-deploy-sdk
c5504838630a87053387cec57ec2e1e7251971e2
[ "Apache-2.0" ]
14
2021-01-04T16:32:03.000Z
2021-12-13T17:53:59.000Z
python/test/test_volume.py
adriangonz/seldon-deploy-sdk
c5504838630a87053387cec57ec2e1e7251971e2
[ "Apache-2.0" ]
7
2021-03-17T09:05:55.000Z
2022-01-05T10:39:56.000Z
# coding: utf-8 """ Seldon Deploy API API to interact and manage the lifecycle of your machine learning models deployed through Seldon Deploy. # noqa: E501 OpenAPI spec version: v1alpha1 Contact: hello@seldon.io Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future...
22.317073
122
0.700546
from __future__ import absolute_import import unittest import seldon_deploy_sdk from seldon_deploy_sdk.models.volume import Volume from seldon_deploy_sdk.rest import ApiException class TestVolume(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def testVolume(sel...
true
true
f73143ec8bc29c71a9b4d763b26b580bba6673cb
3,254
py
Python
logging/cloud-client/snippets.py
alexhaines123/googlecloudsqlexamples
06d9254ec77955c02f18cd79a57cdfbd64dbf8ea
[ "Apache-2.0" ]
2
2017-09-23T04:23:46.000Z
2021-06-11T01:23:06.000Z
logging/cloud-client/snippets.py
ryanmats/python-docs-samples
183a6186cd059c7ba24ef324614bc5fee08bff08
[ "Apache-2.0" ]
null
null
null
logging/cloud-client/snippets.py
ryanmats/python-docs-samples
183a6186cd059c7ba24ef324614bc5fee08bff08
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
30.411215
77
0.69791
import argparse from gcloud import logging def write_entry(logger_name): logging_client = logging.Client() logger = logging_client.logger(logger_name) logger.log_text('Hello, world!') logger.log_text('Goodbye, world!', severity='ERROR') logger.log_struct({ 'name': '...
true
true
f73146cc31c2e9c1cdcb0e154acdd7af261b22a1
10,702
py
Python
backbone/model_audio.py
rtu715/NAS-Bench-360
d075006848c664371855c34082b0a00cda62be67
[ "MIT" ]
10
2021-06-15T17:48:34.000Z
2022-02-23T18:34:28.000Z
backbone/model_audio.py
rtu715/NAS-Bench-360
d075006848c664371855c34082b0a00cda62be67
[ "MIT" ]
1
2021-11-12T15:12:38.000Z
2021-11-12T19:38:00.000Z
backbone/model_audio.py
rtu715/NAS-Bench-360
d075006848c664371855c34082b0a00cda62be67
[ "MIT" ]
1
2021-11-15T04:07:17.000Z
2021-11-15T04:07:17.000Z
''' Determined model def example: https://github.com/determined-ai/determined/tree/master/examples/computer_vision/cifar10_pytorch ''' import tempfile from typing import Any, Dict, Sequence, Tuple, Union, cast from functools import partial import os import boto3 import numpy as np from sklearn.metrics import average_p...
37.289199
167
0.594749
import tempfile from typing import Any, Dict, Sequence, Tuple, Union, cast from functools import partial import os import boto3 import numpy as np from sklearn.metrics import average_precision_score import torch from torch import nn from determined.pytorch import DataLoader, PyTorchTrial, PyTorchTrialContext, LRSche...
true
true
f731498360202437e8db6137f9cfaad521cd7f82
5,286
py
Python
music_extractor.py
reeechart/ricommender
c5cdf1cb9db27b9fc4a2553aee2b705b9ad0b95a
[ "MIT" ]
null
null
null
music_extractor.py
reeechart/ricommender
c5cdf1cb9db27b9fc4a2553aee2b705b9ad0b95a
[ "MIT" ]
null
null
null
music_extractor.py
reeechart/ricommender
c5cdf1cb9db27b9fc4a2553aee2b705b9ad0b95a
[ "MIT" ]
null
null
null
import csv import eyed3 import librosa import numpy as np import sys def load_editorial_metadata(audiofile): '''Loads an audio file and extract its editorial metadata Args: audiofile (string): audio file to be extracted. Returns: title (string): title of the mp3 file artist (strin...
30.034091
120
0.64756
import csv import eyed3 import librosa import numpy as np import sys def load_editorial_metadata(audiofile): audio = eyed3.load(audiofile) return audio.tag.title, audio.tag.artist, audio.tag.album def get_reformatted_music_file_directory(file): splitted_dir = file.split('\\') directory = '/'.join(sp...
true
true
f73149a9f7e2ac7a2e62263f32e4418400e4b260
2,624
py
Python
src/old_code/utils_old.py
basarane/model-based-rl
af7ba84c272054d1de0b8cf9cc91b571abe91c3d
[ "MIT" ]
null
null
null
src/old_code/utils_old.py
basarane/model-based-rl
af7ba84c272054d1de0b8cf9cc91b571abe91c3d
[ "MIT" ]
null
null
null
src/old_code/utils_old.py
basarane/model-based-rl
af7ba84c272054d1de0b8cf9cc91b571abe91c3d
[ "MIT" ]
null
null
null
import keras.backend as K import numpy as np from PIL import Image, ImageDraw def get_activations(model, model_inputs, print_shape_only=False, layer_name=None): print('----- activations -----') activations = [] inp = model.input model_multi_inputs_cond = True if not isinstance(inp, list): # only one input! let...
32
156
0.726372
import keras.backend as K import numpy as np from PIL import Image, ImageDraw def get_activations(model, model_inputs, print_shape_only=False, layer_name=None): print('----- activations -----') activations = [] inp = model.input model_multi_inputs_cond = True if not isinstance(inp, list): inp = [inp] model...
true
true
f73149c06418dfdcc2ccc576f2c8e8c48e6bdbd1
1,157
py
Python
saleor/graphql/page/schema.py
acabezasg/urpi-master
7c9cd0fbe6d89dad70652482712ca38b21ba6f84
[ "BSD-3-Clause" ]
1
2019-04-15T09:37:26.000Z
2019-04-15T09:37:26.000Z
saleor/graphql/page/schema.py
acabezasg/urpi-master
7c9cd0fbe6d89dad70652482712ca38b21ba6f84
[ "BSD-3-Clause" ]
5
2021-03-09T16:22:37.000Z
2022-02-10T19:10:03.000Z
saleor/graphql/page/schema.py
acabezasg/urpi-master
7c9cd0fbe6d89dad70652482712ca38b21ba6f84
[ "BSD-3-Clause" ]
1
2020-12-26T10:25:37.000Z
2020-12-26T10:25:37.000Z
import graphene from ..core.fields import PrefetchingConnectionField from ..descriptions import DESCRIPTIONS from ..translations.mutations import PageTranslate from .bulk_mutations import PageBulkDelete from .mutations import PageCreate, PageDelete, PageUpdate from .resolvers import resolve_page, resolve_pages from .t...
34.029412
72
0.736387
import graphene from ..core.fields import PrefetchingConnectionField from ..descriptions import DESCRIPTIONS from ..translations.mutations import PageTranslate from .bulk_mutations import PageBulkDelete from .mutations import PageCreate, PageDelete, PageUpdate from .resolvers import resolve_page, resolve_pages from .t...
true
true
f73149da213043c623eaf8c02ac1225d022f99d9
69,506
py
Python
server/datasets/tcga/constants.py
imwangtongxue-com/digital_slide_archive
3c08432bf3ca192d8948cbe22a263c2259c542d5
[ "Apache-2.0" ]
null
null
null
server/datasets/tcga/constants.py
imwangtongxue-com/digital_slide_archive
3c08432bf3ca192d8948cbe22a263c2259c542d5
[ "Apache-2.0" ]
null
null
null
server/datasets/tcga/constants.py
imwangtongxue-com/digital_slide_archive
3c08432bf3ca192d8948cbe22a263c2259c542d5
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright Kitware 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 ...
73.087277
131
0.609473
class TcgaCodes(object): DISEASE_STUDIES = { 'LAML': 'Acute Myeloid Leukemia', 'ACC': 'Adrenocortical carcinoma', 'BLCA': 'Bladder Urothelial Carcinoma', 'LGG': 'Brain Lower Grade Glioma', 'BRCA': 'Breast invasive carcinoma', 'CESC': 'Cervical squamous ce...
true
true
f7314a0e4e81b092e4ad4e0a58faca277e3f6357
482
py
Python
measurements/read-ds18b20.py
jazik/raspberry-pi-cottage
c82885db7b265b96e7c1126a0f7af89602cd72d5
[ "MIT" ]
null
null
null
measurements/read-ds18b20.py
jazik/raspberry-pi-cottage
c82885db7b265b96e7c1126a0f7af89602cd72d5
[ "MIT" ]
null
null
null
measurements/read-ds18b20.py
jazik/raspberry-pi-cottage
c82885db7b265b96e7c1126a0f7af89602cd72d5
[ "MIT" ]
null
null
null
#!/usr/bin/python import sys from w1thermsensor import W1ThermSensor if len(sys.argv) == 2: sensor_id = sys.argv[1] else: print('usage: sudo ' + sys.argv[0] + ' <sensor id>') print('example: sudo ' + sys.argv[0] + ' 00000588806a - Read from an DS18B20 wiht id 00000588806a') sys.exit(1) sensor = W1The...
28.352941
103
0.715768
import sys from w1thermsensor import W1ThermSensor if len(sys.argv) == 2: sensor_id = sys.argv[1] else: print('usage: sudo ' + sys.argv[0] + ' <sensor id>') print('example: sudo ' + sys.argv[0] + ' 00000588806a - Read from an DS18B20 wiht id 00000588806a') sys.exit(1) sensor = W1ThermSensor(W1ThermSe...
true
true
f7314b6028b09e35ddb4a9b228cfb6aadcb1d26a
939
py
Python
dwi_ml/models/utils/fisher_von_mises.py
EmmaRenauld/dwi_ml
f2f776199dd886509d15520aa68099a8c870a233
[ "MIT" ]
null
null
null
dwi_ml/models/utils/fisher_von_mises.py
EmmaRenauld/dwi_ml
f2f776199dd886509d15520aa68099a8c870a233
[ "MIT" ]
null
null
null
dwi_ml/models/utils/fisher_von_mises.py
EmmaRenauld/dwi_ml
f2f776199dd886509d15520aa68099a8c870a233
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import numpy as np import torch """ The complete formulas and explanations are available in our doc: https://dwi-ml.readthedocs.io/en/latest/formulas.html """ def fisher_von_mises_log_prob_vector(mus, kappa, targets): log_c = np.log(kappa) - np.log(2 * np.pi) - np.log(np.exp(kappa) - ...
29.34375
78
0.644302
import numpy as np import torch def fisher_von_mises_log_prob_vector(mus, kappa, targets): log_c = np.log(kappa) - np.log(2 * np.pi) - np.log(np.exp(kappa) - np.exp(-kappa)) log_prob = log_c + (kappa * (mus * targets).sum(axis=-1)) return log_prob ...
true
true
f7314ba8e10dd03e076c71b94e712ad4b4b62c44
664
py
Python
docs/src/additional_responses/tutorial004.py
patrickmckenna/fastapi
9c3c9b6e78768374868d690bc05918d58481e880
[ "MIT" ]
2
2020-11-01T00:04:05.000Z
2021-07-21T06:32:20.000Z
docs/src/additional_responses/tutorial004.py
patrickmckenna/fastapi
9c3c9b6e78768374868d690bc05918d58481e880
[ "MIT" ]
1
2019-11-02T22:03:59.000Z
2019-11-02T22:03:59.000Z
docs/src/additional_responses/tutorial004.py
patrickmckenna/fastapi
9c3c9b6e78768374868d690bc05918d58481e880
[ "MIT" ]
1
2020-12-19T18:01:20.000Z
2020-12-19T18:01:20.000Z
from fastapi import FastAPI from pydantic import BaseModel from starlette.responses import FileResponse class Item(BaseModel): id: str value: str responses = { 404: {"description": "Item not found"}, 302: {"description": "The item was moved"}, 403: {"description": "Not enough privileges"}, } a...
21.419355
65
0.637048
from fastapi import FastAPI from pydantic import BaseModel from starlette.responses import FileResponse class Item(BaseModel): id: str value: str responses = { 404: {"description": "Item not found"}, 302: {"description": "The item was moved"}, 403: {"description": "Not enough privileges"}, } a...
true
true
f7314be85e0d5c52d7bd7dba9f799e44ab8fed6b
138
py
Python
Fango/accounts/apps.py
Niemzok/fango
37484a11e8bfffb0f6fe451b74501e0ad825b215
[ "MIT" ]
null
null
null
Fango/accounts/apps.py
Niemzok/fango
37484a11e8bfffb0f6fe451b74501e0ad825b215
[ "MIT" ]
null
null
null
Fango/accounts/apps.py
Niemzok/fango
37484a11e8bfffb0f6fe451b74501e0ad825b215
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from django.apps import AppConfig class AccountsConfig(AppConfig): name = 'Fango.accounts'
17.25
39
0.797101
from __future__ import unicode_literals from django.apps import AppConfig class AccountsConfig(AppConfig): name = 'Fango.accounts'
true
true
f7314cf1f7f6c192548e293ee5dab1afb019d2fc
13,083
py
Python
examples/annotation.py
quattro/numpyro
b7b6e937297ea47c55760446134f84fc82936a9d
[ "Apache-2.0" ]
null
null
null
examples/annotation.py
quattro/numpyro
b7b6e937297ea47c55760446134f84fc82936a9d
[ "Apache-2.0" ]
null
null
null
examples/annotation.py
quattro/numpyro
b7b6e937297ea47c55760446134f84fc82936a9d
[ "Apache-2.0" ]
null
null
null
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 """ Example: Bayesian Models of Annotation ====================================== In this example, we run MCMC for various crowdsourced annotation models in [1]. All models have discrete latent variables. Under the hood, we enumerate...
37.38
90
0.591072
import argparse import os import numpy as np from jax import nn, random, vmap import jax.numpy as jnp import numpyro from numpyro import handlers from numpyro.contrib.indexing import Vindex import numpyro.distributions as dist from numpyro.infer import MCMC, NUTS, Predictive from numpyro.infer.reparam import LocSc...
true
true
f7314e8a496b92d9bd05e6902788e7b9a672b0dc
11,218
py
Python
plugins/sqlfluff-templater-dbt/test/templater_test.py
WittierDinosaur/sqlfluff
edc4a2c47cd4f0a5f53dbde36e50da19ec08dda7
[ "MIT" ]
null
null
null
plugins/sqlfluff-templater-dbt/test/templater_test.py
WittierDinosaur/sqlfluff
edc4a2c47cd4f0a5f53dbde36e50da19ec08dda7
[ "MIT" ]
null
null
null
plugins/sqlfluff-templater-dbt/test/templater_test.py
WittierDinosaur/sqlfluff
edc4a2c47cd4f0a5f53dbde36e50da19ec08dda7
[ "MIT" ]
null
null
null
"""Tests for the dbt templater.""" import glob import os import pytest import logging from pathlib import Path from sqlfluff.core import FluffConfig, Lexer, Linter from sqlfluff.core.errors import SQLTemplaterSkipFile from test.fixtures.dbt.templater import ( # noqa: F401 DBT_FLUFF_CONFIG, dbt_templater, ...
35.5
115
0.639151
import glob import os import pytest import logging from pathlib import Path from sqlfluff.core import FluffConfig, Lexer, Linter from sqlfluff.core.errors import SQLTemplaterSkipFile from test.fixtures.dbt.templater import ( DBT_FLUFF_CONFIG, dbt_templater, project_dir, ) def test__templater_dbt_missin...
true
true
f7314e8b65485bdd5e00c5546138536c89f6ad88
819
py
Python
classy_config/_util.py
fisher60/classy-config
abc8016f9fef328b1410ede75833429b05e20e1a
[ "MIT" ]
7
2022-01-04T20:24:53.000Z
2022-02-21T19:31:57.000Z
classy_config/_util.py
fisher60/classy-config
abc8016f9fef328b1410ede75833429b05e20e1a
[ "MIT" ]
13
2022-01-04T18:53:08.000Z
2022-02-25T11:01:29.000Z
classy_config/_util.py
fisher60/classy-config
abc8016f9fef328b1410ede75833429b05e20e1a
[ "MIT" ]
1
2022-02-14T22:06:11.000Z
2022-02-14T22:06:11.000Z
from typing import Any, MutableMapping, Optional def merge_dicts(a: MutableMapping[str, Any], b: MutableMapping[str, Any], path: Optional[list] = None) -> MutableMapping[str, Any]: """ Merge the keys and values of the two dicts. :param a: :param b: :param path: :return: :raises ValueError...
26.419355
131
0.566545
from typing import Any, MutableMapping, Optional def merge_dicts(a: MutableMapping[str, Any], b: MutableMapping[str, Any], path: Optional[list] = None) -> MutableMapping[str, Any]: if path is None: path = [] for key in b: if key not in a: a[key] = b[key] continue ...
true
true
f7314f70d97443e5927a361c54120beae4e4b7f5
9,594
py
Python
cinder/common/config.py
rackerlabs/cinder
4295ff0a64f781c3546f6c6e0816dbb8100133cb
[ "Apache-2.0" ]
null
null
null
cinder/common/config.py
rackerlabs/cinder
4295ff0a64f781c3546f6c6e0816dbb8100133cb
[ "Apache-2.0" ]
null
null
null
cinder/common/config.py
rackerlabs/cinder
4295ff0a64f781c3546f6c6e0816dbb8100133cb
[ "Apache-2.0" ]
null
null
null
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright 2012 Red Hat, Inc. # Copyright 2013 NTT corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file exc...
43.808219
79
0.595164
import socket from oslo_config import cfg from oslo_log import log as logging from oslo_utils import netutils from cinder.i18n import _ CONF = cfg.CONF logging.register_options(CONF) core_opts = [ cfg.StrOpt('api_paste_config', default="api-paste.ini", help='File name for the pa...
true
true
f7314f8b974c2b54dbcb6c11c5211b6c0d1d666e
3,340
py
Python
muranoclient/v1/services.py
mail2nsrajesh/python-muranoclient
08411aa8d20993ac7c4a52b2aa0e73fb6fea4d40
[ "Apache-2.0" ]
27
2015-04-26T16:05:29.000Z
2021-01-28T03:31:57.000Z
muranoclient/v1/services.py
mail2nsrajesh/python-muranoclient
08411aa8d20993ac7c4a52b2aa0e73fb6fea4d40
[ "Apache-2.0" ]
null
null
null
muranoclient/v1/services.py
mail2nsrajesh/python-muranoclient
08411aa8d20993ac7c4a52b2aa0e73fb6fea4d40
[ "Apache-2.0" ]
14
2015-06-12T05:37:50.000Z
2019-05-02T20:37:42.000Z
# Copyright (c) 2013 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
32.745098
79
0.613473
import functools import posixpath from muranoclient.common import base def normalize_path(f): @functools.wraps(f) def f_normalize_path(*args, **kwargs): path = args[2] if len(args) >= 3 else kwargs['path'] if not posixpath.isabs(path): raise ValueError("Parameter 'path' ...
true
true
f7314fe04d0a36817a1cc7e4b30f2ff6ab6dfec8
871
py
Python
conflowgen/tests/domain_models/distribution_model_seeder/test_container_weight_distribution_seeder.py
bbargstaedt/conflowgen
b5b5c0e2df8a605d23ef467aaa3e88aa463a34ee
[ "MIT" ]
5
2022-02-16T11:44:42.000Z
2022-02-24T20:02:17.000Z
conflowgen/tests/domain_models/distribution_model_seeder/test_container_weight_distribution_seeder.py
bbargstaedt/conflowgen
b5b5c0e2df8a605d23ef467aaa3e88aa463a34ee
[ "MIT" ]
90
2021-12-08T14:05:44.000Z
2022-03-24T08:53:31.000Z
conflowgen/tests/domain_models/distribution_model_seeder/test_container_weight_distribution_seeder.py
bbargstaedt/conflowgen
b5b5c0e2df8a605d23ef467aaa3e88aa463a34ee
[ "MIT" ]
5
2021-12-07T16:05:15.000Z
2022-02-16T08:24:07.000Z
""" Check if container weights can be properly seeded. """ import unittest from conflowgen.domain_models.distribution_models.container_weight_distribution import ContainerWeightDistribution from conflowgen.domain_models.distribution_seeders import container_weight_distribution_seeder from conflowgen.tests.substitute_...
32.259259
114
0.766935
import unittest from conflowgen.domain_models.distribution_models.container_weight_distribution import ContainerWeightDistribution from conflowgen.domain_models.distribution_seeders import container_weight_distribution_seeder from conflowgen.tests.substitute_peewee_database import setup_sqlite_in_memory_db class Te...
true
true
f73150728d21634b3692b32fa17efb6464b8c3ef
2,110
py
Python
download_paper.py
xiangze/CSpaperTopicViewer
f98bfc3d8771b50448867b15b723ab6af8e6d321
[ "WTFPL" ]
1
2016-07-10T23:51:12.000Z
2016-07-10T23:51:12.000Z
download_paper.py
xiangze/cvprpapers
f98bfc3d8771b50448867b15b723ab6af8e6d321
[ "WTFPL" ]
null
null
null
download_paper.py
xiangze/cvprpapers
f98bfc3d8771b50448867b15b723ab6af8e6d321
[ "WTFPL" ]
1
2016-08-02T06:34:37.000Z
2016-08-02T06:34:37.000Z
import httplib2 from bs4 import BeautifulSoup, SoupStrainer import urllib.request, urllib.error import os import re import sys def get(url): http = httplib2.Http(".cache", disable_ssl_certificate_validation=True) status, response = http.request(url) return response def getlinks(url): return Beautiful...
27.402597
83
0.658768
import httplib2 from bs4 import BeautifulSoup, SoupStrainer import urllib.request, urllib.error import os import re import sys def get(url): http = httplib2.Http(".cache", disable_ssl_certificate_validation=True) status, response = http.request(url) return response def getlinks(url): return Beautiful...
true
true
f73150e76382b56bfc3f89148efd010e1fe93f98
1,332
py
Python
utils/logquant_v1.py
listato/Logarithmic-Quantization-of-Parameters-in-Neural-Networks
dbc6a48ab5e0bf4361be459a45598523f2344371
[ "MIT" ]
1
2022-02-04T10:39:54.000Z
2022-02-04T10:39:54.000Z
utils/logquant_v1.py
listato/Logarithmic-Quantization-of-Parameters-in-Neural-Networks
dbc6a48ab5e0bf4361be459a45598523f2344371
[ "MIT" ]
null
null
null
utils/logquant_v1.py
listato/Logarithmic-Quantization-of-Parameters-in-Neural-Networks
dbc6a48ab5e0bf4361be459a45598523f2344371
[ "MIT" ]
null
null
null
""" Author: CAI JINGYONG @ BeatCraft, Inc & Tokyo University of Agriculture and Technology placeholder input: numpy array output: numpy array """ import numpy class LogQuant: def __init__(self,layer,bitwidth): self.layer_data = layer self.width = bitwidth self.maxima = numpy.amax(layer) ...
26.64
90
0.583333
import numpy class LogQuant: def __init__(self,layer,bitwidth): self.layer_data = layer self.width = bitwidth self.maxima = numpy.amax(layer) self.minima = numpy.amin(layer) self.fsr = self.maxima - self.minima self.sign = numpy.sign(layer) pass def __cl...
true
true
f731514ce63880879d8950cd12e196a3a011a776
11,680
py
Python
chives/util/merkle_set.py
zcomputerwiz/chives-light-wallet
b5f57f46bf4f804cc06a6e2bdf8cbde41bba2fe0
[ "Apache-2.0" ]
null
null
null
chives/util/merkle_set.py
zcomputerwiz/chives-light-wallet
b5f57f46bf4f804cc06a6e2bdf8cbde41bba2fe0
[ "Apache-2.0" ]
null
null
null
chives/util/merkle_set.py
zcomputerwiz/chives-light-wallet
b5f57f46bf4f804cc06a6e2bdf8cbde41bba2fe0
[ "Apache-2.0" ]
1
2022-03-20T16:19:04.000Z
2022-03-20T16:19:04.000Z
from abc import ABCMeta, abstractmethod from hashlib import sha256 from typing import Any, Dict, List, Tuple from chives.types.blockchain_format.sized_bytes import bytes32 """ A simple, confidence-inspiring Merkle Set standard Advantages of this standard: Low CPU requirements Small proofs of inclusion/exclusion Reas...
29.054726
112
0.617894
from abc import ABCMeta, abstractmethod from hashlib import sha256 from typing import Any, Dict, List, Tuple from chives.types.blockchain_format.sized_bytes import bytes32 EMPTY = bytes([0]) TERMINAL = bytes([1]) MIDDLE = bytes([2]) TRUNCATED = bytes([3]) BLANK = bytes32([0] * 32) prehashed: Dict[bytes, Any] = {} ...
true
true
f73151573f84138e26ebce007711c74837f84410
16,958
py
Python
colour/characterisation/datasets/cameras/dslr/sensitivities.py
aurelienpierre/colour
3ac45c12fbc0493e49ba4d4b2cb253df9fe14c47
[ "BSD-3-Clause" ]
null
null
null
colour/characterisation/datasets/cameras/dslr/sensitivities.py
aurelienpierre/colour
3ac45c12fbc0493e49ba4d4b2cb253df9fe14c47
[ "BSD-3-Clause" ]
null
null
null
colour/characterisation/datasets/cameras/dslr/sensitivities.py
aurelienpierre/colour
3ac45c12fbc0493e49ba4d4b2cb253df9fe14c47
[ "BSD-3-Clause" ]
null
null
null
""" Sensitivities of *DSLR* Cameras =============================== Defines the sensitivities of *DSLR* cameras. Each *DSLR* camera data is in the form of a *dict* of :class:`colour.characterisation.RGB_CameraSensitivities` classes as follows:: { 'name': RGB_CameraSensitivities, ..., 'nam...
27.046252
78
0.513445
from __future__ import annotations from functools import partial from colour.characterisation import RGB_CameraSensitivities from colour.hints import Dict from colour.utilities import LazyCaseInsensitiveMapping __author__ = "Colour Developers" __copyright__ = "Copyright 2013 Colour Developers" __license__ = "New BS...
true
true
f731522e9661ea03a15b6c0891cbf1369590cc3e
5,128
py
Python
youtubeto/raindrop.py
Perlence/youtube-to
b0183719f3c40825f7fab520294bd55574fde581
[ "BSD-3-Clause" ]
1
2021-06-18T22:34:00.000Z
2021-06-18T22:34:00.000Z
youtubeto/raindrop.py
Perlence/youtube-to
b0183719f3c40825f7fab520294bd55574fde581
[ "BSD-3-Clause" ]
null
null
null
youtubeto/raindrop.py
Perlence/youtube-to
b0183719f3c40825f7fab520294bd55574fde581
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import from gevent import monkey monkey.patch_all(thread=False, select=False) import json import arrow from apiclient.discovery import build from gevent.pool import Pool from httplib2 import Http from logbook import Logger from oauth2client import client from . import config logger ...
33.736842
77
0.633385
from __future__ import absolute_import from gevent import monkey monkey.patch_all(thread=False, select=False) import json import arrow from apiclient.discovery import build from gevent.pool import Pool from httplib2 import Http from logbook import Logger from oauth2client import client from . import config logger ...
true
true
f731523ad4d8e5ca45ea9d3c2e855ab60f507b2e
31
py
Python
nso_restconf/__init__.py
rtrjl/nso_restconf
f5b8aa1cd857bf79732273c51f8dc6df13df030f
[ "BSD-Source-Code" ]
1
2022-02-04T13:44:49.000Z
2022-02-04T13:44:49.000Z
nso_restconf/__init__.py
rtrjl/nso_restconf
f5b8aa1cd857bf79732273c51f8dc6df13df030f
[ "BSD-Source-Code" ]
null
null
null
nso_restconf/__init__.py
rtrjl/nso_restconf
f5b8aa1cd857bf79732273c51f8dc6df13df030f
[ "BSD-Source-Code" ]
null
null
null
from .restconf import RestConf
15.5
30
0.83871
from .restconf import RestConf
true
true
f73152526fda44eeae7cc9b1ebdfc4befe32c01d
13,312
py
Python
tests/integration/cloud/helpers/cloud_test_base.py
HudsonWu/mysalt
8ce2f66e0d0338157923f0ea0dab912a0f43e52e
[ "Apache-2.0" ]
null
null
null
tests/integration/cloud/helpers/cloud_test_base.py
HudsonWu/mysalt
8ce2f66e0d0338157923f0ea0dab912a0f43e52e
[ "Apache-2.0" ]
null
null
null
tests/integration/cloud/helpers/cloud_test_base.py
HudsonWu/mysalt
8ce2f66e0d0338157923f0ea0dab912a0f43e52e
[ "Apache-2.0" ]
null
null
null
""" Tests for the Openstack Cloud Provider """ import logging import os import shutil from time import sleep import salt.utils.verify from salt.config import cloud_config, cloud_providers_config from salt.ext.six.moves import range from salt.utils.yaml import safe_load from tests.support.case import ShellCase from t...
37.498592
126
0.558293
import logging import os import shutil from time import sleep import salt.utils.verify from salt.config import cloud_config, cloud_providers_config from salt.ext.six.moves import range from salt.utils.yaml import safe_load from tests.support.case import ShellCase from tests.support.helpers import expensiveTest, rand...
true
true
f7315522e3755914ebfefcdfd231697126d0ee40
49,362
py
Python
path-finding/yolo-v5/utils/datasets.py
sa-y-an/open-source-autonomous-vehicle-controller
0cc415fb141d1b66ac45a7bf6b50add6814728fb
[ "MIT" ]
3
2021-06-15T05:10:00.000Z
2021-09-05T18:07:01.000Z
utils/datasets.py
z430/yolov5-mask-detection
b959a4fefa1d44d052436ff9129af386e15e0455
[ "MIT" ]
1
2021-06-07T21:05:14.000Z
2021-06-07T21:05:14.000Z
utils/datasets.py
z430/yolov5-mask-detection
b959a4fefa1d44d052436ff9129af386e15e0455
[ "MIT" ]
9
2021-06-10T08:42:53.000Z
2022-03-28T05:46:16.000Z
# Dataset utils and dataloaders import glob import hashlib import json import logging import os import random import shutil import time from itertools import repeat from multiprocessing.pool import ThreadPool, Pool from pathlib import Path from threading import Thread import cv2 import math import numpy as np import ...
42.590164
120
0.548803
import glob import hashlib import json import logging import os import random import shutil import time from itertools import repeat from multiprocessing.pool import ThreadPool, Pool from pathlib import Path from threading import Thread import cv2 import math import numpy as np import torch import torch.nn.functional...
true
true
f7315650becb2c94bec9837ddd60b3d1e3e2b7d1
2,007
py
Python
extra/face.py
Leyan529/ImageClassificationPL
a4be75f4525828100d8d278e46ff5dccd829af1a
[ "MIT" ]
null
null
null
extra/face.py
Leyan529/ImageClassificationPL
a4be75f4525828100d8d278e46ff5dccd829af1a
[ "MIT" ]
null
null
null
extra/face.py
Leyan529/ImageClassificationPL
a4be75f4525828100d8d278e46ff5dccd829af1a
[ "MIT" ]
null
null
null
import torch import matplotlib.image as img import cv2 import dlib from imutils.face_utils import * import numpy as np # image = img.imread("extra//test.jpg") # image = cv2.cvtColor(np.array(image), cv2.COLOR_RGB2BGR) # opencvImage dlib_path = 'extra//shape_predictor_68_face_landmarks.dat' def get_fac...
35.210526
116
0.605879
import torch import matplotlib.image as img import cv2 import dlib from imutils.face_utils import * import numpy as np dlib_path = 'extra//shape_predictor_68_face_landmarks.dat' def get_face(img): global detector, landmark_predictor detector = dlib.get_frontal_face_detector() landmark...
true
true
f731574329fa3890c3eac2e8b58b5c9c180f7338
1,636
py
Python
src/Filtering/BinaryMathematicalMorphology/DilateABinaryImage/Code.py
justbennet/ITKExamples
cde3b1bfb396042050c399b4bae59c338cf646f2
[ "Apache-2.0" ]
null
null
null
src/Filtering/BinaryMathematicalMorphology/DilateABinaryImage/Code.py
justbennet/ITKExamples
cde3b1bfb396042050c399b4bae59c338cf646f2
[ "Apache-2.0" ]
null
null
null
src/Filtering/BinaryMathematicalMorphology/DilateABinaryImage/Code.py
justbennet/ITKExamples
cde3b1bfb396042050c399b4bae59c338cf646f2
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright NumFOCUS # # 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.txt # # Unless required by applicable law or ...
30.296296
75
0.732274
import sys import itk if len(sys.argv) != 4: print("Usage: " + sys.argv[0] + " <inputImage> <outputImage> <radius>") sys.exit(1) inputImage = sys.argv[1] outputImage = sys.argv[2] radiusValue = int(sys.argv[3]) PixelType = itk.UC Dimension = 2 ImageType = itk.Image[PixelType, Dimension] ReaderType = itk....
true
true
f731577f3eb816602726166e59d42f01b5f4b241
9,919
py
Python
src/sasctl/utils/cli.py
brtieu/python-sasctl
1eed427c39faaddda78dec4806f12f3f8964890e
[ "Apache-2.0" ]
30
2019-07-12T00:18:21.000Z
2022-03-18T08:36:35.000Z
src/sasctl/utils/cli.py
brtieu/python-sasctl
1eed427c39faaddda78dec4806f12f3f8964890e
[ "Apache-2.0" ]
89
2019-07-12T20:46:46.000Z
2022-03-29T16:16:46.000Z
src/sasctl/utils/cli.py
brtieu/python-sasctl
1eed427c39faaddda78dec4806f12f3f8964890e
[ "Apache-2.0" ]
41
2019-07-11T15:08:55.000Z
2022-01-10T05:30:50.000Z
#!/usr/bin/env python # encoding: utf-8 # # Copyright © 2019, SAS Institute Inc., Cary, NC, USA. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 import argparse import inspect import json import logging import os import pkgutil import warnings from collections import namedtuple, defaultdict from importlib ...
32.521311
97
0.569311
import argparse import inspect import json import logging import os import pkgutil import warnings from collections import namedtuple, defaultdict from importlib import import_module from pprint import pprint ArgInfo = namedtuple('ArgInfo', ['name', 'type', 'required', 'default', 'doc']) def sasctl_command(name, s...
true
true
f731586ef1b81b7d4f26fef5e91e60a95e44ab32
28
py
Python
purectypes/struct_value.py
aguinet/purectypes
e1db225ba865468b1f0d2fe017a7291da41acbfd
[ "Apache-2.0" ]
19
2020-02-22T12:29:39.000Z
2021-10-02T02:36:01.000Z
purectypes/struct_value.py
aguinet/purectypes
e1db225ba865468b1f0d2fe017a7291da41acbfd
[ "Apache-2.0" ]
null
null
null
purectypes/struct_value.py
aguinet/purectypes
e1db225ba865468b1f0d2fe017a7291da41acbfd
[ "Apache-2.0" ]
2
2020-02-22T12:29:46.000Z
2020-10-11T18:48:53.000Z
class StructValue: pass
9.333333
18
0.714286
class StructValue: pass
true
true
f731592f46955b17ebfec9140599ba5b56cb5dab
33,850
py
Python
mlflow/pyfunc/__init__.py
washcycle/mlflow
5a60ab34a4cecfe0b9636f6df77c087faa8b6959
[ "Apache-2.0" ]
3
2018-10-16T16:34:46.000Z
2020-01-08T09:34:34.000Z
mlflow/pyfunc/__init__.py
washcycle/mlflow
5a60ab34a4cecfe0b9636f6df77c087faa8b6959
[ "Apache-2.0" ]
null
null
null
mlflow/pyfunc/__init__.py
washcycle/mlflow
5a60ab34a4cecfe0b9636f6df77c087faa8b6959
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ The ``mlflow.pyfunc`` module defines a generic :ref:`filesystem format <pyfunc-filesystem-format>` for Python models and provides utilities for saving to and loading from this format. The format is self contained in the sense that it includes all necessary information for anyone to load it ...
46.883657
100
0.65288
import importlib import logging import numpy as np import os import pandas import shutil from copy import deepcopy import mlflow import mlflow.pyfunc.model import mlflow.pyfunc.utils from mlflow.models import Model from mlflow.pyfunc.model import PythonModel, PythonModelContext, get_default_conda_env from mlflow.tra...
true
true
f7315a0806862ec68601ee3196af37bdc53af7a3
3,235
py
Python
pypureclient/flasharray/FA_2_5/models/certificate_signing_request_response.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
14
2018-12-07T18:30:27.000Z
2022-02-22T09:12:33.000Z
pypureclient/flasharray/FA_2_5/models/certificate_signing_request_response.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
28
2019-09-17T21:03:52.000Z
2022-03-29T22:07:35.000Z
pypureclient/flasharray/FA_2_5/models/certificate_signing_request_response.py
Flav-STOR-WL/py-pure-client
03b889c997d90380ac5d6380ca5d5432792d3e89
[ "BSD-2-Clause" ]
15
2020-06-11T15:50:08.000Z
2022-03-21T09:27:25.000Z
# coding: utf-8 """ FlashArray REST API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 2.5 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re import six import typing from ....
28.883929
105
0.559505
import pprint import re import six import typing from ....properties import Property if typing.TYPE_CHECKING: from pypureclient.flasharray.FA_2_5 import models class CertificateSigningRequestResponse(object): swagger_types = { 'items': 'list[CertificateSigningRequest]' } attribute_map = {...
true
true
f7315a1e62e3e9a93eec26f0b1922799b57e4925
6,815
py
Python
resources.py
vermeulendivan/qgis-pipelineplanner
b0d0c05626401b874a193fe358eec6146a204fff
[ "MIT" ]
null
null
null
resources.py
vermeulendivan/qgis-pipelineplanner
b0d0c05626401b874a193fe358eec6146a204fff
[ "MIT" ]
null
null
null
resources.py
vermeulendivan/qgis-pipelineplanner
b0d0c05626401b874a193fe358eec6146a204fff
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Resource object code # # Created by: The Resource Compiler for PyQt5 (Qt v5.15.2) # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore qt_resource_data = b"\ \x00\x00\x04\xa5\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ ...
49.028777
122
0.711812
from PyQt5 import QtCore qt_resource_data = b"\ \x00\x00\x04\xa5\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ \x00\x00\x18\x00\x00\x00\x18\x08\x02\x00\x00\x00\x6f\x15\xaa\xaf\ \x00\x00\x00\x01\x73\x52\x47\x42\x00\xae\xce\x1c\xe9\x00\x00\x00\ \x04\x67\x41\x4d\x41\x00\x00\xb1\x8f\...
true
true
f7315ba8d23659f4ee2ea63c31b028bd2c878b21
182
py
Python
problem0153.py
kmarcini/Project-Euler-Python
d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3
[ "BSD-3-Clause" ]
null
null
null
problem0153.py
kmarcini/Project-Euler-Python
d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3
[ "BSD-3-Clause" ]
null
null
null
problem0153.py
kmarcini/Project-Euler-Python
d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3
[ "BSD-3-Clause" ]
null
null
null
########################### # # #153 Investigating Gaussian Integers - Project Euler # https://projecteuler.net/problem=153 # # Code by Kevin Marciniak # ###########################
20.222222
54
0.516484
true
true
f7315e9ebfe36931ca1757fcf4e6d4f8dd4ad184
2,810
py
Python
.history/src/modules/test_plot/test_plot_20190927183934.py
mattzakh/mattplotlib
5e9bc779d8c1b7074549615ab6790a9f7163cd59
[ "MIT" ]
null
null
null
.history/src/modules/test_plot/test_plot_20190927183934.py
mattzakh/mattplotlib
5e9bc779d8c1b7074549615ab6790a9f7163cd59
[ "MIT" ]
5
2020-03-24T17:44:10.000Z
2021-08-23T20:22:20.000Z
.history/src/modules/test_plot/test_plot_20190927183934.py
mattzakh/mattplotlib
5e9bc779d8c1b7074549615ab6790a9f7163cd59
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt # plt.style.use('../notebooks/test.mplstyle') import seaborn as sns from logs import logDecorator as lD import jsonref, pprint config = jsonref.load(open('../config/config.json')) logBase = config['logging']['logBase'] + '.modules.test_plot.test_plot' @lD.log(logB...
30.543478
126
0.580071
import numpy as np import matplotlib.pyplot as plt import seaborn as sns from logs import logDecorator as lD import jsonref, pprint config = jsonref.load(open('../config/config.json')) logBase = config['logging']['logBase'] + '.modules.test_plot.test_plot' @lD.log(logBase + '.doSomething') def doSomething(logger):...
true
true
f7315faf3403c57b71fcb4aae306f4d130e43b2b
666
py
Python
algorithms/python/21.py
scream7/leetcode
1fe0f5df3ca0019a4d99979cc663993d2492272d
[ "Apache-2.0" ]
null
null
null
algorithms/python/21.py
scream7/leetcode
1fe0f5df3ca0019a4d99979cc663993d2492272d
[ "Apache-2.0" ]
null
null
null
algorithms/python/21.py
scream7/leetcode
1fe0f5df3ca0019a4d99979cc663993d2492272d
[ "Apache-2.0" ]
null
null
null
# Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self.next = None class Solution(object): def mergeTwoLists(self, l1, l2): """ :type l1: ListNode :type l2: ListNode :rtype: ListNode """ dummy...
25.615385
47
0.472973
class Solution(object): def mergeTwoLists(self, l1, l2): dummy = ListNode(0) cur = dummy while l1 and l2: if l1.val <= l2.val: cur.next = l1 l1 = l1.next elif l2.val < l1.val: cur.next = l2 l2 = l2.next ...
true
true
f7316132008490fabdc6c23eaeae95ebcafde9b9
2,856
py
Python
setup.py
vikrammodh0111/vectorai
0ca0adf1599639035603af8158477972b0902784
[ "Apache-2.0" ]
null
null
null
setup.py
vikrammodh0111/vectorai
0ca0adf1599639035603af8158477972b0902784
[ "Apache-2.0" ]
null
null
null
setup.py
vikrammodh0111/vectorai
0ca0adf1599639035603af8158477972b0902784
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages import os core_req = ["requests", "numpy", "pandas", "appdirs>=1.4.4", "tqdm>=4.27.0", "plotly>=4.0.0"] extras_req = { "dev" : ["twine", "black", "pytest", "pytest-cov"], "test" : ["pytest", "pytest-cov"], "docs" : [...
42.626866
179
0.640056
from setuptools import setup, find_packages import os core_req = ["requests", "numpy", "pandas", "appdirs>=1.4.4", "tqdm>=4.27.0", "plotly>=4.0.0"] extras_req = { "dev" : ["twine", "black", "pytest", "pytest-cov"], "test" : ["pytest", "pytest-cov"], "docs" : ["sphinx-rtd-theme>=0.5.0", "nbsphinx>=0.7.1"] ...
true
true
f7316298bcfb66abd224d102bd05d708bceccc59
647
py
Python
SAMparser.py
camaclean/bella
c80c012cda05bc15b69db7fd54424823f75b5a21
[ "BSD-3-Clause-LBNL" ]
36
2018-11-07T14:21:20.000Z
2020-07-21T03:52:20.000Z
SAMparser.py
camaclean/bella
c80c012cda05bc15b69db7fd54424823f75b5a21
[ "BSD-3-Clause-LBNL" ]
5
2018-11-09T11:03:36.000Z
2019-09-10T18:39:39.000Z
SAMparser.py
camaclean/bella
c80c012cda05bc15b69db7fd54424823f75b5a21
[ "BSD-3-Clause-LBNL" ]
6
2019-05-21T01:15:02.000Z
2020-06-17T16:34:36.000Z
from simplesam import Reader, Writer import inspect import sys, os, fileinput, string in_file = open(sys.argv[1], 'r') in_sam = Reader(in_file) out_file = open('full_ecoli_mapped_q10_truth.txt', 'w') # out_sam = Writer(out_file) x = next(in_sam) try: while(x.qname != ''): #if(x.reverse): # out_file.write("+" + ...
23.107143
55
0.650696
from simplesam import Reader, Writer import inspect import sys, os, fileinput, string in_file = open(sys.argv[1], 'r') in_sam = Reader(in_file) out_file = open('full_ecoli_mapped_q10_truth.txt', 'w') x = next(in_sam) try: while(x.qname != ''): out_file.write(x.rname + " ") out_file.write(x.qname + " ") ...
true
true
f73162a75addcf3c375f9aa1bcc038bdb5b9598e
16,255
py
Python
XBNet/main.py
tusharsarkar3/XBNet
01e385f1c0a446eb38f4dd59ee9c510170bf096b
[ "MIT" ]
167
2021-06-03T18:45:12.000Z
2022-03-30T10:50:35.000Z
XBNet/main.py
tusharsarkar3/XBNet
01e385f1c0a446eb38f4dd59ee9c510170bf096b
[ "MIT" ]
13
2021-06-12T04:11:16.000Z
2022-03-18T15:56:36.000Z
XBNet/main.py
tusharsarkar3/XBNet
01e385f1c0a446eb38f4dd59ee9c510170bf096b
[ "MIT" ]
27
2021-06-11T08:44:05.000Z
2022-02-26T11:54:43.000Z
from kivymd.app import MDApp from kivy.uix.widget import Widget from kivy.uix.actionbar import ActionBar from kivy.uix.scrollview import ScrollView from kivy.uix.boxlayout import BoxLayout from kivymd.theming import ThemableBehavior from kivymd.uix.list import OneLineListItem, MDList, TwoLineListItem, ThreeLineListItem...
40.235149
150
0.562781
from kivymd.app import MDApp from kivy.uix.widget import Widget from kivy.uix.actionbar import ActionBar from kivy.uix.scrollview import ScrollView from kivy.uix.boxlayout import BoxLayout from kivymd.theming import ThemableBehavior from kivymd.uix.list import OneLineListItem, MDList, TwoLineListItem, ThreeLineListItem...
true
true
f7316351492d58d868c0577a2c53428d4e7bd48c
815
py
Python
apiapp/views.py
cansati/api-project
9760025d84e91997ee9d3e141263e903ec95d6df
[ "MIT" ]
null
null
null
apiapp/views.py
cansati/api-project
9760025d84e91997ee9d3e141263e903ec95d6df
[ "MIT" ]
null
null
null
apiapp/views.py
cansati/api-project
9760025d84e91997ee9d3e141263e903ec95d6df
[ "MIT" ]
null
null
null
from rest_framework import viewsets from . import serializers, models, permissions from rest_framework.authentication import TokenAuthentication from rest_framework.permissions import IsAuthenticated from rest_framework import filters from rest_framework.authtoken.views import ObtainAuthToken from rest_framework.settin...
42.894737
72
0.825767
from rest_framework import viewsets from . import serializers, models, permissions from rest_framework.authentication import TokenAuthentication from rest_framework.permissions import IsAuthenticated from rest_framework import filters from rest_framework.authtoken.views import ObtainAuthToken from rest_framework.settin...
true
true
f73163bebf2ce9fdff591feac06da38b26c56b96
851
py
Python
ooobuild/dyn/sdb/definition_content.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/dyn/sdb/definition_content.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/dyn/sdb/definition_content.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http: // www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
32.730769
79
0.760282
from ...lo.sdb.definition_content import DefinitionContent as DefinitionContent __all__ = ['DefinitionContent']
true
true
f731655548ca300269d3b7f542881d9a8eb93c2a
4,830
py
Python
src/pykeen/models/unimodal/trans_e.py
DJRavinszkha/pykeen
d79fe39f83bc2831137f22be6421b37568694cf4
[ "MIT" ]
null
null
null
src/pykeen/models/unimodal/trans_e.py
DJRavinszkha/pykeen
d79fe39f83bc2831137f22be6421b37568694cf4
[ "MIT" ]
null
null
null
src/pykeen/models/unimodal/trans_e.py
DJRavinszkha/pykeen
d79fe39f83bc2831137f22be6421b37568694cf4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """TransE.""" from typing import Any, ClassVar, Mapping, Optional import torch import torch.autograd from torch.nn import functional from ..base import EntityRelationEmbeddingModel from ...constants import DEFAULT_EMBEDDING_HPO_EMBEDDING_DIM_RANGE from ...losses import Loss from ...nn.emb im...
38.951613
119
0.654658
from typing import Any, ClassVar, Mapping, Optional import torch import torch.autograd from torch.nn import functional from ..base import EntityRelationEmbeddingModel from ...constants import DEFAULT_EMBEDDING_HPO_EMBEDDING_DIM_RANGE from ...losses import Loss from ...nn.emb import EmbeddingSpecification from ...nn...
true
true
f73165f0c8a4ee6043789cf0356dafa3edf3bfa8
1,392
py
Python
main.py
tejasvicsr1/Jumble-Solver
12980394f6f0b7a5a580a56389559266f3825d6a
[ "MIT" ]
null
null
null
main.py
tejasvicsr1/Jumble-Solver
12980394f6f0b7a5a580a56389559266f3825d6a
[ "MIT" ]
null
null
null
main.py
tejasvicsr1/Jumble-Solver
12980394f6f0b7a5a580a56389559266f3825d6a
[ "MIT" ]
null
null
null
# Python code to unscramble a jumbled word using the Enchant dictionary(US) and itertools in Python. from itertools import permutations import enchant word_list = enchant.Dict("en_US") # Taking the input word and converting it into lowercase words. word = input("Enter the letters: ") word = word.lower() word_length ...
28.408163
101
0.655891
from itertools import permutations import enchant word_list = enchant.Dict("en_US") word = input("Enter the letters: ") word = word.lower() word_length = len(word) def output_fnc(length): temp = [] for word in ans: if len(word) == length: temp.append(word) if len(temp) != 0: pr...
true
true
f731664d01602fc4bc98d2d3a1dca73625c63b84
14,176
py
Python
file-access/static/usr/bin/setup-users-and-groups.py
aisbergg/dockerfiles
3cf24d2667a75d6eda8b8fb7df835b97c6a13348
[ "MIT" ]
1
2019-10-23T06:54:06.000Z
2019-10-23T06:54:06.000Z
file-access/static/usr/bin/setup-users-and-groups.py
aisbergg/dockerfiles
3cf24d2667a75d6eda8b8fb7df835b97c6a13348
[ "MIT" ]
null
null
null
file-access/static/usr/bin/setup-users-and-groups.py
aisbergg/dockerfiles
3cf24d2667a75d6eda8b8fb7df835b97c6a13348
[ "MIT" ]
null
null
null
import argparse import crypt import json import os import pwd import random import re import string import subprocess import sys import traceback from itertools import product import yaml class ACL: @staticmethod def get_file_acl(path): if not os.path.exists(path): raise IOError("The dir...
46.175896
236
0.55862
import argparse import crypt import json import os import pwd import random import re import string import subprocess import sys import traceback from itertools import product import yaml class ACL: @staticmethod def get_file_acl(path): if not os.path.exists(path): raise IOError("The dir...
true
true
f73167cc38566b53bef2f4ba63993e95af6bb2c0
3,587
py
Python
brian2/only.py
awillats/brian2
e1107ed0cc4a7d6c69c1e2634b675ba09edfd9fc
[ "BSD-2-Clause" ]
1
2021-06-10T15:28:51.000Z
2021-06-10T15:28:51.000Z
brian2/only.py
awillats/brian2
e1107ed0cc4a7d6c69c1e2634b675ba09edfd9fc
[ "BSD-2-Clause" ]
null
null
null
brian2/only.py
awillats/brian2
e1107ed0cc4a7d6c69c1e2634b675ba09edfd9fc
[ "BSD-2-Clause" ]
null
null
null
''' A dummy package to allow wildcard import from brian2 without also importing the pylab (numpy + matplotlib) namespace. Usage: ``from brian2.only import *`` ''' # To minimize the problems with imports, import the packages in a sensible # order # The units and utils package does not depend on any other Brian packag...
31.191304
85
0.726234
from brian2.units import * from brian2.utils import * from brian2.core.tracking import * from brian2.core.names import * from brian2.core.spikesource import * from brian2.core.variables import linked_var from brian2.core.functions import * from brian2.core.preferences import * from brian2.core.clocks import * from b...
true
true
f73168e6d9bed2cc8b08603295293be0c8f914d9
5,134
py
Python
test/test_keytool_parse.py
cccs-rs/assemblyline-v4-service
ed53dedaa6f3c4e3850defd9f68b0d57407153bf
[ "MIT" ]
6
2020-06-30T13:54:44.000Z
2021-05-28T19:36:32.000Z
test/test_keytool_parse.py
cccs-rs/assemblyline-v4-service
ed53dedaa6f3c4e3850defd9f68b0d57407153bf
[ "MIT" ]
17
2020-06-19T03:02:21.000Z
2022-03-01T18:19:07.000Z
test/test_keytool_parse.py
cccs-rs/assemblyline-v4-service
ed53dedaa6f3c4e3850defd9f68b0d57407153bf
[ "MIT" ]
8
2020-04-30T16:11:52.000Z
2021-07-16T12:11:40.000Z
import pytest class TestKeytoolParse: @staticmethod @pytest.mark.parametrize("printcert, correct_certs", [ ('Owner: CN=ca, OU=ca, O=ca, L=ca, ST=ca, C=CA\nIssuer: CN=root, OU=root, O=root, L=root, ST=root, C=CA\nSerial number: 5f822698\nValid from: Wed Apr 14 13:40:13 EDT 2021 until: Tue ...
190.148148
2,706
0.639462
import pytest class TestKeytoolParse: @staticmethod @pytest.mark.parametrize("printcert, correct_certs", [ ('Owner: CN=ca, OU=ca, O=ca, L=ca, ST=ca, C=CA\nIssuer: CN=root, OU=root, O=root, L=root, ST=root, C=CA\nSerial number: 5f822698\nValid from: Wed Apr 14 13:40:13 EDT 2021 until: Tue ...
true
true
f7316970b0437dcd982b168d5fcd16d064c8cb16
8,044
py
Python
tempest/api/identity/admin/v3/test_domain_configuration.py
mail2nsrajesh/tempest
1a3b3dc50b418d3a15839830d7d1ff88c8c76cff
[ "Apache-2.0" ]
null
null
null
tempest/api/identity/admin/v3/test_domain_configuration.py
mail2nsrajesh/tempest
1a3b3dc50b418d3a15839830d7d1ff88c8c76cff
[ "Apache-2.0" ]
null
null
null
tempest/api/identity/admin/v3/test_domain_configuration.py
mail2nsrajesh/tempest
1a3b3dc50b418d3a15839830d7d1ff88c8c76cff
[ "Apache-2.0" ]
5
2016-06-24T20:03:52.000Z
2020-02-05T10:14:54.000Z
# Copyright 2017 AT&T Corporation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
43.481081
79
0.669443
from tempest.api.identity import base from tempest.lib.common.utils import data_utils from tempest.lib.common.utils import test_utils from tempest.lib import decorators from tempest.lib import exceptions as lib_exc class DomainConfigurationTestJSON(base.BaseIdentityV3AdminTest): custom_config = { "ident...
true
true
f731698f7c8a52b2ad20a1732001853d221b636d
9,161
py
Python
metalibm_core/code_generation/code_function.py
metalibm/metalibm-clone
d04839e58950a156b79b763b9f45cb874e21ebfe
[ "MIT" ]
null
null
null
metalibm_core/code_generation/code_function.py
metalibm/metalibm-clone
d04839e58950a156b79b763b9f45cb874e21ebfe
[ "MIT" ]
null
null
null
metalibm_core/code_generation/code_function.py
metalibm/metalibm-clone
d04839e58950a156b79b763b9f45cb874e21ebfe
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- ############################################################################### # This file is part of metalibm (https://github.com/kalray/metalibm) ############################################################################### # MIT License # # Copyright (c) 2018 Kalray # # Permission is here...
41.640909
145
0.709966
from ..core.ml_operations import Variable, FunctionObject, FunctionType from .code_object import NestedCode from .generator_utility import FunctionOperator, FO_Arg from .code_constant import * class CodeFunction(object): def __init__(self, name, arg_list=None, output_format=None, code_object=None, language=C_Code...
true
true
f7316a0076d2b4bf5804f2d9d837fa670e1f56a2
5,487
py
Python
classic_tetris_project_django/settings.py
professor-l/classic-tetris-project
d171ab40c06b87ee945dce058babf2ed23dd3b88
[ "MIT" ]
17
2019-11-23T12:56:06.000Z
2022-02-05T21:48:00.000Z
classic_tetris_project_django/settings.py
professor-l/classic-tetris-project
d171ab40c06b87ee945dce058babf2ed23dd3b88
[ "MIT" ]
43
2019-10-03T20:16:11.000Z
2022-03-12T00:24:52.000Z
classic_tetris_project_django/settings.py
professor-l/classic-tetris-project
d171ab40c06b87ee945dce058babf2ed23dd3b88
[ "MIT" ]
17
2020-02-09T01:55:01.000Z
2021-11-12T21:16:50.000Z
""" Django settings for classic_tetris_project_django project. Generated by 'django-admin startproject' using Django 2.2.2. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/setti...
26.253589
91
0.67906
import environ import django import os ENV = environ.Env( SECRET_KEY=(str, 'd0$j=wune9kn70srt1lt!g3a8fim7ug#j@x8+zmy0gi_mv7&dk'), DEBUG=(bool, True), DATABASE_URL=(str, 'sqlite:///db.sqlite3'), CACHE_URL=(str, 'rediscache://'), BASE_URL=(str, 'http://dev.monthlytetris.info:8000'), DISCORD_USER...
true
true
f7316a594c1c8ddc04649d2c3866818979f193b5
12,132
py
Python
python/modprop/core/modules_core.py
Humhu/modprop
0cff8240d5e1522f620de8004c22a74491a0c9fb
[ "AFL-3.0" ]
1
2017-11-10T00:54:53.000Z
2017-11-10T00:54:53.000Z
python/modprop/core/modules_core.py
Humhu/modprop
0cff8240d5e1522f620de8004c22a74491a0c9fb
[ "AFL-3.0" ]
null
null
null
python/modprop/core/modules_core.py
Humhu/modprop
0cff8240d5e1522f620de8004c22a74491a0c9fb
[ "AFL-3.0" ]
null
null
null
"""This module contains base classes and types for creating new Modules and using module trees. """ import abc from collections import deque import numpy as np class ModuleBase(object): """The base interface for all modules. Modules must inherit from this interface. """ __metaclass__ = abc.ABCMeta def...
28.817102
104
0.60089
import abc from collections import deque import numpy as np class ModuleBase(object): __metaclass__ = abc.ABCMeta def __init__(self): self._inputs = [] self._outputs = [] def register_inputs(self, *args): for arg in args: if not isinstance(arg, InputPort): ...
true
true
f7316ace9299b1066e1b315ba165fdf6fd372280
1,042
py
Python
recipes/mojo.py
azunite/chrome_build
fed8b4e9c12aa9a0e33680e223b6327a65b2c268
[ "BSD-3-Clause" ]
10
2016-06-15T06:27:53.000Z
2019-08-29T05:44:28.000Z
recipes/mojo.py
azunite/chrome_build
fed8b4e9c12aa9a0e33680e223b6327a65b2c268
[ "BSD-3-Clause" ]
null
null
null
recipes/mojo.py
azunite/chrome_build
fed8b4e9c12aa9a0e33680e223b6327a65b2c268
[ "BSD-3-Clause" ]
19
2016-03-25T08:12:35.000Z
2022-02-14T06:05:26.000Z
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys import recipe_util # pylint: disable=F0401 # This class doesn't need an __init__ method, so we disable the warning # pylint: disable=W0232 cla...
22.170213
72
0.627639
import sys import recipe_util # pylint: disable=W0232 class Mojo(recipe_util.Recipe): @staticmethod def fetch_spec(props): url = 'https://github.com/domokit/mojo.git' solution = { 'name' :'src', 'url' : url, 'deps_file': 'DEPS', 'managed' : False, 'custom_deps': {}...
true
true
f7316bd69a4ba467eed53268684ee4aaaa448a25
2,259
py
Python
mmaction/models/builder.py
jiaoml1996/mmaction2
cff4a9e196dfc7b7b0e842ab44f2a7f2573a2c7c
[ "Apache-2.0" ]
1
2021-01-07T05:03:16.000Z
2021-01-07T05:03:16.000Z
mmaction/models/builder.py
xumingze0308/mmaction2
777546f27f8f5a3c83e10d966e2149be2fc9fa31
[ "Apache-2.0" ]
null
null
null
mmaction/models/builder.py
xumingze0308/mmaction2
777546f27f8f5a3c83e10d966e2149be2fc9fa31
[ "Apache-2.0" ]
null
null
null
import warnings import torch.nn as nn from mmcv.utils import Registry, build_from_cfg from .registry import BACKBONES, HEADS, LOCALIZERS, LOSSES, NECKS, RECOGNIZERS try: from mmdet.models.builder import DETECTORS, build_detector except (ImportError, ModuleNotFoundError): warnings.warn('Please install mmdet t...
26.267442
78
0.666224
import warnings import torch.nn as nn from mmcv.utils import Registry, build_from_cfg from .registry import BACKBONES, HEADS, LOCALIZERS, LOSSES, NECKS, RECOGNIZERS try: from mmdet.models.builder import DETECTORS, build_detector except (ImportError, ModuleNotFoundError): warnings.warn('Please install mmdet t...
true
true
f7316c5bc4aa4105269362035d277cc55ecd7b85
3,975
py
Python
MyResumes/MyResumes/MyResumes/settings.py
githubError/MessyRepository
2380ed13c167c5c6174f0e71c8dfc634318cda4f
[ "MIT" ]
2
2018-03-12T08:01:47.000Z
2018-03-12T08:06:14.000Z
MyResumes/MyResumes/MyResumes/settings.py
githubError/MessyRepository
2380ed13c167c5c6174f0e71c8dfc634318cda4f
[ "MIT" ]
null
null
null
MyResumes/MyResumes/MyResumes/settings.py
githubError/MessyRepository
2380ed13c167c5c6174f0e71c8dfc634318cda4f
[ "MIT" ]
1
2019-11-06T15:58:05.000Z
2019-11-06T15:58:05.000Z
""" Django settings for MyResumes project. Generated by 'django-admin startproject' using Django 2.0.2. For more information on this file, see https://docs.djangoproject.com/en/2.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.0/ref/settings/ """ import os ...
25
91
0.683522
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'lqpjra6xa@pm96&$y1xri(uau#vk2&)7b1hi6$k&v=zvne*o)%' DEBUG = True ALLOWED_HOSTS = ['*'] # Application definition INSTALLED_APPS = [ 'Resumes.apps.ResumesConfig', 'django.contrib.admin', 'django.contrib.au...
true
true
f7316c7ddaccd1a7c79dfb5e3ac9e15377fd1b26
4,228
py
Python
test_tile/test_tile_magma.py
zbelateche/ee272_cgra
4cf2e3cf4a4bdf585d87a9209a5bf252666bc6a2
[ "BSD-3-Clause" ]
1
2020-07-23T02:57:12.000Z
2020-07-23T02:57:12.000Z
test_tile/test_tile_magma.py
zbelateche/ee272_cgra
4cf2e3cf4a4bdf585d87a9209a5bf252666bc6a2
[ "BSD-3-Clause" ]
null
null
null
test_tile/test_tile_magma.py
zbelateche/ee272_cgra
4cf2e3cf4a4bdf585d87a9209a5bf252666bc6a2
[ "BSD-3-Clause" ]
1
2021-04-27T23:13:43.000Z
2021-04-27T23:13:43.000Z
from common.dummy_core_magma import DummyCore from bit_vector import BitVector from tile.tile_magma import Tile from common.testers import BasicTester import tempfile from fault.random import random_bv def check_all_config(tester, tile_circ, tile, data_wr...
38.436364
79
0.602176
from common.dummy_core_magma import DummyCore from bit_vector import BitVector from tile.tile_magma import Tile from common.testers import BasicTester import tempfile from fault.random import random_bv def check_all_config(tester, tile_circ, tile, data_wr...
true
true
f7316cf7b3b3e6fbabab8a174cf2ecb75444019b
4,820
py
Python
docs/conf.py
aladinoster/prjits_01_v2i
b6b3f96899d56c583c87098ea53ef008a8cb4365
[ "MIT" ]
null
null
null
docs/conf.py
aladinoster/prjits_01_v2i
b6b3f96899d56c583c87098ea53ef008a8cb4365
[ "MIT" ]
null
null
null
docs/conf.py
aladinoster/prjits_01_v2i
b6b3f96899d56c583c87098ea53ef008a8cb4365
[ "MIT" ]
1
2020-10-20T09:37:48.000Z
2020-10-20T09:37:48.000Z
#!/usr/bin/env python # # connectv2x documentation build configuration file, created by # sphinx-quickstart on Fri Jun 9 13:47:02 2017. # # 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. # # ...
29.570552
77
0.686722
import os import sys sys.path.insert(0, os.path.abspath('..')) import connectv2x extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode'] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = 'connectv2x' copyright = "2019, Andres Ladino" author = "Andres Ladino" # for |versi...
true
true
f7316dfaeb40184095a7f7a53a6f4baaf2fb85dd
4,081
py
Python
vcx/wrappers/python3/tests/test_wallet.py
absltkaos/indy-sdk
bc14c5b514dc1c76ce62dd7f6bf804120bf69f5e
[ "Apache-2.0" ]
5
2018-04-09T12:26:28.000Z
2019-06-12T01:45:30.000Z
vcx/wrappers/python3/tests/test_wallet.py
absltkaos/indy-sdk
bc14c5b514dc1c76ce62dd7f6bf804120bf69f5e
[ "Apache-2.0" ]
9
2019-01-22T22:31:54.000Z
2019-04-11T21:45:09.000Z
vcx/wrappers/python3/tests/test_wallet.py
absltkaos/indy-sdk
bc14c5b514dc1c76ce62dd7f6bf804120bf69f5e
[ "Apache-2.0" ]
19
2018-04-25T16:08:43.000Z
2022-01-11T10:18:38.000Z
import pytest from vcx.error import VcxError, ErrorCode from vcx.api.wallet import * import json TYPE = "record type" EMPTY_TYPE = "" ID = "123" EMPTY_ID = "" VALUE = "record value" VALUE_NEW = "RecordValueNew" EMPTY_VALUE = "" TAGS = "{\"tagName1\":\"str1\",\"tagName2\":\"5\",\"tagName3\":\"12\"}" OPTIONS = json.dump...
31.392308
96
0.708895
import pytest from vcx.error import VcxError, ErrorCode from vcx.api.wallet import * import json TYPE = "record type" EMPTY_TYPE = "" ID = "123" EMPTY_ID = "" VALUE = "record value" VALUE_NEW = "RecordValueNew" EMPTY_VALUE = "" TAGS = "{\"tagName1\":\"str1\",\"tagName2\":\"5\",\"tagName3\":\"12\"}" OPTIONS = json.dump...
true
true
f73170c66a28ee836b140a20bd40414c0d6d7122
13,527
py
Python
micropsi_server/usermanagement.py
joschabach/micropsi2
74a2642d20da9da1d64acc5e4c11aeabee192a27
[ "MIT" ]
119
2015-01-23T11:24:58.000Z
2022-03-13T08:00:50.000Z
micropsi_server/usermanagement.py
Chediak/micropsi2
74a2642d20da9da1d64acc5e4c11aeabee192a27
[ "MIT" ]
9
2015-02-18T20:44:58.000Z
2021-09-17T14:38:05.000Z
micropsi_server/usermanagement.py
Chediak/micropsi2
74a2642d20da9da1d64acc5e4c11aeabee192a27
[ "MIT" ]
34
2015-04-01T20:48:49.000Z
2022-03-13T08:02:00.000Z
""" Very simple user management for the MicroPsi service The user manager takes care of users, sessions and user roles. Users without a password set can login with an arbitrary password, so make sure that users do not set empty passwords if this concerns you. When new users are created, they are given a role and stor...
42.537736
122
0.645524
__author__ = 'joscha' __date__ = '11.05.12' import json import hashlib import os import datetime import threading import time import uuid import logging import micropsi_core.tools from configuration import config as cfg ADMIN_USER = "admin" DEFAULT_ROLE = "Restricted" IDLE_TIME_BEFORE_SESSION_EXPIRES = 360000 TIM...
true
true
f731716e66ce6ce28fd803a90df2d90dd154013a
1,402
py
Python
iop_data_flow/footfall/01_footfall_clip.py
IaaC/MACT21.22_Digital_tools_Big_Data_part_2
f0c50a5f7ac147f6e9753545767d2d9998075ebb
[ "Apache-2.0" ]
1
2022-02-18T14:35:34.000Z
2022-02-18T14:35:34.000Z
iop_data_flow/footfall/01_footfall_clip.py
IaaC/MACT21.22_Digital_tools_Big_Data_part_2
f0c50a5f7ac147f6e9753545767d2d9998075ebb
[ "Apache-2.0" ]
null
null
null
iop_data_flow/footfall/01_footfall_clip.py
IaaC/MACT21.22_Digital_tools_Big_Data_part_2
f0c50a5f7ac147f6e9753545767d2d9998075ebb
[ "Apache-2.0" ]
1
2022-02-18T14:35:40.000Z
2022-02-18T14:35:40.000Z
import os import pandas as pd import geopandas as gpd ## Config # Number of rows to read nrows = 1000 #nrows = 1000000 #nrows = None # Output file path day_num = 1 input_csv_filepath = f'../../data/footfall/footfall_20210217/day{day_num}Bcntrakingotherdays.csv' # Clip mask file path #clip_mask_filepath = '../../da...
26.961538
99
0.736091
import os import pandas as pd import geopandas as gpd nrows = 1000 day_num = 1 input_csv_filepath = f'../../data/footfall/footfall_20210217/day{day_num}Bcntrakingotherdays.csv' clip_mask_filepath = '../../data/footfall/aoi_glories.geojson' output_file = f'ff-day{day_num}-clipped.shp' output_folder = '../../data/s...
true
true
f731716eb335aa711c9fca62072e00fad94f8a35
4,633
py
Python
sis-api/swagger_server/models/address.py
maxbilbow/7054CEM-sis
1c5067c9afc38e340fcce046048f8ae21d267365
[ "MIT" ]
null
null
null
sis-api/swagger_server/models/address.py
maxbilbow/7054CEM-sis
1c5067c9afc38e340fcce046048f8ae21d267365
[ "MIT" ]
null
null
null
sis-api/swagger_server/models/address.py
maxbilbow/7054CEM-sis
1c5067c9afc38e340fcce046048f8ae21d267365
[ "MIT" ]
null
null
null
# coding: utf-8 from __future__ import absolute_import from datetime import date, datetime # noqa: F401 from typing import List, Dict # noqa: F401 from swagger_server.models.base_model_ import Model from swagger_server import util class Address(Model): """NOTE: This class is auto generated by the swagger cod...
24.005181
149
0.564429
from __future__ import absolute_import from datetime import date, datetime from typing import List, Dict from swagger_server.models.base_model_ import Model from swagger_server import util class Address(Model): def __init__(self, id: int=None, number_or_name: str=None, street: str=None, town: str=None, count...
true
true
f73171a82a9e8efd02676c00bb3724b2c05b4702
673
py
Python
atlasbrief/mainsite/migrations/0002_auto_20180124_1611.py
joshr2020/Atlas-Brief
4471102a7a4b5bf549ef044d7d7de939438011dd
[ "MIT" ]
1
2018-08-20T19:02:00.000Z
2018-08-20T19:02:00.000Z
atlasbrief/mainsite/migrations/0002_auto_20180124_1611.py
joshr2020/Atlas-Brief
4471102a7a4b5bf549ef044d7d7de939438011dd
[ "MIT" ]
null
null
null
atlasbrief/mainsite/migrations/0002_auto_20180124_1611.py
joshr2020/Atlas-Brief
4471102a7a4b5bf549ef044d7d7de939438011dd
[ "MIT" ]
null
null
null
# Generated by Django 2.0.1 on 2018-01-24 21:11 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('mainsite', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='brief', ...
24.035714
117
0.576523
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('mainsite', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='brief', name='sources', ), migrati...
true
true
f73172073a5b7aa03cf878398739be9ce4b17eb0
9,088
py
Python
src/ploomber/io/_commander.py
aadityasinha-dotcom/ploomber
ddbdb63bf7e92d4c48073893b5f54a5f59383291
[ "Apache-2.0" ]
null
null
null
src/ploomber/io/_commander.py
aadityasinha-dotcom/ploomber
ddbdb63bf7e92d4c48073893b5f54a5f59383291
[ "Apache-2.0" ]
null
null
null
src/ploomber/io/_commander.py
aadityasinha-dotcom/ploomber
ddbdb63bf7e92d4c48073893b5f54a5f59383291
[ "Apache-2.0" ]
null
null
null
import os import sys import subprocess import shutil from pathlib import Path, PurePosixPath from click import ClickException from jinja2 import Environment, PackageLoader, StrictUndefined from ploomber.io import TerminalWriter def to_pascal_case(name): return ''.join([w.capitalize() for w in name.split('_')]) ...
28.4
79
0.554027
import os import sys import subprocess import shutil from pathlib import Path, PurePosixPath from click import ClickException from jinja2 import Environment, PackageLoader, StrictUndefined from ploomber.io import TerminalWriter def to_pascal_case(name): return ''.join([w.capitalize() for w in name.split('_')]) ...
true
true
f73173b0bf6552c411247cc25c457802bd9b31e5
15,273
py
Python
zerogercrnn/experiments/ast_level/metrics.py
zerogerc/rnn-autocomplete
39dc8dd7c431cb8ac9e15016388ec823771388e4
[ "Apache-2.0" ]
7
2019-02-27T09:48:39.000Z
2021-11-30T19:01:01.000Z
zerogercrnn/experiments/ast_level/metrics.py
ZeRoGerc/rnn-autocomplete
39dc8dd7c431cb8ac9e15016388ec823771388e4
[ "Apache-2.0" ]
null
null
null
zerogercrnn/experiments/ast_level/metrics.py
ZeRoGerc/rnn-autocomplete
39dc8dd7c431cb8ac9e15016388ec823771388e4
[ "Apache-2.0" ]
null
null
null
import json import os import numpy as np import torch from zerogercrnn.lib.constants import EMPTY_TOKEN_ID, UNKNOWN_TOKEN_ID from zerogercrnn.experiments.ast_level.utils import read_non_terminals from zerogercrnn.lib.constants import EMPTY_TOKEN_ID, UNKNOWN_TOKEN_ID, EOF_TOKEN from zerogercrnn.lib.metrics import Metr...
38.568182
142
0.659726
import json import os import numpy as np import torch from zerogercrnn.lib.constants import EMPTY_TOKEN_ID, UNKNOWN_TOKEN_ID from zerogercrnn.experiments.ast_level.utils import read_non_terminals from zerogercrnn.lib.constants import EMPTY_TOKEN_ID, UNKNOWN_TOKEN_ID, EOF_TOKEN from zerogercrnn.lib.metrics import Metr...
true
true
f731744360c85355f37d6f3b7a8789da418a6261
544
py
Python
LeetCode/Algorithms/Easy/PascalsTriangle/PascalsTriangle.py
roshan11160/Competitive-Programming-Solutions
2d9cfe901c23a2b7344c410b7368eb02f7fa6e7e
[ "MIT" ]
40
2020-07-25T19:35:37.000Z
2022-01-28T02:57:02.000Z
LeetCode/Algorithms/Easy/PascalsTriangle/PascalsTriangle.py
afrozchakure/Hackerrank-Problem-Solutions
014155d841e08cb1f7609c23335576dc9b29cef3
[ "MIT" ]
34
2020-10-10T17:59:46.000Z
2021-10-05T18:29:25.000Z
LeetCode/Algorithms/Easy/PascalsTriangle/PascalsTriangle.py
afrozchakure/Hackerrank-Problem-Solutions
014155d841e08cb1f7609c23335576dc9b29cef3
[ "MIT" ]
24
2020-05-03T08:11:53.000Z
2021-10-04T03:23:20.000Z
class Solution: def generate(self, numRows: int) -> List[List[int]]: result = [[1]] for i in range(1, numRows): temp1 = result[-1] + [0] temp2 = [0] + result[-1] result.append([temp1[i] + temp2[i] for i in range(len(temp1))]) return result[:numRows] ...
25.904762
90
0.523897
class Solution: def generate(self, numRows: int) -> List[List[int]]: result = [[1]] for i in range(1, numRows): temp1 = result[-1] + [0] temp2 = [0] + result[-1] result.append([temp1[i] + temp2[i] for i in range(len(temp1))]) return result[:numRows] ...
true
true
f7317480ca6a2ca583ccb6170587b803d919d1a4
2,591
py
Python
framework/auth/decorators.py
alexschiller/osf.io
4122d4be152c6189142c2ebb19cfdee09c77035d
[ "Apache-2.0" ]
null
null
null
framework/auth/decorators.py
alexschiller/osf.io
4122d4be152c6189142c2ebb19cfdee09c77035d
[ "Apache-2.0" ]
null
null
null
framework/auth/decorators.py
alexschiller/osf.io
4122d4be152c6189142c2ebb19cfdee09c77035d
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import time import httplib import functools from flask import request from framework.auth import cas from framework.auth import signing from framework.flask import redirect from framework.exceptions import HTTPError from .core import Auth from .core import User def collect_auth(func): ...
27.56383
120
0.603242
import time import httplib import functools from flask import request from framework.auth import cas from framework.auth import signing from framework.flask import redirect from framework.exceptions import HTTPError from .core import Auth from .core import User def collect_auth(func): @functools.wraps(func) ...
true
true
f731751fa69ae18a6c65a0e7b8a660da710c2f8f
663
py
Python
model.py
SMMousaviSP/Sudoku-Solver
13ab46585aaa1c8072ace58f0eee6df7388f684e
[ "MIT" ]
26
2020-01-25T16:51:01.000Z
2021-08-02T10:34:49.000Z
model.py
SMMousaviSP/Sudoku-Solver
13ab46585aaa1c8072ace58f0eee6df7388f684e
[ "MIT" ]
1
2021-04-26T09:03:39.000Z
2021-04-26T09:03:39.000Z
model.py
SMMousaviSP/Sudoku-Solver
13ab46585aaa1c8072ace58f0eee6df7388f684e
[ "MIT" ]
21
2020-01-27T08:14:20.000Z
2021-11-23T07:51:46.000Z
import keras from keras.layers import Activation from keras.layers import Conv2D, BatchNormalization, Dense, Flatten, Reshape def get_model(): model = keras.models.Sequential() model.add(Conv2D(64, kernel_size=(3,3), activation='relu', padding='same', input_shape=(9,9,1))) model.add(BatchNormalization())...
31.571429
100
0.689291
import keras from keras.layers import Activation from keras.layers import Conv2D, BatchNormalization, Dense, Flatten, Reshape def get_model(): model = keras.models.Sequential() model.add(Conv2D(64, kernel_size=(3,3), activation='relu', padding='same', input_shape=(9,9,1))) model.add(BatchNormalization())...
true
true
f73175349ae72496647a8ded5362832c8f303bf2
45,377
py
Python
exp/cips3d_inversion/models/generator_v2.py
PeterouZh/CIPS-3D
9b8bfa0fb23f642af042e150ccd70408f9d137c6
[ "MIT" ]
308
2021-10-19T17:29:14.000Z
2022-03-31T11:54:45.000Z
exp/cips3d_inversion/models/generator_v2.py
PeterouZh/CIPS-3D
9b8bfa0fb23f642af042e150ccd70408f9d137c6
[ "MIT" ]
28
2021-10-31T22:49:00.000Z
2022-03-25T05:49:47.000Z
exp/cips3d_inversion/models/generator_v2.py
PeterouZh/CIPS-3D
9b8bfa0fb23f642af042e150ccd70408f9d137c6
[ "MIT" ]
44
2021-10-21T10:08:23.000Z
2022-03-16T10:05:08.000Z
from itertools import chain import math import logging import collections from collections import OrderedDict import tqdm import random import time from einops import rearrange, repeat import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.cuda.amp import autocast from tl2.pr...
32.668826
120
0.571721
from itertools import chain import math import logging import collections from collections import OrderedDict import tqdm import random import time from einops import rearrange, repeat import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.cuda.amp import autocast from tl2.pr...
true
true
f73176b9df2d9d3e6551836091e9a8f8bdc64a68
9,041
py
Python
src/pyrobot/habitat/base.py
cihuang123/pyrobot
fe620097e31d11453b5ea7ac15e40f5f5721b29a
[ "MIT" ]
2,150
2019-06-12T20:55:41.000Z
2022-03-21T07:14:51.000Z
src/pyrobot/habitat/base.py
cihuang123/pyrobot
fe620097e31d11453b5ea7ac15e40f5f5721b29a
[ "MIT" ]
124
2019-06-22T17:12:27.000Z
2022-02-26T11:43:13.000Z
src/pyrobot/habitat/base.py
cihuang123/pyrobot
fe620097e31d11453b5ea7ac15e40f5f5721b29a
[ "MIT" ]
329
2019-06-13T03:03:54.000Z
2022-03-30T07:04:55.000Z
import numpy as np import math import pyrobot.utils.util as prutil import rospy import habitat_sim.agent as habAgent import habitat_sim.utils as habUtils from habitat_sim.agent.controls import ActuationSpec import habitat_sim.errors import quaternion from tf.transformations import euler_from_quaternion, euler_from_mat...
36.603239
93
0.623825
import numpy as np import math import pyrobot.utils.util as prutil import rospy import habitat_sim.agent as habAgent import habitat_sim.utils as habUtils from habitat_sim.agent.controls import ActuationSpec import habitat_sim.errors import quaternion from tf.transformations import euler_from_quaternion, euler_from_mat...
true
true
f73176e6fa8ce3c0edc651c2858ea483ba4fd4a1
5,318
py
Python
fritzconnection/fritzhosts.py
deisi/fritzconnection
b5c14515e1c8e2652b06b6316a7f3913df942841
[ "MIT" ]
2
2016-11-14T18:58:56.000Z
2021-03-12T10:15:03.000Z
fritzconnection/fritzhosts.py
deisi/fritzconnection
b5c14515e1c8e2652b06b6316a7f3913df942841
[ "MIT" ]
2
2015-12-09T20:12:08.000Z
2016-11-02T15:03:19.000Z
fritzconnection/fritzhosts.py
deisi/fritzconnection
b5c14515e1c8e2652b06b6316a7f3913df942841
[ "MIT" ]
7
2016-10-02T18:37:20.000Z
2021-09-14T21:29:28.000Z
# -*- coding: utf-8 -*- __version__ = '0.4.6' import argparse from . import fritzconnection SERVICE = 'Hosts' # version-access: def get_version(): return __version__ class FritzHosts(object): def __init__(self, fc=None, address=fritzconnection.FRITZ_IP_ADDRESS, ...
32.036145
79
0.520496
__version__ = '0.4.6' import argparse from . import fritzconnection SERVICE = 'Hosts' def get_version(): return __version__ class FritzHosts(object): def __init__(self, fc=None, address=fritzconnection.FRITZ_IP_ADDRESS, port=fritzconnection.FRITZ_TCP_P...
true
true
f731785fe68dc453314df05fd73e25b0eaf40c95
7,738
py
Python
pygments/lexers/rust.py
beasleyr-vmw/pygments
bd166a3bb5452efd3a37a52d4847cae96d3d45e2
[ "BSD-2-Clause" ]
6,989
2017-07-18T06:23:18.000Z
2022-03-31T15:58:36.000Z
pygments/lexers/rust.py
beasleyr-vmw/pygments
bd166a3bb5452efd3a37a52d4847cae96d3d45e2
[ "BSD-2-Clause" ]
1,978
2017-07-18T09:17:58.000Z
2022-03-31T14:28:43.000Z
pygments/lexers/rust.py
beasleyr-vmw/pygments
bd166a3bb5452efd3a37a52d4847cae96d3d45e2
[ "BSD-2-Clause" ]
1,228
2017-07-18T09:03:13.000Z
2022-03-29T05:57:40.000Z
# -*- coding: utf-8 -*- """ pygments.lexers.rust ~~~~~~~~~~~~~~~~~~~~ Lexers for the Rust language. :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.lexer import RegexLexer, include, bygroups, words, default from pygments...
35.013575
79
0.415094
from pygments.lexer import RegexLexer, include, bygroups, words, default from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ Number, Punctuation, Whitespace __all__ = ['RustLexer'] class RustLexer(RegexLexer): name = 'Rust' filenames = ['*.rs', '*.rs.in'] aliases = ['rust', ...
true
true
f731786dd9a6f98ebccbad8bbac311e06ceed81d
200
py
Python
apps/users/utils.py
Yunloop/RoadBlog
d27504096cf00357c8f18737721b9b117b0203d9
[ "MIT" ]
1
2019-09-18T10:51:55.000Z
2019-09-18T10:51:55.000Z
apps/users/utils.py
Yunloop/road
d27504096cf00357c8f18737721b9b117b0203d9
[ "MIT" ]
9
2020-06-05T23:14:20.000Z
2022-02-10T11:36:14.000Z
apps/users/utils.py
Yunloop/road
d27504096cf00357c8f18737721b9b117b0203d9
[ "MIT" ]
null
null
null
def jwt_response_payload_handler(token, user=None, request=None): """ 重写获取jwt载荷数据方法 """ return { 'token': token, 'id': user.id, 'username': user.username }
20
65
0.56
def jwt_response_payload_handler(token, user=None, request=None): return { 'token': token, 'id': user.id, 'username': user.username }
true
true
f73179932da21703dc52d5ead50dafad85c3d14a
11,369
py
Python
pydantic_sqlite/_core.py
Phil997/pydantic_sqlite
d52d0f42045c90b47a8e6987ec60dd071444f427
[ "MIT" ]
3
2022-01-11T06:02:45.000Z
2022-02-07T06:07:29.000Z
pydantic_sqlite/_core.py
Phil997/pydantic_sqlite
d52d0f42045c90b47a8e6987ec60dd071444f427
[ "MIT" ]
null
null
null
pydantic_sqlite/_core.py
Phil997/pydantic_sqlite
d52d0f42045c90b47a8e6987ec60dd071444f427
[ "MIT" ]
null
null
null
import importlib import inspect import json import os import sqlite3 import tempfile import typing from shutil import copyfile from typing import Any, Generator, List, Union from pydantic import BaseModel, root_validator from pydantic.fields import ModelField from sqlite_utils import Database as _Database from typing_...
46.215447
158
0.648078
import importlib import inspect import json import os import sqlite3 import tempfile import typing from shutil import copyfile from typing import Any, Generator, List, Union from pydantic import BaseModel, root_validator from pydantic.fields import ModelField from sqlite_utils import Database as _Database from typing_...
true
true
f7317ac183acdc3fef988d0b36002f1c1f9db05e
7,610
py
Python
env/lib/python3.6/site-packages/nibabel/tests/test_filename_parser.py
Raniac/NEURO-LEARN
3c3acc55de8ba741e673063378e6cbaf10b64c7a
[ "Apache-2.0" ]
8
2019-05-29T09:38:30.000Z
2021-01-20T03:36:59.000Z
env/lib/python3.6/site-packages/nibabel/tests/test_filename_parser.py
Raniac/neurolearn_dev
3c3acc55de8ba741e673063378e6cbaf10b64c7a
[ "Apache-2.0" ]
12
2021-03-09T03:01:16.000Z
2022-03-11T23:59:36.000Z
env/lib/python3.6/site-packages/nibabel/tests/test_filename_parser.py
Raniac/NEURO-LEARN
3c3acc55de8ba741e673063378e6cbaf10b64c7a
[ "Apache-2.0" ]
1
2020-07-17T12:49:49.000Z
2020-07-17T12:49:49.000Z
# emacs: -*- mode: python-mode; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the NiBabel package for the # copyright and license terms. # ### ### ### #...
43.988439
79
0.49724
from ..filename_parser import (types_filenames, TypesFilenamesError, parse_filename, splitext_addext) from nose.tools import (assert_equal, assert_true, assert_false, assert_raises) def test_filenames(): types_exts = (('image', '.img'), ('header', '.hdr')) ...
true
true
f7317b0eda9c7facface10dbec8642b54e7fc9d2
2,521
py
Python
polling_stations/apps/data_collection/management/commands/import_tower_hamlets.py
chris48s/UK-Polling-Stations
4742b527dae94f0276d35c80460837be743b7d17
[ "BSD-3-Clause" ]
null
null
null
polling_stations/apps/data_collection/management/commands/import_tower_hamlets.py
chris48s/UK-Polling-Stations
4742b527dae94f0276d35c80460837be743b7d17
[ "BSD-3-Clause" ]
null
null
null
polling_stations/apps/data_collection/management/commands/import_tower_hamlets.py
chris48s/UK-Polling-Stations
4742b527dae94f0276d35c80460837be743b7d17
[ "BSD-3-Clause" ]
null
null
null
""" Import Tower Hamlets """ from time import sleep from django.contrib.gis.geos import Point from data_collection.management.commands import BaseCsvStationsCsvAddressesImporter from data_finder.helpers import geocode, geocode_point_only, PostcodeError from addressbase.models import Address class Command(BaseCsvSta...
31.5125
83
0.548195
from time import sleep from django.contrib.gis.geos import Point from data_collection.management.commands import BaseCsvStationsCsvAddressesImporter from data_finder.helpers import geocode, geocode_point_only, PostcodeError from addressbase.models import Address class Command(BaseCsvStationsCsvAddressesImporter): ...
true
true
f7317c3b8b64c75edaf8033692d2b70b5b070677
10,874
py
Python
test/shake_test.py
arkottke/MapIO
dd6e347dce2d65b7bd4c489a03d8883d0e4210fc
[ "CC0-1.0" ]
null
null
null
test/shake_test.py
arkottke/MapIO
dd6e347dce2d65b7bd4c489a03d8883d0e4210fc
[ "CC0-1.0" ]
null
null
null
test/shake_test.py
arkottke/MapIO
dd6e347dce2d65b7bd4c489a03d8883d0e4210fc
[ "CC0-1.0" ]
1
2019-11-09T16:05:37.000Z
2019-11-09T16:05:37.000Z
#!/usr/bin/env python #python 3 compatibility from __future__ import print_function #stdlib imports from xml.dom import minidom from datetime import datetime from collections import OrderedDict import re import sys import tempfile import time import shutil if sys.version_info.major == 2: import StringIO else: ...
41.503817
112
0.532279
from __future__ import print_function from xml.dom import minidom from datetime import datetime from collections import OrderedDict import re import sys import tempfile import time import shutil if sys.version_info.major == 2: import StringIO else: from io import StringIO import os.path homedir = os.path.di...
true
true
f7317c790976f2907b99356b3b5fdcac78c33a12
1,014
py
Python
python/tests/integration/postgres/test_postgres_results.py
Vjrx/airship-drydock
315fb9864e6d55a66d5266f76c160be55d22c98b
[ "Apache-2.0" ]
14
2017-03-07T17:00:22.000Z
2021-04-02T14:15:04.000Z
python/tests/integration/postgres/test_postgres_results.py
Vjrx/airship-drydock
315fb9864e6d55a66d5266f76c160be55d22c98b
[ "Apache-2.0" ]
82
2017-02-16T16:54:18.000Z
2018-06-04T13:40:32.000Z
python/tests/integration/postgres/test_postgres_results.py
Vjrx/airship-drydock
315fb9864e6d55a66d5266f76c160be55d22c98b
[ "Apache-2.0" ]
16
2017-02-14T19:47:00.000Z
2018-04-26T10:13:05.000Z
import pytest from drydock_provisioner import objects class TestPostgres(object): def test_result_message_insert(self, populateddb, drydock_state): """Test that a result message for a task can be added.""" msg1 = objects.TaskStatusMessage('Error 1', True, 'node', 'node1') msg2 = objects.T...
31.6875
77
0.675542
import pytest from drydock_provisioner import objects class TestPostgres(object): def test_result_message_insert(self, populateddb, drydock_state): msg1 = objects.TaskStatusMessage('Error 1', True, 'node', 'node1') msg2 = objects.TaskStatusMessage('Status 1', False, 'node', 'node1') resu...
true
true
f7317c8199b599b34a14ce19dda9e2ac6e37c688
42,329
py
Python
modin/pandas/test/dataframe/test_map_metadata.py
palash247/modin
3f1e275b67a760f09db6944600c4b7f5e601cbde
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
modin/pandas/test/dataframe/test_map_metadata.py
palash247/modin
3f1e275b67a760f09db6944600c4b7f5e601cbde
[ "ECL-2.0", "Apache-2.0" ]
46
2020-08-28T09:12:51.000Z
2021-04-20T00:01:04.000Z
modin/pandas/test/dataframe/test_map_metadata.py
monocilindro/modin
ffea4ee2d3556dc48c05dac7abb54b62c66f3153
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Licensed to Modin Development Team under one or more contributor license agreements. # See the NOTICE file distributed with this work for additional information regarding # copyright ownership. The Modin Development Team licenses this file to you under the # Apache License, Version 2.0 (the "License"); you may not u...
32.585835
88
0.644924
import pytest import numpy as np import pandas from pandas.testing import assert_index_equal import matplotlib import modin.pandas as pd from modin.utils import get_current_backend from modin.pandas.test.utils import ( random_state, RAND_LOW, RAND_HIGH, df_equals, df_is_empty, arg_keys, na...
true
true
f7317cf731b0cf356e1cea4ede7915e02f90b539
7,087
py
Python
litex_boards/targets/alveo_u250.py
quiatvn/litex-boards
70c32a978fb588b3144a9e3cf9a63562f5505b7f
[ "BSD-2-Clause" ]
null
null
null
litex_boards/targets/alveo_u250.py
quiatvn/litex-boards
70c32a978fb588b3144a9e3cf9a63562f5505b7f
[ "BSD-2-Clause" ]
null
null
null
litex_boards/targets/alveo_u250.py
quiatvn/litex-boards
70c32a978fb588b3144a9e3cf9a63562f5505b7f
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python3 # # This file is part of LiteX-Boards. # # Copyright (c) 2020 Fei Gao <feig@princeton.edu> # Copyright (c) 2020 Florent Kermarrec <florent@enjoy-digital.fr> # Copyright (c) 2020 David Shah <dave@ds0.me> # SPDX-License-Identifier: BSD-2-Clause import argparse, os from migen import * from litex...
41.934911
100
0.56272
import argparse, os from migen import * from litex_boards.platforms import alveo_u250 from litex.soc.cores.clock import * from litex.soc.integration.soc_core import * from litex.soc.integration.soc_sdram import * from litex.soc.integration.builder import * from litex.soc.cores.led import LedChaser from litedram.m...
true
true
f7317da5336aa017fc94a0299d3bac8f2c5c34b4
7,740
py
Python
facebook_insights/metrics.py
jaylynch/django-facebook-insights
b10f1662f2f346bea19bc84629a8079257c9d710
[ "MIT" ]
null
null
null
facebook_insights/metrics.py
jaylynch/django-facebook-insights
b10f1662f2f346bea19bc84629a8079257c9d710
[ "MIT" ]
null
null
null
facebook_insights/metrics.py
jaylynch/django-facebook-insights
b10f1662f2f346bea19bc84629a8079257c9d710
[ "MIT" ]
1
2019-05-30T06:23:47.000Z
2019-05-30T06:23:47.000Z
"""Tools to fetch and extract Facebook Insights metrics. >>> graph_id = '1234567890' >>> metrics = ['page_impressions', 'page_engaged_users'] >>> page_metrics = fetch_metrics(graph_id, metrics) >>> page_impressions = page_metrics['page_impressions'] >>> page_impressions.values {'day': [ {'end_time': '2016-11-15T08...
34.247788
79
0.589922
import json from django.conf import settings from facebook import GraphAPI, GraphAPIError from facebook_insights.exceptions import EmptyData, MetricsNotSpecified __all__ = ['fetch_metrics', 'Metric'] access_token = settings.FACEBOOK_INSIGHTS_ACCESS_TOKEN api_version = getattr(settings, 'FACEBOOK_INSIGHTS_API_VERSIO...
true
true
f7317e2c185510c822951fefebfbee8e10479664
38,094
py
Python
t3f/riemannian.py
aiboyko/t3f
0361b80f36a06eb5aa5d536650eef9e006289139
[ "MIT" ]
null
null
null
t3f/riemannian.py
aiboyko/t3f
0361b80f36a06eb5aa5d536650eef9e006289139
[ "MIT" ]
null
null
null
t3f/riemannian.py
aiboyko/t3f
0361b80f36a06eb5aa5d536650eef9e006289139
[ "MIT" ]
null
null
null
import tensorflow.compat.v1 as tf from t3f.tensor_train import TensorTrain from t3f.tensor_train_batch import TensorTrainBatch from t3f import shapes from t3f import decompositions def project_sum(what, where, weights=None): """Project sum of `what` TTs on the tangent space of `where` TT. project_sum(what, x) =...
42.898649
101
0.664908
import tensorflow.compat.v1 as tf from t3f.tensor_train import TensorTrain from t3f.tensor_train_batch import TensorTrainBatch from t3f import shapes from t3f import decompositions def project_sum(what, where, weights=None): what = shapes.expand_batch_dim(what) if weights is not None: weights = tf.convert...
true
true
f7317ee14c32df99d8957b13095c5f0979815548
11,872
py
Python
intake_esm/cat.py
agstephens/intake-esm
25ead83497d025c37a80abdbefee9b286934308b
[ "Apache-2.0" ]
null
null
null
intake_esm/cat.py
agstephens/intake-esm
25ead83497d025c37a80abdbefee9b286934308b
[ "Apache-2.0" ]
null
null
null
intake_esm/cat.py
agstephens/intake-esm
25ead83497d025c37a80abdbefee9b286934308b
[ "Apache-2.0" ]
null
null
null
import enum import json import os import pathlib import typing import fsspec import pandas as pd import pydantic import tlz from ._search import search, search_apply_require_all_on class AggregationType(str, enum.Enum): join_new = 'join_new' join_existing = 'join_existing' union = 'union' class Con...
33.254902
103
0.614976
import enum import json import os import pathlib import typing import fsspec import pandas as pd import pydantic import tlz from ._search import search, search_apply_require_all_on class AggregationType(str, enum.Enum): join_new = 'join_new' join_existing = 'join_existing' union = 'union' class Con...
true
true
f7317f9433b31ade91e5efd2feb76b31b2af0dcf
228
py
Python
adc/tth.py
udoprog/python-adc
6e3775a6fddd0c4a12211a237e2ae5f62a79fd31
[ "BSD-3-Clause" ]
1
2015-02-01T15:05:16.000Z
2015-02-01T15:05:16.000Z
adc/tth.py
udoprog/python-adc
6e3775a6fddd0c4a12211a237e2ae5f62a79fd31
[ "BSD-3-Clause" ]
null
null
null
adc/tth.py
udoprog/python-adc
6e3775a6fddd0c4a12211a237e2ae5f62a79fd31
[ "BSD-3-Clause" ]
null
null
null
from merkletree import MerkleTree from .hashing import TigerHash class TigerTree(MerkleTree): segment = 1024; hashsize = TigerHash.size; @classmethod def _hash(klass, *chunks): return TigerHash.digest(*chunks);
19
37
0.741228
from merkletree import MerkleTree from .hashing import TigerHash class TigerTree(MerkleTree): segment = 1024; hashsize = TigerHash.size; @classmethod def _hash(klass, *chunks): return TigerHash.digest(*chunks);
true
true
f7318003a4d1f4c23a5fc12ba056718d045c25e6
3,232
py
Python
dataflows/processors/parallelize.py
cschloer/dataflows
78a683b5d202512c06021ff6be8ac7f60ef1cd9b
[ "MIT" ]
null
null
null
dataflows/processors/parallelize.py
cschloer/dataflows
78a683b5d202512c06021ff6be8ac7f60ef1cd9b
[ "MIT" ]
null
null
null
dataflows/processors/parallelize.py
cschloer/dataflows
78a683b5d202512c06021ff6be8ac7f60ef1cd9b
[ "MIT" ]
null
null
null
import itertools import os import multiprocessing as mp import threading import queue from ..helpers import ResourceMatcher from .. import PackageWrapper, ResourceWrapper def init_mp(num_processors, row_func, q_in, q_internal): q_out = mp.Queue() processes = [mp.Process(target=work, args=(q_in, q_out, row_fu...
26.933333
111
0.569926
import itertools import os import multiprocessing as mp import threading import queue from ..helpers import ResourceMatcher from .. import PackageWrapper, ResourceWrapper def init_mp(num_processors, row_func, q_in, q_internal): q_out = mp.Queue() processes = [mp.Process(target=work, args=(q_in, q_out, row_fu...
true
true
f73180d03d5ce10b4c3dc13aefb29b163648e360
3,306
py
Python
data/p2DJ/New/program/qiskit/simulator/startQiskit336.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p2DJ/New/program/qiskit/simulator/startQiskit336.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p2DJ/New/program/qiskit/simulator/startQiskit336.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=2 # total number=18 import cirq import qiskit from qiskit import IBMQ from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from math import log2,floor, sqrt, pi import numpy a...
28.747826
82
0.625227
import cirq import qiskit from qiskit import IBMQ from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from math import log2,floor, sqrt, pi import numpy as np import networkx as nx def bui...
true
true
f73180ffb7b8ac7ff84ef16f39b5d76cd4a45949
255
py
Python
tests/urls.py
srijwalzartek/django-slick-reporting
aed9262a3dd83aa28e141301a4b3bf7041be7748
[ "BSD-3-Clause" ]
null
null
null
tests/urls.py
srijwalzartek/django-slick-reporting
aed9262a3dd83aa28e141301a4b3bf7041be7748
[ "BSD-3-Clause" ]
null
null
null
tests/urls.py
srijwalzartek/django-slick-reporting
aed9262a3dd83aa28e141301a4b3bf7041be7748
[ "BSD-3-Clause" ]
null
null
null
from django.urls import path from . import views urlpatterns = [ path('report1/', views.MonthlyProductSales.as_view(), name='report1'), path('product_crosstab_client/', views.ProductClientSalesMatrix.as_view(), name='product_crosstab_client'), ]
31.875
111
0.756863
from django.urls import path from . import views urlpatterns = [ path('report1/', views.MonthlyProductSales.as_view(), name='report1'), path('product_crosstab_client/', views.ProductClientSalesMatrix.as_view(), name='product_crosstab_client'), ]
true
true
f7318134d4c39845139626c088e97f1dd313f92c
4,575
py
Python
minecraft_dynmap_timemachine/dynmap.py
paul-eff/minecraft-dynmap-timemachine
ee902fe6600023a3de2d3b71969738016914a03a
[ "MIT" ]
61
2015-05-22T17:30:09.000Z
2022-02-26T20:22:15.000Z
minecraft_dynmap_timemachine/dynmap.py
paul-eff/minecraft-dynmap-timemachine
ee902fe6600023a3de2d3b71969738016914a03a
[ "MIT" ]
10
2017-07-18T18:34:42.000Z
2022-03-09T01:49:13.000Z
minecraft_dynmap_timemachine/dynmap.py
paul-eff/minecraft-dynmap-timemachine
ee902fe6600023a3de2d3b71969738016914a03a
[ "MIT" ]
18
2017-12-28T10:44:54.000Z
2022-02-26T01:33:05.000Z
# import urllib import json import time import math import re from . import simple_downloader class MapException(Exception): def __init__(self, map_obj, *args, **kwargs): super(MapException, self).__init__(*args, **kwargs) self.map = map_obj class DynMap(object): def __init__(self, url): ...
28.773585
136
0.599344
import json import time import math import re from . import simple_downloader class MapException(Exception): def __init__(self, map_obj, *args, **kwargs): super(MapException, self).__init__(*args, **kwargs) self.map = map_obj class DynMap(object): def __init__(self, url): s...
true
true