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
1c27cd28b8cbd5eade9afc573ae7b0cb9d7c01ba
4,080
py
Python
myproxy/oauth/source/myproxyoauth/__init__.py
chrisburr/gct
26b739dbdedbc7c693d26aa31202de40af5391fa
[ "Apache-2.0" ]
44
2015-02-04T22:01:05.000Z
2021-01-27T21:18:47.000Z
myproxy/oauth/source/myproxyoauth/__init__.py
chrisburr/gct
26b739dbdedbc7c693d26aa31202de40af5391fa
[ "Apache-2.0" ]
108
2017-11-01T20:22:38.000Z
2022-03-25T18:33:20.000Z
myproxy/oauth/source/myproxyoauth/__init__.py
chrisburr/gct
26b739dbdedbc7c693d26aa31202de40af5391fa
[ "Apache-2.0" ]
51
2015-04-07T14:29:47.000Z
2021-09-23T08:44:18.000Z
# # Copyright 2010-2011 University of Chicago # # 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...
34.576271
80
0.568137
from myproxyoauth.database import init_db init_db() import logging, sys import os import pkgutil import myproxyoauth.templates import myproxyoauth.static logging.basicConfig(stream=sys.stderr) __path__ = pkgutil.extend_path(__path__, __name__) class MyProxyOAuth(object): logger = logging.getLog...
false
true
1c27cd5f5bfc380cd284613d082bf0df751fd64e
43,000
py
Python
utils.py
jiangycTarheel/Compositional-Auxseq
e4645a92c21c893cd320eb186c19d392bc147b43
[ "MIT" ]
8
2021-10-02T00:08:27.000Z
2022-02-15T17:23:14.000Z
utils.py
jiangycTarheel/compositional-auxseq
e4645a92c21c893cd320eb186c19d392bc147b43
[ "MIT" ]
null
null
null
utils.py
jiangycTarheel/compositional-auxseq
e4645a92c21c893cd320eb186c19d392bc147b43
[ "MIT" ]
null
null
null
import os import json import gzip from copy import deepcopy, copy import numpy as np import csv import torch import torch.nn as nn import torch.nn.functional as F from torch.utils.data import Dataset, DataLoader, RandomSampler from transformers.tokenization_utils import trim_batch class LabelSmoothingLoss(nn.Module)...
49.768519
158
0.548721
import os import json import gzip from copy import deepcopy, copy import numpy as np import csv import torch import torch.nn as nn import torch.nn.functional as F from torch.utils.data import Dataset, DataLoader, RandomSampler from transformers.tokenization_utils import trim_batch class LabelSmoothingLoss(nn.Module)...
true
true
1c27cd6ebed3b20ef30b7b1d467287cf6d18f007
131
py
Python
odoo-13.0/addons/phone_validation/tools/__init__.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
null
null
null
odoo-13.0/addons/phone_validation/tools/__init__.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
null
null
null
odoo-13.0/addons/phone_validation/tools/__init__.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from . import phone_validation
26.2
74
0.725191
from . import phone_validation
true
true
1c27cd9e3fd03995bf3e52107e187e07c8d0ff72
30,231
py
Python
metasearch/views.py
suzanagi/materials-researchactivity-uoa-2020-public-metasearch-mosaicsearch_publication
37553698e6f778b313922dca23c4ed40530d8f31
[ "MIT" ]
null
null
null
metasearch/views.py
suzanagi/materials-researchactivity-uoa-2020-public-metasearch-mosaicsearch_publication
37553698e6f778b313922dca23c4ed40530d8f31
[ "MIT" ]
null
null
null
metasearch/views.py
suzanagi/materials-researchactivity-uoa-2020-public-metasearch-mosaicsearch_publication
37553698e6f778b313922dca23c4ed40530d8f31
[ "MIT" ]
null
null
null
from django.shortcuts import render from django.template import loader from django.http import HttpResponse from . import forms import random import copy import pathlib import urllib.request import time import json from time import gmtime, strftime from bs4 import BeautifulSoup from metasearch.models import ResultItem ...
33.891256
206
0.620754
from django.shortcuts import render from django.template import loader from django.http import HttpResponse from . import forms import random import copy import pathlib import urllib.request import time import json from time import gmtime, strftime from bs4 import BeautifulSoup from metasearch.models import ResultItem ...
true
true
1c27cde61b0bdfbea01b4c474eee0c2d90b0882e
5,189
py
Python
nazurin/bot.py
amber6hua/nazurin
3c67a6fcfc9f55e7481a0569554d92a0e6dea1ac
[ "MIT" ]
170
2020-07-31T09:41:22.000Z
2022-03-29T14:03:43.000Z
nazurin/bot.py
amber6hua/nazurin
3c67a6fcfc9f55e7481a0569554d92a0e6dea1ac
[ "MIT" ]
31
2020-10-06T17:45:31.000Z
2022-03-26T02:45:39.000Z
nazurin/bot.py
amber6hua/nazurin
3c67a6fcfc9f55e7481a0569554d92a0e6dea1ac
[ "MIT" ]
84
2020-08-09T09:11:21.000Z
2022-03-29T05:34:58.000Z
import asyncio from typing import List, Optional from aiogram import Bot from aiogram.types import ChatActions, InputFile, InputMediaPhoto, Message from aiogram.types.message import ParseMode from aiogram.utils.exceptions import BadRequest from nazurin import config from nazurin.models import File, Illust, Image, Ugo...
39.915385
88
0.573906
import asyncio from typing import List, Optional from aiogram import Bot from aiogram.types import ChatActions, InputFile, InputMediaPhoto, Message from aiogram.types.message import ParseMode from aiogram.utils.exceptions import BadRequest from nazurin import config from nazurin.models import File, Illust, Image, Ugo...
true
true
1c27ce2ec0f7755af357bf53193404626dc43bfa
2,068
py
Python
geminidr/core/parameters_image.py
astrochun/DRAGONS
041cdeeaf3eca9751085f6e01222d48c8e63cd3c
[ "BSD-3-Clause" ]
1
2020-06-03T15:13:18.000Z
2020-06-03T15:13:18.000Z
geminidr/core/parameters_image.py
b1quint/DRAGONS
0f5814caaa791bda47edf00407722247095f8427
[ "BSD-3-Clause" ]
null
null
null
geminidr/core/parameters_image.py
b1quint/DRAGONS
0f5814caaa791bda47edf00407722247095f8427
[ "BSD-3-Clause" ]
null
null
null
# This parameter file contains the parameters related to the primitives located # in the primitives_image.py file, in alphabetical order. from gempy.library import config from astrodata import AstroData from geminidr.core import parameters_stack, parameters_photometry class fringeCorrectConfig(config.Config): suff...
54.421053
110
0.691006
from gempy.library import config from astrodata import AstroData from geminidr.core import parameters_stack, parameters_photometry class fringeCorrectConfig(config.Config): suffix = config.Field("Filename suffix", str, "_fringeCorrected", optional=True) fringe = config.ListField("Fringe frame to subtract", (...
true
true
1c27cf1bd04167deb61b686005bf310736c111d7
22,098
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_06_01/aio/operations/_inbound_nat_rules_operations.py
beltr0n/azure-sdk-for-python
2f7fb8bee881b0fc0386a0ad5385755ceedd0453
[ "MIT" ]
2
2021-03-24T06:26:11.000Z
2021-04-18T15:55:59.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_06_01/aio/operations/_inbound_nat_rules_operations.py
beltr0n/azure-sdk-for-python
2f7fb8bee881b0fc0386a0ad5385755ceedd0453
[ "MIT" ]
4
2019-04-17T17:57:49.000Z
2020-04-24T21:11:22.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_06_01/aio/operations/_inbound_nat_rules_operations.py
beltr0n/azure-sdk-for-python
2f7fb8bee881b0fc0386a0ad5385755ceedd0453
[ "MIT" ]
2
2021-05-23T16:46:31.000Z
2021-05-26T23:51:09.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 may ...
50.8
232
0.676803
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure....
true
true
1c27cfb775bdbbfa9e43d6621f030441ed0dbc65
1,240
py
Python
knn.py
amirshnll/Wine
673c879bbea6d0b5313f52f028ea983d0807830c
[ "MIT" ]
2
2021-06-03T20:28:46.000Z
2022-01-08T10:30:51.000Z
knn.py
amirshnll/Wine
673c879bbea6d0b5313f52f028ea983d0807830c
[ "MIT" ]
null
null
null
knn.py
amirshnll/Wine
673c879bbea6d0b5313f52f028ea983d0807830c
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # In[1]: # Author : Amir Shokri # github link : https://github.com/amirshnll/Wine # dataset link : http://archive.ics.uci.edu/ml/datasets/Wine # email : amirsh.nll@gmail.com # In[1]: import numpy as np import matplotlib.pyplot as plt import pandas as pd from sklearn.model_se...
14.418605
226
0.671774
import numpy as np import matplotlib.pyplot as plt import pandas as pd from sklearn.model_selection import train_test_split col_names = ['class', 'Alcohol', 'Malic acid', 'Ash', 'Alcalinity of ash', 'Magnesium', 'Total phenols', 'Flavanoids', ' Nonflavanoid phenols','Proanthocyanins','Color intensi...
true
true
1c27d08cc4ab48be75635d8953797fdce7034b8b
10,031
py
Python
test/test_request_plan_find.py
vericred/vericred-python
be45691c821a595c3d77a561b2ca33049b1239b4
[ "Apache-2.0" ]
3
2016-08-10T23:39:11.000Z
2021-08-25T02:39:39.000Z
test/test_request_plan_find.py
vericred/vericred-python
be45691c821a595c3d77a561b2ca33049b1239b4
[ "Apache-2.0" ]
2
2016-05-27T12:44:08.000Z
2016-08-24T18:19:36.000Z
test/test_request_plan_find.py
vericred/vericred-python
be45691c821a595c3d77a561b2ca33049b1239b4
[ "Apache-2.0" ]
4
2016-05-27T08:18:14.000Z
2021-08-25T02:41:18.000Z
# coding: utf-8 """ Vericred API Vericred's API allows you to search for Health Plans that a specific doctor accepts. ## Getting Started Visit our [Developer Portal](https://developers.vericred.com) to create an account. Once you have created an account, you can create one Application for Production and an...
40.124
228
0.667232
from __future__ import absolute_import import os import sys import unittest import vericred_client from vericred_client.rest import ApiException from vericred_client.models.request_plan_find import RequestPlanFind class TestRequestPlanFind(unittest.TestCase): def setUp(self): pass def tearDown(...
true
true
1c27d1e34ac0ecffa6f6ff3ad680a009fe0dd0a1
3,187
py
Python
tests/components/ovo_energy/test_config_flow.py
erogleva/core
994ae09f69afe772150a698953c0d7386a745de2
[ "Apache-2.0" ]
1
2020-10-15T10:45:39.000Z
2020-10-15T10:45:39.000Z
tests/components/ovo_energy/test_config_flow.py
erogleva/core
994ae09f69afe772150a698953c0d7386a745de2
[ "Apache-2.0" ]
34
2020-11-17T06:56:52.000Z
2022-03-31T06:03:35.000Z
tests/components/ovo_energy/test_config_flow.py
erogleva/core
994ae09f69afe772150a698953c0d7386a745de2
[ "Apache-2.0" ]
null
null
null
"""Test the OVO Energy config flow.""" import aiohttp from homeassistant import config_entries, data_entry_flow from homeassistant.components.ovo_energy.const import DOMAIN from homeassistant.const import CONF_PASSWORD, CONF_USERNAME from homeassistant.core import HomeAssistant from tests.async_mock import patch FIX...
35.021978
87
0.703797
import aiohttp from homeassistant import config_entries, data_entry_flow from homeassistant.components.ovo_energy.const import DOMAIN from homeassistant.const import CONF_PASSWORD, CONF_USERNAME from homeassistant.core import HomeAssistant from tests.async_mock import patch FIXTURE_USER_INPUT = {CONF_USERNAME: "exam...
true
true
1c27d335fd790c967af31d2a91609691a8fdfa26
129
py
Python
Python/polls/admin.py
MarsBighead/mustang
ffbaf109931557e40da2d97e4eb914bc1c0aba0d
[ "MIT" ]
4
2017-04-30T18:28:19.000Z
2018-12-08T15:46:37.000Z
Python/polls/admin.py
MarsBighead/mustang
ffbaf109931557e40da2d97e4eb914bc1c0aba0d
[ "MIT" ]
1
2021-09-22T20:11:36.000Z
2021-09-22T20:11:36.000Z
Python/polls/admin.py
MarsBighead/mustang
ffbaf109931557e40da2d97e4eb914bc1c0aba0d
[ "MIT" ]
null
null
null
from django.contrib import admin from polls.models import Question # Register your models here. admin.site.register(Question)
16.125
33
0.806202
from django.contrib import admin from polls.models import Question admin.site.register(Question)
true
true
1c27d34d89252ee6511112afd7049b2d31ea0bca
16,293
py
Python
src/tools/dev/masonry/masonry.py
eddieTest/visit
ae7bf6f5f16b01cf6b672d34e2d293fa7170616b
[ "BSD-3-Clause" ]
null
null
null
src/tools/dev/masonry/masonry.py
eddieTest/visit
ae7bf6f5f16b01cf6b672d34e2d293fa7170616b
[ "BSD-3-Clause" ]
null
null
null
src/tools/dev/masonry/masonry.py
eddieTest/visit
ae7bf6f5f16b01cf6b672d34e2d293fa7170616b
[ "BSD-3-Clause" ]
1
2020-03-18T23:17:43.000Z
2020-03-18T23:17:43.000Z
#!/usr/bin/env python # # file: core.py # author: Cyrus Harrison <cyrush@llnl.gov> # # import sys import os import subprocess import datetime import json import errno import webbrowser from os.path import join as pjoin __all__ = ["Context", "shell", "svn", "git", "cmake", ...
35.496732
111
0.498742
import sys import os import subprocess import datetime import json import errno import webbrowser from os.path import join as pjoin __all__ = ["Context", "shell", "svn", "git", "cmake", "make", "inorder", "view_log"] def mk...
false
true
1c27d42be8930707543a160e7bb167c2fa399af8
1,490
py
Python
python/ambilkesediaan.py
barliant/timetable
f78237dcf4b391b97e17162a4a3373d52dd8f7e9
[ "MIT" ]
null
null
null
python/ambilkesediaan.py
barliant/timetable
f78237dcf4b391b97e17162a4a3373d52dd8f7e9
[ "MIT" ]
null
null
null
python/ambilkesediaan.py
barliant/timetable
f78237dcf4b391b97e17162a4a3373d52dd8f7e9
[ "MIT" ]
null
null
null
from pydrive.auth import GoogleAuth from pydrive.drive import GoogleDrive gauth = GoogleAuth() gauth.LocalWebserverAuth() drive = GoogleDrive(gauth) #!/usr/bin/python import httplib2 import pprint from apiclient.discovery import build from apiclient.http import MediaFileUpload from oauth2client.clie...
28.113208
80
0.753691
from pydrive.auth import GoogleAuth from pydrive.drive import GoogleDrive gauth = GoogleAuth() gauth.LocalWebserverAuth() drive = GoogleDrive(gauth) import httplib2 import pprint from apiclient.discovery import build from apiclient.http import MediaFileUpload from oauth2client.client import OAuth2We...
false
true
1c27d44015c2b88c8104b6ab6831b15ab61eec35
3,251
py
Python
pandas/tests/sparse/frame/test_indexing.py
vimalromeo/pandas
7c14e4f14aff216be558bf5d4d2d00b4838c2360
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
69
2020-03-31T06:40:17.000Z
2022-02-25T11:48:18.000Z
venv/lib/python3.7/site-packages/pandas/tests/sparse/frame/test_indexing.py
John1001Song/Big-Data-Robo-Adviser
9444dce96954c546333d5aecc92a06c3bfd19aa5
[ "MIT" ]
8
2019-12-04T23:44:11.000Z
2022-02-10T08:31:40.000Z
venv/lib/python3.7/site-packages/pandas/tests/sparse/frame/test_indexing.py
John1001Song/Big-Data-Robo-Adviser
9444dce96954c546333d5aecc92a06c3bfd19aa5
[ "MIT" ]
28
2020-04-15T15:24:17.000Z
2021-12-26T04:05:02.000Z
import pytest import numpy as np from pandas import SparseDataFrame, DataFrame from pandas.util import testing as tm pytestmark = pytest.mark.skip("Wrong SparseBlock initialization (GH 17386)") @pytest.mark.parametrize('data', [ [[1, 1], [2, 2], [3, 3], [4, 4], [0, 0]], [[1.0, 1.0], [2.0, 2.0], [3.0, 3.0], ...
28.517544
76
0.609966
import pytest import numpy as np from pandas import SparseDataFrame, DataFrame from pandas.util import testing as tm pytestmark = pytest.mark.skip("Wrong SparseBlock initialization (GH 17386)") @pytest.mark.parametrize('data', [ [[1, 1], [2, 2], [3, 3], [4, 4], [0, 0]], [[1.0, 1.0], [2.0, 2.0], [3.0, 3.0], ...
true
true
1c27d471f25cda85a2d7d95bf5a2b7d09a0f504d
2,007
py
Python
exploder_test.py
pdericson/exploder
21bb15c2193df8200f72fbed400cb8f9c71e426b
[ "MIT" ]
null
null
null
exploder_test.py
pdericson/exploder
21bb15c2193df8200f72fbed400cb8f9c71e426b
[ "MIT" ]
null
null
null
exploder_test.py
pdericson/exploder
21bb15c2193df8200f72fbed400cb8f9c71e426b
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import unittest import exploder import openpyxl class TestExploder(unittest.TestCase): def test_test1(self): wb = openpyxl.load_workbook(filename='test1.xlsx') ws1 = wb['Sheet1'] try: ws2 = wb['Sheet2'] except KeyError: ws2 = wb...
29.514706
58
0.574489
import unittest import exploder import openpyxl class TestExploder(unittest.TestCase): def test_test1(self): wb = openpyxl.load_workbook(filename='test1.xlsx') ws1 = wb['Sheet1'] try: ws2 = wb['Sheet2'] except KeyError: ws2 = wb.copy_worksheet(ws1) ...
true
true
1c27d48461be47aa0f320a275c810d8384d5b27f
60,528
py
Python
inventory-script/oci_inventory.py
ruturajmolawade/oci-ansible-modules
e084d4faaa12e993d2f2022c8d6e8e894273edba
[ "Apache-2.0" ]
null
null
null
inventory-script/oci_inventory.py
ruturajmolawade/oci-ansible-modules
e084d4faaa12e993d2f2022c8d6e8e894273edba
[ "Apache-2.0" ]
null
null
null
inventory-script/oci_inventory.py
ruturajmolawade/oci-ansible-modules
e084d4faaa12e993d2f2022c8d6e8e894273edba
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright (c) 2018, 2020 Oracle and/or its affiliates. # This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Apache License v2.0 # See LICENSE.TXT f...
41.035932
120
0.580326
from __future__ import print_function import argparse import json import os import re import sys from time import time from ansible.module_utils import six from ansible.module_utils.six.moves import configparser from ansible.module_utils._text import to_bytes, to_text from ansible.module_utils.urls import open_...
true
true
1c27d4a4c3951318c4fd9a8d93d33de6bdf8501b
3,083
py
Python
boticordpy/webhook.py
SayHelloRoman/boticordpy
2cd2b607faf6ab51efa1b006dba9eb77e61f8dab
[ "MIT" ]
null
null
null
boticordpy/webhook.py
SayHelloRoman/boticordpy
2cd2b607faf6ab51efa1b006dba9eb77e61f8dab
[ "MIT" ]
null
null
null
boticordpy/webhook.py
SayHelloRoman/boticordpy
2cd2b607faf6ab51efa1b006dba9eb77e61f8dab
[ "MIT" ]
null
null
null
from aiohttp import web import aiohttp from discord.ext.commands import Bot, AutoShardedBot import sys if sys.version_info >= (3, 8): from typing import TypedDict else: from typing_extensions import TypedDict from aiohttp.web_urldispatcher import _WebHandler from typing import Dict, Union from . import Boti...
26.808696
99
0.589037
from aiohttp import web import aiohttp from discord.ext.commands import Bot, AutoShardedBot import sys if sys.version_info >= (3, 8): from typing import TypedDict else: from typing_extensions import TypedDict from aiohttp.web_urldispatcher import _WebHandler from typing import Dict, Union from . import Boti...
true
true
1c27d582cc6a5122f6456ad419d67a83ba674dc9
51,366
py
Python
tests/utilities/test_auto_restart.py
nils-werner/pytorch-lightning
f36b395c4eb4c8d113954d768444194b3729be28
[ "Apache-2.0" ]
null
null
null
tests/utilities/test_auto_restart.py
nils-werner/pytorch-lightning
f36b395c4eb4c8d113954d768444194b3729be28
[ "Apache-2.0" ]
null
null
null
tests/utilities/test_auto_restart.py
nils-werner/pytorch-lightning
f36b395c4eb4c8d113954d768444194b3729be28
[ "Apache-2.0" ]
null
null
null
# Copyright The PyTorch Lightning team. # # 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 i...
37.769118
121
0.695752
import math import os import random import random as python_random from collections import defaultdict from collections.abc import Iterable from contextlib import suppress from copy import deepcopy from dataclasses import asdict from typing import List, Optional from unittest import mock from unittest.mock...
true
true
1c27d5a14cf2f8ea09f903d5bdd33c48669cf3e6
7,655
py
Python
voting_pb2.py
turtle11311/fault-tolerance-pr1
1b363fdcbecffd0dafda1558eec2205ef9c6467f
[ "MIT" ]
null
null
null
voting_pb2.py
turtle11311/fault-tolerance-pr1
1b363fdcbecffd0dafda1558eec2205ef9c6467f
[ "MIT" ]
null
null
null
voting_pb2.py
turtle11311/fault-tolerance-pr1
1b363fdcbecffd0dafda1558eec2205ef9c6467f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: voting.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import message as _message from googl...
48.144654
1,912
0.792946
from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db = _symbol_database.Defa...
true
true
1c27d5d473509b0b85608f5c3c59ef36336e7b96
809
py
Python
Modules/morales_carlos/__manifest__.py
Carlosma7/Odoo
c234fcc18d15d4d8369e237286bee610fd76ceee
[ "CC0-1.0" ]
null
null
null
Modules/morales_carlos/__manifest__.py
Carlosma7/Odoo
c234fcc18d15d4d8369e237286bee610fd76ceee
[ "CC0-1.0" ]
null
null
null
Modules/morales_carlos/__manifest__.py
Carlosma7/Odoo
c234fcc18d15d4d8369e237286bee610fd76ceee
[ "CC0-1.0" ]
null
null
null
#_*_ coding: utf-8 -*- { 'name': "morales_carlos", 'summary': """ New Odoo app for samll contact book.""", 'description': """ Your objective is to implement a small contact book whose contacts can be added manually through a form (backend & frontend) or automatically through an XML file (a file upload for the ...
25.28125
114
0.686032
{ 'name': "morales_carlos", 'summary': """ New Odoo app for samll contact book.""", 'description': """ Your objective is to implement a small contact book whose contacts can be added manually through a form (backend & frontend) or automatically through an XML file (a file upload for the user in the backend). ...
true
true
1c27d62dd572e13c6f1b4686b74e8786c4bc99b5
3,156
py
Python
installations/forms.py
ehsanbarkhordar/PMM
85037e6d633e9b795076d44fd0befe5cc410cbb0
[ "Apache-2.0" ]
null
null
null
installations/forms.py
ehsanbarkhordar/PMM
85037e6d633e9b795076d44fd0befe5cc410cbb0
[ "Apache-2.0" ]
null
null
null
installations/forms.py
ehsanbarkhordar/PMM
85037e6d633e9b795076d44fd0befe5cc410cbb0
[ "Apache-2.0" ]
null
null
null
from django import forms from .models import Device from django.utils.translation import ugettext_lazy as _ class DeviceForm(forms.ModelForm): class Meta: model = Device exclude = ['operator_name', 'datetime'] voltage_range = range(0, 300) amper_range = range(0, 1200) not_in_range_error = 'عدد...
35.460674
74
0.624208
from django import forms from .models import Device from django.utils.translation import ugettext_lazy as _ class DeviceForm(forms.ModelForm): class Meta: model = Device exclude = ['operator_name', 'datetime'] voltage_range = range(0, 300) amper_range = range(0, 1200) not_in_range_error = 'عدد...
true
true
1c27d663676da98167be661f78f46b883bc36dca
382
py
Python
profiles_api/migrations/0007_auto_20220113_0033.py
MohamedAboubasha/profiles-rest-api
0e5ede6b4771396c9f3399d05be06c19b9ac1530
[ "MIT" ]
null
null
null
profiles_api/migrations/0007_auto_20220113_0033.py
MohamedAboubasha/profiles-rest-api
0e5ede6b4771396c9f3399d05be06c19b9ac1530
[ "MIT" ]
null
null
null
profiles_api/migrations/0007_auto_20220113_0033.py
MohamedAboubasha/profiles-rest-api
0e5ede6b4771396c9f3399d05be06c19b9ac1530
[ "MIT" ]
null
null
null
# Generated by Django 2.2 on 2022-01-13 00:33 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('profiles_api', '0006_profilefeeditem'), ] operations = [ migrations.RenameField( model_name='profilefeeditem', old_name='statu...
20.105263
49
0.60733
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('profiles_api', '0006_profilefeeditem'), ] operations = [ migrations.RenameField( model_name='profilefeeditem', old_name='statuc_text', new_name='status_text', ...
true
true
1c27d6a92ad672440edf1029564a8a60cb17d65d
238
py
Python
callable_enum/callable_enum.py
cloew/CallableEnum
c49fb91c90907298f8354607dd750c0e4d5ea3be
[ "MIT" ]
null
null
null
callable_enum/callable_enum.py
cloew/CallableEnum
c49fb91c90907298f8354607dd750c0e4d5ea3be
[ "MIT" ]
null
null
null
callable_enum/callable_enum.py
cloew/CallableEnum
c49fb91c90907298f8354607dd750c0e4d5ea3be
[ "MIT" ]
null
null
null
from enum import Enum class CallableEnum(Enum): """ Helper class to allow Callable Attributes """ def __call__(self, *args, **kwargs): """ Call the value function """ return self.value(*args, **kwargs)
29.75
54
0.609244
from enum import Enum class CallableEnum(Enum): def __call__(self, *args, **kwargs): return self.value(*args, **kwargs)
true
true
1c27d9282bc7f417d1a041e452846ef7ddd984a8
625
py
Python
AATCC/lab-report/w12/code/LeetCode_104.py
kancheng/kan-cs-report-in-2022
2a1e1eaa515349d59803c7831a7bd4cbea890a44
[ "MIT" ]
null
null
null
AATCC/lab-report/w12/code/LeetCode_104.py
kancheng/kan-cs-report-in-2022
2a1e1eaa515349d59803c7831a7bd4cbea890a44
[ "MIT" ]
null
null
null
AATCC/lab-report/w12/code/LeetCode_104.py
kancheng/kan-cs-report-in-2022
2a1e1eaa515349d59803c7831a7bd4cbea890a44
[ "MIT" ]
null
null
null
# Definition for a binary tree node. class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: def maxDepth(self, root): """ :type root: TreeNode :rtype: int """ if root is None: return 0 ...
25
79
0.5696
class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: def maxDepth(self, root): if root is None: return 0 else: return max(self.maxDepth(root.left), self.maxDepth(root.right)) + 1 if __name__ == '...
true
true
1c27d99db7fc48ce46684ac7917af104acb56bdf
2,571
py
Python
insta/migrations/0001_initial.py
alphonce-otieno-odhiambo/IG.C
40ad2319549014e9fb60ef2b9d29f2d2ea3466fa
[ "MIT" ]
null
null
null
insta/migrations/0001_initial.py
alphonce-otieno-odhiambo/IG.C
40ad2319549014e9fb60ef2b9d29f2d2ea3466fa
[ "MIT" ]
null
null
null
insta/migrations/0001_initial.py
alphonce-otieno-odhiambo/IG.C
40ad2319549014e9fb60ef2b9d29f2d2ea3466fa
[ "MIT" ]
null
null
null
# Generated by Django 3.2.9 on 2021-12-08 21:32 import cloudinary.models from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappabl...
42.147541
143
0.596266
import cloudinary.models from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ...
true
true
1c27db59cfd52fd9bccd6261ef21e6bde0b6379b
5,941
py
Python
nets/Xception.py
SyangZ007/deeplabv3-plus-keras
ebbb1f155917807fb7fc70a9fde20593817cd4b2
[ "MIT" ]
null
null
null
nets/Xception.py
SyangZ007/deeplabv3-plus-keras
ebbb1f155917807fb7fc70a9fde20593817cd4b2
[ "MIT" ]
null
null
null
nets/Xception.py
SyangZ007/deeplabv3-plus-keras
ebbb1f155917807fb7fc70a9fde20593817cd4b2
[ "MIT" ]
null
null
null
from tensorflow.keras import layers from tensorflow.keras.layers import (Activation, BatchNormalization, Conv2D, DepthwiseConv2D, ZeroPadding2D) def _conv2d_same(x, filters, prefix, stride=1, kernel_size=3, rate=1): # 计算padding的数量,hw是否需要收缩 if stride == 1: return Conv2...
42.435714
107
0.5627
from tensorflow.keras import layers from tensorflow.keras.layers import (Activation, BatchNormalization, Conv2D, DepthwiseConv2D, ZeroPadding2D) def _conv2d_same(x, filters, prefix, stride=1, kernel_size=3, rate=1): if stride == 1: return Conv2D(filters, ...
true
true
1c27dbe5d638b1f11d5b715e903f19f261b70d58
118
py
Python
myphotos/admin.py
dadisigursveinn/VEF-Lokaverkefni
a862124b0958738a106e938d9ae95060f0cabec9
[ "BSD-3-Clause" ]
null
null
null
myphotos/admin.py
dadisigursveinn/VEF-Lokaverkefni
a862124b0958738a106e938d9ae95060f0cabec9
[ "BSD-3-Clause" ]
null
null
null
myphotos/admin.py
dadisigursveinn/VEF-Lokaverkefni
a862124b0958738a106e938d9ae95060f0cabec9
[ "BSD-3-Clause" ]
null
null
null
from django.contrib import admin # Register your models here. from .models import Photos admin.site.register(Photos)
23.6
32
0.805085
from django.contrib import admin from .models import Photos admin.site.register(Photos)
true
true
1c27dc400bc29a3ea4dfc3560460275ae1ef68f5
84,724
py
Python
django/contrib/admin/options.py
vpoulailleau/django
02365d3f38a64a5c2f3e932f23925a381d5bb151
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
django/contrib/admin/options.py
vpoulailleau/django
02365d3f38a64a5c2f3e932f23925a381d5bb151
[ "PSF-2.0", "BSD-3-Clause" ]
11
2020-03-24T15:46:05.000Z
2022-03-11T23:20:58.000Z
django/contrib/admin/options.py
vpoulailleau/django
02365d3f38a64a5c2f3e932f23925a381d5bb151
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
import copy import json import operator from collections import OrderedDict from functools import partial, reduce, update_wrapper from urllib.parse import quote as urlquote from django import forms from django.conf import settings from django.contrib import messages from django.contrib.admin import helpers, widgets fr...
41.612967
118
0.614607
import copy import json import operator from collections import OrderedDict from functools import partial, reduce, update_wrapper from urllib.parse import quote as urlquote from django import forms from django.conf import settings from django.contrib import messages from django.contrib.admin import helpers, widgets fr...
true
true
1c27dc4ec5a6b332134c535b6a2b43f05b10a484
1,647
py
Python
script/service/pre_processors.py
zhuxiangning/query_clickhouse
839675fff951d6a8aa1628336225572882911c74
[ "MIT" ]
null
null
null
script/service/pre_processors.py
zhuxiangning/query_clickhouse
839675fff951d6a8aa1628336225572882911c74
[ "MIT" ]
1
2021-02-16T11:45:26.000Z
2021-02-27T02:18:43.000Z
script/service/pre_processors.py
zhuxiangning/query_clickhouse
839675fff951d6a8aa1628336225572882911c74
[ "MIT" ]
5
2021-02-07T13:14:44.000Z
2021-04-30T01:48:59.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Python 3.7 # @Time : 2021/2/6 13:58 # @Author : 'Lou Zehua' # @File : pre_processors.py # Notes: Function name can will be called bye eval(). Recommend a name pattern similar to the unit name. # e.g. 'pre_process_' + UNIT_NAME.replace('-', '_') def pre_process...
30.5
112
0.651488
def pre_process_test(s, config_obj): return {} def pre_process_action_statistical_characteristics(s, config_obj): repo_ids = [] banned_actor_ids = [] for it in config_obj.repos: repo_ids.append(it.id) for it in config_obj.banned_actors: repo_ids.append(it.id) repo_ids...
true
true
1c27dd0781c840fdb2924ad05ad53389b47af637
1,372
py
Python
ckanext/issues/tests/views/test_show.py
apteksdi/ckanext-issues
479246da2916c942646cb37469bae4cc1ae746aa
[ "MIT" ]
1
2021-09-17T05:27:29.000Z
2021-09-17T05:27:29.000Z
ckanext/issues/tests/views/test_show.py
apteksdi/ckanext-issues
479246da2916c942646cb37469bae4cc1ae746aa
[ "MIT" ]
null
null
null
ckanext/issues/tests/views/test_show.py
apteksdi/ckanext-issues
479246da2916c942646cb37469bae4cc1ae746aa
[ "MIT" ]
2
2022-02-02T03:15:51.000Z
2022-03-07T10:00:41.000Z
import pytest from ckan.plugins import toolkit from ckan.tests import helpers from ckan.tests import factories from ckanext.issues.tests import factories as issue_factories from ckanext.issues.tests.fixtures import issues_setup, user class TestIssuesShowController(object): @pytest.mark.usefixtures("clean_db", "...
35.179487
67
0.569242
import pytest from ckan.plugins import toolkit from ckan.tests import helpers from ckan.tests import factories from ckanext.issues.tests import factories as issue_factories from ckanext.issues.tests.fixtures import issues_setup, user class TestIssuesShowController(object): @pytest.mark.usefixtures("clean_db", "...
true
true
1c27dd4fe3d5086110452db02d637c2eeca2c394
1,601
py
Python
packages/augur-core/tests/test_augur.py
mjgiannelli/augur
c10763a8a184132fde8cf9c003f1dbf26c15a8e4
[ "MIT" ]
null
null
null
packages/augur-core/tests/test_augur.py
mjgiannelli/augur
c10763a8a184132fde8cf9c003f1dbf26c15a8e4
[ "MIT" ]
null
null
null
packages/augur-core/tests/test_augur.py
mjgiannelli/augur
c10763a8a184132fde8cf9c003f1dbf26c15a8e4
[ "MIT" ]
null
null
null
#!/usr/bin/env python from eth_tester.exceptions import TransactionFailed from pytest import raises, fixture as pytest_fixture def test_is_known_universe(augur, universe): assert augur.isKnownUniverse(universe.address) assert not augur.isKnownUniverse(augur.address) def test_known_universe_child_creation_fa...
33.354167
120
0.773267
from eth_tester.exceptions import TransactionFailed from pytest import raises, fixture as pytest_fixture def test_is_known_universe(augur, universe): assert augur.isKnownUniverse(universe.address) assert not augur.isKnownUniverse(augur.address) def test_known_universe_child_creation_failure(augur): wit...
true
true
1c27ddce258c2cec8f574460cc9a6975de9539ba
1,410
py
Python
ckeditor/fields.py
industrydive/django-ckeditor
206cda10a25da0bf0670abd4ad4ac54bccded971
[ "BSD-3-Clause" ]
null
null
null
ckeditor/fields.py
industrydive/django-ckeditor
206cda10a25da0bf0670abd4ad4ac54bccded971
[ "BSD-3-Clause" ]
17
2015-06-01T21:32:08.000Z
2020-02-19T15:52:10.000Z
ckeditor/fields.py
industrydive/django-ckeditor
206cda10a25da0bf0670abd4ad4ac54bccded971
[ "BSD-3-Clause" ]
1
2018-01-07T00:36:51.000Z
2018-01-07T00:36:51.000Z
from __future__ import absolute_import from django.db import models from django import forms from ckeditor.widgets import CKEditorWidget class RichTextField(models.TextField): def __init__(self, *args, **kwargs): self.config_name = kwargs.pop("config_name", "default") self.extra_plugins = kwargs....
39.166667
156
0.719149
from __future__ import absolute_import from django.db import models from django import forms from ckeditor.widgets import CKEditorWidget class RichTextField(models.TextField): def __init__(self, *args, **kwargs): self.config_name = kwargs.pop("config_name", "default") self.extra_plugins = kwargs....
true
true
1c27ddd21fc36ae24110f3aceea5850845ba9a1c
6,693
py
Python
sdk/python/pulumi_azure_native/eventhub/namespace_network_rule_set.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/eventhub/namespace_network_rule_set.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/eventhub/namespace_network_rule_set.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from .. import _utilities, _tables from ...
45.842466
608
0.671149
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from .. import _utilities, _tables from . import outputs from ._enums import * from ._inputs import * __all__ = ['NamespaceNetworkRuleSet'] class NamespaceNetworkRuleSet(pulumi.CustomResource): def ...
true
true
1c27dea5d80a6f3e294f60bd3eff9ff06c4d9530
2,942
py
Python
main.py
Astrobot-me/Hangman--
ee36e3008792c4e0e9cecc2ccc0d84082d5c23ed
[ "MIT" ]
null
null
null
main.py
Astrobot-me/Hangman--
ee36e3008792c4e0e9cecc2ccc0d84082d5c23ed
[ "MIT" ]
null
null
null
main.py
Astrobot-me/Hangman--
ee36e3008792c4e0e9cecc2ccc0d84082d5c23ed
[ "MIT" ]
null
null
null
import random word_dict = { "Brand": "Ford is what?", "Model": "Mustang is a faster car ", "year": 2020, "Gareeb Scientist": "Indian Science Youtuber", "Subway": "Metro Cities", "Abruptly": "In a sudden and unexpected way ", "Lucky": "Happening By Chance", "Luxary": "The enj...
30.645833
87
0.546907
import random word_dict = { "Brand": "Ford is what?", "Model": "Mustang is a faster car ", "year": 2020, "Gareeb Scientist": "Indian Science Youtuber", "Subway": "Metro Cities", "Abruptly": "In a sudden and unexpected way ", "Lucky": "Happening By Chance", "Luxary": "The enj...
true
true
1c27df46bc90f86ac3794795938bc1a168ff50ad
17,176
py
Python
tests/ope/test_ipw_estimators.py
Tanvikapoor14/zr-obp
51eba00f0dda5c26c1fa6826f544c60de485da52
[ "Apache-2.0" ]
null
null
null
tests/ope/test_ipw_estimators.py
Tanvikapoor14/zr-obp
51eba00f0dda5c26c1fa6826f544c60de485da52
[ "Apache-2.0" ]
null
null
null
tests/ope/test_ipw_estimators.py
Tanvikapoor14/zr-obp
51eba00f0dda5c26c1fa6826f544c60de485da52
[ "Apache-2.0" ]
null
null
null
import re from conftest import generate_action_dist import numpy as np import pytest from obp.ope import InverseProbabilityWeighting from obp.ope import InverseProbabilityWeightingTuning from obp.ope import SelfNormalizedInverseProbabilityWeighting from obp.ope import SubGaussianInverseProbabilityWeighting from obp.o...
27.79288
153
0.574523
import re from conftest import generate_action_dist import numpy as np import pytest from obp.ope import InverseProbabilityWeighting from obp.ope import InverseProbabilityWeightingTuning from obp.ope import SelfNormalizedInverseProbabilityWeighting from obp.ope import SubGaussianInverseProbabilityWeighting from obp.o...
true
true
1c27df98416723ba06b4bc406eff6c50c823c317
9,389
py
Python
core/controllers/blog_dashboard.py
lheureuxe13/oppia
7110e3e5d5a53527c31d7b33e14d25e8d5b981f9
[ "Apache-2.0" ]
4
2021-09-16T16:46:53.000Z
2022-02-06T13:00:14.000Z
core/controllers/blog_dashboard.py
lheureuxe13/oppia
7110e3e5d5a53527c31d7b33e14d25e8d5b981f9
[ "Apache-2.0" ]
80
2020-10-31T09:14:46.000Z
2021-01-12T23:38:15.000Z
core/controllers/blog_dashboard.py
lheureuxe13/oppia
7110e3e5d5a53527c31d7b33e14d25e8d5b981f9
[ "Apache-2.0" ]
1
2020-10-02T13:28:26.000Z
2020-10-02T13:28:26.000Z
# Copyright 2021 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
36.819608
80
0.66514
from __future__ import absolute_import from __future__ import unicode_literals from core import feconf from core import utils from core.controllers import acl_decorators from core.controllers import base from core.controllers import domain_objects_validator as validation_method from core.domain import b...
true
true
1c27e0e048a523994e77d58456eb7933b252deb4
1,369
py
Python
PSIRT_Counter.py
ezevallo/ProductSecurityIncidentResponseTeam_Bot
3b900961a45aff4d5581bf57a7eac688dadb6639
[ "MIT" ]
null
null
null
PSIRT_Counter.py
ezevallo/ProductSecurityIncidentResponseTeam_Bot
3b900961a45aff4d5581bf57a7eac688dadb6639
[ "MIT" ]
null
null
null
PSIRT_Counter.py
ezevallo/ProductSecurityIncidentResponseTeam_Bot
3b900961a45aff4d5581bf57a7eac688dadb6639
[ "MIT" ]
null
null
null
import requests import os import json from decouple import config import get_token def sendMessage(criticals, t): # Build message message = '# Security Incident Value: ' + t + '\n## Message: ' + criticals roomId = '' # 'Place your room Id here' # Payload for POST Request payload={'roomId': roomId,'markdown':...
25.351852
77
0.707816
import requests import os import json from decouple import config import get_token def sendMessage(criticals, t): message = '# Security Incident Value: ' + t + '\n## Message: ' + criticals roomId = '' payload={'roomId': roomId,'markdown':message} headers = { 'Accept': 'application/json', 'Author...
true
true
1c27e2226c908540ff3cba31fa6e46b274766af3
11,298
py
Python
stable_baselines3/td3_latent/td3_latent.py
NicholasCorrado/stable-baselines3
77793947335c6b14747c2c5179a7c05c93289ffd
[ "MIT" ]
null
null
null
stable_baselines3/td3_latent/td3_latent.py
NicholasCorrado/stable-baselines3
77793947335c6b14747c2c5179a7c05c93289ffd
[ "MIT" ]
null
null
null
stable_baselines3/td3_latent/td3_latent.py
NicholasCorrado/stable-baselines3
77793947335c6b14747c2c5179a7c05c93289ffd
[ "MIT" ]
null
null
null
from typing import Any, Dict, List, Optional, Tuple, Type, Union import gym import numpy as np import torch as th from torch.nn import functional as F from stable_baselines3.common.buffers import ReplayBuffer from stable_baselines3.common.noise import ActionNoise, OrnsteinUhlenbeckActionNoise from stable_baselines3.c...
44.480315
123
0.658435
from typing import Any, Dict, List, Optional, Tuple, Type, Union import gym import numpy as np import torch as th from torch.nn import functional as F from stable_baselines3.common.buffers import ReplayBuffer from stable_baselines3.common.noise import ActionNoise, OrnsteinUhlenbeckActionNoise from stable_baselines3.c...
true
true
1c27e2a18e50dcdb17f5304d3b14e848b0899143
1,219
py
Python
pip_services3_commons/commands/ICommand.py
pip-services-python/pip-services-commons-python
ecfe0aab2b1442ed3b550115dd2c2472537452de
[ "MIT" ]
null
null
null
pip_services3_commons/commands/ICommand.py
pip-services-python/pip-services-commons-python
ecfe0aab2b1442ed3b550115dd2c2472537452de
[ "MIT" ]
null
null
null
pip_services3_commons/commands/ICommand.py
pip-services-python/pip-services-commons-python
ecfe0aab2b1442ed3b550115dd2c2472537452de
[ "MIT" ]
2
2020-03-11T21:41:13.000Z
2020-03-14T00:26:20.000Z
# -*- coding: utf-8 -*- """ pip_services3_commons.commands.ICommand ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Interface for commands. :copyright: Conceptual Vision Consulting LLC 2018-2019, see AUTHORS for more details. :license: MIT, see LICENSE for more details. """ from typing import List ...
29.731707
100
0.656276
from typing import List from ..run import Parameters from ..validate import ValidationResult from ..run.IExecutable import IExecutable class ICommand(IExecutable): def get_name(self) -> str: raise NotImplementedError('Method from interface definition') def validate(self, args: Parameters) -> List[...
true
true
1c27e2afd14dbad46ca53df30f7958726bdd08be
228
py
Python
experimentation.py
wlwkgus/bdir_vae
63c5fd2e4d96479d77db8240246428fff4a04ab9
[ "MIT" ]
59
2017-09-17T20:15:21.000Z
2022-03-01T10:00:14.000Z
experimentation.py
wlwkgus/bdir_vae
63c5fd2e4d96479d77db8240246428fff4a04ab9
[ "MIT" ]
null
null
null
experimentation.py
wlwkgus/bdir_vae
63c5fd2e4d96479d77db8240246428fff4a04ab9
[ "MIT" ]
4
2018-02-12T06:29:46.000Z
2020-07-03T20:15:13.000Z
from functools import reduce from operator import mul from mnist.vae import VAE import torch as t import torch.nn as nn from torch.autograd import Variable import torch.nn.functional as F if __name__ == '__main__': pass
16.285714
35
0.776316
from functools import reduce from operator import mul from mnist.vae import VAE import torch as t import torch.nn as nn from torch.autograd import Variable import torch.nn.functional as F if __name__ == '__main__': pass
true
true
1c27e31ccb99c12e0a8d33b4402108a12ab84f0a
587
py
Python
iii.py
ZhengDeQuan/AAA
7755c6aa1cfa484a2836ae6059bca721de2a90e8
[ "MIT" ]
null
null
null
iii.py
ZhengDeQuan/AAA
7755c6aa1cfa484a2836ae6059bca721de2a90e8
[ "MIT" ]
null
null
null
iii.py
ZhengDeQuan/AAA
7755c6aa1cfa484a2836ae6059bca721de2a90e8
[ "MIT" ]
1
2020-10-14T03:46:08.000Z
2020-10-14T03:46:08.000Z
import custom_tag_config from custom_tag_config import custom_tags tag_set = ['817725626636951440', '8353647472807540595', '8531798581027376660', '8624511174253220625', '8687593093433542582', '8688506092654802735', '8931775978304697812', '9096057992187323206', '9293129351730695055', '9364161469948028785', '98888210550...
53.363636
261
0.824532
import custom_tag_config from custom_tag_config import custom_tags tag_set = ['817725626636951440', '8353647472807540595', '8531798581027376660', '8624511174253220625', '8687593093433542582', '8688506092654802735', '8931775978304697812', '9096057992187323206', '9293129351730695055', '9364161469948028785', '98888210550...
true
true
1c27e418ae24ba711faf22d08e4eec2d4d101ee7
3,063
py
Python
examples/template-load.py
JNPRAutomate/JNPRAutomateDemo-Student
d79fa488aab00d02fe864ea4f558970b31466da3
[ "MIT" ]
24
2015-03-31T02:27:03.000Z
2021-11-29T15:30:32.000Z
examples/template-load.py
JNPRAutomate/JNPRAutomateDemo-Student
d79fa488aab00d02fe864ea4f558970b31466da3
[ "MIT" ]
3
2015-06-29T22:53:02.000Z
2020-10-01T13:12:11.000Z
examples/template-load.py
JNPRAutomate/JNPRAutomateDemo-Student
d79fa488aab00d02fe864ea4f558970b31466da3
[ "MIT" ]
17
2015-03-27T22:49:31.000Z
2021-01-13T23:41:49.000Z
from jnpr.junos.utils.config import Config from jnpr.junos import Device from datetime import datetime import yaml import argparse import os def time(): """ Basic Time Function for log function use. """ return datetime.now().strftime("%Y-%m-%d %H:%M:%S") def log_output(msg): """ ...
36.035294
154
0.68397
from jnpr.junos.utils.config import Config from jnpr.junos import Device from datetime import datetime import yaml import argparse import os def time(): """ Basic Time Function for log function use. """ return datetime.now().strftime("%Y-%m-%d %H:%M:%S") def log_output(msg): """ ...
false
true
1c27e4387d010190cbe410efdff00b1a0a249d1d
5,733
py
Python
tests/test_example_shapes.py
moatazharb/paramak
785c3ed7304e22eac7d58bb1bdc6515fbd20b9a8
[ "MIT" ]
1
2021-12-14T15:53:46.000Z
2021-12-14T15:53:46.000Z
tests/test_example_shapes.py
bam241/paramak
785c3ed7304e22eac7d58bb1bdc6515fbd20b9a8
[ "MIT" ]
null
null
null
tests/test_example_shapes.py
bam241/paramak
785c3ed7304e22eac7d58bb1bdc6515fbd20b9a8
[ "MIT" ]
null
null
null
import os import sys import unittest from pathlib import Path from examples.example_parametric_shapes import ( make_blanket_from_parameters, make_blanket_from_points, make_CAD_from_points, make_can_reactor_from_parameters, make_can_reactor_from_points, make_html_diagram_from_stp_file, ) import paramak s...
35.171779
74
0.607186
import os import sys import unittest from pathlib import Path from examples.example_parametric_shapes import ( make_blanket_from_parameters, make_blanket_from_points, make_CAD_from_points, make_can_reactor_from_parameters, make_can_reactor_from_points, make_html_diagram_from_stp_file, ) import paramak s...
true
true
1c27e4dd899601537398e4b857cbcc80cd2ed5b3
468
py
Python
04-Data Structures/index.py
EssamQabel/competitive-programmer-handbook-python
c6f1ec715d300b3cbfe499ff25848dd3d7d8d238
[ "MIT" ]
133
2019-11-19T17:01:53.000Z
2022-03-22T09:28:48.000Z
04-Data Structures/index.py
EssamQabel/competitive-programmer-handbook-python
c6f1ec715d300b3cbfe499ff25848dd3d7d8d238
[ "MIT" ]
3
2019-12-30T04:31:22.000Z
2021-06-10T09:43:07.000Z
04-Data Structures/index.py
EssamQabel/competitive-programmer-handbook-python
c6f1ec715d300b3cbfe499ff25848dd3d7d8d238
[ "MIT" ]
54
2019-12-30T04:46:26.000Z
2022-03-23T19:29:48.000Z
# Data Structures # Arrays arr = [1, 2, 3, 4, 5, 6] arr.pop() arr.pop() print(arr) arr.append(1) print(arr) # Set s = set([1, 2, 3, 4, 5, 2]) print(s) s.remove(5) print(s) s.add(6) print(s) print(len(s)) # Map or Object dictionary = {} dictionary[1] = 2 dictionary[2] = 3 print(dictionary) print(dictionary.keys(...
11.7
30
0.651709
arr = [1, 2, 3, 4, 5, 6] arr.pop() arr.pop() print(arr) arr.append(1) print(arr) s = set([1, 2, 3, 4, 5, 2]) print(s) s.remove(5) print(s) s.add(6) print(s) print(len(s)) dictionary = {} dictionary[1] = 2 dictionary[2] = 3 print(dictionary) print(dictionary.keys()) print(dictionary.values()) print(dictionar...
true
true
1c27e571af9e532359796d6fe78967dd06f69b41
2,650
py
Python
src/file_manager.py
NaulaN/Escarbot-py
21a4742956d1c80c575db43613324a348d930983
[ "MIT" ]
1
2021-08-22T11:20:21.000Z
2021-08-22T11:20:21.000Z
src/file_manager.py
NaulaN/Escarbot
21a4742956d1c80c575db43613324a348d930983
[ "MIT" ]
null
null
null
src/file_manager.py
NaulaN/Escarbot
21a4742956d1c80c575db43613324a348d930983
[ "MIT" ]
1
2021-08-13T21:32:14.000Z
2021-08-13T21:32:14.000Z
import os import json import datetime import shutil import configparser from typing import Optional def try_load(func): def load_file(*args, **kwargs): obj, file, directory = args path = os.path.join(directory, file) try: open(path).close() except (FileNotFoundError, OSError) as e: return print(obj.ms...
33.974359
122
0.690189
import os import json import datetime import shutil import configparser from typing import Optional def try_load(func): def load_file(*args, **kwargs): obj, file, directory = args path = os.path.join(directory, file) try: open(path).close() except (FileNotFoundError, OSError) as e: return print(obj.ms...
true
true
1c27e64360ab87ba9df2dd3cfd96a40ceb2aa295
1,972
py
Python
task- creating and merging images.py
Shreya2297/t4
1e9d83feeb874d637f2a2742e8f2b34cc54b5465
[ "MIT" ]
null
null
null
task- creating and merging images.py
Shreya2297/t4
1e9d83feeb874d637f2a2742e8f2b34cc54b5465
[ "MIT" ]
null
null
null
task- creating and merging images.py
Shreya2297/t4
1e9d83feeb874d637f2a2742e8f2b34cc54b5465
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # In[21]: #importing libraries import numpy as np import cv2 as cv # In[23]: #creating a blank black colored image blank=np.zeros((500,500,3),dtype='uint8') #creating a rectangle on left side vertically blank=cv.rectangle(blank,(0,0),(250,500),(49,99,53),thickness=-1) #crea...
19.524752
67
0.692191
import numpy as np import cv2 as cv blank=np.zeros((500,500,3),dtype='uint8') blank=cv.rectangle(blank,(0,0),(250,500),(49,99,53),thickness=-1) blank=cv.rectangle(blank,(250,0),(500,500),(99,53,49),thickness=-1) blank=cv.circle(blank,(250,250),250,(255,255,255),thickness=-1) blank=cv.circle(blank,(250...
true
true
1c27e6ffdb849eb1042c4013e8b1fc891ad298ef
3,432
py
Python
shape_generation/generate_dataset.py
jfrausto7/genclass3D
47ccafd8f0ae6e3efe80acb1ed67ec36140ad467
[ "MIT" ]
1
2022-01-26T01:41:00.000Z
2022-01-26T01:41:00.000Z
shape_generation/generate_dataset.py
jfrausto7/genClassBezier2D
47ccafd8f0ae6e3efe80acb1ed67ec36140ad467
[ "MIT" ]
null
null
null
shape_generation/generate_dataset.py
jfrausto7/genClassBezier2D
47ccafd8f0ae6e3efe80acb1ed67ec36140ad467
[ "MIT" ]
null
null
null
import os import shutil from datetime import datetime import progress.bar from random import choice from shape_generation.generate_random_shape import generate # Generate full dataset w/ parameters LOW_PTS,MID_PTS,HIGH_PTS = 4, 12, 25 n_shapes = 5000 time = datetime.now().strftime('%Y-%m-%d_%H_%M_%S...
34.32
115
0.572844
import os import shutil from datetime import datetime import progress.bar from random import choice from shape_generation.generate_random_shape import generate LOW_PTS,MID_PTS,HIGH_PTS = 4, 12, 25 n_shapes = 5000 time = datetime.now().strftime('%Y-%m-%d_%H_%M_%S') dataset_dir = './data/dataset_'...
true
true
1c27e79dbc0643463a1dc06de599c68c74eeb4fc
2,868
py
Python
qiskit/quantum_info/synthesis/weyl.py
ajavadia/qiskit-sdk-py
a59e8e6be1793197e19998c1f7dcfc45e6f2f3af
[ "Apache-2.0" ]
15
2020-06-29T08:33:39.000Z
2022-02-12T00:28:51.000Z
qiskit/quantum_info/synthesis/weyl.py
ajavadia/qiskit-sdk-py
a59e8e6be1793197e19998c1f7dcfc45e6f2f3af
[ "Apache-2.0" ]
35
2019-03-07T02:09:22.000Z
2022-03-22T19:55:15.000Z
qiskit/quantum_info/synthesis/weyl.py
ajavadia/qiskit-sdk-py
a59e8e6be1793197e19998c1f7dcfc45e6f2f3af
[ "Apache-2.0" ]
11
2020-06-29T08:40:24.000Z
2022-02-24T17:39:16.000Z
# This code is part of Qiskit. # # (C) Copyright IBM 2017, 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
30.510638
85
0.563459
import numpy as np import scipy.linalg as la from qiskit.exceptions import QiskitError _B = (1.0/np.sqrt(2)) * np.array([[1, 1j, 0, 0], [0, 0, 1j, 1], [0, 0, 1j, -1], [1, -1j, 0, 0]], dtype=complex) _Bd ...
true
true
1c27e82e282690be797246c969855063459a83db
1,640
py
Python
Tilemap_Game_With_CircuitPython/basic_rendering.py
joewalk102/Adafruit_Learning_System_Guides
2bda607f8c433c661a2d9d40b4db4fd132334c9a
[ "MIT" ]
1
2021-01-05T02:08:27.000Z
2021-01-05T02:08:27.000Z
Tilemap_Game_With_CircuitPython/basic_rendering.py
joewalk102/Adafruit_Learning_System_Guides
2bda607f8c433c661a2d9d40b4db4fd132334c9a
[ "MIT" ]
1
2020-10-16T15:30:22.000Z
2020-10-16T15:30:22.000Z
Tilemap_Game_With_CircuitPython/basic_rendering.py
joewalk102/Adafruit_Learning_System_Guides
2bda607f8c433c661a2d9d40b4db4fd132334c9a
[ "MIT" ]
1
2020-10-16T15:23:04.000Z
2020-10-16T15:23:04.000Z
import board import displayio import adafruit_imageload display = board.DISPLAY # Load the sprite sheet (bitmap) sprite_sheet, palette = adafruit_imageload.load( "tilegame_assets/castle_sprite_sheet.bmp", bitmap=displayio.Bitmap, palette=displayio.Palette, ) # Create the sprite TileGrid sprite = displayi...
21.298701
48
0.687805
import board import displayio import adafruit_imageload display = board.DISPLAY sprite_sheet, palette = adafruit_imageload.load( "tilegame_assets/castle_sprite_sheet.bmp", bitmap=displayio.Bitmap, palette=displayio.Palette, ) sprite = displayio.TileGrid( sprite_sheet, pixel_shader=palette, ...
true
true
1c27ec5607441b3e0a6c5d16463b33a1d782f985
3,885
py
Python
tests/unittests/utils/test_core.py
f5devcentral/f5-cli
22a5c6902e3f78a969a86116a73fcad817f220be
[ "Apache-2.0" ]
13
2020-03-06T22:35:47.000Z
2021-06-28T23:08:46.000Z
tests/unittests/utils/test_core.py
f5devcentral/f5-cli
22a5c6902e3f78a969a86116a73fcad817f220be
[ "Apache-2.0" ]
19
2020-03-11T15:14:06.000Z
2022-01-26T23:56:56.000Z
tests/unittests/utils/test_core.py
f5devcentral/f5-cli
22a5c6902e3f78a969a86116a73fcad817f220be
[ "Apache-2.0" ]
1
2020-03-24T13:29:30.000Z
2020-03-24T13:29:30.000Z
"""Test: utils.core """ import os import sys import json import click from f5cli.constants import FORMATS, ENV_VARS from f5cli.utils import core as core_utils from ...global_test_imports import pytest sys.path.append(os.getcwd()) def test_convert_absolute_path(mocker): """ Test absolute path """ mock_getc...
19.621212
65
0.54852
import os import sys import json import click from f5cli.constants import FORMATS, ENV_VARS from f5cli.utils import core as core_utils from ...global_test_imports import pytest sys.path.append(os.getcwd()) def test_convert_absolute_path(mocker): mock_getcwd = mocker.patch("f5cli.utils.core.os.getcwd") moc...
true
true
1c27ec7f951d07e917478ed051571f5f4dbc3ee7
5,582
py
Python
src/appengine/pushrpc.py
tomwilkie/awesomation
708a0ff2ffd431f24ed3f942cafd24882dc89620
[ "MIT" ]
28
2015-01-12T15:34:37.000Z
2021-06-17T14:27:49.000Z
src/appengine/pushrpc.py
tomwilkie/awesomation
708a0ff2ffd431f24ed3f942cafd24882dc89620
[ "MIT" ]
16
2015-01-11T21:46:08.000Z
2015-02-06T17:01:50.000Z
src/appengine/pushrpc.py
tomwilkie/awesomation
708a0ff2ffd431f24ed3f942cafd24882dc89620
[ "MIT" ]
2
2015-01-10T17:34:23.000Z
2015-01-10T18:38:01.000Z
"""Code to push events to users.""" import logging import flask import pusher from google.appengine.api import namespace_manager from google.appengine.ext import ndb from common import public_creds from appengine import pusher_client, rest # pylint: disable=invalid-name blueprint = flask.Blueprint('pushrpc', __nam...
30.336957
77
0.699033
import logging import flask import pusher from google.appengine.api import namespace_manager from google.appengine.ext import ndb from common import public_creds from appengine import pusher_client, rest blueprint = flask.Blueprint('pushrpc', __name__) @blueprint.before_request def before_request(): if fl...
true
true
1c27ed1ca879fe27a48d1fbcdec6584a889a51f4
78
py
Python
src/dssp/__init__.py
hassnabdl/Helix-Analysis-Program
6383b132aefb4f0f51965d1812b59625ba35dab2
[ "MIT" ]
1
2021-05-12T20:28:08.000Z
2021-05-12T20:28:08.000Z
src/dssp/__init__.py
hassnabdl/Helix-Analysis-Program
6383b132aefb4f0f51965d1812b59625ba35dab2
[ "MIT" ]
1
2021-05-14T09:12:29.000Z
2021-05-20T14:14:49.000Z
src/dssp/__init__.py
hassnabdl/Helix-Analysis-Program
6383b132aefb4f0f51965d1812b59625ba35dab2
[ "MIT" ]
1
2021-05-20T14:38:31.000Z
2021-05-20T14:38:31.000Z
from .dssp import DSSP from .hbonds import find_hbonds from .. import common
15.6
31
0.782051
from .dssp import DSSP from .hbonds import find_hbonds from .. import common
true
true
1c27ee8f9aae56c7c93c900d37a807c155a3ef00
1,992
py
Python
objectModel/Python/cdm/utilities/__init__.py
MiguelSHS/microsoftCDM
d8df31fa455fcc6afd698e3ca7ec0f8c4a6716fd
[ "CC-BY-4.0", "MIT" ]
1
2021-07-06T17:08:15.000Z
2021-07-06T17:08:15.000Z
objectModel/Python/cdm/utilities/__init__.py
MiguelSHS/microsoftCDM
d8df31fa455fcc6afd698e3ca7ec0f8c4a6716fd
[ "CC-BY-4.0", "MIT" ]
null
null
null
objectModel/Python/cdm/utilities/__init__.py
MiguelSHS/microsoftCDM
d8df31fa455fcc6afd698e3ca7ec0f8c4a6716fd
[ "CC-BY-4.0", "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. from . import copy_data_utils from . import lang_utils from . import primitive_appliers from . import string_utils from . import time_utils from .applier_context i...
30.181818
94
0.788655
 from . import copy_data_utils from . import lang_utils from . import primitive_appliers from . import string_utils from . import time_utils from .applier_context import ApplierContext from .applier_state import ApplierState from .attribute_context_parameters import AttributeContextParameters from .attribute_resolut...
false
true
1c27ef0194c7cbfdddae151232f36d71176274c7
24,009
py
Python
syntribos/clients/http/parser.py
abdullahzamanbabar/syntribos
2d0a6344fe14c8edc6c5c1eba7adbedc154ff579
[ "Apache-2.0" ]
277
2015-09-23T22:55:16.000Z
2020-05-17T18:45:46.000Z
syntribos/clients/http/parser.py
abdullahzamanbabar/syntribos
2d0a6344fe14c8edc6c5c1eba7adbedc154ff579
[ "Apache-2.0" ]
null
null
null
syntribos/clients/http/parser.py
abdullahzamanbabar/syntribos
2d0a6344fe14c8edc6c5c1eba7adbedc154ff579
[ "Apache-2.0" ]
72
2016-01-04T18:57:06.000Z
2020-05-07T14:07:30.000Z
# Copyright 2015 Rackspace # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, sof...
39.684298
79
0.577075
import copy from functools import reduce import importlib import json import re import sys import types import uuid import xml.etree.ElementTree as ElementTree from oslo_config import cfg import six from six.moves import html_parser from six.moves.urllib import parse as urlparse import yaml from syntribo...
true
true
1c27ef8a394f7804b8fb1fe41627f2a7d7fed3df
306
py
Python
venv/Lib/site-packages/numpy/version.py
Jos33y/student-performance-knn
4e965434f52dd6a1380904aa257df1edfaebb3c4
[ "MIT" ]
null
null
null
venv/Lib/site-packages/numpy/version.py
Jos33y/student-performance-knn
4e965434f52dd6a1380904aa257df1edfaebb3c4
[ "MIT" ]
7
2021-06-08T21:46:24.000Z
2022-03-12T00:35:31.000Z
my_env/Lib/site-packages/numpy/version.py
obulrdy6881/Drowsinss
61cb9281d7dd22aee282b517e2fbf500f0ff9935
[ "MIT" ]
null
null
null
# THIS FILE IS GENERATED FROM NUMPY SETUP.PY # # To compare versions robustly, use `numpy.lib.NumpyVersion` short_version = '1.18.4' version = '1.18.4' full_version = '1.18.4' git_revision = '94721320b1e13fd60046dc8bd0d343c54c2dd2e9' release = True if not release: version = full_version
23.538462
61
0.722222
short_version = '1.18.4' version = '1.18.4' full_version = '1.18.4' git_revision = '94721320b1e13fd60046dc8bd0d343c54c2dd2e9' release = True if not release: version = full_version
true
true
1c27f07ff72071d72eb366856cf15fa475ce564c
7,107
py
Python
sql_to_ibis/sql_select_query.py
zbrookle/sql_to_ibis
5d29ff903fd61f7c652f7763f5cd58b76f9a083f
[ "BSD-3-Clause" ]
25
2020-06-11T22:44:06.000Z
2021-11-23T13:02:16.000Z
sql_to_ibis/sql_select_query.py
zbrookle/sql_to_ibis
5d29ff903fd61f7c652f7763f5cd58b76f9a083f
[ "BSD-3-Clause" ]
40
2020-06-12T16:35:47.000Z
2022-02-23T20:48:19.000Z
sql_to_ibis/sql_select_query.py
zbrookle/sql_to_ibis
5d29ff903fd61f7c652f7763f5cd58b76f9a083f
[ "BSD-3-Clause" ]
3
2020-08-30T13:43:06.000Z
2020-10-03T11:38:47.000Z
""" Convert sql query to an ibis expression """ from copy import deepcopy import os from pathlib import Path from typing import Any, Dict from ibis.expr.types import TableExpr from lark import Lark, UnexpectedToken from lark.exceptions import VisitError from sql_to_ibis.exceptions.sql_exception import InvalidQueryExc...
34.668293
88
0.646405
from copy import deepcopy import os from pathlib import Path from typing import Any, Dict from ibis.expr.types import TableExpr from lark import Lark, UnexpectedToken from lark.exceptions import VisitError from sql_to_ibis.exceptions.sql_exception import InvalidQueryException from sql_to_ibis.parsing.sql_parser impor...
true
true
1c27f0cbf2f40cffcd07277b82ee7769b86dcc8a
5,516
py
Python
horizon/horizon/dashboards/nova/security_groups/forms.py
katzj/horizon
195b70bcf161987d2568e7c9dbebdfffd22004f8
[ "Apache-2.0" ]
null
null
null
horizon/horizon/dashboards/nova/security_groups/forms.py
katzj/horizon
195b70bcf161987d2568e7c9dbebdfffd22004f8
[ "Apache-2.0" ]
null
null
null
horizon/horizon/dashboards/nova/security_groups/forms.py
katzj/horizon
195b70bcf161987d2568e7c9dbebdfffd22004f8
[ "Apache-2.0" ]
null
null
null
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2011 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
42.75969
79
0.589558
import logging from django import shortcuts from django.contrib import messages from django.core import validators from django.utils.translation import ugettext as _ from novaclient import exceptions as novaclient_exceptions from horizon import api from horizon import forms LOG = logging.getLogg...
false
true
1c27f0ef99cad37dbc55d60ec83e6ae7afff0829
3,484
py
Python
bridger/serializers/fields/related.py
intellineers/django-bridger
ed097984a99df7da40a4d01bd00c56e3c6083056
[ "BSD-3-Clause" ]
2
2020-03-17T00:53:23.000Z
2020-07-16T07:00:33.000Z
bridger/serializers/fields/related.py
intellineers/django-bridger
ed097984a99df7da40a4d01bd00c56e3c6083056
[ "BSD-3-Clause" ]
76
2019-12-05T01:15:57.000Z
2021-09-07T16:47:27.000Z
bridger/serializers/fields/related.py
intellineers/django-bridger
ed097984a99df7da40a4d01bd00c56e3c6083056
[ "BSD-3-Clause" ]
1
2020-02-05T15:09:47.000Z
2020-02-05T15:09:47.000Z
from typing import Dict from rest_framework import serializers from rest_framework.fields import empty from rest_framework.relations import ManyRelatedField from rest_framework.request import Request from .mixins import BridgerSerializerFieldMixin from .types import BridgerType, ReturnContentType class BridgerManyR...
34.156863
104
0.639208
from typing import Dict from rest_framework import serializers from rest_framework.fields import empty from rest_framework.relations import ManyRelatedField from rest_framework.request import Request from .mixins import BridgerSerializerFieldMixin from .types import BridgerType, ReturnContentType class BridgerManyR...
true
true
1c27f1413df29f87a1b1ddc52246e07e359c2b21
11,924
py
Python
src/Live-EEG_decoding/run_session_liveEEG.py
gumpy-hybridBCI/gumpy-Realtime
163f72ff4d8734cbfd13848e21ce7d4cafc6e8e9
[ "MIT" ]
null
null
null
src/Live-EEG_decoding/run_session_liveEEG.py
gumpy-hybridBCI/gumpy-Realtime
163f72ff4d8734cbfd13848e21ce7d4cafc6e8e9
[ "MIT" ]
null
null
null
src/Live-EEG_decoding/run_session_liveEEG.py
gumpy-hybridBCI/gumpy-Realtime
163f72ff4d8734cbfd13848e21ce7d4cafc6e8e9
[ "MIT" ]
1
2021-05-24T07:20:51.000Z
2021-05-24T07:20:51.000Z
# Mirjam Hemberger # Engineering Practice # 13.03.2018 # modification of run_session.py to allow live processing and classification of EEG # phase 1: collect data (certain amount of trials, defined by trials_notlive (-l)) # phase 2: analyse and classify collected data and build model # phase 3: uses model to clas...
42.434164
149
0.625629
import pygame import re import sys import time import random import argparse import screeninfo import os from record_data_liveEEG import RecordData from eeg_motor_imagery_NST_live import liveEEG on_windows = os.name == 'nt' if on_windows: import winsound class MyApp_liveEEG(): def...
true
true
1c27f44d8b0109740675f5674d9eca12e3f4a682
3,328
py
Python
tests/executors/test_local_executor.py
robobario/airflow
702005fe35dc5b996a5c5b8d349ed36036472f00
[ "Apache-2.0" ]
5
2020-07-17T07:33:58.000Z
2022-03-02T06:23:47.000Z
tests/executors/test_local_executor.py
robobario/airflow
702005fe35dc5b996a5c5b8d349ed36036472f00
[ "Apache-2.0" ]
20
2017-04-18T19:47:46.000Z
2020-01-13T04:19:24.000Z
tests/executors/test_local_executor.py
robobario/airflow
702005fe35dc5b996a5c5b8d349ed36036472f00
[ "Apache-2.0" ]
12
2020-01-09T14:02:39.000Z
2022-01-24T07:18:51.000Z
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
39.619048
91
0.714543
import datetime import unittest from unittest import mock from airflow.executors.local_executor import LocalExecutor from airflow.utils.state import State class TestLocalExecutor(unittest.TestCase): TEST_SUCCESS_COMMANDS = 5 def execution_parallelism(self, parallelism=0): executor ...
true
true
1c27f539d53544e050b44267c6401dfdd1bf6c9c
3,405
py
Python
total_infection.py
sohamkor/TeachMeWebApp
820eff092c6891cf556ee22e47b14f7c4047fd60
[ "MIT" ]
null
null
null
total_infection.py
sohamkor/TeachMeWebApp
820eff092c6891cf556ee22e47b14f7c4047fd60
[ "MIT" ]
null
null
null
total_infection.py
sohamkor/TeachMeWebApp
820eff092c6891cf556ee22e47b14f7c4047fd60
[ "MIT" ]
null
null
null
# By Soham Koradia as a project for Khan Academy ''' In order to use this algorithm, open up a Python terminal (by executing the command 'python' in bash/command prompt), import this module (import total_infection), import the User module (from site_user import User), create as many users as you would like by running f...
51.590909
185
0.76417
from site_user import User from tools_queue import Queue def infectConnection(userObjToStartInfectionFrom, newVersionOfSite): # component and the other users that will also become infected infectionQueue = Queue() infectionQueue.enqueue(userObjToStartInfectionFrom) # First make the changes for...
true
true
1c27f5ce2d6e35c54529394ae164cd0ab8bb572b
105,599
py
Python
pysnmp/FLOWPOINT-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/FLOWPOINT-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/FLOWPOINT-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module FLOWPOINT-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/FLOWPOINT-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 19:00:19 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 201...
127.843826
9,369
0.766617
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ConstraintsIntersection, ConstraintsUnion, ValueRangeConstraint, ValueSizeConstraint = mibBuild...
true
true
1c27f60c68b97c3fc6c7e185e330ca43a1c073db
103
py
Python
alert-service/run.py
Rudrarka/Alert-System
ed6d0c0566e70a13d13e6c65fa790f25d07fa99e
[ "MIT" ]
null
null
null
alert-service/run.py
Rudrarka/Alert-System
ed6d0c0566e70a13d13e6c65fa790f25d07fa99e
[ "MIT" ]
null
null
null
alert-service/run.py
Rudrarka/Alert-System
ed6d0c0566e70a13d13e6c65fa790f25d07fa99e
[ "MIT" ]
null
null
null
from modules import app if __name__ == '__main__': app.run(host="0.0.0.0",port="5000", debug=True)
25.75
51
0.669903
from modules import app if __name__ == '__main__': app.run(host="0.0.0.0",port="5000", debug=True)
true
true
1c27f8273bbe46fa3304ee871b9a72f21baeb08c
7,425
py
Python
FAReinforcement/rltools/FARLBasic.py
jamartinh/ReinforcementLearning
75a90fcc2247216fe1bd635d8067f9590e38086a
[ "Apache-2.0" ]
null
null
null
FAReinforcement/rltools/FARLBasic.py
jamartinh/ReinforcementLearning
75a90fcc2247216fe1bd635d8067f9590e38086a
[ "Apache-2.0" ]
null
null
null
FAReinforcement/rltools/FARLBasic.py
jamartinh/ReinforcementLearning
75a90fcc2247216fe1bd635d8067f9590e38086a
[ "Apache-2.0" ]
null
null
null
from vpython import * class FARLBase: def __init__(self, Q, Environment, Action_Selector, gamma=1.0): self.gamma = gamma # discount factor self.Environment = Environment self.nactions = Environment.nactions # number of actions self.Q = Q # the function approximator ...
35.189573
109
0.563771
from vpython import * class FARLBase: def __init__(self, Q, Environment, Action_Selector, gamma=1.0): self.gamma = gamma self.Environment = Environment self.nactions = Environment.nactions self.Q = Q self.SelectAction = Action_Selector self.SelectA...
true
true
1c27f881265f9e8b8d7a1bc3658831afb617b5f7
1,310
py
Python
476_number_complement.py
jsingh41/cs_jatin
787c933b322179676b310688c7cc02270e0a6cbf
[ "MIT" ]
1
2020-01-12T16:52:34.000Z
2020-01-12T16:52:34.000Z
476_number_complement.py
jsingh41/cs_jatin
787c933b322179676b310688c7cc02270e0a6cbf
[ "MIT" ]
null
null
null
476_number_complement.py
jsingh41/cs_jatin
787c933b322179676b310688c7cc02270e0a6cbf
[ "MIT" ]
null
null
null
""" https://leetcode.com/problems/number-complement/description/ Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation. Note: The given integer is guaranteed to fit within the range of a 32-bit signed integer. You could assume no leading zero b...
37.428571
129
0.673282
class Solution(object): def findComplement(self, num): binary_complement = '' bit_complement = '' binary_num = bin(num)[2:] for bit_char in binary_num: if bit_char == '0': bit_complement = '1' elif bit_char == '1': bit_...
true
true
1c27f8b83aead8075ca110e93965a86c48a3570c
12,060
py
Python
main.py
mell-old/mell-old-echo-bot
a59436fe0632254f76c627d52cbb6fd118fb017d
[ "MIT" ]
null
null
null
main.py
mell-old/mell-old-echo-bot
a59436fe0632254f76c627d52cbb6fd118fb017d
[ "MIT" ]
null
null
null
main.py
mell-old/mell-old-echo-bot
a59436fe0632254f76c627d52cbb6fd118fb017d
[ "MIT" ]
null
null
null
import telebot from keyboard import ADMIN_CALLBACK, TITLES, TEST_BUTTONS from keyboard import get_inline_keyboard_test_finish, get_inline_keyboard_test_start, get_base_reply_keyboard, get_inline_keyboard_challenge, get_inline_keyboard_info, get_inline_keyboard_admin, get_inline_keyboard_regulations, get_inline_keyboar...
43.854545
314
0.60058
import telebot from keyboard import ADMIN_CALLBACK, TITLES, TEST_BUTTONS from keyboard import get_inline_keyboard_test_finish, get_inline_keyboard_test_start, get_base_reply_keyboard, get_inline_keyboard_challenge, get_inline_keyboard_info, get_inline_keyboard_admin, get_inline_keyboard_regulations, get_inline_keyboar...
true
true
1c27f9b611f98bb212fea2fa0935226a7ff1366b
406
py
Python
democracy_club/apps/dc_members/migrations/0006_auto_20150823_1702.py
chris48s/Website
efabd478d617a40d58304b3e9cce9da343cfaa78
[ "BSD-3-Clause" ]
null
null
null
democracy_club/apps/dc_members/migrations/0006_auto_20150823_1702.py
chris48s/Website
efabd478d617a40d58304b3e9cce9da343cfaa78
[ "BSD-3-Clause" ]
null
null
null
democracy_club/apps/dc_members/migrations/0006_auto_20150823_1702.py
chris48s/Website
efabd478d617a40d58304b3e9cce9da343cfaa78
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('dc_members', '0005_auto_20150430_1903'), ] operations = [ migrations.AlterField( model_name='member', ...
20.3
52
0.608374
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('dc_members', '0005_auto_20150430_1903'), ] operations = [ migrations.AlterField( model_name='member', name='email', ...
true
true
1c27fa3ee420ef704f2d8155d8a2f6edd2720884
6,993
py
Python
mmf/datasets/databases/image_database.py
flashjames/refundr-mmf
6a339cc966a10934b7c1de607c7f3e14465be338
[ "BSD-3-Clause" ]
1
2021-08-24T08:14:54.000Z
2021-08-24T08:14:54.000Z
mmf/datasets/databases/image_database.py
flashjames/refundr-mmf
6a339cc966a10934b7c1de607c7f3e14465be338
[ "BSD-3-Clause" ]
null
null
null
mmf/datasets/databases/image_database.py
flashjames/refundr-mmf
6a339cc966a10934b7c1de607c7f3e14465be338
[ "BSD-3-Clause" ]
2
2020-11-08T08:33:13.000Z
2022-03-24T14:32:29.000Z
# Copyright (c) Facebook, Inc. and its affiliates. import collections import os import torch import torchvision import torchvision.datasets.folder as tv_helpers from PIL import Image from mmf.utils.file_io import PathManager from mmf.utils.general import get_absolute_path def get_possible_image_paths(path): ima...
33.620192
88
0.61247
import collections import os import torch import torchvision import torchvision.datasets.folder as tv_helpers from PIL import Image from mmf.utils.file_io import PathManager from mmf.utils.general import get_absolute_path def get_possible_image_paths(path): image_path = path.split(".") image_path...
true
true
1c27fa84591aba0027fc443a4aeb2afc6abde487
420
py
Python
zvt/domain/actor/actor_meta.py
GunsFireRose911/zvt
87971a837552f36482925f6af5be39a11072a658
[ "MIT" ]
null
null
null
zvt/domain/actor/actor_meta.py
GunsFireRose911/zvt
87971a837552f36482925f6af5be39a11072a658
[ "MIT" ]
null
null
null
zvt/domain/actor/actor_meta.py
GunsFireRose911/zvt
87971a837552f36482925f6af5be39a11072a658
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from sqlalchemy.orm import declarative_base from zvt.contract.register import register_schema from zvt.contract.schema import ActorEntity ActorMetaBase = declarative_base() # 个股 class ActorMeta(ActorMetaBase, ActorEntity): __tablename__ = 'actor_meta' register_schema(providers=['em'],...
23.333333
82
0.778571
from sqlalchemy.orm import declarative_base from zvt.contract.register import register_schema from zvt.contract.schema import ActorEntity ActorMetaBase = declarative_base() class ActorMeta(ActorMetaBase, ActorEntity): __tablename__ = 'actor_meta' register_schema(providers=['em'], db_name='actor_meta', sche...
true
true
1c27fac70d0857256c12c6679a431f90f8e2fc08
1,370
py
Python
src/helpers/helpers_analysis/add_num_incr_noeff_entries.py
ibrahimberb/Predicting-Mutation-Effects
1522103f3a822b8bdcae89c7b630835ff5aa5a97
[ "MIT" ]
null
null
null
src/helpers/helpers_analysis/add_num_incr_noeff_entries.py
ibrahimberb/Predicting-Mutation-Effects
1522103f3a822b8bdcae89c7b630835ff5aa5a97
[ "MIT" ]
null
null
null
src/helpers/helpers_analysis/add_num_incr_noeff_entries.py
ibrahimberb/Predicting-Mutation-Effects
1522103f3a822b8bdcae89c7b630835ff5aa5a97
[ "MIT" ]
null
null
null
import pandas as pd def add_num_incr_noeff_entries(preliminary_data: pd.DataFrame, prediction_data: pd.DataFrame): """ Given a tcga preliminary_data data, find the number of increasing+no_effect predicted entries for each protein. E.g. P04637 (TP53) → 76 → 1 Note: For some entries, it...
40.294118
118
0.672263
import pandas as pd def add_num_incr_noeff_entries(preliminary_data: pd.DataFrame, prediction_data: pd.DataFrame): num_incr_noeff_entries = [] for protein in preliminary_data["PROTEIN"]: incr_noeff_entries_data = prediction_data[(prediction_data['UniProt_ID'] == protein) & ...
true
true
1c27fafd41a6fce90bc3b12344e5a6dccf8c9d9a
6,000
py
Python
core/state_schema.py
JohnBat26/dp-agent
ad9d407bc70e452f0a2c2d1a1e7f2edc6a9514f4
[ "Apache-2.0" ]
null
null
null
core/state_schema.py
JohnBat26/dp-agent
ad9d407bc70e452f0a2c2d1a1e7f2edc6a9514f4
[ "Apache-2.0" ]
null
null
null
core/state_schema.py
JohnBat26/dp-agent
ad9d407bc70e452f0a2c2d1a1e7f2edc6a9514f4
[ "Apache-2.0" ]
null
null
null
from mongoengine import DynamicDocument, ReferenceField, ListField, StringField, DynamicField, DateTimeField,\ FloatField, DictField from . import STATE_API_VERSION HUMAN_UTTERANCE_SCHEMA = { 'id': None, 'text': None, 'user': {}, 'annotations': {}, 'date_time': None, 'hypotheses': [], ...
27.272727
119
0.589333
from mongoengine import DynamicDocument, ReferenceField, ListField, StringField, DynamicField, DateTimeField,\ FloatField, DictField from . import STATE_API_VERSION HUMAN_UTTERANCE_SCHEMA = { 'id': None, 'text': None, 'user': {}, 'annotations': {}, 'date_time': None, 'hypotheses': [], ...
true
true
1c27fbb896e9655a36235f6792770981062a0fe8
3,736
py
Python
tools/memory_inspector/memory_inspector/core/memory_map.py
kjthegod/chromium
cf940f7f418436b77e15b1ea23e6fa100ca1c91a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2019-11-28T10:46:52.000Z
2019-11-28T10:46:52.000Z
tools/memory_inspector/memory_inspector/core/memory_map.py
kjthegod/chromium
cf940f7f418436b77e15b1ea23e6fa100ca1c91a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
tools/memory_inspector/memory_inspector/core/memory_map.py
kjthegod/chromium
cf940f7f418436b77e15b1ea23e6fa100ca1c91a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
2
2015-03-27T11:15:39.000Z
2016-08-17T14:19:56.000Z
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import bisect PAGE_SIZE = 4096 class Map(object): """Models the memory map of a given |backends.Process|. This is typically obtained by calling back...
32.486957
80
0.701017
import bisect PAGE_SIZE = 4096 class Map(object): def __init__(self): self.entries = [] def Add(self, entry): assert(isinstance(entry, MapEntry)) bisect.insort_right(self.entries, entry) def Lookup(self, addr): idx = bisect.bisect_right(self.entries, addr) - 1 if idx < 0: re...
true
true
1c27fbd772f7a8a40dd9c11ca0d7aa8e39b20df9
98
py
Python
mysterious-mice/spacebook/mars_weather/apps.py
Vthechamp22/summer-code-jam-2021
0a8bf1f22f6c73300891fd779da36efd8e1304c1
[ "MIT" ]
40
2020-08-02T07:38:22.000Z
2021-07-26T01:46:50.000Z
mysterious-mice/spacebook/mars_weather/apps.py
Vthechamp22/summer-code-jam-2021
0a8bf1f22f6c73300891fd779da36efd8e1304c1
[ "MIT" ]
134
2020-07-31T12:15:45.000Z
2020-12-13T04:42:19.000Z
mysterious-mice/spacebook/mars_weather/apps.py
Vthechamp22/summer-code-jam-2021
0a8bf1f22f6c73300891fd779da36efd8e1304c1
[ "MIT" ]
101
2020-07-31T12:00:47.000Z
2021-11-01T09:06:58.000Z
from django.apps import AppConfig class MarsWeatherConfig(AppConfig): name = "mars_weather"
16.333333
35
0.77551
from django.apps import AppConfig class MarsWeatherConfig(AppConfig): name = "mars_weather"
true
true
1c27fbfd5dfe3269818a7bc7fc4d21cf8139a2a8
906
py
Python
src/pract/apps/discuss/migrations/0002_auto_20161104_0850.py
brapastor/devcode_django
897c29c37c7ce30b412089d3177e002e360a78e6
[ "MIT" ]
null
null
null
src/pract/apps/discuss/migrations/0002_auto_20161104_0850.py
brapastor/devcode_django
897c29c37c7ce30b412089d3177e002e360a78e6
[ "MIT" ]
null
null
null
src/pract/apps/discuss/migrations/0002_auto_20161104_0850.py
brapastor/devcode_django
897c29c37c7ce30b412089d3177e002e360a78e6
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-11-04 08:50 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migratio...
29.225806
133
0.65894
from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('discuss', ...
true
true
1c27fc43838852f6d74f9698671aea82da261afc
1,869
py
Python
examples/compare_all_ids.py
anshuldutt21/spdx_python_licensematching
a409d7e1d024bc64d13c831989e61e0e3355eea1
[ "Apache-2.0" ]
1
2021-05-31T03:09:12.000Z
2021-05-31T03:09:12.000Z
examples/compare_all_ids.py
anshuldutt21/spdx_python_licensematching
a409d7e1d024bc64d13c831989e61e0e3355eea1
[ "Apache-2.0" ]
5
2020-09-17T14:41:48.000Z
2020-10-07T07:24:11.000Z
examples/compare_all_ids.py
anshuldutt21/spdx_python_licensematching
a409d7e1d024bc64d13c831989e61e0e3355eea1
[ "Apache-2.0" ]
null
null
null
# Parses License Texts passed into them and compare them against all the License ids. import os from pathlib import Path from configuration.config import PACKAGE_PATH from normalize_license_text.normalize_class import NormalizeText from compare_template_text.normalize_template_text import NormalizeTemplate from com...
36.647059
94
0.691814
import os from pathlib import Path from configuration.config import PACKAGE_PATH from normalize_license_text.normalize_class import NormalizeText from compare_template_text.normalize_template_text import NormalizeTemplate from compare_template_text.compare_normalized_files import CompareNormalizedFiles Text_Direct...
true
true
1c27fcafb75aead8f0004522219eab34b03ad405
6,146
py
Python
midiio/events.py
blowfeld/python-midi-io
8dd5c7fabc29bc407a6fb8987538c7a9dce68d94
[ "MIT" ]
1
2020-10-19T08:12:35.000Z
2020-10-19T08:12:35.000Z
midiio/events.py
blowfeld/python-midi-io
8dd5c7fabc29bc407a6fb8987538c7a9dce68d94
[ "MIT" ]
3
2017-11-18T16:46:01.000Z
2021-11-20T22:55:38.000Z
midiio/events.py
blowfeld/python-midi-io
8dd5c7fabc29bc407a6fb8987538c7a9dce68d94
[ "MIT" ]
null
null
null
import math class _AbstractEvent: name = "Generic MIDI Event" def __init__(self, tick): self._tick = tick @property def tick(self): return self._tick def __cmp__(self, other): return self._tick - other._tick def __baserepr__(self, keys=[]): keys = ['tick'] + ...
22.268116
72
0.655711
import math class _AbstractEvent: name = "Generic MIDI Event" def __init__(self, tick): self._tick = tick @property def tick(self): return self._tick def __cmp__(self, other): return self._tick - other._tick def __baserepr__(self, keys=[]): keys = ['tick'] + ...
true
true
1c27fcdd05db513ebf2533fb78d8a688c277b9dc
593
py
Python
guided_diffusion/grad_reverse.py
ZGCTroy/guided-diffusion
af987bb2b65db2875148a5466df79736ea5ae6a1
[ "MIT" ]
null
null
null
guided_diffusion/grad_reverse.py
ZGCTroy/guided-diffusion
af987bb2b65db2875148a5466df79736ea5ae6a1
[ "MIT" ]
null
null
null
guided_diffusion/grad_reverse.py
ZGCTroy/guided-diffusion
af987bb2b65db2875148a5466df79736ea5ae6a1
[ "MIT" ]
null
null
null
from torch.autograd import Function # class GradReverse(Function): # def __init__(self, lambd): # self.lambd = lambd # # def forward(self, x): # return x.view_as(x) # # def backward(self, grad_output): # return (grad_output * -self.lambd) # # # def grad_reverse(x, lambd=1.0): # ...
20.448276
44
0.637437
from torch.autograd import Function class GradReverse(Function): @staticmethod def forward(ctx, x): return x.view_as(x) @staticmethod def backward(ctx, grad_output): return grad_output.neg() def grad_reverse(x): return GradReverse.apply(x)
true
true
1c27fcf447305d7133911a7c3ce4c9dde6a5f4ab
3,552
py
Python
model.py
MajMazi/Vislice
0fc7d6ba3da197778ebe2bb2366477155b576d2e
[ "MIT" ]
null
null
null
model.py
MajMazi/Vislice
0fc7d6ba3da197778ebe2bb2366477155b576d2e
[ "MIT" ]
null
null
null
model.py
MajMazi/Vislice
0fc7d6ba3da197778ebe2bb2366477155b576d2e
[ "MIT" ]
null
null
null
import random import json STEVILO_DOVOLJENIH_NAPAK = 10 PRAVILNA_CRKA = '+' PONOVLJENA_CRKA = 'O' NAPACNA_CRKA = '-' ZMAGA = 'W' PORAZ = 'X' ZACETEK = 'S' class Igra: def __init__(self, geslo, crke = None): self.geslo = geslo if crke is None: self.crke = [] else: s...
27.75
94
0.565597
import random import json STEVILO_DOVOLJENIH_NAPAK = 10 PRAVILNA_CRKA = '+' PONOVLJENA_CRKA = 'O' NAPACNA_CRKA = '-' ZMAGA = 'W' PORAZ = 'X' ZACETEK = 'S' class Igra: def __init__(self, geslo, crke = None): self.geslo = geslo if crke is None: self.crke = [] else: s...
true
true
1c27fd7e3508e503777f0822d875cc4b3062fc0a
587
py
Python
setup.py
gonghao/python-apns
2de3eeaf61b1f09475e662cc48f4c07b24d76631
[ "MIT" ]
null
null
null
setup.py
gonghao/python-apns
2de3eeaf61b1f09475e662cc48f4c07b24d76631
[ "MIT" ]
null
null
null
setup.py
gonghao/python-apns
2de3eeaf61b1f09475e662cc48f4c07b24d76631
[ "MIT" ]
null
null
null
from distutils.core import setup setup( name = 'gobiko.apns', packages = [ 'gobiko', 'gobiko.apns' ], version = '0.1.6', description = 'A library for interacting with APNs using HTTP/2 and token-based authentication.', author = 'Gene Sluder', author_email = 'gene@gobiko.com', url = 'https://gith...
23.48
99
0.640545
from distutils.core import setup setup( name = 'gobiko.apns', packages = [ 'gobiko', 'gobiko.apns' ], version = '0.1.6', description = 'A library for interacting with APNs using HTTP/2 and token-based authentication.', author = 'Gene Sluder', author_email = 'gene@gobiko.com', url = 'https://gith...
true
true
1c27fd9e6c4e15661c5cb5f1e809522fce8f2e5f
17,373
py
Python
skl2onnx/operator_converters/AdaBoost.py
c-bata/sklearn-onnx
ff3e2eb204991b5799fc606c265b2c283dbfc25c
[ "MIT" ]
1
2019-05-06T20:54:02.000Z
2019-05-06T20:54:02.000Z
skl2onnx/operator_converters/AdaBoost.py
PossieMP/https-github.com-onnx-sklearn-onnx
48c60398d38e6937897d7c1506a8dcfcf28830a2
[ "MIT" ]
null
null
null
skl2onnx/operator_converters/AdaBoost.py
PossieMP/https-github.com-onnx-sklearn-onnx
48c60398d38e6937897d7c1506a8dcfcf28830a2
[ "MIT" ]
1
2020-04-09T07:46:52.000Z
2020-04-09T07:46:52.000Z
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- import nu...
47.991713
79
0.696771
import numpy as np from ..common._apply_operation import ( apply_add, apply_cast, apply_concat, apply_div, apply_exp, apply_mul, apply_reshape, apply_sub, apply_topk, apply_transpose) from ..common._registration import register_converter from ..common.tree_ensemble import add_tree_to_attribute_pairs from ...
true
true
1c27fe8fbc8ebb582ad55b86d34eab251cc994e6
978
py
Python
coursera_ml/fourier_transform/disc_ft.py
Dani7B/claimed
037bfdeed98d6cb3e86db2d9160e21b9fa20ce44
[ "Apache-2.0" ]
308
2021-08-09T20:08:59.000Z
2022-03-31T15:24:02.000Z
coursera_ml/fourier_transform/disc_ft.py
bicabaEric/claimed
d6323602337a7a5702432a547bf2b0e7177c76bd
[ "Apache-2.0" ]
15
2021-09-12T15:06:13.000Z
2022-03-31T19:02:08.000Z
coursera_ml/fourier_transform/disc_ft.py
bicabaEric/claimed
d6323602337a7a5702432a547bf2b0e7177c76bd
[ "Apache-2.0" ]
615
2021-08-11T12:41:21.000Z
2022-03-31T18:08:12.000Z
""" (C) 2018 Nikolay Manchev This work is licensed under the Creative Commons Attribution 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/. """ import numpy as np import matplotlib.pyplot as plt import math from numpy.fft import fft def gen_wave (freq,...
15.774194
91
0.634969
import numpy as np import matplotlib.pyplot as plt import math from numpy.fft import fft def gen_wave (freq, amp, T, sr): time = np.arange(0,T,1/sr) X = amp*np.sin(2*np.pi*freq*time) return time,X plt.style.use("seaborn") plt.rcParams["xtick.labelsize"] = 14 plt.rcParams["ytick.labelsize...
true
true
1c27ff1c441a5f7976c685e14539847a7c14573f
783
py
Python
tests/programs/plugin_import/some_package/some_module.py
hclivess/Nuitka
9c7ec9696e69a3901b25d5bce720c921d45c931b
[ "Apache-2.0" ]
null
null
null
tests/programs/plugin_import/some_package/some_module.py
hclivess/Nuitka
9c7ec9696e69a3901b25d5bce720c921d45c931b
[ "Apache-2.0" ]
1
2019-03-01T11:33:40.000Z
2019-03-01T11:33:40.000Z
tests/programs/plugin_import/some_package/some_module.py
hclivess/Nuitka
9c7ec9696e69a3901b25d5bce720c921d45c931b
[ "Apache-2.0" ]
1
2019-03-26T16:56:21.000Z
2019-03-26T16:56:21.000Z
# Copyright 2019, Kay Hayen, mailto:kay.hayen@gmail.com # # Python tests originally created or extracted from other peoples work. The # parts were too small to be protected. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the ...
41.210526
79
0.712644
print( "hi" )
true
true
1c280000ae23fff2e17fa2ef581e72ac50ebf2d4
2,181
py
Python
fontcheck.py
jtuu/fontcheck
db125fefbed01dd24a05fd26d7c308ba9839f275
[ "MIT" ]
null
null
null
fontcheck.py
jtuu/fontcheck
db125fefbed01dd24a05fd26d7c308ba9839f275
[ "MIT" ]
null
null
null
fontcheck.py
jtuu/fontcheck
db125fefbed01dd24a05fd26d7c308ba9839f275
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Based on https://stackoverflow.com/a/19438403 import sys from fontTools.ttLib import TTFont from fontTools.unicode import Unicode def fontcheck(input_filename, font_filenames): """fontcheck Usage: fontcheck input.txt font1.ttf font2.ttf ... Finds characters that exist in the input file ...
30.71831
110
0.623109
import sys from fontTools.ttLib import TTFont from fontTools.unicode import Unicode def fontcheck(input_filename, font_filenames): num_fonts = 0 font_chars = dict() for filename in font_filenames: try: font = TTFont(filename, 0, allowVID=0, ignoreDecompileErrors=True, fontNumber=-1)...
true
true
1c2800630d889218f88e4e0c31f6828b06f928a4
573
py
Python
wsgi_docker.py
popenc/stack_example
3ee6a98d68ad0d7adb9c4e44c3fc7a14052f74a6
[ "MIT" ]
null
null
null
wsgi_docker.py
popenc/stack_example
3ee6a98d68ad0d7adb9c4e44c3fc7a14052f74a6
[ "MIT" ]
null
null
null
wsgi_docker.py
popenc/stack_example
3ee6a98d68ad0d7adb9c4e44c3fc7a14052f74a6
[ "MIT" ]
null
null
null
""" WSGI config for UberDjango project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application # from temp_config.set_environment ...
30.157895
78
0.808028
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings_docker") application = get_wsgi_application()
true
true
1c2801306e4fb98e294378c68eb7e30d9f1885ac
18,746
py
Python
examples/deprecated_tutorials/tutorial_imagenet_inceptionV3_distributed.py
KuKuXia/tensorlayer
654de4a37892cde54495350f99f5f3b38b2c6eb3
[ "Apache-2.0" ]
1
2019-10-21T13:33:52.000Z
2019-10-21T13:33:52.000Z
examples/deprecated_tutorials/tutorial_imagenet_inceptionV3_distributed.py
Mesica/tensorlayer
c5def14c4d66d150863f975d9001a5e1891d003f
[ "Apache-2.0" ]
null
null
null
examples/deprecated_tutorials/tutorial_imagenet_inceptionV3_distributed.py
Mesica/tensorlayer
c5def14c4d66d150863f975d9001a5e1891d003f
[ "Apache-2.0" ]
null
null
null
#! /usr/bin/python # -*- coding: utf-8 -*- """Example of training an Inception V3 model with ImageNet. The parameters are set as in the best results of the paper: https://arxiv.org/abs/1512.00567 The dataset can be downloaded from http://www.image-net.org/ or from the Kaggle competition: https://www.kaggle.com/c/imag...
41.381898
118
0.636136
import argparse import logging import multiprocessing import os import random import sys import time from xml.etree import ElementTree import numpy as np import tensorflow as tf import tensorlayer as tl from tensorflow.contrib import slim from tensorflow.contrib.slim.python.slim.nets.inception_v3 import (inception...
true
true
1c28019575994e8c5b665f5436d932adf08fff19
11,056
py
Python
aiida_lsmo/calcfunctions/ff_builder_module.py
kjappelbaum/aiida-lsmo
ea80d8401737ca3e585e716c313f2d0ac0467d5e
[ "MIT" ]
null
null
null
aiida_lsmo/calcfunctions/ff_builder_module.py
kjappelbaum/aiida-lsmo
ea80d8401737ca3e585e716c313f2d0ac0467d5e
[ "MIT" ]
null
null
null
aiida_lsmo/calcfunctions/ff_builder_module.py
kjappelbaum/aiida-lsmo
ea80d8401737ca3e585e716c313f2d0ac0467d5e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ff_builder calcfunction.""" import tempfile import shutil import os from math import sqrt import ruamel.yaml as yaml from aiida.orm import SinglefileData from aiida.engine import calcfunction from .ff_data_schema import FF_DATA_SCHEMA THISDIR = os.path.dirname(os.path.abspath(__file__)) ...
46.453782
119
0.640648
import tempfile import shutil import os from math import sqrt import ruamel.yaml as yaml from aiida.orm import SinglefileData from aiida.engine import calcfunction from .ff_data_schema import FF_DATA_SCHEMA THISDIR = os.path.dirname(os.path.abspath(__file__)) def check_ff_list(inp_list): out_list = [] for...
true
true
1c28021249ed315da18c34ef5608b75650974b78
3,999
py
Python
sympy/matrices/expressions/matadd.py
Corwinpro/sympy
a2efa19333fa0b3b18db872efabbb46248cde63b
[ "BSD-3-Clause" ]
2
2019-10-18T12:45:34.000Z
2020-08-10T08:27:59.000Z
sympy/matrices/expressions/matadd.py
Corwinpro/sympy
a2efa19333fa0b3b18db872efabbb46248cde63b
[ "BSD-3-Clause" ]
7
2015-03-23T23:33:02.000Z
2019-02-09T00:19:41.000Z
sympy/matrices/expressions/matadd.py
Corwinpro/sympy
a2efa19333fa0b3b18db872efabbb46248cde63b
[ "BSD-3-Clause" ]
1
2019-10-18T12:39:41.000Z
2019-10-18T12:39:41.000Z
from __future__ import print_function, division from sympy.core.compatibility import reduce from operator import add from sympy.core import Add, Basic, sympify from sympy.functions import adjoint from sympy.matrices.matrices import MatrixBase from sympy.matrices.expressions.transpose import transpose from sympy.strat...
29.189781
79
0.607652
from __future__ import print_function, division from sympy.core.compatibility import reduce from operator import add from sympy.core import Add, Basic, sympify from sympy.functions import adjoint from sympy.matrices.matrices import MatrixBase from sympy.matrices.expressions.transpose import transpose from sympy.strat...
true
true
1c280284932405806332fdc04d35d7a64ff73b2e
1,145
py
Python
HW1/Q4/LMS.py
wuweialways17/EE5904-neural-networks
ec733a725de3631b3d364ceae13a76a24171f184
[ "MIT" ]
null
null
null
HW1/Q4/LMS.py
wuweialways17/EE5904-neural-networks
ec733a725de3631b3d364ceae13a76a24171f184
[ "MIT" ]
null
null
null
HW1/Q4/LMS.py
wuweialways17/EE5904-neural-networks
ec733a725de3631b3d364ceae13a76a24171f184
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Thu Jan 28 17:37:39 2021 @author: wwis17 """ """LMS method""" import numpy as np import matplotlib.pyplot as plt # x = [bias, x] X = np.array([[1,0.5],[1,1.5],[1,3.0],[1,4.0],[1,5.0]]) d = np.array([8.0,6.0,5,2,0.5]) #learning rate lr = 0.02 w = np.array([...
21.603774
63
0.578166
import numpy as np import matplotlib.pyplot as plt X = np.array([[1,0.5],[1,1.5],[1,3.0],[1,4.0],[1,5.0]]) d = np.array([8.0,6.0,5,2,0.5]) lr = 0.02 w = np.array([1.0,1.0]) print("the initial weights is:", w) weight_change = np.copy(w) for j in range(100): for i in range(5): e = d...
true
true
1c2802a359fbbfad61cf899e38bfda3616dc9833
4,488
py
Python
cvtools/label_convert/jiang_to_coco.py
gfjiangly/cvtools
071a157ecd9bed4c031244861db91dd212050245
[ "Apache-2.0" ]
38
2019-07-10T09:37:00.000Z
2022-01-06T02:58:58.000Z
cvtools/label_convert/jiang_to_coco.py
gfjiangly/cvtools
071a157ecd9bed4c031244861db91dd212050245
[ "Apache-2.0" ]
4
2019-12-27T03:26:37.000Z
2020-10-17T03:43:12.000Z
cvtools/label_convert/jiang_to_coco.py
gfjiangly/cvtools
071a157ecd9bed4c031244861db91dd212050245
[ "Apache-2.0" ]
5
2019-09-23T08:07:38.000Z
2021-07-19T10:01:04.000Z
# -*- coding:utf-8 -*- # author: gfjiangly # time: 2019/5/9 15:21 # e-mail: jgf0719@foxmail.com # software: PyCharm import json import os from tqdm import tqdm from PIL import Image from cvtools.file_io.read import read_files_to_list from cvtools.utils.timer import get_time_str from cvtools.file_io.read import read_k...
35.619048
80
0.521613
import json import os from tqdm import tqdm from PIL import Image from cvtools.file_io.read import read_files_to_list from cvtools.utils.timer import get_time_str from cvtools.file_io.read import read_key_value class Jiang2COCO(object): def __init__(self, root, files, cls_map='', path_replace=None): ...
true
true
1c280319eb54f304deb68fe67f202093ca3d6614
113
py
Python
bibcheck/test.py
xinmingxu/CDL-bibliography
f3537c5970d3af8728c0aadb237ebe30962cb0c8
[ "MIT" ]
null
null
null
bibcheck/test.py
xinmingxu/CDL-bibliography
f3537c5970d3af8728c0aadb237ebe30962cb0c8
[ "MIT" ]
null
null
null
bibcheck/test.py
xinmingxu/CDL-bibliography
f3537c5970d3af8728c0aadb237ebe30962cb0c8
[ "MIT" ]
null
null
null
from helpers import check_bib errors, corrected = check_bib('cdl.bib') assert len(errors) == 0, 'check failed!'
22.6
40
0.734513
from helpers import check_bib errors, corrected = check_bib('cdl.bib') assert len(errors) == 0, 'check failed!'
true
true
1c2803bc4ad2003e1463ad623b2abf1f5bcd83de
3,667
py
Python
my_classes/.history/Tuples/name_tuples_20210722133321.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
my_classes/.history/Tuples/name_tuples_20210722133321.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
my_classes/.history/Tuples/name_tuples_20210722133321.py
minefarmer/deep-Dive-1
b0675b853180c5b5781888266ea63a3793b8d855
[ "Unlicense" ]
null
null
null
""" Tuple as Data Structure We have see how we interpreted tuples as data structures The position of the object contained in the tuple gives it meaning For example, we can represent a 2D coordinate as: (10, 20) x y If pt is a position tuple, we can re...
33.336364
154
0.619853
""" Tuple as Data Structure We have see how we interpreted tuples as data structures The position of the object contained in the tuple gives it meaning For example, we can represent a 2D coordinate as: (10, 20) x y If pt is a position tuple, we can re...
false
true
1c2803e0f835e81f04ed4dd49c587fe38f7c5348
686
py
Python
app/core/migrations/0003_ingredient.py
marcom04/recipe-app-api
a98304a5780ed4d769802e4a474b849b59537e7f
[ "MIT" ]
null
null
null
app/core/migrations/0003_ingredient.py
marcom04/recipe-app-api
a98304a5780ed4d769802e4a474b849b59537e7f
[ "MIT" ]
null
null
null
app/core/migrations/0003_ingredient.py
marcom04/recipe-app-api
a98304a5780ed4d769802e4a474b849b59537e7f
[ "MIT" ]
null
null
null
# Generated by Django 2.1.15 on 2021-06-17 13:36 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0002_tag'), ] operations = [ migrations.CreateModel( ...
28.583333
118
0.618076
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0002_tag'), ] operations = [ migrations.CreateModel( name='Ingredient', fields=[ ...
true
true
1c280405522f672be4bc5f49ab410d80eb250c4b
7,455
py
Python
homeassistant/components/mqtt/lock.py
andersop91/core
0e0ef0aa17073609eae7c974cf4c73306b7c414b
[ "Apache-2.0" ]
4
2021-07-11T09:11:00.000Z
2022-02-27T14:43:50.000Z
homeassistant/components/mqtt/lock.py
andersop91/core
0e0ef0aa17073609eae7c974cf4c73306b7c414b
[ "Apache-2.0" ]
277
2021-10-04T06:39:33.000Z
2021-12-28T22:04:17.000Z
homeassistant/components/mqtt/lock.py
andersop91/core
0e0ef0aa17073609eae7c974cf4c73306b7c414b
[ "Apache-2.0" ]
1
2022-01-12T22:14:01.000Z
2022-01-12T22:14:01.000Z
"""Support for MQTT locks.""" from __future__ import annotations import functools import voluptuous as vol from homeassistant.components import lock from homeassistant.components.lock import SUPPORT_OPEN, LockEntity from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_NAME, CONF_...
32.986726
85
0.670423
from __future__ import annotations import functools import voluptuous as vol from homeassistant.components import lock from homeassistant.components.lock import SUPPORT_OPEN, LockEntity from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_NAME, CONF_OPTIMISTIC, CONF_VALUE_TEMPLAT...
true
true
1c280416447e1cb8b8c344345d542f83b8896d9b
5,561
py
Python
tests/test_io_async.py
emmanuelmathot/rio-tiler
5d8dc218e4a9dc2dbbeba514f234a304fd43eacc
[ "BSD-3-Clause" ]
null
null
null
tests/test_io_async.py
emmanuelmathot/rio-tiler
5d8dc218e4a9dc2dbbeba514f234a304fd43eacc
[ "BSD-3-Clause" ]
null
null
null
tests/test_io_async.py
emmanuelmathot/rio-tiler
5d8dc218e4a9dc2dbbeba514f234a304fd43eacc
[ "BSD-3-Clause" ]
null
null
null
"""Test Async BaseClass.""" import asyncio import functools import os import typing from typing import Any, Coroutine, Dict, List, Tuple, Type import attr import morecantile import pytest from rio_tiler import constants from rio_tiler.io import AsyncBaseReader, COGReader from rio_tiler.models import ImageData, Image...
34.116564
96
0.593418
import asyncio import functools import os import typing from typing import Any, Coroutine, Dict, List, Tuple, Type import attr import morecantile import pytest from rio_tiler import constants from rio_tiler.io import AsyncBaseReader, COGReader from rio_tiler.models import ImageData, ImageStatistics, Info try: i...
true
true
1c28045c9e1cf414ff38aac53b7c4bc33b5b09cb
726
py
Python
test/test_pdb.py
ekwan/cctk
85cb8d0b714a80e8e353987dc24006695f1d0532
[ "Apache-2.0" ]
10
2020-01-16T15:26:57.000Z
2022-01-15T23:12:00.000Z
test/test_pdb.py
ekwan/cctk
85cb8d0b714a80e8e353987dc24006695f1d0532
[ "Apache-2.0" ]
2
2020-05-27T21:04:36.000Z
2020-09-26T20:49:53.000Z
test/test_pdb.py
ekwan/cctk
85cb8d0b714a80e8e353987dc24006695f1d0532
[ "Apache-2.0" ]
2
2020-09-24T18:44:18.000Z
2021-08-05T20:35:51.000Z
import unittest, sys, os import cctk class TestPDB(unittest.TestCase): def test_write_traj(self): path = "test/static/gaussian_file.out" file = cctk.GaussianFile.read_file(path) mols = file.ensemble self.assertTrue(isinstance(mols, cctk.ConformationalEnsemble)) old_path = "...
26.888889
70
0.603306
import unittest, sys, os import cctk class TestPDB(unittest.TestCase): def test_write_traj(self): path = "test/static/gaussian_file.out" file = cctk.GaussianFile.read_file(path) mols = file.ensemble self.assertTrue(isinstance(mols, cctk.ConformationalEnsemble)) old_path = "...
true
true
1c2805e63a156ed6fa49859e82af76e38d4b2deb
7,232
py
Python
src/sage/combinat/ncsf_qsym/combinatorics.py
bopopescu/classic_diff_geom
2b1d88becbc8cb30962e0995cc78e429e0f5589f
[ "BSL-1.0" ]
2
2015-08-11T05:05:47.000Z
2019-05-15T17:27:25.000Z
src/sage/combinat/ncsf_qsym/combinatorics.py
bopopescu/classic_diff_geom
2b1d88becbc8cb30962e0995cc78e429e0f5589f
[ "BSL-1.0" ]
null
null
null
src/sage/combinat/ncsf_qsym/combinatorics.py
bopopescu/classic_diff_geom
2b1d88becbc8cb30962e0995cc78e429e0f5589f
[ "BSL-1.0" ]
1
2020-07-24T12:08:30.000Z
2020-07-24T12:08:30.000Z
r""" Common combinatorial tools REFERENCES: .. [NCSF] Gelfand, Krob, Lascoux, Leclerc, Retakh, Thibon, *Noncommutative Symmetric Functions*, Adv. Math. 112 (1995), no. 2, 218-348. .. [QSCHUR] Haglund, Luoto, Mason, van Willigenburg, *Quasisymmetric Schur functions*, J. Comb. Theory Ser. A 118 (2011), 463-490....
27.498099
86
0.611449
from sage.misc.misc_c import prod from sage.functions.other import factorial from sage.misc.cachefunc import cached_function from sage.combinat.composition import Composition, Compositions from sage.combinat.composition_tableau import CompositionTableaux def coeff_pi(J,I): return prod(prod(K.partial_sums()) ...
true
true
1c28071d6d285075c9b1d094b5173f6574a6bf1a
5,566
py
Python
audiomnist/io/preprocess_data.py
nicogab34/AudioMNIST
39d8bf5eb2bf5d8a32d21d3d5549935cb4a62931
[ "MIT" ]
null
null
null
audiomnist/io/preprocess_data.py
nicogab34/AudioMNIST
39d8bf5eb2bf5d8a32d21d3d5549935cb4a62931
[ "MIT" ]
null
null
null
audiomnist/io/preprocess_data.py
nicogab34/AudioMNIST
39d8bf5eb2bf5d8a32d21d3d5549935cb4a62931
[ "MIT" ]
1
2019-09-17T15:26:35.000Z
2019-09-17T15:26:35.000Z
# -*- coding: utf-8 -*- import numpy as np import glob import os import sys import scipy.io.wavfile as wavf import scipy.signal import h5py import json import librosa import tensorflow as tf from tqdm import tqdm tf.enable_eager_execution() # The following functions can be used to convert a value to a type compatibl...
34.147239
109
0.623967
import numpy as np import glob import os import sys import scipy.io.wavfile as wavf import scipy.signal import h5py import json import librosa import tensorflow as tf from tqdm import tqdm tf.enable_eager_execution() def _bytes_feature(value): return tf.train.Feature(bytes_list=tf.train.BytesList(value=[value]...
true
true
1c280e7415d74b1027b360bcaeea0c453706a05e
5,774
py
Python
core/doctype/event/event.py
hafeez3000/wnframework
1160c108fef8f4956f5e14a072ea43e75230b9eb
[ "MIT" ]
6
2015-08-24T23:10:57.000Z
2019-11-10T06:57:23.000Z
core/doctype/event/event.py
hafeez3000/wnframework
1160c108fef8f4956f5e14a072ea43e75230b9eb
[ "MIT" ]
null
null
null
core/doctype/event/event.py
hafeez3000/wnframework
1160c108fef8f4956f5e14a072ea43e75230b9eb
[ "MIT" ]
5
2015-01-05T06:59:45.000Z
2020-11-07T15:15:07.000Z
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import webnotes from webnotes.utils import getdate, cint, add_months, date_diff, add_days, nowdate weekdays = ["monday", "tuesday", "wednesday", "thursday", "friday", "saturd...
34.369048
119
0.651541
from __future__ import unicode_literals import webnotes from webnotes.utils import getdate, cint, add_months, date_diff, add_days, nowdate weekdays = ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"] class DocType: def __init__(self, d, dl): self.doc, self.doclist = d, dl def v...
true
true
1c280eef98582bad4c3db59a50118abec624dd55
3,633
py
Python
src/utils/k_random.py
NOVAglow/kaster
5860f9c2fc049b7ef726cbaa8792c075b610fd5f
[ "MIT" ]
null
null
null
src/utils/k_random.py
NOVAglow/kaster
5860f9c2fc049b7ef726cbaa8792c075b610fd5f
[ "MIT" ]
3
2017-10-13T13:19:23.000Z
2018-04-02T12:01:25.000Z
src/utils/k_random.py
NOVAglow/kaster
5860f9c2fc049b7ef726cbaa8792c075b610fd5f
[ "MIT" ]
null
null
null
""" utils/k_random.py - Random string generating facility for Kaster Copyright (C) 2017-2018 Nguyen Hoang Duong <novakglow@gmail.com> Licensed under MIT License (see LICENSE). """ from string import ascii_uppercase, ascii_lowercase, digits, punctuation, hexdigits from random import choice, randint def random_string...
38.648936
116
0.652629
from string import ascii_uppercase, ascii_lowercase, digits, punctuation, hexdigits from random import choice, randint def random_string(*args): if args[0] == "ns": return random_string(randint(1, 30), True, True, True, True) if args[0] == "ps": if len(args) == 1: retu...
true
true
1c2810076267faf13adba1ab729b2c286ab3d05b
169
py
Python
gif/start.py
MisterZhouZhou/pythonLearn
8933c7a6d444d3d86a173984e6cf4c08dbf84039
[ "Apache-2.0" ]
1
2019-07-09T09:59:39.000Z
2019-07-09T09:59:39.000Z
gif/start.py
MisterZhouZhou/pythonLearn
8933c7a6d444d3d86a173984e6cf4c08dbf84039
[ "Apache-2.0" ]
null
null
null
gif/start.py
MisterZhouZhou/pythonLearn
8933c7a6d444d3d86a173984e6cf4c08dbf84039
[ "Apache-2.0" ]
null
null
null
import subprocess if __name__ == '__main__': subprocess.call("python3 index.py -p /Users/zhouwei/Desktop/python/pythonLearn/gif/test.jpg -t 16 -s 1.25", shell=True)
42.25
123
0.739645
import subprocess if __name__ == '__main__': subprocess.call("python3 index.py -p /Users/zhouwei/Desktop/python/pythonLearn/gif/test.jpg -t 16 -s 1.25", shell=True)
true
true