hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f72ea474aea803c8551d2dd9a3d642ba5bdfa8bf
6,529
py
Python
qa/rpc-tests/txn_doublespend.py
mirzaei-ce/core-outbit
3ebf7d8f398fa564c593433f7808d0a1d35809b9
[ "MIT" ]
null
null
null
qa/rpc-tests/txn_doublespend.py
mirzaei-ce/core-outbit
3ebf7d8f398fa564c593433f7808d0a1d35809b9
[ "MIT" ]
null
null
null
qa/rpc-tests/txn_doublespend.py
mirzaei-ce/core-outbit
3ebf7d8f398fa564c593433f7808d0a1d35809b9
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test proper accounting with a double-spend conflict # from test_framework.test_framework import Outb...
45.657343
111
0.606065
from test_framework.test_framework import OutbitTestFramework from test_framework.util import * class TxnMallTest(OutbitTestFramework): def add_options(self, parser): parser.add_option("--mineblock", dest="mine_block", default=False, action="store_true", help="Test double-spend...
true
true
f72ea519259a797fa9330cd2c0f999cf42083662
3,975
py
Python
diverse/conveyor.py
sakkada/django-diverse
dbd13bb13c3663d6149a28d94daaf06c1e47b0f4
[ "MIT" ]
null
null
null
diverse/conveyor.py
sakkada/django-diverse
dbd13bb13c3663d6149a28d94daaf06c1e47b0f4
[ "MIT" ]
null
null
null
diverse/conveyor.py
sakkada/django-diverse
dbd13bb13c3663d6149a28d94daaf06c1e47b0f4
[ "MIT" ]
null
null
null
import os import time import shutil import hashlib import mimetypes from django.core.files.storage import FileSystemStorage from . import settings class VersionGenerationError(Exception): pass class Conveyor(object): # convention: storage should operate files on local filesystem # to allow processors us...
37.149533
80
0.580881
import os import time import shutil import hashlib import mimetypes from django.core.files.storage import FileSystemStorage from . import settings class VersionGenerationError(Exception): pass class Conveyor(object): storage_allowed = (FileSystemStorage,) storage = None def __init__(self, *...
true
true
f72ea553a3dff77429beda1663ea93edb12f2be7
56
py
Python
tests/__init__.py
dougppaz/pyaml_env
09d3c43da39d5f997ac88b0b7e9945de797eca02
[ "MIT" ]
30
2021-04-27T15:26:28.000Z
2022-03-29T17:12:36.000Z
tests/__init__.py
dougppaz/pyaml_env
09d3c43da39d5f997ac88b0b7e9945de797eca02
[ "MIT" ]
12
2021-04-28T11:43:15.000Z
2022-03-03T17:48:17.000Z
tests/__init__.py
dougppaz/pyaml_env
09d3c43da39d5f997ac88b0b7e9945de797eca02
[ "MIT" ]
10
2021-04-29T00:31:08.000Z
2022-03-14T13:49:54.000Z
import os import sys sys.path.insert(0, (os.getcwd()))
11.2
33
0.696429
import os import sys sys.path.insert(0, (os.getcwd()))
true
true
f72ea6730b4f2126d264157f36867ba7c80f59b1
8,491
py
Python
test/functional/wallet_accounts.py
ALQO-GitHub-Official/new-chain
b993c07397f91860311e2f9e207cb84fdd3a3ffa
[ "MIT" ]
110
2019-07-12T11:46:31.000Z
2022-02-18T19:47:23.000Z
test/functional/wallet_accounts.py
ALQO-GitHub-Official/new-chain
b993c07397f91860311e2f9e207cb84fdd3a3ffa
[ "MIT" ]
29
2018-10-23T21:28:56.000Z
2021-02-10T14:42:59.000Z
test/functional/wallet_accounts.py
ALQO-GitHub-Official/new-chain
b993c07397f91860311e2f9e207cb84fdd3a3ffa
[ "MIT" ]
55
2018-10-20T13:40:39.000Z
2022-03-07T07:13:02.000Z
#!/usr/bin/env python3 # Copyright (c) 2016-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test account RPCs. RPCs tested are: - getaccountaddress - getaddressesbyaccount - listaddr...
41.827586
83
0.668119
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import assert_equal class WalletAccountsTest(BitcoinTestFramework): def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 1 self.extra_args = [[]] def run_test(self): no...
true
true
f72ea7749502804e63cabefce69af2c3762767e4
2,268
py
Python
server/tests/test_patients.py
ishitakapoor26/Nutrihelp
5bac42aaee61884f9ee7415caf441e80b7b03b48
[ "MIT" ]
22
2021-02-15T10:30:59.000Z
2022-01-09T07:10:36.000Z
server/tests/test_patients.py
Ayonijakaushik19/Nutrihelp
85926b187a6bfcf80f1f1cd60667ed3d14dce0be
[ "MIT" ]
51
2021-02-27T15:42:15.000Z
2022-03-01T15:02:03.000Z
server/tests/test_patients.py
Ayonijakaushik19/Nutrihelp
85926b187a6bfcf80f1f1cd60667ed3d14dce0be
[ "MIT" ]
25
2021-02-14T17:49:23.000Z
2022-02-27T18:27:39.000Z
from bson.json_util import dumps from ..app import app from json import dumps as pretty class glo: patient_id = [] g = glo() userid = ['1k33224', '60961d77a7090edb5b69c62c'] patient = { 'name': 'Abhishek shrivastava', 'age': 19, 'gender': 'M', 'mobile': '9022930339' } patient2 = { 'name': ...
23.142857
64
0.53351
from bson.json_util import dumps from ..app import app from json import dumps as pretty class glo: patient_id = [] g = glo() userid = ['1k33224', '60961d77a7090edb5b69c62c'] patient = { 'name': 'Abhishek shrivastava', 'age': 19, 'gender': 'M', 'mobile': '9022930339' } patient2 = { 'name': ...
true
true
f72ea7d8dd96b72bf999b8d29730d781aa003ace
321
py
Python
main/migrations/0002_remove_project_created_date.py
NancyWachiuri/AwardsApp
c4eb0a87ab528c2166d1bd27e3ec6302e7ef08df
[ "MIT" ]
null
null
null
main/migrations/0002_remove_project_created_date.py
NancyWachiuri/AwardsApp
c4eb0a87ab528c2166d1bd27e3ec6302e7ef08df
[ "MIT" ]
null
null
null
main/migrations/0002_remove_project_created_date.py
NancyWachiuri/AwardsApp
c4eb0a87ab528c2166d1bd27e3ec6302e7ef08df
[ "MIT" ]
null
null
null
# Generated by Django 3.2.8 on 2021-11-05 00:54 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('main', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='project', name='created_date', ), ]...
17.833333
47
0.582555
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('main', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='project', name='created_date', ), ]
true
true
f72ea823aa4b99280f01169d6a40994760c8465e
3,674
py
Python
18.Web Scraping with Python Scrapy - RM/03_Advanced_Techniques/news_scraper_challenge/news_scraper_challenge/middlewares.py
ptyadana/python-dojo
98c7234b84f0afea99a091c7198342d66bbdff5b
[ "MIT" ]
3
2020-06-01T04:17:18.000Z
2020-12-18T03:05:55.000Z
18.Web Scraping with Python Scrapy - RM/03_Advanced_Techniques/news_scraper_challenge/news_scraper_challenge/middlewares.py
ptyadana/python-dojo
98c7234b84f0afea99a091c7198342d66bbdff5b
[ "MIT" ]
1
2020-04-25T08:01:59.000Z
2020-04-25T08:01:59.000Z
18.Web Scraping with Python Scrapy - RM/03_Advanced_Techniques/news_scraper_challenge/news_scraper_challenge/middlewares.py
ptyadana/python-dojo
98c7234b84f0afea99a091c7198342d66bbdff5b
[ "MIT" ]
7
2020-04-26T10:02:36.000Z
2021-06-08T05:12:46.000Z
# Define here the models for your spider middleware # # See documentation in: # https://docs.scrapy.org/en/latest/topics/spider-middleware.html from scrapy import signals # useful for handling different item types with a single interface from itemadapter import is_item, ItemAdapter class NewsScraperChallengeSpiderM...
35.326923
78
0.676647
from scrapy import signals from itemadapter import is_item, ItemAdapter class NewsScraperChallengeSpiderMiddleware: @classmethod def from_crawler(cls, crawler): s = cls() crawler.signals.connect(s.spider_opened, signal=signals.spider_opened) return s def pro...
true
true
f72ea85064b2c2a6f54570529a6ce35ac41d67bd
488
py
Python
astronomy_datamodels/tests/test_subarray.py
spacetelescope/astronomy_datamodels
ca5db82d5982781ea763cef9851d4c982fd86328
[ "BSD-3-Clause" ]
1
2019-03-08T03:06:43.000Z
2019-03-08T03:06:43.000Z
astronomy_datamodels/tests/test_subarray.py
spacetelescope/astronomy_datamodels
ca5db82d5982781ea763cef9851d4c982fd86328
[ "BSD-3-Clause" ]
1
2020-10-29T19:54:28.000Z
2020-10-29T19:54:28.000Z
astronomy_datamodels/tests/test_subarray.py
spacetelescope/astronomy_datamodels
ca5db82d5982781ea763cef9851d4c982fd86328
[ "BSD-3-Clause" ]
null
null
null
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- import pytest import numpy as np asdf = pytest.importorskip('asdf', minversion='2.0.0.dev0') from asdf import util from asdf.tests import helpers from ..subarray import Subarray def test1(tmpdir, ret=False): subarray = Subarr...
28.705882
71
0.702869
import pytest import numpy as np asdf = pytest.importorskip('asdf', minversion='2.0.0.dev0') from asdf import util from asdf.tests import helpers from ..subarray import Subarray def test1(tmpdir, ret=False): subarray = Subarray(offset=(100, 131), size=(256, 256), name='SA1') tree = {'subarray': subarray} ...
true
true
f72ea9c1cb6d29549be75d7beed55fe01e257814
707
py
Python
tests/framework/RunFailures/failer.py
rinelson456/raven
1114246136a2f72969e75b5e99a11b35500d4eef
[ "Apache-2.0" ]
159
2017-03-24T21:07:06.000Z
2022-03-20T13:44:40.000Z
tests/framework/RunFailures/failer.py
rinelson456/raven
1114246136a2f72969e75b5e99a11b35500d4eef
[ "Apache-2.0" ]
1,667
2017-03-27T14:41:22.000Z
2022-03-31T19:50:06.000Z
tests/framework/RunFailures/failer.py
rinelson456/raven
1114246136a2f72969e75b5e99a11b35500d4eef
[ "Apache-2.0" ]
95
2017-03-24T21:05:03.000Z
2022-03-08T17:30:22.000Z
# Copyright 2017 Battelle Energy Alliance, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
39.277778
74
0.746818
def run(self,Input): if self.x+self.y > 0: raise IOError('Testing, testing, 1,2,3.') self.ans = self.x+self.y
true
true
f72eaa3113edd3d25a929e626271bcff8fa160e6
1,162
py
Python
ver-3/backup_ver3.py
Emmanuel-Temitope/backup-problem-solved
c5e10bc586c9fc449c6e13d08f9ad0d964105c67
[ "MIT" ]
null
null
null
ver-3/backup_ver3.py
Emmanuel-Temitope/backup-problem-solved
c5e10bc586c9fc449c6e13d08f9ad0d964105c67
[ "MIT" ]
null
null
null
ver-3/backup_ver3.py
Emmanuel-Temitope/backup-problem-solved
c5e10bc586c9fc449c6e13d08f9ad0d964105c67
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sun Jun 9 18:52:56 2019 @author: Emmanuel-Temitope """ import os import time #location of directory source = [r'source', '"Another source"'] #targer directory target_dir = r'target' if not os.path.exists(target_dir): os.mkdir(target_dir) today = target_dir + os.sep ...
22.784314
63
0.654905
import os import time source = [r'source', '"Another source"'] target_dir = r'target' if not os.path.exists(target_dir): os.mkdir(target_dir) today = target_dir + os.sep + time.strftime('%Y%m%d') now = time.strftime('%H%M%S') comment = input('Enter a comment --> ') if len(comment) == 0: target = today ...
true
true
f72eaa8f5af2633482ecb8f03a085435a35f5fa3
4,852
py
Python
archive/attention.py
emmettmeinzer/hmwgen
cd47733b5a34a6a3a9b56026eb5e73069e398033
[ "MIT" ]
null
null
null
archive/attention.py
emmettmeinzer/hmwgen
cd47733b5a34a6a3a9b56026eb5e73069e398033
[ "MIT" ]
null
null
null
archive/attention.py
emmettmeinzer/hmwgen
cd47733b5a34a6a3a9b56026eb5e73069e398033
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Thu Nov 5 22:53:44 2020 @author: Emmett """ import tensorflow as tf import os from tensorflow.python.keras.layers import Layer from tensorflow.python.keras import backend as K class AttentionLayer(Layer): """ This class implements Bahdanau attention (http...
39.447154
102
0.543899
import tensorflow as tf import os from tensorflow.python.keras.layers import Layer from tensorflow.python.keras import backend as K class AttentionLayer(Layer): def __init__(self, **kwargs): super(AttentionLayer, self).__init__(**kwargs) def build(self, input_shape): assert isins...
true
true
f72eabe57eec9d5c6a19eec2a538f36cdca7eb4c
637
py
Python
src/cbapi/__init__.py
rlmaers/cbapi-python
395763e609ba1338ff3c7540395a6f2804e94584
[ "MIT" ]
3
2019-01-23T19:11:33.000Z
2022-02-25T02:06:51.000Z
src/cbapi/__init__.py
rlmaers/cbapi-python
395763e609ba1338ff3c7540395a6f2804e94584
[ "MIT" ]
null
null
null
src/cbapi/__init__.py
rlmaers/cbapi-python
395763e609ba1338ff3c7540395a6f2804e94584
[ "MIT" ]
1
2022-02-25T02:06:52.000Z
2022-02-25T02:06:52.000Z
from __future__ import absolute_import import cbapi.six __title__ = 'cbapi' __author__ = 'Carbon Black Developer Network' __license__ = 'MIT' __copyright__ = 'Copyright 2018 Carbon Black' __version__ = '1.3.6' # New API as of cbapi 0.9.0 from cbapi.response.rest_api import CbEnterpriseResponseAPI, CbResponseAPI from...
31.85
80
0.821036
from __future__ import absolute_import import cbapi.six __title__ = 'cbapi' __author__ = 'Carbon Black Developer Network' __license__ = 'MIT' __copyright__ = 'Copyright 2018 Carbon Black' __version__ = '1.3.6' from cbapi.response.rest_api import CbEnterpriseResponseAPI, CbResponseAPI from cbapi.protection.rest_api i...
true
true
f72eac1b900c7f609802611bd21042c02362d0e3
16,499
py
Python
telethon/client/users.py
polisitni1/DogeClickBot
ac57eaeefca2c6ab9e48458f9f928a6a421a162e
[ "MIT" ]
null
null
null
telethon/client/users.py
polisitni1/DogeClickBot
ac57eaeefca2c6ab9e48458f9f928a6a421a162e
[ "MIT" ]
null
null
null
telethon/client/users.py
polisitni1/DogeClickBot
ac57eaeefca2c6ab9e48458f9f928a6a421a162e
[ "MIT" ]
null
null
null
import asyncio import itertools import logging import time from .telegrambaseclient import TelegramBaseClient from .. import errors, utils from ..tl import TLObject, TLRequest, types, functions __log__ = logging.getLogger(__name__) _NOT_A_REQUEST = TypeError('You can only invoke requests, not types!') class UserMet...
41.042289
80
0.576217
import asyncio import itertools import logging import time from .telegrambaseclient import TelegramBaseClient from .. import errors, utils from ..tl import TLObject, TLRequest, types, functions __log__ = logging.getLogger(__name__) _NOT_A_REQUEST = TypeError('You can only invoke requests, not types!') class UserMet...
true
true
f72ead7d4b9e3e317119cf83ac6cb3d4a19f18ec
340
py
Python
examples/resetting_errors.py
MK8J/dobot-python
3ce4a2a5d6e9ae5ab6d42546eab0228419e82e8e
[ "MIT" ]
null
null
null
examples/resetting_errors.py
MK8J/dobot-python
3ce4a2a5d6e9ae5ab6d42546eab0228419e82e8e
[ "MIT" ]
null
null
null
examples/resetting_errors.py
MK8J/dobot-python
3ce4a2a5d6e9ae5ab6d42546eab0228419e82e8e
[ "MIT" ]
null
null
null
''' A script to try and reset from a stage error without having to turn off the dobot ''' import sys import os sys.path.append(os.path.abspath('..')) import connecting #connect bot = connecting.connect() bot.reset_pose(1,45,45) # 0 is false, will try to automatically reset? bot.clear_alarms_state() bot.serial.close(...
17
70
0.738235
import sys import os sys.path.append(os.path.abspath('..')) import connecting bot = connecting.connect() bot.reset_pose(1,45,45) bot.clear_alarms_state() bot.serial.close()
true
true
f72eadfc88eda868eba4d4b77c1b8a758b724676
18,817
py
Python
src/docker-images/job-exporter/test/test_collector.py
jinlmsft/Apulis-AI-Platform
2cf1fbb50e08b477940f5f336b1b897a49608b72
[ "MIT" ]
38
2020-07-13T08:46:39.000Z
2021-02-08T01:38:44.000Z
src/docker-images/job-exporter/test/test_collector.py
debbie-alaine/DLWorkspace
2888042c0f9388f911bc74fe5ecd20ef3fabd715
[ "MIT" ]
null
null
null
src/docker-images/job-exporter/test/test_collector.py
debbie-alaine/DLWorkspace
2888042c0f9388f911bc74fe5ecd20ef3fabd715
[ "MIT" ]
20
2020-07-14T03:38:50.000Z
2021-01-08T06:24:17.000Z
# Copyright (c) Microsoft Corporation # All rights reserved. # # MIT License # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated # documentation files (the "Software"), to deal in the Software without restriction, including without limitation # the rights to ...
38.718107
128
0.634905
import os import sys import unittest import datetime import time import logging import base sys.path.append(os.path.abspath("../src/")) import collector import nvidia import docker_inspect from collector import ContainerCollector from collector import GpuCollector logger = logging.getLogger(__name__) class TestC...
true
true
f72eae12827e90588b406e44397f79f94ffd2658
5,224
py
Python
spacy/lemmatizer.py
gandersen101/spaCy
109849bd311490f17a29b320cb032e43d153f36f
[ "MIT" ]
null
null
null
spacy/lemmatizer.py
gandersen101/spaCy
109849bd311490f17a29b320cb032e43d153f36f
[ "MIT" ]
null
null
null
spacy/lemmatizer.py
gandersen101/spaCy
109849bd311490f17a29b320cb032e43d153f36f
[ "MIT" ]
null
null
null
# coding: utf8 from __future__ import unicode_literals from collections import OrderedDict from .symbols import NOUN, VERB, ADJ, PUNCT, PROPN from .errors import Errors from .lookups import Lookups from .parts_of_speech import NAMES as UPOS_NAMES class Lemmatizer(object): """ The Lemmatizer supports simple ...
37.049645
100
0.612749
from __future__ import unicode_literals from collections import OrderedDict from .symbols import NOUN, VERB, ADJ, PUNCT, PROPN from .errors import Errors from .lookups import Lookups from .parts_of_speech import NAMES as UPOS_NAMES class Lemmatizer(object): @classmethod def load(cls, *args, **kwargs): ...
true
true
f72eaedaba0b8ff86ee1179bca09e69c0be08394
5,122
py
Python
terra/csel.py
broadinstitute/dockstore-tool-cms2
4ff3efbc814aa9deb0a94a4715aa992670ee4d60
[ "Apache-2.0" ]
null
null
null
terra/csel.py
broadinstitute/dockstore-tool-cms2
4ff3efbc814aa9deb0a94a4715aa992670ee4d60
[ "Apache-2.0" ]
null
null
null
terra/csel.py
broadinstitute/dockstore-tool-cms2
4ff3efbc814aa9deb0a94a4715aa992670ee4d60
[ "Apache-2.0" ]
1
2020-11-10T22:02:21.000Z
2020-11-10T22:02:21.000Z
#!/usr/bin/env python3 import argparse import copy import datetime #from firecloud import fiss import json import operator import subprocess import sys import time #print(fiss.meth_list(args=argparse.Namespace())) import firecloud.api as fapi SEL_NAMESPACE='um1-encode-y2s1' SEL_WORKSPACE='selection-sim' #dir(fapi)...
42.330579
135
0.679617
import argparse import copy import datetime import json import operator import subprocess import sys import time import firecloud.api as fapi SEL_NAMESPACE='um1-encode-y2s1' SEL_WORKSPACE='selection-sim' z = fapi.list_workspace_configs(namespace=SEL_NAMESPACE, workspace=SEL_WORKSPACE, allRepos=True).json() print(z...
true
true
f72eaf3c67b409384826a341503758bb4a502d32
14,180
py
Python
lib/django/db/migrations/executor.py
ohmini/thaifoodapi
36469959651d0deb7a323b7ca241b9c99e7a3502
[ "BSD-3-Clause" ]
null
null
null
lib/django/db/migrations/executor.py
ohmini/thaifoodapi
36469959651d0deb7a323b7ca241b9c99e7a3502
[ "BSD-3-Clause" ]
null
null
null
lib/django/db/migrations/executor.py
ohmini/thaifoodapi
36469959651d0deb7a323b7ca241b9c99e7a3502
[ "BSD-3-Clause" ]
null
null
null
from __future__ import unicode_literals from django.apps.registry import apps as global_apps from django.db import migrations from .exceptions import InvalidMigrationPlan from .loader import MigrationLoader from .recorder import MigrationRecorder from .state import ProjectState class MigrationExecutor(object): ...
47.424749
115
0.61488
from __future__ import unicode_literals from django.apps.registry import apps as global_apps from django.db import migrations from .exceptions import InvalidMigrationPlan from .loader import MigrationLoader from .recorder import MigrationRecorder from .state import ProjectState class MigrationExecutor(object): ...
true
true
f72eafd27fb8361f96937936ad725718e5ac8bea
3,705
py
Python
bat/tests/conf_test.py
lundybernard/metal-snake
4ae39cc3b4e070625a67bf1df0e7e53d01c19ab1
[ "MIT" ]
null
null
null
bat/tests/conf_test.py
lundybernard/metal-snake
4ae39cc3b4e070625a67bf1df0e7e53d01c19ab1
[ "MIT" ]
2
2022-03-31T03:01:39.000Z
2022-03-31T03:02:48.000Z
bat/tests/conf_test.py
lundybernard/metal-snake
4ae39cc3b4e070625a67bf1df0e7e53d01c19ab1
[ "MIT" ]
null
null
null
from unittest import TestCase from unittest.mock import patch from dataclasses import dataclass import yaml from ..conf import ( get_config, Namespace, ) SRC = 'bat.conf' EXAMPLE_CONFIG_YAML = ''' default: example example: bat: key: value remote_host: api_key: example_api_...
28.5
77
0.615115
from unittest import TestCase from unittest.mock import patch from dataclasses import dataclass import yaml from ..conf import ( get_config, Namespace, ) SRC = 'bat.conf' EXAMPLE_CONFIG_YAML = ''' default: example example: bat: key: value remote_host: api_key: example_api_...
true
true
f72eb0729c8579621c30a4f80dbbabfa81283a19
99
py
Python
interpro7dw/interpro/mysql/__init__.py
matthiasblum/i7dw
b40e5b9984dec2895956828ddf9db8af4a8ec932
[ "Apache-2.0" ]
null
null
null
interpro7dw/interpro/mysql/__init__.py
matthiasblum/i7dw
b40e5b9984dec2895956828ddf9db8af4a8ec932
[ "Apache-2.0" ]
null
null
null
interpro7dw/interpro/mysql/__init__.py
matthiasblum/i7dw
b40e5b9984dec2895956828ddf9db8af4a8ec932
[ "Apache-2.0" ]
null
null
null
from . import clans, databases, entries, proteins, proteomes, structures, taxa from . import utils
33
78
0.777778
from . import clans, databases, entries, proteins, proteomes, structures, taxa from . import utils
true
true
f72eb080d6a45bd70ccbae966aa6a0f3c15c3a83
585
py
Python
app/rsa.py
FusionAuth/-fusionauth-example-python-jwt
3fb8cfd1d7c77306a3a5d92cb834fbf53eee61d9
[ "Apache-2.0" ]
2
2022-01-04T15:52:31.000Z
2022-02-01T12:23:10.000Z
app/rsa.py
FusionAuth/fusionauth-example-python-jwt
3fb8cfd1d7c77306a3a5d92cb834fbf53eee61d9
[ "Apache-2.0" ]
null
null
null
app/rsa.py
FusionAuth/fusionauth-example-python-jwt
3fb8cfd1d7c77306a3a5d92cb834fbf53eee61d9
[ "Apache-2.0" ]
null
null
null
import datetime import python_jwt as jwt import jwcrypto.jwk as jwk def run(): key = jwk.JWK.generate(kty='RSA', size=2048) # User API payload = { "iss": "fusionauth.io", "aud": "238d4793-70de-4183-9707-48ed8ecd19d9", "sub": "19016b73-3ffa-4b26-80d8-aa9287738677", ...
22.5
82
0.601709
import datetime import python_jwt as jwt import jwcrypto.jwk as jwk def run(): key = jwk.JWK.generate(kty='RSA', size=2048) payload = { "iss": "fusionauth.io", "aud": "238d4793-70de-4183-9707-48ed8ecd19d9", "sub": "19016b73-3ffa-4b26-80d8-aa9287738677", "name": ...
true
true
f72eb0fe13ca1abff84f6656134223f774bee5b5
3,510
py
Python
database/sqlalchemy_test.py
Christine002/CalculatorHW1
07539a137fa69134c71388e67a5e1c98e5951f33
[ "MIT" ]
null
null
null
database/sqlalchemy_test.py
Christine002/CalculatorHW1
07539a137fa69134c71388e67a5e1c98e5951f33
[ "MIT" ]
null
null
null
database/sqlalchemy_test.py
Christine002/CalculatorHW1
07539a137fa69134c71388e67a5e1c98e5951f33
[ "MIT" ]
null
null
null
from sqlalchemy import Column, ForeignKey, Integer, String from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relationship from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from pprint import pprint # Create an engine that stores data in the local directory's ...
36.5625
131
0.759829
from sqlalchemy import Column, ForeignKey, Integer, String from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relationship from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from pprint import pprint # sqlalchemy_example.db file. engine = create_engine('sqlite:...
true
true
f72eb2bdfe5df62c8e4ef216181ab120564060ca
934
py
Python
nipype/interfaces/tests/test_auto_DataGrabber.py
Conxz/nipype
1281723ae56eacd103597ff4081a205583706e62
[ "Apache-2.0" ]
null
null
null
nipype/interfaces/tests/test_auto_DataGrabber.py
Conxz/nipype
1281723ae56eacd103597ff4081a205583706e62
[ "Apache-2.0" ]
2
2017-10-05T21:08:38.000Z
2018-10-09T23:01:23.000Z
nipype/interfaces/tests/test_auto_DataGrabber.py
Conxz/nipype
1281723ae56eacd103597ff4081a205583706e62
[ "Apache-2.0" ]
1
2016-10-11T19:18:53.000Z
2016-10-11T19:18:53.000Z
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from ...testing import assert_equal from ..io import DataGrabber def test_DataGrabber_inputs(): input_map = dict(base_directory=dict(), ignore_exception=dict(nohash=True, usedefault=True, ), raise_on_empty=dict(usedefault=True, ), sort_...
28.30303
78
0.679872
from ...testing import assert_equal from ..io import DataGrabber def test_DataGrabber_inputs(): input_map = dict(base_directory=dict(), ignore_exception=dict(nohash=True, usedefault=True, ), raise_on_empty=dict(usedefault=True, ), sort_filelist=dict(mandatory=True, ), template=dict...
true
true
f72eb2f1472da936493f1cf75785a6413c1e7e61
7,405
py
Python
examples/face_recogniser/content/processing.py
kjarczak/balticlsc_module
d104c66fbfeb2147e8a40a0fa5170326843854c5
[ "MIT" ]
null
null
null
examples/face_recogniser/content/processing.py
kjarczak/balticlsc_module
d104c66fbfeb2147e8a40a0fa5170326843854c5
[ "MIT" ]
null
null
null
examples/face_recogniser/content/processing.py
kjarczak/balticlsc_module
d104c66fbfeb2147e8a40a0fa5170326843854c5
[ "MIT" ]
1
2021-06-24T07:57:40.000Z
2021-06-24T07:57:40.000Z
import os from typing import List, Tuple, Dict import face_recognition from matplotlib import pyplot, patches from PIL import Image import numpy as np from balticlsc.access.ftp import upload_file, get_connection from balticlsc.configs.credential.ftp import FTPCredential from balticlsc.scheme.api import init_baltic...
45.709877
118
0.640648
import os from typing import List, Tuple, Dict import face_recognition from matplotlib import pyplot, patches from PIL import Image import numpy as np from balticlsc.access.ftp import upload_file, get_connection from balticlsc.configs.credential.ftp import FTPCredential from balticlsc.scheme.api import init_baltic...
true
true
f72eb3531991a856678c5e8125ca3770d94382aa
6,355
py
Python
UNF/training/metric.py
waterzxj/UNF
5eda8e7c60116735f595f4b21b24547708b36cf5
[ "Apache-2.0" ]
86
2020-02-23T13:38:11.000Z
2022-03-01T12:09:28.000Z
UNF/training/metric.py
Dreamliking/UNF
5eda8e7c60116735f595f4b21b24547708b36cf5
[ "Apache-2.0" ]
2
2020-04-20T08:33:05.000Z
2020-05-13T13:43:08.000Z
UNF/training/metric.py
Dreamliking/UNF
5eda8e7c60116735f595f4b21b24547708b36cf5
[ "Apache-2.0" ]
14
2020-03-07T05:21:44.000Z
2021-05-09T16:57:23.000Z
#coding:utf-8 import torch from learner_util import get_ner_BIO class Metric(object): def __call__(self, predictions, gold_labels, mask=None): """ metric的抽象类 :params predictions 预测结果的tensor :params gold_labels 实际结果的tensor ...
32.09596
122
0.59465
import torch from learner_util import get_ner_BIO class Metric(object): def __call__(self, predictions, gold_labels, mask=None): raise NotImplementedError def get_metric(self, reset=False): raise NotImplementedError def reset(self): ...
true
true
f72eb416f3eae037abbad9c26911354d1395878a
235
py
Python
CA117/Lab_4/beststudent_31_v1.py
PRITI1999/OneLineWonders
91a7368e0796e5a3b5839c9165f9fbe5460879f5
[ "MIT" ]
6
2016-02-04T00:15:20.000Z
2019-10-13T13:53:16.000Z
CA117/Lab_4/beststudent_31_v1.py
PRITI1999/OneLineWonders
91a7368e0796e5a3b5839c9165f9fbe5460879f5
[ "MIT" ]
2
2016-03-14T04:01:36.000Z
2019-10-16T12:45:34.000Z
CA117/Lab_4/beststudent_31_v1.py
PRITI1999/OneLineWonders
91a7368e0796e5a3b5839c9165f9fbe5460879f5
[ "MIT" ]
10
2016-02-09T14:38:32.000Z
2021-05-25T08:16:26.000Z
(lambda a:print("Best student: {1} {2}\nBest mark: {0}".format(*max([line.split()for line in open(a,'r')],key=lambda x:int(x[0]))))if __import__('os').path.isfile(a)else print("ERROR: File not found! " + a))(__import__('sys').argv[1])
117.5
234
0.651064
(lambda a:print("Best student: {1} {2}\nBest mark: {0}".format(*max([line.split()for line in open(a,'r')],key=lambda x:int(x[0]))))if __import__('os').path.isfile(a)else print("ERROR: File not found! " + a))(__import__('sys').argv[1])
true
true
f72eb438d3abf9cfce6d1a6d2c601b7b771936ca
3,568
py
Python
multi_layer_network/src/extract_events.py
hxin18/gaia-entity-resolution
4f64a0e07ff6aa62ea6f30ce86c6106a7201aaa0
[ "MIT" ]
null
null
null
multi_layer_network/src/extract_events.py
hxin18/gaia-entity-resolution
4f64a0e07ff6aa62ea6f30ce86c6106a7201aaa0
[ "MIT" ]
null
null
null
multi_layer_network/src/extract_events.py
hxin18/gaia-entity-resolution
4f64a0e07ff6aa62ea6f30ce86c6106a7201aaa0
[ "MIT" ]
null
null
null
import re import sys import json import getopt import collections from datetime import datetime from collections import defaultdict ### Given RPI ColdStart input, the Entity strings JSON file, and the String strings JSON file, produces the events JSON file. ### def main(argv): opts, _ = getopt.getopt(argv,"hi:e:s:...
36.040404
242
0.633688
import re import sys import json import getopt import collections from datetime import datetime from collections import defaultdict def main(argv): opts, _ = getopt.getopt(argv,"hi:e:s:o:",["ifile=","efile=","sfile=","ofile="]) for opt, arg in opts: if opt == '-h': print('Given RPI ColdStart input, the Enti...
true
true
f72eb4628f805442a54c0a5abe345ae985fd1cad
833
py
Python
LeetCode/python-R1/0521-最长特殊序列 Ⅰ/V1.py
huuuuusy/Programming-Practice-Everyday
c78b368ab0439d85b8a69f6d9c8154d708bafc9c
[ "Apache-2.0" ]
4
2019-08-27T11:28:03.000Z
2020-12-24T07:10:22.000Z
LeetCode/python-R1/0521-最长特殊序列 Ⅰ/V1.py
huuuuusy/Programming-Practice-Everyday
c78b368ab0439d85b8a69f6d9c8154d708bafc9c
[ "Apache-2.0" ]
null
null
null
LeetCode/python-R1/0521-最长特殊序列 Ⅰ/V1.py
huuuuusy/Programming-Practice-Everyday
c78b368ab0439d85b8a69f6d9c8154d708bafc9c
[ "Apache-2.0" ]
4
2019-09-20T09:44:01.000Z
2020-12-24T07:10:23.000Z
""" @Author: huuuuusy @GitHub: https://github.com/huuuuusy 系统: Ubuntu 18.04 IDE: VS Code 1.36 工具: python == 3.7.3 """ """ 思路: 代码简单,但是关键是理解题意: 注意题目中的独有两个字: s1 = 'ab',s2 = 'a',因为ab是s1独有,所以最长子序列为ab; s1 = 'ab', s2 = 'ab', 因为ab是两个串都有,ab排除,a也是两个串都有,排除,b也是两个串都有,排除。所以最长特殊序列不存在,返回-1; 通过以上分析,我们可以得出...
22.513514
87
0.593037
class Solution: def findLUSlength(self, a, b): if a == b: return -1 else: return len([a if len(a) > len(b) else b][0]) if __name__ == "__main__": a = "aba" b = "cdc" answer = Solution().findLUSlength(a, b) print(answer)
true
true
f72eb54af7802f9a7de3342afa34f50fbf810d29
13,415
py
Python
pysimm/apps/random_walk.py
sibo/pysimm_tacticity
cfb20851b26b87b736dbb6a2f4c4e7b668d680d5
[ "MIT" ]
null
null
null
pysimm/apps/random_walk.py
sibo/pysimm_tacticity
cfb20851b26b87b736dbb6a2f4c4e7b668d680d5
[ "MIT" ]
null
null
null
pysimm/apps/random_walk.py
sibo/pysimm_tacticity
cfb20851b26b87b736dbb6a2f4c4e7b668d680d5
[ "MIT" ]
null
null
null
# ****************************************************************************** # pysimm.apps.random_walk module # ****************************************************************************** # # psuedo random walk algorithm written using pysimm tools # # *************************************************************...
34.309463
112
0.547372
from time import strftime from itertools import permutations, izip import numpy as np from pysimm import system, lmps, forcefield, calc from pysimm import error_print def find_last_backbone_vector(s, m): head_pos = [0, 0, 0] tail_pos = [0, 0, 0] for p in s.particles[-1*m.particles.count:]: if ...
true
true
f72eb557881c37baab88b43f249c035716e84b5c
963
py
Python
photos/views.py
zigapk/zerodays-challenge
3031e11ef868631de2466e2003127ac83b033d58
[ "MIT" ]
null
null
null
photos/views.py
zigapk/zerodays-challenge
3031e11ef868631de2466e2003127ac83b033d58
[ "MIT" ]
null
null
null
photos/views.py
zigapk/zerodays-challenge
3031e11ef868631de2466e2003127ac83b033d58
[ "MIT" ]
null
null
null
from django.db import transaction from django.http import JsonResponse, HttpResponseNotAllowed from django.views.decorators.csrf import csrf_exempt from .models import Photo def list_photos(request): if request.method == 'GET': photos = Photo.objects.all().order_by('unsplash_id') return JsonRespo...
26.75
81
0.687435
from django.db import transaction from django.http import JsonResponse, HttpResponseNotAllowed from django.views.decorators.csrf import csrf_exempt from .models import Photo def list_photos(request): if request.method == 'GET': photos = Photo.objects.all().order_by('unsplash_id') return JsonRespo...
true
true
f72eb561be479318fbf20e59f9be7488fc76b552
221
py
Python
src/enums/_constraints.py
Freonius/tranquillity
bb190b4a8facf643d5018a710100b3ff45d6d640
[ "MIT" ]
null
null
null
src/enums/_constraints.py
Freonius/tranquillity
bb190b4a8facf643d5018a710100b3ff45d6d640
[ "MIT" ]
20
2021-12-31T15:28:20.000Z
2022-02-15T18:24:16.000Z
src/enums/_constraints.py
Freonius/tranquillity
bb190b4a8facf643d5018a710100b3ff45d6d640
[ "MIT" ]
null
null
null
from enum import Enum, auto class Constraints(Enum): not_empty = auto() greater_than_0 = auto() not_null = auto() is_email = auto() is_uri = auto() after_now = auto() before_now = auto()
18.416667
27
0.606335
from enum import Enum, auto class Constraints(Enum): not_empty = auto() greater_than_0 = auto() not_null = auto() is_email = auto() is_uri = auto() after_now = auto() before_now = auto()
true
true
f72eb585890bafe8941f0c78a9d950477be13230
2,555
py
Python
backtrader/backtrader/indicators/__init__.py
harshabakku/live-back-testing-trader
1fd69c7598dc15bea740f160eed886f396bcba2c
[ "MIT" ]
1
2021-07-14T22:04:08.000Z
2021-07-14T22:04:08.000Z
backtrader/backtrader/indicators/__init__.py
ajmal017/LiveBackTestingTrader
8b4f5804c0aa6046128f6706582f9cde78a0519a
[ "MIT" ]
null
null
null
backtrader/backtrader/indicators/__init__.py
ajmal017/LiveBackTestingTrader
8b4f5804c0aa6046128f6706582f9cde78a0519a
[ "MIT" ]
3
2021-03-07T16:29:40.000Z
2022-03-17T21:42:38.000Z
#!/usr/bin/env python # -*- coding: utf-8; py-indent-offset:4 -*- ############################################################################### # # Copyright (C) 2015, 2016, 2017 Daniel Rodriguez # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Li...
28.076923
79
0.699413
from __future__ import (absolute_import, division, print_function, unicode_literals) from backtrader import Indicator from backtrader.functions import * from .basicops import * from .mabase import * from .sma import * from .ema import * from .smma import * from .wma import * from .dema impo...
true
true
f72eb6919b6ff61569dadd031bc009867b1f62b7
8,984
py
Python
neutron_plugin_contrail/plugins/opencontrail/loadbalancer/resource_manager.py
bailkeri/contrail-neutron-plugin
de41d381729d6750db6ee84f4f8ec241c1830ad3
[ "Apache-2.0" ]
null
null
null
neutron_plugin_contrail/plugins/opencontrail/loadbalancer/resource_manager.py
bailkeri/contrail-neutron-plugin
de41d381729d6750db6ee84f4f8ec241c1830ad3
[ "Apache-2.0" ]
null
null
null
neutron_plugin_contrail/plugins/opencontrail/loadbalancer/resource_manager.py
bailkeri/contrail-neutron-plugin
de41d381729d6750db6ee84f4f8ec241c1830ad3
[ "Apache-2.0" ]
null
null
null
# # Copyright (c) 2014 Juniper Networks, Inc. All rights reserved. # from abc import ABCMeta, abstractmethod, abstractproperty from eventlet import greenthread from neutron.common import exceptions as n_exc from neutron.extensions import loadbalancer from neutron.plugins.common import constants from vnc_api.vnc_api im...
30.662116
79
0.598508
from abc import ABCMeta, abstractmethod, abstractproperty from eventlet import greenthread from neutron.common import exceptions as n_exc from neutron.extensions import loadbalancer from neutron.plugins.common import constants from vnc_api.vnc_api import NoIdError, RefsExistError import six import uuid class Loadbala...
true
true
f72eb75b52c1111f421c3e6bb21b6e69eee64a93
2,707
py
Python
opensfm/test/test_triangulation.py
vik748/OpenSfM
bd949246e3e0d6d3a707a08224038034d27e3ee8
[ "BSD-2-Clause" ]
null
null
null
opensfm/test/test_triangulation.py
vik748/OpenSfM
bd949246e3e0d6d3a707a08224038034d27e3ee8
[ "BSD-2-Clause" ]
3
2021-06-08T22:22:02.000Z
2022-03-12T00:47:52.000Z
opensfm/test/test_triangulation.py
smarvar/sfm_smarvar
569144c26df860cfa45d183f7701d0414e35d086
[ "BSD-2-Clause" ]
null
null
null
import numpy as np import networkx as nx from opensfm import io from opensfm import pygeometry from opensfm import reconstruction from opensfm import pysfm def test_track_triangulator_equirectangular(): """Test triangulating tracks of spherical images.""" tracks_manager = pysfm.TracksManager() tracks_man...
30.41573
91
0.569634
import numpy as np import networkx as nx from opensfm import io from opensfm import pygeometry from opensfm import reconstruction from opensfm import pysfm def test_track_triangulator_equirectangular(): tracks_manager = pysfm.TracksManager() tracks_manager.add_observation('im1', '1', pysfm.Observation(0, 0, ...
true
true
f72eb7cef44043a2b1295eb4b8935af5db17e752
1,064
py
Python
infoblox_netmri/api/remote/models/device_viewer_open_services_grid_remote.py
infobloxopen/infoblox_netmri
aa1c744df7e439dbe163bb9edd165e4e85a9771b
[ "Apache-2.0" ]
12
2016-02-19T12:37:54.000Z
2022-03-04T20:11:08.000Z
infoblox_netmri/api/remote/models/device_viewer_open_services_grid_remote.py
infobloxopen/infoblox_netmri
aa1c744df7e439dbe163bb9edd165e4e85a9771b
[ "Apache-2.0" ]
18
2015-11-12T18:37:00.000Z
2021-05-19T07:59:55.000Z
infoblox_netmri/api/remote/models/device_viewer_open_services_grid_remote.py
infobloxopen/infoblox_netmri
aa1c744df7e439dbe163bb9edd165e4e85a9771b
[ "Apache-2.0" ]
18
2016-01-07T12:04:34.000Z
2022-03-31T11:05:41.000Z
from ..remote import RemoteModel class DeviceViewerOpenServicesGridRemote(RemoteModel): """ | ``id:`` none | ``attribute type:`` string | ``DeviceID:`` none | ``attribute type:`` string | ``DataSourceID:`` none | ``attribute type:`` string | ``ipaddress:`` none | ``at...
20.461538
54
0.470865
from ..remote import RemoteModel class DeviceViewerOpenServicesGridRemote(RemoteModel): properties = ("id", "DeviceID", "DataSourceID", "ipaddress", "ListenAddr", "PortProtocol", "Port", ...
true
true
f72eb800bacb5e3e23d6174f7e147ea13700f6c0
1,887
py
Python
test/sascalculator/utest_sas_gen.py
llimeht/sasview
d0c10746a2397c5021ed8bbc842ba99243a9b0ac
[ "BSD-3-Clause" ]
null
null
null
test/sascalculator/utest_sas_gen.py
llimeht/sasview
d0c10746a2397c5021ed8bbc842ba99243a9b0ac
[ "BSD-3-Clause" ]
null
null
null
test/sascalculator/utest_sas_gen.py
llimeht/sasview
d0c10746a2397c5021ed8bbc842ba99243a9b0ac
[ "BSD-3-Clause" ]
null
null
null
""" Unit tests for the sas_gen """ import os.path import warnings warnings.simplefilter("ignore") import unittest import numpy as np from sas.sascalc.calculator import sas_gen def find(filename): return os.path.join(os.path.dirname(__file__), 'data', filename) class sas_gen_test(unittest.TestCase): def ...
25.5
68
0.594065
import os.path import warnings warnings.simplefilter("ignore") import unittest import numpy as np from sas.sascalc.calculator import sas_gen def find(filename): return os.path.join(os.path.dirname(__file__), 'data', filename) class sas_gen_test(unittest.TestCase): def setUp(self): self.sldloader...
true
true
f72eb81e6b4626299dd47b3dfad9d67bad9b3205
629
py
Python
contrib/qt_translations.py
TheFreedomCoin/Freedom-Coin
e679946333f7090ea2afaab213419d31d5e91870
[ "MIT" ]
2
2018-06-15T08:41:56.000Z
2018-11-01T05:37:50.000Z
contrib/qt_translations.py
TheFreedomCoin/sentinel2repo
e679946333f7090ea2afaab213419d31d5e91870
[ "MIT" ]
null
null
null
contrib/qt_translations.py
TheFreedomCoin/sentinel2repo
e679946333f7090ea2afaab213419d31d5e91870
[ "MIT" ]
7
2018-05-10T19:09:51.000Z
2021-06-26T18:12:26.000Z
#!/usr/bin/env python # Helpful little script that spits out a comma-separated list of # language codes for Qt icons that should be included # in binary transfer distributions import glob import os import re import sys if len(sys.argv) != 3: sys.exit("Usage: %s $QTDIR/translations $FreedomcoinDIR/src/qt/locale"%sy...
27.347826
116
0.688394
import glob import os import re import sys if len(sys.argv) != 3: sys.exit("Usage: %s $QTDIR/translations $FreedomcoinDIR/src/qt/locale"%sys.argv[0]) d1 = sys.argv[1] d2 = sys.argv[2] l1 = set([ re.search(r'qt_(.*).qm', f).group(1) for f in glob.glob(os.path.join(d1, 'qt_*.qm')) ]) l2 = set([ re.search(r'Freedom...
false
true
f72eb836bf1ae0ede245207bbaad409be8cbc77e
22,844
py
Python
tools/test/examples/examples_lib.py
Eric-A-Marks/mbed-os
4ba07d9413fbf7bae2db97a06e4eb4f275063d93
[ "Apache-2.0" ]
2
2021-01-28T09:12:02.000Z
2021-01-28T11:03:26.000Z
tools/test/examples/examples_lib.py
Eric-A-Marks/mbed-os
4ba07d9413fbf7bae2db97a06e4eb4f275063d93
[ "Apache-2.0" ]
7
2019-04-11T10:12:18.000Z
2020-10-27T12:54:57.000Z
tools/test/examples/examples_lib.py
Eric-A-Marks/mbed-os
4ba07d9413fbf7bae2db97a06e4eb4f275063d93
[ "Apache-2.0" ]
2
2016-07-21T12:40:27.000Z
2016-07-22T11:29:19.000Z
#!/usr/bin/env python """ Copyright (c) 2017-2019 ARM Limited. All rights reserved. SPDX-License-Identifier: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licen...
42.859287
149
0.573761
import os from os.path import dirname, abspath, basename, join, normpath import os.path import sys import copy import stat import subprocess from shutil import rmtree import json import logging logging.basicConfig(level=logging.DEBUG, format='[EXAMPLES]> %(levelname)-8s %(message)s') MBED_OS_ROOT = abspath(dirname(...
true
true
f72eb9f4639cbc1da62b470e79d10c5da4bfa8a1
9,904
py
Python
track.py
ddasdkimo/Towards-Realtime-MOT
cfe0e26331969450b6e2a645dfa5c14947514ba5
[ "MIT" ]
null
null
null
track.py
ddasdkimo/Towards-Realtime-MOT
cfe0e26331969450b6e2a645dfa5c14947514ba5
[ "MIT" ]
null
null
null
track.py
ddasdkimo/Towards-Realtime-MOT
cfe0e26331969450b6e2a645dfa5c14947514ba5
[ "MIT" ]
null
null
null
import os import os.path as osp import cv2 import logging import argparse import motmetrics as mm import torch from tracker.multitracker import JDETracker from utils import visualization as vis from utils.log import logger from utils.timer import Timer from utils.evaluation import Evaluator from utils.par...
39.935484
119
0.601373
import os import os.path as osp import cv2 import logging import argparse import motmetrics as mm import torch from tracker.multitracker import JDETracker from utils import visualization as vis from utils.log import logger from utils.timer import Timer from utils.evaluation import Evaluator from utils.par...
true
true
f72ebb099171a1bdd6461c9a7537a443a6f2854c
3,946
py
Python
taiga_stats/helpers.py
erikw/taiga_stats
7e28ffff5169707e248be6a4ab6e31326fc2ca85
[ "BSD-3-Clause" ]
null
null
null
taiga_stats/helpers.py
erikw/taiga_stats
7e28ffff5169707e248be6a4ab6e31326fc2ca85
[ "BSD-3-Clause" ]
null
null
null
taiga_stats/helpers.py
erikw/taiga_stats
7e28ffff5169707e248be6a4ab6e31326fc2ca85
[ "BSD-3-Clause" ]
null
null
null
import datetime as dt import sys import matplotlib import taiga_stats.constants as c matplotlib.use("TkAgg") # Reference: https://stackoverflow.com/a/48374671/265508 DOT_HEADER_FMT = """digraph {:s} {{ labelloc="t"; //labelfontsize="40" label="{:s}"; //size="7.5,10" ratio="compress" //orientation=land...
25.79085
121
0.582615
import datetime as dt import sys import matplotlib import taiga_stats.constants as c matplotlib.use("TkAgg") DOT_HEADER_FMT = """digraph {:s} {{ labelloc="t"; //labelfontsize="40" label="{:s}"; //size="7.5,10" ratio="compress" //orientation=landscape """ def get_tag_str(tag): return "" if tag ==...
true
true
f72ebbd1000cb065fe77e17ce2acc68b098d41f3
522
py
Python
troposphere/validators/appmesh.py
compose-x/troposphere
9a94a8fafd8b4da1cd1f4239be0e7aa0681fd8d4
[ "BSD-2-Clause" ]
null
null
null
troposphere/validators/appmesh.py
compose-x/troposphere
9a94a8fafd8b4da1cd1f4239be0e7aa0681fd8d4
[ "BSD-2-Clause" ]
null
null
null
troposphere/validators/appmesh.py
compose-x/troposphere
9a94a8fafd8b4da1cd1f4239be0e7aa0681fd8d4
[ "BSD-2-Clause" ]
null
null
null
# Copyright (c) 2012-2022, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. def validate_listenertls_mode(listenertls_mode): """ Validate Mode for ListernerTls Property: ListenerTls.Mode """ VALID_LISTENERTLS_MODE = ("STRICT", "PERMISSIVE", "DISABLED") ...
26.1
86
0.685824
def validate_listenertls_mode(listenertls_mode): VALID_LISTENERTLS_MODE = ("STRICT", "PERMISSIVE", "DISABLED") if listenertls_mode not in VALID_LISTENERTLS_MODE: raise ValueError( "ListernerTls Mode must be one of: %s" % ", ".join(VALID_LISTENERTLS_MODE) ) return listenertls_...
true
true
f72ebc3e4aa53fcb0695239a45e7c14928a36718
1,159
py
Python
src/ai/backend/kernel/__init__.py
hephaex/backend.ai-kernel-runner
0c0978b4825215bd38f417c449745bfbab2db30e
[ "MIT" ]
1
2021-10-04T21:59:34.000Z
2021-10-04T21:59:34.000Z
src/ai/backend/kernel/__init__.py
hephaex/backend.ai-kernel-runner
0c0978b4825215bd38f417c449745bfbab2db30e
[ "MIT" ]
null
null
null
src/ai/backend/kernel/__init__.py
hephaex/backend.ai-kernel-runner
0c0978b4825215bd38f417c449745bfbab2db30e
[ "MIT" ]
null
null
null
import argparse from .base import BaseRunner from .terminal import Terminal __all__ = ( 'BaseRunner', 'Terminal', ) __version__ = '1.4.1' lang_map = { 'python': 'ai.backend.kernel.python.Runner', 'c': 'ai.backend.kernel.c.Runner', 'cpp': 'ai.backend.kernel.cpp.Runner', 'golang': 'ai.backend...
29.717949
70
0.672131
import argparse from .base import BaseRunner from .terminal import Terminal __all__ = ( 'BaseRunner', 'Terminal', ) __version__ = '1.4.1' lang_map = { 'python': 'ai.backend.kernel.python.Runner', 'c': 'ai.backend.kernel.c.Runner', 'cpp': 'ai.backend.kernel.cpp.Runner', 'golang': 'ai.backend...
true
true
f72ebcf7d866cdce598b76811f70a12537e4584c
8,422
py
Python
python/ccxt/async/base/exchange.py
skeller88/ccxt
7200521a005a2ddc23efe7bd003628b8e8b955dd
[ "MIT" ]
null
null
null
python/ccxt/async/base/exchange.py
skeller88/ccxt
7200521a005a2ddc23efe7bd003628b8e8b955dd
[ "MIT" ]
null
null
null
python/ccxt/async/base/exchange.py
skeller88/ccxt
7200521a005a2ddc23efe7bd003628b8e8b955dd
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- __version__ = '1.13.45' # ----------------------------------------------------------------------------- import asyncio import concurrent import socket import time import math import random import certifi import a...
41.082927
135
0.602114
__version__ = '1.13.45' import asyncio import concurrent import socket import time import math import random import certifi import aiohttp import ssl import yarl from ccxt.async.base.throttle import throttle from ccxt.base.errors import ExchangeError from ccxt.base.errors import ExchangeNotAvailable from ccxt.b...
false
true
f72ebdd68a8fe652c399e7e2317e2c40df3f83a1
840
py
Python
collection/kashiwabara/02_createMediaList.py
nakamura196/toyo_iiif
c36b47a614b87d967956369a15c12da08fca2567
[ "Apache-2.0" ]
null
null
null
collection/kashiwabara/02_createMediaList.py
nakamura196/toyo_iiif
c36b47a614b87d967956369a15c12da08fca2567
[ "Apache-2.0" ]
null
null
null
collection/kashiwabara/02_createMediaList.py
nakamura196/toyo_iiif
c36b47a614b87d967956369a15c12da08fca2567
[ "Apache-2.0" ]
null
null
null
import urllib.request from bs4 import BeautifulSoup from time import sleep import json import hashlib import os from PIL import Image import glob files = glob.glob("tmp/*.json") rows = [] rows.append(["ID", "Original", "Thubmnail", "Width", "Height"]) for file in sorted(files): filename = file.split("/")[-1] ...
17.87234
97
0.608333
import urllib.request from bs4 import BeautifulSoup from time import sleep import json import hashlib import os from PIL import Image import glob files = glob.glob("tmp/*.json") rows = [] rows.append(["ID", "Original", "Thubmnail", "Width", "Height"]) for file in sorted(files): filename = file.split("/")[-1] ...
true
true
f72ebe8dc117d55ab1f3ff02c98054a97ce7d90a
5,820
py
Python
applications/IgaApplication/tests/test_IgaApplication.py
cwx-ae/Kratos
25e73148a1db56a142650a1e19f195124888c6cd
[ "BSD-4-Clause" ]
778
2017-01-27T16:29:17.000Z
2022-03-30T03:01:51.000Z
applications/IgaApplication/tests/test_IgaApplication.py
cwx-ae/Kratos
25e73148a1db56a142650a1e19f195124888c6cd
[ "BSD-4-Clause" ]
6,634
2017-01-15T22:56:13.000Z
2022-03-31T15:03:36.000Z
applications/IgaApplication/tests/test_IgaApplication.py
cwx-ae/Kratos
25e73148a1db56a142650a1e19f195124888c6cd
[ "BSD-4-Clause" ]
224
2017-02-07T14:12:49.000Z
2022-03-06T23:09:34.000Z
# import Kratos from KratosMultiphysics import * from KratosMultiphysics.IgaApplication import * import run_cpp_unit_tests import KratosMultiphysics.kratos_utilities as kratos_utilities # Import Kratos "wrapper" for unittests import KratosMultiphysics.KratosUnittest as KratosUnittest # Import Iga test factory tests f...
46.56
127
0.813746
from KratosMultiphysics import * from KratosMultiphysics.IgaApplication import * import run_cpp_unit_tests import KratosMultiphysics.kratos_utilities as kratos_utilities import KratosMultiphysics.KratosUnittest as KratosUnittest from iga_test_factory import SinglePatchTest as SinglePatchTest from truss_element_tests ...
true
true
f72ebf2c577dad9380f79aaf1c4edf5bb78e7756
2,106
py
Python
test/functional/test_framework/descriptors.py
elestranobaron/litecoin
1757dde281649c24321c528ef79680897b7ce094
[ "MIT" ]
20
2021-04-03T09:08:10.000Z
2022-02-08T23:27:12.000Z
test/functional/test_framework/descriptors.py
elestranobaron/litecoin
1757dde281649c24321c528ef79680897b7ce094
[ "MIT" ]
2
2021-04-03T05:41:45.000Z
2021-09-30T09:38:36.000Z
test/functional/test_framework/descriptors.py
elestranobaron/litecoin
1757dde281649c24321c528ef79680897b7ce094
[ "MIT" ]
3
2021-04-16T21:54:02.000Z
2021-12-17T16:39:04.000Z
#!/usr/bin/env python3 # Copyright (c) 2019 Pieter Wuille # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Utility functions related to output descriptors""" INPUT_CHARSET = "0123456789()[],'/*abcdefgh@:$%{}IJKLMNOPQRSTUVW...
37.607143
116
0.603039
INPUT_CHARSET = "0123456789()[],'/*abcdefgh@:$%{}IJKLMNOPQRSTUVWXYZ&+-.;<=>?!^_|~ijklmnopqrstuvwxyzABCDEFGH`#\"\\ " CHECKSUM_CHARSET = "qpzry9x8gf2tvdw0s3jn54khce6mua7l" GENERATOR = [0xf5dee51989, 0xa9fdca3312, 0x1bab10e32d, 0x3706b1677a, 0x644d626ffd] def descsum_polymod(symbols): chk = 1 for value in...
true
true
f72ebf40c45cdd85f1466235d3246a9f0f02d062
263
py
Python
duple-api/duple/__init__.py
HughZurname/duple
eed22c2525a32da3b4a429ebadaa950185aa6e66
[ "MIT" ]
1
2022-03-18T02:53:26.000Z
2022-03-18T02:53:26.000Z
duple-api/duple/__init__.py
HughZurname/duple
eed22c2525a32da3b4a429ebadaa950185aa6e66
[ "MIT" ]
1
2022-02-26T22:33:51.000Z
2022-02-26T22:33:51.000Z
duple-api/duple/__init__.py
HughZurname/duple
eed22c2525a32da3b4a429ebadaa950185aa6e66
[ "MIT" ]
null
null
null
import logging import sys import os logging.basicConfig( level=logging.getLevelName(os.getenv("LOG_LEVEL") or "INFO"), format="[%(asctime)s] [%(levelname)s] %(message)s", handlers=[logging.StreamHandler(sys.stdout)], ) logger = logging.getLogger()
21.916667
65
0.707224
import logging import sys import os logging.basicConfig( level=logging.getLevelName(os.getenv("LOG_LEVEL") or "INFO"), format="[%(asctime)s] [%(levelname)s] %(message)s", handlers=[logging.StreamHandler(sys.stdout)], ) logger = logging.getLogger()
true
true
f72ebf692ce4d13b38c4b06937c4b2c86a362b7e
810
py
Python
Machines/October/remote_exploit.py
uwacsp/IppSec-Code
29a1ea6a93bc01b3700373d48caa5a79a3916a73
[ "CNRI-Python" ]
null
null
null
Machines/October/remote_exploit.py
uwacsp/IppSec-Code
29a1ea6a93bc01b3700373d48caa5a79a3916a73
[ "CNRI-Python" ]
null
null
null
Machines/October/remote_exploit.py
uwacsp/IppSec-Code
29a1ea6a93bc01b3700373d48caa5a79a3916a73
[ "CNRI-Python" ]
1
2021-07-27T12:56:03.000Z
2021-07-27T12:56:03.000Z
# # Privilege Escalation Exploit for hackTheBox October # # From IppSec https://youtu.be/K05mJazHhF4 # from subprocess import call import struct # libc base address using: # ldd /usr/local/bin/ovrflw | grep libc libc_base_addr = 0xb75e0000 # readelf -s /lib/i386-linux-gnu/libc.so.6 | grep system system_off = 0x...
21.891892
62
0.691358
from subprocess import call import struct libc_base_addr = 0xb75e0000 system_off = 0x00040310 exit_off = 0x00033260 binsh_off = 0x00162bac binsh_addr = struct.pack("<I", libc_base_addr + binsh_off) system_addr = struct.pack("<I", libc_base_addr + system_off) exit_addr = struct.pack("<I", libc_base_addr + ...
true
true
f72ec08d1ab18ada95fe41cc5b706441b9da8ce8
6,871
py
Python
homeassistant/components/edgetpu/image_processing.py
thecrazymonkey/home-assistant
348b347ed165c88559b40ce04feb5720e91253bf
[ "Apache-2.0" ]
null
null
null
homeassistant/components/edgetpu/image_processing.py
thecrazymonkey/home-assistant
348b347ed165c88559b40ce04feb5720e91253bf
[ "Apache-2.0" ]
null
null
null
homeassistant/components/edgetpu/image_processing.py
thecrazymonkey/home-assistant
348b347ed165c88559b40ce04feb5720e91253bf
[ "Apache-2.0" ]
null
null
null
"""Support for performing EdgeTPU classification on images.""" import logging import voluptuous as vol from homeassistant.components.image_processing import ( CONF_ENTITY_ID, CONF_NAME, CONF_SOURCE, PLATFORM_SCHEMA, ImageProcessingEntity) from homeassistant.core import split_entity_id from homeassistant.helpe...
35.973822
98
0.627129
import logging import voluptuous as vol from homeassistant.components.image_processing import ( CONF_ENTITY_ID, CONF_NAME, CONF_SOURCE, PLATFORM_SCHEMA, ImageProcessingEntity) from homeassistant.core import split_entity_id from homeassistant.helpers import template import homeassistant.helpers.config_validati...
true
true
f72ec0d8575ad1e8a480b6dfdd46dd3ea6886bf8
852
py
Python
flexget/plugins/generic/db_vacuum.py
Konubinix/Flexget
1379e346370ef144b9a02f761fc187497b6097e2
[ "MIT" ]
1
2017-08-25T07:17:04.000Z
2017-08-25T07:17:04.000Z
flexget/plugins/generic/db_vacuum.py
Konubinix/Flexget
1379e346370ef144b9a02f761fc187497b6097e2
[ "MIT" ]
1
2015-11-10T01:07:54.000Z
2015-11-10T01:07:54.000Z
flexget/plugins/generic/db_vacuum.py
Konubinix/Flexget
1379e346370ef144b9a02f761fc187497b6097e2
[ "MIT" ]
null
null
null
from __future__ import unicode_literals, division, absolute_import import logging from datetime import datetime, timedelta from flexget.utils.simple_persistence import SimplePersistence from flexget.event import event log = logging.getLogger('db_vacuum') VACUUM_INTERVAL = timedelta(weeks=24) # 6 months # Run after t...
40.571429
91
0.766432
from __future__ import unicode_literals, division, absolute_import import logging from datetime import datetime, timedelta from flexget.utils.simple_persistence import SimplePersistence from flexget.event import event log = logging.getLogger('db_vacuum') VACUUM_INTERVAL = timedelta(weeks=24) @event('manager.db_clean...
true
true
f72ec1736a03659240a215c3e1fbd08ab2fda8f4
4,325
py
Python
lib/python3.8/site-packages/ansible_collections/netbox/netbox/plugins/modules/netbox_ipam_role.py
cjsteel/python3-venv-ansible-2.10.5
c95395c4cae844dc66fddde9b4343966f4b2ecd5
[ "Apache-1.1" ]
null
null
null
lib/python3.8/site-packages/ansible_collections/netbox/netbox/plugins/modules/netbox_ipam_role.py
cjsteel/python3-venv-ansible-2.10.5
c95395c4cae844dc66fddde9b4343966f4b2ecd5
[ "Apache-1.1" ]
null
null
null
lib/python3.8/site-packages/ansible_collections/netbox/netbox/plugins/modules/netbox_ipam_role.py
cjsteel/python3-venv-ansible-2.10.5
c95395c4cae844dc66fddde9b4343966f4b2ecd5
[ "Apache-1.1" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2019, Mikhail Yohman (@FragmentedPacket) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { "metadata_ver...
26.697531
97
0.652948
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { "metadata_version": "1.1", "status": ["preview"], "supported_by": "community", } DOCUMENTATION = r""" --- module: netbox_ipam_role short_description: Creates or removes ipam roles from Netbox descr...
true
true
f72ec1db4dbbb5d7b20d5ea18b138b8111539f7c
17,753
py
Python
build/libraries.py
lutris/openmsx
91ed35400c7b4c8c460004710736af9abc4dde29
[ "Naumen", "Condor-1.1", "MS-PL" ]
5
2015-02-27T21:42:28.000Z
2021-10-10T23:36:08.000Z
build/libraries.py
lutris/openmsx
91ed35400c7b4c8c460004710736af9abc4dde29
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
build/libraries.py
lutris/openmsx
91ed35400c7b4c8c460004710736af9abc4dde29
[ "Naumen", "Condor-1.1", "MS-PL" ]
2
2015-06-15T09:57:56.000Z
2017-05-14T01:11:48.000Z
# Some notes about static linking: # There are two ways of linking to static library: using the -l command line # option or specifying the full path to the library file as one of the inputs. # When using the -l option, the library search paths will be searched for a # dynamic version of the library, if that is not foun...
29.937605
92
0.694756
from executils import captureStdout, shjoin from os import listdir from os.path import isdir, isfile from os import environ class Library(object): libName = None makeName = None header = None configScriptName = None dynamicLibsOption = '--libs' staticLibsOption = None function = None dependsOn = () ...
true
true
f72ec2738fdcaa32e93f95407b764fa52d3f3f71
598
py
Python
lixian_progress.py
1py/xunlei-lixian
1881932b9d5ccba78c7788fbad12982e05bf7f86
[ "MIT" ]
2,177
2015-01-02T09:56:51.000Z
2022-03-27T01:48:37.000Z
lixian_progress.py
1py/xunlei-lixian
1881932b9d5ccba78c7788fbad12982e05bf7f86
[ "MIT" ]
29
2015-01-24T17:38:59.000Z
2021-08-29T03:39:30.000Z
lixian_progress.py
1py/xunlei-lixian
1881932b9d5ccba78c7788fbad12982e05bf7f86
[ "MIT" ]
516
2015-01-02T18:48:29.000Z
2022-01-26T07:12:35.000Z
import sys class SimpleProgressBar: def __init__(self): self.displayed = False def update(self, percent): self.displayed = True bar_size = 40 percent *= 100.0 if percent > 100: percent = 100.0 dots = int(bar_size * percent / 100) plus = percent / 100 * bar_size - dots if plus > 0.8: plus = '='...
19.290323
47
0.607023
import sys class SimpleProgressBar: def __init__(self): self.displayed = False def update(self, percent): self.displayed = True bar_size = 40 percent *= 100.0 if percent > 100: percent = 100.0 dots = int(bar_size * percent / 100) plus = percent / 100 * bar_size - dots if plus > 0.8: plus = '='...
true
true
f72ec42eb3efc0949d13fb798398c8eed884a8bb
2,368
py
Python
triplet_to_text/code_/coreference_resolver/allennlp_coreference_resolution.py
kracr/OntoLearnBench
c1ca89acd6862fcd6954a62d83c43b2236cdc695
[ "Apache-2.0" ]
1
2022-02-11T19:36:40.000Z
2022-02-11T19:36:40.000Z
triplet_to_text/code_/coreference_resolver/allennlp_coreference_resolution.py
kracr/OntoLearnBench
c1ca89acd6862fcd6954a62d83c43b2236cdc695
[ "Apache-2.0" ]
null
null
null
triplet_to_text/code_/coreference_resolver/allennlp_coreference_resolution.py
kracr/OntoLearnBench
c1ca89acd6862fcd6954a62d83c43b2236cdc695
[ "Apache-2.0" ]
1
2021-06-08T18:54:40.000Z
2021-06-08T18:54:40.000Z
#!/usr/bin/env python # coding: utf-8 # In[1]: from allennlp.predictors.predictor import Predictor # ## Instantiate AllenNLP `Predictor` # 1. Load the same model that is used in the [demo](https://demo.allennlp.org/coreference-resolution) (*don't get alarmed by the warning - we don't need to fine-tune the model t...
29.234568
188
0.669341
from allennlp.predictors.predictor import Predictor model_url = 'https://storage.googleapis.com/allennlp-public-models/coref-spanbert-large-2020.02.27.tar.gz' predictor = Predictor.from_path(model_url) text = "Eva and Martha didn't want their friend Jenny to feel lonely so they invited her to the party in ...
true
true
f72ec4c3bf5925d67bf0defaf42a32236624789c
1,002
py
Python
venv/Scripts/futurize-script.py
saurabhjha137/OCR_using_tesseract
d852865086a7a104f74866411058e51f407b5f6c
[ "Apache-1.1" ]
null
null
null
venv/Scripts/futurize-script.py
saurabhjha137/OCR_using_tesseract
d852865086a7a104f74866411058e51f407b5f6c
[ "Apache-1.1" ]
null
null
null
venv/Scripts/futurize-script.py
saurabhjha137/OCR_using_tesseract
d852865086a7a104f74866411058e51f407b5f6c
[ "Apache-1.1" ]
null
null
null
#!"f:\opencv projects\tesseract ocr\venv\scripts\python.exe" # EASY-INSTALL-ENTRY-SCRIPT: 'future==0.18.2','console_scripts','futurize' import re import sys # for compatibility with easy_install; see #2198 __requires__ = 'future==0.18.2' try: from importlib.metadata import distribution except ImportError: try...
29.470588
81
0.702595
import re import sys __requires__ = 'future==0.18.2' try: from importlib.metadata import distribution except ImportError: try: from importlib_metadata import distribution except ImportError: from pkg_resources import load_entry_point def importlib_load_entry_point(spec, group, name): ...
true
true
f72ec7cea5ff8e51a73eb0ada22fc04b55636c4f
9,232
py
Python
python/nagcat/unittests/test_notify.py
marineam/nagcat
445d0efe1fb2ec93c31d1f9d8fa0c0563189ffaf
[ "Apache-2.0" ]
null
null
null
python/nagcat/unittests/test_notify.py
marineam/nagcat
445d0efe1fb2ec93c31d1f9d8fa0c0563189ffaf
[ "Apache-2.0" ]
null
null
null
python/nagcat/unittests/test_notify.py
marineam/nagcat
445d0efe1fb2ec93c31d1f9d8fa0c0563189ffaf
[ "Apache-2.0" ]
null
null
null
# Copyright 2010 ITA Software, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
40.31441
102
0.603986
import re from twisted.trial import unittest from nagcat import notify import coil ENVIRONMENT_HOST = { 'NAGIOS_HOSTNAME': "localhost", 'NAGIOS_HOSTDISPLAYNAME': "localhost", 'NAGIOS_HOSTALIAS': "localhost", 'NAGIOS_HOSTADDRESS': "127.0.0.1", 'NAGIOS_HO...
true
true
f72ec7f9188135bc2abd9576d4b4c2d59ae7a487
569
py
Python
examples/basic/buildmesh.py
hadivafaii/vedo
15f9adbd36d25c0212cbd4eb0c15af54c19f3819
[ "CC0-1.0" ]
836
2020-06-14T02:38:12.000Z
2022-03-31T15:39:50.000Z
examples/basic/buildmesh.py
hadivafaii/vedo
15f9adbd36d25c0212cbd4eb0c15af54c19f3819
[ "CC0-1.0" ]
418
2020-06-14T10:51:32.000Z
2022-03-31T23:23:14.000Z
examples/basic/buildmesh.py
hadivafaii/vedo
15f9adbd36d25c0212cbd4eb0c15af54c19f3819
[ "CC0-1.0" ]
136
2020-06-14T02:26:41.000Z
2022-03-31T12:47:18.000Z
"""Manually build a mesh from points and faces""" from vedo import Mesh, printc, show verts = [(50,50,50), (70,40,50), (50,40,80), (80,70,50)] faces = [(0,1,2), (2,1,3), (1,0,3)] # (the first triangle face is formed by vertex 0, 1 and 2) # Build the polygonal Mesh object: mesh = Mesh([verts, faces]) mesh.backColor('v...
31.611111
58
0.648506
from vedo import Mesh, printc, show verts = [(50,50,50), (70,40,50), (50,40,80), (80,70,50)] faces = [(0,1,2), (2,1,3), (1,0,3)] mesh = Mesh([verts, faces]) mesh.backColor('violet').lineColor('tomato').lineWidth(2) labs = mesh.labels('id').c('black') printc('points():\n', mesh.points(), c=3) printc('faces(): \n', me...
true
true
f72ec8d5be139f6310464dc01e7c0f57e04b86ad
38
py
Python
tests/components/statsd/__init__.py
domwillcode/home-assistant
f170c80bea70c939c098b5c88320a1c789858958
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
tests/components/statsd/__init__.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
31,101
2020-03-02T13:00:16.000Z
2022-03-31T23:57:36.000Z
tests/components/statsd/__init__.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""Tests for the statsd component."""
19
37
0.684211
true
true
f72eca4472be03ec523013a1e2a1d617e258713b
590
py
Python
users/signals.py
kipkoech-msojo/project_website
137c8e100171dfda2f722a8e6d1079db87860a14
[ "MIT" ]
null
null
null
users/signals.py
kipkoech-msojo/project_website
137c8e100171dfda2f722a8e6d1079db87860a14
[ "MIT" ]
null
null
null
users/signals.py
kipkoech-msojo/project_website
137c8e100171dfda2f722a8e6d1079db87860a14
[ "MIT" ]
null
null
null
from django.dispatch import receiver from django.db.models.signals import post_save from .models import Profile from django.contrib.auth.models import User @receiver(post_save, sender=User) def create_user_profile(sender, instance, created, **kwargs): if created: Profile.objects.create(user=instance) @re...
31.052632
61
0.732203
from django.dispatch import receiver from django.db.models.signals import post_save from .models import Profile from django.contrib.auth.models import User @receiver(post_save, sender=User) def create_user_profile(sender, instance, created, **kwargs): if created: Profile.objects.create(user=instance) @re...
false
true
f72eca7ec01c7f98779fd742ed2f63dd47c2895f
1,623
py
Python
client/fmcmds/env_shell.py
AlexRogalskiy/caastle
bb832c6828c6e97ac18d58ac0f23d8f61ff7bec3
[ "Apache-2.0" ]
19
2017-09-01T03:42:00.000Z
2018-01-25T09:53:59.000Z
client/fmcmds/env_shell.py
mrhm-dev/caastle
bb832c6828c6e97ac18d58ac0f23d8f61ff7bec3
[ "Apache-2.0" ]
34
2017-08-30T14:11:16.000Z
2017-12-16T01:52:44.000Z
client/fmcmds/env_shell.py
AlexRogalskiy/caastle
bb832c6828c6e97ac18d58ac0f23d8f61ff7bec3
[ "Apache-2.0" ]
4
2019-01-20T22:04:59.000Z
2022-01-09T02:25:35.000Z
import ast import json import readline from cliff.command import Command import call_server as server class EnvironmentShell(Command): def get_parser(self, prog_name): parser = super(EnvironmentShell, self).get_parser(prog_name) parser.add_argument(dest='env_name', h...
37.744186
95
0.59581
import ast import json import readline from cliff.command import Command import call_server as server class EnvironmentShell(Command): def get_parser(self, prog_name): parser = super(EnvironmentShell, self).get_parser(prog_name) parser.add_argument(dest='env_name', h...
true
true
f72ecb13aa6024c6caa779e5cb7893e409d32f30
10,988
py
Python
xview/models/unetv2.py
mayankj/xView2-Solution
804aa15a3d9f28c7c1d73e50ce0ed0c359a0493e
[ "MIT" ]
null
null
null
xview/models/unetv2.py
mayankj/xView2-Solution
804aa15a3d9f28c7c1d73e50ce0ed0c359a0493e
[ "MIT" ]
null
null
null
xview/models/unetv2.py
mayankj/xView2-Solution
804aa15a3d9f28c7c1d73e50ce0ed0c359a0493e
[ "MIT" ]
null
null
null
from functools import partial from typing import List, Union, Callable import torch from pytorch_toolbelt.modules import ABN, ACT_RELU, ACT_SWISH from pytorch_toolbelt.modules import encoders as E from pytorch_toolbelt.modules.decoders import DecoderModule from pytorch_toolbelt.modules.encoders import EncoderMo...
38.554386
117
0.650983
from functools import partial from typing import List, Union, Callable import torch from pytorch_toolbelt.modules import ABN, ACT_RELU, ACT_SWISH from pytorch_toolbelt.modules import encoders as E from pytorch_toolbelt.modules.decoders import DecoderModule from pytorch_toolbelt.modules.encoders import EncoderMo...
true
true
f72ecbbcaf235e8b00e8f6b45bc705145e916d73
107,466
py
Python
TEST_PROJET-1.0-pc/renpy/display/core.py
Dune0lyn/otome
e365b474e7df3f76ccc0853fd1665f6529a59304
[ "CC0-1.0" ]
null
null
null
TEST_PROJET-1.0-pc/renpy/display/core.py
Dune0lyn/otome
e365b474e7df3f76ccc0853fd1665f6529a59304
[ "CC0-1.0" ]
null
null
null
TEST_PROJET-1.0-pc/renpy/display/core.py
Dune0lyn/otome
e365b474e7df3f76ccc0853fd1665f6529a59304
[ "CC0-1.0" ]
null
null
null
# Copyright 2004-2019 Tom Rothamel <pytom@bishoujo.us> # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including without limitation the rights to use, copy, modify, m...
29.801997
175
0.56845
from __future__ import print_function import renpy.display import renpy.audio import renpy.text import renpy.test import pygame_sdl2 as pygame import sys import os import time import cStringIO import threading import copy import gc import inspect import_time = time.time() try: import android except: andr...
true
true
f72ecbc1483d9983735ec38c6681592f9d32e01b
2,625
py
Python
code/python/echomesh/base/Path.py
silky/echomesh
2fe5a00a79c215b4aca4083e5252fcdcbd0507aa
[ "MIT" ]
1
2019-06-27T11:34:13.000Z
2019-06-27T11:34:13.000Z
code/python/echomesh/base/Path.py
silky/echomesh
2fe5a00a79c215b4aca4083e5252fcdcbd0507aa
[ "MIT" ]
null
null
null
code/python/echomesh/base/Path.py
silky/echomesh
2fe5a00a79c215b4aca4083e5252fcdcbd0507aa
[ "MIT" ]
null
null
null
from __future__ import absolute_import, division, print_function, unicode_literals from echomesh.base import MakeEmptyProject from echomesh.base import Platform import getpass import os import os.path import sys ECHOMESH_EXTERNALS_OVERRIDE_SYSTEM_PACKAGES = True # If this is True, you want Echomesh to use its own ex...
28.846154
82
0.719238
from __future__ import absolute_import, division, print_function, unicode_literals from echomesh.base import MakeEmptyProject from echomesh.base import Platform import getpass import os import os.path import sys ECHOMESH_EXTERNALS_OVERRIDE_SYSTEM_PACKAGES = True CODE_PATH = os.path.abspath(sys.path[0]) EXTERNAL_COD...
true
true
f72eccac332916dcfea55705b3733758b36e79f1
3,779
py
Python
third_party/gsutil/third_party/httplib2/python2/httplib2/test/miniserver.py
tingshao/catapult
a8fe19e0c492472a8ed5710be9077e24cc517c5c
[ "BSD-3-Clause" ]
2,151
2020-04-18T07:31:17.000Z
2022-03-31T08:39:18.000Z
third_party/gsutil/third_party/httplib2/python2/httplib2/test/miniserver.py
tingshao/catapult
a8fe19e0c492472a8ed5710be9077e24cc517c5c
[ "BSD-3-Clause" ]
4,640
2015-07-08T16:19:08.000Z
2019-12-02T15:01:27.000Z
third_party/gsutil/third_party/httplib2/python2/httplib2/test/miniserver.py
tingshao/catapult
a8fe19e0c492472a8ed5710be9077e24cc517c5c
[ "BSD-3-Clause" ]
698
2015-06-02T19:18:35.000Z
2022-03-29T16:57:15.000Z
import logging import os import select import SimpleHTTPServer import socket import SocketServer import threading HERE = os.path.dirname(__file__) logger = logging.getLogger(__name__) class ThisDirHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): def translate_path(self, path): path = path.split('?', 1...
33.149123
79
0.629796
import logging import os import select import SimpleHTTPServer import socket import SocketServer import threading HERE = os.path.dirname(__file__) logger = logging.getLogger(__name__) class ThisDirHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): def translate_path(self, path): path = path.split('?', 1...
true
true
f72ece2577e1c7ce79389ad64b2bed43d07b14b5
9,235
py
Python
wildlifelicensing/apps/applications/migrations/0001_initial.py
jawaidm/wildlifelicensing
87e8e9ab163e0d7bbb0c7a654a13ce8a4d8fcf82
[ "Apache-2.0" ]
null
null
null
wildlifelicensing/apps/applications/migrations/0001_initial.py
jawaidm/wildlifelicensing
87e8e9ab163e0d7bbb0c7a654a13ce8a4d8fcf82
[ "Apache-2.0" ]
11
2019-03-19T02:03:11.000Z
2019-05-31T07:20:59.000Z
wildlifelicensing/apps/applications/migrations/0001_initial.py
jawaidm/wildlifelicensing
87e8e9ab163e0d7bbb0c7a654a13ce8a4d8fcf82
[ "Apache-2.0" ]
2
2020-08-10T10:17:10.000Z
2021-10-31T23:20:53.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-06-10 08:47 from __future__ import unicode_literals import django.contrib.postgres.fields.jsonb from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] ...
67.408759
666
0.63216
from __future__ import unicode_literals import django.contrib.postgres.fields.jsonb from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Ap...
true
true
f72ece5f6adcb5d43dae9e1a19b386550d5d1375
1,895
py
Python
azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/usage_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2022-03-30T22:39:15.000Z
2022-03-30T22:39:15.000Z
azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/usage_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
54
2016-03-25T17:25:01.000Z
2018-10-22T17:27:54.000Z
azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/usage_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
2
2017-01-20T18:25:46.000Z
2017-05-12T21:31:47.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
34.454545
82
0.594195
from msrest.serialization import Model class Usage(Model): _validation = { 'unit': {'required': True, 'constant': True}, 'current_value': {'required': True}, 'limit': {'required': True}, 'name': {'required': True}, } _attribute_map = { 'unit': {'key': 'unit', 'ty...
true
true
f72ecf12d2a5bde9b692d56fb3192d8e48a7530b
1,188
py
Python
pylinux/system_file/rc_local.py
ruiruige/pylinux
a0a85e8928d7847c0596b21c9213bc7863037297
[ "MIT" ]
null
null
null
pylinux/system_file/rc_local.py
ruiruige/pylinux
a0a85e8928d7847c0596b21c9213bc7863037297
[ "MIT" ]
null
null
null
pylinux/system_file/rc_local.py
ruiruige/pylinux
a0a85e8928d7847c0596b21c9213bc7863037297
[ "MIT" ]
null
null
null
# /usr/bin/env python # coding=utf-8 from pylinux.common.file_config.rc_local_file_config import RcLocalFileConfig from pylinux.common.modifier.rc_local_modifier import RcLocalModifier from pylinux.common.acessor.rc_local_accessor import RcLocalAccessor from pylinux.system_file.base_system_file import BaseSystemFile f...
33.942857
100
0.733165
from pylinux.common.file_config.rc_local_file_config import RcLocalFileConfig from pylinux.common.modifier.rc_local_modifier import RcLocalModifier from pylinux.common.acessor.rc_local_accessor import RcLocalAccessor from pylinux.system_file.base_system_file import BaseSystemFile from pylinux.exception.name_not_valid_...
true
true
f72ecf9d4483c1074b236e04b5a5c073a285db26
1,233
py
Python
MinecraftServer/views.py
TN-1/ServerStatus
fcb9a2bddf06cc83edfb7fcf7b7535d22ff6f6bf
[ "MIT" ]
null
null
null
MinecraftServer/views.py
TN-1/ServerStatus
fcb9a2bddf06cc83edfb7fcf7b7535d22ff6f6bf
[ "MIT" ]
null
null
null
MinecraftServer/views.py
TN-1/ServerStatus
fcb9a2bddf06cc83edfb7fcf7b7535d22ff6f6bf
[ "MIT" ]
null
null
null
from django.shortcuts import render from mcstatus import MinecraftServer from MinecraftServer.models import MCServer, Admin # Create your views here. def index(request): server = [] status = [] servers = MCServer.objects.all() for srv in servers: server.append(srv) try: if s...
42.517241
125
0.605839
from django.shortcuts import render from mcstatus import MinecraftServer from MinecraftServer.models import MCServer, Admin def index(request): server = [] status = [] servers = MCServer.objects.all() for srv in servers: server.append(srv) try: if srv.IPaddress: ...
false
true
f72ed12b9dd621b1fa7446c773458608d1e04750
6,036
py
Python
gui/widgets/listbox.py
bartcerneels/micropython-micro-gui
5ed42f918d5fb9796d2a013977b00c01a64c2158
[ "MIT" ]
null
null
null
gui/widgets/listbox.py
bartcerneels/micropython-micro-gui
5ed42f918d5fb9796d2a013977b00c01a64c2158
[ "MIT" ]
null
null
null
gui/widgets/listbox.py
bartcerneels/micropython-micro-gui
5ed42f918d5fb9796d2a013977b00c01a64c2158
[ "MIT" ]
null
null
null
# listbox.py Extension to ugui providing the Listbox class # Released under the MIT License (MIT). See LICENSE. # Copyright (c) 2021 Peter Hinch # 12 Sep 21 Support for scrolling. from gui.core.ugui import Widget, display from gui.core.colors import * dolittle = lambda *_ : None # Behaviour has issues compared to ...
37.962264
102
0.567594
from gui.core.ugui import Widget, display from gui.core.colors import * dolittle = lambda *_ : None class Listbox(Widget): ON_MOVE = 1 ON_LEAVE = 2 @staticmethod def dimensions(writer, elements, dlines): entry_height = writer.height + 2 dlines = len(elements)...
true
true
f72ed18097959bb4697efab08240d8e8fb10e5cf
2,166
py
Python
cloudbaseinit/tests/utils/test_debiface.py
jstopinsek/bsd-cloudinit
57fb6a6367447102118ff8901bb93d7581d4ca13
[ "Apache-2.0" ]
74
2015-01-07T17:03:43.000Z
2022-02-06T17:08:54.000Z
cloudbaseinit/tests/utils/test_debiface.py
jstopinsek/bsd-cloudinit
57fb6a6367447102118ff8901bb93d7581d4ca13
[ "Apache-2.0" ]
26
2015-02-13T11:32:05.000Z
2020-11-13T15:02:03.000Z
cloudbaseinit/tests/utils/test_debiface.py
jstopinsek/bsd-cloudinit
57fb6a6367447102118ff8901bb93d7581d4ca13
[ "Apache-2.0" ]
40
2015-01-22T17:12:03.000Z
2021-12-09T20:37:35.000Z
# Copyright 2014 Cloudbase Solutions Srl # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
33.84375
78
0.662973
import unittest from cloudbaseinit.metadata.services import base as service_base from cloudbaseinit.tests.metadata import fake_json_response from cloudbaseinit.utils import debiface class TestInterfacesParser(unittest.TestCase): def setUp(self): date = "2013-04-04" content = fake_json_response...
true
true
f72ed31f1f958ed758de28189f10278aab1054fa
727
py
Python
users/serializers.py
gbleigh5/Library-backend
3ab938a17411c06b68285a45a8b535ba05afb387
[ "CC0-1.0" ]
null
null
null
users/serializers.py
gbleigh5/Library-backend
3ab938a17411c06b68285a45a8b535ba05afb387
[ "CC0-1.0" ]
6
2021-03-19T01:06:25.000Z
2021-09-22T18:47:10.000Z
users/serializers.py
gbleigh5/Library-backend
3ab938a17411c06b68285a45a8b535ba05afb387
[ "CC0-1.0" ]
null
null
null
from rest_framework import serializers from django.contrib.auth import get_user_model from .models import BorrowedBook class UserSerializer(serializers.ModelSerializer): class Meta: model = get_user_model() fields = ['id', 'email', 'first_name', 'last_name', 'phone'] class BorrowedBookSerializer(s...
34.619048
93
0.729023
from rest_framework import serializers from django.contrib.auth import get_user_model from .models import BorrowedBook class UserSerializer(serializers.ModelSerializer): class Meta: model = get_user_model() fields = ['id', 'email', 'first_name', 'last_name', 'phone'] class BorrowedBookSerializer(s...
true
true
f72ed3a16a6afdb8aef7e5df2b36580380cf2269
6,680
py
Python
EngineRules/setuptools-20.10.1/setup.py
hubertokf/lupsContextServer
4f3cd2ef0ddc9a62f408de168caf42be770aed69
[ "MIT" ]
2
2017-05-23T12:05:28.000Z
2018-05-08T20:38:23.000Z
EngineRules/setuptools-20.10.1/setup.py
hubertokf/lupsContextServer
4f3cd2ef0ddc9a62f408de168caf42be770aed69
[ "MIT" ]
null
null
null
EngineRules/setuptools-20.10.1/setup.py
hubertokf/lupsContextServer
4f3cd2ef0ddc9a62f408de168caf42be770aed69
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ Distutils setup file, used to install or test 'setuptools' """ import io import os import sys import textwrap # Allow to run setup.py from another directory. os.chdir(os.path.dirname(os.path.abspath(__file__))) src_root = None from distutils.util import convert_path command_ns = {} init_p...
40.240964
123
0.655689
import io import os import sys import textwrap os.chdir(os.path.dirname(os.path.abspath(__file__))) src_root = None from distutils.util import convert_path command_ns = {} init_path = convert_path('setuptools/command/__init__.py') with open(init_path) as init_file: exec(init_file.read(), command_ns) SETUP_COM...
true
true
f72ed504ee5e9ff505fb85110a267350133c3f82
1,023
py
Python
4_utilization/utilization/urls.py
LIkelion-at-KOREATECH/LikeLion_Django_Study_Summary
c788182af5bcfd16bdd4b57235a48659758e494b
[ "MIT" ]
28
2019-10-15T13:15:26.000Z
2021-11-08T08:23:45.000Z
4_utilization/utilization/urls.py
jhleed/LikeLion_Django_Study_Summary
c788182af5bcfd16bdd4b57235a48659758e494b
[ "MIT" ]
null
null
null
4_utilization/utilization/urls.py
jhleed/LikeLion_Django_Study_Summary
c788182af5bcfd16bdd4b57235a48659758e494b
[ "MIT" ]
17
2019-09-09T00:15:36.000Z
2021-01-28T13:08:51.000Z
"""utilization URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-b...
36.535714
77
0.723363
from django.contrib import admin from django.urls import path, include import accounts.views from django.conf import settings from django.conf.urls.static import static urlpatterns = [ path('admin/', admin.site.urls), path('', accounts.views.index, name="index"), path('accounts/', include('allauth.urls'))...
true
true
f72ed5096c5ea0ad4c05289c8b57172cf413b939
665
py
Python
setup.py
Feneg/z5-tracker
4631b33cc6584efcbd8df7e7d635d6ff0b7064fe
[ "MIT" ]
2
2019-07-07T00:36:47.000Z
2020-05-11T10:48:42.000Z
setup.py
Feneg/z5-tracker
4631b33cc6584efcbd8df7e7d635d6ff0b7064fe
[ "MIT" ]
5
2019-02-09T09:58:06.000Z
2021-04-30T12:59:09.000Z
setup.py
Feneg/z5-tracker
4631b33cc6584efcbd8df7e7d635d6ff0b7064fe
[ "MIT" ]
1
2020-05-09T18:50:48.000Z
2020-05-09T18:50:48.000Z
import setuptools setuptools.setup( name='z5-tracker', version='1.2.1', author='Feneg', description='Helper program for Ocarina of Time randomiser', url='https://www.github.com/feneg/z5-tracker', packages=setuptools.find_packages(), include_package_data=True, classifiers=[ 'Deve...
30.227273
64
0.607519
import setuptools setuptools.setup( name='z5-tracker', version='1.2.1', author='Feneg', description='Helper program for Ocarina of Time randomiser', url='https://www.github.com/feneg/z5-tracker', packages=setuptools.find_packages(), include_package_data=True, classifiers=[ 'Deve...
true
true
f72ed55ad5ef38ef972e01b4b0f6447434a2d27e
1,831
py
Python
steambird/teacher/forms.py
rhbvkleef/SteamBird
6dbbad0750ef918872da18b813669282885b8f95
[ "BSD-3-Clause" ]
null
null
null
steambird/teacher/forms.py
rhbvkleef/SteamBird
6dbbad0750ef918872da18b813669282885b8f95
[ "BSD-3-Clause" ]
22
2020-11-27T19:05:34.000Z
2020-12-05T16:50:43.000Z
steambird/teacher/forms.py
rhbvkleef/SteamBird
6dbbad0750ef918872da18b813669282885b8f95
[ "BSD-3-Clause" ]
1
2020-11-27T21:08:15.000Z
2020-11-27T21:08:15.000Z
""" This module contains all forms used in the teacher Views """ from django import forms from django.forms import HiddenInput, MultipleHiddenInput from django.urls import reverse_lazy from django_addanother.widgets import AddAnotherWidgetWrapper from django_select2.forms import ModelSelect2MultipleWidget from stea...
30.516667
78
0.588749
from django import forms from django.forms import HiddenInput, MultipleHiddenInput from django.urls import reverse_lazy from django_addanother.widgets import AddAnotherWidgetWrapper from django_select2.forms import ModelSelect2MultipleWidget from steambird.models.materials import StudyMaterialEdition from steambird...
true
true
f72ed5c8bcb24075d3aff50b80d0f1369dcafefb
12,123
py
Python
cms/test_utils/testcases.py
jinktv/django-cms
d8c689957f0d098a106829e896e0c91d0c1abd86
[ "BSD-3-Clause" ]
null
null
null
cms/test_utils/testcases.py
jinktv/django-cms
d8c689957f0d098a106829e896e0c91d0c1abd86
[ "BSD-3-Clause" ]
1
2021-03-19T15:46:42.000Z
2021-03-19T15:46:42.000Z
cms/test_utils/testcases.py
jinktv/django-cms
d8c689957f0d098a106829e896e0c91d0c1abd86
[ "BSD-3-Clause" ]
1
2016-11-07T01:42:14.000Z
2016-11-07T01:42:14.000Z
# -*- coding: utf-8 -*- from cms.models import Page from cms.test_utils.util.context_managers import (UserLoginContext, SettingsOverride) from django.conf import settings from django.contrib.auth.models import AnonymousUser from django.core.exceptions import ObjectDoesNotExist from django.core.urlresolvers import r...
35.866864
107
0.635156
from cms.models import Page from cms.test_utils.util.context_managers import (UserLoginContext, SettingsOverride) from django.conf import settings from django.contrib.auth.models import AnonymousUser from django.core.exceptions import ObjectDoesNotExist from django.core.urlresolvers import reverse from django.templ...
false
true
f72ed60ac026397d696947159bb11c0de6f0aad9
5,247
py
Python
var/spack/repos/builtin/packages/xrootd/package.py
MiddelkoopT/spack
4d94c4c4600f42a7a3bb3d06ec879140bc259304
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/xrootd/package.py
MiddelkoopT/spack
4d94c4c4600f42a7a3bb3d06ec879140bc259304
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/xrootd/package.py
MiddelkoopT/spack
4d94c4c4600f42a7a3bb3d06ec879140bc259304
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Xrootd(CMakePackage): """The XROOTD project aims at giving high performance, scalable fau...
46.848214
112
0.684772
from spack import * class Xrootd(CMakePackage): homepage = "http://xrootd.org" url = "http://xrootd.org/download/v5.0.1/xrootd-5.0.1.tar.gz" version('5.0.1', sha256='ff4462b0b61db4cc01dda0e26abdd78e43649ee7ac5e90f7a05b74328ff5ac83') version('4.12.3', sha256='6f2ca1accc8d49d605706bb556777c75386...
true
true
f72ed67b5fe1b20f3cdf6654c9891e80bdd774e0
2,002
py
Python
shapSD/feature_explainer/global_explainer.py
XiaoqiMa/shapSD
545f61c9e8329c7271051f22f99ba32508ba74a1
[ "MIT" ]
2
2019-06-26T21:31:03.000Z
2019-06-27T16:59:58.000Z
shapSD/feature_explainer/global_explainer.py
XiaoqiMa/shapSD
545f61c9e8329c7271051f22f99ba32508ba74a1
[ "MIT" ]
null
null
null
shapSD/feature_explainer/global_explainer.py
XiaoqiMa/shapSD
545f61c9e8329c7271051f22f99ba32508ba74a1
[ "MIT" ]
null
null
null
""" provide global explanation methods author: Xiaoqi date: 2019.10.29 """ from .feature_importance import * from .shap_explainer import ShapExplainer class GlobalExplainer(object): def __init__(self, x_train, y_train, model): """ Initialize a feature global explainer :param x_train: inpu...
37.773585
105
0.676823
from .feature_importance import * from .shap_explainer import ShapExplainer class GlobalExplainer(object): def __init__(self, x_train, y_train, model): self.x_train = x_train self.y_train = y_train self.model = model def permutation_importance(self, use_eli5=False): feature_i...
true
true
f72ed6bd8cbd39180af1615ae392cf981ff63a32
4,411
py
Python
absl/flags/tests/_flag_test.py
alexhagen/abseil-py
240f85b0fa45acd95ca0157146245e7fb5453337
[ "Apache-2.0" ]
null
null
null
absl/flags/tests/_flag_test.py
alexhagen/abseil-py
240f85b0fa45acd95ca0157146245e7fb5453337
[ "Apache-2.0" ]
null
null
null
absl/flags/tests/_flag_test.py
alexhagen/abseil-py
240f85b0fa45acd95ca0157146245e7fb5453337
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 The Abseil Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
32.674074
79
0.717751
from __future__ import absolute_import from __future__ import division from __future__ import print_function from absl._enum_module import enum from absl.flags import _argument_parser from absl.flags import _exceptions from absl.flags import _flag from absl.testing import absltest from absl.testing import parameteri...
true
true
f72ed6f3f3b067f75edf1591df918110a3cd1d90
71
py
Python
bin/run.py
Team-De-bug/Anti-Viral-Protocol
6b8634432bfddda581aff6112a5b96fc1b9df5fd
[ "MIT" ]
1
2022-01-28T03:54:19.000Z
2022-01-28T03:54:19.000Z
bin/run.py
Team-De-bug/Anti-Viral-Protocol
6b8634432bfddda581aff6112a5b96fc1b9df5fd
[ "MIT" ]
null
null
null
bin/run.py
Team-De-bug/Anti-Viral-Protocol
6b8634432bfddda581aff6112a5b96fc1b9df5fd
[ "MIT" ]
1
2022-02-17T19:57:45.000Z
2022-02-17T19:57:45.000Z
#!/usr/bin/env python from anti_viral_protocol import main main.run()
14.2
36
0.774648
from anti_viral_protocol import main main.run()
true
true
f72ed76a2412ba2f6fbe6587e6f523c5dadb2346
6,881
py
Python
aioredis/util.py
tclarke/aioredis
d42dd9144ea376b8230786040972419b3ffab3c6
[ "MIT" ]
null
null
null
aioredis/util.py
tclarke/aioredis
d42dd9144ea376b8230786040972419b3ffab3c6
[ "MIT" ]
null
null
null
aioredis/util.py
tclarke/aioredis
d42dd9144ea376b8230786040972419b3ffab3c6
[ "MIT" ]
null
null
null
import asyncio import sys from urllib.parse import urlparse, parse_qsl from .log import logger _NOTSET = object() IS_PY38 = sys.version_info >= (3, 8) # NOTE: never put here anything else; # just this basic types _converters = { bytes: lambda val: val, bytearray: lambda val: val, str: lambda val:...
27.8583
79
0.608923
import asyncio import sys from urllib.parse import urlparse, parse_qsl from .log import logger _NOTSET = object() IS_PY38 = sys.version_info >= (3, 8) _converters = { bytes: lambda val: val, bytearray: lambda val: val, str: lambda val: val.encode(), int: lambda val: b'%d' % val, float: lambda v...
true
true
f72ed7c91647a2ffe95753344f2a7f08a78ecf34
1,683
py
Python
example/iris-data-classifier/ML-React-App-Template/service/model_generator.py
adelmuursepp/ML-React-App-Template
d0afed66b8dd037464edc39b1be7709b6207e834
[ "MIT" ]
null
null
null
example/iris-data-classifier/ML-React-App-Template/service/model_generator.py
adelmuursepp/ML-React-App-Template
d0afed66b8dd037464edc39b1be7709b6207e834
[ "MIT" ]
5
2021-03-10T17:10:21.000Z
2021-10-06T16:34:17.000Z
example/iris-data-classifier/ML-React-App-Template/service/model_generator.py
adelmuursepp/ML-React-App-Template
d0afed66b8dd037464edc39b1be7709b6207e834
[ "MIT" ]
null
null
null
# Import libraries import numpy as np print('imported numpy') from sklearn.model_selection import train_test_split from sklearn.tree import DecisionTreeClassifier from sklearn.externals import joblib import pandas as pd #Otsustuspuud from sklearn.tree import DecisionTreeClassifier print('imported all') data_tabl...
25.5
108
0.764112
import numpy as np print('imported numpy') from sklearn.model_selection import train_test_split from sklearn.tree import DecisionTreeClassifier from sklearn.externals import joblib import pandas as pd from sklearn.tree import DecisionTreeClassifier print('imported all') data_table = pd.read_csv('postags_lemmas_l...
true
true
f72ed89ef91faf30d9d61698bce073331a1ee00a
1,185
py
Python
google/ads/google_ads/v6/services/search_term_view_service_client_config.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v6/services/search_term_view_service_client_config.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v6/services/search_term_view_service_client_config.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
null
null
null
config = { "interfaces": { "google.ads.googleads.v6.services.SearchTermViewService": { "retry_codes": { "retry_policy_1_codes": [ "UNAVAILABLE", "DEADLINE_EXCEEDED" ], "no_retry_codes": [] }, "retry_params": { "retry_policy_1_params": { ...
28.902439
63
0.562025
config = { "interfaces": { "google.ads.googleads.v6.services.SearchTermViewService": { "retry_codes": { "retry_policy_1_codes": [ "UNAVAILABLE", "DEADLINE_EXCEEDED" ], "no_retry_codes": [] }, "retry_params": { "retry_policy_1_params": { ...
true
true
f72ed8da97fec762efa00349e44eae5dbdee44f0
1,233
py
Python
src/python/pants/core/goals/fmt_integration_test.py
thamenato/pants
bc4a8fb3f07f6145649f02b06a1e5599aa28b36c
[ "Apache-2.0" ]
null
null
null
src/python/pants/core/goals/fmt_integration_test.py
thamenato/pants
bc4a8fb3f07f6145649f02b06a1e5599aa28b36c
[ "Apache-2.0" ]
null
null
null
src/python/pants/core/goals/fmt_integration_test.py
thamenato/pants
bc4a8fb3f07f6145649f02b06a1e5599aa28b36c
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import re from pants.testutil.pants_integration_test import ( ensure_daemon, run_pants_with_workdir, temporary_workdir, ) from pants.util.contextutil import overwrite_file_con...
30.073171
101
0.612328
import re from pants.testutil.pants_integration_test import ( ensure_daemon, run_pants_with_workdir, temporary_workdir, ) from pants.util.contextutil import overwrite_file_content from pants.util.dirutil import read_file @ensure_daemon def test_fmt_then_edit(): f = "examples/src/python/example/hello...
true
true
f72ed91758bdb810aba2360a35143bf14981d80f
1,179
py
Python
XINDEXScript.py
JimDeanSpivey/ATF-for-Vista-FOIA
fbc07e98e307dee192fa1ca8cbf0137895376847
[ "Apache-2.0" ]
1
2015-12-10T20:45:34.000Z
2015-12-10T20:45:34.000Z
XINDEXScript.py
JimDeanSpivey/ATF-for-Vista-FOIA
fbc07e98e307dee192fa1ca8cbf0137895376847
[ "Apache-2.0" ]
null
null
null
XINDEXScript.py
JimDeanSpivey/ATF-for-Vista-FOIA
fbc07e98e307dee192fa1ca8cbf0137895376847
[ "Apache-2.0" ]
null
null
null
import sys sys.path = [sys.argv[7] + '/lib/vista'] + sys.path from OSEHRAHelper import ConnectToMUMPS,PROMPT VistA=ConnectToMUMPS(sys.argv[1],sys.argv[3],sys.argv[4]) if (sys.argv[5] and sys.argv[6]): VistA.login(sys.argv[5],sys.argv[6]) if VistA.type=='cache': try: VistA.ZN(sys.argv[4]) except IndexError,n...
25.085106
57
0.649703
import sys sys.path = [sys.argv[7] + '/lib/vista'] + sys.path from OSEHRAHelper import ConnectToMUMPS,PROMPT VistA=ConnectToMUMPS(sys.argv[1],sys.argv[3],sys.argv[4]) if (sys.argv[5] and sys.argv[6]): VistA.login(sys.argv[5],sys.argv[6]) if VistA.type=='cache': try: VistA.ZN(sys.argv[4]) except IndexError,n...
false
true
f72ed91db2e8e38da901631f369f411c385dca7e
1,057
py
Python
ryu/app/simulation/test.py
yuesir137/SDN-CLB
58b12a9412cffdf2945440528b1885c8899edd08
[ "Apache-2.0" ]
null
null
null
ryu/app/simulation/test.py
yuesir137/SDN-CLB
58b12a9412cffdf2945440528b1885c8899edd08
[ "Apache-2.0" ]
null
null
null
ryu/app/simulation/test.py
yuesir137/SDN-CLB
58b12a9412cffdf2945440528b1885c8899edd08
[ "Apache-2.0" ]
null
null
null
import math import os import queue import random import threading import time from pprint import pprint from networkx import DiGraph from Node import Switch class my_thread(threading.Thread): def __init__(self): threading.Thread.__init__(self) self.flow_queue = [] def run(self) -> None: ...
19.218182
45
0.689688
import math import os import queue import random import threading import time from pprint import pprint from networkx import DiGraph from Node import Switch class my_thread(threading.Thread): def __init__(self): threading.Thread.__init__(self) self.flow_queue = [] def run(self) -> None: ...
true
true
f72eda0648c579ea231b336ff3104e38d1b2f1b9
777
py
Python
CursoEmVideo/Mundo_3/Aula # 16 - Tuplas/aula16_exe#73.py
heloisaldanha/PythonExercises
877c11fcd37911e85d2ed5f008e72ef5b8f6b0f7
[ "MIT" ]
null
null
null
CursoEmVideo/Mundo_3/Aula # 16 - Tuplas/aula16_exe#73.py
heloisaldanha/PythonExercises
877c11fcd37911e85d2ed5f008e72ef5b8f6b0f7
[ "MIT" ]
null
null
null
CursoEmVideo/Mundo_3/Aula # 16 - Tuplas/aula16_exe#73.py
heloisaldanha/PythonExercises
877c11fcd37911e85d2ed5f008e72ef5b8f6b0f7
[ "MIT" ]
null
null
null
''' Crie uma tupla preenchida com os 20 times do brasileirão da série A na ordem de colocação. Depois mostre: a: Os 5 primeiros colocados b: Os últimos 4 colocados c: times em ordem alfabética d: em que posição está o time da Chapecoense? ''' times = ('Corinthians', 'Palmeiras', 'Santos', 'Grêmio', 'Cruzeiro', 'Flamen...
45.705882
92
0.683398
times = ('Corinthians', 'Palmeiras', 'Santos', 'Grêmio', 'Cruzeiro', 'Flamengo', 'Vasco', 'Chapecoense', 'Atlético-MG', 'Botafogo', 'Atlético-PR', 'Bahia', 'São Paulo', 'Fluminense', 'Sport', 'Vitória', 'Coritiba', 'Avaí', 'Ponte Preta', 'Atlético-GO') print('Os 5 primeiros colocados são: {}'.format(...
true
true
f72edb8b6c0044eda2bec7da52e82df5b9432d92
80,572
py
Python
exp/views/responses.py
manybabies/MBAH-LookIt-API
18474ceac3dcc8365a5559cf84e9f460671993f5
[ "MIT" ]
9
2018-06-26T17:15:27.000Z
2021-11-21T17:19:01.000Z
exp/views/responses.py
manybabies/MBAH-LookIt-API
18474ceac3dcc8365a5559cf84e9f460671993f5
[ "MIT" ]
496
2018-02-19T19:18:24.000Z
2022-03-31T17:01:16.000Z
exp/views/responses.py
manybabies/MBAH-LookIt-API
18474ceac3dcc8365a5559cf84e9f460671993f5
[ "MIT" ]
16
2018-07-06T23:35:39.000Z
2021-11-21T17:52:58.000Z
import io import json import zipfile from functools import cached_property from typing import Callable, Dict, KeysView, List, NamedTuple, Set, Union import requests from django.contrib import messages from django.contrib.auth.mixins import UserPassesTestMixin from django.core.exceptions import ObjectDoesNotExist, Susp...
40.529175
135
0.624957
import io import json import zipfile from functools import cached_property from typing import Callable, Dict, KeysView, List, NamedTuple, Set, Union import requests from django.contrib import messages from django.contrib.auth.mixins import UserPassesTestMixin from django.core.exceptions import ObjectDoesNotExist, Susp...
true
true
f72edc7d2c194fe94d3f029b4088fafe7afdce75
3,944
py
Python
CellModeller/GUI/PyGLCMViewer.py
pakpoomton/CellmodellerShadow
c3fdc0aa41ca2cbd56a3eae168e27312a5c0c185
[ "BSD-3-Clause" ]
null
null
null
CellModeller/GUI/PyGLCMViewer.py
pakpoomton/CellmodellerShadow
c3fdc0aa41ca2cbd56a3eae168e27312a5c0c185
[ "BSD-3-Clause" ]
null
null
null
CellModeller/GUI/PyGLCMViewer.py
pakpoomton/CellmodellerShadow
c3fdc0aa41ca2cbd56a3eae168e27312a5c0c185
[ "BSD-3-Clause" ]
null
null
null
import PyQt4 from PyQt4 import QtCore, QtGui from PyQt4.Qt import Qt from PyQt4.QtCore import QObject, QTimer, pyqtSignal, pyqtSlot from PyGLWidget import PyGLWidget from OpenGL.GL import * from OpenGL.GLU import * from CellModeller.Regulation import ModuleRegulator from CellModeller.Simulator import Simulator from Ce...
26.648649
86
0.556288
import PyQt4 from PyQt4 import QtCore, QtGui from PyQt4.Qt import Qt from PyQt4.QtCore import QObject, QTimer, pyqtSignal, pyqtSlot from PyGLWidget import PyGLWidget from OpenGL.GL import * from OpenGL.GLU import * from CellModeller.Regulation import ModuleRegulator from CellModeller.Simulator import Simulator from Ce...
true
true
f72edcdbbb2b57a739aa3dd65eb9b81da1a7a756
245
py
Python
kubetools/dev/__main__.py
EDITD/kubetools
3a87ed3b233aed152af9e52a4c1d5844a9c26437
[ "MIT" ]
5
2020-04-20T21:24:14.000Z
2022-01-29T15:35:02.000Z
kubetools/dev/__main__.py
EDITD/kubetools
3a87ed3b233aed152af9e52a4c1d5844a9c26437
[ "MIT" ]
69
2019-12-17T16:16:21.000Z
2022-03-23T11:19:49.000Z
kubetools/dev/__main__.py
EDITD/kubetools
3a87ed3b233aed152af9e52a4c1d5844a9c26437
[ "MIT" ]
1
2022-01-14T04:12:15.000Z
2022-01-14T04:12:15.000Z
#!/usr/bin/env python from kubetools.dev import dev from kubetools.main import run_cli # Import click command groups from kubetools.dev import ( # noqa: F401, I100, I202 container, environment, logs, scripts, ) run_cli(dev)
15.3125
53
0.706122
from kubetools.dev import dev from kubetools.main import run_cli from kubetools.dev import ( container, environment, logs, scripts, ) run_cli(dev)
true
true
f72edd75707f96cb22c318119a9cfc892b3341ff
4,296
py
Python
scripts/strong.py
gonidelis/task-bench
06f1adef6183405bec0a267c686fb67baeafc8d1
[ "Apache-2.0" ]
23
2018-08-31T03:51:08.000Z
2021-10-21T08:01:44.000Z
scripts/strong.py
gonidelis/task-bench
06f1adef6183405bec0a267c686fb67baeafc8d1
[ "Apache-2.0" ]
30
2018-06-27T19:45:53.000Z
2022-03-23T04:26:11.000Z
scripts/strong.py
gonidelis/task-bench
06f1adef6183405bec0a267c686fb67baeafc8d1
[ "Apache-2.0" ]
26
2018-05-29T22:56:59.000Z
2022-01-27T18:54:26.000Z
#!/usr/bin/env python3 # Copyright 2020 Stanford University # # 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...
40.914286
162
0.649209
import argparse import collections import csv import os import sys import chart_util as util class Parser(util.Parser): def __init__(self, ngraphs, dependence, system, max_problem_size, min_problem_size, csv_dialect): self.ngraphs = ngraphs self.dependence = dependence.replace('_', ' ') ...
true
true
f72ede905c2f5340f78dfcbe8efc10e27b0246a4
2,910
py
Python
lab-10-2-mnist_nn.py
Garsiet/MchLE
4afca0328a5710f16fa08f22b38431a6e84e6910
[ "MIT" ]
12
2018-03-07T00:44:56.000Z
2019-01-25T11:07:43.000Z
lab-10-2-mnist_nn.py
Garsiet/MchLE
4afca0328a5710f16fa08f22b38431a6e84e6910
[ "MIT" ]
3
2018-03-02T03:38:41.000Z
2018-03-20T00:45:06.000Z
lab-10-2-mnist_nn.py
Garsiet/MchLE
4afca0328a5710f16fa08f22b38431a6e84e6910
[ "MIT" ]
7
2018-03-02T07:14:53.000Z
2019-01-04T08:06:47.000Z
# Lab 10 MNIST and NN import tensorflow as tf import random # import matplotlib.pyplot as plt from tensorflow.examples.tutorials.mnist import input_data tf.set_random_seed(777) # reproducibility mnist = input_data.read_data_sets("MNIST_data/", one_hot=True) # Check out https://www.tensorflow.org/get_started/mnist/b...
30.631579
78
0.713746
import tensorflow as tf import random from tensorflow.examples.tutorials.mnist import input_data tf.set_random_seed(777) mnist = input_data.read_data_sets("MNIST_data/", one_hot=True) learning_rate = 0.001 training_epochs = 15 batch_size = 100 X = tf.placeholder(tf.float32, [None, 784]) Y = tf.placeholder(tf.floa...
true
true
f72edefdeaa956c002a8aa8310ace417a58e9aff
5,653
py
Python
Smach/executive_smach_tutorials/scripts/usecase_01/executive_step_06.py
OxRAMSociety/RobotArm
8a402ac06e23b4447d59a0d1d0e3065da6a2591a
[ "MIT" ]
3
2021-12-30T21:56:58.000Z
2022-02-20T11:19:12.000Z
Smach/executive_smach_tutorials/scripts/usecase_01/executive_step_06.py
OxRAMSociety/RobotArm
8a402ac06e23b4447d59a0d1d0e3065da6a2591a
[ "MIT" ]
10
2021-11-13T21:18:33.000Z
2022-03-11T23:11:23.000Z
Smach/executive_smach_tutorials/scripts/usecase_01/executive_step_06.py
OxRAMSociety/RobotArm
8a402ac06e23b4447d59a0d1d0e3065da6a2591a
[ "MIT" ]
2
2022-02-06T11:24:43.000Z
2022-02-09T20:13:40.000Z
#!/usr/bin/env python3 """ Description: Usage: $> roslaunch turtle_nodes.launch $> ./executive_step_06.py Output: [INFO] : State machine starting in initial state 'RESET' with userdata: [INFO] : State machine transitioning 'RESET':'succeeded'-->'SPAWN' [INFO] : State machine transition...
39.809859
111
0.61401
import rospy import threading from math import sqrt, pow import smach from smach import StateMachine, ServiceState, SimpleActionState, MonitorState, IntrospectionServer, Concurrence import std_srvs.srv import turtlesim.srv import turtlesim.msg import turtle_actionlib.msg def main(): rospy.init_node('smach_use...
true
true
f72edff35f01d27c9da2c2eae2c4065b8bc7ba12
146
py
Python
elastica/rigidbody/__init__.py
yeonsu-jung/PyElastica
fee87b9da22e310ff925c16fdc839bf8405c51a4
[ "MIT" ]
71
2020-04-15T17:02:42.000Z
2022-03-26T04:53:51.000Z
elastica/rigidbody/__init__.py
yeonsu-jung/PyElastica
fee87b9da22e310ff925c16fdc839bf8405c51a4
[ "MIT" ]
59
2020-05-15T03:51:46.000Z
2022-03-28T13:53:01.000Z
elastica/rigidbody/__init__.py
yeonsu-jung/PyElastica
fee87b9da22e310ff925c16fdc839bf8405c51a4
[ "MIT" ]
57
2020-06-17T20:34:02.000Z
2022-03-16T08:09:54.000Z
__all__ = ["RigidBodyBase", "Cylinder", "Sphere"] from .rigid_body import RigidBodyBase from .cylinder import Cylinder from .sphere import Sphere
29.2
49
0.787671
__all__ = ["RigidBodyBase", "Cylinder", "Sphere"] from .rigid_body import RigidBodyBase from .cylinder import Cylinder from .sphere import Sphere
true
true
f72ee0a79d6772df7fd35864b092bd02cfb99099
8,117
py
Python
apps/recon.py
bell-one/pifuhd
3221d266a042ad58de702e65e588ada5426b08f6
[ "MIT" ]
null
null
null
apps/recon.py
bell-one/pifuhd
3221d266a042ad58de702e65e588ada5426b08f6
[ "MIT" ]
null
null
null
apps/recon.py
bell-one/pifuhd
3221d266a042ad58de702e65e588ada5426b08f6
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. import sys import os sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) ROOT_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) import time import json import numpy as np import cv2 import random ...
36.075556
127
0.637797
import sys import os sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) ROOT_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) import time import json import numpy as np import cv2 import random import torch import torch.nn as nn from tqdm import tqdm from torch.util...
true
true
f72ee1276e038c14fc8978d9c956dd65a321b3bd
1,588
py
Python
hooks/yaml_plugin/pytest_yamlsound.py
Mjboothaus/intro-to-pytest
23cfdc6058a10b14a43b5682d82f2f9aadbb6cec
[ "Apache-2.0" ]
null
null
null
hooks/yaml_plugin/pytest_yamlsound.py
Mjboothaus/intro-to-pytest
23cfdc6058a10b14a43b5682d82f2f9aadbb6cec
[ "Apache-2.0" ]
null
null
null
hooks/yaml_plugin/pytest_yamlsound.py
Mjboothaus/intro-to-pytest
23cfdc6058a10b14a43b5682d82f2f9aadbb6cec
[ "Apache-2.0" ]
null
null
null
import yaml, pytest def pytest_collect_file(parent, path): if path.ext == ".yml" and path.basename.startswith("test"): return YamlFile.from_parent(parent, fspath=path) class YamlException(Exception): """Custom exception for error reporting.""" class YamlFile(pytest.File): def collect(self): ...
31.76
66
0.61398
import yaml, pytest def pytest_collect_file(parent, path): if path.ext == ".yml" and path.basename.startswith("test"): return YamlFile.from_parent(parent, fspath=path) class YamlException(Exception): class YamlFile(pytest.File): def collect(self): raw = yaml.safe_load(self.fspath.open()) ...
true
true
f72ee154024e635c3e3a687f0aa84471ed485cdc
594
py
Python
Free Response Test Directory/freeresponse.py
ds-modules/ECON-101B
e63a45e881f093e143aa871a390e58115a749c12
[ "MIT" ]
19
2017-11-06T03:19:37.000Z
2020-12-05T07:20:52.000Z
Free Response Test Directory/freeresponse.py
ds-modules/ECON-101B
e63a45e881f093e143aa871a390e58115a749c12
[ "MIT" ]
1
2017-07-27T17:58:38.000Z
2017-11-02T07:22:44.000Z
Free Response Test Directory/freeresponse.py
ds-modules/ECON-101B
e63a45e881f093e143aa871a390e58115a749c12
[ "MIT" ]
4
2017-12-27T11:05:48.000Z
2021-03-08T17:12:11.000Z
import json import os files = os.listdir() for file in files: if file.endswith('.ipynb'): answers = '' with open(file) as data: nb = json.load(data) for cell in nb['cells']: if cell['cell_type'] == 'markdown': if 'source' in cell and len(cell['sour...
37.125
83
0.476431
import json import os files = os.listdir() for file in files: if file.endswith('.ipynb'): answers = '' with open(file) as data: nb = json.load(data) for cell in nb['cells']: if cell['cell_type'] == 'markdown': if 'source' in cell and len(cell['sour...
true
true
f72ee175ab02cfd09b428ee248b15c9490ae2b60
4,403
py
Python
fsl/hila_fsl_file_prep.py
HilaGast/FT
e5d3940ea585d98741bd9e42f47b9e49a4b6ee6f
[ "Apache-2.0" ]
1
2020-09-23T00:57:20.000Z
2020-09-23T00:57:20.000Z
fsl/hila_fsl_file_prep.py
HilaGast/FT
e5d3940ea585d98741bd9e42f47b9e49a4b6ee6f
[ "Apache-2.0" ]
null
null
null
fsl/hila_fsl_file_prep.py
HilaGast/FT
e5d3940ea585d98741bd9e42f47b9e49a4b6ee6f
[ "Apache-2.0" ]
null
null
null
import os subj_name = r'GaHi_subj01/' mprage_file_name = r'20181224_160154T1ws002a1001.nii' first_charmed_file_name = r'f20181224_160154ep2dadvdiffD59d155000s005a001_01.nii' # for aal #atlas_template = r'C:\Users\Admin\my_scripts\aal\origin\AAL_highres_template.nii' #atlas_template = atlas_template.replace('C:', '/mn...
41.537736
156
0.712242
import os subj_name = r'GaHi_subj01/' mprage_file_name = r'20181224_160154T1ws002a1001.nii' first_charmed_file_name = r'f20181224_160154ep2dadvdiffD59d155000s005a001_01.nii' atlas_template = r'C:\Users\Admin\my_scripts\aal\megaatlas\MegaAtla_Template.nii' atlas_template = atlas_template.replace('C:', '/mnt/c') atlas_...
true
true
f72ee19e4a5aeceed8da6d03d596230a32b33ef5
7,332
py
Python
jref/test/test_pointer.py
biochimia/python-json-reference
f7c54a7e9b92a12e781d6d8b5f6762e0113337c7
[ "Apache-2.0" ]
null
null
null
jref/test/test_pointer.py
biochimia/python-json-reference
f7c54a7e9b92a12e781d6d8b5f6762e0113337c7
[ "Apache-2.0" ]
1
2021-05-28T13:39:14.000Z
2021-05-28T13:39:14.000Z
jref/test/test_pointer.py
biochimia/python-jref
f7c54a7e9b92a12e781d6d8b5f6762e0113337c7
[ "Apache-2.0" ]
null
null
null
import unittest import jref.pointer as error from jref.pointer import Pointer class TestPointer(unittest.TestCase): def setUp(self): self.sentinel = object() def check_pointer_is_sentinel(self, pointer, document): self.check_pointer_equal(document, pointer, self.sentinel) def check_poi...
37.6
79
0.598882
import unittest import jref.pointer as error from jref.pointer import Pointer class TestPointer(unittest.TestCase): def setUp(self): self.sentinel = object() def check_pointer_is_sentinel(self, pointer, document): self.check_pointer_equal(document, pointer, self.sentinel) def check_poi...
true
true
f72ee435673a5217151a45861e9d332977bb5797
26,728
py
Python
pysph/sph/rigid_body.py
rahulgovind/pysph
3d493e6f2c5284ea9c0f0d008e4eb9a0870da0d9
[ "BSD-3-Clause" ]
1
2019-03-11T12:42:56.000Z
2019-03-11T12:42:56.000Z
pysph/sph/rigid_body.py
rahulgovind/pysph
3d493e6f2c5284ea9c0f0d008e4eb9a0870da0d9
[ "BSD-3-Clause" ]
1
2018-11-17T15:39:11.000Z
2018-11-17T15:39:11.000Z
pysph/sph/rigid_body.py
rahulgovind/pysph
3d493e6f2c5284ea9c0f0d008e4eb9a0870da0d9
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """Rigid body related equations. """ from pysph.base.reduce_array import parallel_reduce_array from pysph.sph.equation import Equation from pysph.sph.integrator_step import IntegratorStep import numpy as np import numpy from math import sqrt def skew(vec): import sympy as S x, y, z = v...
34.666667
79
0.531877
from pysph.base.reduce_array import parallel_reduce_array from pysph.sph.equation import Equation from pysph.sph.integrator_step import IntegratorStep import numpy as np import numpy from math import sqrt def skew(vec): import sympy as S x, y, z = vec[0], vec[1], vec[2] return S.Matrix([[0, -z, y], [z, 0,...
true
true