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
08ffd0fc04a761e082d6b01378ed8c4fe22f6281
2,833
py
Python
test/unit/util/test_utils.py
RECETOX/galaxy
5f2ce62844ca75a1acc72edc0b2db88e6be8a6b4
[ "CC-BY-3.0" ]
null
null
null
test/unit/util/test_utils.py
RECETOX/galaxy
5f2ce62844ca75a1acc72edc0b2db88e6be8a6b4
[ "CC-BY-3.0" ]
1
2021-01-04T14:52:19.000Z
2021-01-06T12:50:10.000Z
test/unit/util/test_utils.py
RECETOX/galaxy
5f2ce62844ca75a1acc72edc0b2db88e6be8a6b4
[ "CC-BY-3.0" ]
null
null
null
import errno import tempfile import pytest from galaxy import util SECTION_XML = """<?xml version="1.0" ?> <section id="fasta_fastq_manipulation" name="Fasta Fastq Manipulation" version=""> <tool file="toolshed.g2.bx.psu.edu/repos/peterjc/seq_filter_by_id/fb1313d79396/seq_filter_by_id/tools/seq_filter_by_id/seq_...
30.793478
229
0.6982
import errno import tempfile import pytest from galaxy import util SECTION_XML = """<?xml version="1.0" ?> <section id="fasta_fastq_manipulation" name="Fasta Fastq Manipulation" version=""> <tool file="toolshed.g2.bx.psu.edu/repos/peterjc/seq_filter_by_id/fb1313d79396/seq_filter_by_id/tools/seq_filter_by_id/seq_...
true
true
08ffd1795eef5f7e381944b4975f87f55e47b9f2
27,617
py
Python
app/modules/case_studies/migrations/0007_alter_casestudypage_body.py
dxw/nhx-website
88344c7602823e0b371d3c6f933aa24aeb57db16
[ "MIT" ]
50
2019-04-04T17:50:00.000Z
2021-08-05T15:08:37.000Z
app/modules/case_studies/migrations/0007_alter_casestudypage_body.py
dxw/nhx-website
88344c7602823e0b371d3c6f933aa24aeb57db16
[ "MIT" ]
434
2019-04-04T18:25:32.000Z
2022-03-31T18:23:37.000Z
app/modules/case_studies/migrations/0007_alter_casestudypage_body.py
nhsx-mirror/nhsx-website
2133b4e275ca35ff77f7d6874e809f139ec4bf86
[ "MIT" ]
23
2019-04-04T09:52:07.000Z
2021-04-11T07:41:47.000Z
# Generated by Django 3.2.5 on 2021-07-09 14:06 from django.db import migrations import modules.core.blocks import modules.core.models.snippets import wagtail.core.blocks import wagtail.core.blocks.field_block import wagtail.core.fields import wagtail.images.blocks import wagtail.snippets.blocks import wagtailnhsukfro...
1,022.851852
27,028
0.754065
from django.db import migrations import modules.core.blocks import modules.core.models.snippets import wagtail.core.blocks import wagtail.core.blocks.field_block import wagtail.core.fields import wagtail.images.blocks import wagtail.snippets.blocks import wagtailnhsukfrontend.blocks class Migration(migrations.Migrat...
true
true
08ffd1db1d3a40cd096bcccb292240e5df0a7f21
369
py
Python
lib/multiserver/createFilters.py
T-Mac/Handle
aef3d6ae020a1fe1d621f15ac3349cbe1d4e8477
[ "WTFPL" ]
7
2015-05-10T00:38:11.000Z
2021-06-07T23:06:06.000Z
lib/multiserver/createFilters.py
T-Mac/Handle
aef3d6ae020a1fe1d621f15ac3349cbe1d4e8477
[ "WTFPL" ]
1
2017-04-23T19:03:09.000Z
2017-04-23T21:44:05.000Z
lib/multiserver/createFilters.py
T-Mac/Handle
aef3d6ae020a1fe1d621f15ac3349cbe1d4e8477
[ "WTFPL" ]
3
2016-10-23T17:04:44.000Z
2019-04-30T20:42:29.000Z
from lib.package import package import multiserver class PkgCreateFilter(object): def __init__(self): self.Package_Handler = package.Package_Handler() def Execute(self, msg): pkg = self.Package_Handler.get(msg[1]) return (msg[0],pkg) class ServerCreateFilter(object): def Execute(self, msg): server = m...
24.6
50
0.742547
from lib.package import package import multiserver class PkgCreateFilter(object): def __init__(self): self.Package_Handler = package.Package_Handler() def Execute(self, msg): pkg = self.Package_Handler.get(msg[1]) return (msg[0],pkg) class ServerCreateFilter(object): def Execute(self, msg): server = m...
true
true
08ffd26440364febbab5335d2b2405f85a381ca0
10,808
py
Python
google/appengine/tools/devappserver2/devappserver2_test.py
airamrguez/appengine-1.8.0-golang-1.4.3-os-x-64bit
c2034c8ed4d218e1f85831df9bc986285ebf8661
[ "Apache-2.0" ]
3
2019-01-28T03:57:20.000Z
2020-02-20T01:37:33.000Z
google/appengine/tools/devappserver2/devappserver2_test.py
airamrguez/appengine-1.8.0-golang-1.4.3-os-x-64bit
c2034c8ed4d218e1f85831df9bc986285ebf8661
[ "Apache-2.0" ]
null
null
null
google/appengine/tools/devappserver2/devappserver2_test.py
airamrguez/appengine-1.8.0-golang-1.4.3-os-x-64bit
c2034c8ed4d218e1f85831df9bc986285ebf8661
[ "Apache-2.0" ]
3
2019-01-18T11:33:56.000Z
2020-01-05T10:44:05.000Z
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
32.071217
80
0.695966
"""Tests for google.apphosting.tools.devappserver2.devappserver2.""" import argparse import getpass import itertools import os import os.path import sys import tempfile import unittest import google import mox from google.appengine.tools.devappserver2 import devappserver2 class WinError(Exception): pass class...
false
true
08ffd2d40ac3bb2d37ba160f2d06ec7f4450ebad
33,125
py
Python
Src/Tests/plans/generic_plan_template.py
Enerccio/ironpython26-fixed
e302db14f05396a378adb438565a829e66acbf94
[ "MS-PL" ]
1
2020-02-11T06:02:40.000Z
2020-02-11T06:02:40.000Z
Src/Languages/IronPython/Tests/plans/generic_plan_template.py
rudimk/dlr-dotnet
71d11769f99d6ff1516ddbaed091a359eb46c670
[ "MS-PL" ]
null
null
null
Src/Languages/IronPython/Tests/plans/generic_plan_template.py
rudimk/dlr-dotnet
71d11769f99d6ff1516ddbaed091a359eb46c670
[ "MS-PL" ]
1
2018-11-21T04:10:23.000Z
2018-11-21T04:10:23.000Z
##################################################################################### # # Copyright (c) Microsoft Corporation. All rights reserved. # # This source code is subject to terms and conditions of the Microsoft Public License. A # copy of the license can be found in the License.html file at the root of this...
56.818182
123
0.663577
true
true
08ffd35bcb1e28f328be20cdf5c1676e8a7d02fb
14,019
py
Python
hw4/model_based_policy.py
hatim-ez/berkeley-cs294-deep-rl
8ffd415e8140b18f9456bc8560a099e98456bf05
[ "MIT" ]
3
2018-11-17T10:32:53.000Z
2019-04-28T02:23:53.000Z
hw4/model_based_policy.py
hatim-ez/berkeley-cs294-deep-rl
8ffd415e8140b18f9456bc8560a099e98456bf05
[ "MIT" ]
null
null
null
hw4/model_based_policy.py
hatim-ez/berkeley-cs294-deep-rl
8ffd415e8140b18f9456bc8560a099e98456bf05
[ "MIT" ]
null
null
null
import tensorflow as tf import tensorflow_probability as tfp import numpy as np import utils class ModelBasedPolicy(object): def __init__(self, env, init_dataset, horizon=15, num_random_action_selection=4096, nn_layers=1, ...
45.516234
159
0.629859
import tensorflow as tf import tensorflow_probability as tfp import numpy as np import utils class ModelBasedPolicy(object): def __init__(self, env, init_dataset, horizon=15, num_random_action_selection=4096, nn_layers=1, ...
true
true
08ffd4c6663646220f184b05332a5a3906133877
3,057
py
Python
encryptlib/ecdh.py
mdcovarr/encrypt-server
335f6417396418c73d19c9d8c804ae98cfab9fed
[ "MIT" ]
1
2020-06-08T20:02:27.000Z
2020-06-08T20:02:27.000Z
encryptlib/ecdh.py
mdcovarr/encrypt-server
335f6417396418c73d19c9d8c804ae98cfab9fed
[ "MIT" ]
null
null
null
encryptlib/ecdh.py
mdcovarr/encrypt-server
335f6417396418c73d19c9d8c804ae98cfab9fed
[ "MIT" ]
null
null
null
""" Domain Parameters for 512-Bit Curves # https://tools.ietf.org/html/rfc5639#page-14 """ import random # Elliptic curve Diffie-Hellman key exchange class ECDH: p = 0xAADD9DB8DBE9C48B3FD4E6AE33C9FC07CB308DB3B3C9D20ED6639CCA703308717D4D9B009BC66842AECDA12AE6A380E62881FF2F2D82C68528AA6056583A48F3 A = 0x7830A33...
35.546512
138
0.60157
import random class ECDH: p = 0xAADD9DB8DBE9C48B3FD4E6AE33C9FC07CB308DB3B3C9D20ED6639CCA703308717D4D9B009BC66842AECDA12AE6A380E62881FF2F2D82C68528AA6056583A48F3 A = 0x7830A3318B603B89E2327145AC234CC594CBDD8D3DF91610A83441CAEA9863BC2DED5D5AA8253AA10A2EF1C98B9AC8B57F1117A72BF2C7B9E7C1AC4D77FC94CA B = 0x3DF...
true
true
08ffd5ba7d0989a4f81c38471456f035f354aeed
6,091
py
Python
SolarPV/NasaData.py
itprorh66/SolarPV-Simulator
0e689e608d4c1888dde82f506ad42c3291f33f60
[ "MIT" ]
9
2020-02-12T04:22:45.000Z
2022-01-26T05:17:17.000Z
SolarPV/NasaData.py
itprorh66/SolarPV-Simulator
0e689e608d4c1888dde82f506ad42c3291f33f60
[ "MIT" ]
28
2018-11-29T00:13:39.000Z
2021-05-27T01:17:51.000Z
SolarPV/NasaData.py
itprorh66/SolarPV-Simulator
0e689e608d4c1888dde82f506ad42c3291f33f60
[ "MIT" ]
3
2021-04-11T16:47:55.000Z
2022-03-30T14:17:24.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Apr 26 19:11:58 2018 Modified on 02/22/2019 for version 0.1.0 Modified on 02/04/2021 to simplify the logic and make better use of Pandas methods @author: Bob Hentz ------------------------------------------------------------------------------- Name: ...
38.796178
116
0.59711
import pandas as pd import requests import datetime as dt BaseURL = 'https://power.larc.nasa.gov/cgi-bin/v1/DataAccess.py?' def getLocationData(dtin): schval = 'coordinates\": [' stpt = dtin.find(schval) ndpt = dtin.find(']', stpt+len(schval)) ln = [] for itm in dtin[stpt+len(schval):ndpt].rstr...
true
true
08ffd67f8c0a9fe074e1779eb4b8958725259317
1,287
py
Python
wd-orgs/Database/cursorPool.py
tocororo/py-labs
ba16ae26df90f38030e6094c8740edb814150469
[ "MIT" ]
null
null
null
wd-orgs/Database/cursorPool.py
tocororo/py-labs
ba16ae26df90f38030e6094c8740edb814150469
[ "MIT" ]
null
null
null
wd-orgs/Database/cursorPool.py
tocororo/py-labs
ba16ae26df90f38030e6094c8740edb814150469
[ "MIT" ]
null
null
null
from Database.connection import Connection from logger_base import logger class CursorPool: def __init__(self): self.__conn = None self.__cursor = None # inicio de with def __enter__(self): logger.debug('Start method __enter__') self.__conn = Connection.getConnection() ...
32.175
77
0.641803
from Database.connection import Connection from logger_base import logger class CursorPool: def __init__(self): self.__conn = None self.__cursor = None def __enter__(self): logger.debug('Start method __enter__') self.__conn = Connection.getConnection() self.__curso...
true
true
08ffd799a57ae50947297bcb41ac6ea2c30df0ab
7,081
py
Python
app/nets.py
bobosoft/intrepyd
13f0912b31f86f9bcc50f52ef4ad870e33f0cf65
[ "BSD-3-Clause" ]
2
2021-04-25T17:38:03.000Z
2022-03-20T20:48:50.000Z
app/nets.py
bobosoft/intrepyd
13f0912b31f86f9bcc50f52ef4ad870e33f0cf65
[ "BSD-3-Clause" ]
1
2016-11-30T22:25:00.000Z
2017-01-16T22:43:39.000Z
app/nets.py
bobosoft/intrepyd
13f0912b31f86f9bcc50f52ef4ad870e33f0cf65
[ "BSD-3-Clause" ]
null
null
null
""" Implementation of REST API for nets creation """ from flask import Blueprint, request from .utils import typename_to_type from .contexts import contexts nr = Blueprint('nets', __name__) def _create_bool_constant(func): context = request.get_json()['context'] if context is None: return {'result': '...
26.82197
71
0.609942
from flask import Blueprint, request from .utils import typename_to_type from .contexts import contexts nr = Blueprint('nets', __name__) def _create_bool_constant(func): context = request.get_json()['context'] if context is None: return {'result': 'error'}, 400 ctx = contexts[context]['context'] ...
true
true
08ffd7de177775807c403432c40ca4bf40e85538
5,442
py
Python
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/aio/operations/_virtual_machine_sizes_operations.py
dubiety/azure-sdk-for-python
62ffa839f5d753594cf0fe63668f454a9d87a346
[ "MIT" ]
1
2022-02-01T18:50:12.000Z
2022-02-01T18:50:12.000Z
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/aio/operations/_virtual_machine_sizes_operations.py
ellhe-blaster/azure-sdk-for-python
82193ba5e81cc5e5e5a5239bba58abe62e86f469
[ "MIT" ]
null
null
null
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/aio/operations/_virtual_machine_sizes_operations.py
ellhe-blaster/azure-sdk-for-python
82193ba5e81cc5e5e5a5239bba58abe62e86f469
[ "MIT" ]
null
null
null
# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRe...
43.536
135
0.653988
from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse f...
true
true
08ffd935622850141d71560107257d9d37610c01
2,632
py
Python
slackbot_tipy/slackpi.py
wray/tipy
9d6e09ecd94193bcf44a78e810150e52601f4e1b
[ "Apache-2.0" ]
null
null
null
slackbot_tipy/slackpi.py
wray/tipy
9d6e09ecd94193bcf44a78e810150e52601f4e1b
[ "Apache-2.0" ]
null
null
null
slackbot_tipy/slackpi.py
wray/tipy
9d6e09ecd94193bcf44a78e810150e52601f4e1b
[ "Apache-2.0" ]
null
null
null
import os import sys import time from slackclient import SlackClient from slackbot_tipy.di import intent from slackbot_tipy import bot_id # constants INIT_PROMPT = 'top' try: AT_BOT = "@" + bot_id.get_id() CHANNEL = bot_id.get_group_id() print(CHANNEL) except TypeError: pass # instantiate client slack...
32.493827
104
0.653495
import os import sys import time from slackclient import SlackClient from slackbot_tipy.di import intent from slackbot_tipy import bot_id INIT_PROMPT = 'top' try: AT_BOT = "@" + bot_id.get_id() CHANNEL = bot_id.get_group_id() print(CHANNEL) except TypeError: pass slack_client = SlackClient(os.environ....
true
true
08ffd9c7a5271fc1323aef535d8dba37b6c5748c
1,061
py
Python
configs/nowd/nl_gc/origin_test/res101_d_nl_gc_nowd_ln_ws2e0.py
yinmh17/CCNet
d5e90fe5ccfa16389fd25bdd3e2160ffe2dfbd22
[ "MIT" ]
1
2019-07-24T05:27:29.000Z
2019-07-24T05:27:29.000Z
configs/nowd/nl_gc/origin_test/res101_d_nl_gc_nowd_ln_ws2e0.py
yinmh17/CCNet
d5e90fe5ccfa16389fd25bdd3e2160ffe2dfbd22
[ "MIT" ]
1
2019-07-21T19:44:01.000Z
2019-07-21T19:44:01.000Z
configs/nowd/nl_gc/origin_test/res101_d_nl_gc_nowd_ln_ws2e0.py
yinmh17/CCNet
d5e90fe5ccfa16389fd25bdd3e2160ffe2dfbd22
[ "MIT" ]
1
2019-07-21T06:28:24.000Z
2019-07-21T06:28:24.000Z
model = dict( type='basenet', pretrained='', backbone=dict( type='ResNet', depth=101, num_stages=4, block_num=[3, 4, 23, 3], ), att=dict( with_att=False, type='glore', att_stage=[False,False,True,False], att_pos='after_add', at...
21.22
52
0.575872
model = dict( type='basenet', pretrained='', backbone=dict( type='ResNet', depth=101, num_stages=4, block_num=[3, 4, 23, 3], ), att=dict( with_att=False, type='glore', att_stage=[False,False,True,False], att_pos='after_add', at...
true
true
08ffda0eabef4c86b0152e0e26e8e3cde445ce72
1,054
py
Python
python/django/ybstore/urls.py
haron/orm-examples
e2f03dc86eacdbfb1df3212fb2dfddd8a1f2e4db
[ "Apache-2.0" ]
17
2020-01-22T01:35:28.000Z
2022-02-08T21:10:17.000Z
python/django/ybstore/urls.py
haron/orm-examples
e2f03dc86eacdbfb1df3212fb2dfddd8a1f2e4db
[ "Apache-2.0" ]
28
2019-03-26T21:53:08.000Z
2019-08-16T20:21:32.000Z
python/django/ybstore/urls.py
haron/orm-examples
e2f03dc86eacdbfb1df3212fb2dfddd8a1f2e4db
[ "Apache-2.0" ]
15
2019-03-15T22:42:13.000Z
2019-07-30T09:45:52.000Z
"""ybstore URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based...
36.344828
77
0.740987
from django.urls import path, include from django.conf.urls import url, include from rest_framework import routers from ybstoreapp.views import UserViewSet, ProductViewSet, OrderViewSet router = routers.SimpleRouter(trailing_slash=False) router.register(r'users', UserViewSet) router.register(r'products', ProductV...
true
true
08ffdb1a28a06609069b37dc167b7e8afb1d9f8b
3,892
py
Python
salt/states/hipchat.py
pass-by-value/salt
2ede44fe54516242e10fe428629d5f5a18e5f7ea
[ "Apache-2.0", "MIT" ]
2
2015-09-21T14:13:30.000Z
2016-02-12T11:33:46.000Z
salt/states/hipchat.py
pass-by-value/salt
2ede44fe54516242e10fe428629d5f5a18e5f7ea
[ "Apache-2.0", "MIT" ]
3
2015-03-31T14:44:05.000Z
2015-06-18T19:02:24.000Z
salt/states/hipchat.py
pass-by-value/salt
2ede44fe54516242e10fe428629d5f5a18e5f7ea
[ "Apache-2.0", "MIT" ]
2
2017-01-05T16:14:59.000Z
2019-01-31T23:15:25.000Z
# -*- coding: utf-8 -*- ''' Send a message to Hipchat ========================= This state is useful for sending messages to Hipchat during state runs. The property api_url is optional. By defaul will use the public HipChat API at https://api.hipchat.com .. versionadded:: 2015.5.0 .. code-block:: yaml hipchat-...
27.408451
102
0.599435
def __virtual__(): return 'hipchat' if 'hipchat.send_message' in __salt__ else False def send_message(name, room_id, from_name, message, api_url=None, api_key=None, api_version=None, message_co...
true
true
08ffdbf6cb0c12559389ffa0cf8c875d9a2a39ba
9,153
py
Python
tests/components/template/test_init.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
tests/components/template/test_init.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
31,101
2020-03-02T13:00:16.000Z
2022-03-31T23:57:36.000Z
tests/components/template/test_init.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""The test for the Template sensor platform.""" from datetime import timedelta from unittest.mock import patch import pytest from homeassistant import config from homeassistant.components.template import DOMAIN from homeassistant.helpers.reload import SERVICE_RELOAD from homeassistant.setup import async_setup_compon...
34.802281
91
0.57107
from datetime import timedelta from unittest.mock import patch import pytest from homeassistant import config from homeassistant.components.template import DOMAIN from homeassistant.helpers.reload import SERVICE_RELOAD from homeassistant.setup import async_setup_component from homeassistant.util import dt as dt_util ...
true
true
08ffdea7dcd94a31636c3375e113d61425b36600
470
py
Python
doc/how-tos/send-secure-msg/python/step5.py
ssyijiu/indy-sdk
44191ec49f0c0948138d6580e650699fe2504f13
[ "Apache-2.0" ]
1
2020-01-22T06:43:05.000Z
2020-01-22T06:43:05.000Z
doc/how-tos/send-secure-msg/python/step5.py
ssyijiu/indy-sdk
44191ec49f0c0948138d6580e650699fe2504f13
[ "Apache-2.0" ]
2
2018-09-13T20:07:09.000Z
2021-12-29T20:52:05.000Z
doc/how-tos/send-secure-msg/python/step5.py
ssyijiu/indy-sdk
44191ec49f0c0948138d6580e650699fe2504f13
[ "Apache-2.0" ]
1
2018-03-30T06:43:37.000Z
2018-03-30T06:43:37.000Z
async def prep(wallet_handle, my_vk, their_vk, msg): with open('plaintext.txt', 'w') as f: f.write(msg) with open('plaintext.txt', 'rb') as f: msg = f.read() encrypted = await crypto.anon_crypt(wallet_handle, my_vk, their_vk, msg) # encrypted = await crypto.anon_crypt(their_vk, msg) ...
39.166667
76
0.631915
async def prep(wallet_handle, my_vk, their_vk, msg): with open('plaintext.txt', 'w') as f: f.write(msg) with open('plaintext.txt', 'rb') as f: msg = f.read() encrypted = await crypto.anon_crypt(wallet_handle, my_vk, their_vk, msg) print('encrypted = %s' % repr(encrypted)) with op...
true
true
08ffdf0de51dfb3f18bfdbfab95bf47210bba60b
498
py
Python
preacher/compilation/verification/predicate.py
lasta/preacher
5e50f8eb930fac72a788e7614eb5a85903f7bde6
[ "MIT" ]
null
null
null
preacher/compilation/verification/predicate.py
lasta/preacher
5e50f8eb930fac72a788e7614eb5a85903f7bde6
[ "MIT" ]
null
null
null
preacher/compilation/verification/predicate.py
lasta/preacher
5e50f8eb930fac72a788e7614eb5a85903f7bde6
[ "MIT" ]
null
null
null
"""Predicate compilation.""" from preacher.core.verification.matcher import MatcherWrappingPredicate from preacher.core.verification.predicate import Predicate from .matcher import MatcherFactoryCompiler class PredicateCompiler: def __init__(self, matcher_factory: MatcherFactoryCompiler): self._matcher_...
31.125
71
0.785141
from preacher.core.verification.matcher import MatcherWrappingPredicate from preacher.core.verification.predicate import Predicate from .matcher import MatcherFactoryCompiler class PredicateCompiler: def __init__(self, matcher_factory: MatcherFactoryCompiler): self._matcher_factory = matcher_factory ...
true
true
08ffdf1a678222f569987e3d033c6059e531d9ba
2,833
py
Python
libralli/circcuitpython/adafruit-circuitpython-bundle-7.x-mpy-20211225/examples/displayio_sh1107_mono_128x128_test.py
Yarik9008/SoftAcademic
118c9dc4620ca444c1557edd141a838820577202
[ "MIT" ]
null
null
null
libralli/circcuitpython/adafruit-circuitpython-bundle-7.x-mpy-20211225/examples/displayio_sh1107_mono_128x128_test.py
Yarik9008/SoftAcademic
118c9dc4620ca444c1557edd141a838820577202
[ "MIT" ]
null
null
null
libralli/circcuitpython/adafruit-circuitpython-bundle-7.x-mpy-20211225/examples/displayio_sh1107_mono_128x128_test.py
Yarik9008/SoftAcademic
118c9dc4620ca444c1557edd141a838820577202
[ "MIT" ]
null
null
null
# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries # # SPDX-License-Identifier: Unlicense """ Based on example by Mark Roberts (mdroberts1243). This example writes text to the display, and draws a series of squares and a rectangle. """ import board import displayio import terminalio from adafruit_di...
28.908163
99
0.778327
import board import displayio import terminalio from adafruit_display_text import bitmap_label as label from adafruit_displayio_sh1107 import SH1107, DISPLAY_OFFSET_ADAFRUIT_128x128_OLED_5297 displayio.release_displays() display_bus = displayio.I2CDisplay(board.I2C(), device_address=0x3D) WIDTH = 128 HEIGHT = 128 ...
true
true
08ffdf3fc50156a0bd195edd2b073c0b5dcf9834
1,813
py
Python
create_build_all_android.py
jjzhang166/Vulkan
655c1ac3131cdba81d3e84def2a1c35fa492bd52
[ "MIT" ]
2
2017-08-14T23:12:43.000Z
2019-12-03T15:56:17.000Z
create_build_all_android.py
jjzhang166/Vulkan
655c1ac3131cdba81d3e84def2a1c35fa492bd52
[ "MIT" ]
null
null
null
create_build_all_android.py
jjzhang166/Vulkan
655c1ac3131cdba81d3e84def2a1c35fa492bd52
[ "MIT" ]
1
2021-08-20T13:59:53.000Z
2021-08-20T13:59:53.000Z
import os import subprocess import sys import threading #################### # # Functions # #################### class BuildThread (threading.Thread): def __init__(self, buildDirectory, buildOption): threading.Thread.__init__(self) self.buildDirectory = buildDirectory ...
22.109756
78
0.579702
import os import subprocess import sys import threading class BuildThread (threading.Thread): def __init__(self, buildDirectory, buildOption): threading.Thread.__init__(self) self.buildDirectory = buildDirectory self.buildOption = buildOption def run(self): ...
true
true
08ffdf9b4002618baa8d3a404c7d82c54b022e2d
9,230
py
Python
proteus/tests/MeshAdaptPUMI/gauge_compare/dambreak_Colagrossi_2D_rd/dambreak_Colagrossi.py
dloney/proteus
615cdf57f765b2e99bac904bb6eb71e39e58ab56
[ "MIT" ]
null
null
null
proteus/tests/MeshAdaptPUMI/gauge_compare/dambreak_Colagrossi_2D_rd/dambreak_Colagrossi.py
dloney/proteus
615cdf57f765b2e99bac904bb6eb71e39e58ab56
[ "MIT" ]
1
2020-02-03T17:47:28.000Z
2020-02-03T17:47:28.000Z
proteus/tests/MeshAdaptPUMI/gauge_compare/dambreak_Colagrossi_2D_rd/dambreak_Colagrossi.py
dloney/proteus
615cdf57f765b2e99bac904bb6eb71e39e58ab56
[ "MIT" ]
1
2020-02-17T03:25:34.000Z
2020-02-17T03:25:34.000Z
""" Dambreak flow - Collagrosi and Landrini (2003) """ import numpy as np from math import sqrt from proteus.default_n import * from proteus import (Domain, Context, FemTools as ft, #SpatialTools as st, MeshTools as mt, WaveTools as w...
29.583333
236
0.626652
import numpy as np from math import sqrt from proteus.default_n import * from proteus import (Domain, Context, FemTools as ft, MeshTools as mt, WaveTools as wt, Gauges) from proteus.mprans import SpatialTools as s...
true
true
08ffe017c7774928e297ca36e6d27b8447b7ccf1
13,617
py
Python
schemasync/schemasync.py
roowe/SchemaSync
1f600449bad74bd9fa0e74368dca051d24cda5a8
[ "Apache-2.0" ]
1
2021-07-24T13:54:20.000Z
2021-07-24T13:54:20.000Z
schemasync/schemasync.py
Maplecool123/SchemaSync-master
819d4ee0defd8ec9827ec30eb013243aa011bac4
[ "Apache-2.0" ]
null
null
null
schemasync/schemasync.py
Maplecool123/SchemaSync-master
819d4ee0defd8ec9827ec30eb013243aa011bac4
[ "Apache-2.0" ]
1
2020-12-18T07:28:41.000Z
2020-12-18T07:28:41.000Z
#!/usr/bin/python import re import sys import os import logging import datetime import optparse import syncdb import utils import warnings __author__ = """ Mitch Matuson Mustafa Ozgur """ __copyright__ = """ Copyright 2009-2016 Mitch Matuson Copyright 2016 Mustafa Ozgur """ __version__ = "0.9.4" __license__ = "Apache...
37.103542
90
0.56121
import re import sys import os import logging import datetime import optparse import syncdb import utils import warnings __author__ = """ Mitch Matuson Mustafa Ozgur """ __copyright__ = """ Copyright 2009-2016 Mitch Matuson Copyright 2016 Mustafa Ozgur """ __version__ = "0.9.4" __license__ = "Apache 2.0" warnings.si...
false
true
08ffe079722e7327e4017200edaab56692c905f3
19,164
py
Python
saleor/graphql/product/schema.py
lush-tech-warriors/saleor
b71f0545b96bc2d1ecb460009c984581263df7b7
[ "CC-BY-4.0" ]
2
2022-01-15T12:31:49.000Z
2022-02-05T19:28:52.000Z
saleor/graphql/product/schema.py
DuongHieuMAI/saleor
e20b6283182f3a2886fe36fcdef8e47e4fcf7a14
[ "CC-BY-4.0" ]
12
2021-03-30T14:37:10.000Z
2022-03-12T00:58:16.000Z
saleor/graphql/product/schema.py
DuongHieuMAI/saleor
e20b6283182f3a2886fe36fcdef8e47e4fcf7a14
[ "CC-BY-4.0" ]
1
2021-04-09T10:26:49.000Z
2021-04-09T10:26:49.000Z
import graphene from ...core.permissions import ProductPermissions from ..core.enums import ReportingPeriod from ..core.fields import FilterInputConnectionField, PrefetchingConnectionField from ..core.validators import validate_one_of_args_is_in_query from ..decorators import permission_required from ..translations.mu...
36.783109
87
0.703611
import graphene from ...core.permissions import ProductPermissions from ..core.enums import ReportingPeriod from ..core.fields import FilterInputConnectionField, PrefetchingConnectionField from ..core.validators import validate_one_of_args_is_in_query from ..decorators import permission_required from ..translations.mu...
true
true
08ffe0c460321990e00d704cb1fed461113552a4
816
py
Python
mlir/test/python/dialects/math_dialect.py
LaudateCorpus1/llvm-project
ff2e0f0c1112558b3f30d8afec7c9882c33c79e3
[ "Apache-2.0" ]
605
2019-10-18T01:15:54.000Z
2022-03-31T14:31:04.000Z
mlir/test/python/dialects/math_dialect.py
LaudateCorpus1/llvm-project
ff2e0f0c1112558b3f30d8afec7c9882c33c79e3
[ "Apache-2.0" ]
3,180
2019-10-18T01:21:21.000Z
2022-03-31T23:25:41.000Z
mlir/test/python/dialects/math_dialect.py
LaudateCorpus1/llvm-project
ff2e0f0c1112558b3f30d8afec7c9882c33c79e3
[ "Apache-2.0" ]
275
2019-10-18T05:27:22.000Z
2022-03-30T09:04:21.000Z
# RUN: %PYTHON %s | FileCheck %s # Naming this file with a `_dialect` suffix to avoid a naming conflict with # python package's math module (coming in from random.py). from mlir.ir import * import mlir.dialects.builtin as builtin import mlir.dialects.math as mlir_math def run(f): print("\nTEST:", f.__name__) f()...
27.2
75
0.628676
from mlir.ir import * import mlir.dialects.builtin as builtin import mlir.dialects.math as mlir_math def run(f): print("\nTEST:", f.__name__) f() # CHECK-LABEL: TEST: testMathOps @run def testMathOps(): with Context() as ctx, Location.unknown(): module = Module.create() with InsertionPoint(module.body...
true
true
08ffe23d2885b3c6af1a798cf9b83dfe95afaa4d
749
py
Python
kol/request/SendChatRequest.py
DamianDominoDavis/cwbot-ndy
53b826232eadb7ef558f568872a945d04d8d4252
[ "BSD-3-Clause" ]
null
null
null
kol/request/SendChatRequest.py
DamianDominoDavis/cwbot-ndy
53b826232eadb7ef558f568872a945d04d8d4252
[ "BSD-3-Clause" ]
null
null
null
kol/request/SendChatRequest.py
DamianDominoDavis/cwbot-ndy
53b826232eadb7ef558f568872a945d04d8d4252
[ "BSD-3-Clause" ]
null
null
null
from .GenericRequest import GenericRequest from kol.util import ChatUtils import time import unicodedata import urllib.request, urllib.parse, urllib.error class SendChatRequest(GenericRequest): def __init__(self, session, text): super(SendChatRequest, self).__init__(session) self.text = text.strip...
41.611111
142
0.720961
from .GenericRequest import GenericRequest from kol.util import ChatUtils import time import unicodedata import urllib.request, urllib.parse, urllib.error class SendChatRequest(GenericRequest): def __init__(self, session, text): super(SendChatRequest, self).__init__(session) self.text = text.strip...
true
true
08ffe3243857875b24ade6e6fba429136a1056bb
4,618
py
Python
tests/test_elaborate.py
ldobrek/pampy
9241c2ba7c40806cfd8c38f3f301cb7d19723cf0
[ "MIT" ]
null
null
null
tests/test_elaborate.py
ldobrek/pampy
9241c2ba7c40806cfd8c38f3f301cb7d19723cf0
[ "MIT" ]
null
null
null
tests/test_elaborate.py
ldobrek/pampy
9241c2ba7c40806cfd8c38f3f301cb7d19723cf0
[ "MIT" ]
null
null
null
import unittest from functools import reduce from pampy import match, REST, TAIL, HEAD, _, match_value, match_iterable class PampyElaborateTests(unittest.TestCase): def test_fibonacci(self): def fib(n): return match(n, 1, 1, 2, 1, ...
38.806723
98
0.433521
import unittest from functools import reduce from pampy import match, REST, TAIL, HEAD, _, match_value, match_iterable class PampyElaborateTests(unittest.TestCase): def test_fibonacci(self): def fib(n): return match(n, 1, 1, 2, 1, ...
true
true
08ffe4646bc9cbbcb79d79e2115255b9784ae72f
11,440
py
Python
eda_and_beyond/eda_tools.py
FredaXin/eda_and_beyond
d78d25c305f1a23f1568d420ba8bb6bee12e5c38
[ "MIT" ]
28
2020-01-23T09:56:45.000Z
2022-03-07T10:26:30.000Z
eda_and_beyond/eda_tools.py
FredaXin/eda_and_beyond
d78d25c305f1a23f1568d420ba8bb6bee12e5c38
[ "MIT" ]
2
2020-01-12T01:11:38.000Z
2021-08-25T06:58:32.000Z
eda_and_beyond/eda_tools.py
FredaXin/eda_and_beyond
d78d25c305f1a23f1568d420ba8bb6bee12e5c38
[ "MIT" ]
28
2020-01-11T23:04:04.000Z
2022-01-02T01:47:28.000Z
import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns from sklearn.linear_model import LinearRegression, LassoCV, RidgeCV from sklearn.model_selection import cross_val_score, train_test_split from sklearn.preprocessing import StandardScaler, PolynomialFeatures from sklearn.metric...
33.35277
119
0.686538
import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns from sklearn.linear_model import LinearRegression, LassoCV, RidgeCV from sklearn.model_selection import cross_val_score, train_test_split from sklearn.preprocessing import StandardScaler, PolynomialFeatures from sklearn.metric...
true
true
08ffe47c4ae3215b262f759a8d80d3579e7f899e
2,813
py
Python
migrations/versions/41c4afae419c_.py
tiburona/cookiecutter_mbam
13788774a4c1426c133b3f689f98d8f0c54de9c6
[ "BSD-3-Clause" ]
null
null
null
migrations/versions/41c4afae419c_.py
tiburona/cookiecutter_mbam
13788774a4c1426c133b3f689f98d8f0c54de9c6
[ "BSD-3-Clause" ]
null
null
null
migrations/versions/41c4afae419c_.py
tiburona/cookiecutter_mbam
13788774a4c1426c133b3f689f98d8f0c54de9c6
[ "BSD-3-Clause" ]
null
null
null
"""empty message Revision ID: 41c4afae419c Revises: Create Date: 2018-11-15 13:27:00.461536 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '41c4afae419c' down_revision = None branch_labels = None depends_on = None def upgrade(): # ### commands auto gene...
36.064103
73
0.667259
from alembic import op import sqlalchemy as sa revision = '41c4afae419c' down_revision = None branch_labels = None depends_on = None def upgrade(): op.create_table('roles', sa.Column('id', sa.Integer(), nullable=False), sa.Column('name', sa.String(length=80), nullable=False), sa.Column('descript...
true
true
08ffe50270305a2a335e90cd474012d44c087c9c
317,320
py
Python
src/sage/combinat/tableau.py
Ivo-Maffei/DistanceRegular
d4dedd5c3e7da73111168fcce60d1f180fe24019
[ "BSL-1.0" ]
1
2020-05-19T22:34:03.000Z
2020-05-19T22:34:03.000Z
src/sage/combinat/tableau.py
Ivo-Maffei/DistanceRegular
d4dedd5c3e7da73111168fcce60d1f180fe24019
[ "BSL-1.0" ]
null
null
null
src/sage/combinat/tableau.py
Ivo-Maffei/DistanceRegular
d4dedd5c3e7da73111168fcce60d1f180fe24019
[ "BSL-1.0" ]
3
2020-03-29T17:13:36.000Z
2021-05-03T18:11:28.000Z
# -*- coding: utf-8 -*- r""" Tableaux AUTHORS: - Mike Hansen (2007): initial version - Jason Bandlow (2011): updated to use Parent/Element model, and many minor fixes - Andrew Mathas (2012-13): completed the transition to the parent/element model begun by Jason Bandlow - Travis Scrimshaw (11-22-2012): Added tu...
33.807799
335
0.515001
from __future__ import print_function, absolute_import from six.moves import range, zip, map from six import add_metaclass, text_type from sage.sets.disjoint_union_enumerated_sets import DisjointUnionEnumeratedSets from sage.sets.family import Family from sage.sets.non_negative_integers import NonNegativeIntegers fro...
true
true
08ffe531571ed9a755a79fa9da5f3d6bf4f467ce
378
py
Python
python/third_maximum_number.py
anishLearnsToCode/leetcode-algorithms
d5a84e9179a4c3427890313a933fe1950fbcdabc
[ "MIT" ]
17
2020-06-13T15:05:55.000Z
2022-03-16T18:28:53.000Z
python/third_maximum_number.py
anishLearnsToCode/leetcode-algorithms
d5a84e9179a4c3427890313a933fe1950fbcdabc
[ "MIT" ]
null
null
null
python/third_maximum_number.py
anishLearnsToCode/leetcode-algorithms
d5a84e9179a4c3427890313a933fe1950fbcdabc
[ "MIT" ]
9
2020-12-27T19:17:58.000Z
2022-03-22T07:02:19.000Z
from typing import List import heapq class Solution: def thirdMax(self, nums: List[int]) -> int: distinct = set(nums) if len(distinct) < 3: return max(distinct) heap = [] for number in distinct: heapq.heappush(heap, -number) heapq.heappop(heap) ...
23.625
47
0.579365
from typing import List import heapq class Solution: def thirdMax(self, nums: List[int]) -> int: distinct = set(nums) if len(distinct) < 3: return max(distinct) heap = [] for number in distinct: heapq.heappush(heap, -number) heapq.heappop(heap) ...
true
true
08ffe58c11a5259c2173b788f7e405f405cac2ab
574
py
Python
deep_learning_with_tensorFlow/Chapter07/p173.py
pearpai/TensorFlow-action
264099d933988532ed59eaf0f2ad495d40ede4d2
[ "Apache-2.0" ]
3
2018-06-07T07:15:00.000Z
2018-10-09T07:59:50.000Z
deep_learning_with_tensorFlow/Chapter07/p173.py
pearpai/TensorFlow-action
264099d933988532ed59eaf0f2ad495d40ede4d2
[ "Apache-2.0" ]
null
null
null
deep_learning_with_tensorFlow/Chapter07/p173.py
pearpai/TensorFlow-action
264099d933988532ed59eaf0f2ad495d40ede4d2
[ "Apache-2.0" ]
4
2017-04-23T05:30:41.000Z
2018-09-27T07:13:37.000Z
# coding=utf-8 import matplotlib.pyplot as plt import tensorflow as tf import numpy as np image_raw_data = tf.gfile.FastGFile("../datasets/demo_picture/cat.jpg", 'r').read() with tf.Session() as sess: img_data = tf.image.decode_jpeg(image_raw_data) print img_data.eval() # plt.imshow(img_data.eval()) #...
31.888889
83
0.709059
import matplotlib.pyplot as plt import tensorflow as tf import numpy as np image_raw_data = tf.gfile.FastGFile("../datasets/demo_picture/cat.jpg", 'r').read() with tf.Session() as sess: img_data = tf.image.decode_jpeg(image_raw_data) print img_data.eval() encoded_image = tf.image.encode_jpeg(...
false
true
08ffe5e828d3534b9dece88b8e04b57308d0b354
4,371
py
Python
accounts/models.py
ShahadatShuvo/blood_lagbe
c5edb52bf20c084425e2a89e3bddc7e5705edf30
[ "Apache-2.0" ]
null
null
null
accounts/models.py
ShahadatShuvo/blood_lagbe
c5edb52bf20c084425e2a89e3bddc7e5705edf30
[ "Apache-2.0" ]
null
null
null
accounts/models.py
ShahadatShuvo/blood_lagbe
c5edb52bf20c084425e2a89e3bddc7e5705edf30
[ "Apache-2.0" ]
null
null
null
from django.db import models from django.contrib.auth.models import ( BaseUserManager, AbstractBaseUser ) from django.db.models.signals import post_save from django.dispatch import receiver from django.utils.translation import gettext_lazy as _ from django.core.validators import RegexValidator # Create your models...
28.019231
79
0.623198
from django.db import models from django.contrib.auth.models import ( BaseUserManager, AbstractBaseUser ) from django.db.models.signals import post_save from django.dispatch import receiver from django.utils.translation import gettext_lazy as _ from django.core.validators import RegexValidator class UserManager(...
true
true
08ffe6cdd369a262848ece7d53ba8c7d780e484e
18,847
py
Python
Adafruit_IO/client.py
adafruit/io-client-python
06df42d534fe452d35deffaadd6c200419c1d26f
[ "MIT" ]
136
2015-02-28T17:55:36.000Z
2019-01-23T09:40:09.000Z
Adafruit_IO/client.py
adafruit/io-client-python
06df42d534fe452d35deffaadd6c200419c1d26f
[ "MIT" ]
56
2015-06-26T15:09:13.000Z
2019-01-17T20:38:29.000Z
Adafruit_IO/client.py
adafruit/io-client-python
06df42d534fe452d35deffaadd6c200419c1d26f
[ "MIT" ]
61
2015-06-14T02:58:36.000Z
2018-11-30T05:02:29.000Z
# Copyright (c) 2018 Adafruit Industries # Authors: Justin Cooper & Tony DiCola # 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 #...
41.975501
97
0.618082
import time from time import struct_time import json import platform import pkg_resources import re from urllib.parse import urlparse from urllib.parse import parse_qs import requests from .errors import RequestError, ThrottlingError from .model import Data, Feed, Group, Dashboard, Block, Layout DEFAULT_PAGE_LIMI...
true
true
08ffe855e7756467324f7b722c6d2b662af8c25f
6,250
py
Python
sktime/transformers/series_as_features/dictionary_based/_sax.py
alwinw/sktime
a6f17bd586df6bbc8e6c783f08eda4c30d2353f9
[ "BSD-3-Clause" ]
1
2020-11-05T18:47:32.000Z
2020-11-05T18:47:32.000Z
sktime/transformers/series_as_features/dictionary_based/_sax.py
alwinw/sktime
a6f17bd586df6bbc8e6c783f08eda4c30d2353f9
[ "BSD-3-Clause" ]
null
null
null
sktime/transformers/series_as_features/dictionary_based/_sax.py
alwinw/sktime
a6f17bd586df6bbc8e6c783f08eda4c30d2353f9
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import sys import numpy as np import pandas as pd import scipy.stats from sktime.transformers.series_as_features.base import BaseSeriesAsFeaturesTransformer from sktime.transformers.series_as_features.dictionary_based import PAA # TO DO: verify this returned pandas is consistent with sktim...
33.783784
88
0.57936
import sys import numpy as np import pandas as pd import scipy.stats from sktime.transformers.series_as_features.base import BaseSeriesAsFeaturesTransformer from sktime.transformers.series_as_features.dictionary_based import PAA from sktime.utils.validation.series_as_features import check_X __author__ = "Matthew M...
true
true
08ffe8a0c6a269e4573ec5a74212f82a2525db95
3,519
py
Python
train.py
orestisfl/arxiv-classifier
df41ad84137b48f77c3a27ee1c84471e22819967
[ "MIT" ]
null
null
null
train.py
orestisfl/arxiv-classifier
df41ad84137b48f77c3a27ee1c84471e22819967
[ "MIT" ]
1
2022-02-16T05:37:23.000Z
2022-02-16T09:08:21.000Z
train.py
orestisfl/arxiv-classifier
df41ad84137b48f77c3a27ee1c84471e22819967
[ "MIT" ]
null
null
null
import json import logging import os import pickle import random import pandas as pd from scipy.special import softmax from simpletransformers.classification import ClassificationModel logging.basicConfig(level=logging.INFO) transformers_logger = logging.getLogger("transformers") transformers_logger.setLevel(logging....
28.844262
85
0.556408
import json import logging import os import pickle import random import pandas as pd from scipy.special import softmax from simpletransformers.classification import ClassificationModel logging.basicConfig(level=logging.INFO) transformers_logger = logging.getLogger("transformers") transformers_logger.setLevel(logging....
true
true
08ffea5727b76fbad503036390e1a35caf4b7264
4,680
py
Python
logging/logging.py
edchelstephens/django-rest-utils
15cee427149217d1e53384281894f91e9653b6b4
[ "BSD-3-Clause" ]
1
2022-02-20T01:37:25.000Z
2022-02-20T01:37:25.000Z
logging/logging.py
edchelstephens/django-rest-utils
15cee427149217d1e53384281894f91e9653b6b4
[ "BSD-3-Clause" ]
null
null
null
logging/logging.py
edchelstephens/django-rest-utils
15cee427149217d1e53384281894f91e9653b6b4
[ "BSD-3-Clause" ]
null
null
null
"""Utils for debugging. Uses django's termcolors. Available colors: color_names = ('black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white') """ from pprint import pprint from typing import Any, Optional from django.utils.termcolors import colorize class TerminalLoggingMixin: """Mixin for t...
35.454545
112
0.503205
from pprint import pprint from typing import Any, Optional from django.utils.termcolors import colorize class TerminalLoggingMixin: def make_bold(self, text: str, fg="red") -> str: return colorize(text, opts=("bold", ), fg=fg) def pprint_symbols(self, symbol="=", ...
true
true
08ffec67afd29a86c68391e8b75e643471388014
13,196
py
Python
oscar/lib/python2.7/site-packages/django_extensions/management/shells.py
AMuratTuran/mkn
557086426773ced10d82c969304bd349414a601e
[ "BSD-3-Clause" ]
1
2019-03-11T17:10:06.000Z
2019-03-11T17:10:06.000Z
oscar/lib/python2.7/site-packages/django_extensions/management/shells.py
AMuratTuran/mkn
557086426773ced10d82c969304bd349414a601e
[ "BSD-3-Clause" ]
3
2020-06-05T18:53:36.000Z
2021-06-10T20:47:05.000Z
venv/lib/python3.6/site-packages/django_extensions/management/shells.py
fkallin/Superbook
a5874d3fbe04085cc4e62051c44a178a61dc289a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import six import traceback from typing import ( # NOQA Dict, List, Tuple, Type, Union, ) from django.apps.config import MODELS_MODULE_NAME from django.utils.module_loading import import_string from django import VERSION as DJANGO_VERSION from django_extensions.collision_r...
42.159744
146
0.599803
import six import traceback from typing import ( Dict, List, Tuple, Type, Union, ) from django.apps.config import MODELS_MODULE_NAME from django.utils.module_loading import import_string from django import VERSION as DJANGO_VERSION from django_extensions.collision_resolvers import CollisionResolv...
true
true
08ffee1863e73b27f098bc42f25598b5965f9f90
1,066
py
Python
jcasts/episodes/admin.py
danjac/radiofeed
06e2b10396345f0afcf7c1dfee67c41fbff153e1
[ "MIT" ]
5
2020-12-23T20:42:26.000Z
2021-02-20T01:37:47.000Z
jcasts/episodes/admin.py
danjac/radiofeed
06e2b10396345f0afcf7c1dfee67c41fbff153e1
[ "MIT" ]
null
null
null
jcasts/episodes/admin.py
danjac/radiofeed
06e2b10396345f0afcf7c1dfee67c41fbff153e1
[ "MIT" ]
3
2020-12-25T12:31:58.000Z
2021-02-13T11:49:49.000Z
from django.contrib import admin from django.template.defaultfilters import truncatechars from jcasts.episodes import models @admin.register(models.Episode) class EpisodeAdmin(admin.ModelAdmin): list_display = ("episode_title", "podcast_title", "pub_date") list_select_related = ("podcast",) raw_id_fields...
28.810811
81
0.658537
from django.contrib import admin from django.template.defaultfilters import truncatechars from jcasts.episodes import models @admin.register(models.Episode) class EpisodeAdmin(admin.ModelAdmin): list_display = ("episode_title", "podcast_title", "pub_date") list_select_related = ("podcast",) raw_id_fields...
true
true
08fff09019d6c1a1e14ccc4fe65b294bd3c514b5
2,840
py
Python
cookie_status.py
geofabrik/osm-internal-auth
2b53f1a140f077206eed2e03ae7977826a93d31c
[ "BSD-2-Clause" ]
2
2019-04-08T22:56:35.000Z
2019-12-07T12:38:03.000Z
cookie_status.py
geofabrik/osm-internal-auth
2b53f1a140f077206eed2e03ae7977826a93d31c
[ "BSD-2-Clause" ]
8
2018-05-04T15:53:34.000Z
2021-07-20T22:01:17.000Z
cookie_status.py
geofabrik/osm-internal-auth
2b53f1a140f077206eed2e03ae7977826a93d31c
[ "BSD-2-Clause" ]
3
2018-08-11T11:04:06.000Z
2022-02-11T15:33:13.000Z
#! /usr/bin/env python3 import json import datetime from sendfile_osm_oauth_protector.config import Config from sendfile_osm_oauth_protector.key_manager import KeyManager from sendfile_osm_oauth_protector.oauth_data_cookie import OAuthDataCookie from sendfile_osm_oauth_protector.authentication_state import Authenticat...
48.965517
224
0.760563
import json import datetime from sendfile_osm_oauth_protector.config import Config from sendfile_osm_oauth_protector.key_manager import KeyManager from sendfile_osm_oauth_protector.oauth_data_cookie import OAuthDataCookie from sendfile_osm_oauth_protector.authentication_state import AuthenticationState from sendfile_o...
true
true
08fff144e816ae48d703d484bbedf38bd8fc1c53
262
py
Python
functions/chalice/base/app.py
diegojancic/serverless-performance
05ef9da4ad7fc66a23e495cd9c476879cf732fb0
[ "MIT" ]
4
2018-10-23T20:40:41.000Z
2022-02-10T14:17:51.000Z
functions/chalice/base/app.py
diegojancic/serverless-performance
05ef9da4ad7fc66a23e495cd9c476879cf732fb0
[ "MIT" ]
5
2021-06-01T22:36:55.000Z
2021-06-01T23:12:18.000Z
functions/chalice/base/app.py
diegojancic/serverless-performance
05ef9da4ad7fc66a23e495cd9c476879cf732fb0
[ "MIT" ]
2
2018-11-27T14:33:06.000Z
2020-05-11T11:21:00.000Z
from chalice import Chalice, Response app = Chalice(app_name='chalice-base') @app.route('/') def index(): resp = "<html><body><h1>Hello World!</h1></body></html>" return Response(body=resp, status_code=200, headers={'Content-Type': 'text/html'})
20.153846
57
0.660305
from chalice import Chalice, Response app = Chalice(app_name='chalice-base') @app.route('/') def index(): resp = "<html><body><h1>Hello World!</h1></body></html>" return Response(body=resp, status_code=200, headers={'Content-Type': 'text/html'})
true
true
08fff1a330de56bea7c71a1a27cf0428aff2fae8
3,013
py
Python
haystack/panels.py
marksweb/django-haystack
e60031f93b92b412fa8a423ed1b0b7f171546346
[ "BSD-3-Clause" ]
1
2019-12-22T23:38:56.000Z
2019-12-22T23:38:56.000Z
haystack/panels.py
joshtechnologygroup/django-haystack
42e81b2758936681e18381249342674be232d425
[ "BSD-3-Clause" ]
2
2019-05-01T14:30:04.000Z
2019-05-30T15:35:14.000Z
haystack/panels.py
joshtechnologygroup/django-haystack
42e81b2758936681e18381249342674be232d425
[ "BSD-3-Clause" ]
1
2020-09-01T08:00:08.000Z
2020-09-01T08:00:08.000Z
# encoding: utf-8 from __future__ import absolute_import, division, print_function, unicode_literals import datetime from debug_toolbar.panels import DebugPanel from django.template.loader import render_to_string from django.utils import six from django.utils.translation import ugettext_lazy as _ from haystack impo...
31.061856
87
0.579157
from __future__ import absolute_import, division, print_function, unicode_literals import datetime from debug_toolbar.panels import DebugPanel from django.template.loader import render_to_string from django.utils import six from django.utils.translation import ugettext_lazy as _ from haystack import connections c...
true
true
08fff1dd5dbd4354658153d443423ed7fc7013d0
425
py
Python
personal_website_pralab2/asgi.py
robertmunne/rp-personal-website-pralab2
9bdd862e96e7c962172e91098f024ff25ad719f2
[ "MIT" ]
null
null
null
personal_website_pralab2/asgi.py
robertmunne/rp-personal-website-pralab2
9bdd862e96e7c962172e91098f024ff25ad719f2
[ "MIT" ]
null
null
null
personal_website_pralab2/asgi.py
robertmunne/rp-personal-website-pralab2
9bdd862e96e7c962172e91098f024ff25ad719f2
[ "MIT" ]
null
null
null
""" ASGI config for personal_website_pralab2 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.0/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefa...
25
84
0.802353
import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'personal_website_pralab2.settings') application = get_asgi_application()
true
true
08fff1eb317ec31a3997f66c0ff08b48dd9bf2ec
4,652
py
Python
allennlp/modules/seq2seq_encoders/pytorch_transformer_wrapper.py
sun-xiaoyu/allennlp
b49aff6aac4e9912564ee8235250d50c9d17e53f
[ "Apache-2.0" ]
4
2019-05-30T01:03:31.000Z
2021-12-18T08:24:51.000Z
allennlp/modules/seq2seq_encoders/pytorch_transformer_wrapper.py
sun-xiaoyu/allennlp
b49aff6aac4e9912564ee8235250d50c9d17e53f
[ "Apache-2.0" ]
123
2020-04-26T02:41:30.000Z
2021-08-02T21:18:00.000Z
allennlp/modules/seq2seq_encoders/pytorch_transformer_wrapper.py
sun-xiaoyu/allennlp
b49aff6aac4e9912564ee8235250d50c9d17e53f
[ "Apache-2.0" ]
5
2019-07-16T06:43:50.000Z
2021-12-18T08:25:12.000Z
from typing import Optional from overrides import overrides import torch from torch import nn from allennlp.modules.seq2seq_encoders.seq2seq_encoder import Seq2SeqEncoder from allennlp.nn.util import add_positional_features @Seq2SeqEncoder.register("pytorch_transformer") class PytorchTransformer(Seq2SeqEncoder): ...
40.103448
127
0.680567
from typing import Optional from overrides import overrides import torch from torch import nn from allennlp.modules.seq2seq_encoders.seq2seq_encoder import Seq2SeqEncoder from allennlp.nn.util import add_positional_features @Seq2SeqEncoder.register("pytorch_transformer") class PytorchTransformer(Seq2SeqEncoder): ...
true
true
08fff2874ecc18eeb20a4d2e652c2b11695f38a7
887
py
Python
gui/transformer.py
kklmn/ParSeq
46178c21c3ee39b84bbf3d80bcd9f93128ace9e2
[ "MIT" ]
3
2018-11-19T07:14:25.000Z
2020-07-28T17:20:14.000Z
gui/transformer.py
kklmn/ParSeq
46178c21c3ee39b84bbf3d80bcd9f93128ace9e2
[ "MIT" ]
null
null
null
gui/transformer.py
kklmn/ParSeq
46178c21c3ee39b84bbf3d80bcd9f93128ace9e2
[ "MIT" ]
2
2019-03-25T09:36:11.000Z
2021-12-19T07:52:38.000Z
# -*- coding: utf-8 -*- __author__ = "Konstantin Klementiev" __date__ = "31 Mar 2021" # !!! SEE CODERULES.TXT !!! import time from silx.gui import qt class Transformer(qt.QObject): ready = qt.pyqtSignal(qt.QWidget, float) def prepare(self, transform, params={}, runDownstream=True, dataItems=None, ...
29.566667
79
0.640361
__author__ = "Konstantin Klementiev" __date__ = "31 Mar 2021" import time from silx.gui import qt class Transformer(qt.QObject): ready = qt.pyqtSignal(qt.QWidget, float) def prepare(self, transform, params={}, runDownstream=True, dataItems=None, starter=None): self.transform = transf...
true
true
08fff2a92dc145e9f7dd902a08214e63cab0ede0
1,010
py
Python
naturtag/widgets/taxon_autocomplete.py
JWCook/naturtag
1449025c306ca871d7551706c91b25a14b4c215c
[ "MIT" ]
12
2020-08-30T08:17:32.000Z
2022-02-01T19:46:23.000Z
naturtag/widgets/taxon_autocomplete.py
JWCook/naturtag
1449025c306ca871d7551706c91b25a14b4c215c
[ "MIT" ]
83
2020-05-25T00:17:34.000Z
2022-03-27T17:55:35.000Z
naturtag/widgets/taxon_autocomplete.py
JWCook/naturtag
1449025c306ca871d7551706c91b25a14b4c215c
[ "MIT" ]
null
null
null
from pyinaturalist.node_api import get_taxa_autocomplete from naturtag.widgets import AutocompleteSearch class TaxonAutocompleteSearch(AutocompleteSearch): """Autocomplete search for iNaturalist taxa""" async def get_autocomplete(self, search_str): """Get taxa autocomplete search results, as display...
36.071429
98
0.634653
from pyinaturalist.node_api import get_taxa_autocomplete from naturtag.widgets import AutocompleteSearch class TaxonAutocompleteSearch(AutocompleteSearch): async def get_autocomplete(self, search_str): async def _get_taxa_autocomplete(): return get_taxa_autocomplete(q=search_str).get('resul...
true
true
08fff351f2acae691997091924293b49fbfaa7e5
154
py
Python
virtual/bin/django-admin.py
TonyKioko/Awwards
d8a69e102ec87a7da9ac33337d738dedfa8b91e9
[ "MIT" ]
null
null
null
virtual/bin/django-admin.py
TonyKioko/Awwards
d8a69e102ec87a7da9ac33337d738dedfa8b91e9
[ "MIT" ]
null
null
null
virtual/bin/django-admin.py
TonyKioko/Awwards
d8a69e102ec87a7da9ac33337d738dedfa8b91e9
[ "MIT" ]
1
2021-01-27T06:19:44.000Z
2021-01-27T06:19:44.000Z
#!/home/tony/Desktop/Awwards/virtual/bin/python from django.core import management if __name__ == "__main__": management.execute_from_command_line()
25.666667
47
0.785714
from django.core import management if __name__ == "__main__": management.execute_from_command_line()
true
true
08fff40a243e18b2db022a1eb7a1f3ab13e2b039
687
py
Python
ue/ue_05/problem_6.py
VoxelPi/compm
745019d4e0d156910f19ed9168949f150356a349
[ "MIT" ]
null
null
null
ue/ue_05/problem_6.py
VoxelPi/compm
745019d4e0d156910f19ed9168949f150356a349
[ "MIT" ]
4
2022-03-09T22:54:25.000Z
2022-03-29T21:33:49.000Z
ue/ue_05/problem_6.py
VoxelPi/compm
745019d4e0d156910f19ed9168949f150356a349
[ "MIT" ]
null
null
null
import numpy as np def pseudo(A): # Check if matrix A is injective. if np.linalg.det(A.T @ A) < 1e-9: print("the given matrix is not injective.") return # Return pseudo-inverse (See lecture notes page 155) print("the given matrix is injective.") return np.linalg.inv(A.T @ A) @ A.T ...
28.625
65
0.577875
import numpy as np def pseudo(A): if np.linalg.det(A.T @ A) < 1e-9: print("the given matrix is not injective.") return print("the given matrix is injective.") return np.linalg.inv(A.T @ A) @ A.T A = np.array([[1, 2, 0], [1, 4, 2], [1, 0, 3]]) print(pseudo(A)) A = np.array([[1, 0]...
true
true
08fff44fdec67fa0bef10f11b0eae0b7e063abb0
1,326
py
Python
setup.py
gudata/feed-to-sqlite
88356a5601786fae81b5116fb08a0e692e66272a
[ "Apache-2.0" ]
null
null
null
setup.py
gudata/feed-to-sqlite
88356a5601786fae81b5116fb08a0e692e66272a
[ "Apache-2.0" ]
null
null
null
setup.py
gudata/feed-to-sqlite
88356a5601786fae81b5116fb08a0e692e66272a
[ "Apache-2.0" ]
null
null
null
from setuptools import setup import os VERSION = "0.5.0" README = os.path.join(os.path.dirname(os.path.abspath(__file__)), "README.md") def get_long_description(): with open(README, encoding="utf-8") as f: return f.read() setup( name="feed-to-sqlite", version=VERSION, description="Save an ...
28.212766
78
0.61991
from setuptools import setup import os VERSION = "0.5.0" README = os.path.join(os.path.dirname(os.path.abspath(__file__)), "README.md") def get_long_description(): with open(README, encoding="utf-8") as f: return f.read() setup( name="feed-to-sqlite", version=VERSION, description="Save an ...
true
true
08fff8ad0c257e50f95937e19f0da5ac9207817d
266
py
Python
api/__init__.py
radomd92/botjagwar
1dc96600c40041057a9f9afde38c31ca34b8db38
[ "MIT" ]
7
2015-01-23T17:24:04.000Z
2022-01-12T16:54:24.000Z
api/__init__.py
radomd92/botjagwar
1dc96600c40041057a9f9afde38c31ca34b8db38
[ "MIT" ]
18
2017-12-09T01:11:23.000Z
2021-09-22T13:26:24.000Z
api/__init__.py
radomd92/botjagwar
1dc96600c40041057a9f9afde38c31ca34b8db38
[ "MIT" ]
1
2015-06-22T02:17:55.000Z
2015-06-22T02:17:55.000Z
VERSION = None def get_version(): global VERSION if VERSION is not None: return VERSION else: with open('/opt/botjagwar/data/version', 'r') as f: VERSION = f.read().strip('\n') return VERSION __all__ = ['get_version']
17.733333
59
0.590226
VERSION = None def get_version(): global VERSION if VERSION is not None: return VERSION else: with open('/opt/botjagwar/data/version', 'r') as f: VERSION = f.read().strip('\n') return VERSION __all__ = ['get_version']
true
true
08fff9049022e9f841f052723f8b68a55bb090ea
3,798
py
Python
python/caffe_double/test/test_net_spec.py
zjjliujs/caffe
9d17cb456274f8e579dfcb0b1e0097d604ae37c6
[ "Intel", "BSD-2-Clause" ]
null
null
null
python/caffe_double/test/test_net_spec.py
zjjliujs/caffe
9d17cb456274f8e579dfcb0b1e0097d604ae37c6
[ "Intel", "BSD-2-Clause" ]
null
null
null
python/caffe_double/test/test_net_spec.py
zjjliujs/caffe
9d17cb456274f8e579dfcb0b1e0097d604ae37c6
[ "Intel", "BSD-2-Clause" ]
null
null
null
import unittest import tempfile import caffe_double from caffe_double import layers as L from caffe_double import params as P def lenet(batch_size): n = caffe_double.NetSpec() n.data, n.label = L.DummyData(shape=[dict(dim=[batch_size, 1, 28, 28]), dict(dim=[batch_size, ...
42.2
80
0.632438
import unittest import tempfile import caffe_double from caffe_double import layers as L from caffe_double import params as P def lenet(batch_size): n = caffe_double.NetSpec() n.data, n.label = L.DummyData(shape=[dict(dim=[batch_size, 1, 28, 28]), dict(dim=[batch_size, ...
true
true
08fff98e6bc2f3f1f09c07199fac0dc308278f16
481
py
Python
archive/online/2015/150916_increase_proofread_Henochbuch.py
the-it/WS_THEbotIT
5630382e697a8b7432e0cf63a05a45fe43064caa
[ "MIT" ]
5
2019-01-21T19:59:27.000Z
2021-02-06T12:56:28.000Z
archive/online/2015/150916_increase_proofread_Henochbuch.py
the-it/WS_THEbotIT
5630382e697a8b7432e0cf63a05a45fe43064caa
[ "MIT" ]
697
2017-11-19T12:41:11.000Z
2022-03-31T07:35:04.000Z
archive/online/2015/150916_increase_proofread_Henochbuch.py
the-it/WS_THEbotIT
5630382e697a8b7432e0cf63a05a45fe43064caa
[ "MIT" ]
1
2018-02-18T23:01:13.000Z
2018-02-18T23:01:13.000Z
# -*- coding: utf-8 -*- __author__ = 'eso' import sys sys.path.append('../../') from tools.petscan import PetScan import re import requests import pywikibot from pywikibot import proofreadpage site = pywikibot.Site() for i in range(455, 474): page = pywikibot.proofreadpage.ProofreadPage(site, 'Seite:Riessler Altj...
25.315789
135
0.723493
__author__ = 'eso' import sys sys.path.append('../../') from tools.petscan import PetScan import re import requests import pywikibot from pywikibot import proofreadpage site = pywikibot.Site() for i in range(455, 474): page = pywikibot.proofreadpage.ProofreadPage(site, 'Seite:Riessler Altjuedisches Schrifttum aus...
true
true
08fff9a4e75c7d70d4535ed0bb418cc003ab6a98
67,175
py
Python
tensorflow/python/keras/losses_test.py
leozhoujf/tensorflow
a5c2e20205089a1ef0edd497de1c4fb7f3c5ec4a
[ "Apache-2.0" ]
9
2019-12-29T01:47:37.000Z
2021-12-21T13:47:41.000Z
tensorflow/python/keras/losses_test.py
AnirudhDagar/tensorflow
7b418e78cd6d76c75a45f89614a588223ce20d7b
[ "Apache-2.0" ]
null
null
null
tensorflow/python/keras/losses_test.py
AnirudhDagar/tensorflow
7b418e78cd6d76c75a45f89614a588223ce20d7b
[ "Apache-2.0" ]
1
2019-05-23T15:20:40.000Z
2019-05-23T15:20:40.000Z
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
42.596703
80
0.622583
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import shutil import numpy as np from tensorflow.python import keras from tensorflow.python.framework import constant_op from tensorflow.python.framework import dtypes from tensorflow.python.framew...
true
true
08fff9a643199970e5007aed3caa967a915eacc2
727
py
Python
setup.py
aldencolerain/rxvpntoggle
867316e05dd7526a42ac2a0587db51c3c20e91ac
[ "MIT" ]
null
null
null
setup.py
aldencolerain/rxvpntoggle
867316e05dd7526a42ac2a0587db51c3c20e91ac
[ "MIT" ]
null
null
null
setup.py
aldencolerain/rxvpntoggle
867316e05dd7526a42ac2a0587db51c3c20e91ac
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from setuptools import setup, find_packages # package settings setup( # info name='rxvpntoggle', version='0.0.1', author='Alden', url='https://github.com/aldencolerain/rxvpntoggle.git', description='VPN toggle for indicator for Xubuntu.', long_description=open('REA...
24.233333
77
0.676754
from setuptools import setup, find_packages setup( name='rxvpntoggle', version='0.0.1', author='Alden', url='https://github.com/aldencolerain/rxvpntoggle.git', description='VPN toggle for indicator for Xubuntu.', long_description=open('README.md').read(), long_description_content_type...
true
true
08fffa43f238e0ee136e6800dcddf9f3e4ff34e9
4,067
py
Python
benchmark/startQiskit_Class931.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit_Class931.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit_Class931.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=5 # total number=41 import cirq import qiskit from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from math import log2,floor, sqrt, pi import numpy as np import networkx as ...
30.578947
80
0.60118
import cirq import qiskit from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from math import log2,floor, sqrt, pi import numpy as np import networkx as nx def build_oracle(n: int, f) -> ...
true
true
08fffafc15c82fc75e27a379412f50f15675093f
911
py
Python
src/api/comments_api/serializers.py
DevHub-Azerbaycan/python_web_site
fd3b6f8d22998d47b0b1e2c74be742a5abd9f5bf
[ "MIT" ]
25
2020-04-06T13:34:21.000Z
2020-04-18T20:28:32.000Z
src/api/comments_api/serializers.py
devhub-az/python_web_site
fd3b6f8d22998d47b0b1e2c74be742a5abd9f5bf
[ "MIT" ]
35
2020-03-23T11:06:45.000Z
2020-12-16T06:18:57.000Z
src/api/comments_api/serializers.py
devhub-az/python_web_site
fd3b6f8d22998d47b0b1e2c74be742a5abd9f5bf
[ "MIT" ]
3
2020-04-08T11:44:07.000Z
2020-04-09T12:23:50.000Z
from rest_framework import serializers from comments.models import Comment from ..posts_api.serializers import PostSerializer from django.contrib.auth.models import User comment_detail_url = serializers.HyperlinkedIdentityField( view_name = 'api:comment-detail', lookup_field = 'pk', ) class UserSerializer(s...
27.606061
74
0.723381
from rest_framework import serializers from comments.models import Comment from ..posts_api.serializers import PostSerializer from django.contrib.auth.models import User comment_detail_url = serializers.HyperlinkedIdentityField( view_name = 'api:comment-detail', lookup_field = 'pk', ) class UserSerializer(s...
true
true
08fffb128ba9918eaa718ee25fd216d056c12bac
1,236
py
Python
python-new-trunk/paramiko/compress.py
raychorn/svn_molten-magma
8aa2ff2340707eecae6514943e86f5afba9cd54a
[ "CC0-1.0" ]
33
2015-02-16T02:52:08.000Z
2022-02-18T08:46:32.000Z
lib/IPCE/Lib/paramiko/compress.py
bensku/MultiversePlatform
7e1aad33d48b9e47f3db2ca638cb57592336ddb7
[ "MIT" ]
1
2017-09-09T18:50:23.000Z
2020-12-29T18:13:56.000Z
lib/IPCE/Lib/paramiko/compress.py
bensku/MultiversePlatform
7e1aad33d48b9e47f3db2ca638cb57592336ddb7
[ "MIT" ]
31
2015-02-07T16:20:24.000Z
2022-02-23T15:02:43.000Z
# Copyright (C) 2003-2007 Robey Pointer <robey@lag.net> # # This file is part of paramiko. # # Paramiko is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your op...
30.9
79
0.727346
import zlib class ZlibCompressor (object): def __init__(self): self.z = zlib.compressobj(9) def __call__(self, data): return self.z.compress(data) + self.z.flush(zlib.Z_FULL_FLUSH) class ZlibDecompressor (object): def __init__(self): self.z = zlib.decompressobj() def __ca...
true
true
08fffb526599e68bbf22f5a62926b62bdabedf34
662
py
Python
machine-learning/image-transformation/cropping.py
gizzmo25/pythoncode-tutorials
39a413fc1da232ad6de7e5f1e8955564dc65448e
[ "MIT" ]
null
null
null
machine-learning/image-transformation/cropping.py
gizzmo25/pythoncode-tutorials
39a413fc1da232ad6de7e5f1e8955564dc65448e
[ "MIT" ]
null
null
null
machine-learning/image-transformation/cropping.py
gizzmo25/pythoncode-tutorials
39a413fc1da232ad6de7e5f1e8955564dc65448e
[ "MIT" ]
null
null
null
import numpy as np import cv2 import matplotlib.pyplot as plt # read the input image img = cv2.imread("city.jpg") # convert from BGR to RGB so we can plot using matplotlib img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) # disable x & y axis plt.axis('off') # show the image plt.imshow(img) plt.show() # get 20...
27.583333
71
0.70997
import numpy as np import cv2 import matplotlib.pyplot as plt img = cv2.imread("city.jpg") img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) plt.axis('off') plt.imshow(img) plt.show() cropped_img = img[100:300, 100:300] # disable x & y axis plt.axis('off') # show the resulting image plt.imshow(cropped_img) pl...
true
true
08fffbc3c5fa5921ff72a39ab370114e2154c968
1,602
py
Python
ev3sim/devices/colour/base.py
scottwedge/ev3sim
751c9902e7615d27d52e4b45b34e6acb47c06d24
[ "BSD-3-Clause" ]
null
null
null
ev3sim/devices/colour/base.py
scottwedge/ev3sim
751c9902e7615d27d52e4b45b34e6acb47c06d24
[ "BSD-3-Clause" ]
null
null
null
ev3sim/devices/colour/base.py
scottwedge/ev3sim
751c9902e7615d27d52e4b45b34e6acb47c06d24
[ "BSD-3-Clause" ]
null
null
null
import random import numpy as np class ColourSensorMixin: RGB_RAW = "RGB-RAW" device_type = "lego-sensor" mode = RGB_RAW SENSOR_RADIUS = 1 SENSOR_POINTS = 100 def _SenseValueAboutPosition(self, centrePosition, valueGetter): # Randomly sample value from SENSOR_POINTS chosen around t...
32.04
118
0.576779
import random import numpy as np class ColourSensorMixin: RGB_RAW = "RGB-RAW" device_type = "lego-sensor" mode = RGB_RAW SENSOR_RADIUS = 1 SENSOR_POINTS = 100 def _SenseValueAboutPosition(self, centrePosition, valueGetter): points = [random.random() * self.SENSOR_RADIUS for...
true
true
08fffc77755fbb25f85fc2fc8357c667133dc97d
3,091
py
Python
tensorflow_addons/image/utils.py
Soroosh129/addons
d92ae02d04e9052f6ca5ea272873efd15eaa35ce
[ "Apache-2.0" ]
1
2020-09-09T14:51:22.000Z
2020-09-09T14:51:22.000Z
tensorflow_addons/image/utils.py
pkanwar23/addons
de99c6dd904c475c5c95726911f4aac447c13361
[ "Apache-2.0" ]
null
null
null
tensorflow_addons/image/utils.py
pkanwar23/addons
de99c6dd904c475c5c95726911f4aac447c13361
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
30.303922
81
0.586218
import tensorflow as tf def get_ndims(image): return image.get_shape().ndims or tf.rank(image) def to_4D_image(image): with tf.control_dependencies( [ tf.debugging.assert_rank_in( image, [2, 3, 4], message="`image` must be 2/3/4D tensor" ) ] ): ...
true
true
08fffcee0be47ea12e6dabdb0eee59df372d3625
12,578
py
Python
demo_cave/Hyper_loader_2.py
zbzhzhy/Hyperspectral-Image-Super-resolution-via-Deep-Progressive-Zero-centric-Residual-Learning
39f103a19fd54cc765487389f14f90a23e5e96bf
[ "MIT" ]
8
2021-03-15T02:54:01.000Z
2022-03-01T07:28:53.000Z
demo_cave/Hyper_loader_2.py
zbzhzhy/Hyperspectral-Image-Super-resolution-via-Deep-Progressive-Zero-centric-Residual-Learning
39f103a19fd54cc765487389f14f90a23e5e96bf
[ "MIT" ]
6
2021-04-04T03:47:53.000Z
2021-11-22T11:47:27.000Z
demo_cave/Hyper_loader_2.py
zbzhzhy/Hyperspectral-Image-Super-resolution-via-Deep-Progressive-Zero-centric-Residual-Learning
39f103a19fd54cc765487389f14f90a23e5e96bf
[ "MIT" ]
2
2021-04-16T05:45:54.000Z
2021-11-18T12:56:16.000Z
import numpy as np import torch import cv2 from torch.utils.data import Dataset, DataLoader, TensorDataset from torch.autograd import Variable import scipy.ndimage as scin from scipy import ndimage from get_name import get_name import scipy.io as scio import h5py # import lmdb import os import random impor...
54.215517
163
0.519955
import numpy as np import torch import cv2 from torch.utils.data import Dataset, DataLoader, TensorDataset from torch.autograd import Variable import scipy.ndimage as scin from scipy import ndimage from get_name import get_name import scipy.io as scio import h5py import os import random import h5py new_loa...
true
true
08fffd078adeda5509845428807142cb678f4e3c
225
py
Python
pystratis/api/network/requestmodels/__init__.py
TjadenFroyda/pyStratis
9cc7620d7506637f8a2b84003d931eceb36ac5f2
[ "MIT" ]
8
2021-06-30T20:44:22.000Z
2021-12-07T14:42:22.000Z
pystratis/api/network/requestmodels/__init__.py
TjadenFroyda/pyStratis
9cc7620d7506637f8a2b84003d931eceb36ac5f2
[ "MIT" ]
2
2021-07-01T11:50:18.000Z
2022-01-25T18:39:49.000Z
pystratis/api/network/requestmodels/__init__.py
TjadenFroyda/pyStratis
9cc7620d7506637f8a2b84003d931eceb36ac5f2
[ "MIT" ]
4
2021-07-01T04:36:42.000Z
2021-09-17T10:54:19.000Z
from .clearbannedrequest import ClearBannedRequest from .disconnectpeerrequest import DisconnectPeerRequest from .setbanrequest import SetBanRequest __all__ = ['ClearBannedRequest', 'DisconnectPeerRequest', 'SetBanRequest']
37.5
74
0.857778
from .clearbannedrequest import ClearBannedRequest from .disconnectpeerrequest import DisconnectPeerRequest from .setbanrequest import SetBanRequest __all__ = ['ClearBannedRequest', 'DisconnectPeerRequest', 'SetBanRequest']
true
true
08fffdd40c73ff0e86adff8204627da417b04bc5
5,497
py
Python
examples/cross-browser.py
GoogleChromeLabs/bidiInChromeContext
b2a0b854bb8ac2647ad5acb6166c3fe3b7a05857
[ "Apache-2.0" ]
21
2021-06-16T10:28:02.000Z
2021-12-16T23:46:28.000Z
examples/cross-browser.py
GoogleChromeLabs/bidiInChromeContext
b2a0b854bb8ac2647ad5acb6166c3fe3b7a05857
[ "Apache-2.0" ]
65
2021-06-18T11:44:47.000Z
2022-03-28T21:22:26.000Z
examples/cross-browser.py
GoogleChromeLabs/bidiInChromeContext
b2a0b854bb8ac2647ad5acb6166c3fe3b7a05857
[ "Apache-2.0" ]
4
2021-06-16T11:24:58.000Z
2021-11-18T15:36:28.000Z
# Copyright 2021 Google LLC. # Copyright (c) Microsoft Corporation. # # 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 a...
35.928105
120
0.640895
# https://github.com/puppeteer/puppeteer/blob/4c3caaa3f99f0c31333a749ec50f56180507a374/examples/cross-browser.js import asyncio import json import os import websockets async def get_websocket(): port = os.getenv('PORT', 8080) url = f'ws://localhost:{port}' return await websockets.connect(url) async de...
true
true
08fffeebc3dc46cee39f5d09d146c73b453a2de9
1,286
py
Python
src/blueprintpy/cli/config_serializer.py
Enchan1207/blueprintpy
e8af659353c71ad86dbb58e4b6e3b19f520980ab
[ "MIT" ]
4
2022-03-17T12:44:07.000Z
2022-03-23T04:17:07.000Z
src/blueprintpy/cli/config_serializer.py
Enchan1207/blueprintpy
e8af659353c71ad86dbb58e4b6e3b19f520980ab
[ "MIT" ]
10
2022-03-24T03:22:02.000Z
2022-03-24T06:21:51.000Z
src/blueprintpy/cli/config_serializer.py
Enchan1207/blueprintpy
e8af659353c71ad86dbb58e4b6e3b19f520980ab
[ "MIT" ]
null
null
null
# # コンフィグシリアライザ # from functools import reduce from typing import Any, Dict from blueprintpy.core import Config class ConfigSerializer: """テンプレート構成シリアライザ """ @staticmethod def serialize(config: Config) -> Dict[str, Any]: """テンプレート構成オブジェクトをシリアライズし、辞書形式に変換します. Args: config...
26.244898
126
0.587869
from functools import reduce from typing import Any, Dict from blueprintpy.core import Config class ConfigSerializer: @staticmethod def serialize(config: Config) -> Dict[str, Any]: serialized: Dict[str, Any] = {} serialized['name'] = config.name serialized_args = [...
true
true
08ffffb2c2375d8ee8ebca12a88722c6d50d7ebc
4,102
py
Python
networkx/generators/sudoku.py
jebogaert/networkx
8563c3313223a53c548530f39c8cfb6e433539d3
[ "BSD-3-Clause" ]
7
2021-01-30T17:42:00.000Z
2022-01-09T08:08:48.000Z
networkx/generators/sudoku.py
jebogaert/networkx
8563c3313223a53c548530f39c8cfb6e433539d3
[ "BSD-3-Clause" ]
25
2020-11-16T15:36:41.000Z
2021-06-01T05:15:31.000Z
networkx/generators/sudoku.py
jebogaert/networkx
8563c3313223a53c548530f39c8cfb6e433539d3
[ "BSD-3-Clause" ]
2
2020-12-21T11:41:13.000Z
2021-01-08T17:09:21.000Z
"""Generator for Sudoku graphs This module gives a generator for n-Sudoku graphs. It can be used to develop algorithms for solving or generating Sudoku puzzles. A completed Sudoku grid is a 9x9 array of integers between 1 and 9, with no number appearing twice in the same row, column, or 3x3 box. 8 6 4 | 3 7 1 | 2...
31.79845
83
0.596782
import networkx as nx from networkx.exception import NetworkXError __all__ = ["sudoku_graph"] def sudoku_graph(n=3): if n < 0: raise NetworkXError("The order must be greater than or equal to zero.") n2 = n * n n3 = n2 * n n4 = n3 * n G = nx.empty_graph(n4) if n < 2: ...
true
true
1c0000734c6711975c58f4dcb7a69705fd2d2431
7
py
Python
test/integration/StringIndexNotFound/string index not found.py
HighSchoolHacking/GLS-Draft
9e418b6290e7c8e3f2da87668784bdba1cde5a76
[ "MIT" ]
30
2019-10-29T12:47:50.000Z
2022-02-12T06:41:39.000Z
test/integration/StringIndexNotFound/string index not found.py
HighSchoolHacking/GLS-Draft
9e418b6290e7c8e3f2da87668784bdba1cde5a76
[ "MIT" ]
247
2017-09-21T17:11:18.000Z
2019-10-08T12:59:07.000Z
test/integration/StringIndexNotFound/string index not found.py
HighSchoolHacking/GLS-Draft
9e418b6290e7c8e3f2da87668784bdba1cde5a76
[ "MIT" ]
17
2017-10-01T16:53:20.000Z
2018-11-28T07:20:35.000Z
# -1 #
1.75
2
0.142857
-1
true
true
1c00012560cfb0943c7c7e12eebce83027eec778
2,432
py
Python
src/prefect/cli/kv_store.py
concreted/prefect
dd732f5990ee2b0f3d816adb285168fd63b239e4
[ "Apache-2.0" ]
8,633
2019-03-23T17:51:03.000Z
2022-03-31T22:17:42.000Z
src/prefect/cli/kv_store.py
concreted/prefect
dd732f5990ee2b0f3d816adb285168fd63b239e4
[ "Apache-2.0" ]
3,903
2019-03-23T19:11:21.000Z
2022-03-31T23:21:23.000Z
src/prefect/cli/kv_store.py
ngriffiths13/prefect
7f5613abcb182494b7dc12159277c3bc5f3c9898
[ "Apache-2.0" ]
937
2019-03-23T18:49:44.000Z
2022-03-31T21:45:13.000Z
import sys import click from prefect import config from prefect.backend import kv_store from prefect.backend.kv_store import NON_CLOUD_BACKEND_ERROR_MESSAGE from prefect.cli.build_register import ( handle_terminal_error, TerminalError, log_exception, ) @click.group() def kv(): """ Interact with P...
23.843137
75
0.632401
import sys import click from prefect import config from prefect.backend import kv_store from prefect.backend.kv_store import NON_CLOUD_BACKEND_ERROR_MESSAGE from prefect.cli.build_register import ( handle_terminal_error, TerminalError, log_exception, ) @click.group() def kv(): if config.backend != "c...
true
true
1c00019d6b71594465f18f2650a7cc23f2fa6a2f
2,105
py
Python
rdr_service/alembic/versions/58e8df756d74_add_indexs_for_participant_and_ps.py
all-of-us/raw-data-repository
d28ad957557587b03ff9c63d55dd55e0508f91d8
[ "BSD-3-Clause" ]
39
2017-10-13T19:16:27.000Z
2021-09-24T16:58:21.000Z
rdr_service/alembic/versions/58e8df756d74_add_indexs_for_participant_and_ps.py
all-of-us/raw-data-repository
d28ad957557587b03ff9c63d55dd55e0508f91d8
[ "BSD-3-Clause" ]
312
2017-09-08T15:42:13.000Z
2022-03-23T18:21:40.000Z
rdr_service/alembic/versions/58e8df756d74_add_indexs_for_participant_and_ps.py
all-of-us/raw-data-repository
d28ad957557587b03ff9c63d55dd55e0508f91d8
[ "BSD-3-Clause" ]
19
2017-09-15T13:58:00.000Z
2022-02-07T18:33:20.000Z
"""add indexs for participant and ps Revision ID: 58e8df756d74 Revises: edb6d45e5e45 Create Date: 2019-01-29 14:55:01.135611 """ from alembic import op # revision identifiers, used by Alembic. revision = "58e8df756d74" down_revision = "edb6d45e5e45" branch_labels = None depends_on = None def upgrade(engine_name): ...
31.41791
113
0.715914
from alembic import op revision = "58e8df756d74" down_revision = "edb6d45e5e45" branch_labels = None depends_on = None def upgrade(engine_name): globals()["upgrade_%s" % engine_name]() def downgrade(engine_name): globals()["downgrade_%s" % engine_name]() def upgrade_rdr(): op.create_index("partic...
true
true
1c0001dae2c990332de949c0af3b75b20cb13db1
8,048
py
Python
YarpTp/yarptp.py
kpedrozag/YarpTp
eb8302aab3d8ca737d5046bddeafc4a877796a51
[ "MIT" ]
null
null
null
YarpTp/yarptp.py
kpedrozag/YarpTp
eb8302aab3d8ca737d5046bddeafc4a877796a51
[ "MIT" ]
null
null
null
YarpTp/yarptp.py
kpedrozag/YarpTp
eb8302aab3d8ca737d5046bddeafc4a877796a51
[ "MIT" ]
1
2018-11-20T16:42:38.000Z
2018-11-20T16:42:38.000Z
import RPi.GPIO as GPIO from time import sleep class YarpTp: def __init__(self): GPIO.setwarnings(False) GPIO.setmode(GPIO.BCM) self.__enableA = 0 self.__input1 = 0 self.__input2 = 0 self.__enableB = 0 self.__input3 = 0 self.__input4 = 0 s...
36.089686
139
0.600646
import RPi.GPIO as GPIO from time import sleep class YarpTp: def __init__(self): GPIO.setwarnings(False) GPIO.setmode(GPIO.BCM) self.__enableA = 0 self.__input1 = 0 self.__input2 = 0 self.__enableB = 0 self.__input3 = 0 self.__input4 = 0 s...
true
true
1c000220b847f625af2221ceac9994343116d521
7,053
py
Python
tests/graphs/algorithms/test_topological_sorting.py
ref-humbold/AlgoLib_Python
05f725504656ec93b879374a8cd87464d88fff77
[ "Apache-2.0" ]
null
null
null
tests/graphs/algorithms/test_topological_sorting.py
ref-humbold/AlgoLib_Python
05f725504656ec93b879374a8cd87464d88fff77
[ "Apache-2.0" ]
null
null
null
tests/graphs/algorithms/test_topological_sorting.py
ref-humbold/AlgoLib_Python
05f725504656ec93b879374a8cd87464d88fff77
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """Tests: Algorithms for topological sorting""" import unittest from assertpy import assert_that from algolib.graphs import DirectedSimpleGraph from algolib.graphs.algorithms import DirectedCyclicGraphError, sort_topological_using_dfs, \ sort_topological_using_inputs class TopologicalSor...
49.321678
99
0.698284
import unittest from assertpy import assert_that from algolib.graphs import DirectedSimpleGraph from algolib.graphs.algorithms import DirectedCyclicGraphError, sort_topological_using_dfs, \ sort_topological_using_inputs class TopologicalSortingTest(unittest.TestCase): def __init__(self, *args, **kwargs): ...
true
true
1c000285ea1d561e25dd537ca1cecb070f647319
1,852
py
Python
newrelic/hooks/datastore_motor.py
newrelic/newrelic-python-agen
4f292ec1219c0daffc5721a7b3a245b97d0f83ba
[ "Apache-2.0" ]
92
2020-06-12T17:53:23.000Z
2022-03-01T11:13:21.000Z
newrelic/hooks/datastore_motor.py
newrelic/newrelic-python-agen
4f292ec1219c0daffc5721a7b3a245b97d0f83ba
[ "Apache-2.0" ]
347
2020-07-10T00:10:19.000Z
2022-03-31T17:58:56.000Z
newrelic/hooks/datastore_motor.py
newrelic/newrelic-python-agen
4f292ec1219c0daffc5721a7b3a245b97d0f83ba
[ "Apache-2.0" ]
58
2020-06-17T13:51:57.000Z
2022-03-06T14:26:53.000Z
# Copyright 2010 New Relic, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
37.795918
79
0.709503
from newrelic.common.object_wrapper import wrap_function_wrapper def _nr_wrapper_Motor_getattr_(wrapped, instance, args, kwargs): def _bind_params(name, *args, **kwargs): return name name = _bind_params(*args, **kwargs) if name.startswith('__') or name.startswith('_nr_'): raise Attrib...
true
true
1c0002eba27b853fe88924b9468c09bb868818e0
3,634
py
Python
fliscopt/chaining.py
qwe123coder/fliscopt
423aa694a2d45e04d98672fe305bd129019a9ee2
[ "MIT" ]
null
null
null
fliscopt/chaining.py
qwe123coder/fliscopt
423aa694a2d45e04d98672fe305bd129019a9ee2
[ "MIT" ]
null
null
null
fliscopt/chaining.py
qwe123coder/fliscopt
423aa694a2d45e04d98672fe305bd129019a9ee2
[ "MIT" ]
null
null
null
import sys import os #from typing import final sys.path.append(os.getcwd()) import time from .utils.util import plot_scores, print_schedule, read_file from .utils.ga_utils import mutation from .base_algorithm import FlightAlgorithm from .rs import RandomSearch from .hc import HillClimb from .sa import SimulatedAnne...
37.854167
140
0.595487
import sys import os sys.path.append(os.getcwd()) import time from .utils.util import plot_scores, print_schedule, read_file from .utils.ga_utils import mutation from .base_algorithm import FlightAlgorithm from .rs import RandomSearch from .hc import HillClimb from .sa import SimulatedAnnealing from .ga import GA, R...
true
true
1c0003ffb3d1c111acc4e9eeb38ca92fdabcb2fb
4,931
py
Python
research/pcl_rl/replay_buffer.py
873040/Abhishek
2ddd716e66bc5cc6e6f0787508dd07da0e02e75a
[ "Apache-2.0" ]
3,326
2018-01-26T22:42:25.000Z
2022-02-16T13:16:39.000Z
research/pcl_rl/replay_buffer.py
873040/Abhishek
2ddd716e66bc5cc6e6f0787508dd07da0e02e75a
[ "Apache-2.0" ]
150
2017-08-28T14:59:36.000Z
2022-03-11T23:21:35.000Z
research/pcl_rl/replay_buffer.py
873040/Abhishek
2ddd716e66bc5cc6e6f0787508dd07da0e02e75a
[ "Apache-2.0" ]
1,474
2018-02-01T04:33:18.000Z
2022-03-08T07:02:20.000Z
# Copyright 2017 The TensorFlow Authors All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
30.251534
80
0.645508
import random import numpy as np from six.moves import xrange class ReplayBuffer(object): def __init__(self, max_size): self.max_size = max_size self.cur_size = 0 self.buffer = {} self.init_length = 0 def __len__(self): return self.cur_size def seed_buffer(self, episodes): self.init...
true
true
1c000510933c323ea507ea4459951d0d6e688033
401
py
Python
finalproject/finalproject/wsgi.py
LiteWilliamNguyen/ITC285CAPSTONE-PROJECT-CLASS
3e2519e341de614e194265210596eb62467b2b1f
[ "Apache-2.0" ]
null
null
null
finalproject/finalproject/wsgi.py
LiteWilliamNguyen/ITC285CAPSTONE-PROJECT-CLASS
3e2519e341de614e194265210596eb62467b2b1f
[ "Apache-2.0" ]
null
null
null
finalproject/finalproject/wsgi.py
LiteWilliamNguyen/ITC285CAPSTONE-PROJECT-CLASS
3e2519e341de614e194265210596eb62467b2b1f
[ "Apache-2.0" ]
null
null
null
""" WSGI config for finalproject 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/2.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_...
23.588235
78
0.790524
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'finalproject.settings') application = get_wsgi_application()
true
true
1c00055acce5b551f08dc71a09283fe94a108e3e
7,789
py
Python
ShaderParseTool/ShaderRexUtils.py
wangguojin/UnityShaderAutoCompletion
97d9e7cf7ab60b6799cae4d51adb31c03224976b
[ "MIT" ]
1
2015-09-02T19:34:45.000Z
2015-09-02T19:34:45.000Z
ShaderParseTool/ShaderRexUtils.py
wangguojin/UnityShaderAutoCompletion
97d9e7cf7ab60b6799cae4d51adb31c03224976b
[ "MIT" ]
null
null
null
ShaderParseTool/ShaderRexUtils.py
wangguojin/UnityShaderAutoCompletion
97d9e7cf7ab60b6799cae4d51adb31c03224976b
[ "MIT" ]
null
null
null
import re import os from ShaderConsts import ShaderConst __author__ = 'wangguojin' class HeaderHandleInfo(object): headers = [] handled = False def __init__(self): pass def __init__(self,headers,ok): self.headers = headers self.handled = ok class ShaderRex(object): __incR...
38.369458
108
0.40172
import re import os from ShaderConsts import ShaderConst __author__ = 'wangguojin' class HeaderHandleInfo(object): headers = [] handled = False def __init__(self): pass def __init__(self,headers,ok): self.headers = headers self.handled = ok class ShaderRex(object): __incR...
true
true
1c00068b933560a1fc0a75f1a9dccd26dac75343
38
py
Python
Python-Course/Variables.py
namlose/Esercizi-Python
5ce1d5ec8b0da47df18b27f7c426b3c6784e8e18
[ "Unlicense" ]
null
null
null
Python-Course/Variables.py
namlose/Esercizi-Python
5ce1d5ec8b0da47df18b27f7c426b3c6784e8e18
[ "Unlicense" ]
null
null
null
Python-Course/Variables.py
namlose/Esercizi-Python
5ce1d5ec8b0da47df18b27f7c426b3c6784e8e18
[ "Unlicense" ]
null
null
null
greeting = ("Hello!") print(greeting)
12.666667
21
0.684211
greeting = ("Hello!") print(greeting)
true
true
1c00073a5fabf8e53b639d70599babe54a05778c
4,513
py
Python
Python/tensorflow/DeepLearningZeroToAll/ver.py/Lab07-1-learning_rate_and_evaluation.py
statKim/TIL
3297d09023d97653773b35160794d3324b95c111
[ "MIT" ]
null
null
null
Python/tensorflow/DeepLearningZeroToAll/ver.py/Lab07-1-learning_rate_and_evaluation.py
statKim/TIL
3297d09023d97653773b35160794d3324b95c111
[ "MIT" ]
null
null
null
Python/tensorflow/DeepLearningZeroToAll/ver.py/Lab07-1-learning_rate_and_evaluation.py
statKim/TIL
3297d09023d97653773b35160794d3324b95c111
[ "MIT" ]
null
null
null
# Lab 7 Learning rate and Evaluation import tensorflow as tf tf.set_random_seed(777) # for reproducibility # training data x_data = [[1, 2, 1], [1, 3, 2], [1, 3, 4], [1, 5, 5], [1, 7, 5], [1, 2, 5], [1, 6, 6], [1, 7, 7]] y_data = [[0, 0, 1], ...
30.288591
81
0.612674
import tensorflow as tf tf.set_random_seed(777) x_data = [[1, 2, 1], [1, 3, 2], [1, 3, 4], [1, 5, 5], [1, 7, 5], [1, 2, 5], [1, 6, 6], [1, 7, 7]] y_data = [[0, 0, 1], [0, 0, 1], [0, 0, 1], [0, 1, 0], [0, 1, 0...
true
true
1c0007d50399572fe61b3bccc2db0540601a7664
306
py
Python
setting.py
lzdszdl/fancyMySQL
ebb8aae7647a59f005d8ee51e9a65dce4a285a7d
[ "MIT" ]
1
2018-04-25T04:40:12.000Z
2018-04-25T04:40:12.000Z
setting.py
lzdszdl/fancyMySQL
ebb8aae7647a59f005d8ee51e9a65dce4a285a7d
[ "MIT" ]
null
null
null
setting.py
lzdszdl/fancyMySQL
ebb8aae7647a59f005d8ee51e9a65dce4a285a7d
[ "MIT" ]
null
null
null
# coding: utf-8 __author__='https://cpp.la' # 花式数据库的配置 # 好车不多,开车需珍惜:线程推荐不要超过10-20,防止目标服务器负载过高 # 数据库信息 MYSQL_URI = { 'db': 'db', 'host': 'host', 'port': 3306, 'user': 'root', 'password': '123456' } # 多线程下载已有人pm有bug,调试中~ # 是否开启多线程, False, True OPEN_THREAD=False # 最大线程数 MAX_THREAD=10
13.909091
38
0.627451
__author__='https://cpp.la' MYSQL_URI = { 'db': 'db', 'host': 'host', 'port': 3306, 'user': 'root', 'password': '123456' } OPEN_THREAD=False MAX_THREAD=10
true
true
1c0008a2b45b17e68aa2831d3005cbd3421e9e1f
13,607
py
Python
blog/views.py
ervoramihir/social-media-app
e50838b53c0f1d8799a5d102d0baf3633fd6366a
[ "MIT" ]
null
null
null
blog/views.py
ervoramihir/social-media-app
e50838b53c0f1d8799a5d102d0baf3633fd6366a
[ "MIT" ]
null
null
null
blog/views.py
ervoramihir/social-media-app
e50838b53c0f1d8799a5d102d0baf3633fd6366a
[ "MIT" ]
null
null
null
from django.shortcuts import render, get_object_or_404, redirect from blog.models import Post, Comment, Preference from users.models import Follow, Profile import sys from django.contrib.auth.models import User from django.views.generic import ListView, DetailView, CreateView, UpdateView, DeleteView from django.contrib...
33.268949
131
0.577864
from django.shortcuts import render, get_object_or_404, redirect from blog.models import Post, Comment, Preference from users.models import Follow, Profile import sys from django.contrib.auth.models import User from django.views.generic import ListView, DetailView, CreateView, UpdateView, DeleteView from django.contrib...
true
true
1c0008e82ebe42d38a7ef768db41f176000f35b2
2,165
py
Python
froide/helper/search/__init__.py
manonthemat/froide
698c49935eaf2e922f3c9f6a46af0fd545ccbbbb
[ "MIT" ]
null
null
null
froide/helper/search/__init__.py
manonthemat/froide
698c49935eaf2e922f3c9f6a46af0fd545ccbbbb
[ "MIT" ]
null
null
null
froide/helper/search/__init__.py
manonthemat/froide
698c49935eaf2e922f3c9f6a46af0fd545ccbbbb
[ "MIT" ]
null
null
null
import importlib from django.conf import settings from elasticsearch_dsl import analyzer, tokenizer from django_elasticsearch_dsl import Index from .signal_processor import CelerySignalProcessor from .queryset import SearchQuerySetWrapper from .registry import search_registry __all__ = [ 'CelerySignalProcessor...
26.084337
88
0.664203
import importlib from django.conf import settings from elasticsearch_dsl import analyzer, tokenizer from django_elasticsearch_dsl import Index from .signal_processor import CelerySignalProcessor from .queryset import SearchQuerySetWrapper from .registry import search_registry __all__ = [ 'CelerySignalProcessor...
true
true
1c000917478558637dc61b4804852f6af46e66c7
1,015
py
Python
src/myutils/util.py
yyHaker/pytorch_template
a1aa7497adfb90f05e4747608ef79b4e214b9a18
[ "MIT" ]
1
2019-06-03T11:56:22.000Z
2019-06-03T11:56:22.000Z
src/myutils/util.py
yyHaker/pytorch_template
a1aa7497adfb90f05e4747608ef79b4e214b9a18
[ "MIT" ]
null
null
null
src/myutils/util.py
yyHaker/pytorch_template
a1aa7497adfb90f05e4747608ef79b4e214b9a18
[ "MIT" ]
null
null
null
#!/usr/bin/python # coding:utf-8 """ @author: yyhaker @contact: 572176750@qq.com @file: util.py @time: 2019/3/9 15:43 """ import json import os import spacy import jieba spacy_en = spacy.load('en') def tokenizer(text): return [tok.text for tok in spacy_en.tokenizer(text.strip())] def CN_tokenizer(text): ...
16.111111
65
0.6
import json import os import spacy import jieba spacy_en = spacy.load('en') def tokenizer(text): return [tok.text for tok in spacy_en.tokenizer(text.strip())] def CN_tokenizer(text): return list(jieba.cut(text)) def dumpObj(obj, file): with open(file, 'w') as f: json.dump(obj, f) def load...
true
true
1c0009c1bdc71881bed91d9117712a4e0c5ea81a
2,053
py
Python
errors.py
Osheah/PFORCS-problem-sheet
249988e2515377cb13c2b4cc6ece7b8108a41f4b
[ "Apache-2.0" ]
null
null
null
errors.py
Osheah/PFORCS-problem-sheet
249988e2515377cb13c2b4cc6ece7b8108a41f4b
[ "Apache-2.0" ]
null
null
null
errors.py
Osheah/PFORCS-problem-sheet
249988e2515377cb13c2b4cc6ece7b8108a41f4b
[ "Apache-2.0" ]
null
null
null
# an error controled function that takes in a list and index and returns the average upto and including the index paramater in the list. Use error control and meaningful logging. Test the code either in another moduele or in this module # helen o'shea # 20210325 import logging logging.basicConfig(level=logging.DEBUG) ...
27.373333
236
0.698003
# 20210325 import logging logging.basicConfig(level=logging.DEBUG) aList = [1, 2, 3, 4, 5, 90, 67, 38, 28, 41] toIndex = 10.5 # check if aList has valid content def checkList(aList): checkListVal = True for i in aList: if isinstance(i, str): print("The list contains a string and is invalid") chec...
true
true
1c0009ef69a73888aca27ddd0115593fe3b2446a
13,897
py
Python
acrylamid/helpers.py
farleykr/acrylamid
c6c0f60b594d2920f6387ba82b552093d7c5fe1b
[ "BSD-2-Clause-FreeBSD" ]
61
2015-01-15T23:23:11.000Z
2022-03-24T16:39:31.000Z
acrylamid/helpers.py
farleykr/acrylamid
c6c0f60b594d2920f6387ba82b552093d7c5fe1b
[ "BSD-2-Clause-FreeBSD" ]
28
2015-01-26T22:32:24.000Z
2022-01-13T01:11:56.000Z
acrylamid/helpers.py
farleykr/acrylamid
c6c0f60b594d2920f6387ba82b552093d7c5fe1b
[ "BSD-2-Clause-FreeBSD" ]
25
2015-01-22T19:26:29.000Z
2021-06-30T21:53:06.000Z
# -*- encoding: utf-8 -*- # # Copyright 2012 Martin Zimmermann <info@posativ.org>. All rights reserved. # License: BSD Style, 2 clauses -- see LICENSE. # # This module contains helper objects and function for writing third-party code. import sys import os import io import re import imp import shutil import itertools i...
30.882222
98
0.604447
import sys import os import io import re import imp import shutil import itertools import contextlib import subprocess from unicodedata import normalize from collections import defaultdict from os.path import join, dirname, isdir, isfile, commonprefix, normpath from acrylamid import log, compat, __file__ as PATH fro...
true
true
1c000a1977f36cb5e7a7c98f7d6ede76ecadd745
1,636
py
Python
supports/pyload/src/pyload/plugins/accounts/TenluaVn.py
LuckyNicky/pycrawler
4b3fe2f6e8e51f236d95a64a89a44199e4e97743
[ "Apache-2.0" ]
1
2020-04-02T17:03:39.000Z
2020-04-02T17:03:39.000Z
supports/pyload/src/pyload/plugins/accounts/TenluaVn.py
LuckyNicky/pycrawler
4b3fe2f6e8e51f236d95a64a89a44199e4e97743
[ "Apache-2.0" ]
null
null
null
supports/pyload/src/pyload/plugins/accounts/TenluaVn.py
LuckyNicky/pycrawler
4b3fe2f6e8e51f236d95a64a89a44199e4e97743
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import json import time from ...core.network.http.exceptions import BadHeader from ...core.network.request_factory import get_url from ..base.account import BaseAccount class TenluaVn(BaseAccount): __name__ = "TenluaVn" __type__ = "account" __version__ = "0.01" __status__ = "...
27.728814
81
0.579462
import json import time from ...core.network.http.exceptions import BadHeader from ...core.network.request_factory import get_url from ..base.account import BaseAccount class TenluaVn(BaseAccount): __name__ = "TenluaVn" __type__ = "account" __version__ = "0.01" __status__ = "testing" __pyload_v...
true
true
1c000a8ac231c4214861f5c51c360a5d07e6a717
1,233
py
Python
tests/unit/backend/corpora/common/entities/test_entity.py
isabella232/corpora-data-portal
09ed3cad3165f8b0db854b76404e0d5d0ea0b7d9
[ "MIT" ]
null
null
null
tests/unit/backend/corpora/common/entities/test_entity.py
isabella232/corpora-data-portal
09ed3cad3165f8b0db854b76404e0d5d0ea0b7d9
[ "MIT" ]
1
2021-02-23T22:56:13.000Z
2021-02-23T22:56:13.000Z
tests/unit/backend/corpora/common/entities/test_entity.py
isabella232/corpora-data-portal
09ed3cad3165f8b0db854b76404e0d5d0ea0b7d9
[ "MIT" ]
null
null
null
import unittest from backend.corpora.common.corpora_orm import DbDatasetProcessingStatus, UploadStatus from backend.corpora.common.entities.dataset import Entity class TestEntity(unittest.TestCase): def test__create_sub_object(self): test_params = {"row": {"upload_status": UploadStatus.WAITING}, "db_tabl...
45.666667
109
0.723439
import unittest from backend.corpora.common.corpora_orm import DbDatasetProcessingStatus, UploadStatus from backend.corpora.common.entities.dataset import Entity class TestEntity(unittest.TestCase): def test__create_sub_object(self): test_params = {"row": {"upload_status": UploadStatus.WAITING}, "db_tabl...
true
true
1c000b54029d5d18d77ed5b93abc49121ff055be
302
py
Python
run.py
alex-eri/pycertauth
204f4058987b910bdae23dd07c3196a0cd3a92a9
[ "MIT" ]
null
null
null
run.py
alex-eri/pycertauth
204f4058987b910bdae23dd07c3196a0cd3a92a9
[ "MIT" ]
null
null
null
run.py
alex-eri/pycertauth
204f4058987b910bdae23dd07c3196a0cd3a92a9
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- __author__ = 'RemiZOffAlex' __copyright__ = '(c) RemiZOffAlex' __license__ = 'MIT' __email__ = 'remizoffalex@mail.ru' __url__ = 'http://remizoffalex.ru' from pycertauth import app as application application.run(debug = True, host= '0.0.0.0', port=5000)
25.166667
57
0.711921
__author__ = 'RemiZOffAlex' __copyright__ = '(c) RemiZOffAlex' __license__ = 'MIT' __email__ = 'remizoffalex@mail.ru' __url__ = 'http://remizoffalex.ru' from pycertauth import app as application application.run(debug = True, host= '0.0.0.0', port=5000)
true
true
1c000f2eda08072c2803f731198191837a933364
3,511
py
Python
pytext/utils/tests/utils_test.py
donkeyfire/pytext
da9ca5886cbf708e95ab8df44e50a1e6a777b80b
[ "BSD-3-Clause" ]
1
2019-02-25T01:50:03.000Z
2019-02-25T01:50:03.000Z
pytext/utils/tests/utils_test.py
donkeyfire/pytext
da9ca5886cbf708e95ab8df44e50a1e6a777b80b
[ "BSD-3-Clause" ]
null
null
null
pytext/utils/tests/utils_test.py
donkeyfire/pytext
da9ca5886cbf708e95ab8df44e50a1e6a777b80b
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import json import unittest from pytext.utils import test_utils from pytext.utils.data_utils import align_slot_labels, unkify from pytext.utils.dist_utils import get_shard_range from pytext.utils.test_utils import import_tes...
33.438095
86
0.529764
import json import unittest from pytext.utils import test_utils from pytext.utils.data_utils import align_slot_labels, unkify from pytext.utils.dist_utils import get_shard_range from pytext.utils.test_utils import import_tests_module tests_module = import_tests_module() RAW_TEST_PATH = tests_module.test_file("test_...
true
true
1c000f3749137323e9c301c06a5bfe4c6ae78adb
2,862
py
Python
h/views/admin/search.py
Brahim109/h
6bd4b7e6feb941a75dacb4b34018f32b2e70dceb
[ "BSD-2-Clause" ]
null
null
null
h/views/admin/search.py
Brahim109/h
6bd4b7e6feb941a75dacb4b34018f32b2e70dceb
[ "BSD-2-Clause" ]
null
null
null
h/views/admin/search.py
Brahim109/h
6bd4b7e6feb941a75dacb4b34018f32b2e70dceb
[ "BSD-2-Clause" ]
null
null
null
from dateutil.parser import isoparse from pyramid.httpexceptions import HTTPFound from pyramid.view import view_config, view_defaults from h import models class NotFoundError(Exception): pass @view_config(context=NotFoundError) def not_found(exc, request): request.session.flash(str(exc), "error") retur...
32.896552
87
0.665968
from dateutil.parser import isoparse from pyramid.httpexceptions import HTTPFound from pyramid.view import view_config, view_defaults from h import models class NotFoundError(Exception): pass @view_config(context=NotFoundError) def not_found(exc, request): request.session.flash(str(exc), "error") retur...
true
true
1c000f9ad273ad4eb69c6266ca35addda880ec40
241
py
Python
tests/context.py
eldios/chrtme
c08ee09ad77854234e603cc1e979f5ba1f5d7473
[ "MIT" ]
null
null
null
tests/context.py
eldios/chrtme
c08ee09ad77854234e603cc1e979f5ba1f5d7473
[ "MIT" ]
null
null
null
tests/context.py
eldios/chrtme
c08ee09ad77854234e603cc1e979f5ba1f5d7473
[ "MIT" ]
null
null
null
"""Utility context for all tests""" import os, sys sys.path.insert(0, os.path.abspath(os.path.join('chrtme'))) # Please run the test in tests/../ (parent directory aka project main # directory) with make test import chrtme import chrtmed
24.1
70
0.73444
import os, sys sys.path.insert(0, os.path.abspath(os.path.join('chrtme'))) import chrtme import chrtmed
true
true
1c000fc4c366a314de1908cfaca6e943327f3660
6,447
py
Python
nssrc/com/citrix/netscaler/nitro/resource/config/network/nd6ravariables_onlinkipv6prefix_binding.py
benfinke/ns_python
d651d7aa01d7dc63c1cd435c7b3314d7f5b26659
[ "Apache-2.0" ]
1
2015-04-05T21:21:26.000Z
2015-04-05T21:21:26.000Z
nssrc/com/citrix/netscaler/nitro/resource/config/network/nd6ravariables_onlinkipv6prefix_binding.py
benfinke/ns_python
d651d7aa01d7dc63c1cd435c7b3314d7f5b26659
[ "Apache-2.0" ]
1
2017-01-20T22:56:58.000Z
2017-01-20T22:56:58.000Z
nssrc/com/citrix/netscaler/nitro/resource/config/network/nd6ravariables_onlinkipv6prefix_binding.py
benfinke/ns_python
d651d7aa01d7dc63c1cd435c7b3314d7f5b26659
[ "Apache-2.0" ]
6
2015-04-21T13:14:08.000Z
2020-12-03T07:27:52.000Z
# # Copyright (c) 2008-2015 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
31.758621
141
0.732434
from nssrc.com.citrix.netscaler.nitro.resource.base.base_resource import base_resource from nssrc.com.citrix.netscaler.nitro.resource.base.base_resource import base_response from nssrc.com.citrix.netscaler.nitro.service.options import options from nssrc.com.citrix.netscaler.nitro.exception.nitro_exception import nitro...
false
true
1c00105bfa3bbc11556953744247e8ce9956f3e2
1,608
py
Python
services/ingest-file/tests/test_tabular.py
aaronarnold2/aleph
1728f4db8863554d5b0722546838970e53ec72bd
[ "MIT" ]
2
2021-01-09T17:27:23.000Z
2021-01-09T17:27:25.000Z
services/ingest-file/tests/test_tabular.py
nabla-c0d3/aleph
d0e4e04e23cb7ee3971298e33ccb1c5171ae0779
[ "MIT" ]
null
null
null
services/ingest-file/tests/test_tabular.py
nabla-c0d3/aleph
d0e4e04e23cb7ee3971298e33ccb1c5171ae0779
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from .support import TestCase class TabularIngestorTest(TestCase): def test_simple_xlsx(self): fixture_path, entity = self.fixture("file.xlsx") self.manager.ingest(fixture_path, entity) self.assertEqual(entity.first("processingStatus"), self.manager.STATUS_SUCCESS) ...
43.459459
87
0.658582
from .support import TestCase class TabularIngestorTest(TestCase): def test_simple_xlsx(self): fixture_path, entity = self.fixture("file.xlsx") self.manager.ingest(fixture_path, entity) self.assertEqual(entity.first("processingStatus"), self.manager.STATUS_SUCCESS) self.assertEqual...
true
true
1c0010f2d125f3f6a1220be784153c54a4a93e55
14,713
py
Python
south_migrations/0008_auto__add_newsentrytranslation__add_unique_newsentrytranslation_langua.py
yoursantu/indiannewsplus
252f0367b43ec2edea636157bcf2d8a92dda6f3f
[ "MIT" ]
null
null
null
south_migrations/0008_auto__add_newsentrytranslation__add_unique_newsentrytranslation_langua.py
yoursantu/indiannewsplus
252f0367b43ec2edea636157bcf2d8a92dda6f3f
[ "MIT" ]
null
null
null
south_migrations/0008_auto__add_newsentrytranslation__add_unique_newsentrytranslation_langua.py
yoursantu/indiannewsplus
252f0367b43ec2edea636157bcf2d8a92dda6f3f
[ "MIT" ]
null
null
null
# flake8: noqa # -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'NewsEntryTranslation' db.create_table(u'multilingual_news_newsentry_translati...
82.657303
192
0.581798
import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): db.create_table(u'multilingual_news_newsentry_translation', ( (u'id', self.gf('django.db.models.fields.AutoField')(prima...
true
true
1c00133444dd21043a595d8d31ce2db5dd022dd7
5,494
py
Python
lib/setup.py
krohitm/Faster-RCNN_TF-1
fb5edac39a85b8c2b805319a739bf2375847abb2
[ "MIT" ]
null
null
null
lib/setup.py
krohitm/Faster-RCNN_TF-1
fb5edac39a85b8c2b805319a739bf2375847abb2
[ "MIT" ]
null
null
null
lib/setup.py
krohitm/Faster-RCNN_TF-1
fb5edac39a85b8c2b805319a739bf2375847abb2
[ "MIT" ]
null
null
null
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- import os from os.path import join as pjoin import numpy as np from dis...
35.217949
91
0.612304
import os from os.path import join as pjoin import numpy as np from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext def find_in_path(name, path): "Find a file in a search path" for dir in path.split(os.pathsep): binpath = pjoin(dir, name...
false
true
1c0013902d88d6ff2d4d240487680e3d2e0b0c92
144,771
py
Python
ross/results.py
marcusfilipesr/ross
e00bc10e694ecaf82ee24af82f649da7458fc91d
[ "MIT" ]
1
2021-07-20T04:24:19.000Z
2021-07-20T04:24:19.000Z
ross/results.py
marcusfilipesr/ross
e00bc10e694ecaf82ee24af82f649da7458fc91d
[ "MIT" ]
null
null
null
ross/results.py
marcusfilipesr/ross
e00bc10e694ecaf82ee24af82f649da7458fc91d
[ "MIT" ]
null
null
null
"""ROSS plotting module. This module returns graphs for each type of analyses in rotor_assembly.py. """ import copy import inspect from abc import ABC from collections.abc import Iterable from pathlib import Path import numpy as np import pandas as pd import toml from plotly import graph_objects as go from plotly.sub...
33.777648
180
0.518875
import copy import inspect from abc import ABC from collections.abc import Iterable from pathlib import Path import numpy as np import pandas as pd import toml from plotly import graph_objects as go from plotly.subplots import make_subplots from scipy import linalg as la from ross.plotly_theme import tableau_colors f...
true
true
1c0014e26c67b0a617d4b367812b7a301c8bf53e
3,385
py
Python
L1Trigger/L1TNtuples/python/l1Tree_cfi.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
L1Trigger/L1TNtuples/python/l1Tree_cfi.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
L1Trigger/L1TNtuples/python/l1Tree_cfi.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
import FWCore.ParameterSet.Config as cms l1Tree = cms.EDAnalyzer("L1NtupleProducer", verbose = cms.untracked.bool(False), physVal = cms.bool(True), generatorSource = cms.InputTag("none"), simulationSource = cms.InputTag("none"), hltSource = cms.InputTa...
48.357143
155
0.569572
import FWCore.ParameterSet.Config as cms l1Tree = cms.EDAnalyzer("L1NtupleProducer", verbose = cms.untracked.bool(False), physVal = cms.bool(True), generatorSource = cms.InputTag("none"), simulationSource = cms.InputTag("none"), hltSource = cms.InputTa...
true
true
1c001541aac8150cff0aa147dd55dab29535f35d
81,214
py
Python
vumi/components/tests/test_message_store.py
seidu626/vumi
62eae205a07029bc7ab382086715694548001876
[ "BSD-3-Clause" ]
199
2015-01-05T09:04:24.000Z
2018-08-15T17:02:49.000Z
vumi/components/tests/test_message_store.py
seidu626/vumi
62eae205a07029bc7ab382086715694548001876
[ "BSD-3-Clause" ]
187
2015-01-06T15:22:38.000Z
2018-07-14T13:15:29.000Z
vumi/components/tests/test_message_store.py
seidu626/vumi
62eae205a07029bc7ab382086715694548001876
[ "BSD-3-Clause" ]
86
2015-01-31T02:47:08.000Z
2018-12-01T11:59:47.000Z
# -*- coding: utf-8 -*- """Tests for vumi.components.message_store.""" import time from datetime import datetime, timedelta from twisted.internet.defer import inlineCallbacks, returnValue from vumi.message import TransportEvent, format_vumi_date from vumi.tests.helpers import ( VumiTestCase, MessageHelper, Persi...
42.498168
79
0.649913
"""Tests for vumi.components.message_store.""" import time from datetime import datetime, timedelta from twisted.internet.defer import inlineCallbacks, returnValue from vumi.message import TransportEvent, format_vumi_date from vumi.tests.helpers import ( VumiTestCase, MessageHelper, PersistenceHelper, import_ski...
false
true
1c0015cf2561c8cdc7bfc537b24045e84d16e3cd
468
py
Python
ivy/functional/backends/mxnet/old/reductions.py
saurbhc/ivy
20b327b4fab543b26ad5a18acf4deddd6e3c804b
[ "Apache-2.0" ]
null
null
null
ivy/functional/backends/mxnet/old/reductions.py
saurbhc/ivy
20b327b4fab543b26ad5a18acf4deddd6e3c804b
[ "Apache-2.0" ]
1
2022-03-08T13:29:20.000Z
2022-03-08T13:29:20.000Z
ivy/functional/backends/mxnet/old/reductions.py
saurbhc/ivy
20b327b4fab543b26ad5a18acf4deddd6e3c804b
[ "Apache-2.0" ]
null
null
null
""" Collection of MXNet reduction functions, wrapped to fit Ivy syntax and signature. """ # global import mxnet as _mx from numbers import Number # local from ivy.functional.backends.mxnet import _flat_array_to_1_dim_array, _1_dim_array_to_flat_array def _handle_output(x, axis, keepdims, ret): if not keepdims a...
27.529412
106
0.75641
import mxnet as _mx from numbers import Number from ivy.functional.backends.mxnet import _flat_array_to_1_dim_array, _1_dim_array_to_flat_array def _handle_output(x, axis, keepdims, ret): if not keepdims and (axis is None or len((axis,) if isinstance(axis, int) else axis) == len(x.shape)): return _1_dim...
true
true
1c00160cedb1ae8035e422255be4b0dda577d611
7,949
py
Python
App/Method Reporter.py
tanukifont/Glyphs-Scripts-1
f21a3a82ae58416e672b30bc1f788d4c1bab996f
[ "Apache-2.0" ]
null
null
null
App/Method Reporter.py
tanukifont/Glyphs-Scripts-1
f21a3a82ae58416e672b30bc1f788d4c1bab996f
[ "Apache-2.0" ]
null
null
null
App/Method Reporter.py
tanukifont/Glyphs-Scripts-1
f21a3a82ae58416e672b30bc1f788d4c1bab996f
[ "Apache-2.0" ]
null
null
null
#MenuTitle: Method Reporter # -*- coding: utf-8 -*- from __future__ import division, print_function, unicode_literals __doc__=""" Searches in PyObjC method names of a chosen object. """ import vanilla from AppKit import NSPasteboard, NSStringPboardType, NSUserDefaults from pydoc import help import AppKit, Foundation ...
29.550186
217
0.693169
from __future__ import division, print_function, unicode_literals __doc__=""" Searches in PyObjC method names of a chosen object. """ import vanilla from AppKit import NSPasteboard, NSStringPboardType, NSUserDefaults from pydoc import help import AppKit, Foundation def setClipboard( myText ): try: myClipboard = NS...
true
true
1c0016206187b93c6543af2988aa23fddca7c62b
13,579
py
Python
snake.py
EdwardYGLi/snake_RL
210f552faca380c054fb5310b6c61ea2b1dfadcc
[ "MIT" ]
null
null
null
snake.py
EdwardYGLi/snake_RL
210f552faca380c054fb5310b6c61ea2b1dfadcc
[ "MIT" ]
null
null
null
snake.py
EdwardYGLi/snake_RL
210f552faca380c054fb5310b6c61ea2b1dfadcc
[ "MIT" ]
null
null
null
""" Created by Edward Li at 10/6/20 followed game code from https://github.com/maurock/snake-ga """ import argparse import random import sys from collections import deque import itertools import numpy as np import pygame def update_screen(): pygame.display.update() def display(player, food, game, record): ...
36.114362
184
0.568378
import argparse import random import sys from collections import deque import itertools import numpy as np import pygame def update_screen(): pygame.display.update() def display(player, food, game, record): game.game_display.fill((255, 255, 255)) display_ui(game, game.score, record) player.display...
true
true
1c00173ec19b398d1502ca5d6beb3b9f71f6c82b
15,325
py
Python
tests/v1_1/test_shell.py
dreamhost/python-novaclient
cb9a7a37a86688de59bf654e93266fcef96bd42b
[ "Apache-1.1" ]
null
null
null
tests/v1_1/test_shell.py
dreamhost/python-novaclient
cb9a7a37a86688de59bf654e93266fcef96bd42b
[ "Apache-1.1" ]
null
null
null
tests/v1_1/test_shell.py
dreamhost/python-novaclient
cb9a7a37a86688de59bf654e93266fcef96bd42b
[ "Apache-1.1" ]
null
null
null
# Copyright 2010 Jacob Kaplan-Moss # Copyright 2011 OpenStack LLC. # 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/...
39.497423
79
0.581077
import os import mock import sys import tempfile import novaclient.shell import novaclient.client from novaclient import exceptions from tests.v1_1 import fakes from tests import utils class ShellTest(utils.TestCase): def setUp(self): self.old_environment = os.environ.copy() os.environ = {...
true
true
1c001829596b32d7e77a05a46c8c81208c329566
5,688
py
Python
xnmt/transducers/positional.py
neulab/xnmt
d93f8f3710f986f36eb54e9ff3976a6b683da2a4
[ "Apache-2.0" ]
195
2017-05-27T11:23:40.000Z
2021-09-28T06:03:24.000Z
xnmt/transducers/positional.py
neulab/xnmt
d93f8f3710f986f36eb54e9ff3976a6b683da2a4
[ "Apache-2.0" ]
386
2017-05-25T23:22:19.000Z
2020-05-03T13:57:28.000Z
xnmt/transducers/positional.py
neulab/xnmt
d93f8f3710f986f36eb54e9ff3976a6b683da2a4
[ "Apache-2.0" ]
53
2017-05-23T17:45:18.000Z
2021-04-18T12:36:37.000Z
from typing import List import numbers import xnmt import xnmt.tensor_tools as tt from xnmt import events, expression_seqs, param_collections, param_initializers from xnmt.transducers import base as transducers from xnmt.persistence import serializable_init, Serializable, bare, Ref if xnmt.backend_dynet: import dyn...
43.419847
148
0.72064
from typing import List import numbers import xnmt import xnmt.tensor_tools as tt from xnmt import events, expression_seqs, param_collections, param_initializers from xnmt.transducers import base as transducers from xnmt.persistence import serializable_init, Serializable, bare, Ref if xnmt.backend_dynet: import dyn...
true
true