hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 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
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f7ff328cc447391f30177e62770d32ee32c9f380
2,545
py
Python
pacifique/views.py
rogeruwayezu/pacifique_IO
4e8216a945336f03fac4c97f1dc4868460d96b0a
[ "MIT" ]
null
null
null
pacifique/views.py
rogeruwayezu/pacifique_IO
4e8216a945336f03fac4c97f1dc4868460d96b0a
[ "MIT" ]
8
2020-03-16T07:43:58.000Z
2022-02-10T13:59:41.000Z
pacifique/views.py
rogeruwayezu/pacifique_IO
4e8216a945336f03fac4c97f1dc4868460d96b0a
[ "MIT" ]
null
null
null
from django.http import HttpResponse, Http404, HttpResponseRedirect from django.shortcuts import render, redirect from django.contrib.auth.decorators import login_required from .forms import NewArticleForm, UpdateArticleForm from .models import Article # pagination from django.core.paginator import Paginator # Create...
34.863014
107
0.675835
from django.http import HttpResponse, Http404, HttpResponseRedirect from django.shortcuts import render, redirect from django.contrib.auth.decorators import login_required from .forms import NewArticleForm, UpdateArticleForm from .models import Article from django.core.paginator import Paginator def home(request): ...
true
true
f7ff33a3db450085d2673e8f5977ed1eac9524d3
821
py
Python
tools/exportcsv/headers.py
DaleProctor/tscharts
5447395e0aef0b949bef8426febdec2093cf37ef
[ "Apache-2.0" ]
null
null
null
tools/exportcsv/headers.py
DaleProctor/tscharts
5447395e0aef0b949bef8426febdec2093cf37ef
[ "Apache-2.0" ]
null
null
null
tools/exportcsv/headers.py
DaleProctor/tscharts
5447395e0aef0b949bef8426febdec2093cf37ef
[ "Apache-2.0" ]
null
null
null
#(C) Copyright Syd Logan 2021 #(C) Copyright Thousand Smiles Foundation 2021 # #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...
29.321429
73
0.706456
import sys lines = tuple(open(sys.argv[1], 'r')) count = 0 ret = "" for x in lines[1:]: f = x.split('\t') ret += f[0] if count < len(lines) - 2: ret += ',' count = count + 1 print(ret)
true
true
f7ff33ba39f9a3e937cd41911d9c139c1e6e035d
1,530
py
Python
core/providers/soundcloud.py
telegrambotdev/music-share-bot
59dc8592da45186b237505093b229b01c1cd2e4c
[ "MIT" ]
13
2019-03-18T11:39:20.000Z
2021-01-07T13:15:42.000Z
core/providers/soundcloud.py
telegrambotdev/music-share-bot
59dc8592da45186b237505093b229b01c1cd2e4c
[ "MIT" ]
24
2019-03-18T10:45:51.000Z
2021-12-13T20:27:03.000Z
core/providers/soundcloud.py
telegrambotdev/music-share-bot
59dc8592da45186b237505093b229b01c1cd2e4c
[ "MIT" ]
7
2019-03-17T11:21:14.000Z
2020-06-03T19:10:25.000Z
import os import requests from bs4 import BeautifulSoup from core.providers.base import MusicProvider SOUNDCLOUD_CLIENT_ID = os.environ.get('SOUNDCLOUD_CLIENT_ID') class SoundCloud(MusicProvider): NAME = 'SoundCloud' _MUSIC_URL = 'https://soundcloud.com/{}/{}' def get_music_name(self, url): so...
28.867925
74
0.607843
import os import requests from bs4 import BeautifulSoup from core.providers.base import MusicProvider SOUNDCLOUD_CLIENT_ID = os.environ.get('SOUNDCLOUD_CLIENT_ID') class SoundCloud(MusicProvider): NAME = 'SoundCloud' _MUSIC_URL = 'https://soundcloud.com/{}/{}' def get_music_name(self, url): so...
true
true
f7ff34d3862feee34e87b39ce28ebbe7138da441
1,992
py
Python
tests/test_basic_events.py
uzsolt/herbstluftwm
49b6dcad50452d79783576236df2ce670672c10a
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
tests/test_basic_events.py
uzsolt/herbstluftwm
49b6dcad50452d79783576236df2ce670672c10a
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
tests/test_basic_events.py
uzsolt/herbstluftwm
49b6dcad50452d79783576236df2ce670672c10a
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
import pytest import test_stack @pytest.mark.parametrize("single_floating", [True, False]) @pytest.mark.parametrize("raise_on_click", [True, False]) def test_focus_on_click(hlwm, mouse, raise_on_click, single_floating): if single_floating: hlwm.call('rule floating=on') else: hlwm.call('set_att...
37.584906
80
0.692269
import pytest import test_stack @pytest.mark.parametrize("single_floating", [True, False]) @pytest.mark.parametrize("raise_on_click", [True, False]) def test_focus_on_click(hlwm, mouse, raise_on_click, single_floating): if single_floating: hlwm.call('rule floating=on') else: hlwm.call('set_att...
true
true
f7ff357bc7e3caa029e96d1817df3cd7eb4be03d
979
py
Python
pretix_sepadebit/migrations/0001_initial.py
chr-chr/pretix-sepadebit
153871261c34b8ec560a101c69a1b17dcb66a5c4
[ "Apache-2.0" ]
6
2017-04-09T17:08:18.000Z
2019-03-15T14:01:23.000Z
pretix_sepadebit/migrations/0001_initial.py
chr-chr/pretix-sepadebit
153871261c34b8ec560a101c69a1b17dcb66a5c4
[ "Apache-2.0" ]
7
2019-03-12T06:07:50.000Z
2022-02-23T08:17:01.000Z
pretix_sepadebit/migrations/0001_initial.py
chr-chr/pretix-sepadebit
153871261c34b8ec560a101c69a1b17dcb66a5c4
[ "Apache-2.0" ]
7
2017-07-15T23:52:10.000Z
2021-11-15T15:44:42.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-01-21 11:45 from __future__ import unicode_literals import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('pretixbase', '0051_auto_20170206_2027_s...
33.758621
142
0.638407
from __future__ import unicode_literals import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('pretixbase', '0051_auto_20170206_2027_squashed_0057_auto_20170501_2116'), ] operations = [ mi...
true
true
f7ff36fbfcf6357bd7adba2d00deac677e3704ae
866
py
Python
src/heap/max_heapify.py
dmvieira/algs
bf88d026ecf7210f0a1d601b36d7fc82364bd46f
[ "Apache-2.0" ]
null
null
null
src/heap/max_heapify.py
dmvieira/algs
bf88d026ecf7210f0a1d601b36d7fc82364bd46f
[ "Apache-2.0" ]
null
null
null
src/heap/max_heapify.py
dmvieira/algs
bf88d026ecf7210f0a1d601b36d7fc82364bd46f
[ "Apache-2.0" ]
null
null
null
import math class MaxHeapify(object): def __init__(self, array): self.array = array def build(self): array = self.array size = len(array) for key in reversed(range(math.ceil(size/2))): self.max(array, key) return array def max(self, array=None,...
26.242424
58
0.52194
import math class MaxHeapify(object): def __init__(self, array): self.array = array def build(self): array = self.array size = len(array) for key in reversed(range(math.ceil(size/2))): self.max(array, key) return array def max(self, array=None,...
true
true
f7ff37edbf2d3c1d03287b98a1a98c0895c4ca75
70
py
Python
reptify/elements/__init__.py
YunisDEV/reptilia
3bb025177df9847f86290665476604dd4c4e49ad
[ "MIT" ]
null
null
null
reptify/elements/__init__.py
YunisDEV/reptilia
3bb025177df9847f86290665476604dd4c4e49ad
[ "MIT" ]
null
null
null
reptify/elements/__init__.py
YunisDEV/reptilia
3bb025177df9847f86290665476604dd4c4e49ad
[ "MIT" ]
null
null
null
from .elements import ( ElementSet, Element as ElementBase )
14
26
0.685714
from .elements import ( ElementSet, Element as ElementBase )
true
true
f7ff3a0add55da8d068e7d4a0aa94888934f9da6
605
py
Python
src/bio2bel_pfam/constants.py
bio2bel/pfam
2e18037aa12986f27458a12cc703b21f0786d3f5
[ "MIT" ]
null
null
null
src/bio2bel_pfam/constants.py
bio2bel/pfam
2e18037aa12986f27458a12cc703b21f0786d3f5
[ "MIT" ]
null
null
null
src/bio2bel_pfam/constants.py
bio2bel/pfam
2e18037aa12986f27458a12cc703b21f0786d3f5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Constants for Bio2BEL PFAM.""" import os from bio2bel import get_data_dir __all__ = [ 'VERSION', 'MODULE_NAME', 'DATA_DIR', 'CLAN_MAPPING_URL', 'CLAN_MAPPING_PATH', 'CLAN_MAPPING_HEADER', ] VERSION = '0.0.2-dev' MODULE_NAME = 'pfam' DATA_DIR = get_data_dir(MODULE_...
19.516129
95
0.67438
import os from bio2bel import get_data_dir __all__ = [ 'VERSION', 'MODULE_NAME', 'DATA_DIR', 'CLAN_MAPPING_URL', 'CLAN_MAPPING_PATH', 'CLAN_MAPPING_HEADER', ] VERSION = '0.0.2-dev' MODULE_NAME = 'pfam' DATA_DIR = get_data_dir(MODULE_NAME) CLAN_MAPPING_URL = 'ftp://ftp.ebi.ac.uk/pub/databa...
true
true
f7ff3ad1e775a08088997f217dbf9edf54e805cf
14,999
py
Python
Python/TBot_Joystick_Python_PYBLUEZ/Controller.py
garethnisbet/T-BOTS
70e211191cc6c713084836bff89241e811667378
[ "Apache-2.0" ]
20
2018-07-16T21:34:35.000Z
2022-01-07T02:33:10.000Z
Python/TBot_Joystick_Python_PYBLUEZ/Controller.py
garethnisbet/T-BOTS
70e211191cc6c713084836bff89241e811667378
[ "Apache-2.0" ]
5
2018-07-02T23:00:36.000Z
2020-01-23T17:38:32.000Z
Python/TBot_Joystick_Python_PYBLUEZ/Controller.py
garethnisbet/T-BOTS
70e211191cc6c713084836bff89241e811667378
[ "Apache-2.0" ]
10
2018-05-15T10:38:40.000Z
2021-06-03T07:07:21.000Z
import pygame, sys, pygame.mixer from pygame.locals import * import socket from time import sleep, time import bluetooth as bt print('-----------------------------------------------------------------') print('Controls:\nClick and drag joystick to drive the T-Bot\nUse up, down, left, right arrow keys to drive the T-Bot\...
29.70099
272
0.507634
import pygame, sys, pygame.mixer from pygame.locals import * import socket from time import sleep, time import bluetooth as bt print('-----------------------------------------------------------------') print('Controls:\nClick and drag joystick to drive the T-Bot\nUse up, down, left, right arrow keys to drive the T-Bot\...
true
true
f7ff3b6a8dd96df33a192fea0c09b1099b7f0769
3,645
py
Python
tests/test_resource/test_mysql.py
roganov/local-data-api
2c58206f0221c913521778c627ed2bdbff11d274
[ "MIT" ]
102
2019-06-15T19:32:20.000Z
2022-03-25T18:39:07.000Z
tests/test_resource/test_mysql.py
roganov/local-data-api
2c58206f0221c913521778c627ed2bdbff11d274
[ "MIT" ]
176
2019-06-16T05:57:29.000Z
2022-03-28T01:26:16.000Z
tests/test_resource/test_mysql.py
healthpraxone/local-data-api
7f81daee9e80958c082d8d4ebbe767dbfecb2544
[ "MIT" ]
20
2019-10-30T09:02:20.000Z
2022-01-14T09:07:26.000Z
from __future__ import annotations import pytest from local_data_api.models import ColumnMetadata, ExecuteStatementResponse, Field from local_data_api.resources import MySQL from local_data_api.resources.resource import CONNECTION_POOL, RESOURCE_METAS from tests.test_resource.test_resource import helper_default_test_...
31.695652
82
0.588477
from __future__ import annotations import pytest from local_data_api.models import ColumnMetadata, ExecuteStatementResponse, Field from local_data_api.resources import MySQL from local_data_api.resources.resource import CONNECTION_POOL, RESOURCE_METAS from tests.test_resource.test_resource import helper_default_test_...
true
true
f7ff3c71fd5dd77a6b787423e569e08d641c51b4
15,360
py
Python
api/app/registrationResponse/tests.py
cclauss/Baobab
e7aad3a63237be5f16e6441b89b3cc708ec19acd
[ "Apache-2.0" ]
null
null
null
api/app/registrationResponse/tests.py
cclauss/Baobab
e7aad3a63237be5f16e6441b89b3cc708ec19acd
[ "Apache-2.0" ]
null
null
null
api/app/registrationResponse/tests.py
cclauss/Baobab
e7aad3a63237be5f16e6441b89b3cc708ec19acd
[ "Apache-2.0" ]
null
null
null
from app.registration.models import RegistrationForm, Registration from app.registration.models import RegistrationSection import json from datetime import datetime, timedelta from app.utils.testing import ApiTestCase from app.users.models import AppUser, UserCategory, Country from app.events.models import Event from a...
39.083969
120
0.544596
from app.registration.models import RegistrationForm, Registration from app.registration.models import RegistrationSection import json from datetime import datetime, timedelta from app.utils.testing import ApiTestCase from app.users.models import AppUser, UserCategory, Country from app.events.models import Event from a...
true
true
f7ff3ca0c18cb91c08e9be2931bae83818bf7916
3,768
py
Python
test/unit/helper/test_helper.py
hanneshauer/python-client
e5909ed4e364d0c980f80e48b3af4acf77bff08e
[ "Apache-2.0" ]
null
null
null
test/unit/helper/test_helper.py
hanneshauer/python-client
e5909ed4e364d0c980f80e48b3af4acf77bff08e
[ "Apache-2.0" ]
null
null
null
test/unit/helper/test_helper.py
hanneshauer/python-client
e5909ed4e364d0c980f80e48b3af4acf77bff08e
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software...
28.330827
82
0.556263
import json import httpretty from appium import webdriver SERVER_URL_BASE = 'http://localhost:4723/wd/hub' def appium_command(command): return '{}{}'.format(SERVER_URL_BASE, command) def android_w3c_driver(): response_body_json = json.dumps( { 'value': { ...
true
true
f7ff3d1735d45ed7e644e15938bd9ea707708e6f
5,895
py
Python
app/connector.py
EgorkA82/Signalerator
f501dbb9400754a04f85e1be438719cb8d11ad5f
[ "MIT" ]
null
null
null
app/connector.py
EgorkA82/Signalerator
f501dbb9400754a04f85e1be438719cb8d11ad5f
[ "MIT" ]
null
null
null
app/connector.py
EgorkA82/Signalerator
f501dbb9400754a04f85e1be438719cb8d11ad5f
[ "MIT" ]
null
null
null
from PyQt5.QtCore import QIODevice from PyQt5.QtWidgets import QComboBox from PyQt5 import QtSerialPort from thread import Thread from worker import Worker from ui_controller import Ui_Controller class Connector(): def __init__(self, ui_controller: Ui_Controller) -> None: # инициализируем объект self.con...
63.387097
183
0.723325
from PyQt5.QtCore import QIODevice from PyQt5.QtWidgets import QComboBox from PyQt5 import QtSerialPort from thread import Thread from worker import Worker from ui_controller import Ui_Controller class Connector(): def __init__(self, ui_controller: Ui_Controller) -> None: self.connected: bool = False ...
true
true
f7ff3e6ac2c23c4925998fed2103c622f16abdf1
1,122
py
Python
kubernetes/test/test_v1beta1_json_schema_props_or_string_array.py
jashandeep-sohi/kubernetes-python
e057f273069de445a2d5a250ac5fe37d79671f3b
[ "Apache-2.0" ]
1
2020-05-08T12:41:04.000Z
2020-05-08T12:41:04.000Z
kubernetes/test/test_v1beta1_json_schema_props_or_string_array.py
jashandeep-sohi/kubernetes-python
e057f273069de445a2d5a250ac5fe37d79671f3b
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_v1beta1_json_schema_props_or_string_array.py
jashandeep-sohi/kubernetes-python
e057f273069de445a2d5a250ac5fe37d79671f3b
[ "Apache-2.0" ]
2
2021-07-09T08:49:05.000Z
2021-08-03T18:08:36.000Z
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.10.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys i...
24.933333
121
0.750446
from __future__ import absolute_import import os import sys import unittest import kubernetes.client from kubernetes.client.rest import ApiException from kubernetes.client.models.v1beta1_json_schema_props_or_string_array import V1beta1JSONSchemaPropsOrStringArray class TestV1beta1JSONSchemaPropsOrStringArray(un...
true
true
f7ff40333fd08c8dd162f30b46d3b2e9b92cf3ad
6,640
py
Python
bc81asmc/bc81asmc_grammar.py
bcichonski/bc16
4fc19735b5d4c0cdd3e97fb3c1a4a76004398d27
[ "MIT" ]
null
null
null
bc81asmc/bc81asmc_grammar.py
bcichonski/bc16
4fc19735b5d4c0cdd3e97fb3c1a4a76004398d27
[ "MIT" ]
null
null
null
bc81asmc/bc81asmc_grammar.py
bcichonski/bc16
4fc19735b5d4c0cdd3e97fb3c1a4a76004398d27
[ "MIT" ]
null
null
null
from parsy import regex, Parser, string, seq, letter, digit from bc81asmc_ast import * hexstr2int = lambda x: int(x, 16) comment = regex(r';[^\r\n]*').desc('comment') whitespace = regex(r'[ \t]').desc('whitespace') whitespaces = regex(r'[ \t]*').desc('whitespaces') ignore = whitespaces sep = whitespace.at_least(1) nl ...
26.882591
142
0.578163
from parsy import regex, Parser, string, seq, letter, digit from bc81asmc_ast import * hexstr2int = lambda x: int(x, 16) comment = regex(r';[^\r\n]*').desc('comment') whitespace = regex(r'[ \t]').desc('whitespace') whitespaces = regex(r'[ \t]*').desc('whitespaces') ignore = whitespaces sep = whitespace.at_least(1) nl ...
true
true
f7ff40a2f77b4d301dd03bef5daa9c5977b0a75f
3,739
py
Python
generated-libraries/python/netapp/ses/shelf_bay_port_info.py
radekg/netapp-ontap-lib-get
6445ebb071ec147ea82a486fbe9f094c56c5c40d
[ "MIT" ]
2
2017-03-28T15:31:26.000Z
2018-08-16T22:15:18.000Z
generated-libraries/python/netapp/ses/shelf_bay_port_info.py
radekg/netapp-ontap-lib-get
6445ebb071ec147ea82a486fbe9f094c56c5c40d
[ "MIT" ]
null
null
null
generated-libraries/python/netapp/ses/shelf_bay_port_info.py
radekg/netapp-ontap-lib-get
6445ebb071ec147ea82a486fbe9f094c56c5c40d
[ "MIT" ]
null
null
null
from netapp.netapp_object import NetAppObject class ShelfBayPortInfo(NetAppObject): """ Shelf bay port specific information. """ _disk_name = None @property def disk_name(self): """ if port-designator is "disk_bay" and there is a disk installed in the bay, then this...
32.513043
97
0.561113
from netapp.netapp_object import NetAppObject class ShelfBayPortInfo(NetAppObject): _disk_name = None @property def disk_name(self): return self._disk_name @disk_name.setter def disk_name(self, val): if val != None: self.validate('disk_name', val) self._disk...
true
true
f7ff43737a58c3099b07e301a3a7eb95e4ae8cc4
2,621
py
Python
pyfos/utils/zoning/zoning_cfg_show.py
sandeepv451/Pyfostest
e2c64bcb826b5aaf870c5adc9791a8c3a0fa21fa
[ "Apache-2.0" ]
null
null
null
pyfos/utils/zoning/zoning_cfg_show.py
sandeepv451/Pyfostest
e2c64bcb826b5aaf870c5adc9791a8c3a0fa21fa
[ "Apache-2.0" ]
null
null
null
pyfos/utils/zoning/zoning_cfg_show.py
sandeepv451/Pyfostest
e2c64bcb826b5aaf870c5adc9791a8c3a0fa21fa
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # Copyright 2018 Brocade Communications Systems 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 also obtain a copy of the License at # http://www.apache.org/licenses/LICENS...
30.476744
83
0.675315
import pyfos.pyfos_auth as pyfos_auth import pyfos.pyfos_brocade_zone as pyfos_zone import pyfos.pyfos_util as pyfos_util import sys import pyfos.utils.brcd_util as brcd_util def usage(): print("") def main(argv): valid_options = [] inputs = brcd_util.generic_input(argv, usage, valid_opt...
true
true
f7ff43b052bd154c29a95c60bd148c6bf8bf0a10
1,440
py
Python
project/reports/global_warming/myutils.py
vinceHardy/learning
941e5979d471567411e7593c36617ef4a8e47f70
[ "MIT" ]
1
2019-11-05T06:17:40.000Z
2019-11-05T06:17:40.000Z
project/reports/global_warming/myutils.py
johnqoe/ntds_2016
2c207029e7c93807fe57b0a4ae098c8afe38a661
[ "MIT" ]
null
null
null
project/reports/global_warming/myutils.py
johnqoe/ntds_2016
2c207029e7c93807fe57b0a4ae098c8afe38a661
[ "MIT" ]
null
null
null
import pandas as pd import os.path import matplotlib.pyplot as plt def makeTimeSeries(df): ts = pd.to_datetime(df.dt) df.index = ts return df.drop('dt', axis=1) def differenciate(X): diff = list() for i in range(1, len(X)): value = X[i] - X[i - 1] diff.append(value) X_diff=pd.D...
32.727273
116
0.665972
import pandas as pd import os.path import matplotlib.pyplot as plt def makeTimeSeries(df): ts = pd.to_datetime(df.dt) df.index = ts return df.drop('dt', axis=1) def differenciate(X): diff = list() for i in range(1, len(X)): value = X[i] - X[i - 1] diff.append(value) X_diff=pd.D...
true
true
f7ff4421e76f3ecb984ac90dadab9ff91e452bf2
521
py
Python
env/lib/python3.8/site-packages/plotly/validators/scattercarpet/_visible.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
76
2020-07-06T14:44:05.000Z
2022-02-14T15:30:21.000Z
env/lib/python3.8/site-packages/plotly/validators/scattercarpet/_visible.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
11
2020-08-09T02:30:14.000Z
2022-03-12T00:50:14.000Z
env/lib/python3.8/site-packages/plotly/validators/scattercarpet/_visible.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
11
2020-07-12T16:18:07.000Z
2022-02-05T16:48:35.000Z
import _plotly_utils.basevalidators class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="scattercarpet", **kwargs): super(VisibleValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
37.214286
85
0.648752
import _plotly_utils.basevalidators class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="scattercarpet", **kwargs): super(VisibleValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
true
true
f7ff4740953c7f9a66ab8e918dcccc71a45b7c86
6,016
py
Python
kubernetes_asyncio/client/models/v1_label_selector_requirement.py
playground-julia/kubernetes_asyncio
91b2c41eedd282d9ebc059377fb7f207e220133d
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/client/models/v1_label_selector_requirement.py
playground-julia/kubernetes_asyncio
91b2c41eedd282d9ebc059377fb7f207e220133d
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/client/models/v1_label_selector_requirement.py
playground-julia/kubernetes_asyncio
91b2c41eedd282d9ebc059377fb7f207e220133d
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1.15.9 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six fr...
33.237569
256
0.61619
import pprint import re import six from kubernetes_asyncio.client.configuration import Configuration class V1LabelSelectorRequirement(object): openapi_types = { 'key': 'str', 'operator': 'str', 'values': 'list[str]' } attribute_map = { 'key': 'key', 'opera...
true
true
f7ff477a25d2d3bc9a7eecc404b131aa705c6e0d
3,576
py
Python
test/ext_tests/test_gasplummer.py
joshuawall/amuse
c2034074ee76c08057c4faa96c32044ab40952e9
[ "Apache-2.0" ]
1
2019-12-28T22:47:51.000Z
2019-12-28T22:47:51.000Z
test/ext_tests/test_gasplummer.py
joshuawall/amuse
c2034074ee76c08057c4faa96c32044ab40952e9
[ "Apache-2.0" ]
null
null
null
test/ext_tests/test_gasplummer.py
joshuawall/amuse
c2034074ee76c08057c4faa96c32044ab40952e9
[ "Apache-2.0" ]
2
2021-11-19T04:41:37.000Z
2021-11-20T02:11:17.000Z
import numpy from amuse.test import amusetest from amuse.units import nbody_system from amuse.units import units from amuse.ic.gasplummer import new_plummer_gas_model, MakePlummerGasModel class TestPlummerGasModel(amusetest.TestCase): def test1(self): print "Test 1: testing low-level interface (no un...
51.826087
109
0.670022
import numpy from amuse.test import amusetest from amuse.units import nbody_system from amuse.units import units from amuse.ic.gasplummer import new_plummer_gas_model, MakePlummerGasModel class TestPlummerGasModel(amusetest.TestCase): def test1(self): print "Test 1: testing low-level interface (no un...
false
true
f7ff491d28423bb8ce76dba51252d4f33c3eab19
2,539
py
Python
jrnl/plugins/fancy_exporter.py
aallbrig/jrnl
95aa3bc1aec9da88678981741f859de5e54cc52a
[ "MIT" ]
null
null
null
jrnl/plugins/fancy_exporter.py
aallbrig/jrnl
95aa3bc1aec9da88678981741f859de5e54cc52a
[ "MIT" ]
null
null
null
jrnl/plugins/fancy_exporter.py
aallbrig/jrnl
95aa3bc1aec9da88678981741f859de5e54cc52a
[ "MIT" ]
null
null
null
#!/usr/bin/env python # encoding: utf-8 from __future__ import absolute_import, unicode_literals, print_function from .text_exporter import TextExporter from textwrap import TextWrapper class FancyExporter(TextExporter): """This Exporter can convert entries and journals into text with unicode box drawing charact...
33.853333
103
0.570303
from __future__ import absolute_import, unicode_literals, print_function from .text_exporter import TextExporter from textwrap import TextWrapper class FancyExporter(TextExporter): names = ["fancy", "boxed"] extension = "txt" border_a = "┎" border_b = "─" border_c = "╮" border_d = "╘" ...
true
true
f7ff4970d703cf1fa8240f47ba515a3f6ea19618
3,145
py
Python
leaky/generator/generate.py
cypher-me/HAS-Qualifier-Challenges
bb795303716155dad4a930880a58fecb5d9b50c5
[ "MIT" ]
75
2020-07-20T20:54:00.000Z
2022-03-09T09:18:37.000Z
leaky/generator/generate.py
cypher-me/HAS-Qualifier-Challenges
bb795303716155dad4a930880a58fecb5d9b50c5
[ "MIT" ]
3
2020-09-13T00:46:49.000Z
2021-07-06T16:18:22.000Z
leaky/generator/generate.py
cypher-me/HAS-Qualifier-Challenges
bb795303716155dad4a930880a58fecb5d9b50c5
[ "MIT" ]
14
2020-07-22T16:34:51.000Z
2021-09-13T12:19:59.000Z
import os,stat,sys import subprocess import struct import tarfile from pprint import pprint from hashlib import sha256 from binascii import unhexlify from pool import ThreadPool from Crypto.Cipher import AES def run(count, seed): cmd = [ "python", "generate_part.py", "%d" % count, "%d" % seed ] p = subprocess...
32.760417
122
0.67504
import os,stat,sys import subprocess import struct import tarfile from pprint import pprint from hashlib import sha256 from binascii import unhexlify from pool import ThreadPool from Crypto.Cipher import AES def run(count, seed): cmd = [ "python", "generate_part.py", "%d" % count, "%d" % seed ] p = subprocess...
true
true
f7ff4981672d5db59358a445c1256f857a8d0354
678
py
Python
adaptivebot.py
coolioasjulio/Rock-Paper-Scissors-Royale
a75dfdb6bbc62c1a6bc493252f79b97f2aecc325
[ "MIT" ]
null
null
null
adaptivebot.py
coolioasjulio/Rock-Paper-Scissors-Royale
a75dfdb6bbc62c1a6bc493252f79b97f2aecc325
[ "MIT" ]
null
null
null
adaptivebot.py
coolioasjulio/Rock-Paper-Scissors-Royale
a75dfdb6bbc62c1a6bc493252f79b97f2aecc325
[ "MIT" ]
null
null
null
# RPS bot import random name = 'adaptivebot' class RPSBot(object): name = name def __init__(self): self.winners = {"R": "P", "P": "S", "S": "R"} def get_hint(self, other_past, my_past): is_other_constant = len(set([other_claim for other_claim, other_move in other_past[-2:]])) == 1 ...
42.375
113
0.674041
import random name = 'adaptivebot' class RPSBot(object): name = name def __init__(self): self.winners = {"R": "P", "P": "S", "S": "R"} def get_hint(self, other_past, my_past): is_other_constant = len(set([other_claim for other_claim, other_move in other_past[-2:]])) == 1 retur...
true
true
f7ff49946392a1cc8689e7a1b43493468f2c07ee
9,969
py
Python
auth0/v3/test/management/test_rest.py
eoltean/auth0-python
656765de6c406e333cb2b4a2d43cc57d3289221d
[ "MIT" ]
null
null
null
auth0/v3/test/management/test_rest.py
eoltean/auth0-python
656765de6c406e333cb2b4a2d43cc57d3289221d
[ "MIT" ]
null
null
null
auth0/v3/test/management/test_rest.py
eoltean/auth0-python
656765de6c406e333cb2b4a2d43cc57d3289221d
[ "MIT" ]
null
null
null
import unittest import json import mock from ...management.rest import RestClient from ...exceptions import Auth0Error class TestRest(unittest.TestCase): @mock.patch('requests.get') def test_get(self, mock_get): rc = RestClient(jwt='a-token', telemetry=False) headers = {'Authorization': 'Bear...
37.904943
85
0.604975
import unittest import json import mock from ...management.rest import RestClient from ...exceptions import Auth0Error class TestRest(unittest.TestCase): @mock.patch('requests.get') def test_get(self, mock_get): rc = RestClient(jwt='a-token', telemetry=False) headers = {'Authorization': 'Bear...
true
true
f7ff49fc517fae1b91285ef50ec51728c982d535
2,580
py
Python
packages/fetchai/skills/tac_control_contract/parameters.py
marcofavorito/agents-aea
e520f2f5d076a193514e194d94aa76c6423ac5bc
[ "Apache-2.0" ]
null
null
null
packages/fetchai/skills/tac_control_contract/parameters.py
marcofavorito/agents-aea
e520f2f5d076a193514e194d94aa76c6423ac5bc
[ "Apache-2.0" ]
null
null
null
packages/fetchai/skills/tac_control_contract/parameters.py
marcofavorito/agents-aea
e520f2f5d076a193514e194d94aa76c6423ac5bc
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2018-2019 Fetch.AI Limited # # 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 ...
31.463415
87
0.58876
from aea.helpers.transaction.base import Terms from packages.fetchai.skills.tac_control.parameters import Parameters as BaseParameters class Parameters(BaseParameters): def __init__(self, **kwargs): super().__init__(**kwargs) self.nb_completed_minting = 0 def get_deploy_...
true
true
f7ff4a1833def6b0eaf3a0a43931354525bc1a06
43
py
Python
useless_bot/cogs/bank/__init__.py
MRvillager/useless_bot
68ee1a73d7f0ac4d041d96a02d93feae17194980
[ "MIT" ]
null
null
null
useless_bot/cogs/bank/__init__.py
MRvillager/useless_bot
68ee1a73d7f0ac4d041d96a02d93feae17194980
[ "MIT" ]
null
null
null
useless_bot/cogs/bank/__init__.py
MRvillager/useless_bot
68ee1a73d7f0ac4d041d96a02d93feae17194980
[ "MIT" ]
null
null
null
from .bank import Bank __all__ = ["Bank"]
10.75
22
0.674419
from .bank import Bank __all__ = ["Bank"]
true
true
f7ff4a188b5ea065dc32c27710a36e7fb875b895
87,607
py
Python
rpython/rlib/rbigint.py
yxzoro/pypy
6e47b3d3e5513d9639a21554963a6ace172ccfee
[ "Apache-2.0", "OpenSSL" ]
1
2018-12-27T20:40:49.000Z
2018-12-27T20:40:49.000Z
rpython/rlib/rbigint.py
GabriellaUwa/pypy
2ede3b557a25cb49db969e942ca5a7f8a9eae0d4
[ "Apache-2.0", "OpenSSL" ]
null
null
null
rpython/rlib/rbigint.py
GabriellaUwa/pypy
2ede3b557a25cb49db969e942ca5a7f8a9eae0d4
[ "Apache-2.0", "OpenSSL" ]
null
null
null
from rpython.rlib.rarithmetic import LONG_BIT, intmask, longlongmask, r_uint, r_ulonglong from rpython.rlib.rarithmetic import ovfcheck, r_longlong, widen from rpython.rlib.rarithmetic import most_neg_value_of_same_type from rpython.rlib.rarithmetic import check_support_int128 from rpython.rlib.rstring import StringBui...
30.706975
119
0.550013
from rpython.rlib.rarithmetic import LONG_BIT, intmask, longlongmask, r_uint, r_ulonglong from rpython.rlib.rarithmetic import ovfcheck, r_longlong, widen from rpython.rlib.rarithmetic import most_neg_value_of_same_type from rpython.rlib.rarithmetic import check_support_int128 from rpython.rlib.rstring import StringBui...
false
true
f7ff4abc7bdfb30fde527420eded549637be4c74
2,609
py
Python
test/gen_big.py
sdn-ixp/sdx-parallel
aa7f3d01ac22c56b5882de50884b0473c8bb6ba2
[ "Apache-2.0" ]
49
2015-11-15T00:02:35.000Z
2021-02-12T22:03:57.000Z
test/gen_big.py
sdn-ixp/sdx-parallel
aa7f3d01ac22c56b5882de50884b0473c8bb6ba2
[ "Apache-2.0" ]
6
2016-06-20T06:01:36.000Z
2019-10-22T19:34:27.000Z
test/gen_big.py
sdn-ixp/sdx-parallel
aa7f3d01ac22c56b5882de50884b0473c8bb6ba2
[ "Apache-2.0" ]
21
2015-11-22T13:02:07.000Z
2019-06-06T18:15:11.000Z
''' Created on Jul 4, 2016 @author: Marc Pucci (Vencore Labs) ''' ''' generate really big configurations ''' import sys import genlib def main (argv): global outdir if len(argv) < 2: print 'usage: gen_big #_of_participants' exit() limit = int(argv[1]) maxsub = 254 mins...
22.686957
129
0.485243
''' Created on Jul 4, 2016 @author: Marc Pucci (Vencore Labs) ''' ''' generate really big configurations ''' import sys import genlib def main (argv): global outdir if len(argv) < 2: print 'usage: gen_big #_of_participants' exit() limit = int(argv[1]) maxsub = 254 mins...
false
true
f7ff4b13830517d1b3cefd55138a9120f4c53607
1,312
py
Python
tests/50_test_sphere_sph_solver_real_and_complex/test.py
valentinaschueller/sweet
27e99c7a110c99deeadee70688c186d82b39ac90
[ "MIT" ]
6
2017-11-20T08:12:46.000Z
2021-03-11T15:32:36.000Z
tests/50_test_sphere_sph_solver_real_and_complex/test.py
valentinaschueller/sweet
27e99c7a110c99deeadee70688c186d82b39ac90
[ "MIT" ]
4
2018-02-02T21:46:33.000Z
2022-01-11T11:10:27.000Z
tests/50_test_sphere_sph_solver_real_and_complex/test.py
valentinaschueller/sweet
27e99c7a110c99deeadee70688c186d82b39ac90
[ "MIT" ]
12
2016-03-01T18:33:34.000Z
2022-02-08T22:20:31.000Z
#! /usr/bin/env python3 import sys import os os.chdir(os.path.dirname(sys.argv[0])) from mule_local.JobMule import * from itertools import product from mule.exec_program import * exec_program('mule.benchmark.cleanup_all', catch_output=False) jg = JobGeneration() jg.compile.unit_test="test_sphere_sph_solver_real_and...
23.017544
79
0.766006
import sys import os os.chdir(os.path.dirname(sys.argv[0])) from mule_local.JobMule import * from itertools import product from mule.exec_program import * exec_program('mule.benchmark.cleanup_all', catch_output=False) jg = JobGeneration() jg.compile.unit_test="test_sphere_sph_solver_real_and_complex" jg.compile.p...
true
true
f7ff4c005f3a2f7a55d76b9caac1b92f841771af
1,708
py
Python
2.6/faster_rcnn/utils/config_helpers.py
waikato-datamining/cntk
1b626407ef750dfbd4ad66fe9aed28487f2a4441
[ "MIT" ]
null
null
null
2.6/faster_rcnn/utils/config_helpers.py
waikato-datamining/cntk
1b626407ef750dfbd4ad66fe9aed28487f2a4441
[ "MIT" ]
null
null
null
2.6/faster_rcnn/utils/config_helpers.py
waikato-datamining/cntk
1b626407ef750dfbd4ad66fe9aed28487f2a4441
[ "MIT" ]
null
null
null
from easydict import EasyDict import numpy as np def merge_configs(config_list): if config_list == None or len(config_list) == 0: return None base_config = config_list[0] if type(base_config) is dict: base_config = EasyDict(base_config) if type(base_config) is not EasyDict: pr...
30.5
113
0.581967
from easydict import EasyDict import numpy as np def merge_configs(config_list): if config_list == None or len(config_list) == 0: return None base_config = config_list[0] if type(base_config) is dict: base_config = EasyDict(base_config) if type(base_config) is not EasyDict: pr...
true
true
f7ff4c22cc5298e66484a5798e42672119487e02
1,080
py
Python
forms.py
diogenesjusto/flask_leaderboard
86dac90785e01747ffbde99e6ba65cf42e4c016e
[ "MIT" ]
null
null
null
forms.py
diogenesjusto/flask_leaderboard
86dac90785e01747ffbde99e6ba65cf42e4c016e
[ "MIT" ]
null
null
null
forms.py
diogenesjusto/flask_leaderboard
86dac90785e01747ffbde99e6ba65cf42e4c016e
[ "MIT" ]
null
null
null
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField, SubmitField from wtforms.validators import DataRequired class LoginForm(FlaskForm): username = StringField('Username', validators=[DataRequired()], render_kw={"placeholder": "username"}) password = PasswordField('Pass...
51.428571
108
0.724074
from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField, SubmitField from wtforms.validators import DataRequired class LoginForm(FlaskForm): username = StringField('Username', validators=[DataRequired()], render_kw={"placeholder": "username"}) password = PasswordField('Pass...
true
true
f7ff4c5d5727c22ea1e52f249de9daa2faa9c87d
5,552
py
Python
cinder/api/contrib/snapshot_manage.py
shubhamdang/cinder
03a8ca07d5710771c597fd92de50103313ec7f76
[ "Apache-2.0" ]
null
null
null
cinder/api/contrib/snapshot_manage.py
shubhamdang/cinder
03a8ca07d5710771c597fd92de50103313ec7f76
[ "Apache-2.0" ]
null
null
null
cinder/api/contrib/snapshot_manage.py
shubhamdang/cinder
03a8ca07d5710771c597fd92de50103313ec7f76
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 Huawei Technologies Co., Ltd. # # 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...
38.555556
79
0.675612
from http import client as http_client from oslo_log import log as logging from cinder.api.contrib import resource_common_manage from cinder.api import extensions from cinder.api.openstack import wsgi from cinder.api.schemas import snapshot_manage from cinder.api import validation from cinder.api.views i...
true
true
f7ff4cfbef645e43f1c01141884507fb30834287
1,793
py
Python
app/utils/seedCrashes.py
adriacabeza/Volvo-Challenge
66d899b55e80a4c97fb393bc4cf261e93b261a7c
[ "CNRI-Python" ]
7
2019-03-10T09:16:14.000Z
2019-11-27T10:43:57.000Z
app/utils/seedCrashes.py
adriacabeza/Volvo-Challenge
66d899b55e80a4c97fb393bc4cf261e93b261a7c
[ "CNRI-Python" ]
5
2021-03-18T22:47:15.000Z
2022-03-11T23:42:12.000Z
app/utils/seedCrashes.py
adriacabeza/Volvo-Challenge
66d899b55e80a4c97fb393bc4cf261e93b261a7c
[ "CNRI-Python" ]
1
2020-12-28T08:22:47.000Z
2020-12-28T08:22:47.000Z
from werkzeug.security import generate_password_hash from pymongo import MongoClient from pymongo.errors import DuplicateKeyError import os data =[ {"impactAngle":-341.54339233899367,"_id":20175, "user": "Robert", "date": "10/03/2019", "car": "Volvo S90"}, {"impactAngle":-32.74137379765352,"_id":1171, "user": "Robert"...
43.731707
141
0.660904
from werkzeug.security import generate_password_hash from pymongo import MongoClient from pymongo.errors import DuplicateKeyError import os data =[ {"impactAngle":-341.54339233899367,"_id":20175, "user": "Robert", "date": "10/03/2019", "car": "Volvo S90"}, {"impactAngle":-32.74137379765352,"_id":1171, "user": "Robert"...
true
true
f7ff4cfc6064b2d7b0ce92deef8d2d47f45d218a
5,694
py
Python
recognize_video.py
pystudent1913/proyecto-reconocimiento-facial
881fb2f724b43b93b224dd591e250e0f2f078764
[ "MIT" ]
null
null
null
recognize_video.py
pystudent1913/proyecto-reconocimiento-facial
881fb2f724b43b93b224dd591e250e0f2f078764
[ "MIT" ]
7
2021-11-25T06:26:28.000Z
2021-11-25T06:26:37.000Z
recognize_video.py
pystudent1913/proyecto-reconocimiento-facial
881fb2f724b43b93b224dd591e250e0f2f078764
[ "MIT" ]
null
null
null
# USAGE # python recognize_video.py --detector face_detection_model \ # --embedding-model openface_nn4.small2.v1.t7 \ # --recognizer output/recognizer.pickle \ # --le output/le.pickle # import the necessary packages from imutils.video import VideoStream from imutils.video import FPS import numpy as np import argparse ...
28.328358
70
0.681946
from imutils.video import VideoStream from imutils.video import FPS import numpy as np import argparse import imutils import pickle import time import cv2 import os import requests import json ap = argparse.ArgumentParser() ap.add_argument("-d", "--detector", required=True, help="path to OpenCV's deep learni...
true
true
f7ff4d686ee28a251c2a6c847e436de15eae0751
165
py
Python
core/wsgi.py
JohnAzedo/SocialAuthDjango
a92bb69c78083fe83190609548fc068849891b90
[ "MIT" ]
9
2021-01-21T16:26:48.000Z
2021-09-20T01:47:58.000Z
core/wsgi.py
JohnAzedo/SocialAuthDjango
a92bb69c78083fe83190609548fc068849891b90
[ "MIT" ]
10
2019-07-29T12:13:48.000Z
2022-02-10T08:32:59.000Z
core/wsgi.py
JohnAzedo/SocialAuthDjango
a92bb69c78083fe83190609548fc068849891b90
[ "MIT" ]
5
2021-04-11T09:40:44.000Z
2021-06-09T08:05:48.000Z
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') application = get_wsgi_application()
20.625
64
0.824242
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') application = get_wsgi_application()
true
true
f7ff50addd5f11499a683fa5f671e1eb0a96c142
3,787
py
Python
build/ARM/python/m5/internal/param_DiskImage.py
Jakgn/gem5_test
0ba7cc5213cf513cf205af7fc995cf679ebc1a3f
[ "BSD-3-Clause" ]
null
null
null
build/ARM/python/m5/internal/param_DiskImage.py
Jakgn/gem5_test
0ba7cc5213cf513cf205af7fc995cf679ebc1a3f
[ "BSD-3-Clause" ]
null
null
null
build/ARM/python/m5/internal/param_DiskImage.py
Jakgn/gem5_test
0ba7cc5213cf513cf205af7fc995cf679ebc1a3f
[ "BSD-3-Clause" ]
null
null
null
# This file was automatically generated by SWIG (http://www.swig.org). # Version 2.0.11 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info if version_info >= (2,6,0): def swig_import_helper(): from os.path impo...
35.064815
129
0.702667
from sys import version_info if version_info >= (2,6,0): def swig_import_helper(): from os.path import dirname import imp fp = None try: fp, pathname, description = imp.find_module('_param_DiskImage', [dirname(__file__)]) except ImportError: ...
true
true
f7ff511f74e9c954b924aea6a7e1e3b20dfbe306
5,703
py
Python
razor/interface.py
SRI-CSL/OCCAM
8c498301f658fd3c158ffb6aad36dc0dd57c6239
[ "BSD-3-Clause" ]
17
2015-11-23T17:19:54.000Z
2022-03-18T23:55:29.000Z
razor/interface.py
SRI-CSL/application-specialization
6e3efd1431195ccb4afd0801caa8cc825931197f
[ "BSD-3-Clause" ]
58
2015-11-26T17:24:12.000Z
2021-11-30T12:47:31.000Z
razor/interface.py
SRI-CSL/application-specialization
6e3efd1431195ccb4afd0801caa8cc825931197f
[ "BSD-3-Clause" ]
10
2015-09-03T14:54:27.000Z
2020-11-13T14:02:11.000Z
""" OCCAM Copyright (c) 2011-2017, SRI International All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of con...
34.355422
79
0.593372
import re import sys from .proto import Previrt_pb2 as pb def emptyInterface(): return pb.ComponentInterface() def parseInterface(filename): result = pb.ComponentInterface() if filename == '-': result.ParseFromString(sys.stdin.read()) else: result.ParseFromString(open(filename, 'rb'...
true
true
f7ff525cd40b5650ba27e8230fd67635baf49ce6
1,194
py
Python
tests/vat_ids.py
MrMebelMan/pyvies
a0f9c1a5b17be61813bcd3a2308e64ed350df8bb
[ "MIT" ]
1
2020-05-22T14:17:41.000Z
2020-05-22T14:17:41.000Z
tests/vat_ids.py
MrMebelMan/pyvies
a0f9c1a5b17be61813bcd3a2308e64ed350df8bb
[ "MIT" ]
null
null
null
tests/vat_ids.py
MrMebelMan/pyvies
a0f9c1a5b17be61813bcd3a2308e64ed350df8bb
[ "MIT" ]
1
2019-01-08T14:58:05.000Z
2019-01-08T14:58:05.000Z
VALID_VAT_IDS = { 'AT': 'U33826303', 'CZ': '48025551', 'DE': '263104148', 'DK': '13189900', 'ES': 'B57835241', 'FR': '39518813530', 'FI': '18217187', 'GB': '248233561', 'HU': '11062361', 'HR': '59992797221', # 'IS': '??????', 'IE': '4575414W', 'IT': '01441870449', ...
18.090909
37
0.494137
VALID_VAT_IDS = { 'AT': 'U33826303', 'CZ': '48025551', 'DE': '263104148', 'DK': '13189900', 'ES': 'B57835241', 'FR': '39518813530', 'FI': '18217187', 'GB': '248233561', 'HU': '11062361', 'HR': '59992797221', 'IE': '4575414W', 'IT': '01441870449', 'LT': '100005724...
true
true
f7ff52774f076f79502f0471950e30e96f1b1c13
4,024
py
Python
Univ_individual_files/313_Bandung_Institute_of_Technology_ITB.py
srsarangi/univscanner
8735628690f7f50662ee5abf14ac1d27a657b613
[ "Apache-2.0" ]
null
null
null
Univ_individual_files/313_Bandung_Institute_of_Technology_ITB.py
srsarangi/univscanner
8735628690f7f50662ee5abf14ac1d27a657b613
[ "Apache-2.0" ]
null
null
null
Univ_individual_files/313_Bandung_Institute_of_Technology_ITB.py
srsarangi/univscanner
8735628690f7f50662ee5abf14ac1d27a657b613
[ "Apache-2.0" ]
2
2021-05-18T07:50:15.000Z
2021-05-18T11:16:04.000Z
import requests import urllib.request import time import urllib import re import csv from bs4 import BeautifulSoup def Bandung_Institute_of_Technology(): url = "https://www.unimi.it/en/ugov/ou-structure/department-computer-science-giovanni-degli-antoni" # homepage url r = requests.get(url) ...
35.928571
165
0.565606
import requests import urllib.request import time import urllib import re import csv from bs4 import BeautifulSoup def Bandung_Institute_of_Technology(): url = "https://www.unimi.it/en/ugov/ou-structure/department-computer-science-giovanni-degli-antoni" r = requests.get(url) ...
true
true
f7ff53063f5fd0f44da341b2601141765f4c6b1a
1,280
py
Python
project_test/tests/test_002_forms.py
emencia/emencia-django-bazar
a0cf56c00988c84c2288c21fa2a08364fc5033aa
[ "MIT" ]
null
null
null
project_test/tests/test_002_forms.py
emencia/emencia-django-bazar
a0cf56c00988c84c2288c21fa2a08364fc5033aa
[ "MIT" ]
11
2015-05-06T14:50:14.000Z
2017-12-16T23:46:17.000Z
project_test/tests/test_002_forms.py
emencia/emencia-django-bazar
a0cf56c00988c84c2288c21fa2a08364fc5033aa
[ "MIT" ]
null
null
null
import pytest import factory from django.core.urlresolvers import reverse from django.contrib.auth.models import User from bazar.models import Entity, Note from bazar.forms.entity import EntityForm from bazar.forms.note import NoteForm import factories @pytest.mark.django_db def test_form_entity(admin_client): ...
24.615385
81
0.733594
import pytest import factory from django.core.urlresolvers import reverse from django.contrib.auth.models import User from bazar.models import Entity, Note from bazar.forms.entity import EntityForm from bazar.forms.note import NoteForm import factories @pytest.mark.django_db def test_form_entity(admin_client): ...
true
true
f7ff534e64913b93a7a9d2636e932ed76b8bced3
933
py
Python
manage.py
praiseG/DABS-Django-Backend
8c51e4ef5ab12e1bc2f1c51423c21e3090a7e2f6
[ "MIT" ]
1
2021-08-17T15:19:08.000Z
2021-08-17T15:19:08.000Z
manage.py
praiseG/DABS-Django-Backend
8c51e4ef5ab12e1bc2f1c51423c21e3090a7e2f6
[ "MIT" ]
null
null
null
manage.py
praiseG/DABS-Django-Backend
8c51e4ef5ab12e1bc2f1c51423c21e3090a7e2f6
[ "MIT" ]
3
2019-12-19T20:50:44.000Z
2021-05-14T14:43:23.000Z
#!/usr/bin/env python import os import sys import dotenv if __name__ == "__main__": BASE_PATH = os.path.dirname(os.path.abspath(__file__)) dotenv.read_dotenv(os.path.join(BASE_PATH, '.env')) os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dabs.settings") try: from django.core.management impo...
33.321429
77
0.651661
import os import sys import dotenv if __name__ == "__main__": BASE_PATH = os.path.dirname(os.path.abspath(__file__)) dotenv.read_dotenv(os.path.join(BASE_PATH, '.env')) os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dabs.settings") try: from django.core.management import execute_from_comma...
true
true
f7ff53fec1489838d4bae06123009c7891e40f1e
236,495
py
Python
cinder/tests/unit/test_emc_vnxdirect.py
rackerlabs/cinder
4295ff0a64f781c3546f6c6e0816dbb8100133cb
[ "Apache-2.0" ]
null
null
null
cinder/tests/unit/test_emc_vnxdirect.py
rackerlabs/cinder
4295ff0a64f781c3546f6c6e0816dbb8100133cb
[ "Apache-2.0" ]
null
null
null
cinder/tests/unit/test_emc_vnxdirect.py
rackerlabs/cinder
4295ff0a64f781c3546f6c6e0816dbb8100133cb
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2012 - 2015 EMC Corporation, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
44.370544
79
0.547952
import os import re import mock from oslo_concurrency import processutils import six from cinder import context from cinder import exception from cinder import test from cinder.tests.unit import fake_snapshot from cinder.tests.unit import fake_volume from cinder.tests.unit import utils from cinder.volum...
true
true
f7ff545f5f40f2327550448510c2c6e5bd940770
380
py
Python
exps/default/yolox_l_leaky.py
shachargluska/YOLOX
94caf37f4c7c81dd7305c74b0c71dc8c4813c7a5
[ "Apache-2.0" ]
null
null
null
exps/default/yolox_l_leaky.py
shachargluska/YOLOX
94caf37f4c7c81dd7305c74b0c71dc8c4813c7a5
[ "Apache-2.0" ]
null
null
null
exps/default/yolox_l_leaky.py
shachargluska/YOLOX
94caf37f4c7c81dd7305c74b0c71dc8c4813c7a5
[ "Apache-2.0" ]
1
2022-02-28T07:04:39.000Z
2022-02-28T07:04:39.000Z
#!/usr/bin/env python3 # -*- coding:utf-8 -*- # Copyright (c) Megvii, Inc. and its affiliates. import os from yolox.exp import Exp as MyExp class Exp(MyExp): def __init__(self): super(Exp, self).__init__() self.depth = 1.0 self.width = 1.0 self.exp_name = os.path.split(os.path.re...
22.352941
82
0.607895
import os from yolox.exp import Exp as MyExp class Exp(MyExp): def __init__(self): super(Exp, self).__init__() self.depth = 1.0 self.width = 1.0 self.exp_name = os.path.split(os.path.realpath(__file__))[1].split(".")[0] self.act='lrelu'
true
true
f7ff547d02fff493b43e2ca2a1a68c050d95678a
52
py
Python
auxjad/indicators/__init__.py
gilbertohasnofb/auxjad
553b7fe97221b6f378a93ade6262f024e3cbc678
[ "MIT" ]
6
2020-05-18T09:28:29.000Z
2021-12-22T00:40:54.000Z
auxjad/indicators/__init__.py
gilbertohasnofb/auxjad
553b7fe97221b6f378a93ade6262f024e3cbc678
[ "MIT" ]
1
2021-04-21T20:29:38.000Z
2021-04-22T19:44:54.000Z
auxjad/indicators/__init__.py
gilbertohasnofb/auxjad
553b7fe97221b6f378a93ade6262f024e3cbc678
[ "MIT" ]
1
2021-04-21T18:54:46.000Z
2021-04-21T18:54:46.000Z
""" indicators ========== Auxjad's indicators. """
7.428571
20
0.519231
true
true
f7ff5588f53a6a514c35a01b6b7b964de646f8a6
77,588
py
Python
xbrl_to_json.py
scoofy/xbrl-to-json
8783425c55fdc069055440a7149d9a3fdf517141
[ "Apache-2.0" ]
14
2019-02-13T03:13:00.000Z
2022-02-12T19:28:39.000Z
xbrl_to_json.py
scoofy/xbrl-to-json
8783425c55fdc069055440a7149d9a3fdf517141
[ "Apache-2.0" ]
1
2019-05-01T10:16:30.000Z
2019-07-19T22:12:08.000Z
xbrl_to_json.py
scoofy/xbrl-to-json
8783425c55fdc069055440a7149d9a3fdf517141
[ "Apache-2.0" ]
2
2019-09-23T17:48:57.000Z
2020-06-01T15:25:18.000Z
import sys, os, shutil, logging, datetime, json, time, copy, re, random import urllib.request import bs4, anytree, anytree.exporter, anytree.importer import xml.etree.ElementTree as ET import pprint as pp logging.basicConfig(format=' ---- %(filename)s|%(lineno)d ----\n%(message)s', level=logging.INFO) clarks_to_ignor...
45.479484
250
0.601987
import sys, os, shutil, logging, datetime, json, time, copy, re, random import urllib.request import bs4, anytree, anytree.exporter, anytree.importer import xml.etree.ElementTree as ET import pprint as pp logging.basicConfig(format=' ---- %(filename)s|%(lineno)d ----\n%(message)s', level=logging.INFO) clarks_to_ignor...
true
true
f7ff5799af5e7c3aa6a1090f8d5c403ccc15629e
22,915
py
Python
release/scripts/startup/nodeitems_builtins.py
recogni/blender
af830498016c01c4847f00b51246bc8e3c88f6f6
[ "Naumen", "Condor-1.1", "MS-PL" ]
1
2020-01-30T01:03:05.000Z
2020-01-30T01:03:05.000Z
release/scripts/startup/nodeitems_builtins.py
recogni/blender
af830498016c01c4847f00b51246bc8e3c88f6f6
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
release/scripts/startup/nodeitems_builtins.py
recogni/blender
af830498016c01c4847f00b51246bc8e3c88f6f6
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
38.971088
101
0.695134
m.label.lower()) super().__init__(identifier, name, description, items) class CompositorNodeCategory(SortedNodeCategory): @classmethod def poll(cls, context): return (context.space_data.type == 'NODE_EDITOR' and context.space_data.tree_type == 'CompositorNodeTree') class Sha...
true
true
f7ff5831ec205a844c057243e3ba61ed22c3e776
12,080
py
Python
ml_testbench_dashboard/testbench.py
Pablololo12/ML_playground
30e98e6fa3af2020779cc9625d6609f7162f34ee
[ "MIT" ]
null
null
null
ml_testbench_dashboard/testbench.py
Pablololo12/ML_playground
30e98e6fa3af2020779cc9625d6609f7162f34ee
[ "MIT" ]
null
null
null
ml_testbench_dashboard/testbench.py
Pablololo12/ML_playground
30e98e6fa3af2020779cc9625d6609f7162f34ee
[ "MIT" ]
1
2020-04-01T16:07:25.000Z
2020-04-01T16:07:25.000Z
#!/usr/bin/env python3 # Copyright (c) 2019, ARM Limited and Contributors # # SPDX-License-Identifier: MIT # # 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, includ...
33.462604
81
0.507202
import csv import json import os from random import random import subprocess import sys import yaml MODEL_FOLDER = "/data/local/tmp/models/" BENCH_BIN_PATH = "/data/local/tmp/binaries/" TFLITE_BIN = "benchmark_model" ARMNN_BIN = "ExecuteNetwork" NUM_LOOPS = 10 NUM_THREADS = [4] ...
true
true
f7ff58c44a935764998ddc31eb4fd527ffb44331
622
py
Python
wellcad/com/_comment_box.py
ArnaudCrl/pywellcad
770ac70cd1c20d06e4590979976498f75c9db91e
[ "BSD-3-Clause" ]
6
2022-02-18T06:28:43.000Z
2022-03-24T18:54:18.000Z
wellcad/com/_comment_box.py
ArnaudCrl/pywellcad
770ac70cd1c20d06e4590979976498f75c9db91e
[ "BSD-3-Clause" ]
85
2022-02-17T13:41:06.000Z
2022-03-04T14:34:18.000Z
wellcad/com/_comment_box.py
ArnaudCrl/pywellcad
770ac70cd1c20d06e4590979976498f75c9db91e
[ "BSD-3-Clause" ]
2
2022-02-10T09:01:21.000Z
2022-03-12T02:41:32.000Z
from ._dispatch_wrapper import DispatchWrapper class CommentBox(DispatchWrapper): @property def top_depth(self): """float: The top depth of the comment box in current depth units.""" return self._dispatch.TopDepth @property def bottom_depth(self): """float: The bottom ...
23.923077
70
0.639871
from ._dispatch_wrapper import DispatchWrapper class CommentBox(DispatchWrapper): @property def top_depth(self): return self._dispatch.TopDepth @property def bottom_depth(self): return self._dispatch.BottomDepth @property def text(self): return self._dispatch.Text ...
true
true
f7ff58e364652074db91b1ef4d1e0055852b1294
6,602
py
Python
espnet2/samplers/num_elements_batch_sampler.py
ana-kuznetsova/espnet
263a9ba04b626fa46442d6679531ce98c7afa9df
[ "Apache-2.0" ]
1
2021-07-12T17:48:24.000Z
2021-07-12T17:48:24.000Z
espnet2/samplers/num_elements_batch_sampler.py
ana-kuznetsova/espnet
263a9ba04b626fa46442d6679531ce98c7afa9df
[ "Apache-2.0" ]
null
null
null
espnet2/samplers/num_elements_batch_sampler.py
ana-kuznetsova/espnet
263a9ba04b626fa46442d6679531ce98c7afa9df
[ "Apache-2.0" ]
null
null
null
from typing import Iterator from typing import List from typing import Tuple from typing import Union import numpy as np from typeguard import check_argument_types from espnet2.fileio.read_text import load_num_sequence_text from espnet2.samplers.abs_sampler import AbsSampler class NumElementsBatchSampler(AbsSampler...
37.089888
110
0.547561
from typing import Iterator from typing import List from typing import Tuple from typing import Union import numpy as np from typeguard import check_argument_types from espnet2.fileio.read_text import load_num_sequence_text from espnet2.samplers.abs_sampler import AbsSampler class NumElementsBatchSampler(AbsSampler...
true
true
f7ff58ef33cd371df2cf4d224f39cb9d6ceac190
10,774
py
Python
core/domain/event_services.py
alexewu/oppia
57c3c660ab7974835ec068d7c7f5ce5b5f1f25ae
[ "Apache-2.0" ]
null
null
null
core/domain/event_services.py
alexewu/oppia
57c3c660ab7974835ec068d7c7f5ce5b5f1f25ae
[ "Apache-2.0" ]
7
2019-08-20T08:30:43.000Z
2022-02-12T18:47:57.000Z
core/domain/event_services.py
ledriod/oppia
4f8f95c6689cd36f0b65672b80d98a3463b001f8
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
35.557756
80
0.713384
import inspect from core import jobs_registry from core.domain import exp_domain from core.domain import exp_services from core.domain import stats_domain from core.domain import stats_services from core.platform import models from core.platform.taskqueue import gae_taskqueue_services as taskqueue_ser...
true
true
f7ff592b5a4fe666d585f0090c2696d51c305d36
4,679
py
Python
core.py
Datacket/Invado
20ca439d9a3151fd97e85c87e6dc264152410aea
[ "MIT" ]
1
2019-01-16T19:56:44.000Z
2019-01-16T19:56:44.000Z
core.py
Datacket/Invado
20ca439d9a3151fd97e85c87e6dc264152410aea
[ "MIT" ]
null
null
null
core.py
Datacket/Invado
20ca439d9a3151fd97e85c87e6dc264152410aea
[ "MIT" ]
null
null
null
import json import pandas as pd import numpy as np import pymysql import pymysql.cursors as pycurse from datetime import datetime from model_animal_tracking import * import tensorflow as tf from io import StringIO from datetime import timedelta from flask import Flask,jsonify,request from sklearn.preprocessing import ...
38.669421
158
0.574268
import json import pandas as pd import numpy as np import pymysql import pymysql.cursors as pycurse from datetime import datetime from model_animal_tracking import * import tensorflow as tf from io import StringIO from datetime import timedelta from flask import Flask,jsonify,request from sklearn.preprocessing import ...
true
true
f7ff59edcbbc1b3a40cd7af030b4b13c846cc2b2
831
py
Python
easysite/urls.py
Tian-rg/easysite
6a34cb373e43c263e98dceae47f41c99b28803f1
[ "MIT" ]
null
null
null
easysite/urls.py
Tian-rg/easysite
6a34cb373e43c263e98dceae47f41c99b28803f1
[ "MIT" ]
null
null
null
easysite/urls.py
Tian-rg/easysite
6a34cb373e43c263e98dceae47f41c99b28803f1
[ "MIT" ]
null
null
null
"""easysite URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-b...
33.24
79
0.695548
from django.conf.urls import url, include from django.contrib import admin urlpatterns = [ url(r'^easysite/', include('siteframe.urls')), url(r'^admin/', admin.site.urls), ]
true
true
f7ff5a63ffd654ae3bce5b760918ad35855d4f53
2,521
py
Python
pyatv/protocols/dmap/tags.py
Jacobs4/pyatv
52956adf3b79198be52cc03649f3ddeee19f9e6c
[ "MIT" ]
532
2017-02-01T19:23:28.000Z
2022-03-29T09:57:39.000Z
pyatv/protocols/dmap/tags.py
Jacobs4/pyatv
52956adf3b79198be52cc03649f3ddeee19f9e6c
[ "MIT" ]
1,639
2017-02-01T19:22:04.000Z
2022-03-31T17:26:40.000Z
pyatv/protocols/dmap/tags.py
bdraco/pyatv
9541d21e6101c60866d832626be97bf962774cd5
[ "MIT" ]
102
2017-02-02T01:42:13.000Z
2022-02-26T08:49:34.000Z
"""Util functions for extracting and constructing DMAP data.""" import binascii import plistlib def read_str(data, start, length): """Extract a string from a position in a sequence.""" return data[start : start + length].decode("utf-8") def read_uint(data, start, length): """Extract a uint from a posit...
28.325843
87
0.641412
import binascii import plistlib def read_str(data, start, length): return data[start : start + length].decode("utf-8") def read_uint(data, start, length): return int.from_bytes(data[start : start + length], byteorder="big") def read_bool(data, start, length): return read_uint(data, start, length) == ...
true
true
f7ff5a712024609213b7c353c77109c35588f344
1,254
py
Python
pop_music_highlighter/lib.py
ka5par/MIR
ca8d9ee84435299f680b158d9c92c2b6e47682b3
[ "MIT" ]
null
null
null
pop_music_highlighter/lib.py
ka5par/MIR
ca8d9ee84435299f680b158d9c92c2b6e47682b3
[ "MIT" ]
null
null
null
pop_music_highlighter/lib.py
ka5par/MIR
ca8d9ee84435299f680b158d9c92c2b6e47682b3
[ "MIT" ]
1
2021-05-08T11:47:59.000Z
2021-05-08T11:47:59.000Z
import os.path import numpy as np import librosa from pydub import AudioSegment def chunk(incoming, n_chunk): input_length = incoming.shape[1] chunk_length = input_length // n_chunk outputs = [] for i in range(incoming.shape[0]): for j in range(n_chunk): outputs.append(incoming[i,...
32.153846
88
0.652313
import os.path import numpy as np import librosa from pydub import AudioSegment def chunk(incoming, n_chunk): input_length = incoming.shape[1] chunk_length = input_length // n_chunk outputs = [] for i in range(incoming.shape[0]): for j in range(n_chunk): outputs.append(incoming[i,...
true
true
f7ff5adcc7c106d8d1d071e95c0447f18f2e02b7
1,295
py
Python
tensorflow/contrib/estimator/python/estimator/hooks.py
PaulWang1905/tensorflow
ebf12d22b4801fb8dab5034cc94562bf7cc33fa0
[ "Apache-2.0" ]
848
2019-12-03T00:16:17.000Z
2022-03-31T22:53:17.000Z
tensorflow/contrib/estimator/python/estimator/hooks.py
PaulWang1905/tensorflow
ebf12d22b4801fb8dab5034cc94562bf7cc33fa0
[ "Apache-2.0" ]
656
2019-12-03T00:48:46.000Z
2022-03-31T18:41:54.000Z
tensorflow/contrib/estimator/python/estimator/hooks.py
PaulWang1905/tensorflow
ebf12d22b4801fb8dab5034cc94562bf7cc33fa0
[ "Apache-2.0" ]
506
2019-12-03T00:46:26.000Z
2022-03-30T10:34:56.000Z
# Copyright 2018 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...
39.242424
86
0.742085
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow_estimator.contrib.estimator.python.estimator import hooks _HAS_DYNAMIC_ATTRIBUTES = True hooks.__all__ = [s for s in dir(hooks) if not s.startswith('__')] from tensorflow_esti...
true
true
f7ff5bd285006ad39957ebd8922f565cba69c8d1
4,682
py
Python
ocpl_ros/scripts/load_collision_objects.py
JeroenDM/ocpl
51c19f2670327e17fabf5920ddad2c681f2bef4d
[ "MIT" ]
null
null
null
ocpl_ros/scripts/load_collision_objects.py
JeroenDM/ocpl
51c19f2670327e17fabf5920ddad2c681f2bef4d
[ "MIT" ]
1
2021-01-17T09:12:51.000Z
2021-01-17T09:12:51.000Z
ocpl_ros/scripts/load_collision_objects.py
JeroenDM/ocpl
51c19f2670327e17fabf5920ddad2c681f2bef4d
[ "MIT" ]
null
null
null
#!/usr/bin/env python import sys import rospy import moveit_commander from geometry_msgs.msg import Vector3, Quaternion, Pose, PoseStamped def remove_all_objects(scene): for name in scene.get_known_object_names(): scene.remove_world_object(name) def create_3r_spheres(): pose_s = PoseStamped() p...
32.971831
95
0.614481
import sys import rospy import moveit_commander from geometry_msgs.msg import Vector3, Quaternion, Pose, PoseStamped def remove_all_objects(scene): for name in scene.get_known_object_names(): scene.remove_world_object(name) def create_3r_spheres(): pose_s = PoseStamped() pose_s.header.frame_id...
true
true
f7ff5c0c0af4865e0ed1f0d1983e8b1a0aee5ddd
1,209
py
Python
instagram/migrations/0003_comment.py
MungaiKeren/The_Gram_Master
10dfd8756d11f9e34793428d75c1d3e19a1a2dc0
[ "MIT" ]
2
2019-10-13T08:36:51.000Z
2021-03-30T06:30:38.000Z
instagram/migrations/0003_comment.py
MungaiKeren/The_Gram_Master
10dfd8756d11f9e34793428d75c1d3e19a1a2dc0
[ "MIT" ]
5
2020-02-12T03:14:17.000Z
2021-09-08T01:20:44.000Z
instagram/migrations/0003_comment.py
MungaiKeren/The_Gram_Master
10dfd8756d11f9e34793428d75c1d3e19a1a2dc0
[ "MIT" ]
1
2021-02-25T17:07:57.000Z
2021-02-25T17:07:57.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2019-10-14 12:47 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_depende...
36.636364
145
0.622002
from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('instagram', '0002_auto_2019101...
true
true
f7ff5ca356091412e006b8365159bcec1a5147e3
6,509
py
Python
esmond/api/tests/test_translator.py
esnet/esmond-test
8aaec580e8fa8a27bddddc0fd91fd3e96730515f
[ "BSD-3-Clause-LBNL" ]
null
null
null
esmond/api/tests/test_translator.py
esnet/esmond-test
8aaec580e8fa8a27bddddc0fd91fd3e96730515f
[ "BSD-3-Clause-LBNL" ]
null
null
null
esmond/api/tests/test_translator.py
esnet/esmond-test
8aaec580e8fa8a27bddddc0fd91fd3e96730515f
[ "BSD-3-Clause-LBNL" ]
null
null
null
from django.test import TestCase from esmond.poll import IfRefTranslator from esmond.api.tests.test_correlator import MockOID EXAMPLE_DATA = { 'IfRefTranslator': {'check': [('ifPhysAddress.1', '0c:a4:02:50:74:01'), ('ifPhysAddress.2', '8c:90:d3:90:99:69'), ('ifPhysAddress.3', '00:00:00:0...
52.491935
70
0.538024
from django.test import TestCase from esmond.poll import IfRefTranslator from esmond.api.tests.test_correlator import MockOID EXAMPLE_DATA = { 'IfRefTranslator': {'check': [('ifPhysAddress.1', '0c:a4:02:50:74:01'), ('ifPhysAddress.2', '8c:90:d3:90:99:69'), ('ifPhysAddress.3', '00:00:00:0...
true
true
f7ff5cad272e07a73c8415f5d0bab66dc20bb6e8
11,678
py
Python
quidel_covidtest/delphi_quidel_covidtest/pull.py
benjaminysmith/covidcast-indicators
b1474cd68a1497166fefe4beffd4d5ff867b9a61
[ "MIT" ]
null
null
null
quidel_covidtest/delphi_quidel_covidtest/pull.py
benjaminysmith/covidcast-indicators
b1474cd68a1497166fefe4beffd4d5ff867b9a61
[ "MIT" ]
null
null
null
quidel_covidtest/delphi_quidel_covidtest/pull.py
benjaminysmith/covidcast-indicators
b1474cd68a1497166fefe4beffd4d5ff867b9a61
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Simply downloads email attachments. Uses this handy package: https://pypi.org/project/imap-tools/ """ import io from os.path import join import os from datetime import datetime, timedelta import pandas as pd import numpy as np from imap_tools import MailBox, A, AND def get_from_email(star...
37.309904
120
0.626135
import io from os.path import join import os from datetime import datetime, timedelta import pandas as pd import numpy as np from imap_tools import MailBox, A, AND def get_from_email(start_date, end_date, mail_server, account, sender, password): time_flag = None df = pd.DataFrame(columns=...
true
true
f7ff5e2660887a9dab526dde6ed630940a403a2e
488
py
Python
interviewbit-python/anti-diagonals.py
sanketg186/100DaysOfCode
d44c7d4ac7b3fcf0cb91ab027a4cca133e433209
[ "MIT" ]
null
null
null
interviewbit-python/anti-diagonals.py
sanketg186/100DaysOfCode
d44c7d4ac7b3fcf0cb91ab027a4cca133e433209
[ "MIT" ]
null
null
null
interviewbit-python/anti-diagonals.py
sanketg186/100DaysOfCode
d44c7d4ac7b3fcf0cb91ab027a4cca133e433209
[ "MIT" ]
null
null
null
# Anti Diagonals # Input: # 1 2 3 # 4 5 6 # 7 8 9 # Return the following : # [ # [1], # [2, 4], # [3, 5, 7], # [6, 8], # [9] # ] class Solution: # @param A : list of list of integers # @return a list of list of integers def diagonal(self, A): r = len(A) c = len(A[0]) ...
16.266667
43
0.438525
class Solution: def diagonal(self, A): r = len(A) c = len(A[0]) res = [[] for i in range(0,r+c-1)] for i in range(0,r): for j in range(0,c): res[i+j].append(A[i][j]) return res
true
true
f7ff5f0c7aab140b1cc2fc163f8c182922aff288
8,919
py
Python
spring-2019-models/scripts/variables.py
ual/ual_model_workspace
2debccedb176d1fe5476f6c8c84d86f411612019
[ "BSD-3-Clause" ]
1
2019-02-20T00:10:49.000Z
2019-02-20T00:10:49.000Z
spring-2019-models/scripts/variables.py
ual/ual_model_workspace
2debccedb176d1fe5476f6c8c84d86f411612019
[ "BSD-3-Clause" ]
1
2019-02-06T00:50:20.000Z
2019-02-06T00:50:20.000Z
spring-2019-models/scripts/variables.py
ual/ual_model_workspace
2debccedb176d1fe5476f6c8c84d86f411612019
[ "BSD-3-Clause" ]
1
2019-02-20T00:22:40.000Z
2019-02-20T00:22:40.000Z
import orca from urbansim.utils import misc ######################### # ZONES VARIABLES # ######################### # these are primarily used for calculating skim-based # acccessibilities @orca.column('zones', cache=True) def total_jobs(jobs, zones): return jobs.zone_id_work.groupby( jobs.zone_i...
25.266289
90
0.666442
import orca from urbansim.utils import misc parcel_id).sum().groupby(parcels.zone_id).sum() return s.reindex(zones.index).fillna(0) @orca.column('zones', cache=True) def sum_income(households, buildings, parcels, zones): s = households.income.groupby( households.building_id).sum().groupby( b...
true
true
f7ff60911bd3729c133306dd12a054998bd9199f
4,317
py
Python
llvmpy/src/MC/__init__.py
KennethNielsen/llvmpy
70c5957cfd10f1e32a44f28dcb9a4dc72d499c2e
[ "BSD-3-Clause" ]
140
2015-01-07T20:58:12.000Z
2022-01-21T17:02:21.000Z
llvmpy/src/MC/__init__.py
KennethNielsen/llvmpy
70c5957cfd10f1e32a44f28dcb9a4dc72d499c2e
[ "BSD-3-Clause" ]
19
2015-01-15T14:45:49.000Z
2020-09-04T14:58:23.000Z
llvmpy/src/MC/__init__.py
KennethNielsen/llvmpy
70c5957cfd10f1e32a44f28dcb9a4dc72d499c2e
[ "BSD-3-Clause" ]
12
2015-01-12T01:49:32.000Z
2020-07-10T22:30:38.000Z
#this file is not processed unless the llvm library is #version 3.4 or higher. see llvmpy/__init__.py for details. from binding import * from ..namespace import llvm from ..Support.StringRefMemoryObject import MemoryObject from ..Support.raw_ostream import raw_ostream from src.ADT.StringRef import StringRef MCSubtarge...
27.322785
73
0.67987
from binding import * from ..namespace import llvm from ..Support.StringRefMemoryObject import MemoryObject from ..Support.raw_ostream import raw_ostream from src.ADT.StringRef import StringRef MCSubtargetInfo = llvm.Class() MCDisassembler = llvm.Class() MCInst = llvm.Class() MCOperand = llvm.Class() MCExpr = llvm.C...
true
true
f7ff637ca69f18fad1d65b1ecc8628716b6b449e
8,645
py
Python
code/src/main/python/analysis/helpers/ast_utils.py
anonfse/COSAL_Anonymized
709906294fd775131f3e019862bbdd554d83773d
[ "Unlicense" ]
null
null
null
code/src/main/python/analysis/helpers/ast_utils.py
anonfse/COSAL_Anonymized
709906294fd775131f3e019862bbdd554d83773d
[ "Unlicense" ]
1
2021-11-03T08:28:31.000Z
2021-11-03T08:28:31.000Z
code/src/main/python/analysis/helpers/ast_utils.py
anonfse/COSAL_Anonymized
709906294fd775131f3e019862bbdd554d83773d
[ "Unlicense" ]
1
2022-03-22T14:24:13.000Z
2022-03-22T14:24:13.000Z
import sys import os sys.path.append(os.path.abspath(".")) sys.dont_write_bytecode = True __author__ = "COSAL" import ast import astor import astpretty import asttokens import keyword import textwrap import tokenize from io import StringIO __KEYWORDS = None IGNORE_TERMS = {"init", "args", "kwargs", "kwds", "self...
29.010067
105
0.705032
import sys import os sys.path.append(os.path.abspath(".")) sys.dont_write_bytecode = True __author__ = "COSAL" import ast import astor import astpretty import asttokens import keyword import textwrap import tokenize from io import StringIO __KEYWORDS = None IGNORE_TERMS = {"init", "args", "kwargs", "kwds", "self...
true
true
f7ff63d694a47b6fa751918e37b20339dee82a76
5,155
py
Python
doex/rcbd.py
rohitsanj/doe
d1fe3629dfe3fb789dfe42b072c2682581a9ae90
[ "BSD-3-Clause" ]
11
2020-10-15T12:11:00.000Z
2022-01-17T06:45:36.000Z
doex/rcbd.py
rohitsanj/doe
d1fe3629dfe3fb789dfe42b072c2682581a9ae90
[ "BSD-3-Clause" ]
16
2020-10-15T12:39:11.000Z
2020-11-03T17:37:09.000Z
doex/rcbd.py
rohitsanj/doe
d1fe3629dfe3fb789dfe42b072c2682581a9ae90
[ "BSD-3-Clause" ]
1
2020-10-15T13:31:23.000Z
2020-10-15T13:31:23.000Z
import numpy as np from .utils import p_value, create_anova_table, multiple_comparisons class RandomizedCompleteBlockDesign: def __init__(self, data): self.data = np.array(data) n_treatments, n_blocks = self.data.shape if hasattr(self, "num_missing"): num_missing = self.num_...
32.21875
95
0.576528
import numpy as np from .utils import p_value, create_anova_table, multiple_comparisons class RandomizedCompleteBlockDesign: def __init__(self, data): self.data = np.array(data) n_treatments, n_blocks = self.data.shape if hasattr(self, "num_missing"): num_missing = self.num_...
true
true
f7ff646590489831f35fa9fe7ca9c0fe9f2f76be
592
py
Python
ProjectEuler_plus/euler_042.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
ProjectEuler_plus/euler_042.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
ProjectEuler_plus/euler_042.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys from math import sqrt # (n * (n + 1)) / 2 -> n ** 2 + n - (2 * x) # Solved with quadratic equation # https://en.wikipedia.org/wiki/Quadratic_equation for _ in range(int(input().strip())): t = int(input().strip()) d = (sqrt(4 * 2 * t + 1) - 1) if d.is_integer(): ...
21.925926
52
0.489865
import sys from math import sqrt for _ in range(int(input().strip())): t = int(input().strip()) d = (sqrt(4 * 2 * t + 1) - 1) if d.is_integer(): print(int(d) // 2) else: print(-1) def e42(): for _ in range(int(input().strip())): n = int(input().strip()) root ...
true
true
f7ff649ffed8e7a7e3e3be786fab36a5e6e14591
2,601
py
Python
src/decisionengine/framework/dataspace/datasources/sqlalchemy_ds/utils.py
moibenko/decisionengine
4c458e0c225ec2ce1e82d56e752724983331b7d1
[ "Apache-2.0" ]
null
null
null
src/decisionengine/framework/dataspace/datasources/sqlalchemy_ds/utils.py
moibenko/decisionengine
4c458e0c225ec2ce1e82d56e752724983331b7d1
[ "Apache-2.0" ]
null
null
null
src/decisionengine/framework/dataspace/datasources/sqlalchemy_ds/utils.py
moibenko/decisionengine
4c458e0c225ec2ce1e82d56e752724983331b7d1
[ "Apache-2.0" ]
null
null
null
# SPDX-FileCopyrightText: 2017 Fermi Research Alliance, LLC # SPDX-License-Identifier: Apache-2.0 """ Code not written by us """ import os import sqlalchemy import structlog from decisionengine.framework.modules.logging_configDict import LOGGERNAME __all__ = ["orm_as_dict", "clone_model", "add_engine_pidguard"]...
36.633803
121
0.688966
import os import sqlalchemy import structlog from decisionengine.framework.modules.logging_configDict import LOGGERNAME __all__ = ["orm_as_dict", "clone_model", "add_engine_pidguard"] def orm_as_dict(obj): return {c.key: getattr(obj, c.key) for c in sqlalchemy.inspect(obj).mapper.column_attrs} def clone_m...
true
true
f7ff675f73a1e7d04318c420bc49893e895219be
2,943
py
Python
tests/test_class_oelint_vars_appendop.py
QuakeSaver/oelint-adv
e03617b51c7ebdeb8ea245eb61da3e3e03195b37
[ "BSD-2-Clause" ]
null
null
null
tests/test_class_oelint_vars_appendop.py
QuakeSaver/oelint-adv
e03617b51c7ebdeb8ea245eb61da3e3e03195b37
[ "BSD-2-Clause" ]
null
null
null
tests/test_class_oelint_vars_appendop.py
QuakeSaver/oelint-adv
e03617b51c7ebdeb8ea245eb61da3e3e03195b37
[ "BSD-2-Clause" ]
null
null
null
import pytest from base import TestBaseClass class TestClassOelintVarAppendOp(TestBaseClass): @pytest.mark.parametrize('id', ['oelint.vars.appendop']) @pytest.mark.parametrize('occurrence', [1]) @pytest.mark.parametrize('input', [ { 'oelint_adv_test.bb': ''' ...
21.639706
67
0.285423
import pytest from base import TestBaseClass class TestClassOelintVarAppendOp(TestBaseClass): @pytest.mark.parametrize('id', ['oelint.vars.appendop']) @pytest.mark.parametrize('occurrence', [1]) @pytest.mark.parametrize('input', [ { 'oelint_adv_test.bb': ''' ...
true
true
f7ff6802205c2f38671825e0135c21da6f9045a2
921
py
Python
pytglib/api/functions/set_chat_description.py
iTeam-co/pytglib
e5e75e0a85f89b77762209b32a61b0a883c0ae61
[ "MIT" ]
6
2019-10-30T08:57:27.000Z
2021-02-08T14:17:43.000Z
pytglib/api/functions/set_chat_description.py
iTeam-co/python-telegram
e5e75e0a85f89b77762209b32a61b0a883c0ae61
[ "MIT" ]
1
2021-08-19T05:44:10.000Z
2021-08-19T07:14:56.000Z
pytglib/api/functions/set_chat_description.py
iTeam-co/python-telegram
e5e75e0a85f89b77762209b32a61b0a883c0ae61
[ "MIT" ]
5
2019-12-04T05:30:39.000Z
2021-05-21T18:23:32.000Z
from ..utils import Object class SetChatDescription(Object): """ Changes information about a chat. Available for basic groups, supergroups, and channels. Requires can_change_info rights Attributes: ID (:obj:`str`): ``SetChatDescription`` Args: chat_id (:obj:`int`): Ide...
24.891892
125
0.618893
from ..utils import Object class SetChatDescription(Object): ID = "setChatDescription" def __init__(self, chat_id, description, extra=None, **kwargs): self.extra = extra self.chat_id = chat_id self.description = description @staticmethod def read(q: dict, *args) -> "Set...
true
true
f7ff69dd8a529c57831e0f5e1a8547468a95d4f4
27,749
py
Python
tf2onnx/rewriter/custom_rnn_rewriter.py
anttisaukko/tensorflow-onnx
1341bdf476df6023b75bc6b3c6e4cda00cc58a29
[ "MIT" ]
null
null
null
tf2onnx/rewriter/custom_rnn_rewriter.py
anttisaukko/tensorflow-onnx
1341bdf476df6023b75bc6b3c6e4cda00cc58a29
[ "MIT" ]
null
null
null
tf2onnx/rewriter/custom_rnn_rewriter.py
anttisaukko/tensorflow-onnx
1341bdf476df6023b75bc6b3c6e4cda00cc58a29
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT license. """ tf2onnx.rewriter.custom_rnn_rewriter - custom rnn support """ from __future__ import division from __future__ import print_function import logging import sys from onnx import helper, onnx_pb import numpy as np from tf2on...
47.112054
120
0.635843
from __future__ import division from __future__ import print_function import logging import sys from onnx import helper, onnx_pb import numpy as np from tf2onnx.graph import Graph, Node from tf2onnx.graph_matcher import OpTypePattern, GraphMatcher from tf2onnx.rewriter.loop_rewriter_base import LoopRewriterBase, Co...
true
true
f7ff6c49d953004c2a377d68536f176a987103eb
3,796
py
Python
tensorflow_datasets/image/cats_vs_dogs.py
Suhasnama/datasets
1259b2329825dfee02ab1925f41d00756d9e7bdc
[ "Apache-2.0" ]
1
2020-04-14T08:08:48.000Z
2020-04-14T08:08:48.000Z
tensorflow_datasets/image/cats_vs_dogs.py
Suhasnama/datasets
1259b2329825dfee02ab1925f41d00756d9e7bdc
[ "Apache-2.0" ]
null
null
null
tensorflow_datasets/image/cats_vs_dogs.py
Suhasnama/datasets
1259b2329825dfee02ab1925f41d00756d9e7bdc
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2020 The TensorFlow Datasets Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
35.476636
138
0.681507
from __future__ import absolute_import from __future__ import division from __future__ import print_function import re from absl import logging import tensorflow.compat.v2 as tf import tensorflow_datasets.public_api as tfds _CITATION = """\ @Inproceedings (Conference){asirra-a-captcha-that-exploits-i...
true
true
f7ff6ca28ba89ed9483e81796f69515f8928422c
2,484
py
Python
mopidy_tidal/lru_cache.py
tbjep/mopidy-tidal
edc9b181e4e0da32bfc9dbe4a5f073996b4e183b
[ "Apache-2.0" ]
30
2016-02-08T11:58:15.000Z
2020-02-09T16:16:39.000Z
mopidy_tidal/lru_cache.py
tbjep/mopidy-tidal
edc9b181e4e0da32bfc9dbe4a5f073996b4e183b
[ "Apache-2.0" ]
37
2020-02-27T04:45:54.000Z
2022-03-08T14:28:51.000Z
mopidy_tidal/lru_cache.py
tbjep/mopidy-tidal
edc9b181e4e0da32bfc9dbe4a5f073996b4e183b
[ "Apache-2.0" ]
16
2020-05-02T22:41:19.000Z
2022-01-19T16:24:09.000Z
from __future__ import unicode_literals import logging from collections import OrderedDict logger = logging.getLogger(__name__) class LruCache(OrderedDict): def __init__(self, max_size=1024): if max_size <= 0: raise ValueError('Invalid size') OrderedDict.__init__(self) self...
27
79
0.590177
from __future__ import unicode_literals import logging from collections import OrderedDict logger = logging.getLogger(__name__) class LruCache(OrderedDict): def __init__(self, max_size=1024): if max_size <= 0: raise ValueError('Invalid size') OrderedDict.__init__(self) self...
true
true
f7ff6cade14a512b896f80b1e90d97c72e5c43ee
2,900
py
Python
CNN/dpp_regression.py
phillnguyen/schnablelab
2e7803ed82489880d79ac0c7bce39857de5e4547
[ "BSD-2-Clause" ]
null
null
null
CNN/dpp_regression.py
phillnguyen/schnablelab
2e7803ed82489880d79ac0c7bce39857de5e4547
[ "BSD-2-Clause" ]
null
null
null
CNN/dpp_regression.py
phillnguyen/schnablelab
2e7803ed82489880d79ac0c7bce39857de5e4547
[ "BSD-2-Clause" ]
null
null
null
""" train neural network to detect whether plant flowers or not """ import warnings warnings.filterwarnings('ignore',category=FutureWarning) from glob import glob import numpy as np import pickle import deepplantphenomics as dpp from pathlib import Path import os import sys def train(train_dir, label_fn, model_dir, ep...
40.84507
156
0.761034
import warnings warnings.filterwarnings('ignore',category=FutureWarning) from glob import glob import numpy as np import pickle import deepplantphenomics as dpp from pathlib import Path import os import sys def train(train_dir, label_fn, model_dir, epoch, lr): model_dir_path = Path(model_dir) if not model_dir_...
true
true
f7ff6cd6405ede361a727ed253af152ccdedc331
4,352
py
Python
srs/main.py
ConnerZhao/FRES
a6d82065eedf90ffaad91b242488e4aef844033d
[ "MIT" ]
null
null
null
srs/main.py
ConnerZhao/FRES
a6d82065eedf90ffaad91b242488e4aef844033d
[ "MIT" ]
null
null
null
srs/main.py
ConnerZhao/FRES
a6d82065eedf90ffaad91b242488e4aef844033d
[ "MIT" ]
null
null
null
import tkinter from tkinter import * from tkinter import messagebox import cv2 import numpy as np from keras.preprocessing import image import warnings warnings.filterwarnings("ignore") from keras.preprocessing.image import load_img, img_to_array from keras.models import load_model import matplotlib.pyplot...
38.857143
152
0.61443
import tkinter from tkinter import * from tkinter import messagebox import cv2 import numpy as np from keras.preprocessing import image import warnings warnings.filterwarnings("ignore") from keras.preprocessing.image import load_img, img_to_array from keras.models import load_model import matplotlib.pyplot...
true
true
f7ff6db84a576f42b732b2559f58456c3d11a750
3,429
py
Python
mne/utils/__init__.py
kalenkovich/mne-python
d5752051b37f74713233929382bcc632d404f837
[ "BSD-3-Clause" ]
null
null
null
mne/utils/__init__.py
kalenkovich/mne-python
d5752051b37f74713233929382bcc632d404f837
[ "BSD-3-Clause" ]
null
null
null
mne/utils/__init__.py
kalenkovich/mne-python
d5752051b37f74713233929382bcc632d404f837
[ "BSD-3-Clause" ]
null
null
null
# # # WARNING # # # # This list must also be updated in doc/_templates/autosummary/class.rst if it # is changed here! _doc_special_members = ('__contains__', '__getitem__', '__iter__', '__len__', '__add__', '__sub__', '__mul__', '__div__', '__neg__', '__hash__') from ._b...
63.5
82
0.654418
, '__getitem__', '__iter__', '__len__', '__add__', '__sub__', '__mul__', '__div__', '__neg__', '__hash__') from ._bunch import Bunch, BunchConst, BunchConstNamed from .check import (check_fname, check_version, check_random_state, _check_fname, _check_...
true
true
f7ff6dcf85ca9b9c6c31034aedc75c0b3c1ed25e
975
py
Python
tests/t-mime-type.py
kurtace72/lighttpd2
505bfb053f481b39ffd0f03336e4a8511f45883e
[ "Apache-2.0" ]
395
2015-01-29T04:12:27.000Z
2022-03-21T21:25:15.000Z
tests/t-mime-type.py
kurtace72/lighttpd2
505bfb053f481b39ffd0f03336e4a8511f45883e
[ "Apache-2.0" ]
2
2016-11-30T19:09:02.000Z
2016-11-30T19:34:26.000Z
tests/t-mime-type.py
kurtace72/lighttpd2
505bfb053f481b39ffd0f03336e4a8511f45883e
[ "Apache-2.0" ]
122
2015-01-12T19:56:31.000Z
2021-08-14T12:56:26.000Z
# -*- coding: utf-8 -*- from base import * from requests import * class TestMimeType1(CurlRequest): URL = "/test.txt" EXPECT_RESPONSE_BODY = "" EXPECT_RESPONSE_CODE = 200 EXPECT_RESPONSE_HEADERS = [ ("Content-Type", "text/plain; charset=utf-8") ] class TestMimeType2(CurlRequest): URL = "/test.xt" EXPECT_RESPO...
24.375
76
0.688205
from base import * from requests import * class TestMimeType1(CurlRequest): URL = "/test.txt" EXPECT_RESPONSE_BODY = "" EXPECT_RESPONSE_CODE = 200 EXPECT_RESPONSE_HEADERS = [ ("Content-Type", "text/plain; charset=utf-8") ] class TestMimeType2(CurlRequest): URL = "/test.xt" EXPECT_RESPONSE_BODY = "" EXPECT_R...
true
true
f7ff6e93efff78a32e7e58397f3b1f7553f3bc84
864
py
Python
lib/s3dump/errors/__init__.py
Placidina/s3dump
9a34ef31e862f899c5cd77a7f6d8d2b3fdfab990
[ "MIT" ]
null
null
null
lib/s3dump/errors/__init__.py
Placidina/s3dump
9a34ef31e862f899c5cd77a7f6d8d2b3fdfab990
[ "MIT" ]
null
null
null
lib/s3dump/errors/__init__.py
Placidina/s3dump
9a34ef31e862f899c5cd77a7f6d8d2b3fdfab990
[ "MIT" ]
null
null
null
from __future__ import (absolute_import, division, print_function) __metaclass__ = type from s3dump.utils._text import to_native class S3DumpError(Exception): def __init__(self, message="", obj=None, show_content=True, suppress_extended_error=False, orig_exc=None): super(S3DumpError, self).__init__(messa...
22.736842
110
0.703704
from __future__ import (absolute_import, division, print_function) __metaclass__ = type from s3dump.utils._text import to_native class S3DumpError(Exception): def __init__(self, message="", obj=None, show_content=True, suppress_extended_error=False, orig_exc=None): super(S3DumpError, self).__init__(messa...
true
true
f7ff6ee0745459b5987f9d4a603923efcff50432
3,763
py
Python
pretrain.py
adarshchbs/adda_sketch
25f7adf3563d8e1edb8c431fb93876bbed4d4e76
[ "MIT" ]
null
null
null
pretrain.py
adarshchbs/adda_sketch
25f7adf3563d8e1edb8c431fb93876bbed4d4e76
[ "MIT" ]
null
null
null
pretrain.py
adarshchbs/adda_sketch
25f7adf3563d8e1edb8c431fb93876bbed4d4e76
[ "MIT" ]
null
null
null
from torch import nn from torch import optim import torch import params from utils import make_variable, save_model from preprocess import preprocess_image def train_src( source_encoder, source_classifier, data_loader, gpu_flag = False, gpu_name = 'cuda:0' ): # source_classifier.train() # source_encoder.trai...
33.008772
103
0.55966
from torch import nn from torch import optim import torch import params from utils import make_variable, save_model from preprocess import preprocess_image def train_src( source_encoder, source_classifier, data_loader, gpu_flag = False, gpu_name = 'cuda:0' ): optimizer = optim.Adam( list(source_c...
true
true
f7ff6f0d1fe91e309dc36442a2d0a4699af5f342
1,977
py
Python
src/masonite/drivers/authentication/AuthTokenDriver.py
erhuabushuo/masonite1
5fd90bbcd1d3ab6a34c9cefea463c5fd5ff9b3a5
[ "MIT" ]
null
null
null
src/masonite/drivers/authentication/AuthTokenDriver.py
erhuabushuo/masonite1
5fd90bbcd1d3ab6a34c9cefea463c5fd5ff9b3a5
[ "MIT" ]
null
null
null
src/masonite/drivers/authentication/AuthTokenDriver.py
erhuabushuo/masonite1
5fd90bbcd1d3ab6a34c9cefea463c5fd5ff9b3a5
[ "MIT" ]
null
null
null
"""AuthTokenDriver Module.""" from ...contracts import AuthContract from ...drivers import BaseDriver from ...app import App class AuthTokenDriver(BaseDriver, AuthContract): def __init__(self, app: App): """AuthTokenDriver initializer. Arguments: request {masonite.request.Request} --...
26.36
77
0.560445
from ...contracts import AuthContract from ...drivers import BaseDriver from ...app import App class AuthTokenDriver(BaseDriver, AuthContract): def __init__(self, app: App): self.app = app def user(self, auth_model): request = self.app.make("Request") authorization = request.header("...
true
true
f7ff6f29c42dd8aba1b73df957f103208197a748
244
py
Python
config.py
n1k0ver3E/NFT_Monitor
ea9bc824590825d72560795ad153602d5f35a32b
[ "MIT" ]
5
2021-10-30T03:59:20.000Z
2021-12-24T08:51:39.000Z
config.py
n1k0ver3E/NFT_Monitor
ea9bc824590825d72560795ad153602d5f35a32b
[ "MIT" ]
1
2021-12-03T15:01:35.000Z
2021-12-06T11:59:42.000Z
config.py
n1k0ver3E/NFT_Monitor
ea9bc824590825d72560795ad153602d5f35a32b
[ "MIT" ]
3
2021-11-15T11:05:01.000Z
2022-02-18T01:50:18.000Z
params = { "TOTAL_SUPPLY": 10000, "TEST_BOT_TOKEN" : "", "PROD_BOT_TOKEN" : "", "COLLECTION_CONTRACT_ADDRESS" : "0x0a8901b0e25deb55a87524f0cc164e9644020eba", "CONTRACT_ADDRESS": "0x17539cca21c7933df5c980172d22659b8c345c5a" }
34.857143
81
0.729508
params = { "TOTAL_SUPPLY": 10000, "TEST_BOT_TOKEN" : "", "PROD_BOT_TOKEN" : "", "COLLECTION_CONTRACT_ADDRESS" : "0x0a8901b0e25deb55a87524f0cc164e9644020eba", "CONTRACT_ADDRESS": "0x17539cca21c7933df5c980172d22659b8c345c5a" }
true
true
f7ff70ee444017888450bf4f7b266c07709c39ff
1,342
py
Python
main/migrations/0001_initial.py
Emmastro/africanlibraries
6755dd5a7d3453c7ba6e63d49071f9f5af280f71
[ "Apache-2.0" ]
null
null
null
main/migrations/0001_initial.py
Emmastro/africanlibraries
6755dd5a7d3453c7ba6e63d49071f9f5af280f71
[ "Apache-2.0" ]
null
null
null
main/migrations/0001_initial.py
Emmastro/africanlibraries
6755dd5a7d3453c7ba6e63d49071f9f5af280f71
[ "Apache-2.0" ]
null
null
null
# Generated by Django 4.0.2 on 2022-02-18 18:52 import django.contrib.auth.models from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('account', '0001_initial'), ] operations = [ migration...
31.952381
191
0.557377
import django.contrib.auth.models from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('account', '0001_initial'), ] operations = [ migrations.CreateModel( name='Payment', ...
true
true
f7ff72d1afddf700afb1487426bc4bfd6bebd700
5,409
py
Python
lib/datasets/factory.py
denglixi/faster-rcnn.pytorch
12158fa2ec998ba3733a4696b7a4e08a35c157e3
[ "MIT" ]
null
null
null
lib/datasets/factory.py
denglixi/faster-rcnn.pytorch
12158fa2ec998ba3733a4696b7a4e08a35c157e3
[ "MIT" ]
null
null
null
lib/datasets/factory.py
denglixi/faster-rcnn.pytorch
12158fa2ec998ba3733a4696b7a4e08a35c157e3
[ "MIT" ]
null
null
null
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- """Factory method for easily getting imdbs by name.""" from __future__ ...
40.669173
207
0.623405
from __future__ import absolute_import from __future__ import division from __future__ import print_function from datasets.pascal_voc import pascal_voc from datasets.coco import coco from datasets.imagenet import imagenet from datasets.vg import vg from datasets.food import food from datasets.food_data import f...
true
true
f7ff73ce0ff4e0c6ce61f52c4d633a5c530abd7b
2,965
py
Python
youtubeplayer/src/YouTubeAddPlayList.py
TwolDE2/enigma2-plugins
06685a5ce6a65a8724d3b32c8f7906714650ca2c
[ "OLDAP-2.3" ]
30
2015-05-08T22:10:00.000Z
2022-03-13T22:09:31.000Z
youtubeplayer/src/YouTubeAddPlayList.py
TwolDE2/enigma2-plugins
06685a5ce6a65a8724d3b32c8f7906714650ca2c
[ "OLDAP-2.3" ]
124
2015-04-27T21:30:48.000Z
2022-03-29T10:21:39.000Z
youtubeplayer/src/YouTubeAddPlayList.py
TwolDE2/enigma2-plugins
06685a5ce6a65a8724d3b32c8f7906714650ca2c
[ "OLDAP-2.3" ]
193
2015-01-10T09:21:26.000Z
2022-03-21T08:19:33.000Z
from __future__ import absolute_import ############################################################################ # Copyright (C) 2008 by Volker Christian # # Volker.Christian@fh-hagenberg.at # # ...
41.760563
92
0.594266
from __future__ import absolute_import
true
true
f7ff75b5a3d6527654c7677b64c264d80246c1f3
167
py
Python
Algorithms/10-Regular_Expression_Matching.py
PrismSpirit/Leetcode
5444fe5274abe0e8c2f15c365d4e81a078511c0b
[ "MIT" ]
null
null
null
Algorithms/10-Regular_Expression_Matching.py
PrismSpirit/Leetcode
5444fe5274abe0e8c2f15c365d4e81a078511c0b
[ "MIT" ]
null
null
null
Algorithms/10-Regular_Expression_Matching.py
PrismSpirit/Leetcode
5444fe5274abe0e8c2f15c365d4e81a078511c0b
[ "MIT" ]
null
null
null
import re class Solution: def isMatch(self, s: str, p: str) -> bool: if re.fullmatch(p, s): return True else: return False
20.875
46
0.520958
import re class Solution: def isMatch(self, s: str, p: str) -> bool: if re.fullmatch(p, s): return True else: return False
true
true
f7ff762a24e5e6fb13bc8f7e21fa0a320773288c
1,223
py
Python
ml/models/random_forest.py
refactoring-ai/Machine-Learning
908d35322a06a7b1709d83f731033a939a864c6b
[ "MIT" ]
5
2020-09-02T19:46:37.000Z
2021-04-21T15:41:11.000Z
ml/models/random_forest.py
refactoring-ai/Machine-Learning
908d35322a06a7b1709d83f731033a939a864c6b
[ "MIT" ]
16
2020-08-04T08:07:50.000Z
2021-03-23T08:15:30.000Z
ml/models/random_forest.py
refactoring-ai/Machine-Learning
908d35322a06a7b1709d83f731033a939a864c6b
[ "MIT" ]
1
2021-04-17T18:34:47.000Z
2021-04-17T18:34:47.000Z
from sklearn.ensemble import RandomForestClassifier from configs import CORE_COUNT, SEED from ml.models.base import SupervisedMLRefactoringModel class RandomForestRefactoringModel(SupervisedMLRefactoringModel): def feature_reduction(self) -> bool: return False def params_to_tune(self): retur...
34.942857
67
0.604252
from sklearn.ensemble import RandomForestClassifier from configs import CORE_COUNT, SEED from ml.models.base import SupervisedMLRefactoringModel class RandomForestRefactoringModel(SupervisedMLRefactoringModel): def feature_reduction(self) -> bool: return False def params_to_tune(self): retur...
true
true
f7ff76b26de96e2fb9e62d2c50c5eda84862e2b2
11,132
py
Python
tests/test_hvactemplatezonefancoil.py
marcelosalles/pyidf
c2f744211572b5e14e29522aac1421ba88addb0e
[ "Apache-2.0" ]
19
2015-12-08T23:33:51.000Z
2022-01-31T04:41:10.000Z
tests/test_hvactemplatezonefancoil.py
marcelosalles/pyidf
c2f744211572b5e14e29522aac1421ba88addb0e
[ "Apache-2.0" ]
2
2019-10-04T10:57:00.000Z
2021-10-01T06:46:17.000Z
tests/test_hvactemplatezonefancoil.py
marcelosalles/pyidf
c2f744211572b5e14e29522aac1421ba88addb0e
[ "Apache-2.0" ]
7
2015-11-04T02:25:01.000Z
2021-12-08T03:14:28.000Z
import os import tempfile import unittest import logging from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.hvac_templates import HvactemplateZoneFanCoil log = logging.getLogger(__name__) class TestHvactemplateZoneFanCoil(unittest.TestCase): def setUp(self): self.fd, self...
65.482353
177
0.801922
import os import tempfile import unittest import logging from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.hvac_templates import HvactemplateZoneFanCoil log = logging.getLogger(__name__) class TestHvactemplateZoneFanCoil(unittest.TestCase): def setUp(self): self.fd, self...
true
true
f7ff76ebf8e6a32ea44e8ab33b0745f0ef10439a
12,844
py
Python
Homework4/ars_motion_controller_pid/source/ars_motion_controller.py
Moado/Robotics-ROS
c5aca2dffa6c5c9376e1cda8624ed611ffb11ca0
[ "MIT" ]
null
null
null
Homework4/ars_motion_controller_pid/source/ars_motion_controller.py
Moado/Robotics-ROS
c5aca2dffa6c5c9376e1cda8624ed611ffb11ca0
[ "MIT" ]
null
null
null
Homework4/ars_motion_controller_pid/source/ars_motion_controller.py
Moado/Robotics-ROS
c5aca2dffa6c5c9376e1cda8624ed611ffb11ca0
[ "MIT" ]
null
null
null
#!/usr/bin/env python import numpy as np from numpy import * import os # ROS import rospy import tf_conversions as tf # import ars_lib_helpers # import ars_pid class ArsMotionController: ####### # References # flag_set_robot_pose_ref = False robot_posi_ref = None robot_atti_quat_simp_ref = No...
29.391304
144
0.726721
import numpy as np from numpy import * import os import rospy import tf_conversions as tf import ars_lib_helpers import ars_pid class ArsMotionController: bot_pose_ref = False robot_posi_ref = None robot_atti_quat_simp_ref = None flag_set_robot_velo_world_ref = False robot_velo_lin_world_...
true
true
f7ff78e6293ad62ee1fdfc0d88cca35dc02c1cdc
17,243
py
Python
src/transformers/models/auto/modeling_tf_auto.py
HimashiRathnayake/adapter-transformers
d9c06ecbf4aaa33756e848b8fc5b3ec65f5ff4f4
[ "Apache-2.0" ]
50,404
2019-09-26T09:55:55.000Z
2022-03-31T23:07:49.000Z
src/transformers/models/auto/modeling_tf_auto.py
HimashiRathnayake/adapter-transformers
d9c06ecbf4aaa33756e848b8fc5b3ec65f5ff4f4
[ "Apache-2.0" ]
13,179
2019-09-26T10:10:57.000Z
2022-03-31T23:17:08.000Z
src/transformers/models/auto/modeling_tf_auto.py
HimashiRathnayake/adapter-transformers
d9c06ecbf4aaa33756e848b8fc5b3ec65f5ff4f4
[ "Apache-2.0" ]
13,337
2019-09-26T10:49:38.000Z
2022-03-31T23:06:17.000Z
# coding=utf-8 # Copyright 2018 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
39.914352
123
0.703764
import warnings from collections import OrderedDict from ...utils import logging from .auto_factory import _BaseAutoModelClass, _LazyAutoMapping, auto_class_update from .configuration_auto import CONFIG_MAPPING_NAMES logger = logging.get_logger(__name__) TF_MODEL_MAPPING_NAMES = OrderedDict( [ ...
true
true
f7ff79584cdf675446a8a621aec105ad61a6a348
5,543
py
Python
tonos_ts4/ts4.py
NilFoundation/ton-TestSuite4
abc1921e9ec2a9c237daf271bb550ee458ac6565
[ "Apache-2.0" ]
null
null
null
tonos_ts4/ts4.py
NilFoundation/ton-TestSuite4
abc1921e9ec2a9c237daf271bb550ee458ac6565
[ "Apache-2.0" ]
null
null
null
tonos_ts4/ts4.py
NilFoundation/ton-TestSuite4
abc1921e9ec2a9c237daf271bb550ee458ac6565
[ "Apache-2.0" ]
null
null
null
""" This file is part of TON OS. TON OS is free software: you can redistribute it and/or modify it under the terms of the Apache License 2.0 (http://www.apache.org/licenses/) Copyright 2019-2021 (c) TON LABS """ import sys import base64 import secrets import json import numbers import re import copy ...
34.861635
105
0.593541
import sys import base64 import secrets import json import numbers import re import copy import os.path from glob import glob from .util import * from .address import * from .abi import * from .decoder import * from .dump import * from .global_functions import * from .globals import core f...
true
true
f7ff7a1fbbaa2864b7bdc620350cbc87eee65920
43,193
py
Python
scripts/gen-s-parser.py
stagas/binaryen
a440c7697875e5fcc046370b40295f6dffe44ee0
[ "Apache-2.0" ]
null
null
null
scripts/gen-s-parser.py
stagas/binaryen
a440c7697875e5fcc046370b40295f6dffe44ee0
[ "Apache-2.0" ]
null
null
null
scripts/gen-s-parser.py
stagas/binaryen
a440c7697875e5fcc046370b40295f6dffe44ee0
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # # Copyright 2018 WebAssembly Community Group participants # # 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 # # Unles...
60.157382
97
0.600745
import sys instructions = [ ("unreachable", "makeUnreachable()"), ("nop", "makeNop()"), ("block", "makeBlock(s)"), ("loop", "makeLoop(s)"), ("if", "makeIf(s)"), ("then", "makeThenOrElse(s)"), ("else", "makeThen...
true
true
f7ff7a67c3e28d9981f94d4387fc28f505ae5a02
99
py
Python
pycaprio/core/interfaces/types.py
reckart/pycaprio
1d030ecd97cb324e404c16520fe6250c49c3bb06
[ "MIT" ]
9
2019-08-27T11:21:07.000Z
2021-03-11T15:41:44.000Z
pycaprio/core/interfaces/types.py
reckart/pycaprio
1d030ecd97cb324e404c16520fe6250c49c3bb06
[ "MIT" ]
25
2019-09-03T11:05:18.000Z
2021-04-18T15:57:33.000Z
pycaprio/core/interfaces/types.py
reckart/pycaprio
1d030ecd97cb324e404c16520fe6250c49c3bb06
[ "MIT" ]
6
2019-10-02T16:51:10.000Z
2021-03-11T15:41:52.000Z
from typing import Tuple authentication_type = Tuple[str, str] status_list_type = Tuple[int, ...]
19.8
37
0.757576
from typing import Tuple authentication_type = Tuple[str, str] status_list_type = Tuple[int, ...]
true
true
f7ff7b8107ee18469aae32781ef7c03d3f35faa9
777
py
Python
room/views.py
josemmercado96/hotel-bookings
dc2b96f8e0ca49df30f490d5c25d8b02c873fcdd
[ "MIT" ]
null
null
null
room/views.py
josemmercado96/hotel-bookings
dc2b96f8e0ca49df30f490d5c25d8b02c873fcdd
[ "MIT" ]
null
null
null
room/views.py
josemmercado96/hotel-bookings
dc2b96f8e0ca49df30f490d5c25d8b02c873fcdd
[ "MIT" ]
null
null
null
from django.http import HttpResponse, JsonResponse from django.views.decorators.csrf import csrf_exempt from rest_framework.parsers import JSONParser from room.models import Room from room.serializers import RoomSerializer @csrf_exempt def room_list(request): if request.method == 'GET': rooms = Room.obje...
32.375
60
0.714286
from django.http import HttpResponse, JsonResponse from django.views.decorators.csrf import csrf_exempt from rest_framework.parsers import JSONParser from room.models import Room from room.serializers import RoomSerializer @csrf_exempt def room_list(request): if request.method == 'GET': rooms = Room.obje...
true
true
f7ff7c6935a754a9c8352a21a47e00ba651d0679
3,727
py
Python
fca/algorithms/filtering/stability.py
ksiomelo/cubix
cd9e6dda6696b302a7c0d383259a9d60b15b0d55
[ "Apache-2.0" ]
3
2015-09-07T00:16:16.000Z
2019-01-11T20:27:56.000Z
fca/algorithms/filtering/stability.py
ksiomelo/cubix
cd9e6dda6696b302a7c0d383259a9d60b15b0d55
[ "Apache-2.0" ]
null
null
null
fca/algorithms/filtering/stability.py
ksiomelo/cubix
cd9e6dda6696b302a7c0d383259a9d60b15b0d55
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # encoding: utf-8 """ stability.py Created by Nikita Romashkin on 2010-01-19. """ from __future__ import division from copy import deepcopy from fca import ConceptSystem def compute_istability(lattice): """ Examples ======== >>> from fca import Context, ConceptLattice >>...
30.54918
91
0.602093
from __future__ import division from copy import deepcopy from fca import ConceptSystem def compute_istability(lattice): top_idx = lattice.index(lattice._top_concept) bottom_idx = lattice.index(lattice._bottom_concept) for cpt in lattice._concepts: cpt.fix_set_field_bug() lattic...
true
true
f7ff7de8b6ebba334ad7cd7d703ce4677d6418ad
5,235
py
Python
app.py
bhernan2/sqlalchemy-challenge
c8f7c9e94efa11b55fe349f1e3cfe9ae8f2478f6
[ "ADSL" ]
null
null
null
app.py
bhernan2/sqlalchemy-challenge
c8f7c9e94efa11b55fe349f1e3cfe9ae8f2478f6
[ "ADSL" ]
null
null
null
app.py
bhernan2/sqlalchemy-challenge
c8f7c9e94efa11b55fe349f1e3cfe9ae8f2478f6
[ "ADSL" ]
null
null
null
from flask import Flask, jsonify import numpy as np import datetime as dt import sqlalchemy from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import Session from sqlalchemy import create_engine, func ################################################# #Database setup ##################################...
29.410112
100
0.574021
from flask import Flask, jsonify import numpy as np import datetime as dt import sqlalchemy from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import Session from sqlalchemy import create_engine, func
true
true
f7ff7e96f09f2605ad966a228deacee132e2b18d
2,478
py
Python
SS_Conv_lib/ss_conv/sp_ops/tensor.py
Gorilla-Lab-SCUT/SS-Conv
47d21fdb8f8e02f677201d86295f6ef1c4d1f059
[ "MIT" ]
16
2021-11-16T08:49:59.000Z
2022-01-08T07:57:12.000Z
SS_Conv_lib/ss_conv/sp_ops/tensor.py
Gorilla-Lab-SCUT/SS-Conv
47d21fdb8f8e02f677201d86295f6ef1c4d1f059
[ "MIT" ]
2
2021-11-18T09:30:31.000Z
2022-02-23T07:19:13.000Z
SS_Conv_lib/ss_conv/sp_ops/tensor.py
Gorilla-Lab-SCUT/SS-Conv
47d21fdb8f8e02f677201d86295f6ef1c4d1f059
[ "MIT" ]
null
null
null
# Modified from https://github.com/traveller59/spconv/tree/v1.1 import numpy as np import torch def scatter_nd(indices, updates, shape): """pytorch edition of tensorflow scatter_nd. this function don't contain except handle code. so use this carefully when indice repeats, don't support repeat add ...
35.4
95
0.616626
import numpy as np import torch def scatter_nd(indices, updates, shape): ret = torch.zeros(*shape, dtype=updates.dtype, device=updates.device) ndim = indices.shape[-1] output_shape = list(indices.shape[:-1]) + shape[indices.shape[-1]:] flatted_indices = indices.view(-1, ndim) slices = [f...
true
true
f7ff7f04c3516f64ec459968e23c349f5062921f
2,265
py
Python
face_alignment.py
PVSemk/ABAW2020TNT
3cf667e0958f411b510c734755da5e30a091df11
[ "MIT" ]
28
2020-03-11T09:27:22.000Z
2022-03-05T15:42:38.000Z
face_alignment.py
PVSemk/ABAW2020TNT
3cf667e0958f411b510c734755da5e30a091df11
[ "MIT" ]
9
2020-05-18T20:37:44.000Z
2022-02-02T10:01:01.000Z
face_alignment.py
PVSemk/ABAW2020TNT
3cf667e0958f411b510c734755da5e30a091df11
[ "MIT" ]
9
2020-02-28T07:53:26.000Z
2022-01-24T09:26:38.000Z
""" Code from "Two-Stream Aural-Visual Affect Analysis in the Wild" Felix Kuhnke and Lars Rumberg and Joern Ostermann Please see https://github.com/kuhnkeF/ABAW2020TNT """ import cv2 as cv import numpy as np import os def align_rescale_face(image, M): aligned = cv.warpAffine(image, M, (112, 112), flags=cv.INTER_CU...
48.191489
91
0.690508
import cv2 as cv import numpy as np import os def align_rescale_face(image, M): aligned = cv.warpAffine(image, M, (112, 112), flags=cv.INTER_CUBIC, borderValue=0.0) return aligned def render_img_and_mask(img, mask, frame_nr, render_path, mask_path): frame_nr_str = str(frame_nr).zfill(5) frame = cv.cvt...
true
true
f7ff7f27cabc44f8774bf119552d01cf2efb441a
8,645
py
Python
home/pi/TP-IoT/send_receive_simple_sensor_data.py
lupyuen/RaspberryPiImage
664e8a74b4628d710feab5582ef59b344b9ffddd
[ "Apache-2.0" ]
7
2016-03-07T02:07:21.000Z
2022-01-21T02:22:41.000Z
home/pi/TP-IoT/send_receive_simple_sensor_data.py
lupyuen/RaspberryPiImage
664e8a74b4628d710feab5582ef59b344b9ffddd
[ "Apache-2.0" ]
null
null
null
home/pi/TP-IoT/send_receive_simple_sensor_data.py
lupyuen/RaspberryPiImage
664e8a74b4628d710feab5582ef59b344b9ffddd
[ "Apache-2.0" ]
8
2016-06-14T06:01:11.000Z
2020-04-22T09:21:44.000Z
#!/usr/bin/env python3 # Send DHT22 sensor data periodically to AWS IoT and process actuation commands received. import time import datetime import ssl import json import paho.mqtt.client as mqtt import dht22 import pigpio import RPi.GPIO as GPIO # TODO: Change this to the name of our Raspberry Pi, also known as our...
40.209302
120
0.628918
import time import datetime import ssl import json import paho.mqtt.client as mqtt import dht22 import pigpio import RPi.GPIO as GPIO deviceName = "g88pi" deviceCertificate = "tp-iot-certificate.pem.crt" devicePrivateKey = "tp-iot-private.pem.key" awsCert = "aws-iot-rootCA.crt" isConnected = False powe...
true
true
f7ff7fe2e92fb27fbdd160ff97682e7e6331c076
1,649
py
Python
tests/local/warehouse/metrics/test_schema.py
udemy/soda-sql
53dd2218770c74367787f1d85ee0d48d498b51eb
[ "Apache-2.0" ]
null
null
null
tests/local/warehouse/metrics/test_schema.py
udemy/soda-sql
53dd2218770c74367787f1d85ee0d48d498b51eb
[ "Apache-2.0" ]
1
2021-02-23T20:47:40.000Z
2021-03-06T09:03:48.000Z
tests/local/warehouse/metrics/test_schema.py
udemy/soda-sql
53dd2218770c74367787f1d85ee0d48d498b51eb
[ "Apache-2.0" ]
1
2021-02-23T20:41:24.000Z
2021-02-23T20:41:24.000Z
# Copyright 2020 Soda # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software #...
38.348837
96
0.70285
from sodasql.scan.metric import Metric from tests.common.sql_test_case import SqlTestCase class TestSchema(SqlTestCase): def test_schema_measurement(self): dialect = self.warehouse.dialect self.sql_recreate_table( [f"id {self.dialect.data_type_varchar_255}", f"...
true
true
f7ff81cb5d1842bd07cc97ea8cf9a175840000c9
48,186
py
Python
src/routes/routes_training.py
Supreeth-Shetty/Projectathon---Simplified-AI
3fc26a58a9370d119811ac4e864af977c21f6c40
[ "MIT" ]
8
2021-12-23T06:05:00.000Z
2021-12-26T05:39:00.000Z
src/routes/routes_training.py
Supreeth-Shetty/Projectathon---Simplified-AI
3fc26a58a9370d119811ac4e864af977c21f6c40
[ "MIT" ]
null
null
null
src/routes/routes_training.py
Supreeth-Shetty/Projectathon---Simplified-AI
3fc26a58a9370d119811ac4e864af977c21f6c40
[ "MIT" ]
2
2021-12-23T06:10:11.000Z
2021-12-23T07:24:28.000Z
from flask import Blueprint, redirect, url_for, render_template, request, session from src.constants.model_params import Ridge_Params, Lasso_Params, ElasticNet_Params, RandomForestRegressor_Params, \ SVR_params, AdabootRegressor_Params, \ GradientBoostRegressor_Params from src.constants.model_params import Kmea...
50.882788
163
0.522102
from flask import Blueprint, redirect, url_for, render_template, request, session from src.constants.model_params import Ridge_Params, Lasso_Params, ElasticNet_Params, RandomForestRegressor_Params, \ SVR_params, AdabootRegressor_Params, \ GradientBoostRegressor_Params from src.constants.model_params import Kmea...
true
true
f7ff82117f18da189f3ac21b9b4c617298189b55
18,781
py
Python
tools/common-models/src/metrics/results.py
emotive-computing/mosaic_stress_2021
be4e0f2e0f0455d97cf6c9b5fd6dac60872d94c7
[ "MIT" ]
null
null
null
tools/common-models/src/metrics/results.py
emotive-computing/mosaic_stress_2021
be4e0f2e0f0455d97cf6c9b5fd6dac60872d94c7
[ "MIT" ]
null
null
null
tools/common-models/src/metrics/results.py
emotive-computing/mosaic_stress_2021
be4e0f2e0f0455d97cf6c9b5fd6dac60872d94c7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import abc from collections import defaultdict from math import sqrt import numpy as np import pandas as pd from scipy.stats import pearsonr from scipy.stats import spearmanr from sklearn.metrics import accuracy_score, r2_score, mean_squared_error, f1_score, recall_score, precision_score, \ ...
49.036554
142
0.689953
import abc from collections import defaultdict from math import sqrt import numpy as np import pandas as pd from scipy.stats import pearsonr from scipy.stats import spearmanr from sklearn.metrics import accuracy_score, r2_score, mean_squared_error, f1_score, recall_score, precision_score, \ average_precision_scor...
true
true