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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
08f37038334d7b1bc763c9bba538d9e2fad33de3 | 1,722 | py | Python | setup.py | eitin-infant/FinRL-Meta | 4c94011e58425796e7e2e5c1bf848afd65c828d6 | [
"MIT"
] | 50 | 2021-02-16T11:45:27.000Z | 2021-09-02T18:15:42.000Z | setup.py | eitin-infant/FinRL-Meta | 4c94011e58425796e7e2e5c1bf848afd65c828d6 | [
"MIT"
] | 2 | 2021-09-23T03:40:10.000Z | 2021-09-29T09:23:41.000Z | setup.py | eitin-infant/FinRL-Meta | 4c94011e58425796e7e2e5c1bf848afd65c828d6 | [
"MIT"
] | 18 | 2021-03-05T04:03:25.000Z | 2021-08-28T15:10:59.000Z | from setuptools import setup
# Read requirements.txt, ignore comments
# try:
# REQUIRES = list()
# f = open("requirements.txt", "rb")
# for line in f.read().decode("utf-8").split("\n"):
# line = line.strip()
# if "#" in line:
# line = line[: line.find("#")].strip()
# if... | 39.136364 | 132 | 0.632404 | from setuptools import setup
setup(
name="finrl_meta",
version="0.3.0",
author="Xiaoyang Liu, Jingyang Rui, Hongyang Yang",
author_email="hy2500@columbia.edu",
url="https://github.com/AI4Finance-Foundation/FinRL-Meta",
license="MIT",
description="FinRL-Meta: A Universe of Near Re... | true | true |
08f37126177ac6772d5bb69eed5fddb308c6f488 | 898 | py | Python | main.py | edu-fedorae/paging-calculator | 32f253f1d8924cfed451ae11b83cc923e2d9fdc8 | [
"MIT"
] | null | null | null | main.py | edu-fedorae/paging-calculator | 32f253f1d8924cfed451ae11b83cc923e2d9fdc8 | [
"MIT"
] | null | null | null | main.py | edu-fedorae/paging-calculator | 32f253f1d8924cfed451ae11b83cc923e2d9fdc8 | [
"MIT"
] | null | null | null | print("\n ##### Paging Calculator ##### \n")
# Request input
kb = input(" Enter kb [i.e., 4, 8]: ")
virtual_address = input(" Enter virtual address [i.e., 20000]: ")
# Operating functions
page_kd = (int(kb) * 1024)
virtual_page_number = (int(virtual_address) / page_kd)
offset = (int(virtual_address) % page_kd)
# Dis... | 34.538462 | 132 | 0.658129 | print("\n ##### Paging Calculator ##### \n")
kb = input(" Enter kb [i.e., 4, 8]: ")
virtual_address = input(" Enter virtual address [i.e., 20000]: ")
page_kd = (int(kb) * 1024)
virtual_page_number = (int(virtual_address) / page_kd)
offset = (int(virtual_address) % page_kd)
print("\n ##### Operations ##### \n")
print... | true | true |
08f372893e290eb5423720388a5b4bd526542b96 | 2,337 | py | Python | cogs/funny.py | GioUwU/MiPrimerBot | 6a44c97d9bbf5f36181aea1385a034a4bdff7ef1 | [
"Apache-2.0"
] | 4 | 2021-07-19T23:19:53.000Z | 2022-01-14T15:29:46.000Z | cogs/funny.py | GioUwU/MiPrimerBot | 6a44c97d9bbf5f36181aea1385a034a4bdff7ef1 | [
"Apache-2.0"
] | null | null | null | cogs/funny.py | GioUwU/MiPrimerBot | 6a44c97d9bbf5f36181aea1385a034a4bdff7ef1 | [
"Apache-2.0"
] | null | null | null | # Recuerda que cargaremos los modulos que usaremos
from discord.ext import commands
import discord
import random
"""
Aca crearemos la clase:
1- La clase normalmente es el nombre del archivo:
Class funny(commands.Cog):
2- Una vez escrita le agregamos un def:
class funny(commands.Cog):
def __init__(se... | 27.821429 | 184 | 0.652546 | from discord.ext import commands
import discord
import random
"""
Aca crearemos la clase:
1- La clase normalmente es el nombre del archivo:
Class funny(commands.Cog):
2- Una vez escrita le agregamos un def:
class funny(commands.Cog):
def __init__(self, bot):
3- por ultimo creamos una variable ... | false | true |
08f372897d567ee68b703918376bb6b4a235ab6e | 952 | py | Python | tests/test_tutorial/test_custom_response/test_tutorial001b.py | jfunez/fastapi | 7372f6ba11abb515a7f11814dba52a1d1c0925f0 | [
"MIT"
] | 2 | 2020-04-09T07:11:28.000Z | 2020-12-12T14:04:35.000Z | tests/test_tutorial/test_custom_response/test_tutorial001b.py | jfunez/fastapi | 7372f6ba11abb515a7f11814dba52a1d1c0925f0 | [
"MIT"
] | 1 | 2021-03-27T18:37:32.000Z | 2021-05-25T15:08:24.000Z | tests/test_tutorial/test_custom_response/test_tutorial001b.py | jfunez/fastapi | 7372f6ba11abb515a7f11814dba52a1d1c0925f0 | [
"MIT"
] | 1 | 2021-02-03T00:43:04.000Z | 2021-02-03T00:43:04.000Z | from fastapi.testclient import TestClient
from custom_response.tutorial001b import app
client = TestClient(app)
openapi_schema = {
"openapi": "3.0.2",
"info": {"title": "FastAPI", "version": "0.1.0"},
"paths": {
"/items/": {
"get": {
"responses": {
... | 25.72973 | 72 | 0.515756 | from fastapi.testclient import TestClient
from custom_response.tutorial001b import app
client = TestClient(app)
openapi_schema = {
"openapi": "3.0.2",
"info": {"title": "FastAPI", "version": "0.1.0"},
"paths": {
"/items/": {
"get": {
"responses": {
... | true | true |
08f37314e3a4449f1a32724631a750d65817b63b | 23,028 | py | Python | verisure/session.py | samuellinde/python-verisure | d1e73717a9baa6d02db46a305ee297051d747119 | [
"MIT"
] | 2 | 2018-09-15T09:15:10.000Z | 2020-02-01T16:11:11.000Z | verisure/session.py | jamiewalters/python-verisure | be0de11cf3fc9102db857cbd787bfcf861420d52 | [
"MIT"
] | null | null | null | verisure/session.py | jamiewalters/python-verisure | be0de11cf3fc9102db857cbd787bfcf861420d52 | [
"MIT"
] | null | null | null | '''
Verisure session, using verisure app api
'''
import base64
import json
import requests
from . import urls
import os
def _validate_response(response):
""" Verify that response is OK """
if response.status_code == 200:
return
raise ResponseError(response.status_code, response.text)
class Erro... | 35.813375 | 79 | 0.536477 |
import base64
import json
import requests
from . import urls
import os
def _validate_response(response):
if response.status_code == 200:
return
raise ResponseError(response.status_code, response.text)
class Error(Exception):
pass
class RequestError(Error):
pass
class LoginError(Error):
... | true | true |
08f37428dce8b98f6c4b8b683742aaff48295617 | 24,627 | py | Python | alpaca_trade_api/stream.py | brianhumphreys/alpaca-trade-api-python | 8262f8662ea5283f51af5ffdccd0ec0d28408cc2 | [
"Apache-2.0"
] | 1 | 2021-11-28T16:47:06.000Z | 2021-11-28T16:47:06.000Z | alpaca_trade_api/stream.py | brianhumphreys/alpaca-trade-api-python | 8262f8662ea5283f51af5ffdccd0ec0d28408cc2 | [
"Apache-2.0"
] | null | null | null | alpaca_trade_api/stream.py | brianhumphreys/alpaca-trade-api-python | 8262f8662ea5283f51af5ffdccd0ec0d28408cc2 | [
"Apache-2.0"
] | null | null | null | """
Stream V2
For historic reasons stream2.py contains the old api version.
Don't get confused
"""
import asyncio
import logging
import json
from typing import List, Optional
import msgpack
import re
import websockets
import queue
from .common import get_base_url, get_data_stream_url, get_credentials, URL
from .entity... | 35.031294 | 90 | 0.540951 | import asyncio
import logging
import json
from typing import List, Optional
import msgpack
import re
import websockets
import queue
from .common import get_base_url, get_data_stream_url, get_credentials, URL
from .entity import Entity
from .entity_v2 import quote_mapping_v2, trade_mapping_v2, bar_mapping_v2, \
sta... | true | true |
08f375529cb575047887ade06bd9559a40c8359d | 490 | py | Python | star_navi_backend/star_navi_backend/urls.py | Four-Velocity/star_navi_test | 9765d23442b31ffbb2148c3ffab7c3b6b30214ae | [
"Unlicense"
] | null | null | null | star_navi_backend/star_navi_backend/urls.py | Four-Velocity/star_navi_test | 9765d23442b31ffbb2148c3ffab7c3b6b30214ae | [
"Unlicense"
] | null | null | null | star_navi_backend/star_navi_backend/urls.py | Four-Velocity/star_navi_test | 9765d23442b31ffbb2148c3ffab7c3b6b30214ae | [
"Unlicense"
] | null | null | null | from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static
from s_network.views import Validation
urlpatterns = [
path('admin/', admin.site.urls),
path('api/', include('s_network.urls')),
path('auth/', include('djoser.u... | 35 | 65 | 0.728571 | from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static
from s_network.views import Validation
urlpatterns = [
path('admin/', admin.site.urls),
path('api/', include('s_network.urls')),
path('auth/', include('djoser.u... | true | true |
08f37662dc549109c74be40b2035ccf84f2f2dfa | 6,153 | py | Python | tests/api_data/dsm_6/core/const_6_core_share.py | kuchel77/python-synology | 0676d94127cb8814e1d32c38cb62539b5ead68c3 | [
"MIT"
] | 1 | 2021-12-19T17:24:34.000Z | 2021-12-19T17:24:34.000Z | tests/api_data/dsm_6/core/const_6_core_share.py | kuchel77/python-synology | 0676d94127cb8814e1d32c38cb62539b5ead68c3 | [
"MIT"
] | null | null | null | tests/api_data/dsm_6/core/const_6_core_share.py | kuchel77/python-synology | 0676d94127cb8814e1d32c38cb62539b5ead68c3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""DSM 6 SYNO.Core.Share data."""
DSM_6_CORE_SHARE = {
"data": {
"shares": [
{
"desc": "Docker Containers",
"enable_recycle_bin": False,
"enable_share_compress": False,
"enable_share_cow": True,
... | 37.981481 | 63 | 0.444661 |
DSM_6_CORE_SHARE = {
"data": {
"shares": [
{
"desc": "Docker Containers",
"enable_recycle_bin": False,
"enable_share_compress": False,
"enable_share_cow": True,
"enc_auto_mount": False,
"encryption":... | true | true |
08f376fe1d6dd7e8aa27274f1e286d0f8dd3bba7 | 9,531 | py | Python | robotiq_85_gripper-master/robotiq_85_driver/src/robotiq_85/robotiq_85_driver.py | harrycomeon/apriltags2_ros | 8aeda468497042a22d953b14c604c1f3f8afdaf0 | [
"BSD-2-Clause-FreeBSD"
] | 4 | 2019-06-26T01:43:23.000Z | 2022-03-27T12:29:55.000Z | robotiq_85_gripper-master/robotiq_85_driver/src/robotiq_85/robotiq_85_driver.py | harrycomeon/apriltags2_ros | 8aeda468497042a22d953b14c604c1f3f8afdaf0 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | robotiq_85_gripper-master/robotiq_85_driver/src/robotiq_85/robotiq_85_driver.py | harrycomeon/apriltags2_ros | 8aeda468497042a22d953b14c604c1f3f8afdaf0 | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2020-01-08T16:09:11.000Z | 2020-07-20T09:20:49.000Z | """--------------------------------------------------------------------
COPYRIGHT 2015 Stanley Innovation Inc.
Software License Agreement:
The software supplied herewith by Stanley Innovation Inc. (the "Company")
for its licensed Segway RMP Robotic Platforms is intended and supplied to you,
the Company's customer, ... | 44.125 | 123 | 0.620502 | from robotiq_85_gripper import Robotiq85Gripper
from robotiq_85_msgs.msg import GripperCmd, GripperStat
from sensor_msgs.msg import JointState
import numpy as np
import rospy
class Robotiq85Driver:
def __init__(self):
self._num_grippers = rospy.get_param('~num_grippers',1)
self._comport = rospy.get... | true | true |
08f3777e9ac0b81580f1054878d064aec1a071d1 | 5,335 | py | Python | src/data/preprocess.py | Jacobjeevan/Reddit-Gild-Predictor | 4ef1ba76a51b48a4f37df04ddc059119a2ab5034 | [
"MIT"
] | 2 | 2020-05-06T17:49:15.000Z | 2020-05-06T17:50:20.000Z | src/data/preprocess.py | Jacobjeevan/Reddit-Gild-Predictor | 4ef1ba76a51b48a4f37df04ddc059119a2ab5034 | [
"MIT"
] | null | null | null | src/data/preprocess.py | Jacobjeevan/Reddit-Gild-Predictor | 4ef1ba76a51b48a4f37df04ddc059119a2ab5034 | [
"MIT"
] | 1 | 2020-04-18T02:06:58.000Z | 2020-04-18T02:06:58.000Z | import pandas as pd
import argparse
from CommentData import CommentData
from AuthorData import AuthorData
from GildData import GildData
from ThreadData import ThreadData
from sklearn.base import BaseEstimator, TransformerMixin
from sklearn.model_selection import StratifiedShuffleSplit
from pathlib import Path
class p... | 41.356589 | 131 | 0.681162 | import pandas as pd
import argparse
from CommentData import CommentData
from AuthorData import AuthorData
from GildData import GildData
from ThreadData import ThreadData
from sklearn.base import BaseEstimator, TransformerMixin
from sklearn.model_selection import StratifiedShuffleSplit
from pathlib import Path
class p... | true | true |
08f378081674b24d8ec61b06405fa2e5072d09fc | 2,683 | py | Python | models/lsgan.py | xingmimfl/pytorch_LSGAN | a744cd05c925111e807613f7fb4ed42cd99589c6 | [
"BSD-3-Clause"
] | 1 | 2019-03-05T09:26:08.000Z | 2019-03-05T09:26:08.000Z | models/lsgan.py | xingmimfl/pytorch_LSGAN | a744cd05c925111e807613f7fb4ed42cd99589c6 | [
"BSD-3-Clause"
] | null | null | null | models/lsgan.py | xingmimfl/pytorch_LSGAN | a744cd05c925111e807613f7fb4ed42cd99589c6 | [
"BSD-3-Clause"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.parallel
class LSGAN_D(nn.Module):
def __init__(self):
super(LSGAN_D, self).__init__()
layers = [
nn.Conv2d(in_channels=3, out_channels=64, kernel_size=5, stride=2,bias=False),
nn.BatchNorm2d(64),
nn.LeakyReLU(0.... | 39.455882 | 103 | 0.598211 | import torch
import torch.nn as nn
import torch.nn.parallel
class LSGAN_D(nn.Module):
def __init__(self):
super(LSGAN_D, self).__init__()
layers = [
nn.Conv2d(in_channels=3, out_channels=64, kernel_size=5, stride=2,bias=False),
nn.BatchNorm2d(64),
nn.LeakyReLU(0.... | true | true |
08f37a26ce2a05cad941e5994dd521de40b29cf7 | 882 | py | Python | kubernetes_asyncio/test/test_discovery_api.py | icamposrivera/kubernetes_asyncio | f028cc793e3a2c519be6a52a49fb77ff0b014c9b | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/test/test_discovery_api.py | icamposrivera/kubernetes_asyncio | f028cc793e3a2c519be6a52a49fb77ff0b014c9b | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/test/test_discovery_api.py | icamposrivera/kubernetes_asyncio | f028cc793e3a2c519be6a52a49fb77ff0b014c9b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v1.19.15
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unitt... | 22.05 | 124 | 0.716553 |
from __future__ import absolute_import
import unittest
import kubernetes_asyncio.client
from kubernetes_asyncio.client.api.discovery_api import DiscoveryApi from kubernetes_asyncio.client.rest import ApiException
class TestDiscoveryApi(unittest.TestCase):
def setUp(self):
self.api = kubernetes_asyn... | true | true |
08f37b1cda2a82adff268af3b0e9212c6779ae5c | 6,381 | py | Python | test/bilby_mcmc/test_proposals.py | LBJ-Wade/bilby | b1e02f1dfae03d4939cae9c95eff300c22919689 | [
"MIT"
] | 31 | 2019-02-28T00:48:23.000Z | 2022-03-29T09:41:28.000Z | test/bilby_mcmc/test_proposals.py | LBJ-Wade/bilby | b1e02f1dfae03d4939cae9c95eff300c22919689 | [
"MIT"
] | 8 | 2018-12-27T09:15:03.000Z | 2022-03-28T19:02:10.000Z | test/bilby_mcmc/test_proposals.py | LBJ-Wade/bilby | b1e02f1dfae03d4939cae9c95eff300c22919689 | [
"MIT"
] | 32 | 2018-11-30T00:58:53.000Z | 2022-03-29T09:41:30.000Z | import os
import copy
import shutil
import unittest
import inspect
import importlib
import sys
import time
import bilby
from bilby.bilby_mcmc.chain import Chain, Sample
from bilby.bilby_mcmc import proposals
from bilby.bilby_mcmc.utils import LOGLKEY, LOGPKEY
import numpy as np
class GivenProposal(proposals.BasePropo... | 33.408377 | 87 | 0.618085 | import os
import copy
import shutil
import unittest
import inspect
import importlib
import sys
import time
import bilby
from bilby.bilby_mcmc.chain import Chain, Sample
from bilby.bilby_mcmc import proposals
from bilby.bilby_mcmc.utils import LOGLKEY, LOGPKEY
import numpy as np
class GivenProposal(proposals.BasePropo... | true | true |
08f37d83fc5f739faca3266440190e3988c3cf11 | 431 | py | Python | django_resume/wsgi.py | ajbohara/django-resume | b4cf1a0f50dd1ec337e6f023815aea494b9d0bc7 | [
"MIT"
] | 1 | 2018-11-23T16:18:52.000Z | 2018-11-23T16:18:52.000Z | django_resume/wsgi.py | ajbohara/django-resume | b4cf1a0f50dd1ec337e6f023815aea494b9d0bc7 | [
"MIT"
] | 1 | 2020-11-27T07:12:00.000Z | 2020-11-27T07:12:00.000Z | django_resume/wsgi.py | ajbohara/django-resume | b4cf1a0f50dd1ec337e6f023815aea494b9d0bc7 | [
"MIT"
] | null | null | null | """
WSGI config for django_resume 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.8/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
from dj_static import Cling
o... | 23.944444 | 78 | 0.795824 |
import os
from django.core.wsgi import get_wsgi_application
from dj_static import Cling
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "django_resume.settings")
application = get_wsgi_application()
| true | true |
08f37dfb4c25decdb83bc9d09f94adecfad204ca | 20,432 | py | Python | Test6multi.py | BkyuChoi/HpicFlatland | bdbba7ce451eb72dc760993b96cec4772a08983c | [
"MIT"
] | null | null | null | Test6multi.py | BkyuChoi/HpicFlatland | bdbba7ce451eb72dc760993b96cec4772a08983c | [
"MIT"
] | null | null | null | Test6multi.py | BkyuChoi/HpicFlatland | bdbba7ce451eb72dc760993b96cec4772a08983c | [
"MIT"
] | null | null | null | import os
import random
import sys
from argparse import ArgumentParser, Namespace
from pathlib import Path
from pprint import pprint
from flatland.utils.rendertools import RenderTool
from torch.utils.tensorboard import SummaryWriter
import numpy as np
import torch
from flatland.envs.rail_env import RailEnv, RailEnvAc... | 43.196617 | 143 | 0.667776 | import os
import random
import sys
from argparse import ArgumentParser, Namespace
from pathlib import Path
from pprint import pprint
from flatland.utils.rendertools import RenderTool
from torch.utils.tensorboard import SummaryWriter
import numpy as np
import torch
from flatland.envs.rail_env import RailEnv, RailEnvAc... | true | true |
08f37e25ae6b6790e75987912660b0b42f57419e | 48,298 | py | Python | pipe-cli/pipe.py | evgeniimv/cloud-pipeline | 1390b7f9a208ee7ad5de8a9a8cd0412563ab288e | [
"Apache-2.0"
] | null | null | null | pipe-cli/pipe.py | evgeniimv/cloud-pipeline | 1390b7f9a208ee7ad5de8a9a8cd0412563ab288e | [
"Apache-2.0"
] | 12 | 2019-08-13T08:36:33.000Z | 2019-10-01T12:04:31.000Z | pipe-cli/pipe.py | evgeniimv/cloud-pipeline | 1390b7f9a208ee7ad5de8a9a8cd0412563ab288e | [
"Apache-2.0"
] | 2 | 2019-08-09T18:04:54.000Z | 2019-08-11T19:03:06.000Z | # Copyright 2017-2019 EPAM Systems, Inc. (https://www.epam.com/)
#
# 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 appli... | 46.845781 | 145 | 0.638639 |
import click
import requests
import sys
from prettytable import prettytable
from src.api.cluster import Cluster
from src.api.pipeline import Pipeline
from src.api.pipeline_run import PipelineRun
from src.api.user import User
from src.config import Config, ConfigNotFoundError, silent_print_config_info
from src.model.... | true | true |
08f37ec9025d4567a14ac72a8f45fefd1fe24b79 | 6,672 | py | Python | beanbag_docutils/sphinx/ext/intersphinx_utils.py | beanbaginc/beanbag-docutils | 7c6ea7ee8c222e86947d290058afe1bba45ea670 | [
"MIT"
] | null | null | null | beanbag_docutils/sphinx/ext/intersphinx_utils.py | beanbaginc/beanbag-docutils | 7c6ea7ee8c222e86947d290058afe1bba45ea670 | [
"MIT"
] | null | null | null | beanbag_docutils/sphinx/ext/intersphinx_utils.py | beanbaginc/beanbag-docutils | 7c6ea7ee8c222e86947d290058afe1bba45ea670 | [
"MIT"
] | null | null | null | """Sphinx extension to enhance intersphinx support.
This fixes some reference issues with :rst:role:`option` (see
https://github.com/sphinx-doc/sphinx/pull/3769 for the equivalent upstream
fix).
It also introduces a ``.. default-intersphinx::`` directive that allows for
specifying one or more intersphinx set prefixes... | 33.69697 | 77 | 0.6247 |
from __future__ import unicode_literals
import re
import six
from docutils.parsers.rst import Directive
from sphinx.errors import ExtensionError
from sphinx.ext import intersphinx
class DefaultIntersphinx(Directive):
required_arguments = 1
optional_arguments = 100
SPLIT_RE = re.compile(r',\s*')
... | true | true |
08f37f19537916c73c69b2c1da91124f32e1c920 | 2,741 | py | Python | agents/NN_EW.py | s0phia-/ipse | a2113762c63086d8d1614abb10ed9f898aef35f0 | [
"MIT"
] | 1 | 2021-12-03T09:56:54.000Z | 2021-12-03T09:56:54.000Z | agents/NN_EW.py | s0phia-/ipse | a2113762c63086d8d1614abb10ed9f898aef35f0 | [
"MIT"
] | null | null | null | agents/NN_EW.py | s0phia-/ipse | a2113762c63086d8d1614abb10ed9f898aef35f0 | [
"MIT"
] | null | null | null | import numpy as np
import random
import math
from agents.stew.utils import create_diff_matrix
class EwDefaultDict(dict):
def __missing__(self, key):
return create_diff_matrix(key)
class NeuralNetwork:
def __init__(self, x_size, y_size):
self.x = x # input
self.y = y # target
... | 30.797753 | 97 | 0.619482 | import numpy as np
import random
import math
from agents.stew.utils import create_diff_matrix
class EwDefaultDict(dict):
def __missing__(self, key):
return create_diff_matrix(key)
class NeuralNetwork:
def __init__(self, x_size, y_size):
self.x = x self.y = y self.weights_l... | true | true |
08f37f6658253c3afa93a42edae7d0f9949a9611 | 3,261 | py | Python | vyapp/plugins/spawn/unix_platform.py | iogf/vy | 4ba0d379e21744fd79a740e8aeaba3a0a779973c | [
"MIT"
] | 927 | 2015-02-22T17:34:21.000Z | 2018-03-23T07:26:17.000Z | vyapp/plugins/spawn/unix_platform.py | iogf/vy | 4ba0d379e21744fd79a740e8aeaba3a0a779973c | [
"MIT"
] | 22 | 2015-09-02T19:20:22.000Z | 2018-02-13T16:41:02.000Z | vyapp/plugins/spawn/unix_platform.py | iogf/vy | 4ba0d379e21744fd79a740e8aeaba3a0a779973c | [
"MIT"
] | 53 | 2015-09-02T12:26:32.000Z | 2018-01-18T09:11:30.000Z | """
Overview
========
Used to spawn new processes, this module works only on unix-like
platforms.
Commands
========
Command: hbash
Description: Start a new bash process whose output
is directed to a horizontal pane.
Command: vbash
Description: Start a new bash process whose output
is directed to a vertical pane.
C... | 25.27907 | 76 | 0.679853 |
from untwisted.file_writer import FileWriter
from untwisted.file_reader import FileReader
from untwisted.event import LOAD, CLOSE
from vyapp.plugins import Command
from untwisted.network import Device
from vyapp.plugins import ENV
from subprocess import Popen, PIPE, STDOUT
from os import environ, setsid, killpg
from v... | true | true |
08f3802c8b0bcade155ef37b09be232a2cf6daa0 | 363 | py | Python | atcoder/abc121_d/solution.py | yhmin84/codeforces | b582f365557982d0af09ff73b5ed5cc56e6ef6bf | [
"MIT"
] | null | null | null | atcoder/abc121_d/solution.py | yhmin84/codeforces | b582f365557982d0af09ff73b5ed5cc56e6ef6bf | [
"MIT"
] | null | null | null | atcoder/abc121_d/solution.py | yhmin84/codeforces | b582f365557982d0af09ff73b5ed5cc56e6ef6bf | [
"MIT"
] | null | null | null |
# refers to editorial
def xor_world(A, B):
if A == 0:
m = (B+1) // 2
pre = 0 if m % 2 == 0 else 1
if B % 2 == 1:
return pre
else:
return pre ^ B
else:
return xor_world(0, A-1) ^ xor_world(0, B)
if __name__ == "__main__":
A, B = map(int, in... | 18.15 | 50 | 0.4573 |
def xor_world(A, B):
if A == 0:
m = (B+1) // 2
pre = 0 if m % 2 == 0 else 1
if B % 2 == 1:
return pre
else:
return pre ^ B
else:
return xor_world(0, A-1) ^ xor_world(0, B)
if __name__ == "__main__":
A, B = map(int, input().split())
pri... | true | true |
08f3805ffa1d0e7fc6471f787478f665b79931a9 | 3,055 | py | Python | watchman/tests/integration/test_fields.py | mathewhodson/watchman | 7e831f2fe71deb6429819aa1f7856a5335b0111e | [
"Apache-2.0"
] | null | null | null | watchman/tests/integration/test_fields.py | mathewhodson/watchman | 7e831f2fe71deb6429819aa1f7856a5335b0111e | [
"Apache-2.0"
] | null | null | null | watchman/tests/integration/test_fields.py | mathewhodson/watchman | 7e831f2fe71deb6429819aa1f7856a5335b0111e | [
"Apache-2.0"
] | null | null | null | # vim:ts=4:sw=4:et:
# Copyright (c) Facebook, Inc. and its affiliates.
#
# 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 b... | 32.5 | 85 | 0.5018 |
from __future__ import absolute_import, division, print_function
import os
import WatchmanTestCase
@WatchmanTestCase.expand_matrix
class TestFields(WatchmanTestCase.WatchmanTestCase):
def test_fields(self):
root = self.mkdtemp()
self.watchmanCommand("watch", root)
self.touchRelative(roo... | true | true |
08f38071b2a8da62c505e4af94ddb8e4ceb92773 | 4,552 | py | Python | pydcmio/dcmreader/csa2.py | neurospin/caps-dcmio | 4ac4f203f3f360126cbcd4f0d72883291153c664 | [
"CECILL-B"
] | 5 | 2017-10-12T08:40:27.000Z | 2021-01-01T14:54:01.000Z | pydcmio/dcmreader/csa2.py | neurospin/caps-dcmio | 4ac4f203f3f360126cbcd4f0d72883291153c664 | [
"CECILL-B"
] | 2 | 2015-07-20T07:02:52.000Z | 2016-04-27T13:27:49.000Z | pydcmio/dcmreader/csa2.py | neurospin/caps-dcmio | 4ac4f203f3f360126cbcd4f0d72883291153c664 | [
"CECILL-B"
] | 3 | 2015-06-29T14:27:39.000Z | 2015-09-04T13:22:21.000Z | ##########################################################################
# NSAp - Copyright (C) CEA, 2013 - 2016
# Distributed under the terms of the CeCILL-B license, as published by
# the CEA-CNRS-INRIA. Refer to the LICENSE file or to
# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
# for details.
###... | 28.810127 | 74 | 0.543278 |
import os
import ast
import dicom
import struct
def get_siemens_csa2_header(dataset_or_dcmpath):
if isinstance(dataset_or_dcmpath, str):
if not os.path.isfile(dataset_or_dcmpath):
raise ValueError("'{0}' is not a valid Dicom file.".format(
dataset_or_dcmpath))
dat... | true | true |
08f383cc0302e5a0602e645b1cf8889566689af4 | 1,489 | py | Python | String/customSortString.py | konantian/LeetCode | f97609cfe139159bc000cac5b39a1d0c28517d24 | [
"MIT"
] | 2 | 2018-06-02T03:57:20.000Z | 2018-10-20T22:15:17.000Z | String/customSortString.py | konantian/leetcode | f97609cfe139159bc000cac5b39a1d0c28517d24 | [
"MIT"
] | null | null | null | String/customSortString.py | konantian/leetcode | f97609cfe139159bc000cac5b39a1d0c28517d24 | [
"MIT"
] | 1 | 2019-01-31T05:17:19.000Z | 2019-01-31T05:17:19.000Z | '''
Source : https://leetcode.com/problems/custom-sort-string/
Author : Yuan Wang
Date : 2019-05-18
/***************************************************************************************
S and T are strings composed of lowercase letters. In S, no letter occurs more than once.
S was sorted in some custom order pr... | 29.196078 | 90 | 0.564137 | def customSortString(S: str, T: str) -> str:
return "".join(sorted(T,key = lambda x:self.indexOf(x,S)))
def indexOf(char,S):
try:
return S.index(char)
except:
return -1
def customSortString(S: str, T: str) -> str:
counterT = collections.Counter(T)
result = ""
... | true | true |
08f3864f4da3a969f0aa68a3c98ce47487bad5ad | 2,977 | py | Python | gdplib/gdp_col/fenske.py | Yunshan-Liu/gdplib | f453abcde1906018635c2245414b707b69fa110c | [
"BSD-3-Clause"
] | 3 | 2020-11-15T22:21:39.000Z | 2021-06-02T22:05:50.000Z | gdplib/gdp_col/fenske.py | Yunshan-Liu/gdplib | f453abcde1906018635c2245414b707b69fa110c | [
"BSD-3-Clause"
] | null | null | null | gdplib/gdp_col/fenske.py | Yunshan-Liu/gdplib | f453abcde1906018635c2245414b707b69fa110c | [
"BSD-3-Clause"
] | 6 | 2020-05-24T13:17:25.000Z | 2022-02-17T16:18:07.000Z | from __future__ import division
from pyomo.environ import (ConcreteModel, NonNegativeReals, Set, SolverFactory,
Var, log, sqrt)
def calculate_Fenske(xD, xB):
m = ConcreteModel()
min_T, max_T = 300, 400
m.comps = Set(initialize=['benzene', 'toluene'])
m.trays = Set(initializ... | 33.829545 | 79 | 0.542492 | from __future__ import division
from pyomo.environ import (ConcreteModel, NonNegativeReals, Set, SolverFactory,
Var, log, sqrt)
def calculate_Fenske(xD, xB):
m = ConcreteModel()
min_T, max_T = 300, 400
m.comps = Set(initialize=['benzene', 'toluene'])
m.trays = Set(initializ... | true | true |
08f3871bcd9f0528d46d55f1a9d10c92151207db | 445 | py | Python | step5_inheritance/main.py | pting9y/python | a553b3048143f48ed617916335b13e31e4253eb2 | [
"MIT"
] | null | null | null | step5_inheritance/main.py | pting9y/python | a553b3048143f48ed617916335b13e31e4253eb2 | [
"MIT"
] | null | null | null | step5_inheritance/main.py | pting9y/python | a553b3048143f48ed617916335b13e31e4253eb2 | [
"MIT"
] | null | null | null | """
"""
#import sensors package
import sensors
def print_sensor_value(sensor):
print ("Sensor name: '{}' value: {}".format(sensor.name, sensor.data))
first_sensor =sensors.PressureSensor("Pressure sensor", 1)
second_sensor = sensors.TemperatureSensor("Temperature sensor", 1)
third_sensor = sensors.PressureSens... | 24.722222 | 74 | 0.782022 |
import sensors
def print_sensor_value(sensor):
print ("Sensor name: '{}' value: {}".format(sensor.name, sensor.data))
first_sensor =sensors.PressureSensor("Pressure sensor", 1)
second_sensor = sensors.TemperatureSensor("Temperature sensor", 1)
third_sensor = sensors.PressureSensor("Pressure sensor", 2)
print_... | true | true |
08f387c96bab15129e9b42ef7e8dad8132563ba1 | 3,846 | py | Python | seerpy/auth.py | matias-seer/seer-py | fbb018e683817d108f2e1ee3162680de06ce110c | [
"MIT"
] | null | null | null | seerpy/auth.py | matias-seer/seer-py | fbb018e683817d108f2e1ee3162680de06ce110c | [
"MIT"
] | null | null | null | seerpy/auth.py | matias-seer/seer-py | fbb018e683817d108f2e1ee3162680de06ce110c | [
"MIT"
] | null | null | null | # Copyright 2017 Seer Medical Pty Ltd, Inc. or its affiliates. All Rights Reserved.
import getpass
import os
import json
import requests
class SeerAuth:
def __init__(self, api_url, email=None, password=None):
self.api_url = api_url
self.cookie = None
self.read_cookie()
if self.... | 35.284404 | 88 | 0.567603 |
import getpass
import os
import json
import requests
class SeerAuth:
def __init__(self, api_url, email=None, password=None):
self.api_url = api_url
self.cookie = None
self.read_cookie()
if self.verify_login() == 200:
print('Login Successful')
return
... | true | true |
08f3884875be66820740db5c45fcdec4b521bae3 | 5,456 | py | Python | tests/asgi/test_query_execution.py | d-danilkin/ariadne | 62b1363752394439f21d8be1b48074b4ba280493 | [
"BSD-3-Clause"
] | 1,778 | 2018-07-09T09:54:24.000Z | 2022-03-31T18:22:56.000Z | tests/asgi/test_query_execution.py | d-danilkin/ariadne | 62b1363752394439f21d8be1b48074b4ba280493 | [
"BSD-3-Clause"
] | 639 | 2018-07-12T12:39:25.000Z | 2022-03-28T04:02:52.000Z | tests/asgi/test_query_execution.py | d-danilkin/ariadne | 62b1363752394439f21d8be1b48074b4ba280493 | [
"BSD-3-Clause"
] | 154 | 2018-08-10T18:50:49.000Z | 2022-03-31T17:48:14.000Z | import json
from starlette.testclient import TestClient
from ariadne.asgi import (
GQL_CONNECTION_ACK,
GQL_CONNECTION_INIT,
GQL_ERROR,
GQL_START,
GraphQL,
)
from ariadne.types import Extension
operation_name = "SayHello"
variables = {"name": "Bob"}
complex_query = """
query SayHello($name: Stri... | 29.652174 | 88 | 0.632881 | import json
from starlette.testclient import TestClient
from ariadne.asgi import (
GQL_CONNECTION_ACK,
GQL_CONNECTION_INIT,
GQL_ERROR,
GQL_START,
GraphQL,
)
from ariadne.types import Extension
operation_name = "SayHello"
variables = {"name": "Bob"}
complex_query = """
query SayHello($name: Stri... | true | true |
08f3885c238e5becdbe0c81e40348a125b13b794 | 1,393 | py | Python | setup.py | PTYin/ESRT | 4d3e5c523cef7bd15ea8ce10e5cf8b7e05ad2d5c | [
"BSD-2-Clause"
] | null | null | null | setup.py | PTYin/ESRT | 4d3e5c523cef7bd15ea8ce10e5cf8b7e05ad2d5c | [
"BSD-2-Clause"
] | null | null | null | setup.py | PTYin/ESRT | 4d3e5c523cef7bd15ea8ce10e5cf8b7e05ad2d5c | [
"BSD-2-Clause"
] | null | null | null | import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname), encoding='utf').read()
setup(
name="ESRT",
version="0.1.0",
author="Qingyao Ai",
author_email="aiqingyao@gmail.com",
description=("TODO"),
license="BSD",
... | 28.428571 | 116 | 0.525485 | import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname), encoding='utf').read()
setup(
name="ESRT",
version="0.1.0",
author="Qingyao Ai",
author_email="aiqingyao@gmail.com",
description=("TODO"),
license="BSD",
... | true | true |
08f3893211bd13d00308521b2ee46d16ad742b0d | 1,214 | py | Python | manilaclient/tests/unit/v1/test_share_types.py | SolKuczala/python-manilaclient | 9613c7fd2652dc3c7b8793c9af2b6357f42a4757 | [
"CNRI-Python",
"Apache-1.1"
] | null | null | null | manilaclient/tests/unit/v1/test_share_types.py | SolKuczala/python-manilaclient | 9613c7fd2652dc3c7b8793c9af2b6357f42a4757 | [
"CNRI-Python",
"Apache-1.1"
] | null | null | null | manilaclient/tests/unit/v1/test_share_types.py | SolKuczala/python-manilaclient | 9613c7fd2652dc3c7b8793c9af2b6357f42a4757 | [
"CNRI-Python",
"Apache-1.1"
] | null | null | null | # Copyright 2016 Mirantis Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | 36.787879 | 78 | 0.677924 |
import six
from manilaclient.tests.unit import utils
class ShareTypesV1Test(utils.TestCase):
def test_import_v1_share_types_module(self):
try:
from manilaclient.v1 import share_types
except Exception as e:
msg = ("module 'manilaclient.v1.share_types' cannot be imported "... | true | true |
08f389dfa07ff38bb9fe736fd715f49a2188e214 | 736 | py | Python | ivy/__main__.py | ahljljj/little_ivy | f0b14b88f66c4dc4a620a77362332a833a2a5fbc | [
"Unlicense"
] | null | null | null | ivy/__main__.py | ahljljj/little_ivy | f0b14b88f66c4dc4a620a77362332a833a2a5fbc | [
"Unlicense"
] | null | null | null | ivy/__main__.py | ahljljj/little_ivy | f0b14b88f66c4dc4a620a77362332a833a2a5fbc | [
"Unlicense"
] | null | null | null | # ------------------------------------------------------------------------------
# This module makes the `ivy` package directly executable.
#
# To run an `ivy` package located on Python's import search path:
#
# $ python -m ivy
#
# To run an arbitrary `ivy` package:
#
# $ python /path/to/ivy/package
#
# This latter... | 29.44 | 80 | 0.569293 | #
# $ python -m ivy
#
# To run an arbitrary `ivy` package:
#
# $ python /path/to/ivy/package
#
# This latter form can be used for running development versions of Ivy.
# ------------------------------------------------------------------------------
import os
import sys
# Python doesn't automatically add the packag... | true | true |
08f38a868b600c547e56114eba3238559d47853e | 12,064 | py | Python | ubivar/test/test_http_client.py | oriskami/oriskami-python | 2b0d81f713a9149977907183c67eec136d49ee8c | [
"MIT"
] | 4 | 2017-05-28T19:37:31.000Z | 2017-06-13T11:34:26.000Z | ubivar/test/test_http_client.py | ubivar/ubivar-python | 2b0d81f713a9149977907183c67eec136d49ee8c | [
"MIT"
] | null | null | null | ubivar/test/test_http_client.py | ubivar/ubivar-python | 2b0d81f713a9149977907183c67eec136d49ee8c | [
"MIT"
] | null | null | null | import sys
import unittest2
from mock import MagicMock, Mock, patch
import ubivar
from ubivar.test.helper import UbivarUnitTestCase
VALID_API_METHODS = ('get', 'post', 'delete')
class HttpClientTests(UbivarUnitTestCase):
def setUp(self):
super(HttpClientTests, self).setUp()
self.original_fil... | 33.511111 | 77 | 0.612898 | import sys
import unittest2
from mock import MagicMock, Mock, patch
import ubivar
from ubivar.test.helper import UbivarUnitTestCase
VALID_API_METHODS = ('get', 'post', 'delete')
class HttpClientTests(UbivarUnitTestCase):
def setUp(self):
super(HttpClientTests, self).setUp()
self.original_fil... | true | true |
08f38b337486633b993caf8765b26de8c07257ab | 944 | py | Python | home/migrations/0025_auto_20210807_1535.py | SoumyaRanjanPatnaik/Health-And-Safety-Dashboard | ad5ba26f280db0f199a0a4598959c0ec0b4d6515 | [
"MIT"
] | 1 | 2021-07-17T07:55:48.000Z | 2021-07-17T07:55:48.000Z | home/migrations/0025_auto_20210807_1535.py | SoumyaRanjanPatnaik/Health-And-Safety-Dashboard | ad5ba26f280db0f199a0a4598959c0ec0b4d6515 | [
"MIT"
] | null | null | null | home/migrations/0025_auto_20210807_1535.py | SoumyaRanjanPatnaik/Health-And-Safety-Dashboard | ad5ba26f280db0f199a0a4598959c0ec0b4d6515 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.5 on 2021-08-07 10:05
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('home', '0024_log_datetime'),
]
operations = [
migrations.AlterField(
model_name='log',
... | 32.551724 | 122 | 0.597458 |
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('home', '0024_log_datetime'),
]
operations = [
migrations.AlterField(
model_name='log',
name='worker_id',
field=models.F... | true | true |
08f38b6561afa9474787b596eb37d56a0f075d2d | 327 | py | Python | example_project/core/models.py | pnuckowski/django-guardian | 8e8dab207296ee37aa1d19eaeebfad7d0642f138 | [
"MIT"
] | 2,469 | 2015-07-27T14:21:38.000Z | 2022-03-29T23:37:37.000Z | example_project/core/models.py | meetbill/django-guardian | d3611494c1e40a67b20e32ffe9e5198a53923aa2 | [
"MIT"
] | 458 | 2015-07-27T12:02:14.000Z | 2022-03-25T21:42:59.000Z | example_project/core/models.py | meetbill/django-guardian | d3611494c1e40a67b20e32ffe9e5198a53923aa2 | [
"MIT"
] | 429 | 2015-07-31T08:04:17.000Z | 2022-03-11T09:28:55.000Z | import datetime
from django.contrib.auth.models import AbstractUser
from django.db import models
class CustomUser(AbstractUser):
birth_date = models.DateField(null=True, blank=True)
def get_custom_anon_user(User):
return User(
username='AnonymousUser',
birth_date=datetime.date(1410, 7, 15),... | 20.4375 | 56 | 0.730887 | import datetime
from django.contrib.auth.models import AbstractUser
from django.db import models
class CustomUser(AbstractUser):
birth_date = models.DateField(null=True, blank=True)
def get_custom_anon_user(User):
return User(
username='AnonymousUser',
birth_date=datetime.date(1410, 7, 15),... | true | true |
08f38bb0392c88126bdfeac82ba148a0609aa92e | 515 | py | Python | robot/urls.py | Misschl/wechat | 8ce76dae32b1086bb83ee6e3fe64cf84845012c0 | [
"Apache-2.0"
] | 1 | 2020-01-07T06:51:19.000Z | 2020-01-07T06:51:19.000Z | robot/urls.py | Misschl/wechat | 8ce76dae32b1086bb83ee6e3fe64cf84845012c0 | [
"Apache-2.0"
] | null | null | null | robot/urls.py | Misschl/wechat | 8ce76dae32b1086bb83ee6e3fe64cf84845012c0 | [
"Apache-2.0"
] | null | null | null | from rest_framework.routers import DefaultRouter
from . import views
route = DefaultRouter(trailing_slash=False)
route.register('message', views.MessageApi, basename='message')
route.register('login', views.LoginView, basename='login')
route.register('groups', views.GroupApi, basename='groups')
route.register('friend... | 34.333333 | 63 | 0.786408 | from rest_framework.routers import DefaultRouter
from . import views
route = DefaultRouter(trailing_slash=False)
route.register('message', views.MessageApi, basename='message')
route.register('login', views.LoginView, basename='login')
route.register('groups', views.GroupApi, basename='groups')
route.register('friend... | true | true |
08f38c81e92e820b53dc0ef9dd299f80dc7ce03d | 397 | py | Python | pronebo_dj/pronebo_dj/asgi.py | vlsh1n/pronebo | e9a12d0220d4e3d86c948b256e1ab38cc964dff9 | [
"MIT"
] | null | null | null | pronebo_dj/pronebo_dj/asgi.py | vlsh1n/pronebo | e9a12d0220d4e3d86c948b256e1ab38cc964dff9 | [
"MIT"
] | null | null | null | pronebo_dj/pronebo_dj/asgi.py | vlsh1n/pronebo | e9a12d0220d4e3d86c948b256e1ab38cc964dff9 | [
"MIT"
] | null | null | null | """
ASGI config for pronebo_dj project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SE... | 23.352941 | 78 | 0.788413 |
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'pronebo_dj.settings')
application = get_asgi_application()
| true | true |
08f38d76121e1f27eabb39d3ee1db247afc3d60c | 4,613 | py | Python | src/keysight33600a.py | kehaus/Keysight33600A | 262d2b1473c768a63cd9adbfc08cd232e5407f1d | [
"Apache-2.0"
] | 1 | 2021-01-17T08:51:38.000Z | 2021-01-17T08:51:38.000Z | src/keysight33600a.py | kehaus/Keysight33600A | 262d2b1473c768a63cd9adbfc08cd232e5407f1d | [
"Apache-2.0"
] | null | null | null | src/keysight33600a.py | kehaus/Keysight33600A | 262d2b1473c768a63cd9adbfc08cd232e5407f1d | [
"Apache-2.0"
] | 1 | 2021-06-09T07:57:37.000Z | 2021-06-09T07:57:37.000Z | # -*- coding: utf-8 -*-
"""
Created on Thu Jul 2 19:49:48 2020
Reference links
- http://rfmw.em.keysight.com/bihelpfiles/Trueform/webhelp/US/Content/__I_SCPI/VOLTage_Subsystem.htm#VOLTage
- Sine waveform: http://rfmw.em.keysight.com/bihelpfiles/Trueform/webhelp/US/Content/_Programming%20Examples_/01%20-%20Configur... | 28.128049 | 151 | 0.520919 | __author__ = "kha"
__version__ = "0.0.1"
from visa_baseclass import VISABaseClass
class Keysight33600AException(Exception):
pass
class Keysight33600A(VISABaseClass):
#
# Example:
# >>>> awg = Keysight33600A('FDN-AWG.local::inst0')
# >>> awg._query('*IDN?')
# ... 'Agilen... | true | true |
08f38d88d63ed68aca9e127091fdc16f3cf2bb60 | 60 | py | Python | bci_lib/Stages/LoadData/__init__.py | SahandSadeghpour/bci_lib | 0fac693d6fae40956d9a716d466e1de0fdce8998 | [
"MIT"
] | null | null | null | bci_lib/Stages/LoadData/__init__.py | SahandSadeghpour/bci_lib | 0fac693d6fae40956d9a716d466e1de0fdce8998 | [
"MIT"
] | null | null | null | bci_lib/Stages/LoadData/__init__.py | SahandSadeghpour/bci_lib | 0fac693d6fae40956d9a716d466e1de0fdce8998 | [
"MIT"
] | null | null | null | from .LoadData import LoadFromDataset, LoadRaw, LoadEpochs
| 30 | 59 | 0.833333 | from .LoadData import LoadFromDataset, LoadRaw, LoadEpochs
| true | true |
08f38da8561e89cc42dd2a051a1d3c3c2976bf7c | 506 | py | Python | plate_spinner/db/running.py | nowavailable/plate-spinner | 6c375a8a859c0ee212862d9894f36852a8ae10f2 | [
"MIT"
] | null | null | null | plate_spinner/db/running.py | nowavailable/plate-spinner | 6c375a8a859c0ee212862d9894f36852a8ae10f2 | [
"MIT"
] | null | null | null | plate_spinner/db/running.py | nowavailable/plate-spinner | 6c375a8a859c0ee212862d9894f36852a8ae10f2 | [
"MIT"
] | null | null | null | from sqlalchemy import Integer, String, DateTime, Boolean, Column
from .base import Base
class Running(Base):
__tablename__ = 'ps_runnings'
id = Column(Integer(), primary_key=True)
hostname = Column(String(), nullable=False)
process_id_str = Column(String(), nullable=False)
emergency = Column(Bool... | 36.142857 | 65 | 0.719368 | from sqlalchemy import Integer, String, DateTime, Boolean, Column
from .base import Base
class Running(Base):
__tablename__ = 'ps_runnings'
id = Column(Integer(), primary_key=True)
hostname = Column(String(), nullable=False)
process_id_str = Column(String(), nullable=False)
emergency = Column(Bool... | true | true |
08f38e8978115356b0165196fdf0898e950b5f95 | 3,790 | py | Python | imagenet/data_loader/tiny_imagenet.py | lehduong/kesi | 06242479a0670701a1f8101325f5a9a9446e6c0e | [
"MIT"
] | 21 | 2020-08-18T23:01:17.000Z | 2022-02-28T08:29:31.000Z | imagenet/data_loader/tiny_imagenet.py | lehduong/GINP | 06242479a0670701a1f8101325f5a9a9446e6c0e | [
"MIT"
] | 1 | 2020-04-16T18:11:57.000Z | 2020-04-17T10:02:24.000Z | imagenet/data_loader/tiny_imagenet.py | lehduong/kesi | 06242479a0670701a1f8101325f5a9a9446e6c0e | [
"MIT"
] | 7 | 2020-10-03T01:04:49.000Z | 2021-05-09T03:21:03.000Z | """
Author: Meng Lee, mnicnc404
Date: 2018/06/04
References:
- https://stanford.edu/~shervine/blog/pytorch-how-to-generate-data-parallel.html
"""
import os
import glob
from torch.utils.data import Dataset
from PIL import Image
EXTENSION = 'JPEG'
NUM_IMAGES_PER_CLASS = 500
CLASS_LIST_FILE = 'wnids.txt'
VAL_ANNOTAT... | 39.894737 | 117 | 0.612929 |
import os
import glob
from torch.utils.data import Dataset
from PIL import Image
EXTENSION = 'JPEG'
NUM_IMAGES_PER_CLASS = 500
CLASS_LIST_FILE = 'wnids.txt'
VAL_ANNOTATION_FILE = 'val_annotations.txt'
class TinyImageNet(Dataset):
def __init__(self, root, split='train', transform=None, target_transform=None, in_... | true | true |
08f38f0026884b8109c1084dcf86f56b8f1c3090 | 5,463 | py | Python | grr/server/grr_response_server/aff4_objects/aff4_queue.py | nkrios/grr | 399e078ed522bf0555a2666fb086aa7809d54971 | [
"Apache-2.0"
] | null | null | null | grr/server/grr_response_server/aff4_objects/aff4_queue.py | nkrios/grr | 399e078ed522bf0555a2666fb086aa7809d54971 | [
"Apache-2.0"
] | null | null | null | grr/server/grr_response_server/aff4_objects/aff4_queue.py | nkrios/grr | 399e078ed522bf0555a2666fb086aa7809d54971 | [
"Apache-2.0"
] | 1 | 2020-07-09T01:08:48.000Z | 2020-07-09T01:08:48.000Z | #!/usr/bin/env python
"""A simple message queue synchronized through data store locks.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from grr_response_core.lib import rdfvalue
from grr_response_server import aff4
from grr_response_server import data_... | 31.578035 | 79 | 0.692294 | from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from grr_response_core.lib import rdfvalue
from grr_response_server import aff4
from grr_response_server import data_store
class Queue(aff4.AFF4Object):
rdf_type = None
@classmethod
def StaticAdd(... | true | true |
08f38fd9c54b1cf108f6e24507fe9e54b54208fb | 595 | py | Python | glitch/api/Tournaments.py | JasonKhew96/GlitchPy | d6579f5dde27ac51ad25d27f2c917ef14956abe1 | [
"MIT"
] | null | null | null | glitch/api/Tournaments.py | JasonKhew96/GlitchPy | d6579f5dde27ac51ad25d27f2c917ef14956abe1 | [
"MIT"
] | null | null | null | glitch/api/Tournaments.py | JasonKhew96/GlitchPy | d6579f5dde27ac51ad25d27f2c917ef14956abe1 | [
"MIT"
] | null | null | null | import logging
import glitch.api.Connector as Connector
logger = logging.getLogger(__name__)
class Tournaments:
def __init__(self):
self.Type = 0
self.Rank = ""
def get_status(self, username, sessionkey):
response = Connector.post_request("/Tournaments/GetStatus", Username=username,... | 25.869565 | 109 | 0.581513 | import logging
import glitch.api.Connector as Connector
logger = logging.getLogger(__name__)
class Tournaments:
def __init__(self):
self.Type = 0
self.Rank = ""
def get_status(self, username, sessionkey):
response = Connector.post_request("/Tournaments/GetStatus", Username=username,... | true | true |
08f3902ea0e25c471109031956a3dbc72dbf3b73 | 3,986 | py | Python | 2-pre-built-helper-classes/DecisionForest/DF-classification-usage-example.py | daaltces/pydaal-tutorials | ed47e8eef30f63421968232713552c0afad5cfae | [
"Apache-2.0"
] | 21 | 2016-10-12T20:16:20.000Z | 2017-09-26T09:51:06.000Z | 2-pre-built-helper-classes/DecisionForest/DF-classification-usage-example.py | daaltces/pydaal-tutorials | ed47e8eef30f63421968232713552c0afad5cfae | [
"Apache-2.0"
] | 2 | 2016-11-16T18:07:09.000Z | 2017-02-10T01:13:29.000Z | 2-pre-built-helper-classes/DecisionForest/DF-classification-usage-example.py | daaltces/pydaal-tutorials | ed47e8eef30f63421968232713552c0afad5cfae | [
"Apache-2.0"
] | 17 | 2016-10-12T20:57:43.000Z | 2017-10-19T21:52:47.000Z | import sys,os
sys.path.append(os.path.join(os.path.dirname(sys.executable),'share','pydaal_examples','examples','python','source'))
import numpy as np
from DecisionForest import Classification
from daal.data_management import HomogenNumericTable
from utils import printNumericTables,printNumericTable
from sklearn.... | 39.465347 | 141 | 0.788259 | import sys,os
sys.path.append(os.path.join(os.path.dirname(sys.executable),'share','pydaal_examples','examples','python','source'))
import numpy as np
from DecisionForest import Classification
from daal.data_management import HomogenNumericTable
from utils import printNumericTables,printNumericTable
from sklearn.... | true | true |
08f3920266abe9d41d453ea597d5644f6e57fb3f | 217 | py | Python | formset_only_app/urls.py | thinkAmi-sandbox/Django_formset-sample | 45e391b7a5c35223bab314fcf7b68e5700784ddc | [
"Unlicense"
] | null | null | null | formset_only_app/urls.py | thinkAmi-sandbox/Django_formset-sample | 45e391b7a5c35223bab314fcf7b68e5700784ddc | [
"Unlicense"
] | null | null | null | formset_only_app/urls.py | thinkAmi-sandbox/Django_formset-sample | 45e391b7a5c35223bab314fcf7b68e5700784ddc | [
"Unlicense"
] | null | null | null | from django.conf.urls import url
from .views import ItemCreateNGView, ItemCreateOKView
urlpatterns = [
url(r'ng$', ItemCreateNGView.as_view(), name='ng'),
url(r'ok$', ItemCreateOKView.as_view(), name='ok'),
] | 31 | 55 | 0.714286 | from django.conf.urls import url
from .views import ItemCreateNGView, ItemCreateOKView
urlpatterns = [
url(r'ng$', ItemCreateNGView.as_view(), name='ng'),
url(r'ok$', ItemCreateOKView.as_view(), name='ok'),
] | true | true |
08f392f3518940cae016d8880b6296e38122b089 | 19,054 | py | Python | pyanalyze/test_format_strings.py | sobolevn/pyanalyze | f3851db84e57e3ff7f8e2dd271c3b218e2d3bbcc | [
"Apache-2.0"
] | null | null | null | pyanalyze/test_format_strings.py | sobolevn/pyanalyze | f3851db84e57e3ff7f8e2dd271c3b218e2d3bbcc | [
"Apache-2.0"
] | null | null | null | pyanalyze/test_format_strings.py | sobolevn/pyanalyze | f3851db84e57e3ff7f8e2dd271c3b218e2d3bbcc | [
"Apache-2.0"
] | null | null | null | # static analysis: ignore
from __future__ import absolute_import, division, print_function, unicode_literals
from qcore.asserts import assert_eq, assert_ge
import six
from .error_code import ErrorCode
from .format_strings import (
ConversionSpecifier,
PercentFormatString,
StarConversionSpecifier,
Forma... | 32.404762 | 99 | 0.554582 | from __future__ import absolute_import, division, print_function, unicode_literals
from qcore.asserts import assert_eq, assert_ge
import six
from .error_code import ErrorCode
from .format_strings import (
ConversionSpecifier,
PercentFormatString,
StarConversionSpecifier,
FormatString,
ReplacementFi... | true | true |
08f395173bb5627077151e17e8c9daef1123b28f | 4,580 | py | Python | recipe/testNotebookAuth.py | TaykYoku/dirac-grid-feedstock | 7202e80c0700c024d6541e26c0c2bd707b051bff | [
"BSD-3-Clause"
] | null | null | null | recipe/testNotebookAuth.py | TaykYoku/dirac-grid-feedstock | 7202e80c0700c024d6541e26c0c2bd707b051bff | [
"BSD-3-Clause"
] | null | null | null | recipe/testNotebookAuth.py | TaykYoku/dirac-grid-feedstock | 7202e80c0700c024d6541e26c0c2bd707b051bff | [
"BSD-3-Clause"
] | null | null | null | import os
import stat
import requests
import urllib3
from DIRAC import gConfig, gLogger, S_OK, S_ERROR
from DIRAC.Core.Utilities.JEncode import decode, encode
from DIRAC.ConfigurationSystem.Client.Helpers import Registry
class notebookAuth(object):
""" The main goal of this class provide authentication with access... | 35.503876 | 108 | 0.666812 | import os
import stat
import requests
import urllib3
from DIRAC import gConfig, gLogger, S_OK, S_ERROR
from DIRAC.Core.Utilities.JEncode import decode, encode
from DIRAC.ConfigurationSystem.Client.Helpers import Registry
class notebookAuth(object):
def __init__(self, group, lifetime=3600 * 12, voms=False, aToken=N... | true | true |
08f3975065aa7ce38112f7fd506b5233e0d2e59d | 241 | py | Python | code/division_y_resto.py | euribates/curso-django | 06f71a7d5b239e294c0cc6b3972861ed8d1c59d0 | [
"CC-BY-4.0"
] | 1 | 2020-04-14T11:08:11.000Z | 2020-04-14T11:08:11.000Z | code/division_y_resto.py | euribates/curso-django | 06f71a7d5b239e294c0cc6b3972861ed8d1c59d0 | [
"CC-BY-4.0"
] | null | null | null | code/division_y_resto.py | euribates/curso-django | 06f71a7d5b239e294c0cc6b3972861ed8d1c59d0 | [
"CC-BY-4.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: iso-8859-15 -*-
def division_y_resto(dividendo, divisor):
return dividendo // divisor, dividendo % divisor
cociente, resto = division_y_resto(47, 9)
print 'cociente:', cociente
print 'resto:', resto
| 24.1 | 52 | 0.709544 |
def division_y_resto(dividendo, divisor):
return dividendo // divisor, dividendo % divisor
cociente, resto = division_y_resto(47, 9)
print 'cociente:', cociente
print 'resto:', resto
| false | true |
08f397fef17f2a33030349ae4d7c483212622e41 | 653 | py | Python | python/lib/DecryptIdfa.py | kay-si/Google_AdEx_Decrypt | af01f4034242f98a30270791d70c4dc664cdc65a | [
"Apache-2.0"
] | 4 | 2015-04-01T17:21:19.000Z | 2017-02-16T06:39:52.000Z | python/lib/DecryptIdfa.py | kay-si/Google_AdEx_Decrypt | af01f4034242f98a30270791d70c4dc664cdc65a | [
"Apache-2.0"
] | null | null | null | python/lib/DecryptIdfa.py | kay-si/Google_AdEx_Decrypt | af01f4034242f98a30270791d70c4dc664cdc65a | [
"Apache-2.0"
] | null | null | null | import sys,os
from Decryption import Decryption
class DecryptIdfa(Decryption):
def __init__( self, encryption_encoded_key, integrity_encoded_key):
iv_length = 16;
is_length = 4;
byte_length = 16;
self.decrypt = Decryption.__init__( self, encryption_encoded_key, integrity_encoded_key... | 36.277778 | 133 | 0.607963 | import sys,os
from Decryption import Decryption
class DecryptIdfa(Decryption):
def __init__( self, encryption_encoded_key, integrity_encoded_key):
iv_length = 16;
is_length = 4;
byte_length = 16;
self.decrypt = Decryption.__init__( self, encryption_encoded_key, integrity_encoded_key... | true | true |
08f3983aaee2b143f58b379d84a7e3e890695982 | 18,280 | py | Python | scripts/encoding model 15 ROIs/encoding model 15 ROIs ips 17.py | nmningmei/METASEMA_encoding_model | ce4b9b0935e5a1b04de77174236905f7d8d267f8 | [
"MIT"
] | null | null | null | scripts/encoding model 15 ROIs/encoding model 15 ROIs ips 17.py | nmningmei/METASEMA_encoding_model | ce4b9b0935e5a1b04de77174236905f7d8d267f8 | [
"MIT"
] | null | null | null | scripts/encoding model 15 ROIs/encoding model 15 ROIs ips 17.py | nmningmei/METASEMA_encoding_model | ce4b9b0935e5a1b04de77174236905f7d8d267f8 | [
"MIT"
] | 1 | 2019-06-13T07:47:55.000Z | 2019-06-13T07:47:55.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Jul 8 12:39:17 2019
@author: nmei
This script systematically test the encoding model (Ridge regression) with different
embedding features predicting the BOLD signal, within each small ROIs (15 in total)
"""
import os
import numpy as np
import pand... | 54.894895 | 185 | 0.509519 |
import os
import numpy as np
import pandas as pd
from shutil import copyfile
copyfile("../../../utils.py","utils.py")
import utils
from glob import glob
from tqdm import tqdm
from sklearn.utils import shuffle
from sklearn.model_selection import cross_validate
from sklearn import metrics,line... | true | true |
08f398f6d5de557d07322151a05d1a90e95abe50 | 1,173 | py | Python | plate/__init__.py | delivrance/plate | ddb248994ac604a084abf8b499e3363ea4607f32 | [
"MIT"
] | 31 | 2020-03-20T02:49:22.000Z | 2022-02-19T15:19:18.000Z | plate/__init__.py | delivrance/plate | ddb248994ac604a084abf8b499e3363ea4607f32 | [
"MIT"
] | null | null | null | plate/__init__.py | delivrance/plate | ddb248994ac604a084abf8b499e3363ea4607f32 | [
"MIT"
] | 3 | 2020-07-13T04:55:27.000Z | 2021-09-04T10:19:21.000Z | # MIT License
#
# Copyright (c) 2020 Dan <https://github.com/delivrance>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# ... | 48.875 | 81 | 0.764706 |
from .plate import Plate
| true | true |
08f39928ff7748406536af57a060033d5649c59b | 1,114 | py | Python | user/admin.py | MrNewaz/Coding-Assignment | df233c791a86e5a362f4022dac0bfa1ad07df36e | [
"MIT"
] | null | null | null | user/admin.py | MrNewaz/Coding-Assignment | df233c791a86e5a362f4022dac0bfa1ad07df36e | [
"MIT"
] | null | null | null | user/admin.py | MrNewaz/Coding-Assignment | df233c791a86e5a362f4022dac0bfa1ad07df36e | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import *
"""
Advanced admin options:
- list_display: list of fields to display in the admin list view
- list_editable: list of fields to edit in the admin list view
- list_filter: list of fields to filter by in the admin list view
- list_per_page: number o... | 33.757576 | 79 | 0.705566 | from django.contrib import admin
from .models import *
@admin.register(Parent)
class ParentAdmin(admin.ModelAdmin):
list_display = ['first_name', 'last_name', 'street', 'city', 'zip_code']
list_editable = ['street', 'city', 'zip_code']
list_filter = ['first_name', 'last_name']
list_per_page = 10
... | true | true |
08f39990c46da5c22a39cdaa98e31b0c3f699d2b | 763 | py | Python | clients/python-experimental/generated/test/test_branch_impl.py | cliffano/jenkins-api-clients-generator | 522d02b3a130a29471df5ec1d3d22c822b3d0813 | [
"MIT"
] | null | null | null | clients/python-experimental/generated/test/test_branch_impl.py | cliffano/jenkins-api-clients-generator | 522d02b3a130a29471df5ec1d3d22c822b3d0813 | [
"MIT"
] | null | null | null | clients/python-experimental/generated/test/test_branch_impl.py | cliffano/jenkins-api-clients-generator | 522d02b3a130a29471df5ec1d3d22c822b3d0813 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Swaggy Jenkins
Jenkins API clients generated from Swagger / Open API specification # noqa: E501
The version of the OpenAPI document: 1.1.2-pre.0
Contact: blah@cliffano.com
Generated by: https://openapi-generator.tech
"""
import unittest
import openapi_client
from openapi_cl... | 20.621622 | 85 | 0.672346 |
import unittest
import openapi_client
from openapi_client.model.branch_impl import BranchImpl
class TestBranchImpl(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_BranchImpl(self):
pass
if __name__ == '__main__':
unittest.main... | true | true |
08f3999b0935c74721611aab3c1a6584477711d7 | 1,770 | py | Python | cfb-cursos/windowtest.py | joseluizbrits/sobre-python | 316143c341e5a44070a3b13877419082774bd730 | [
"MIT"
] | null | null | null | cfb-cursos/windowtest.py | joseluizbrits/sobre-python | 316143c341e5a44070a3b13877419082774bd730 | [
"MIT"
] | null | null | null | cfb-cursos/windowtest.py | joseluizbrits/sobre-python | 316143c341e5a44070a3b13877419082774bd730 | [
"MIT"
] | null | null | null | # Exemplo de tela simples
import PySimpleGUI as sg
class Tela:
def __init__(self):
sg.change_look_and_feel('BluePurple')
# Layout
layout = [
[sg.Text('Nome'), sg.Input(key='nome')],
[sg.Text('Idade '), sg.Input(key='idade')],
[sg.Text('Quais provedores de... | 40.227273 | 122 | 0.562712 | import PySimpleGUI as sg
class Tela:
def __init__(self):
sg.change_look_and_feel('BluePurple')
layout = [
[sg.Text('Nome'), sg.Input(key='nome')],
[sg.Text('Idade '), sg.Input(key='idade')],
[sg.Text('Quais provedores de e-mail são aceitos?')],
... | true | true |
08f399c4ef3f3f3a0c42fa7fd2ad45e9042d4b74 | 43,717 | py | Python | CPAC/longitudinal_pipeline/longitudinal_workflow.py | gkiar/C-PAC | 0926b451dd8622b25eb68c7bcc770f0156238b23 | [
"BSD-3-Clause"
] | 125 | 2015-03-04T09:14:46.000Z | 2022-03-29T07:46:12.000Z | CPAC/longitudinal_pipeline/longitudinal_workflow.py | gkiar/C-PAC | 0926b451dd8622b25eb68c7bcc770f0156238b23 | [
"BSD-3-Clause"
] | 1,018 | 2015-01-04T16:01:29.000Z | 2022-03-31T19:23:09.000Z | CPAC/longitudinal_pipeline/longitudinal_workflow.py | gkiar/C-PAC | 0926b451dd8622b25eb68c7bcc770f0156238b23 | [
"BSD-3-Clause"
] | 117 | 2015-01-10T08:05:52.000Z | 2022-01-18T05:16:51.000Z | # -*- coding: utf-8 -*-
import os
import copy
import time
import shutil
from nipype import config
from nipype import logging
from CPAC.pipeline import nipype_pipeline_engine as pe
import nipype.interfaces.afni as afni
import nipype.interfaces.fsl as fsl
import nipype.interfaces.io as nio
from nipype.interfaces.utility... | 37.333049 | 139 | 0.593728 | import os
import copy
import time
import shutil
from nipype import config
from nipype import logging
from CPAC.pipeline import nipype_pipeline_engine as pe
import nipype.interfaces.afni as afni
import nipype.interfaces.fsl as fsl
import nipype.interfaces.io as nio
from nipype.interfaces.utility import Merge, IdentityI... | true | true |
08f399f3ae32fd256a54d90efb44fc68354851ef | 44 | py | Python | netijen/lazuardyk/name.py | yesyou11/hacktoberfest-2019 | 8f05b9b2453577d589c63f196c916a95377da98a | [
"WTFPL"
] | 1 | 2019-10-01T16:30:00.000Z | 2019-10-01T16:30:00.000Z | netijen/lazuardyk/name.py | yesyou11/hacktoberfest-2019 | 8f05b9b2453577d589c63f196c916a95377da98a | [
"WTFPL"
] | null | null | null | netijen/lazuardyk/name.py | yesyou11/hacktoberfest-2019 | 8f05b9b2453577d589c63f196c916a95377da98a | [
"WTFPL"
] | null | null | null | for i in range(10):
print("@lazuardyk")
| 14.666667 | 23 | 0.613636 | for i in range(10):
print("@lazuardyk")
| true | true |
08f39a0e7ac11413bb6308dee82fca432c642c7b | 341 | py | Python | src/custom_auth/views.py | augustuswm/flagsmith-api | 6f37947fe3791726a92b4df2cdbded11e77387d3 | [
"BSD-3-Clause"
] | 1 | 2021-01-06T17:32:26.000Z | 2021-01-06T17:32:26.000Z | src/custom_auth/views.py | augustuswm/flagsmith-api | 6f37947fe3791726a92b4df2cdbded11e77387d3 | [
"BSD-3-Clause"
] | null | null | null | src/custom_auth/views.py | augustuswm/flagsmith-api | 6f37947fe3791726a92b4df2cdbded11e77387d3 | [
"BSD-3-Clause"
] | null | null | null | from rest_framework.throttling import ScopedRateThrottle
from trench.views.authtoken import AuthTokenLoginOrRequestMFACode
class CustomAuthTokenLoginOrRequestMFACode(AuthTokenLoginOrRequestMFACode):
"""
Class to handle throttling for login requests
"""
throttle_classes = [ScopedRateThrottle]
thro... | 28.416667 | 75 | 0.806452 | from rest_framework.throttling import ScopedRateThrottle
from trench.views.authtoken import AuthTokenLoginOrRequestMFACode
class CustomAuthTokenLoginOrRequestMFACode(AuthTokenLoginOrRequestMFACode):
throttle_classes = [ScopedRateThrottle]
throttle_scope = "login"
| true | true |
08f39a9cacbd518c52d76ff22721871fb754b913 | 53,063 | py | Python | gui/qt/util.py | Andrew-128/Electron-Cash | 0a31eea1273e2ad26dd7bfbdd257670d878d257a | [
"MIT"
] | 1 | 2021-07-14T21:14:11.000Z | 2021-07-14T21:14:11.000Z | gui/qt/util.py | Andrew-128/Electron-Cash | 0a31eea1273e2ad26dd7bfbdd257670d878d257a | [
"MIT"
] | null | null | null | gui/qt/util.py | Andrew-128/Electron-Cash | 0a31eea1273e2ad26dd7bfbdd257670d878d257a | [
"MIT"
] | null | null | null | import os.path
import time
import sys
import platform
import queue
import threading
import os
import webbrowser
from collections import namedtuple
from functools import partial, wraps
from electroncash.address import Address
from electroncash.util import print_error, PrintError, Weak, finalization_print_error
from ele... | 41.16602 | 255 | 0.635433 | import os.path
import time
import sys
import platform
import queue
import threading
import os
import webbrowser
from collections import namedtuple
from functools import partial, wraps
from electroncash.address import Address
from electroncash.util import print_error, PrintError, Weak, finalization_print_error
from ele... | true | true |
08f39ae5561ad23dc2755c9c4a091fc9e4273f64 | 409 | py | Python | variants/migrations/0002_variant_snpeff_func_class.py | fossabot/mendelmd | 5cafebf5336b8854fe71414b3559428e3e401617 | [
"BSD-3-Clause"
] | 33 | 2016-07-22T21:39:09.000Z | 2021-06-24T02:57:02.000Z | variants/migrations/0002_variant_snpeff_func_class.py | fossabot/mendelmd | 5cafebf5336b8854fe71414b3559428e3e401617 | [
"BSD-3-Clause"
] | 41 | 2017-06-20T03:10:33.000Z | 2021-12-24T23:54:41.000Z | variants/migrations/0002_variant_snpeff_func_class.py | fossabot/mendelmd | 5cafebf5336b8854fe71414b3559428e3e401617 | [
"BSD-3-Clause"
] | 8 | 2017-06-14T21:07:47.000Z | 2021-01-12T17:59:49.000Z | # Generated by Django 2.1.1 on 2019-03-28 18:37
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('variants', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='variant',
name='snpeff_func_class',
... | 21.526316 | 73 | 0.606357 |
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('variants', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='variant',
name='snpeff_func_class',
field=models.TextField(blank=True, db_... | true | true |
08f39bda60d16aababb27a19d6f9385d636afa54 | 2,604 | py | Python | generator.py | adowaconan/variational_autoencoder_spindles | 0410fe86372ed50c5d136e7bbb13bbdf4dc4cc7b | [
"AFL-3.0"
] | null | null | null | generator.py | adowaconan/variational_autoencoder_spindles | 0410fe86372ed50c5d136e7bbb13bbdf4dc4cc7b | [
"AFL-3.0"
] | null | null | null | generator.py | adowaconan/variational_autoencoder_spindles | 0410fe86372ed50c5d136e7bbb13bbdf4dc4cc7b | [
"AFL-3.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Nov 6 15:50:24 2017
@author: ning
"""
import mne
import numpy as np
import os
from sklearn.model_selection import train_test_split
class generator():
def __init__(self,count_save=[],current_data=None,fileName=None,working_dir=None):
self.working_d... | 29.931034 | 86 | 0.591398 |
import mne
import numpy as np
import os
from sklearn.model_selection import train_test_split
class generator():
def __init__(self,count_save=[],current_data=None,fileName=None,working_dir=None):
self.working_dir = working_dir
os.chdir(working_dir)
files = [f for f in os.listd... | true | true |
08f39c91ceef78fa5536bdcb63898e432f5193c0 | 1,468 | py | Python | projects/convai2/baselines/seq2seq/train.py | ShaojieJiang/FACE_orig | 6d45e70dd4234cb1fd79ecf81b01405e9341387e | [
"BSD-3-Clause"
] | 1 | 2019-04-08T06:22:14.000Z | 2019-04-08T06:22:14.000Z | projects/convai2/baselines/seq2seq/train.py | manailin/facebookresearch-ParlAI | 08b77ec307ab7ee702b51cbb32dcb2629fb04855 | [
"BSD-3-Clause"
] | null | null | null | projects/convai2/baselines/seq2seq/train.py | manailin/facebookresearch-ParlAI | 08b77ec307ab7ee702b51cbb32dcb2629fb04855 | [
"BSD-3-Clause"
] | 1 | 2019-05-19T15:27:16.000Z | 2019-05-19T15:27:16.000Z | # Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
"""Train model for ppl metr... | 31.234043 | 77 | 0.659401 |
from parlai.scripts.train_model import setup_args, TrainLoop
if __name__ == '__main__':
parser = setup_args()
parser.set_defaults(
task='convai2:self',
model='seq2seq',
model_file='/tmp/convai2_self_seq2seq_model',
dict_file='/tmp/dict_convai2_self',
dict_lower=True,
... | true | true |
08f39cb4b0b4d13995c715c085d619a056a6d411 | 575 | py | Python | ERP/core/migrations/0011_situacao.py | CSAAtibaia/Listas | 36ad6ffb01d17184d10727e1945bb738b5c199e8 | [
"MIT"
] | null | null | null | ERP/core/migrations/0011_situacao.py | CSAAtibaia/Listas | 36ad6ffb01d17184d10727e1945bb738b5c199e8 | [
"MIT"
] | 7 | 2019-12-05T02:27:57.000Z | 2021-09-22T17:57:30.000Z | ERP/core/migrations/0011_situacao.py | CSAAtibaia/Listas | 36ad6ffb01d17184d10727e1945bb738b5c199e8 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.8 on 2019-12-08 22:40
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0010_auto_20191129_1133'),
]
operations = [
migrations.CreateModel(
name='Situacao',
fields=[
... | 26.136364 | 114 | 0.575652 |
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0010_auto_20191129_1133'),
]
operations = [
migrations.CreateModel(
name='Situacao',
fields=[
('id', models.AutoField(auto_created=True, pri... | true | true |
08f39cd50fbbd98350af30e475e083d2288a1271 | 11,765 | py | Python | tests/bot/exts/moderation/infraction/test_infractions.py | vcokltfre/bot | f20fa1cfbaf623a5eedfccc456c1945a561a527e | [
"MIT",
"BSD-3-Clause"
] | 1 | 2021-12-09T13:21:52.000Z | 2021-12-09T13:21:52.000Z | tests/bot/exts/moderation/infraction/test_infractions.py | vcokltfre/bot | f20fa1cfbaf623a5eedfccc456c1945a561a527e | [
"MIT",
"BSD-3-Clause"
] | 106 | 2020-06-07T21:16:17.000Z | 2021-03-13T12:46:44.000Z | tests/bot/exts/moderation/infraction/test_infractions.py | vcokltfre/bot | f20fa1cfbaf623a5eedfccc456c1945a561a527e | [
"MIT",
"BSD-3-Clause"
] | 1 | 2021-04-15T17:29:40.000Z | 2021-04-15T17:29:40.000Z | import inspect
import textwrap
import unittest
from unittest.mock import ANY, AsyncMock, MagicMock, Mock, patch
from bot.constants import Event
from bot.exts.moderation.infraction import _utils
from bot.exts.moderation.infraction.infractions import Infractions
from tests.helpers import MockBot, MockContext, MockGuild,... | 51.152174 | 115 | 0.711857 | import inspect
import textwrap
import unittest
from unittest.mock import ANY, AsyncMock, MagicMock, Mock, patch
from bot.constants import Event
from bot.exts.moderation.infraction import _utils
from bot.exts.moderation.infraction.infractions import Infractions
from tests.helpers import MockBot, MockContext, MockGuild,... | true | true |
08f39d2a3d1bd46bb1367a095fd2724fb22bde7e | 6,496 | py | Python | mapclientplugins/imagebasedfiducialmarkersstep/step.py | tsalemink/mapclientplugins.imagebasedfiducialmarkers | 045939be9636ae5df941f081067326820b6f4eb7 | [
"Apache-2.0"
] | null | null | null | mapclientplugins/imagebasedfiducialmarkersstep/step.py | tsalemink/mapclientplugins.imagebasedfiducialmarkers | 045939be9636ae5df941f081067326820b6f4eb7 | [
"Apache-2.0"
] | null | null | null | mapclientplugins/imagebasedfiducialmarkersstep/step.py | tsalemink/mapclientplugins.imagebasedfiducialmarkers | 045939be9636ae5df941f081067326820b6f4eb7 | [
"Apache-2.0"
] | 2 | 2018-11-13T22:40:45.000Z | 2021-06-10T01:11:31.000Z | """
MAP Client Plugin Step
"""
import json
import os
from PySide2 import QtGui
from mapclient.mountpoints.workflowstep import WorkflowStepMountPoint
from mapclientplugins.imagebasedfiducialmarkersstep.configuredialog import ConfigureDialog
from mapclientplugins.imagebasedfiducialmarkersstep.model.imagebasedfiducialma... | 40.6 | 115 | 0.674877 | import json
import os
from PySide2 import QtGui
from mapclient.mountpoints.workflowstep import WorkflowStepMountPoint
from mapclientplugins.imagebasedfiducialmarkersstep.configuredialog import ConfigureDialog
from mapclientplugins.imagebasedfiducialmarkersstep.model.imagebasedfiducialmarkersmastermodel import \
I... | true | true |
08f39d308ed2f1d84b109d4fb09e0f302b963a3b | 1,127 | py | Python | www/config.py | Eonothem/webapp-python | ae5e0e278b27cf0a11b5af157021f6c631829da3 | [
"MIT"
] | null | null | null | www/config.py | Eonothem/webapp-python | ae5e0e278b27cf0a11b5af157021f6c631829da3 | [
"MIT"
] | 3 | 2017-11-02T15:25:37.000Z | 2018-03-20T10:31:16.000Z | www/config.py | Eonothem/webapp-python | ae5e0e278b27cf0a11b5af157021f6c631829da3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'Eonothem'
'''
Configuration
'''
import config_default
class Dict(dict):
'''
Simple dict but support access as x.y style.
'''
def __init__(self, names=(), values=(), **kw):
super(Dict, self).__init__(**kw)
for k, v in zip(names, values):
self[k] ... | 18.47541 | 69 | 0.663709 |
__author__ = 'Eonothem'
import config_default
class Dict(dict):
def __init__(self, names=(), values=(), **kw):
super(Dict, self).__init__(**kw)
for k, v in zip(names, values):
self[k] = v
def __getattr__(self, key):
try:
return self[key]
except KeyError:
raise AttributeError(r"'Dict' object has ... | true | true |
08f39d8d19120c8fe86dfbe736ce9cc59e62d0cc | 14,124 | py | Python | paleomix/tools/depths.py | jfy133/paleomix | f7f687f6f69b2faedd247a1d289d28657710a8c2 | [
"MIT"
] | null | null | null | paleomix/tools/depths.py | jfy133/paleomix | f7f687f6f69b2faedd247a1d289d28657710a8c2 | [
"MIT"
] | null | null | null | paleomix/tools/depths.py | jfy133/paleomix | f7f687f6f69b2faedd247a1d289d28657710a8c2 | [
"MIT"
] | null | null | null | #!/usr/bin/python
#
# Copyright (c) 2012 Mikkel Schubert <MikkelSch@gmail.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
#... | 35.134328 | 86 | 0.590343 | import sys
import itertools
import collections
from paleomix.common.timer import BAMTimer
from paleomix.common.bamfiles import BAMRegionsIter
from paleomix.tools.bam_stats.common import (
collect_references,
collect_readgroups,
main_wrapper,
)
_MAX_DEPTH = 200
_MAX_CACHE_SIZE = 10000
_HEADER = """# C... | true | true |
08f39e589fe536f531c47d78805ba29aa996a279 | 558 | py | Python | setup.py | mikolajb/cookery | 00d88685dc9931210c6274969e82c88753f3c3b0 | [
"MIT"
] | 1 | 2016-01-07T19:56:54.000Z | 2016-01-07T19:56:54.000Z | setup.py | mikolajb/cookery | 00d88685dc9931210c6274969e82c88753f3c3b0 | [
"MIT"
] | 7 | 2015-02-10T02:54:45.000Z | 2015-03-09T16:14:05.000Z | setup.py | mikolajb/cookery | 00d88685dc9931210c6274969e82c88753f3c3b0 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(name="cookery",
version="0.1",
author="Mikołaj Baranowski",
author_email="mikolajb@gmail.com",
url="http://github.com/mikolajb/cookery",
license='MIT License',
scripts=['scripts/cookery'],
packages=["cookery"],
py_modules=["cookerykerne... | 25.363636 | 47 | 0.528674 | from setuptools import setup
setup(name="cookery",
version="0.1",
author="Mikołaj Baranowski",
author_email="mikolajb@gmail.com",
url="http://github.com/mikolajb/cookery",
license='MIT License',
scripts=['scripts/cookery'],
packages=["cookery"],
py_modules=["cookerykerne... | true | true |
08f3a068f981e20b9b7d67d96ca81ed51576998a | 6,183 | py | Python | NER/src/EN/NER_model.py | STHSF/DeepNaturallanguageprocessing | 1fe79a961abf3e55fb3ce2b0266b26f56ade2483 | [
"Apache-2.0"
] | 15 | 2016-09-13T05:41:53.000Z | 2019-12-30T13:01:33.000Z | NER/src/EN/NER_model.py | STHSF/DeepNaturallanguageprocessing | 1fe79a961abf3e55fb3ce2b0266b26f56ade2483 | [
"Apache-2.0"
] | 20 | 2020-01-28T21:42:25.000Z | 2022-02-10T00:44:02.000Z | NER/src/EN/NER_model.py | STHSF/DeepNaturallanguageprocessing | 1fe79a961abf3e55fb3ce2b0266b26f56ade2483 | [
"Apache-2.0"
] | 10 | 2016-09-28T02:56:11.000Z | 2022-03-12T16:41:20.000Z | # coding=utf-8
"""
"""
import tensorflow as tf
class NERModel(object):
def __init__(self):
self.vocab_size = 5199
self.word_embedding_size = 128
self.char_size = 52
self.char_embedding_size = 60
self.hidden_size_char = 32
self.num_classes = 53
# shape = (b... | 45.8 | 106 | 0.659712 |
import tensorflow as tf
class NERModel(object):
def __init__(self):
self.vocab_size = 5199
self.word_embedding_size = 128
self.char_size = 52
self.char_embedding_size = 60
self.hidden_size_char = 32
self.num_classes = 53
self.word_ids = tf.placehol... | true | true |
08f3a23dcd9daaa69586948c49f7343540a10a7f | 613 | py | Python | examples/cm/cm_rpmsg_str_echo_example.py | dorta/pyvar | c23e8e5a4b4d83e28e1bf1849ee736f2187dd4bc | [
"BSD-3-Clause"
] | 4 | 2021-12-11T15:31:54.000Z | 2022-02-03T22:18:04.000Z | examples/cm/cm_rpmsg_str_echo_example.py | varigit/pyvar | c23e8e5a4b4d83e28e1bf1849ee736f2187dd4bc | [
"BSD-3-Clause"
] | 1 | 2021-11-30T10:33:06.000Z | 2021-11-30T10:33:06.000Z | examples/cm/cm_rpmsg_str_echo_example.py | dorta/pyvar | c23e8e5a4b4d83e28e1bf1849ee736f2187dd4bc | [
"BSD-3-Clause"
] | 1 | 2022-02-06T18:39:17.000Z | 2022-02-06T18:39:17.000Z | # Copyright 2022 Variscite LTD
# SPDX-License-Identifier: BSD-3-Clause
import sys
from pyvar.cm.core import CortexM
def main():
cortex = CortexM()
fw = None
for firmware in cortex.firmwares:
if "str_echo" in firmware:
fw = firmware
break
if not fw:
sys.exit("... | 18.575758 | 70 | 0.588907 | import sys
from pyvar.cm.core import CortexM
def main():
cortex = CortexM()
fw = None
for firmware in cortex.firmwares:
if "str_echo" in firmware:
fw = firmware
break
if not fw:
sys.exit("The cm_rpmsg_lite_str_echo firmware was not found.")
print(f"Runni... | true | true |
08f3a3d456ffe1d2fd39d1c0e76c500252e6ea73 | 2,886 | py | Python | experiments_koord/app_krd_py/shapeform.py | lyg1597/CyPhyHouseExperiments | 7a2604a4c086bb86e10b4188f0b114d31ccdfa37 | [
"NCSA"
] | 4 | 2020-08-09T01:34:29.000Z | 2021-12-24T18:08:03.000Z | experiments_koord/app_krd_py/shapeform.py | lyg1597/CyPhyHouseExperiments | 7a2604a4c086bb86e10b4188f0b114d31ccdfa37 | [
"NCSA"
] | 2 | 2020-01-14T03:23:39.000Z | 2020-11-12T17:51:09.000Z | experiments_koord/app_krd_py/shapeform.py | cyphyhouse/CyPhyHouse-Dev | b72bfc1a2beb379a1c3e429bb979815a82242707 | [
"NCSA"
] | 3 | 2021-06-16T22:13:28.000Z | 2022-02-16T13:10:58.000Z | import math
from scipy.spatial.transform import Rotation
from src.config.configs import AgentConfig, MoatConfig
from src.harness.agentThread import AgentThread
from src.motion.pos_types import pos3d
class ShapeForm(AgentThread):
def __init__(self, agent_config: AgentConfig, moat_config: MoatConfig):
sup... | 29.44898 | 104 | 0.565142 | import math
from scipy.spatial.transform import Rotation
from src.config.configs import AgentConfig, MoatConfig
from src.harness.agentThread import AgentThread
from src.motion.pos_types import pos3d
class ShapeForm(AgentThread):
def __init__(self, agent_config: AgentConfig, moat_config: MoatConfig):
sup... | true | true |
08f3a3eaa1dd88048069bde21fae58abc5b4ba4c | 2,241 | py | Python | datadog_checks_dev/datadog_checks/dev/tooling/commands/validate/eula.py | gaffneyd4/integrations-core | 4c7725c9f1be4985381aad9740e7186f16a87976 | [
"BSD-3-Clause"
] | 1 | 2021-06-06T23:49:17.000Z | 2021-06-06T23:49:17.000Z | datadog_checks_dev/datadog_checks/dev/tooling/commands/validate/eula.py | gaffneyd4/integrations-core | 4c7725c9f1be4985381aad9740e7186f16a87976 | [
"BSD-3-Clause"
] | null | null | null | datadog_checks_dev/datadog_checks/dev/tooling/commands/validate/eula.py | gaffneyd4/integrations-core | 4c7725c9f1be4985381aad9740e7186f16a87976 | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2020-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import click
from ...testing import process_checks_option
from ...utils import complete_valid_checks, get_eula_from_manifest
from ..console import CONTEXT_SETTINGS, abort, echo_failure, echo_info, echo_su... | 37.35 | 117 | 0.654618 | import click
from ...testing import process_checks_option
from ...utils import complete_valid_checks, get_eula_from_manifest
from ..console import CONTEXT_SETTINGS, abort, echo_failure, echo_info, echo_success
@click.command('eula', context_settings=CONTEXT_SETTINGS, short_help='Validate EULA files')
@click.argument... | true | true |
08f3a439a56481197cf6a500e703763618c89ee0 | 8,390 | py | Python | configs/htc/htc_r50_fpn_1x.py | chy7074646/mmdetection | 68589d36f67ce3e05e0c5cd936b6e7fa72a1101a | [
"Apache-2.0"
] | 1,158 | 2019-04-26T01:08:32.000Z | 2022-03-30T06:46:24.000Z | configs/htc/htc_r50_fpn_1x.py | chy7074646/mmdetection | 68589d36f67ce3e05e0c5cd936b6e7fa72a1101a | [
"Apache-2.0"
] | 148 | 2021-03-18T09:44:02.000Z | 2022-03-31T06:01:39.000Z | configs/htc/htc_r50_fpn_1x.py | chy7074646/mmdetection | 68589d36f67ce3e05e0c5cd936b6e7fa72a1101a | [
"Apache-2.0"
] | 197 | 2020-01-29T09:58:27.000Z | 2022-03-25T12:08:56.000Z | # model settings
model = dict(
type='HybridTaskCascade',
num_stages=3,
pretrained='modelzoo://resnet50',
interleaved=True,
mask_info_flow=True,
backbone=dict(
type='ResNet',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
style='... | 29.751773 | 78 | 0.533373 | model = dict(
type='HybridTaskCascade',
num_stages=3,
pretrained='modelzoo://resnet50',
interleaved=True,
mask_info_flow=True,
backbone=dict(
type='ResNet',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
style='pytorch'),
ne... | true | true |
08f3a43ac7276640bb1f6d61c659bd16a2731054 | 5,759 | py | Python | demo/run_inference.py | LucasVandroux/Fashion-MNIST-Pytorch | 1a0b60a7f2a580d9a5a1fafd6f68a36eb05efcb8 | [
"MIT"
] | 1 | 2020-04-18T17:29:10.000Z | 2020-04-18T17:29:10.000Z | demo/run_inference.py | LucasVandroux/Fashion-MNIST-Pytorch | 1a0b60a7f2a580d9a5a1fafd6f68a36eb05efcb8 | [
"MIT"
] | null | null | null | demo/run_inference.py | LucasVandroux/Fashion-MNIST-Pytorch | 1a0b60a7f2a580d9a5a1fafd6f68a36eb05efcb8 | [
"MIT"
] | 1 | 2022-03-29T07:54:01.000Z | 2022-03-29T07:54:01.000Z | import argparse
import json
import os
import statistics
import time
import cv2
import numpy as np
from utils import SimpleObjectSegmentation, FashionClassifier, extract_roi
parser = argparse.ArgumentParser()
parser.add_argument(
"--model",
type=str,
required=True,
choices=["SimpleCNNModel", "ResNet18... | 30.962366 | 165 | 0.587602 | import argparse
import json
import os
import statistics
import time
import cv2
import numpy as np
from utils import SimpleObjectSegmentation, FashionClassifier, extract_roi
parser = argparse.ArgumentParser()
parser.add_argument(
"--model",
type=str,
required=True,
choices=["SimpleCNNModel", "ResNet18... | true | true |
08f3a5aa8a2cb10f37f3602cb60f081bd1cd6b0e | 2,758 | py | Python | visitpy/visit_flow/flow/src/filters/__init__.py | ahota/visit_ospray | d80b2e18ff5654d04bfb56ae4d6f42e45f87c9b9 | [
"BSD-3-Clause"
] | null | null | null | visitpy/visit_flow/flow/src/filters/__init__.py | ahota/visit_ospray | d80b2e18ff5654d04bfb56ae4d6f42e45f87c9b9 | [
"BSD-3-Clause"
] | null | null | null | visitpy/visit_flow/flow/src/filters/__init__.py | ahota/visit_ospray | d80b2e18ff5654d04bfb56ae4d6f42e45f87c9b9 | [
"BSD-3-Clause"
] | null | null | null | #*****************************************************************************
#
# Copyright (c) 2000 - 2014, Lawrence Livermore National Security, LLC
# Produced at the Lawrence Livermore National Laboratory
# LLNL-CODE-442911
# All rights reserved.
#
# This file is part of VisIt. For details, see https://visit.llnl... | 39.971014 | 78 | 0.700508 |
import cmd
import file_ops
import imagick
import script_pipeline
try:
import npy_ops
except ImportError as e:
pass
try:
import pyocl_env
import pyocl_ops
import pyocl_batch
import pyocl_compile
except ImportError as e:
pass
from management import * | true | true |
08f3a6d180c73510da7847263c6bc62301e963a3 | 3,074 | py | Python | data/p2DJ/New/R2/benchmark/startQiskit_noisy144.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p2DJ/New/R2/benchmark/startQiskit_noisy144.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p2DJ/New/R2/benchmark/startQiskit_noisy144.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=2
# total number=9
import cirq
import qiskit
from qiskit.providers.aer import QasmSimulator
from qiskit.test.mock import FakeVigo
from qiskit import IBMQ
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from q... | 27.945455 | 82 | 0.626545 | import cirq
import qiskit
from qiskit.providers.aer import QasmSimulator
from qiskit.test.mock import FakeVigo
from qiskit import IBMQ
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import FakeVigo
fr... | true | true |
08f3a809588547439c7535f53910a7448f6b81eb | 10,411 | py | Python | text/src/autogluon/text/automm/models/categorical_transformer.py | yiqings/autogluon | d41a1ab6a6c440b82f06a25835c719fb9d9e9ebf | [
"Apache-2.0"
] | null | null | null | text/src/autogluon/text/automm/models/categorical_transformer.py | yiqings/autogluon | d41a1ab6a6c440b82f06a25835c719fb9d9e9ebf | [
"Apache-2.0"
] | null | null | null | text/src/autogluon/text/automm/models/categorical_transformer.py | yiqings/autogluon | d41a1ab6a6c440b82f06a25835c719fb9d9e9ebf | [
"Apache-2.0"
] | null | null | null | import torch
from torch import nn
from torch import Tensor
from typing import Any, Dict, List, Optional, Union, cast
from ..constants import CATEGORICAL, LABEL, LOGITS, FEATURES
from .ft_transformer import _TokenInitialization, CLSToken, FT_Transformer
class CategoricalFeatureTokenizer(nn.Module):
"""
Feature... | 36.275261 | 120 | 0.63164 | import torch
from torch import nn
from torch import Tensor
from typing import Any, Dict, List, Optional, Union, cast
from ..constants import CATEGORICAL, LABEL, LOGITS, FEATURES
from .ft_transformer import _TokenInitialization, CLSToken, FT_Transformer
class CategoricalFeatureTokenizer(nn.Module):
def __init__(
... | true | true |
08f3a84ecc4187eb310d6c23d1befe8a6bcab488 | 2,527 | py | Python | test-opt-reg.py | blevine37/blarf | 8f1d1abb05d72069323d7911f2afb38ad3d9146b | [
"MIT"
] | null | null | null | test-opt-reg.py | blevine37/blarf | 8f1d1abb05d72069323d7911f2afb38ad3d9146b | [
"MIT"
] | null | null | null | test-opt-reg.py | blevine37/blarf | 8f1d1abb05d72069323d7911f2afb38ad3d9146b | [
"MIT"
] | null | null | null | import numpy as np
import blarf
import os
natoms = 6
ff = blarf.potential()
timemax = 1000.0
stride = 100
timestep = 0.001
ff.init_ethylene(1.0,0.05,0.3)
r = np.zeros(natoms*3)
r[5] = 1.1
r[7] = 0.7
r[8] = -0.5
r[9] = 0.1
r[10] = -0.7
r[11] = -0.5
r[12] = 0.7
r[14] = 1.5
r[15] = -0.6
r[17] = 1.5
print "r ", r
... | 18.580882 | 70 | 0.694895 | import numpy as np
import blarf
import os
natoms = 6
ff = blarf.potential()
timemax = 1000.0
stride = 100
timestep = 0.001
ff.init_ethylene(1.0,0.05,0.3)
r = np.zeros(natoms*3)
r[5] = 1.1
r[7] = 0.7
r[8] = -0.5
r[9] = 0.1
r[10] = -0.7
r[11] = -0.5
r[12] = 0.7
r[14] = 1.5
r[15] = -0.6
r[17] = 1.5
print "r ", r
... | false | true |
08f3a8eb55251382506df99d9cb00747ce659c43 | 728 | py | Python | cli/polyaxon/tracking/utils/run_info.py | hackerwins/polyaxon | ff56a098283ca872abfbaae6ba8abba479ffa394 | [
"Apache-2.0"
] | null | null | null | cli/polyaxon/tracking/utils/run_info.py | hackerwins/polyaxon | ff56a098283ca872abfbaae6ba8abba479ffa394 | [
"Apache-2.0"
] | null | null | null | cli/polyaxon/tracking/utils/run_info.py | hackerwins/polyaxon | ff56a098283ca872abfbaae6ba8abba479ffa394 | [
"Apache-2.0"
] | null | null | null | import os
from polyaxon.env_vars.keys import POLYAXON_KEYS_RUN_INSTANCE
from polyaxon.exceptions import PolyaxonClientException
def get_run_info():
job_instance = os.getenv(POLYAXON_KEYS_RUN_INSTANCE, None)
if not job_instance:
raise PolyaxonClientException(
"Could get run info, "
... | 30.333333 | 84 | 0.642857 | import os
from polyaxon.env_vars.keys import POLYAXON_KEYS_RUN_INSTANCE
from polyaxon.exceptions import PolyaxonClientException
def get_run_info():
job_instance = os.getenv(POLYAXON_KEYS_RUN_INSTANCE, None)
if not job_instance:
raise PolyaxonClientException(
"Could get run info, "
... | true | true |
08f3a9455d3ce2f00fad1016eac3ba07baccf1c4 | 16,656 | py | Python | benchmarks/f3_wrong_hints/scaling_ltl_timed_transition_system/6-sender_receiver_19.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | 3 | 2021-04-23T23:29:26.000Z | 2022-03-23T10:00:30.000Z | benchmarks/f3_wrong_hints/scaling_ltl_timed_transition_system/6-sender_receiver_19.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | null | null | null | benchmarks/f3_wrong_hints/scaling_ltl_timed_transition_system/6-sender_receiver_19.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | 1 | 2021-11-17T22:02:56.000Z | 2021-11-17T22:02:56.000Z | from typing import FrozenSet
from collections import Iterable
from math import log, ceil
from mathsat import msat_term, msat_env
from mathsat import msat_make_constant, msat_declare_function
from mathsat import msat_get_integer_type, msat_get_rational_type, msat_get_bool_type
from mathsat import msat_make_and, msa... | 39.942446 | 89 | 0.569524 | from typing import FrozenSet
from collections import Iterable
from math import log, ceil
from mathsat import msat_term, msat_env
from mathsat import msat_make_constant, msat_declare_function
from mathsat import msat_get_integer_type, msat_get_rational_type, msat_get_bool_type
from mathsat import msat_make_and, msa... | true | true |
08f3a9c2558fde8e60a25ca216f14a49159e54ed | 3,011 | py | Python | sdk/servicebus/azure-servicebus/setup.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 1 | 2021-04-26T21:15:01.000Z | 2021-04-26T21:15:01.000Z | sdk/servicebus/azure-servicebus/setup.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 2 | 2021-08-24T15:32:30.000Z | 2021-08-24T23:21:34.000Z | sdk/servicebus/azure-servicebus/setup.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 1 | 2016-04-19T22:15:47.000Z | 2016-04-19T22:15:47.000Z | #!/usr/bin/env python
# ------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# ---------------------------------------------------------------... | 32.376344 | 91 | 0.597476 |
import re
import os.path
from io import open
from setuptools import find_packages, setup
PACKAGE_NAME = "azure-servicebus"
PACKAGE_PPRINT_NAME = "Service Bus"
package_folder_path = PACKAGE_NAME.replace('-', '/')
namespace_name = PACKAGE_NAME.replace('-', '.')
try:
import azure
try:
ver = azure.__ve... | true | true |
08f3aa13d8146b606ef6ac7b37788d86e1f68bed | 1,024 | py | Python | zerver/webhooks/mention/tests.py | TylerPham2000/zulip | 2e7aaba0dde5517b4a55cb0bd782f009be45e3ba | [
"Apache-2.0"
] | 2 | 2020-11-12T12:28:46.000Z | 2020-11-16T11:17:46.000Z | zerver/webhooks/mention/tests.py | TylerPham2000/zulip | 2e7aaba0dde5517b4a55cb0bd782f009be45e3ba | [
"Apache-2.0"
] | 1 | 2021-03-24T12:50:52.000Z | 2021-03-24T13:11:42.000Z | zerver/webhooks/mention/tests.py | TylerPham2000/zulip | 2e7aaba0dde5517b4a55cb0bd782f009be45e3ba | [
"Apache-2.0"
] | 1 | 2021-08-05T14:27:13.000Z | 2021-08-05T14:27:13.000Z | from zerver.lib.test_classes import WebhookTestCase
class MentionHookTests(WebhookTestCase):
STREAM_NAME = "test"
URL_TEMPLATE = "/api/v1/external/mention?api_key={api_key}&stream={stream}"
FIXTURE_DIR_NAME = "mention"
def test_mention_webfeed(self) -> None:
expected_topic = "news"
ex... | 37.925926 | 214 | 0.698242 | from zerver.lib.test_classes import WebhookTestCase
class MentionHookTests(WebhookTestCase):
STREAM_NAME = "test"
URL_TEMPLATE = "/api/v1/external/mention?api_key={api_key}&stream={stream}"
FIXTURE_DIR_NAME = "mention"
def test_mention_webfeed(self) -> None:
expected_topic = "news"
ex... | true | true |
08f3aa872aff988cc30a6f35523af051fdadfd00 | 8,226 | py | Python | examples/twisted/websocket/auth_persona/server.py | luhn/AutobahnPython | 7d519052ab42dc029598ab9e2dbdd7af8e08341f | [
"Apache-2.0"
] | null | null | null | examples/twisted/websocket/auth_persona/server.py | luhn/AutobahnPython | 7d519052ab42dc029598ab9e2dbdd7af8e08341f | [
"Apache-2.0"
] | null | null | null | examples/twisted/websocket/auth_persona/server.py | luhn/AutobahnPython | 7d519052ab42dc029598ab9e2dbdd7af8e08341f | [
"Apache-2.0"
] | null | null | null | ###############################################################################
##
## Copyright (C) 2011-2014 Tavendo GmbH
##
## 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
##
## h... | 33.57551 | 109 | 0.595551 |
import sys
import json
import urllib
import Cookie
from twisted.internet import reactor
from twisted.python import log
from twisted.web.server import Site
from twisted.web.static import File
import autobahn
from autobahn.util import newid, utcnow
from autobahn.websocket import http
from autobahn.twisted.websocket i... | true | true |
08f3ab29b352a1b0ce825132dfecdde9dc3aaf85 | 41 | py | Python | strategypy/bots/unittest_moveright.py | davide-ceretti/strategypy | 37df9569e3a9fc8a0f1487a29a7897db6363c42e | [
"MIT"
] | 8 | 2015-03-03T17:40:41.000Z | 2020-11-08T19:02:23.000Z | strategypy/bots/unittest_moveright.py | davide-ceretti/strategypy | 37df9569e3a9fc8a0f1487a29a7897db6363c42e | [
"MIT"
] | 19 | 2015-01-14T12:07:05.000Z | 2015-03-19T11:53:11.000Z | strategypy/bots/unittest_moveright.py | davide-ceretti/strategypy | 37df9569e3a9fc8a0f1487a29a7897db6363c42e | [
"MIT"
] | 6 | 2015-03-16T18:17:06.000Z | 2021-11-04T23:44:47.000Z | def action(ctx):
return 'move right'
| 13.666667 | 23 | 0.658537 | def action(ctx):
return 'move right'
| true | true |
08f3ab34f94b6f8eaa9205774e0c25dd0e3610a2 | 3,475 | py | Python | server/bracketshare/bracketshare/settings.py | nkrim/bandbrackets | 48f16aa4d822831c4e6ae430c4557751dba6de8b | [
"Apache-2.0"
] | null | null | null | server/bracketshare/bracketshare/settings.py | nkrim/bandbrackets | 48f16aa4d822831c4e6ae430c4557751dba6de8b | [
"Apache-2.0"
] | 2 | 2020-06-05T18:22:52.000Z | 2021-06-10T20:28:46.000Z | server/bracketshare/bracketshare/settings.py | nkrim/bandbrackets | 48f16aa4d822831c4e6ae430c4557751dba6de8b | [
"Apache-2.0"
] | null | null | null | """
Django settings for bracketshare project.
Generated by 'django-admin startproject' using Django 2.0.4.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/ref/settings/
"""
import ... | 25.181159 | 91 | 0.697554 |
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = '@b3y040%)e!j*2x%)-$0=5xamiua0p@$fnmk6ar7hvltu7u*in'
DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes... | true | true |
08f3abc76fb0739c1e5b969a3c5fcd6b42965614 | 434 | py | Python | pattern3/tank_v2/src/VT2.py | icexmoon/design-pattern-with-python | bb897e886fe52bb620db0edc6ad9d2e5ecb067af | [
"MIT"
] | null | null | null | pattern3/tank_v2/src/VT2.py | icexmoon/design-pattern-with-python | bb897e886fe52bb620db0edc6ad9d2e5ecb067af | [
"MIT"
] | null | null | null | pattern3/tank_v2/src/VT2.py | icexmoon/design-pattern-with-python | bb897e886fe52bb620db0edc6ad9d2e5ecb067af | [
"MIT"
] | null | null | null | #######################################################
#
# VT2.py
# Python implementation of the Class VT2
# Generated by Enterprise Architect
# Created on: 15-6��-2021 14:00:36
# Original author: 70748
#
#######################################################
from .TankBody import TankBody
class VT2(TankBody)... | 27.125 | 55 | 0.481567 | from .TankBody import TankBody
class VT2(TankBody):
def __init__(self) -> None:
super().__init__()
self.price = 50000
self.des = "VT2车体" | true | true |
08f3ac1d64faabeda48daa54dcea17a01924d2e8 | 1,796 | py | Python | tests/test_preprocessing.py | gilad-rubin/hypster | e8a15b9023a1bbffad4e5cdd756aed33e2682931 | [
"MIT"
] | 14 | 2019-09-09T12:41:59.000Z | 2020-10-12T05:05:02.000Z | tests/test_preprocessing.py | gilad-rubin/optuna-on-steroids | e8a15b9023a1bbffad4e5cdd756aed33e2682931 | [
"MIT"
] | null | null | null | tests/test_preprocessing.py | gilad-rubin/optuna-on-steroids | e8a15b9023a1bbffad4e5cdd756aed33e2682931 | [
"MIT"
] | 2 | 2019-12-29T13:38:14.000Z | 2020-03-28T06:01:59.000Z | import sklearn
import scipy
import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.datasets import make_classification
from hypster import HyPSTERClassifier
SEED = 50
def test_flow():
X, y = make_classification(n_samples=300, n_features=40, n_informative=30, rand... | 35.215686 | 97 | 0.558463 | import sklearn
import scipy
import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.datasets import make_classification
from hypster import HyPSTERClassifier
SEED = 50
def test_flow():
X, y = make_classification(n_samples=300, n_features=40, n_informative=30, rand... | true | true |
08f3ac7b0db4d9868ebf56de2c4d89995b0702c4 | 17,761 | py | Python | venv/Lib/site-packages/tests/test_155_FetchAssocSelect_05.py | shehzadulislam/Assignment4 | a9cced70be6ae5d2685027d68032d5849f638301 | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/tests/test_155_FetchAssocSelect_05.py | shehzadulislam/Assignment4 | a9cced70be6ae5d2685027d68032d5849f638301 | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/tests/test_155_FetchAssocSelect_05.py | shehzadulislam/Assignment4 | a9cced70be6ae5d2685027d68032d5849f638301 | [
"Apache-2.0"
] | null | null | null | #
# Licensed Materials - Property of IBM
#
# (c) Copyright IBM Corp. 2007-2008
#
import unittest, sys
import ibm_db
import config
from testfunctions import IbmDbTestFunctions
class IbmDbTestCase(unittest.TestCase):
def test_155_FetchAssocSelect_05(self):
obj = IbmDbTestFunctions()
obj.assert_expect(self... | 95.489247 | 418 | 0.581161 |
import unittest, sys
import ibm_db
import config
from testfunctions import IbmDbTestFunctions
class IbmDbTestCase(unittest.TestCase):
def test_155_FetchAssocSelect_05(self):
obj = IbmDbTestFunctions()
obj.assert_expect(self.run_test_155)
def run_test_155(self):
conn = ibm_db.connect(config.database,... | true | true |
08f3ae79d7c868aec2edf7eb6e79c22153252c4a | 1,063 | py | Python | Dynamic Programming/Medium/63. Unique Paths II/solution.py | tintindas/leetcode-solutions | eb97254dafddffccbce048ef04aea1e934277282 | [
"MIT"
] | 1 | 2021-03-10T02:48:39.000Z | 2021-03-10T02:48:39.000Z | Dynamic Programming/Medium/63. Unique Paths II/solution.py | tintindas/leetcode-solutions | eb97254dafddffccbce048ef04aea1e934277282 | [
"MIT"
] | null | null | null | Dynamic Programming/Medium/63. Unique Paths II/solution.py | tintindas/leetcode-solutions | eb97254dafddffccbce048ef04aea1e934277282 | [
"MIT"
] | 1 | 2021-03-18T08:22:29.000Z | 2021-03-18T08:22:29.000Z | from typing import List
class Solution:
def uniquePathsWithObstacles(self, obstacleGrid: List[List[int]]) -> int:
if obstacleGrid[-1][-1] or obstacleGrid[0][0]:
return 0
m = len(obstacleGrid)
n = len(obstacleGrid[0])
for i in range(m):
for j in range(n):
... | 30.371429 | 88 | 0.496707 | from typing import List
class Solution:
def uniquePathsWithObstacles(self, obstacleGrid: List[List[int]]) -> int:
if obstacleGrid[-1][-1] or obstacleGrid[0][0]:
return 0
m = len(obstacleGrid)
n = len(obstacleGrid[0])
for i in range(m):
for j in range(n):
... | true | true |
08f3aec8bfed42ab4f6af0ab09db5ad7ce8fa39e | 899 | py | Python | kik_unofficial/device_configuration.py | Orion6pax/kik-bot-api-unofficial | 54723c4c245c343cedab0237326dd77ced8e0498 | [
"MIT"
] | null | null | null | kik_unofficial/device_configuration.py | Orion6pax/kik-bot-api-unofficial | 54723c4c245c343cedab0237326dd77ced8e0498 | [
"MIT"
] | null | null | null | kik_unofficial/device_configuration.py | Orion6pax/kik-bot-api-unofficial | 54723c4c245c343cedab0237326dd77ced8e0498 | [
"MIT"
] | null | null | null | """
Here we put all the device configuration that we emulate.
"""
# possible kik versions to emulate
kik_version_11_info = {"kik_version": "11.1.1.12218", "classes_dex_sha1_digest": "aCDhFLsmALSyhwi007tvowZkUd0="}
kik_version_13_info = {"kik_version": "13.4.0.9614", "classes_dex_sha1_digest": "ETo70PFW30/jeFMKKY+CNanX... | 56.1875 | 114 | 0.756396 |
kik_version_11_info = {"kik_version": "11.1.1.12218", "classes_dex_sha1_digest": "aCDhFLsmALSyhwi007tvowZkUd0="}
kik_version_13_info = {"kik_version": "13.4.0.9614", "classes_dex_sha1_digest": "ETo70PFW30/jeFMKKY+CNanX2Fg="}
kik_version_14_info = {"kik_version": "14.0.0.11130", "classes_dex_sha1_digest": "9nPRnohIOTb... | true | true |
08f3aedb1517acfa3af74523abaeedb9ea8abc9c | 401 | py | Python | book/migrations/0005_alter_book_rented_count.py | KhudadadKhawari/the-library | a6acd2e8ce9ca350339d99775f1e7906d343c7d4 | [
"MIT"
] | null | null | null | book/migrations/0005_alter_book_rented_count.py | KhudadadKhawari/the-library | a6acd2e8ce9ca350339d99775f1e7906d343c7d4 | [
"MIT"
] | null | null | null | book/migrations/0005_alter_book_rented_count.py | KhudadadKhawari/the-library | a6acd2e8ce9ca350339d99775f1e7906d343c7d4 | [
"MIT"
] | null | null | null | # Generated by Django 4.0 on 2021-12-15 08:55
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('book', '0004_alter_book_rented_count'),
]
operations = [
migrations.AlterField(
model_name='book',
name='rented_count'... | 21.105263 | 61 | 0.608479 |
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('book', '0004_alter_book_rented_count'),
]
operations = [
migrations.AlterField(
model_name='book',
name='rented_count',
field=models.IntegerField(blank=... | true | true |
08f3af0bf932352db82245956c3c66f5d855f02a | 11,852 | py | Python | frappe/model/delete_doc.py | Havenir/gppert-frappe | d302388ad15b36754a48c5d047d7515dad257b89 | [
"MIT"
] | null | null | null | frappe/model/delete_doc.py | Havenir/gppert-frappe | d302388ad15b36754a48c5d047d7515dad257b89 | [
"MIT"
] | 5 | 2020-07-20T01:13:34.000Z | 2022-02-10T21:49:18.000Z | frappe/model/delete_doc.py | Havenir/gppert-frappe | d302388ad15b36754a48c5d047d7515dad257b89 | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
import frappe.model.meta
from frappe.model.dynamic_links import get_dynamic_link_map
import frappe.defaults
from frappe.utils.file_manager import remove_all
from fr... | 35.27381 | 124 | 0.724857 |
from __future__ import unicode_literals
import frappe
import frappe.model.meta
from frappe.model.dynamic_links import get_dynamic_link_map
import frappe.defaults
from frappe.utils.file_manager import remove_all
from frappe.utils.password import delete_all_passwords_for
from frappe import _
from frappe.model.naming im... | true | true |
08f3b107dfba540c25ceb4dbc977c1ac4bb09e9d | 212 | py | Python | ramda/multiply_test.py | Rafi993/pyramda | 4fa7fe28d5eaa798b702d28bdd3948515cb88f48 | [
"MIT"
] | 56 | 2018-08-06T08:44:58.000Z | 2022-03-17T09:49:03.000Z | ramda/multiply_test.py | Rafi993/pyramda | 4fa7fe28d5eaa798b702d28bdd3948515cb88f48 | [
"MIT"
] | 28 | 2019-06-17T11:09:52.000Z | 2022-02-18T16:59:21.000Z | ramda/multiply_test.py | slavaGanzin/pyramda | 4fa7fe28d5eaa798b702d28bdd3948515cb88f48 | [
"MIT"
] | 5 | 2019-09-18T09:24:38.000Z | 2021-07-21T08:40:23.000Z | from .multiply import multiply
from ramda.private.asserts import assert_equal
def multiply_nocurry_test():
assert_equal(multiply(3, 6), 18)
def multiply_curry_test():
assert_equal(multiply(3)(6), 18)
| 19.272727 | 46 | 0.759434 | from .multiply import multiply
from ramda.private.asserts import assert_equal
def multiply_nocurry_test():
assert_equal(multiply(3, 6), 18)
def multiply_curry_test():
assert_equal(multiply(3)(6), 18)
| true | true |
08f3b16da95fddb178fb6a54753170f191878f8a | 991 | py | Python | src/systems/synthetic.py | 212726320/BEBO-1 | 2909b3a00161b2e29fad667add30392abc11a968 | [
"MIT"
] | null | null | null | src/systems/synthetic.py | 212726320/BEBO-1 | 2909b3a00161b2e29fad667add30392abc11a968 | [
"MIT"
] | null | null | null | src/systems/synthetic.py | 212726320/BEBO-1 | 2909b3a00161b2e29fad667add30392abc11a968 | [
"MIT"
] | null | null | null | # File: synthetic.py
# File Created: Sunday, 3rd November 2019 11:38:53 am
# Author: Steven Atkinson (212726320@ge.com)
"""
Another synthetic function
"""
import numpy as np
from .base import WithFunction
class Synthetic(WithFunction):
"""
Domain: [0, 1]
"""
def __init__(self):
super().__in... | 23.595238 | 66 | 0.596367 |
import numpy as np
from .base import WithFunction
class Synthetic(WithFunction):
def __init__(self):
super().__init__()
self.real_dimensions = 1
self.general_dimensions = 1
self.num_types = [1000]
self._fidelity_matrix = None
self._cache_fidelity_params()
... | true | true |
08f3b1db452fb1d13b76569c51dd1dcdd249fe37 | 1,626 | py | Python | tests/bvpsol/test_SingleShooting.py | Rapid-Design-of-Systems-Laboratory/beluga-legacy | d14713d8211b64293c4427005cf02fbd58630598 | [
"MIT"
] | 1 | 2019-03-26T03:00:03.000Z | 2019-03-26T03:00:03.000Z | tests/bvpsol/test_SingleShooting.py | Rapid-Design-of-Systems-Laboratory/beluga-legacy | d14713d8211b64293c4427005cf02fbd58630598 | [
"MIT"
] | null | null | null | tests/bvpsol/test_SingleShooting.py | Rapid-Design-of-Systems-Laboratory/beluga-legacy | d14713d8211b64293c4427005cf02fbd58630598 | [
"MIT"
] | 1 | 2019-07-14T22:53:52.000Z | 2019-07-14T22:53:52.000Z | from math import *
import beluga.bvpsol as bvpsol
import beluga.bvpsol.algorithms as algorithms
import numpy as np
import numpy.testing as npt
import pytest
def test_solve():
"""Test solver using analytic solution of a BVP"""
def odefn(t,X,p,aux):
y = X[0]
ydot = X[1]
xf = p[0]
... | 26.225806 | 95 | 0.575646 | from math import *
import beluga.bvpsol as bvpsol
import beluga.bvpsol.algorithms as algorithms
import numpy as np
import numpy.testing as npt
import pytest
def test_solve():
def odefn(t,X,p,aux):
y = X[0]
ydot = X[1]
xf = p[0]
return xf*np.array([
ydot,
... | true | true |
08f3b315cdd1bb5afa623fe483f71913d6e4a368 | 21,961 | py | Python | src/bertwrapper.py | yukiar/phrase_alignment_cted | 7706ca1b8be849f2413d813ea1f3c77919b635ee | [
"MIT"
] | 5 | 2021-04-22T09:19:35.000Z | 2021-12-22T06:30:45.000Z | src/bertwrapper.py | yukiar/phrase_alignment_cted | 7706ca1b8be849f2413d813ea1f3c77919b635ee | [
"MIT"
] | null | null | null | src/bertwrapper.py | yukiar/phrase_alignment_cted | 7706ca1b8be849f2413d813ea1f3c77919b635ee | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
from pytorch_pretrained_bert.modeling import BertModel
from cnn import CNN
from multihead_attention import MultiheadAttention
from position_wise_ffnn import Position_wise_FFNN
MAXPOOLING = 0
MEANPOOLING = 1
"""
Initialize BERT
"""
try:
from apex.n... | 41.125468 | 120 | 0.613861 | import torch
import torch.nn as nn
import torch.nn.functional as F
from pytorch_pretrained_bert.modeling import BertModel
from cnn import CNN
from multihead_attention import MultiheadAttention
from position_wise_ffnn import Position_wise_FFNN
MAXPOOLING = 0
MEANPOOLING = 1
try:
from apex.normalization.fused_layer... | true | true |
08f3b3354624a6439c4a68a59f5315bf7373ff85 | 2,535 | py | Python | rlberry/envs/bandits/corrupted_bandits.py | kim0n0/rlberry | 6f0a68a0ea5ba7cd10c4787fbbdf1ed296d4810c | [
"MIT"
] | null | null | null | rlberry/envs/bandits/corrupted_bandits.py | kim0n0/rlberry | 6f0a68a0ea5ba7cd10c4787fbbdf1ed296d4810c | [
"MIT"
] | null | null | null | rlberry/envs/bandits/corrupted_bandits.py | kim0n0/rlberry | 6f0a68a0ea5ba7cd10c4787fbbdf1ed296d4810c | [
"MIT"
] | null | null | null | import numpy as np
from scipy import stats
from rlberry.envs.bandits import Bandit
class CorruptedLaws:
"""
Class for corrupted laws.
Parameters
----------
law: law
Can either be a frozen scipy law or any class that
has a method .rvs() to sample according to the given law.
... | 27.258065 | 83 | 0.593294 | import numpy as np
from scipy import stats
from rlberry.envs.bandits import Bandit
class CorruptedLaws:
def __init__(self, law, cor_prop, cor_law):
self.law = law
self.cor_prop = cor_prop
self.cor_law = cor_law
def rvs(self, random_state):
is_corrupted = random_state.binomia... | true | true |
08f3b4bf9ead82e6b8abc77e05f0885715f7c655 | 4,078 | py | Python | models/pspnet.py | cavalleria/humanseg.pytorch | 77663504b32d777ae22345e660f8bc2132c1c817 | [
"MIT"
] | 20 | 2020-06-03T02:56:26.000Z | 2022-03-29T03:55:10.000Z | models/pspnet.py | cavalleria/humanseg.pytorch | 77663504b32d777ae22345e660f8bc2132c1c817 | [
"MIT"
] | 3 | 2020-06-24T02:08:36.000Z | 2021-06-09T03:35:05.000Z | models/pspnet.py | cavalleria/humanseg.pytorch | 77663504b32d777ae22345e660f8bc2132c1c817 | [
"MIT"
] | 11 | 2020-07-15T08:43:09.000Z | 2021-12-24T07:14:40.000Z | #------------------------------------------------------------------------------
# Libraries
#------------------------------------------------------------------------------
import torch
import torch.nn as nn
import torch.nn.functional as F
from collections import OrderedDict
from base.base_model import BaseModel
from ... | 32.110236 | 106 | 0.693477 | import torch
import torch.nn as nn
import torch.nn.functional as F
from collections import OrderedDict
from base.base_model import BaseModel
from .backbones import resnet
class ConvBlock(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=0, bias=True):
super(ConvBlock, self).... | true | true |
08f3b5642725894a77103d6aa9d0cfcacf7dff54 | 1,249 | py | Python | dashboard/internet_nl_dashboard/management/commands/one_shot_upgrade_reports.py | fredunit/Internet.nl-dashboard | a93ba94be760896013c1ac5497ce277c3c89f5bd | [
"Apache-2.0"
] | null | null | null | dashboard/internet_nl_dashboard/management/commands/one_shot_upgrade_reports.py | fredunit/Internet.nl-dashboard | a93ba94be760896013c1ac5497ce277c3c89f5bd | [
"Apache-2.0"
] | null | null | null | dashboard/internet_nl_dashboard/management/commands/one_shot_upgrade_reports.py | fredunit/Internet.nl-dashboard | a93ba94be760896013c1ac5497ce277c3c89f5bd | [
"Apache-2.0"
] | null | null | null | import logging
from django.core.management.base import BaseCommand
from dashboard.internet_nl_dashboard.models import AccountInternetNLScan, UrlListReport
from dashboard.internet_nl_dashboard.scanners.scan_internet_nl_per_account import (
upgrade_report_with_statistics, upgrade_report_with_unscannable_urls)
log ... | 33.756757 | 92 | 0.705364 | import logging
from django.core.management.base import BaseCommand
from dashboard.internet_nl_dashboard.models import AccountInternetNLScan, UrlListReport
from dashboard.internet_nl_dashboard.scanners.scan_internet_nl_per_account import (
upgrade_report_with_statistics, upgrade_report_with_unscannable_urls)
log ... | true | true |
08f3b57a6c2ef0026bf522000b5f1ef8904244ac | 465 | py | Python | xinyu/python/node/tagTreeNote/Config.py | xzhuah/codingDimension | 9b90b93a3a3b8afee28e3a2a571050ca3f86f066 | [
"Apache-2.0"
] | 1 | 2020-11-06T20:39:11.000Z | 2020-11-06T20:39:11.000Z | xinyu/python/node/tagTreeNote/Config.py | xzhuah/codingDimension | 9b90b93a3a3b8afee28e3a2a571050ca3f86f066 | [
"Apache-2.0"
] | 1 | 2021-08-28T02:29:51.000Z | 2021-08-28T02:29:51.000Z | xinyu/python/node/tagTreeNote/Config.py | xzhuah/codingDimension | 9b90b93a3a3b8afee28e3a2a571050ca3f86f066 | [
"Apache-2.0"
] | null | null | null | # Created by Xinyu Zhu on 2021/8/29, 3:40
import os
# Can customize
DEFAULT_PATH_SEPARATOR = "/"
# Don't Customize
ILLEGAL_CHARS_FOR_FOLDER_NAME = {DEFAULT_PATH_SEPARATOR, "<", ">", "[", "]", "(", ")", os.linesep}
ILLEGAL_CHARS_FOR_FILENAME = {DEFAULT_PATH_SEPARATOR, "<", ">", "[", "]", "(", ")", os.linesep}
ILLEGAL_... | 38.75 | 105 | 0.608602 | import os
DEFAULT_PATH_SEPARATOR = "/"
ILLEGAL_CHARS_FOR_FOLDER_NAME = {DEFAULT_PATH_SEPARATOR, "<", ">", "[", "]", "(", ")", os.linesep}
ILLEGAL_CHARS_FOR_FILENAME = {DEFAULT_PATH_SEPARATOR, "<", ">", "[", "]", "(", ")", os.linesep}
ILLEGAL_CHARS_FOR_URI = {"(", ")", os.linesep}
ILLEGAL_CHARS_FOR_TAG = {DEFAULT_PATH... | true | true |
08f3b581a72aa3b96cdccbdfa2a13d8cb01d18fa | 1,259 | py | Python | utils.py | qinyuanpei/douban-generator | 34fac971c2e6ea14c4d0915b8245cea0cdc26121 | [
"MIT"
] | 2 | 2021-11-07T09:58:48.000Z | 2021-11-08T12:06:35.000Z | utils.py | qinyuanpei/douban-generator | 34fac971c2e6ea14c4d0915b8245cea0cdc26121 | [
"MIT"
] | null | null | null | utils.py | qinyuanpei/douban-generator | 34fac971c2e6ea14c4d0915b8245cea0cdc26121 | [
"MIT"
] | null | null | null | import logging
from PIL import Image
import os
import requests
import json
def renderStar(num):
if num == '1':
return '★☆☆☆☆ 很差';
elif num == '2':
return '★★☆☆☆ 较差';
elif num == '3':
return '★★★☆☆ 还行';
elif num == '4':
return '★★★★☆ 推荐';
elif num == '... | 31.475 | 111 | 0.528197 | import logging
from PIL import Image
import os
import requests
import json
def renderStar(num):
if num == '1':
return '★☆☆☆☆ 很差';
elif num == '2':
return '★★☆☆☆ 较差';
elif num == '3':
return '★★★☆☆ 还行';
elif num == '4':
return '★★★★☆ 推荐';
elif num == '... | false | true |
08f3b74fc9ecb3707b453b706c67e14b797a85ca | 4,781 | py | Python | test/wrapper/system_tests/synonyms/expectedResultsTermOffsetOFF.py | SRCH2/srch2-ngn | 925f36971aa6a8b31cdc59f7992790169e97ee00 | [
"BSD-3-Clause"
] | 14 | 2016-01-15T20:26:54.000Z | 2018-11-26T20:47:43.000Z | test/wrapper/system_tests/synonyms/expectedResultsTermOffsetOFF.py | SRCH2/srch2-ngn | 925f36971aa6a8b31cdc59f7992790169e97ee00 | [
"BSD-3-Clause"
] | 2 | 2016-04-26T05:29:01.000Z | 2016-05-07T00:13:38.000Z | test/wrapper/system_tests/synonyms/expectedResultsTermOffsetOFF.py | SRCH2/srch2-ngn | 925f36971aa6a8b31cdc59f7992790169e97ee00 | [
"BSD-3-Clause"
] | 7 | 2016-02-27T11:35:59.000Z | 2018-11-26T20:47:59.000Z | results = { 1 :
[
{u'body': [u"RMC says Angel Di Maria has turned his attentions to joining <b>Manchester United</b> after growing frustrated in Paris Saint-Germain's pursuit but MARCA claims that a deal to the French champions could be completed next week"], u'title': [u'Di Maria choice'], u'tags': [u'real madrid', u'... | 97.571429 | 403 | 0.719306 | results = { 1 :
[
{u'body': [u"RMC says Angel Di Maria has turned his attentions to joining <b>Manchester United</b> after growing frustrated in Paris Saint-Germain's pursuit but MARCA claims that a deal to the French champions could be completed next week"], u'title': [u'Di Maria choice'], u'tags': [u'real madrid', u'... | true | true |
08f3b7e5a629ec5f237f1f8de25156862e8f637c | 6,117 | py | Python | models/object_detection/tensorflow/ssd-resnet34/inference/fp32/coco_metric.py | arita37/models | 659895bff24589829b317f5180d60329906dc13c | [
"Apache-2.0"
] | 1 | 2019-05-23T01:07:23.000Z | 2019-05-23T01:07:23.000Z | models/object_detection/tensorflow/ssd-resnet34/inference/fp32/coco_metric.py | arita37/models | 659895bff24589829b317f5180d60329906dc13c | [
"Apache-2.0"
] | null | null | null | models/object_detection/tensorflow/ssd-resnet34/inference/fp32/coco_metric.py | arita37/models | 659895bff24589829b317f5180d60329906dc13c | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Google. 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 law or agree... | 31.530928 | 80 | 0.69642 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import atexit
import tempfile
from absl import flags
import numpy as np
from pycocotools.coco import COCO
from pycocotools.cocoeval import COCOeval
import six
import tensorflow as tf
import ssd_constants
... | true | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.