hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c27878825f01d072ca7e82632e07fcf8df2ea60
936
py
Python
python/src/main/python/pyalink/alink/tests/examples/from_docs/test_crossfeaturepredictstreamop.py
wenwei8268/Alink
c00702538c95a32403985ebd344eb6aeb81749a7
[ "Apache-2.0" ]
null
null
null
python/src/main/python/pyalink/alink/tests/examples/from_docs/test_crossfeaturepredictstreamop.py
wenwei8268/Alink
c00702538c95a32403985ebd344eb6aeb81749a7
[ "Apache-2.0" ]
null
null
null
python/src/main/python/pyalink/alink/tests/examples/from_docs/test_crossfeaturepredictstreamop.py
wenwei8268/Alink
c00702538c95a32403985ebd344eb6aeb81749a7
[ "Apache-2.0" ]
null
null
null
import unittest from pyalink.alink import * import numpy as np import pandas as pd class TestCrossFeaturePredictStreamOp(unittest.TestCase): def test_crossfeaturepredictstreamop(self): df = pd.DataFrame([ ["1.0", "1.0", 1.0, 1], ["1.0", "1.0", 0.0, 1], ["1.0", "0.0", 1.0, 1], ...
42.545455
112
0.595085
import unittest from pyalink.alink import * import numpy as np import pandas as pd class TestCrossFeaturePredictStreamOp(unittest.TestCase): def test_crossfeaturepredictstreamop(self): df = pd.DataFrame([ ["1.0", "1.0", 1.0, 1], ["1.0", "1.0", 0.0, 1], ["1.0", "0.0", 1.0, 1], ...
true
true
1c2788c992135a8f6a701cfd642c662f383fa799
3,127
py
Python
numerical_eqs/matrix/tridiag.py
alienbrett/numerical-eqs-collection
23619bf379d53ce0facb63be08ee6a3902d404d5
[ "MIT" ]
null
null
null
numerical_eqs/matrix/tridiag.py
alienbrett/numerical-eqs-collection
23619bf379d53ce0facb63be08ee6a3902d404d5
[ "MIT" ]
null
null
null
numerical_eqs/matrix/tridiag.py
alienbrett/numerical-eqs-collection
23619bf379d53ce0facb63be08ee6a3902d404d5
[ "MIT" ]
null
null
null
import numpy as np class TriDiag: def __init__(self, a, d, b, n=None): if n is None: n = len(d) self.n = n self.a = np.asarray(a) self.b = np.asarray(b) self.d = np.asarray(d) def mult(self, x): '''Multiplies tridiagonal matr...
22.177305
75
0.489607
import numpy as np class TriDiag: def __init__(self, a, d, b, n=None): if n is None: n = len(d) self.n = n self.a = np.asarray(a) self.b = np.asarray(b) self.d = np.asarray(d) def mult(self, x): x = np.asarray(x) ...
true
true
1c2788cec9e328b5354ea42a85d6c1ffc80f4a27
7,610
py
Python
test/units/test_oci_mount_target.py
slmjy/oci-ansible-modules
4713699064f4244b4554b5b2f97b5e5443fa2d6e
[ "Apache-2.0" ]
106
2018-06-29T16:38:56.000Z
2022-02-16T16:38:56.000Z
test/units/test_oci_mount_target.py
slmjy/oci-ansible-modules
4713699064f4244b4554b5b2f97b5e5443fa2d6e
[ "Apache-2.0" ]
122
2018-09-11T12:49:39.000Z
2021-05-01T04:54:22.000Z
test/units/test_oci_mount_target.py
slmjy/oci-ansible-modules
4713699064f4244b4554b5b2f97b5e5443fa2d6e
[ "Apache-2.0" ]
78
2018-07-04T05:48:54.000Z
2022-03-09T06:33:12.000Z
# Copyright (c) 2018, Oracle and/or its affiliates. # This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Apache License v2.0 # See LICENSE.TXT for details. import pytest ...
32.801724
106
0.737976
import pytest from nose.plugins.skip import SkipTest import logging from ansible.modules.cloud.oracle import oci_mount_target from ansible.module_utils.oracle import oci_utils try: import oci from oci.util import to_dict from oci.file_storage.models import MountTarget from oci.exceptions import S...
true
true
1c278908d838016977ad0aa9afa8db4fafc911bf
308
py
Python
src/data/385.py
NULLCT/LOMC
79a16474a8f21310e0fb47e536d527dd5dc6d655
[ "MIT" ]
null
null
null
src/data/385.py
NULLCT/LOMC
79a16474a8f21310e0fb47e536d527dd5dc6d655
[ "MIT" ]
null
null
null
src/data/385.py
NULLCT/LOMC
79a16474a8f21310e0fb47e536d527dd5dc6d655
[ "MIT" ]
null
null
null
(N, _), *r = [map(int, s.split()) for s in open(0)] G = [[] for _ in [7] + r] for a, b in r[:N - 1]: G[a] += b, G[b] += a, V = [1] * N + [0] q = [N] while q: i = q.pop() for j in G[i]: q += [j] * V[j] V[j] = ~V[i] for c, d in r[N - 1:]: print('RTooawdn'[V[c] == V[d]::2])
20.533333
51
0.363636
(N, _), *r = [map(int, s.split()) for s in open(0)] G = [[] for _ in [7] + r] for a, b in r[:N - 1]: G[a] += b, G[b] += a, V = [1] * N + [0] q = [N] while q: i = q.pop() for j in G[i]: q += [j] * V[j] V[j] = ~V[i] for c, d in r[N - 1:]: print('RTooawdn'[V[c] == V[d]::2])
true
true
1c27895719ec7ea988e3586e874fc13e291cb805
1,332
py
Python
mlanalyzer/app/__init__.py
DanJSG/reflectiment
484ce5d0f20e1853095f049c880cdff3317fa47f
[ "MIT" ]
null
null
null
mlanalyzer/app/__init__.py
DanJSG/reflectiment
484ce5d0f20e1853095f049c880cdff3317fa47f
[ "MIT" ]
null
null
null
mlanalyzer/app/__init__.py
DanJSG/reflectiment
484ce5d0f20e1853095f049c880cdff3317fa47f
[ "MIT" ]
null
null
null
from app.mood_analyzer import MoodAnalyzer from app.word_embedder import WordEmbedder from app.reflection_analyzer import ReflectionAnalyzer from app.document_encoder import encode_document from app.sentiment_analyzer import SentimentAnalyzer from flask import Flask, request, jsonify, current_app from app.document impo...
38.057143
96
0.753754
from app.mood_analyzer import MoodAnalyzer from app.word_embedder import WordEmbedder from app.reflection_analyzer import ReflectionAnalyzer from app.document_encoder import encode_document from app.sentiment_analyzer import SentimentAnalyzer from flask import Flask, request, jsonify, current_app from app.document impo...
true
true
1c2789c7907332eff00e34a0a6af5a08fb9e01d4
6,914
py
Python
Open3D/examples/python/reconstruction_system/sensors/realsense_recorder.py
xdeng7/redwood_open3d_3dreconstruction
aa1651d3cec1feb00468d548ac2268a3ed17b856
[ "Apache-2.0" ]
8
2021-03-17T14:24:12.000Z
2022-03-30T15:35:27.000Z
examples/python/reconstruction_system/sensors/realsense_recorder.py
moonwonlee/Open3D
dda9b3a0129fa6c60f913672a70ff02483dcd0f3
[ "MIT" ]
1
2021-11-04T09:22:25.000Z
2022-02-14T01:32:31.000Z
examples/python/reconstruction_system/sensors/realsense_recorder.py
moonwonlee/Open3D
dda9b3a0129fa6c60f913672a70ff02483dcd0f3
[ "MIT" ]
2
2021-08-24T18:06:55.000Z
2021-12-17T10:48:34.000Z
# Open3D: www.open3d.org # The MIT License (MIT) # See license file or visit www.open3d.org for details # examples/python/reconstruction_system/sensors/realsense_recorder.py # pyrealsense2 is required. # Please see instructions in https://github.com/IntelRealSense/librealsense/tree/master/wrappers/python import pyrea...
35.096447
103
0.62048
import pyrealsense2 as rs import numpy as np import cv2 import argparse from os import makedirs from os.path import exists, join import shutil import json from enum import IntEnum try: input = raw_input except NameError: pass class Preset(IntEnum): Custom = 0 Default = 1 Hand = 2 ...
true
true
1c278b61694e0d0d2a81e00a27b4e2b6d788f7d6
11,394
py
Python
src/worlds/grid_world.py
Soucha/CommAI-env
1420ab9e6c12da2f5e7acf27be2bc960ac2c856f
[ "BSD-3-Clause" ]
107
2017-02-15T15:09:31.000Z
2021-12-09T10:40:17.000Z
src/worlds/grid_world.py
axbaretto/commai-env
e5d2f17f78c074e97d5654fd14e3fdb9dbbf44b1
[ "BSD-3-Clause" ]
21
2017-02-15T18:21:25.000Z
2019-11-08T12:39:47.000Z
src/worlds/grid_world.py
axbaretto/commai-env
e5d2f17f78c074e97d5654fd14e3fdb9dbbf44b1
[ "BSD-3-Clause" ]
43
2017-02-15T09:57:48.000Z
2019-07-18T17:04:29.000Z
# Copyright (c) 2016-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. from __future__ import a...
36.636656
79
0.568633
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from core.task import World, on_world_start, on_message, on_sequence,\ on_state_changed, on_timeout, on_output_message from collections import namedtuple, defau...
true
true
1c278bd432b5f180091f6b6d113b848e1d2291e1
3,129
py
Python
sqlalchemy.app.py
toraud96/sqlalchemy-challenge
9e5f0f4e57d435be68ede9def8384d372d415bdf
[ "ADSL" ]
null
null
null
sqlalchemy.app.py
toraud96/sqlalchemy-challenge
9e5f0f4e57d435be68ede9def8384d372d415bdf
[ "ADSL" ]
null
null
null
sqlalchemy.app.py
toraud96/sqlalchemy-challenge
9e5f0f4e57d435be68ede9def8384d372d415bdf
[ "ADSL" ]
null
null
null
import numpy as np import sqlalchemy from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import Session from sqlalchemy import create_engine, func import datetime as dt from flask import Flask, jsonify ################################################# # Database Setup ################################...
28.445455
76
0.616171
import numpy as np import sqlalchemy from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import Session from sqlalchemy import create_engine, func import datetime as dt from flask import Flask, jsonify
true
true
1c278bdd4ead6ea17286297457fc321ecca49774
1,451
py
Python
geneticknot/play_utils.py
MarekGn/cloudknot_genetic_algorithm
7f2f0c49267f6486f36422ad06e57ae423d102a9
[ "MIT" ]
null
null
null
geneticknot/play_utils.py
MarekGn/cloudknot_genetic_algorithm
7f2f0c49267f6486f36422ad06e57ae423d102a9
[ "MIT" ]
null
null
null
geneticknot/play_utils.py
MarekGn/cloudknot_genetic_algorithm
7f2f0c49267f6486f36422ad06e57ae423d102a9
[ "MIT" ]
null
null
null
from geneticknot.Board import Board from geneticknot.DNN import DNN def play_agents_tictactoe(players_couple, board_shape): player_1 = players_couple[0] player_2 = players_couple[1] board = Board(board_shape) status = -1 while status == -1: player1_moves = player_1.forward(board.board.fla...
31.543478
81
0.615438
from geneticknot.Board import Board from geneticknot.DNN import DNN def play_agents_tictactoe(players_couple, board_shape): player_1 = players_couple[0] player_2 = players_couple[1] board = Board(board_shape) status = -1 while status == -1: player1_moves = player_1.forward(board.board.fla...
true
true
1c278c9f0b619b15eb6ae553dda5b3801024995d
38
py
Python
legoBTLE/exceptions/value_execptions.py
programmingLego/legoBTLE4PI
d4641eb3e5451f8f64a4ac038ebadb8c3b452ec0
[ "MIT" ]
2
2021-06-05T18:06:43.000Z
2021-08-13T12:16:48.000Z
legoBTLE/exceptions/value_execptions.py
programmingLego/legoBTLE4PI
d4641eb3e5451f8f64a4ac038ebadb8c3b452ec0
[ "MIT" ]
4
2021-06-05T18:55:26.000Z
2021-06-23T19:40:53.000Z
legoBTLE/exceptions/value_execptions.py
DietrichChristopeit/project-cimino
62eaf5e2661200094742c1ab65524128488d84bf
[ "MIT" ]
null
null
null
class NoneError(Exception): pass
12.666667
28
0.710526
class NoneError(Exception): pass
false
true
1c278d05541e3acc0f66c9fa5153979cd6f57931
4,391
py
Python
mode.py
ChiuAlfredo/Spotify_playlist
d1911b3417863cababa1cad47ceb685b40afcb86
[ "MIT" ]
1
2021-09-24T13:26:43.000Z
2021-09-24T13:26:43.000Z
mode.py
ChiuAlfredo/Spotify_playlist
d1911b3417863cababa1cad47ceb685b40afcb86
[ "MIT" ]
null
null
null
mode.py
ChiuAlfredo/Spotify_playlist
d1911b3417863cababa1cad47ceb685b40afcb86
[ "MIT" ]
null
null
null
class mode: def __init__(self, spotify_client): self.spotify_client = spotify_client def from_recent_playlist_create_playlist(self,spotify_client): # get last played tracks num_tracks_to_visualise = int(input("How many tracks would you like to visualise? ")) l...
48.252747
123
0.613755
class mode: def __init__(self, spotify_client): self.spotify_client = spotify_client def from_recent_playlist_create_playlist(self,spotify_client): num_tracks_to_visualise = int(input("How many tracks would you like to visualise? ")) last_played_tracks = spoti...
true
true
1c2790043d54a6bc19fba30fe838e2d0d782314e
509
py
Python
icevision/models/mmdet/common/bbox/__init__.py
ai-fast-track/mantisshrimp
cc6d6a4a048f6ddda2782b6593dcd6b083a673e4
[ "Apache-2.0" ]
580
2020-09-10T06:29:57.000Z
2022-03-29T19:34:54.000Z
icevision/models/mmdet/common/bbox/__init__.py
ai-fast-track/mantisshrimp
cc6d6a4a048f6ddda2782b6593dcd6b083a673e4
[ "Apache-2.0" ]
691
2020-09-05T03:08:34.000Z
2022-03-31T23:47:06.000Z
icevision/models/mmdet/common/bbox/__init__.py
lgvaz/mantisshrimp2
743cb7df0dae7eb1331fc2bb66fc9ca09db496cd
[ "Apache-2.0" ]
105
2020-09-09T10:41:35.000Z
2022-03-25T17:16:49.000Z
from icevision.models.mmdet.common.bbox.dataloaders import * from icevision.models.mmdet.common.bbox.prediction import * from icevision.models.mmdet.common.bbox.show_results import * from icevision.models.mmdet.common.bbox.show_batch import * # Soft dependencies from icevision.soft_dependencies import SoftDependencies...
36.357143
61
0.834971
from icevision.models.mmdet.common.bbox.dataloaders import * from icevision.models.mmdet.common.bbox.prediction import * from icevision.models.mmdet.common.bbox.show_results import * from icevision.models.mmdet.common.bbox.show_batch import * from icevision.soft_dependencies import SoftDependencies if SoftDependenci...
true
true
1c279167ffec84aecf9a02aac87937cdd8ebd077
1,751
py
Python
storage_s3/indico_storage_s3/task.py
MayureshIndapurkarTTU/IndicoPlugins
cb519f15425644fe1ba4649c461d9d5efda38ec5
[ "MIT" ]
null
null
null
storage_s3/indico_storage_s3/task.py
MayureshIndapurkarTTU/IndicoPlugins
cb519f15425644fe1ba4649c461d9d5efda38ec5
[ "MIT" ]
null
null
null
storage_s3/indico_storage_s3/task.py
MayureshIndapurkarTTU/IndicoPlugins
cb519f15425644fe1ba4649c461d9d5efda38ec5
[ "MIT" ]
null
null
null
# This file is part of the Indico plugins. # Copyright (C) 2002 - 2020 CERN # # The Indico plugins are free software; you can redistribute # them and/or modify them under the terms of the MIT License; # see the LICENSE file for more details. from __future__ import unicode_literals import re from datetime import date ...
38.911111
98
0.685323
from __future__ import unicode_literals import re from datetime import date from celery.schedules import crontab from dateutil.relativedelta import relativedelta from indico.core.celery import celery from indico.core.config import config from indico.core.storage.backend import ReadOnlyStorageMixin, get_storag...
true
true
1c27918aa185c59d2de0b6865788d139187f99cb
2,744
py
Python
batch_rl/baselines/agents/quantile_agent.py
tangbotony/batch_rl
9c3d07ac91dd604132c209bca9dfbe0d71b74cb7
[ "Apache-2.0" ]
3
2020-12-28T02:58:19.000Z
2022-03-14T03:19:35.000Z
batch_rl/baselines/agents/quantile_agent.py
tangbotony/batch_rl
9c3d07ac91dd604132c209bca9dfbe0d71b74cb7
[ "Apache-2.0" ]
1
2022-03-14T11:39:25.000Z
2022-03-14T11:39:25.000Z
batch_rl/baselines/agents/quantile_agent.py
tangbotony/batch_rl
9c3d07ac91dd604132c209bca9dfbe0d71b74cb7
[ "Apache-2.0" ]
2
2020-12-01T22:26:52.000Z
2021-01-04T21:26:01.000Z
# coding=utf-8 # Copyright 2020 The Google Research 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 applicab...
37.081081
83
0.748907
from __future__ import absolute_import from __future__ import division from __future__ import print_function from batch_rl.baselines.replay_memory import logged_prioritized_replay_buffer from batch_rl.multi_head import quantile_agent import gin @gin.configurable class LoggedQuantileAgent(quantile_ag...
true
true
1c2791c4cde3ecfb72eb78b8d9451119bb31866f
943
py
Python
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/operations/__init__.py
jalauzon-msft/azure-sdk-for-python
15967f5c6d3376f2334a382486ba86339786e028
[ "MIT" ]
1
2022-02-01T18:50:12.000Z
2022-02-01T18:50:12.000Z
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/operations/__init__.py
ellhe-blaster/azure-sdk-for-python
82193ba5e81cc5e5e5a5239bba58abe62e86f469
[ "MIT" ]
null
null
null
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2022_03_02/operations/__init__.py
ellhe-blaster/azure-sdk-for-python
82193ba5e81cc5e5e5a5239bba58abe62e86f469
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
42.863636
94
0.687169
from ._disks_operations import DisksOperations from ._disk_accesses_operations import DiskAccessesOperations from ._disk_encryption_sets_operations import DiskEncryptionSetsOperations from ._disk_restore_point_operations import DiskRestorePointOperations from ._snapshots_operations import SnapshotsOperations _...
true
true
1c27921ec958bf40a8b7040fc375918dd6f49c91
4,285
py
Python
app/user/tests/test_user_api.py
Shiv2195/recipe-app-api
f18e0841490ca3252ac6cf509ba488ecd2a2d7b6
[ "MIT" ]
null
null
null
app/user/tests/test_user_api.py
Shiv2195/recipe-app-api
f18e0841490ca3252ac6cf509ba488ecd2a2d7b6
[ "MIT" ]
null
null
null
app/user/tests/test_user_api.py
Shiv2195/recipe-app-api
f18e0841490ca3252ac6cf509ba488ecd2a2d7b6
[ "MIT" ]
null
null
null
from django.contrib.auth import get_user_model from django.test import TestCase from django.urls import reverse from rest_framework import status from rest_framework.test import APIClient CREATE_USER_URL = reverse('user:create') TOKEN_URL = reverse('user:token') ME_URL = reverse('user:me') def create_user(**params)...
31.507353
77
0.633839
from django.contrib.auth import get_user_model from django.test import TestCase from django.urls import reverse from rest_framework import status from rest_framework.test import APIClient CREATE_USER_URL = reverse('user:create') TOKEN_URL = reverse('user:token') ME_URL = reverse('user:me') def create_user(**params)...
true
true
1c27922d6b049cac7c323d3fd180bf4d862bd474
307
py
Python
skfem/element/element_tri/__init__.py
carlosal1015/scikit-fem
1e73a417e9b43fe0a36e29807792c41fa289b77d
[ "BSD-3-Clause" ]
null
null
null
skfem/element/element_tri/__init__.py
carlosal1015/scikit-fem
1e73a417e9b43fe0a36e29807792c41fa289b77d
[ "BSD-3-Clause" ]
null
null
null
skfem/element/element_tri/__init__.py
carlosal1015/scikit-fem
1e73a417e9b43fe0a36e29807792c41fa289b77d
[ "BSD-3-Clause" ]
null
null
null
from .element_tri_p1 import ElementTriP1 from .element_tri_p2 import ElementTriP2 from .element_tri_dg import ElementTriDG from .element_tri_p0 import ElementTriP0 from .element_tri_rt0 import ElementTriRT0 from .element_tri_morley import ElementTriMorley from .element_tri_argyris import ElementTriArgyris
38.375
50
0.885993
from .element_tri_p1 import ElementTriP1 from .element_tri_p2 import ElementTriP2 from .element_tri_dg import ElementTriDG from .element_tri_p0 import ElementTriP0 from .element_tri_rt0 import ElementTriRT0 from .element_tri_morley import ElementTriMorley from .element_tri_argyris import ElementTriArgyris
true
true
1c279261574aebaabf08b7362d9fb164cd9a4df2
304
py
Python
backend/apps/question/views/category.py
xingxingzaixian/python-django-online-exam
c504e121814061cbf7647d4d916f363230239f17
[ "MIT" ]
47
2021-09-23T00:52:49.000Z
2022-03-27T12:57:28.000Z
backend/apps/question/views/category.py
xingxingzaixian/django-drf-online-exam
c504e121814061cbf7647d4d916f363230239f17
[ "MIT" ]
null
null
null
backend/apps/question/views/category.py
xingxingzaixian/django-drf-online-exam
c504e121814061cbf7647d4d916f363230239f17
[ "MIT" ]
17
2021-09-02T12:12:21.000Z
2022-03-27T10:28:27.000Z
from rest_framework.viewsets import ModelViewSet from question.models import TblQuestionCategory as Model from question.serializers import CategorySerializer as Serializer class CategoryViewset(ModelViewSet): queryset = Model.objects.all().order_by('-id') serializer_class = Serializer
33.777778
66
0.802632
from rest_framework.viewsets import ModelViewSet from question.models import TblQuestionCategory as Model from question.serializers import CategorySerializer as Serializer class CategoryViewset(ModelViewSet): queryset = Model.objects.all().order_by('-id') serializer_class = Serializer
true
true
1c279337d3fce7cfb3111dd0178edc422e25ce77
3,322
py
Python
src/util/conversationParser.py
5agado/conversation-analyzer
7a10c49b1785e581c920c32c1606c9039a4dbefd
[ "Apache-2.0" ]
80
2015-11-07T14:44:58.000Z
2022-03-15T13:58:25.000Z
src/util/conversationParser.py
5agado/conversation-analyzer
7a10c49b1785e581c920c32c1606c9039a4dbefd
[ "Apache-2.0" ]
15
2015-11-03T21:53:01.000Z
2021-10-14T16:25:40.000Z
src/util/conversationParser.py
5agado/conversation-analyzer
7a10c49b1785e581c920c32c1606c9039a4dbefd
[ "Apache-2.0" ]
22
2016-11-18T23:53:56.000Z
2021-02-12T14:52:26.000Z
import argparse import json import sys import os import time sys.path.append(os.path.join(os.path.dirname(__file__), "..")) from util import logger def parseMessage(msgData, authors): """Parse the message contained in msgData. Authors should be a dict to provide a correspondence between the IDs as present ...
39.082353
102
0.660747
import argparse import json import sys import os import time sys.path.append(os.path.join(os.path.dirname(__file__), "..")) from util import logger def parseMessage(msgData, authors): try: localTimestamp = time.localtime(msgData["timestamp"]/1000) dateAndTime = time.strftime("%Y.%m.%d %H:%M:%S", ...
true
true
1c279399d5bf934b204bdefe9a18207c5233b53f
4,804
py
Python
scripts/calfits_to_Bcal.py
HERA-Team/casa-imaging
8cad11102f0a70b51ce9d73056d6c5dab16e1a73
[ "BSD-3-Clause" ]
1
2020-02-25T20:34:51.000Z
2020-02-25T20:34:51.000Z
scripts/calfits_to_Bcal.py
HERA-Team/casa-imaging
8cad11102f0a70b51ce9d73056d6c5dab16e1a73
[ "BSD-3-Clause" ]
2
2019-02-27T20:12:13.000Z
2019-06-19T17:31:25.000Z
scripts/calfits_to_Bcal.py
HERA-Team/casa-imaging
8cad11102f0a70b51ce9d73056d6c5dab16e1a73
[ "BSD-3-Clause" ]
2
2020-02-10T14:15:14.000Z
2022-03-17T11:46:44.000Z
#!/usr/bin/env python2.7 """ calfits_to_Bcal.py ---------------- A CASA script for converting a calfits gain file into a CASA bandpass cal table. Run as casa -c calfits_to_Bcal.py <args> Nicholas Kern Oct. 2018 """ import pyfits import os import shutil import numpy as np import argparse ## Set Arguments a = argpars...
36.393939
118
0.65841
import pyfits import os import shutil import numpy as np import argparse rgumentParser(description="Run with casa as: casa -c calfits_to_Bcal.py <args>") a.add_argument('--script', '-c', type=str, help='name of this script', required=True) a.add_argument('--cfits', default=None, type=str, help='Path to calfits FITS f...
true
true
1c2793a390aeea08fb199c122d710fd0a195b10b
5,364
py
Python
pike/test/encryption.py
guozhongqiu/pike
2fbf3dc7ff353c675e025892b45eb923d014b752
[ "Apache-2.0" ]
20
2015-01-13T16:35:02.000Z
2021-04-25T02:01:36.000Z
pike/test/encryption.py
guozhongqiu/pike
2fbf3dc7ff353c675e025892b45eb923d014b752
[ "Apache-2.0" ]
54
2015-11-23T20:27:21.000Z
2021-09-23T17:04:43.000Z
pike/test/encryption.py
guozhongqiu/pike
2fbf3dc7ff353c675e025892b45eb923d014b752
[ "Apache-2.0" ]
33
2015-02-04T15:28:37.000Z
2022-01-25T01:42:26.000Z
# # Copyright (c) 2016-2020, Dell Inc. or its subsidiaries. # All rights reserved. # See file LICENSE for licensing information. # # Module Name: # # encryption.py # # Abstract: # # Test SMB3 Encryption and negotiation options # # Authors: Masen Furer (masen.furer@dell.com) # import pike.crypto as crypto...
40.636364
87
0.705444
import pike.crypto as crypto import pike.model as model import pike.smb2 as smb2 import pike.test class TestEncryption(pike.test.PikeTest): def test_smb_3_0_encryption(self): client = model.Client(dialects=[smb2.DIALECT_SMB3_0]) conn = client.connect(self.server) conn.negot...
true
true
1c27962b60ef593c4abe4969c28eaac1f8db9f26
2,407
py
Python
Code/reviews.py
pranavjain594/Application-Rating-Prediction-and-User-Sentiment-Analysis
051fa2eeb554b6764c612aaf688632afb85699a0
[ "MIT" ]
3
2020-07-01T09:53:27.000Z
2021-05-29T09:15:01.000Z
Code/reviews.py
pranavjain594/Application-Rating-Prediction-and-User-Sentiment-Analysis
051fa2eeb554b6764c612aaf688632afb85699a0
[ "MIT" ]
null
null
null
Code/reviews.py
pranavjain594/Application-Rating-Prediction-and-User-Sentiment-Analysis
051fa2eeb554b6764c612aaf688632afb85699a0
[ "MIT" ]
null
null
null
# Natural Language Processing # Importing the libraries import numpy as np import matplotlib.pyplot as plt import pandas as pd # Importing the dataset dataset = pd.read_csv('googleplaystoreuserreviews.csv') dataset.dropna(inplace=True) X = dataset.iloc[:,0].values # Cleaning the texts import re import nltk nltk.do...
29.353659
94
0.781055
import numpy as np import matplotlib.pyplot as plt import pandas as pd dataset = pd.read_csv('googleplaystoreuserreviews.csv') dataset.dropna(inplace=True) X = dataset.iloc[:,0].values import re import nltk nltk.download('stopwords') from nltk.corpus import stopwords from nltk.stem.porter import PorterStemmer ...
true
true
1c2796990a572bf61f7b8083b7983788df677fec
1,010
py
Python
resize_image.py
boguss1225/ImageProcessingCodePackage
542a342632b8925f7a772e7e241aacadf9ef2b48
[ "Apache-2.0" ]
null
null
null
resize_image.py
boguss1225/ImageProcessingCodePackage
542a342632b8925f7a772e7e241aacadf9ef2b48
[ "Apache-2.0" ]
null
null
null
resize_image.py
boguss1225/ImageProcessingCodePackage
542a342632b8925f7a772e7e241aacadf9ef2b48
[ "Apache-2.0" ]
null
null
null
import numpy as np import glob from PIL import Image # PATH of file directory DIRECTORY_PATH = 'C:/Users/younh/Desktop/STUDY/Projects/Mouse_Brain/data/DATASETsubmit/mrcnn_val_dataset_images/' # PATH for saving directory TARGET_PATH = 'C:/Users/younh/Desktop/STUDY/Projects/Mouse_Brain/data/DATASETsubmit/resized...
28.055556
114
0.662376
import numpy as np import glob from PIL import Image DIRECTORY_PATH = 'C:/Users/younh/Desktop/STUDY/Projects/Mouse_Brain/data/DATASETsubmit/mrcnn_val_dataset_images/' TARGET_PATH = 'C:/Users/younh/Desktop/STUDY/Projects/Mouse_Brain/data/DATASETsubmit/resized/test_image/' WIDTH = 960 HEIGHT = 640 files...
true
true
1c279813203c2bbfe89ba4123cc7692a18776c1e
16
py
Python
sphere.py
teremock/python
f9598eee88c1840d58820fe793f504b9705f60d3
[ "MIT" ]
1
2016-10-15T20:11:11.000Z
2016-10-15T20:11:11.000Z
sphere.py
teremock/python
f9598eee88c1840d58820fe793f504b9705f60d3
[ "MIT" ]
null
null
null
sphere.py
teremock/python
f9598eee88c1840d58820fe793f504b9705f60d3
[ "MIT" ]
null
null
null
#4/3 * PI * R^3
8
15
0.375
true
true
1c27999f5fa9b6767afe73cb6b6a6b8c41738f56
6,819
py
Python
module2_mixed/test_mixed.py
sxontheway/milliEye
bfdb041c978a45d7481071e8e9579d226ce523ff
[ "MIT" ]
33
2021-04-06T12:55:56.000Z
2022-03-18T15:47:19.000Z
module2_mixed/test_mixed.py
sxontheway/milliEye
bfdb041c978a45d7481071e8e9579d226ce523ff
[ "MIT" ]
4
2021-09-25T11:52:33.000Z
2021-11-26T17:44:56.000Z
module2_mixed/test_mixed.py
sxontheway/milliEye
bfdb041c978a45d7481071e8e9579d226ce523ff
[ "MIT" ]
5
2021-06-17T14:43:15.000Z
2022-01-16T03:02:32.000Z
from __future__ import division from yolov3.models import * from utils.utils import * from utils.datasets import * from utils.parse_config import * import os import sys import time import datetime import argparse import tqdm import torch from torch.utils.data import DataLoader from torchvision import datasets from t...
32.626794
138
0.626778
from __future__ import division from yolov3.models import * from utils.utils import * from utils.datasets import * from utils.parse_config import * import os import sys import time import datetime import argparse import tqdm import torch from torch.utils.data import DataLoader from torchvision import datasets from t...
true
true
1c2799acb705f530055d917911c19af97890c6b0
197
py
Python
example/sqla/website/database.py
mterzo/flask-social-blueprint
73a2716f11a2ac77a2e5dc391dff462f2fd82375
[ "MIT" ]
87
2015-01-22T15:22:35.000Z
2021-12-25T00:43:54.000Z
example/sqla/website/database.py
mterzo/flask-social-blueprint
73a2716f11a2ac77a2e5dc391dff462f2fd82375
[ "MIT" ]
32
2015-01-04T19:27:59.000Z
2021-04-30T20:38:53.000Z
example/sqla/website/database.py
mterzo/flask-social-blueprint
73a2716f11a2ac77a2e5dc391dff462f2fd82375
[ "MIT" ]
34
2015-01-04T18:48:33.000Z
2019-03-26T20:15:11.000Z
# coding=utf-8 # Created 2014 by Janusz Skonieczny import logging from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy() def init_db(): logging.debug("db.create_all") db.create_all()
16.416667
39
0.741117
import logging from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy() def init_db(): logging.debug("db.create_all") db.create_all()
true
true
1c279a765ccfb9946e6f99301b2e6663deb11b3a
868
py
Python
pyazo/core/tests/utils.py
fossabot/pyazo
86084642446b739845fa55e7a180e715ae59cb6c
[ "MIT" ]
null
null
null
pyazo/core/tests/utils.py
fossabot/pyazo
86084642446b739845fa55e7a180e715ae59cb6c
[ "MIT" ]
null
null
null
pyazo/core/tests/utils.py
fossabot/pyazo
86084642446b739845fa55e7a180e715ae59cb6c
[ "MIT" ]
null
null
null
"""testing utilities""" from io import StringIO from django.contrib.auth.models import User from django.core.management import call_command def test_auth(superuser=True): """Create a test user and return credentials to use with client.login""" credentials = { "username": "test", "password": "...
29.931034
87
0.667051
from io import StringIO from django.contrib.auth.models import User from django.core.management import call_command def test_auth(superuser=True): credentials = { "username": "test", "password": "test", "email": "test@test.test", } if superuser: credentials["username"] = "...
true
true
1c279d3b27568497b8eaf6296da2cb46734bc751
5,787
py
Python
aria/orchestrator/execution_plugin/common.py
tnadeau/incubator-ariatosca
de32028783969bc980144afa3c91061c7236459c
[ "Apache-2.0" ]
null
null
null
aria/orchestrator/execution_plugin/common.py
tnadeau/incubator-ariatosca
de32028783969bc980144afa3c91061c7236459c
[ "Apache-2.0" ]
null
null
null
aria/orchestrator/execution_plugin/common.py
tnadeau/incubator-ariatosca
de32028783969bc980144afa3c91061c7236459c
[ "Apache-2.0" ]
1
2020-06-16T15:13:06.000Z
2020-06-16T15:13:06.000Z
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
37.335484
138
0.650251
import json import os import tempfile import requests from . import constants from . import exceptions def is_windows(): return os.name == 'nt' def download_script(ctx, script_path): split = script_path.split('://') schema = split[0] suffix = script_path.split('/')[-1] file_des...
true
true
1c279d5c5a1d5f54b9f0c5784bd5b83aa3bff535
11,117
py
Python
back of PSSM/PSSM/driving_data-20180814142659.py
lidongyv/PSSM
61ef78bc465fd53fb128d0aa1b913f787c8c7f74
[ "Apache-2.0" ]
null
null
null
back of PSSM/PSSM/driving_data-20180814142659.py
lidongyv/PSSM
61ef78bc465fd53fb128d0aa1b913f787c8c7f74
[ "Apache-2.0" ]
null
null
null
back of PSSM/PSSM/driving_data-20180814142659.py
lidongyv/PSSM
61ef78bc465fd53fb128d0aa1b913f787c8c7f74
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # @Author: yulidong # @Date: 2018-06-20 14:37:27 # @Last Modified by: yulidong # @Last Modified time: 2018-08-10 21:32:24 import cv2 import numpy as np import os from python_pfm import * from scipy import stats import matplotlib.pyplot as plt from skimage.filters import roberts, sobel, scha...
39.703571
122
0.6607
import cv2 import numpy as np import os from python_pfm import * from scipy import stats import matplotlib.pyplot as plt from skimage.filters import roberts, sobel, scharr, prewitt from skimage import exposure import time division=10 division2=50 eanpass/15mm_focallength/scene_forwards/slow/left', r...
true
true
1c279de16d9bd4acf926e956ab7f1c7e3445cdec
2,169
py
Python
applications/zcomx/private/tmp/dal_tests.py
zcomx/zco.mx
70a7372af5787c2e4dea14b25bab0bbb2b959881
[ "BSD-3-Clause" ]
null
null
null
applications/zcomx/private/tmp/dal_tests.py
zcomx/zco.mx
70a7372af5787c2e4dea14b25bab0bbb2b959881
[ "BSD-3-Clause" ]
null
null
null
applications/zcomx/private/tmp/dal_tests.py
zcomx/zco.mx
70a7372af5787c2e4dea14b25bab0bbb2b959881
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ dal_tests.py Script to test dal queries. """ import os import sys import traceback from optparse import OptionParser from gluon import * from gluon.shell import env from applications.zcomx.modules.logger import set_cli_logging VERSION = 'Version 0.1' APP_ENV = env(_...
20.657143
61
0.605809
import os import sys import traceback from optparse import OptionParser from gluon import * from gluon.shell import env from applications.zcomx.modules.logger import set_cli_logging VERSION = 'Version 0.1' APP_ENV = env(__file__.split(os.sep)[-3], import_models=True) db = APP_ENV['db'] def man_page(): prin...
true
true
1c279e84a49c43861fb6703ff44428df8901e8b3
4,718
py
Python
tools/api_proto_breaking_change_detector/buf_utils.py
chrisxrepo/envoy
cc1d41e7ee9fbfb7ee3c8f73724cdc41d7c6bbb0
[ "Apache-2.0" ]
1
2021-09-25T13:30:10.000Z
2021-09-25T13:30:10.000Z
tools/api_proto_breaking_change_detector/buf_utils.py
chrisxrepo/envoy
cc1d41e7ee9fbfb7ee3c8f73724cdc41d7c6bbb0
[ "Apache-2.0" ]
312
2021-04-19T01:53:05.000Z
2022-03-28T08:28:56.000Z
tools/api_proto_breaking_change_detector/buf_utils.py
chrisxrepo/envoy
cc1d41e7ee9fbfb7ee3c8f73724cdc41d7c6bbb0
[ "Apache-2.0" ]
1
2020-12-14T10:20:35.000Z
2020-12-14T10:20:35.000Z
from pathlib import Path from typing import List, Union, Tuple from detector_errors import ChangeDetectorError, ChangeDetectorInitializeError from tools.base.utils import cd_and_return from tools.run_command import run_command def _generate_buf_args(target_path, config_file_loc, additional_args): buf_args = [] ...
44.509434
163
0.689699
from pathlib import Path from typing import List, Union, Tuple from detector_errors import ChangeDetectorError, ChangeDetectorInitializeError from tools.base.utils import cd_and_return from tools.run_command import run_command def _generate_buf_args(target_path, config_file_loc, additional_args): buf_args = [] ...
true
true
1c279fafb5c8178542162f9d28cf5ac5b4a2aefa
1,123
py
Python
src/robobase/dhmatrix.py
Ilya-Belyanov/robobase
2e2245ac4af68544ddbaddf87866925d80f5688b
[ "MIT" ]
null
null
null
src/robobase/dhmatrix.py
Ilya-Belyanov/robobase
2e2245ac4af68544ddbaddf87866925d80f5688b
[ "MIT" ]
null
null
null
src/robobase/dhmatrix.py
Ilya-Belyanov/robobase
2e2245ac4af68544ddbaddf87866925d80f5688b
[ "MIT" ]
null
null
null
import sympy as sy class DHMatrix: """Класс для работы с матрицей Денавита-Хартенберга""" @staticmethod def matrix(r_length, alpha, d_length, theta): """Возвращает матрицу Денавита-Хартенберга из входных параметров""" return sy.Matrix([[sy.cos(theta), -1 * sy.sin(theta) * sy.cos(alpha), ...
43.192308
89
0.573464
import sympy as sy class DHMatrix: @staticmethod def matrix(r_length, alpha, d_length, theta): return sy.Matrix([[sy.cos(theta), -1 * sy.sin(theta) * sy.cos(alpha), sy.sin(theta) * sy.sin(alpha), r_length * sy.cos(theta)], [sy.sin(theta), sy.cos(the...
true
true
1c27a0018fc025814e2514586032832db4277bfa
25,461
py
Python
python/paddle/distributed/utils.py
2742195759/Paddle
ce034db1834af85539b22ab68492df9972ff3e69
[ "Apache-2.0" ]
4
2021-02-08T13:07:15.000Z
2021-10-22T00:58:33.000Z
python/paddle/distributed/utils.py
2742195759/Paddle
ce034db1834af85539b22ab68492df9972ff3e69
[ "Apache-2.0" ]
2
2019-07-26T04:06:05.000Z
2019-07-29T04:25:24.000Z
python/paddle/distributed/utils.py
2742195759/Paddle
ce034db1834af85539b22ab68492df9972ff3e69
[ "Apache-2.0" ]
1
2020-11-25T10:41:52.000Z
2020-11-25T10:41:52.000Z
# Copyright (c) 2019 PaddlePaddle 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 appli...
33.369594
121
0.563725
import functools import logging import socket import time import os import signal import copy import sys import six import subprocess from contextlib import closing import socket from paddle.fluid import core from paddle.distributed.fleet.launch_utils import get_backend_by_compile_flag from distutils.util...
true
true
1c27a00d7e01a76d18e327697d9ecc4797c7a0fa
544
py
Python
backend/autocompleter.py
reviewgramweb/reviewgram
5c54409ec03143feca93da1b8fe960bc0e40d19f
[ "MIT" ]
null
null
null
backend/autocompleter.py
reviewgramweb/reviewgram
5c54409ec03143feca93da1b8fe960bc0e40d19f
[ "MIT" ]
13
2020-02-23T10:49:21.000Z
2020-06-19T08:04:40.000Z
backend/autocompleter.py
reviewgramweb/reviewgram
5c54409ec03143feca93da1b8fe960bc0e40d19f
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod # Абстрактный класс для дополнения данных class Autocompleter(ABC): def __init__(self): super().__init__() # Получение автодополнений, где # con - соединение # tokens (list) - список лексем # content (str) - содержимое файла # line (int) - строка ...
27.2
89
0.654412
from abc import ABC, abstractmethod class Autocompleter(ABC): def __init__(self): super().__init__() @abstractmethod def getAutocompletions(self, con, tokens, content, line, position, chatId, branchId): pass
true
true
1c27a0cd22dbf660b8526f2af26ff99a640e3862
5,856
py
Python
webviz_config/_theme_class.py
dotfloat/webviz-config
2538035c81075b36d23e74642c5d0454c741c142
[ "MIT" ]
null
null
null
webviz_config/_theme_class.py
dotfloat/webviz-config
2538035c81075b36d23e74642c5d0454c741c142
[ "MIT" ]
null
null
null
webviz_config/_theme_class.py
dotfloat/webviz-config
2538035c81075b36d23e74642c5d0454c741c142
[ "MIT" ]
null
null
null
import copy import json class WebvizConfigTheme: """Webviz config themes are all instances of this class. The only mandatory property is the theme name set at initialization. """ def __init__(self, theme_name: str): self.theme_name = theme_name self._csp = { "default-src"...
39.302013
99
0.577527
import copy import json class WebvizConfigTheme: def __init__(self, theme_name: str): self.theme_name = theme_name self._csp = { "default-src": "'none'", "connect-src": "'self'", "prefetch-src": "'self'", "style-src": ["'self'", "'unsafe-inline'"],...
true
true
1c27a0d14bde05c1fed0a731650cae8e929d96a2
1,454
py
Python
html/semantics/embedded-content/media-elements/track/track-element/cors/support/cors-tester.py
watilde/web-platform-tests
97e16bef6d6599ae805521e2007a9430a12aa144
[ "BSD-3-Clause" ]
8
2019-04-09T21:13:05.000Z
2021-11-23T17:25:18.000Z
html/semantics/embedded-content/media-elements/track/track-element/cors/support/cors-tester.py
watilde/web-platform-tests
97e16bef6d6599ae805521e2007a9430a12aa144
[ "BSD-3-Clause" ]
14
2019-03-18T20:11:48.000Z
2019-04-23T22:41:46.000Z
html/semantics/embedded-content/media-elements/track/track-element/cors/support/cors-tester.py
watilde/web-platform-tests
97e16bef6d6599ae805521e2007a9430a12aa144
[ "BSD-3-Clause" ]
11
2019-04-12T01:20:16.000Z
2021-11-23T17:25:02.000Z
from wptserve.handlers import HTTPException import urllib def main(request, response): if request.method != "GET": raise HTTPException(400, message="Method was not GET") if not "id" in request.GET: raise HTTPException(400, message="No id") id = request.GET['id'] if "read" in request....
27.961538
82
0.612792
from wptserve.handlers import HTTPException import urllib def main(request, response): if request.method != "GET": raise HTTPException(400, message="Method was not GET") if not "id" in request.GET: raise HTTPException(400, message="No id") id = request.GET['id'] if "read" in request....
true
true
1c27a22fef42a25ba358c673204d7f67a9cd023e
588
py
Python
5-2/rest_api_with_tweepy.py
hirotosuzuki/book_PythonCrawlingAndScraping
db6dcbdbe597f293330c56aeb9dc3703b5946e64
[ "CC0-1.0" ]
null
null
null
5-2/rest_api_with_tweepy.py
hirotosuzuki/book_PythonCrawlingAndScraping
db6dcbdbe597f293330c56aeb9dc3703b5946e64
[ "CC0-1.0" ]
null
null
null
5-2/rest_api_with_tweepy.py
hirotosuzuki/book_PythonCrawlingAndScraping
db6dcbdbe597f293330c56aeb9dc3703b5946e64
[ "CC0-1.0" ]
null
null
null
import os import tweepy # pip install tweepy # 環境変数から認証情報を取得する。 CONSUMER_KEY = os.environ['CONSUMER_KEY'] CONSUMER_SECRET = os.environ['CONSUMER_SECRET'] ACCESS_TOKEN = os.environ['ACCESS_TOKEN'] ACCESS_TOKEN_SECRET = os.environ['ACCESS_TOKEN_SECRET'] # 認証情報を設定する。 auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_S...
29.4
73
0.785714
import os import tweepy CONSUMER_KEY = os.environ['CONSUMER_KEY'] CONSUMER_SECRET = os.environ['CONSUMER_SECRET'] ACCESS_TOKEN = os.environ['ACCESS_TOKEN'] ACCESS_TOKEN_SECRET = os.environ['ACCESS_TOKEN_SECRET'] auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET) auth.set_access_token(ACCESS_TOKEN, ACCESS_...
true
true
1c27a29dc002375bf2622bcb9193862c4ad09ae6
1,691
py
Python
samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_create_snapshot_schedule_policy_sync.py
renovate-bot/pythonbaremetalsolution
4e5d230a5468b444c346bd0216db7db02ce60e0c
[ "Apache-2.0" ]
3
2022-03-27T04:38:54.000Z
2022-03-31T03:30:30.000Z
samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_create_snapshot_schedule_policy_sync.py
renovate-bot/pythonbaremetalsolution
4e5d230a5468b444c346bd0216db7db02ce60e0c
[ "Apache-2.0" ]
1
2022-03-24T18:33:49.000Z
2022-03-24T18:37:11.000Z
samples/generated_samples/baremetalsolution_v2_generated_bare_metal_solution_create_snapshot_schedule_policy_sync.py
googleapis/python-bare-metal-solution
2cfdd4d02f3ace3ea2701584e636845f40695a7b
[ "Apache-2.0" ]
1
2022-03-24T16:06:23.000Z
2022-03-24T16:06:23.000Z
# -*- coding: utf-8 -*- # Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
35.978723
92
0.784743
from google.cloud import bare_metal_solution_v2 def sample_create_snapshot_schedule_policy(): client = bare_metal_solution_v2.BareMetalSolutionClient() request = bare_metal_solution_v2.CreateSnapshotSchedulePolicyRequest( parent="parent_value", snapshot_sch...
true
true
1c27a46a5145a7bad8f90b81b9c82421e98c8f2a
31,121
py
Python
neutron/api/extensions.py
rolaya/neutron
49f6773998ce8e8c68197a853d7f12e5e9dc6df5
[ "Apache-2.0" ]
null
null
null
neutron/api/extensions.py
rolaya/neutron
49f6773998ce8e8c68197a853d7f12e5e9dc6df5
[ "Apache-2.0" ]
null
null
null
neutron/api/extensions.py
rolaya/neutron
49f6773998ce8e8c68197a853d7f12e5e9dc6df5
[ "Apache-2.0" ]
null
null
null
# Copyright 2011 OpenStack Foundation. # 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 req...
43.283727
100
0.607371
import collections import imp import os from neutron_lib.api import extensions as api_extensions from neutron_lib import exceptions from neutron_lib.plugins import directory from oslo_config import cfg from oslo_log import log as logging from oslo_middleware import base import routes import webob.dec im...
true
true
1c27a522f87748555e2d1e9b772b057399d385ed
950
py
Python
e2e/scripts/map.py
Camilo-Mendoza/streamlit-ML
be8aafdf9f334b92a6e056e6c4f994da82587f80
[ "Apache-2.0" ]
null
null
null
e2e/scripts/map.py
Camilo-Mendoza/streamlit-ML
be8aafdf9f334b92a6e056e6c4f994da82587f80
[ "Apache-2.0" ]
9
2021-03-01T20:47:52.000Z
2022-02-12T20:49:50.000Z
e2e/scripts/map.py
Camilo-Mendoza/streamlit-ML
be8aafdf9f334b92a6e056e6c4f994da82587f80
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2018-2019 Streamlit Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
31.666667
74
0.728421
import streamlit as st import pandas as pd import numpy as np coords = np.random.randn(1000, 2) / [50, 50] + [37.76, -122.4] df = pd.DataFrame(coords, columns=['lat', 'lon']) st.map(df) st.map(df, zoom=8)
true
true
1c27a64070bab41ed974d968a8c5cc2d5714ae62
5,123
py
Python
OSABA/pix2pix/models/copy_network.py
tsingqguo/ABA
c32edbbe5705b0332a08951b5ee436b5f58c2e70
[ "MIT" ]
12
2021-07-27T07:18:24.000Z
2022-03-09T13:52:20.000Z
OSABA/pix2pix/models/copy_network.py
tsingqguo/ABA
c32edbbe5705b0332a08951b5ee436b5f58c2e70
[ "MIT" ]
2
2021-08-03T09:21:33.000Z
2021-12-29T14:25:30.000Z
OSABA/pix2pix/models/copy_network.py
tsingqguo/ABA
c32edbbe5705b0332a08951b5ee436b5f58c2e70
[ "MIT" ]
3
2021-11-18T14:46:40.000Z
2022-01-03T15:47:23.000Z
import torch import torch.nn as nn from torch.nn import init import functools from torch.optim import lr_scheduler from torch.nn import functional as F class cheng_UnetGenerator(nn.Module): def __init__(self,input_nc,output_nc,num_downs,ngf=64,norm_layer=nn.BatchNorm2d,use_dropout=False): super(cheng_Un...
36.077465
103
0.604724
import torch import torch.nn as nn from torch.nn import init import functools from torch.optim import lr_scheduler from torch.nn import functional as F class cheng_UnetGenerator(nn.Module): def __init__(self,input_nc,output_nc,num_downs,ngf=64,norm_layer=nn.BatchNorm2d,use_dropout=False): super(cheng_Un...
true
true
1c27a7df678fde810ed1d72733f22efbe5cd4805
98,431
py
Python
metarecord/tests/test_api.py
City-of-Helsinki/helerm
b7475d0b8f73b134a3e5d2cbb12650d64ef0008a
[ "MIT" ]
2
2017-04-21T15:36:23.000Z
2020-12-04T09:32:39.000Z
metarecord/tests/test_api.py
City-of-Helsinki/helerm
b7475d0b8f73b134a3e5d2cbb12650d64ef0008a
[ "MIT" ]
168
2016-10-05T12:58:41.000Z
2021-08-31T14:29:56.000Z
metarecord/tests/test_api.py
City-of-Helsinki/helerm
b7475d0b8f73b134a3e5d2cbb12650d64ef0008a
[ "MIT" ]
7
2016-10-13T12:51:36.000Z
2021-01-21T13:05:04.000Z
import datetime import json import uuid from unittest import mock import freezegun import pytest import pytz from django.utils.translation import gettext_lazy as _ from rest_framework.reverse import reverse from metarecord.models import Action, Classification, Function, Phase, Record from metarecord.models.bulk_updat...
40.606848
137
0.733041
import datetime import json import uuid from unittest import mock import freezegun import pytest import pytz from django.utils.translation import gettext_lazy as _ from rest_framework.reverse import reverse from metarecord.models import Action, Classification, Function, Phase, Record from metarecord.models.bulk_updat...
true
true
1c27a8094357b27db837b558ee94f5f767831b83
2,285
py
Python
sample_data/Set-PD-Ix-100/3_Analyses/DOE_Ix-PD-100/Input_point1/Imperfection_point1/DoE_point48/script_DoE48_write_linear_buckling_inputs.py
hanklu2020/mabessa_F3DAS
57b1bd1cb85d96567ad1044c216535ab3df88db3
[ "BSD-3-Clause" ]
null
null
null
sample_data/Set-PD-Ix-100/3_Analyses/DOE_Ix-PD-100/Input_point1/Imperfection_point1/DoE_point48/script_DoE48_write_linear_buckling_inputs.py
hanklu2020/mabessa_F3DAS
57b1bd1cb85d96567ad1044c216535ab3df88db3
[ "BSD-3-Clause" ]
null
null
null
sample_data/Set-PD-Ix-100/3_Analyses/DOE_Ix-PD-100/Input_point1/Imperfection_point1/DoE_point48/script_DoE48_write_linear_buckling_inputs.py
hanklu2020/mabessa_F3DAS
57b1bd1cb85d96567ad1044c216535ab3df88db3
[ "BSD-3-Clause" ]
null
null
null
#=====================================================================# # # Created by M.A. Bessa on 12-Nov-2019 03:25:41 #=====================================================================# from abaqusConstants import * from odbAccess import * import os import numpy import collections # os.chdir(r'/home/gkus/F3DAS-...
38.728814
144
0.639387
from abaqusConstants import * from odbAccess import * import os import numpy import collections os.chdir(r'/home/gkus/F3DAS-master/3_Analyses/DOE_Ix-PD-100/Input_point1/Imperfection_point1/DoE_point48') with open('DoE48_linear_buckle.inp','w') as File: File.write('** Include file with mesh of structure:\n') ...
true
true
1c27a910f6958d600e81a20717102b3799a814c9
40
py
Python
PyInstaller/hooks/hook-pywt.py
BrianZ111/TGC-Designer-Tools
bc0cca96444b33c0ae93e5c5d43e40061cdef6b8
[ "Apache-2.0" ]
38
2019-02-07T21:54:25.000Z
2022-03-13T14:52:56.000Z
PyInstaller/hooks/hook-pywt.py
BrianZ111/TGC-Designer-Tools
bc0cca96444b33c0ae93e5c5d43e40061cdef6b8
[ "Apache-2.0" ]
86
2019-02-07T01:54:03.000Z
2022-03-25T07:18:30.000Z
PyInstaller/hooks/hook-pywt.py
BrianZ111/TGC-Designer-Tools
bc0cca96444b33c0ae93e5c5d43e40061cdef6b8
[ "Apache-2.0" ]
20
2019-03-04T20:08:14.000Z
2022-02-09T19:33:47.000Z
hiddenimports=['pywt._extensions._cwt']
20
39
0.8
hiddenimports=['pywt._extensions._cwt']
true
true
1c27aaba87ff8f916e98642ac68d293ba3145aec
1,577
py
Python
install-appd-machine-agent.py
nvkk-devops/python-automation-scripts
8930dde979124fa8b5812e60243a25952a2c8013
[ "MIT" ]
null
null
null
install-appd-machine-agent.py
nvkk-devops/python-automation-scripts
8930dde979124fa8b5812e60243a25952a2c8013
[ "MIT" ]
null
null
null
install-appd-machine-agent.py
nvkk-devops/python-automation-scripts
8930dde979124fa8b5812e60243a25952a2c8013
[ "MIT" ]
null
null
null
import winrm import os print('\n********************************\n') print(os.environ['winrm_endpoint']) print(os.environ['domain_username']) print('\n********************************\n') s = winrm.Session(os.environ['winrm_endpoint'], auth=(os.environ['domain_username'], os.environ['domain_password']), transport='nt...
35.044444
134
0.72733
import winrm import os print('\n********************************\n') print(os.environ['winrm_endpoint']) print(os.environ['domain_username']) print('\n********************************\n') s = winrm.Session(os.environ['winrm_endpoint'], auth=(os.environ['domain_username'], os.environ['domain_password']), transport='nt...
true
true
1c27aacde8f958ba7bc88aa3b59a69f5fc3072bb
3,508
py
Python
xpxchain/models/mosaic/network_currency_mosaic.py
Sharmelen/python-xpx-chain-sdk
a1bfb1b7da20d50dd5049a950794955d1c492a71
[ "Apache-2.0" ]
1
2021-02-02T12:46:51.000Z
2021-02-02T12:46:51.000Z
xpxchain/models/mosaic/network_currency_mosaic.py
Sharmelen/python-xpx-chain-sdk
a1bfb1b7da20d50dd5049a950794955d1c492a71
[ "Apache-2.0" ]
4
2021-02-06T06:14:27.000Z
2021-07-20T11:41:44.000Z
xpxchain/models/mosaic/network_currency_mosaic.py
Sharmelen/python-xpx-chain-sdk
a1bfb1b7da20d50dd5049a950794955d1c492a71
[ "Apache-2.0" ]
1
2021-08-09T15:45:21.000Z
2021-08-09T15:45:21.000Z
""" network_currency_mosaic ======================= Description of a per-network currency mosaic. License ------- Copyright 2019 NEM 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 c...
31.044248
81
0.662201
from __future__ import annotations import typing from .mosaic import Mosaic from ..blockchain.network_type import OptionalNetworkType from ..namespace.namespace_id import NamespaceId from ... import util __all__ = ['NetworkCurrencyMosaic'] class NetworkCurrencyMosaic(Mosaic): __slots__ = () NAMESPACE_ID: ...
true
true
1c27ac1e93e213ecc8403ae5114925f538908078
7,507
py
Python
keras/tests/custom_training_loop_test.py
websterkovacek/keras
631102a7c9efb57a351355090796d5850285663c
[ "Apache-2.0" ]
1
2021-01-01T00:16:04.000Z
2021-01-01T00:16:04.000Z
keras/tests/custom_training_loop_test.py
websterkovacek/keras
631102a7c9efb57a351355090796d5850285663c
[ "Apache-2.0" ]
1
2021-01-10T15:10:05.000Z
2021-01-25T09:19:15.000Z
keras/tests/custom_training_loop_test.py
websterkovacek/keras
631102a7c9efb57a351355090796d5850285663c
[ "Apache-2.0" ]
1
2021-01-10T09:06:39.000Z
2021-01-10T09:06:39.000Z
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
31.020661
80
0.667644
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf from absl.testing import parameterized import numpy as np import keras from keras import keras_parameterized from keras import testing_utils class LayerWithLosses(kera...
true
true
1c27ac60e4a9ed93de498f8ca820847c799293f9
21,249
py
Python
tests/language/test_schema_parser.py
patrys/graphql-core-next
f6b078bddae4dd8a48ebf878a6fd5fbbac52bd1b
[ "MIT" ]
null
null
null
tests/language/test_schema_parser.py
patrys/graphql-core-next
f6b078bddae4dd8a48ebf878a6fd5fbbac52bd1b
[ "MIT" ]
3
2021-03-20T05:19:34.000Z
2021-06-02T03:27:28.000Z
tests/language/test_schema_parser.py
patrys/graphql-core-next
f6b078bddae4dd8a48ebf878a6fd5fbbac52bd1b
[ "MIT" ]
null
null
null
from textwrap import dedent from pytest import raises from graphql.error import GraphQLSyntaxError from graphql.language import ( BooleanValueNode, DocumentNode, EnumTypeDefinitionNode, EnumValueDefinitionNode, FieldDefinitionNode, InputObjectTypeDefinitionNode, InputValueDefinitionNode, ...
33.835987
87
0.552308
from textwrap import dedent from pytest import raises from graphql.error import GraphQLSyntaxError from graphql.language import ( BooleanValueNode, DocumentNode, EnumTypeDefinitionNode, EnumValueDefinitionNode, FieldDefinitionNode, InputObjectTypeDefinitionNode, InputValueDefinitionNode, ...
true
true
1c27acfde5bba2e2af9be71de3a5abcf87da4ba4
1,292
py
Python
hcipy/atmosphere/modal_adaptive_optics_layer.py
spbos/hcipy
ec679dae8295b7e2a94648da37619574dd8bd92a
[ "MIT" ]
1
2021-04-12T06:25:55.000Z
2021-04-12T06:25:55.000Z
hcipy/atmosphere/modal_adaptive_optics_layer.py
spbos/hcipy
ec679dae8295b7e2a94648da37619574dd8bd92a
[ "MIT" ]
null
null
null
hcipy/atmosphere/modal_adaptive_optics_layer.py
spbos/hcipy
ec679dae8295b7e2a94648da37619574dd8bd92a
[ "MIT" ]
null
null
null
from .atmospheric_model import AtmosphericLayer from ..math_util import inverse_tikhonov import numpy as np class ModalAdaptiveOpticsLayer(AtmosphericLayer): def __init__(self, layer, controlled_modes, lag): self.layer = layer self.controlled_modes = controlled_modes AtmosphericLayer.__init__(self, layer.inpu...
27.489362
109
0.779412
from .atmospheric_model import AtmosphericLayer from ..math_util import inverse_tikhonov import numpy as np class ModalAdaptiveOpticsLayer(AtmosphericLayer): def __init__(self, layer, controlled_modes, lag): self.layer = layer self.controlled_modes = controlled_modes AtmosphericLayer.__init__(self, layer.inpu...
true
true
1c27adcbe2cc6f94aaf4bbc18bb9288bdb8341d2
1,205
py
Python
api/lint.py
LeiSoft/CueObserve
cc5254df7d0cb817a8b3ec427f5cb54a1d420f7e
[ "Apache-2.0" ]
149
2021-07-16T13:37:30.000Z
2022-03-21T10:13:15.000Z
api/lint.py
LeiSoft/CueObserve
cc5254df7d0cb817a8b3ec427f5cb54a1d420f7e
[ "Apache-2.0" ]
61
2021-07-15T06:39:05.000Z
2021-12-27T06:58:10.000Z
api/lint.py
LeiSoft/CueObserve
cc5254df7d0cb817a8b3ec427f5cb54a1d420f7e
[ "Apache-2.0" ]
22
2021-07-19T07:20:49.000Z
2022-03-21T10:13:16.000Z
import argparse from pylint.lint import Run # list all the files that changed for the current PR # changedFilesCommand = """git --no-pager diff --name-only FETCH_HEAD $(git merge-base FETCH_HEAD development)""" parser = argparse.ArgumentParser(prog="LINT") parser.add_argument( "-p", "--path", help="path...
20.775862
113
0.614108
import argparse from pylint.lint import Run parser = argparse.ArgumentParser(prog="LINT") parser.add_argument( "-p", "--path", help="path to directory you want to run pylint | " "Default: %(default)s | " "Type: %(type)s ", default="./src", type=str, ) parser.add_argument( "-t", ...
true
true
1c27af59522188c8ba88fc0b1ca3a6e29f71d81e
4,042
py
Python
plenum/test/signing/test_create_did_without_endorser.py
anikitinDSR/indy-plenum
f2a03344cdff4edbe0bf3528a8ddf34a8b1c6b85
[ "Apache-2.0" ]
null
null
null
plenum/test/signing/test_create_did_without_endorser.py
anikitinDSR/indy-plenum
f2a03344cdff4edbe0bf3528a8ddf34a8b1c6b85
[ "Apache-2.0" ]
null
null
null
plenum/test/signing/test_create_did_without_endorser.py
anikitinDSR/indy-plenum
f2a03344cdff4edbe0bf3528a8ddf34a8b1c6b85
[ "Apache-2.0" ]
null
null
null
import json import types import pytest from indy.did import create_and_store_my_did from indy.ledger import build_nym_request from plenum.common.constants import NYM, STEWARD, ROLE, VERKEY from plenum.common.exceptions import UnauthorizedClientRequest, RequestNackedException, CouldNotAuthenticate from plenum.common.t...
45.931818
120
0.709797
import json import types import pytest from indy.did import create_and_store_my_did from indy.ledger import build_nym_request from plenum.common.constants import NYM, STEWARD, ROLE, VERKEY from plenum.common.exceptions import UnauthorizedClientRequest, RequestNackedException, CouldNotAuthenticate from plenum.common.t...
true
true
1c27afcb6b8563b26e7e1dfdc89ac62280f0f394
1,063
py
Python
project20/models/my_model.py
mirkobronzi/project20
e7a9b52d87e21f436117c7020f167454ee78ffd6
[ "MIT" ]
null
null
null
project20/models/my_model.py
mirkobronzi/project20
e7a9b52d87e21f436117c7020f167454ee78ffd6
[ "MIT" ]
1
2020-07-23T17:18:06.000Z
2020-07-23T17:18:06.000Z
project20/models/my_model.py
mirkobronzi/project20
e7a9b52d87e21f436117c7020f167454ee78ffd6
[ "MIT" ]
null
null
null
import logging import torch.nn as nn from project20.utils.hp_utils import check_and_log_hp logger = logging.getLogger(__name__) class MyModel(nn.Module): # pragma: no cover """Simple Model Class. Inherits from the given framework's model class. This is a simple MLP model. """ def __init__(self, h...
25.926829
80
0.625588
import logging import torch.nn as nn from project20.utils.hp_utils import check_and_log_hp logger = logging.getLogger(__name__) class MyModel(nn.Module): def __init__(self, hyper_params): super(MyModel, self).__init__() check_and_log_hp(['size'], hyper_params) self.hyper_params = hyp...
true
true
1c27b053435ede74dbed81dfc362becfd09cc50c
7,689
py
Python
diff_cover/diff_quality_tool.py
noahp/diff_cover
60220891458503b9a51c424ad54bb540f7b96413
[ "Apache-2.0" ]
null
null
null
diff_cover/diff_quality_tool.py
noahp/diff_cover
60220891458503b9a51c424ad54bb540f7b96413
[ "Apache-2.0" ]
null
null
null
diff_cover/diff_quality_tool.py
noahp/diff_cover
60220891458503b9a51c424ad54bb540f7b96413
[ "Apache-2.0" ]
null
null
null
""" Implement the command-line tool interface for diff_quality. """ from __future__ import unicode_literals import argparse import logging import os import sys import six import diff_cover from diff_cover.diff_cover_tool import COMPARE_BRANCH_HELP, DIFF_RANGE_NOTATION_HELP, FAIL_UNDER_HELP, \ IGNORE_STAGED_HELP,...
29.015094
104
0.631552
from __future__ import unicode_literals import argparse import logging import os import sys import six import diff_cover from diff_cover.diff_cover_tool import COMPARE_BRANCH_HELP, DIFF_RANGE_NOTATION_HELP, FAIL_UNDER_HELP, \ IGNORE_STAGED_HELP, IGNORE_UNSTAGED_HELP, EXCLUDE_HELP, HTML_REPORT_HELP, CSS_FILE_HELP...
true
true
1c27b05909ffca121cdbd886690fbff9cc4688ff
1,584
py
Python
setup.py
natgeosociety/python3-saml
f4a63436ef2e5feeae5868258be23232aa52973b
[ "MIT" ]
null
null
null
setup.py
natgeosociety/python3-saml
f4a63436ef2e5feeae5868258be23232aa52973b
[ "MIT" ]
null
null
null
setup.py
natgeosociety/python3-saml
f4a63436ef2e5feeae5868258be23232aa52973b
[ "MIT" ]
null
null
null
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2010-2018 OneLogin, Inc. # MIT License from setuptools import setup setup( name='ngs-python3-saml', version='1.5.0-ngs', description='Onelogin Python Toolkit. Add SAML support to your Python software using this library', classifiers=[ ...
28.8
103
0.576389
from setuptools import setup setup( name='ngs-python3-saml', version='1.5.0-ngs', description='Onelogin Python Toolkit. Add SAML support to your Python software using this library', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', ...
true
true
1c27b1cfb98574fdc745cb5abe75817443dea5a8
2,499
py
Python
Leak #5 - Lost In Translation/windows/Resources/Ops/PyScripts/monitorwrap.py
bidhata/EquationGroupLeaks
1ff4bc115cb2bd5bf2ed6bf769af44392926830c
[ "Unlicense" ]
9
2019-11-22T04:58:40.000Z
2022-02-26T16:47:28.000Z
Python.Fuzzbunch/Resources/Ops/PyScripts/monitorwrap.py
010001111/Vx-Suites
6b4b90a60512cce48aa7b87aec5e5ac1c4bb9a79
[ "MIT" ]
null
null
null
Python.Fuzzbunch/Resources/Ops/PyScripts/monitorwrap.py
010001111/Vx-Suites
6b4b90a60512cce48aa7b87aec5e5ac1c4bb9a79
[ "MIT" ]
8
2017-09-27T10:31:18.000Z
2022-01-08T10:30:46.000Z
import ops import ops.cmd import ops.data import sys import dsz from optparse import OptionParser if (__name__ == '__main__'): parser = OptionParser() parser.add_option('-t', '--tag', action='store', type='string', default='', dest='tag', help='Cache-tag to save this under') parser.add_option('-s', '--save...
51
156
0.653461
import ops import ops.cmd import ops.data import sys import dsz from optparse import OptionParser if (__name__ == '__main__'): parser = OptionParser() parser.add_option('-t', '--tag', action='store', type='string', default='', dest='tag', help='Cache-tag to save this under') parser.add_option('-s', '--save...
true
true
1c27b25eb700d7b30a2e263338d53870ab7e5a58
5,762
py
Python
app.py
siyu6974/mymazda-relay
c22848dfb162643bb9d53d312bd37711c8fabe04
[ "MIT" ]
null
null
null
app.py
siyu6974/mymazda-relay
c22848dfb162643bb9d53d312bd37711c8fabe04
[ "MIT" ]
null
null
null
app.py
siyu6974/mymazda-relay
c22848dfb162643bb9d53d312bd37711c8fabe04
[ "MIT" ]
null
null
null
import stat from flask import Flask, request, jsonify, render_template from urllib.parse import urlparse, parse_qs import pymazda import requests import re app = Flask(__name__) @app.route("/") def hello_world(): return render_template('index.html') @app.route("/vehicles_html") async def getVehicles_html() -> None...
29.548718
78
0.68084
import stat from flask import Flask, request, jsonify, render_template from urllib.parse import urlparse, parse_qs import pymazda import requests import re app = Flask(__name__) @app.route("/") def hello_world(): return render_template('index.html') @app.route("/vehicles_html") async def getVehicles_html() -> None...
true
true
1c27b335054bebe545afbcf410a5e43b5e3091a6
4,678
py
Python
tests/test_cases/project_service_test.py
webu/pyopenproject
40b2cb9fe0fa3f89bc0fe2a3be323422d9ecf966
[ "MIT" ]
5
2021-02-25T15:54:28.000Z
2021-04-22T15:43:36.000Z
tests/test_cases/project_service_test.py
webu/pyopenproject
40b2cb9fe0fa3f89bc0fe2a3be323422d9ecf966
[ "MIT" ]
7
2021-03-15T16:26:23.000Z
2022-03-16T13:45:18.000Z
tests/test_cases/project_service_test.py
webu/pyopenproject
40b2cb9fe0fa3f89bc0fe2a3be323422d9ecf966
[ "MIT" ]
6
2021-06-18T18:59:11.000Z
2022-03-27T04:58:52.000Z
import json import os from pyopenproject.business.exception.business_error import BusinessError from pyopenproject.business.util.filter import Filter from pyopenproject.model.project import Project from pyopenproject.model.user import User from pyopenproject.model.work_package import WorkPackage from tests.test_cases....
38.661157
106
0.662035
import json import os from pyopenproject.business.exception.business_error import BusinessError from pyopenproject.business.util.filter import Filter from pyopenproject.model.project import Project from pyopenproject.model.user import User from pyopenproject.model.work_package import WorkPackage from tests.test_cases....
true
true
1c27b6257cde8bbb2c5cb330444dcadbce16d486
10,322
py
Python
slowfast/datasets/utils.py
Morgan-Gan/Slowfast-TSM
ca6783df0cc9577abb1735b2cab52653d569beff
[ "Apache-2.0" ]
null
null
null
slowfast/datasets/utils.py
Morgan-Gan/Slowfast-TSM
ca6783df0cc9577abb1735b2cab52653d569beff
[ "Apache-2.0" ]
null
null
null
slowfast/datasets/utils.py
Morgan-Gan/Slowfast-TSM
ca6783df0cc9577abb1735b2cab52653d569beff
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import logging import numpy as np import os import random import time from collections import defaultdict import cv2 import torch from fvcore.common.file_io import PathManager from . import transform as transform logger = logging.getLogger(__name__) def retry_load_images(image_paths, retry=1...
34.292359
128
0.619744
import logging import numpy as np import os import random import time from collections import defaultdict import cv2 import torch from fvcore.common.file_io import PathManager from . import transform as transform logger = logging.getLogger(__name__) def retry_load_images(image_paths, retry=10, backend="pytorch"):...
true
true
1c27b62637ca8bcfa654468664e66c2897c95aaf
8,187
py
Python
docs/conf.py
javipalanca/django-usda-mongo
bfb26778e0d366d094297f999cf8e42659383e41
[ "BSD-3-Clause" ]
1
2015-05-12T13:17:42.000Z
2015-05-12T13:17:42.000Z
docs/conf.py
javipalanca/django-usda-mongo
bfb26778e0d366d094297f999cf8e42659383e41
[ "BSD-3-Clause" ]
null
null
null
docs/conf.py
javipalanca/django-usda-mongo
bfb26778e0d366d094297f999cf8e42659383e41
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # complexity documentation build configuration file, created by # sphinx-quickstart on Tue Jul 9 22:26:36 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # ...
32.105882
80
0.717968
import sys, os cwd = os.getcwd() parent = os.path.dirname(cwd) sys.path.append(parent) import usda_mongo extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode'] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'django-usda-mongo' copyright ...
true
true
1c27b6a8195f8731e2ee0f215b4c6067c15d4b6d
4,396
py
Python
backend/src/gloader/xml/sax/drivers/drv_xmlproc.py
anrl/gini4
d26649c8c02a1737159e48732cf1ee15ba2a604d
[ "MIT" ]
11
2019-03-02T20:39:34.000Z
2021-09-02T19:47:38.000Z
backend/src/gloader/xml/sax/drivers/drv_xmlproc.py
anrl/gini4
d26649c8c02a1737159e48732cf1ee15ba2a604d
[ "MIT" ]
29
2019-01-17T15:44:48.000Z
2021-06-02T00:19:40.000Z
backend/src/gloader/xml/sax/drivers/drv_xmlproc.py
anrl/gini4
d26649c8c02a1737159e48732cf1ee15ba2a604d
[ "MIT" ]
11
2019-01-28T05:00:55.000Z
2021-11-12T03:08:32.000Z
""" A SAX driver for xmlproc $Id: drv_xmlproc.py,v 1.13 2001/12/30 12:13:45 loewis Exp $ """ version="0.95" from xml.sax import saxlib, saxutils from xml.parsers.xmlproc import xmlproc import os # --- SAX_XPParser class SAX_XPParser(saxlib.Parser,xmlproc.Application,xmlproc.DTDConsumer, xmlproc...
26.166667
87
0.648772
version="0.95" from xml.sax import saxlib, saxutils from xml.parsers.xmlproc import xmlproc import os class SAX_XPParser(saxlib.Parser,xmlproc.Application,xmlproc.DTDConsumer, xmlproc.ErrorHandler,xmlproc.PubIdResolver): def __init__(self): saxlib.Parser.__init__(self) self...
true
true
1c27b75854d96f29b0b4bec8e7e7101d37c1d5f4
25,994
py
Python
pytorch_lightning/trainer/connectors/logger_connector/result.py
Code-Cornelius/pytorch-lightning
ce95891f6ab21a6cb1e5e6bc46cebafe9aab6057
[ "Apache-2.0" ]
null
null
null
pytorch_lightning/trainer/connectors/logger_connector/result.py
Code-Cornelius/pytorch-lightning
ce95891f6ab21a6cb1e5e6bc46cebafe9aab6057
[ "Apache-2.0" ]
1
2021-05-17T23:59:43.000Z
2021-05-17T23:59:43.000Z
pytorch_lightning/trainer/connectors/logger_connector/result.py
Code-Cornelius/pytorch-lightning
ce95891f6ab21a6cb1e5e6bc46cebafe9aab6057
[ "Apache-2.0" ]
null
null
null
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
38.452663
118
0.63053
from collections.abc import Generator from dataclasses import asdict, dataclass, replace from functools import partial, wraps from typing import Any, Callable, Dict, List, Optional, Tuple, Union import torch from torchmetrics import Metric from typing_extensions import TypedDict from pytorch_lightning.co...
true
true
1c27b75ba11955f79117bd24089fb9f5e0dc875f
4,960
py
Python
tests/test_haystack_read.py
sgrah-oss/haystackapi
dc6000120e5ef97b174bb1440460ce170f22026e
[ "BSD-2-Clause", "Apache-2.0" ]
null
null
null
tests/test_haystack_read.py
sgrah-oss/haystackapi
dc6000120e5ef97b174bb1440460ce170f22026e
[ "BSD-2-Clause", "Apache-2.0" ]
null
null
null
tests/test_haystack_read.py
sgrah-oss/haystackapi
dc6000120e5ef97b174bb1440460ce170f22026e
[ "BSD-2-Clause", "Apache-2.0" ]
null
null
null
from unittest.mock import patch import haystackapi from haystackapi import Grid, Ref from haystackapi.ops import HaystackHttpRequest, DEFAULT_MIME_TYPE from haystackapi.providers import ping @patch.dict('os.environ', {'HAYSTACK_PROVIDER': 'haystackapi.providers.ping'}) @patch.object(ping.Provider, 'read') def test_r...
34.929577
78
0.696774
from unittest.mock import patch import haystackapi from haystackapi import Grid, Ref from haystackapi.ops import HaystackHttpRequest, DEFAULT_MIME_TYPE from haystackapi.providers import ping @patch.dict('os.environ', {'HAYSTACK_PROVIDER': 'haystackapi.providers.ping'}) @patch.object(ping.Provider, 'read') def test_r...
true
true
1c27b9001df1b50011e2452e977dc8f7240f4777
357
py
Python
docs/examples/time_series/predict.py
aykuttasil/mindsdb
2c36b6f75f13d7104fe4d3dbb7ca307fa84f45ad
[ "MIT" ]
1
2022-03-14T00:32:53.000Z
2022-03-14T00:32:53.000Z
docs/examples/time_series/predict.py
aykuttasil/mindsdb
2c36b6f75f13d7104fe4d3dbb7ca307fa84f45ad
[ "MIT" ]
null
null
null
docs/examples/time_series/predict.py
aykuttasil/mindsdb
2c36b6f75f13d7104fe4d3dbb7ca307fa84f45ad
[ "MIT" ]
null
null
null
""" """ from mindsdb import * # Here we use the model to make predictions (NOTE: You need to run train.py first) result = MindsDB().predict(predict='Main_Engine_Fuel_Consumption_MT_day', model_name='fuel', from_data = 'fuel_predict.csv') # you can now print the results print('The predicted main engine fuel consumpt...
27.461538
124
0.761905
from mindsdb import * result = MindsDB().predict(predict='Main_Engine_Fuel_Consumption_MT_day', model_name='fuel', from_data = 'fuel_predict.csv') print('The predicted main engine fuel consumption') print(result.predicted_values)
true
true
1c27b9707872fe57fab0a06d33d953570e2f671f
1,355
py
Python
MetaGen/make_ground_truth_demos.py
zhangir-azerbayev/MetaGen
1bfb2851973d60e0526c7f3ef47828999e0176d7
[ "MIT" ]
1
2021-12-31T01:11:45.000Z
2021-12-31T01:11:45.000Z
MetaGen/make_ground_truth_demos.py
zhangir-azerbayev/MetaGen
1bfb2851973d60e0526c7f3ef47828999e0176d7
[ "MIT" ]
null
null
null
MetaGen/make_ground_truth_demos.py
zhangir-azerbayev/MetaGen
1bfb2851973d60e0526c7f3ef47828999e0176d7
[ "MIT" ]
1
2021-10-05T01:52:44.000Z
2021-10-05T01:52:44.000Z
#run from shell with exec(open("ORB_project3/MetaGen/show_images.py").read()) #make gif from command line with convert -delay 50 *.jpg(n) out.gif import json import base64 from io import BytesIO from PIL import Image, ImageDraw import math office_subset = ["chair", "keyboard", "laptop", "dining table", "potted plant...
36.621622
103
0.637638
import json import base64 from io import BytesIO from PIL import Image, ImageDraw import math office_subset = ["chair", "keyboard", "laptop", "dining table", "potted plant", "cell phone", "bottle"] f = open("ORB_project3/Data/output_with_gt.json",) dict = json.load(f) v = 2 for x in range(300): ...
true
true
1c27ba47106092a6e339d8d44a97719fbcdad469
5,054
py
Python
atariari/methods/pretrained_agents.py
DuaneNielsen/atari-representation-learning
fe34f389768416deaa6a6ff0bdebba3d05762a55
[ "MIT" ]
175
2019-09-10T08:11:41.000Z
2022-03-25T15:37:37.000Z
atariari/methods/pretrained_agents.py
DuaneNielsen/atari-representation-learning
fe34f389768416deaa6a6ff0bdebba3d05762a55
[ "MIT" ]
21
2019-09-30T14:45:45.000Z
2022-03-31T04:46:47.000Z
atariari/methods/pretrained_agents.py
DuaneNielsen/atari-representation-learning
fe34f389768416deaa6a6ff0bdebba3d05762a55
[ "MIT" ]
40
2019-09-11T13:25:27.000Z
2022-02-14T03:49:01.000Z
from a2c_ppo_acktr import utils from a2c_ppo_acktr.envs import make_vec_envs as mve from collections import deque from itertools import chain import numpy as np import torch import wandb import time import os from atariari.benchmark.envs import make_vec_envs from atariari.benchmark.episodes import checkpointed_steps_f...
39.178295
109
0.657697
from a2c_ppo_acktr import utils from a2c_ppo_acktr.envs import make_vec_envs as mve from collections import deque from itertools import chain import numpy as np import torch import wandb import time import os from atariari.benchmark.envs import make_vec_envs from atariari.benchmark.episodes import checkpointed_steps_f...
true
true
1c27bb2922dd715f215b1dba0d8a97688528e2d7
1,716
py
Python
writeups/pwn/beeper/beeper.py
Nu1LCTF/n1ctf-2018
4bde4e5b31b273f780409a48b1f5b809efe38ba4
[ "MIT" ]
239
2018-03-12T01:53:44.000Z
2022-03-05T19:12:25.000Z
writeups/pwn/beeper/beeper.py
m4p1e/n1ctf-2018
4bde4e5b31b273f780409a48b1f5b809efe38ba4
[ "MIT" ]
2
2018-03-19T08:22:50.000Z
2018-04-24T11:10:16.000Z
writeups/pwn/beeper/beeper.py
m4p1e/n1ctf-2018
4bde4e5b31b273f780409a48b1f5b809efe38ba4
[ "MIT" ]
54
2018-03-13T02:13:41.000Z
2021-12-29T17:54:27.000Z
#BokuWaDokoNiIruNo? #free 1,2,0 show 0 #"\x6a\x3b\x58\x99\x52\x48\xbb\x2f\x2f\x62\x69\x6e\x2f\x73\x68\x53\x54\x5f\x52\x57\x54\x5e\x0f\x05"; #"\x68\x6f\x64\x20\x01\x81\x34\x24\x01\x01\x01\x01\x48\xb8\x75\x79\x20\x61\x20\x70\x68\x6f\x50\x48\xb8\x61\x6e\x20\x6e\x6f\x74\x20\x62\x50\x48\xb8\x65\x72\x2c\x79\x6f\x75\x20\x63\x...
35.020408
297
0.701049
from pwn import * p=process('./beeper') p.recv() p.sendline("BokuWaDokoNiIruNo?") p.recvuntil('choice>>') p.sendline('2') p.recvuntil('remove?') p.sendline('1') p.recvuntil('choice>>') p.sendline('2') p.recvuntil('remove?') p.sendline('2') p.recvuntil('choice>>') p.sendline('2') p.recvuntil('remove?') p.sendline('0...
false
true
1c27bbd11f306f812441045a8011bfe1c8d843d0
1,389
py
Python
TestRobustness/RFTrain/old/instance_model_train_5.23.18_JitterRad-10.0_jitterPerc-1.0.py
aparna-arr/DeepLearningChromatinStructure
f56d36b8fc8b01df407ed7a2526266c4d8e731d4
[ "MIT" ]
3
2021-07-26T02:06:39.000Z
2022-03-20T13:00:25.000Z
TestRobustness/RFTrain/old/instance_model_train_5.23.18_JitterRad-10.0_jitterPerc-1.0.py
aparna-arr/DeepLearningChromatinStructure
f56d36b8fc8b01df407ed7a2526266c4d8e731d4
[ "MIT" ]
null
null
null
TestRobustness/RFTrain/old/instance_model_train_5.23.18_JitterRad-10.0_jitterPerc-1.0.py
aparna-arr/DeepLearningChromatinStructure
f56d36b8fc8b01df407ed7a2526266c4d8e731d4
[ "MIT" ]
1
2021-06-09T16:04:52.000Z
2021-06-09T16:04:52.000Z
#!/share/software/user/open/python/3.6.1/bin/python3 from src.ModelDriver import * ## MODIFY THESE PARAMS FOR SPECIFIC RUN ### X_train = "/oak/stanford/groups/aboettig/Aparna/NNreviews/TestRobustness/jitterData/train_5.23.18_JitterRad-10.0_jitterPerc-1.0_xyz.txt" Y_train = "/oak/stanford/groups/aboettig/Aparna/NNproj...
30.195652
136
0.773218
from src.ModelDriver import * a/NNreviews/TestRobustness/jitterData/train_5.23.18_JitterRad-10.0_jitterPerc-1.0_xyz.txt" Y_train = "/oak/stanford/groups/aboettig/Aparna/NNproject/clean_data/train_5.23.18_unbalanced_unaugmented_rna_2.txt" X_dev = "/oak/stanford/groups/aboettig/Aparna/NNproject/clean_data/dev_5.23.18_u...
true
true
1c27bbd8d81cbd9d1c6f447667468537617345f0
25,987
py
Python
swagger_client/models/get_characters_character_id_industry_jobs_200_ok.py
rseichter/bootini-star
a80258f01a05e4df38748b8cb47dfadabd42c20d
[ "MIT" ]
null
null
null
swagger_client/models/get_characters_character_id_industry_jobs_200_ok.py
rseichter/bootini-star
a80258f01a05e4df38748b8cb47dfadabd42c20d
[ "MIT" ]
null
null
null
swagger_client/models/get_characters_character_id_industry_jobs_200_ok.py
rseichter/bootini-star
a80258f01a05e4df38748b8cb47dfadabd42c20d
[ "MIT" ]
null
null
null
# coding: utf-8 """ EVE Swagger Interface An OpenAPI for EVE Online # noqa: E501 OpenAPI spec version: 0.8.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class GetCharactersCharacterIdIndustryJobs200Ok(object): ""...
35.943292
449
0.660138
import pprint import re import six class GetCharactersCharacterIdIndustryJobs200Ok(object): swagger_types = { 'job_id': 'int', 'installer_id': 'int', 'facility_id': 'int', 'station_id': 'int', 'activity_id': 'int', 'blueprint_id': 'int', 'blueprint_t...
true
true
1c27bd5c2fafd234afbe61ce160d3468610e110f
15,388
py
Python
sdk/python/pulumi_azure/datafactory/dataset_http.py
suresh198526/pulumi-azure
bf27206a38d7a5c58b3c2c57ec8769fe3d0fc5d7
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure/datafactory/dataset_http.py
suresh198526/pulumi-azure
bf27206a38d7a5c58b3c2c57ec8769fe3d0fc5d7
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure/datafactory/dataset_http.py
suresh198526/pulumi-azure
bf27206a38d7a5c58b3c2c57ec8769fe3d0fc5d7
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from .. import _utilitie...
51.986486
284
0.673707
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from .. import _utilities, _tables from . import outputs from ._inputs import * __all__ = ['DatasetHttp'] class DatasetHttp(pulumi.CustomResource): def __init__(__self__, resource_n...
true
true
1c27bd5e1562bed0759523eb9a8c4fc4e403eb9b
24,636
py
Python
utils4/utils.py
S3DEV/utils4
6c196c9928914412f0cadcb8b2ce1f0eeb285b25
[ "MIT" ]
null
null
null
utils4/utils.py
S3DEV/utils4
6c196c9928914412f0cadcb8b2ce1f0eeb285b25
[ "MIT" ]
null
null
null
utils4/utils.py
S3DEV/utils4
6c196c9928914412f0cadcb8b2ce1f0eeb285b25
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ :Purpose: Central library for general utility-based methods. This ``utils`` module was the starting place of the original ``utils`` library. Therefore, it's historically been a 'dumping-ground' for general S3DEV utilities and function wrappers ...
34.074689
102
0.591086
import pandas as pd import platform import re import site import string import subprocess from datetime import datetime from typing import Union from utils4.reporterror import reporterror from utils4.user_interface import ui def clean_dataframe(df: pd.DataFrame): repls = {k: '' for k in string.punctuation} ...
true
true
1c27bd9f7c4a222f5df920da7c5d39ddb94c8bfd
27,438
py
Python
monte_carlo_tests/monte_carlo_statsmodels.py
khwilson/EconML
80264390106a8c57e2286177a2c4f8a47b51a32e
[ "MIT" ]
1
2021-09-18T04:07:07.000Z
2021-09-18T04:07:07.000Z
monte_carlo_tests/monte_carlo_statsmodels.py
khwilson/EconML
80264390106a8c57e2286177a2c4f8a47b51a32e
[ "MIT" ]
null
null
null
monte_carlo_tests/monte_carlo_statsmodels.py
khwilson/EconML
80264390106a8c57e2286177a2c4f8a47b51a32e
[ "MIT" ]
1
2020-09-10T21:29:36.000Z
2020-09-10T21:29:36.000Z
import numpy as np from econml.dml import LinearDMLCateEstimator from sklearn.linear_model import LinearRegression, MultiTaskLassoCV, MultiTaskLasso, Lasso from econml.inference import StatsModelsInference from econml.tests.test_statsmodels import _summarize from econml.sklearn_extensions.linear_model import Weigh...
60.039387
122
0.423901
import numpy as np from econml.dml import LinearDMLCateEstimator from sklearn.linear_model import LinearRegression, MultiTaskLassoCV, MultiTaskLasso, Lasso from econml.inference import StatsModelsInference from econml.tests.test_statsmodels import _summarize from econml.sklearn_extensions.linear_model import Weigh...
true
true
1c27bdc6471b29c968ea2d2a27d674ea59e0580b
757
py
Python
src/data/IndoorOutdoorData.py
stefantaubert/imageclef-lifelog-2019
e779526583978be828ebc096538d094cc3cc260e
[ "MIT" ]
1
2020-08-15T01:55:07.000Z
2020-08-15T01:55:07.000Z
src/data/IndoorOutdoorData.py
stefantaubert/imageclef-lifelog-2019
e779526583978be828ebc096538d094cc3cc260e
[ "MIT" ]
null
null
null
src/data/IndoorOutdoorData.py
stefantaubert/imageclef-lifelog-2019
e779526583978be828ebc096538d094cc3cc260e
[ "MIT" ]
null
null
null
from src.io.ReadingContext import ReadingContext from src.data.DataBase import DataBase from src.globals import vc_cat_cols from src.globals import vc_cat_score_cols name_io = "indoor_outdoor" indoor_outdoor = [ "indoor", "outdoor", ] class IndoorOutdoorData(DataBase): def __init__(self, ctx: ReadingCont...
22.264706
48
0.668428
from src.io.ReadingContext import ReadingContext from src.data.DataBase import DataBase from src.globals import vc_cat_cols from src.globals import vc_cat_score_cols name_io = "indoor_outdoor" indoor_outdoor = [ "indoor", "outdoor", ] class IndoorOutdoorData(DataBase): def __init__(self, ctx: ReadingCont...
true
true
1c27bde0b0724ffc9761b49ab5f7a4a7b49788c6
4,910
py
Python
tests/wrappers/test_bootstrapping.py
bibinwils/metrics
e1c3fda24f90367803c2b04315ad7c8bced719db
[ "Apache-2.0" ]
769
2021-03-10T22:39:06.000Z
2022-03-31T02:32:15.000Z
tests/wrappers/test_bootstrapping.py
bibinwils/metrics
e1c3fda24f90367803c2b04315ad7c8bced719db
[ "Apache-2.0" ]
759
2021-03-10T22:29:55.000Z
2022-03-31T23:48:17.000Z
tests/wrappers/test_bootstrapping.py
bibinwils/metrics
e1c3fda24f90367803c2b04315ad7c8bced719db
[ "Apache-2.0" ]
193
2021-03-12T09:03:02.000Z
2022-03-31T06:11:36.000Z
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
39.596774
117
0.712424
import operator from functools import partial import numpy as np import pytest import torch from sklearn.metrics import mean_squared_error, precision_score, recall_score from torch import Tensor from tests.helpers import seed_all from torchmetrics import MeanSquaredError, Precision, Recall from torchmetr...
true
true
1c27be8da3007098d1eb0e816f0bed689afca704
3,148
py
Python
training/supervised/oracles.py
IvoAA/dl2
f656d24b3d227a35b4fc9e0094150fbe17d055ce
[ "MIT" ]
73
2019-05-13T16:09:57.000Z
2022-02-23T20:58:31.000Z
training/supervised/oracles.py
IvoAA/dl2
f656d24b3d227a35b4fc9e0094150fbe17d055ce
[ "MIT" ]
4
2021-05-23T11:17:20.000Z
2021-07-01T01:15:24.000Z
training/supervised/oracles.py
IvoAA/dl2
f656d24b3d227a35b4fc9e0094150fbe17d055ce
[ "MIT" ]
21
2019-06-18T06:32:29.000Z
2022-03-30T11:53:44.000Z
import numpy as np import torch class DL2_Oracle: def __init__(self, learning_rate, net, constraint, use_cuda): self.learning_rate = learning_rate self.net = net self.constraint = constraint self.use_cuda = use_cuda def attack(self, x_batch, y_batch, domains, num_restarts, num...
44.971429
121
0.604828
import numpy as np import torch class DL2_Oracle: def __init__(self, learning_rate, net, constraint, use_cuda): self.learning_rate = learning_rate self.net = net self.constraint = constraint self.use_cuda = use_cuda def attack(self, x_batch, y_batch, domains, num_restarts, num...
true
true
1c27bf2eb8723a54feeb18803850e646a3056f7e
352
py
Python
arc/arc008/a/main.py
tonko2/AtCoder
5d617072517881d226d7c8af09cb88684d41af7e
[ "Xnet", "X11", "CECILL-B" ]
2
2022-01-22T07:56:58.000Z
2022-01-24T00:29:37.000Z
arc/arc008/a/main.py
tonko2/AtCoder
5d617072517881d226d7c8af09cb88684d41af7e
[ "Xnet", "X11", "CECILL-B" ]
null
null
null
arc/arc008/a/main.py
tonko2/AtCoder
5d617072517881d226d7c8af09cb88684d41af7e
[ "Xnet", "X11", "CECILL-B" ]
null
null
null
import sys import math from collections import defaultdict, deque sys.setrecursionlimit(10 ** 6) stdin = sys.stdin INF = float('inf') ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline().strip() N = ni() ans = (N // 10) * 100 N %= 10 if N >= 7: ans += 100 el...
16.761905
53
0.627841
import sys import math from collections import defaultdict, deque sys.setrecursionlimit(10 ** 6) stdin = sys.stdin INF = float('inf') ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline().strip() N = ni() ans = (N // 10) * 100 N %= 10 if N >= 7: ans += 100 el...
true
true
1c27bf6ad6d460799be906524046ef82d1cc1b7c
557
py
Python
mall/apps/users/views.py
stevenJim/Django_mall
37203806e97d5c0c787859309b86bd106da7eb3e
[ "MIT" ]
null
null
null
mall/apps/users/views.py
stevenJim/Django_mall
37203806e97d5c0c787859309b86bd106da7eb3e
[ "MIT" ]
null
null
null
mall/apps/users/views.py
stevenJim/Django_mall
37203806e97d5c0c787859309b86bd106da7eb3e
[ "MIT" ]
null
null
null
from django.shortcuts import render # Create your views here. from rest_framework.response import Response from rest_framework.views import APIView from .models import User class RegisterUsernameView(APIView): """ 获取用户名个数: GET: /users/usernames/(?P<username>\w{5,20})/count/ """ def get(self, re...
22.28
62
0.644524
from django.shortcuts import render from rest_framework.response import Response from rest_framework.views import APIView from .models import User class RegisterUsernameView(APIView): def get(self, request, username): count = User.objects.filter(username=username).count() context = { ...
true
true
1c27bffc5d27d5db1543fc7e3e9ff5272a4bc185
1,532
py
Python
connect.py
attlab/k-task-demo
6e9cd1f90d98990ff19a3c68d8255f07807af867
[ "MIT" ]
null
null
null
connect.py
attlab/k-task-demo
6e9cd1f90d98990ff19a3c68d8255f07807af867
[ "MIT" ]
1
2020-10-05T04:10:14.000Z
2020-10-05T04:13:35.000Z
connect.py
attlab/k-task-demo
6e9cd1f90d98990ff19a3c68d8255f07807af867
[ "MIT" ]
1
2020-11-17T17:04:16.000Z
2020-11-17T17:04:16.000Z
import psycopg2 as psycopg2 import os class HandleData(): # this class is used to connect and send data to the database specifieed by # the environment variable 'DATABASE_URL'. environment variables are stored # in a file called '.env' in the root directory. def __init__(self): database_url = os.environ['DA...
26.413793
216
0.708225
import psycopg2 as psycopg2 import os class HandleData(): def __init__(self): database_url = os.environ['DATABASE_URL'] self.database_url = database_url def addData(self,participant_id,block,trial,trial_resp,trial_rt,trial_acc,change): conn = psycopg2.connect(self.database_url, sslmode='require') ...
true
true
1c27c08c6daa02b23a6a97b65b172f058175e1e5
1,340
py
Python
assets/scripts/neals-funnel-a.py
sammosummo/sammosummo.github.io
afecf92aadccf5a0ee1eda835e32a8dbbff35c7c
[ "MIT" ]
1
2021-05-16T20:01:33.000Z
2021-05-16T20:01:33.000Z
assets/scripts/neals-funnel-a.py
sammosummo/sammosummo.github.io
afecf92aadccf5a0ee1eda835e32a8dbbff35c7c
[ "MIT" ]
null
null
null
assets/scripts/neals-funnel-a.py
sammosummo/sammosummo.github.io
afecf92aadccf5a0ee1eda835e32a8dbbff35c7c
[ "MIT" ]
2
2018-11-10T16:29:45.000Z
2018-12-13T15:17:27.000Z
"""Generate data from Neal's funnel distribution. """ import numpy as np import matplotlib.pyplot as plt from matplotlib import rcParams from scipy.stats import norm def main(): # set up figure fs = rcParams["figure.figsize"] rcParams["figure.figsize"] = (fs[0], fs[0] / 2) rcParams["lines.linewidth"...
25.769231
80
0.604478
import numpy as np import matplotlib.pyplot as plt from matplotlib import rcParams from scipy.stats import norm def main(): fs = rcParams["figure.figsize"] rcParams["figure.figsize"] = (fs[0], fs[0] / 2) rcParams["lines.linewidth"] = 2 rcParams["font.size"] = 14 np.random.seed(0) k...
true
true
1c27c12cc883530c2be8b64b3c00ff374762d538
1,636
py
Python
raven/contrib/transports/zeromq/raven_zmq.py
skorokithakis/raven-python
0b210f740579d07a5edae94ae815552a8f8300d5
[ "BSD-3-Clause" ]
1
2020-04-13T02:43:06.000Z
2020-04-13T02:43:06.000Z
raven/contrib/transports/zeromq/raven_zmq.py
SilentCircle/raven-python
b1a9c618584b793d1e48fde135e9fb9b83a90398
[ "BSD-3-Clause" ]
null
null
null
raven/contrib/transports/zeromq/raven_zmq.py
SilentCircle/raven-python
b1a9c618584b793d1e48fde135e9fb9b83a90398
[ "BSD-3-Clause" ]
null
null
null
""" raven.contrib.transports.zeromq.raven_zmq ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details :license: BSD, see LICENSE for more details """ from __future__ import absolute_import from raven.transport import Transport import json class MissingLi...
25.5625
74
0.632029
from __future__ import absolute_import from raven.transport import Transport import json class MissingLibrary(Exception): pass try: import zmq ZMQ_CONTEXT = zmq.Context() except: ZMQ_CONTEXT = None msg = "You need to have pyzmq installed" raise MissingLibrary(msg) class ZmqPubTransport(Tr...
true
true
1c27c1744d5fca9b5d842787192f7bf99364d3e9
3,562
py
Python
spacy/tests/lang/test_attrs.py
snosrap/spaCy
3f68bbcfec44ef55d101e6db742d353b72652129
[ "MIT" ]
1
2020-06-11T14:11:38.000Z
2020-06-11T14:11:38.000Z
spacy/tests/lang/test_attrs.py
snosrap/spaCy
3f68bbcfec44ef55d101e6db742d353b72652129
[ "MIT" ]
2
2022-02-21T05:50:08.000Z
2022-03-15T03:19:49.000Z
spacy/tests/lang/test_attrs.py
snosrap/spaCy
3f68bbcfec44ef55d101e6db742d353b72652129
[ "MIT" ]
null
null
null
import pytest from spacy.attrs import intify_attrs, ENT_IOB from spacy.attrs import IS_ALPHA, LEMMA, NORM, ORTH, intify_attrs from spacy.lang.en.stop_words import STOP_WORDS from spacy.lang.lex_attrs import is_ascii, is_currency, is_punct, is_stop from spacy.lang.lex_attrs import like_url, word_shape @pytest.mark.pa...
27.19084
87
0.601348
import pytest from spacy.attrs import intify_attrs, ENT_IOB from spacy.attrs import IS_ALPHA, LEMMA, NORM, ORTH, intify_attrs from spacy.lang.en.stop_words import STOP_WORDS from spacy.lang.lex_attrs import is_ascii, is_currency, is_punct, is_stop from spacy.lang.lex_attrs import like_url, word_shape @pytest.mark.pa...
true
true
1c27c285673f4f09355d4ae8d96e42de07f20510
19,991
py
Python
src/opendr/perception/object_detection_2d/detr/algorithm/models/detr.py
makistsantekidis/opendr
07dee3b59d3487b9c5a93d6946317178a02c9890
[ "Apache-2.0" ]
217
2020-04-10T16:39:36.000Z
2022-03-30T15:39:04.000Z
src/opendr/perception/object_detection_2d/detr/algorithm/models/detr.py
makistsantekidis/opendr
07dee3b59d3487b9c5a93d6946317178a02c9890
[ "Apache-2.0" ]
79
2021-06-23T10:40:10.000Z
2021-12-16T07:59:42.000Z
src/opendr/perception/object_detection_2d/detr/algorithm/models/detr.py
makistsantekidis/opendr
07dee3b59d3487b9c5a93d6946317178a02c9890
[ "Apache-2.0" ]
29
2021-12-16T09:26:13.000Z
2022-03-29T15:19:18.000Z
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved # Modifications Copyright 2021 - present, OpenDR European Project # 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 # # ...
46.92723
121
0.648492
import torch import torch.nn.functional as F from torch import nn from opendr.perception.object_detection_2d.detr.algorithm.util import box_ops from opendr.perception.object_detection_2d.detr.algorithm.util.misc import (NestedTensor, nested_tensor_from_tensor_list, ...
true
true
1c27c2e9dc6782eefb7d149accd383452eadc804
2,514
py
Python
scrape.py
AmethystGear/uwcsehwscraper
e50a816ca564752b11bada99b518e0c91808d781
[ "MIT" ]
null
null
null
scrape.py
AmethystGear/uwcsehwscraper
e50a816ca564752b11bada99b518e0c91808d781
[ "MIT" ]
null
null
null
scrape.py
AmethystGear/uwcsehwscraper
e50a816ca564752b11bada99b518e0c91808d781
[ "MIT" ]
null
null
null
from requests import get from requests.exceptions import RequestException from contextlib import closing from bs4 import BeautifulSoup import re import os import itertools # change these if you want to scrape a different cse hw site cse_url = "https://courses.cs.washington.edu/courses/cse143/19au/" diff_site = "diff.h...
29.576471
91
0.623707
from requests import get from requests.exceptions import RequestException from contextlib import closing from bs4 import BeautifulSoup import re import os import itertools cse_url = "https://courses.cs.washington.edu/courses/cse143/19au/" diff_site = "diff.html" def simple_get(url): try: with closing(ge...
true
true
1c27c36e71aca0be063ce58182f2292f0f04bee4
146
py
Python
ripiu/cmsplugin_filer_svg/__init__.py
ripiu/ripiu.cmsplugin_filer_svg
d107917f53eeaa107293b717bc0cb212ba4a5641
[ "BSD-3-Clause" ]
null
null
null
ripiu/cmsplugin_filer_svg/__init__.py
ripiu/ripiu.cmsplugin_filer_svg
d107917f53eeaa107293b717bc0cb212ba4a5641
[ "BSD-3-Clause" ]
null
null
null
ripiu/cmsplugin_filer_svg/__init__.py
ripiu/ripiu.cmsplugin_filer_svg
d107917f53eeaa107293b717bc0cb212ba4a5641
[ "BSD-3-Clause" ]
null
null
null
__version__ = '0.3.0' __author__ = 'matteo vezzola <matteo@studioripiu.it>' default_app_config = 'ripiu.cmsplugin_filer_svg.apps.FilerSvgConfig'
29.2
68
0.794521
__version__ = '0.3.0' __author__ = 'matteo vezzola <matteo@studioripiu.it>' default_app_config = 'ripiu.cmsplugin_filer_svg.apps.FilerSvgConfig'
true
true
1c27c3e3b35e1e7cf4f91368a6d023e65d046e8d
16,004
py
Python
Packs/FlashpointFeed/Integrations/FlashpointFeed/FlashpointFeed.py
jrauen/content
81a92be1cbb053a5f26a6f325eff3afc0ca840e0
[ "MIT" ]
null
null
null
Packs/FlashpointFeed/Integrations/FlashpointFeed/FlashpointFeed.py
jrauen/content
81a92be1cbb053a5f26a6f325eff3afc0ca840e0
[ "MIT" ]
40
2022-03-03T07:34:00.000Z
2022-03-31T07:38:35.000Z
Packs/FlashpointFeed/Integrations/FlashpointFeed/FlashpointFeed.py
jrauen/content
81a92be1cbb053a5f26a6f325eff3afc0ca840e0
[ "MIT" ]
null
null
null
from CommonServerPython import * # noqa # pylint: disable=unused-wildcard-import from CommonServerUserPython import * # noqa import requests import traceback from typing import Dict, Any # Disable insecure warnings requests.packages.urllib3.disable_warnings() # pylint: disable=no-member ''' CONSTANTS ''' DATE_FO...
34.123667
118
0.617846
from CommonServerPython import * import requests import traceback from typing import Dict, Any requests.packages.urllib3.disable_warnings() DATE_FORMAT = '%Y-%m-%dT%H:%M:%SZ' LIMIT = 10 TIMEOUT = 60 MAX_FETCH = 1000 DEFAULT_INDICATOR_TYPE = "Flashpoint Indicator" DEFAULT_FIRST_FETCH = "3 days" DEFAULT_SORT_OR...
true
true
1c27c4aab9b07cbeecb01df6962b70bd7c418ef4
20,871
py
Python
datamart_isi/upload/file_parsers/csv_parser.py
usc-isi-i2/datamart-upload
c27a3d745daabb2d24681d8224bec140b6a4a7b9
[ "MIT" ]
1
2020-05-07T04:21:27.000Z
2020-05-07T04:21:27.000Z
datamart_isi/upload/file_parsers/csv_parser.py
usc-isi-i2/datamart-upload
c27a3d745daabb2d24681d8224bec140b6a4a7b9
[ "MIT" ]
9
2020-03-06T00:48:47.000Z
2021-10-15T20:03:01.000Z
datamart_isi/upload/file_parsers/csv_parser.py
usc-isi-i2/datamart-upload
c27a3d745daabb2d24681d8224bec140b6a4a7b9
[ "MIT" ]
1
2020-11-25T22:42:50.000Z
2020-11-25T22:42:50.000Z
import logging import pandas as pd import time import wikifier import typing import hashlib import json import os from .parser_base import ParserBase, PreParsedResult from pandas.util import hash_pandas_object from datamart_isi.materializers.general_materializer import GeneralMaterializer from datamart_isi.materializ...
51.406404
126
0.602079
import logging import pandas as pd import time import wikifier import typing import hashlib import json import os from .parser_base import ParserBase, PreParsedResult from pandas.util import hash_pandas_object from datamart_isi.materializers.general_materializer import GeneralMaterializer from datamart_isi.materializ...
true
true
1c27c57266f59804399997f8a16a2f732cfb8a85
29,340
py
Python
wilfred/wilfred.py
nerdlan/cli
47cf3f0cfdbbf95852fc7312f8c554c2374b9ae5
[ "MIT" ]
null
null
null
wilfred/wilfred.py
nerdlan/cli
47cf3f0cfdbbf95852fc7312f8c554c2374b9ae5
[ "MIT" ]
null
null
null
wilfred/wilfred.py
nerdlan/cli
47cf3f0cfdbbf95852fc7312f8c554c2374b9ae5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- ################################################################# # # # Wilfred # # Copyright (C) 2020-2022, Vilhelm Prytz, <vilhelm@prytznet.se> # # ...
27.942857
119
0.583231
.replace("running", click.style("running", fg="green")) .replace("stopped", click.style("stopped", fg="red")) .replace("installing", click.style("installing", fg="yellow")), ) for k, v in server.items() ) headers = { "id": c...
true
true
1c27c5cb9b1b89052da75d6ea4be3dc5c36b04b8
4,416
py
Python
telemetry/telemetry/internal/backends/chrome/android_minidump_symbolizer.py
christian7877/catapult
aad9fb06898b695f844b172680bf9818d2bfb9af
[ "BSD-3-Clause" ]
null
null
null
telemetry/telemetry/internal/backends/chrome/android_minidump_symbolizer.py
christian7877/catapult
aad9fb06898b695f844b172680bf9818d2bfb9af
[ "BSD-3-Clause" ]
null
null
null
telemetry/telemetry/internal/backends/chrome/android_minidump_symbolizer.py
christian7877/catapult
aad9fb06898b695f844b172680bf9818d2bfb9af
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2019 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import datetime import logging import os import platform import re import subprocess from telemetry.internal.backends.chrome import minidump_symbolizer from...
38.068966
79
0.686141
import datetime import logging import os import platform import re import subprocess from telemetry.internal.backends.chrome import minidump_symbolizer from telemetry.internal.results import artifact_logger class AndroidMinidumpSymbolizer(minidump_symbolizer.MinidumpSymbolizer): def __init__(self, dump_finder,...
true
true
1c27c5dc49ebb72c025b3d17ffaf066060246e94
9,349
py
Python
preprocessor.py
ninastijepovic/MasterThesis
2579f1e74c0ce404f350a6d441e273b6aef4eadc
[ "MIT" ]
null
null
null
preprocessor.py
ninastijepovic/MasterThesis
2579f1e74c0ce404f350a6d441e273b6aef4eadc
[ "MIT" ]
null
null
null
preprocessor.py
ninastijepovic/MasterThesis
2579f1e74c0ce404f350a6d441e273b6aef4eadc
[ "MIT" ]
null
null
null
""" This is a class that wraps the preprocessing tasks, routines and objects Takes in a hypercube (N,F,T,C) dimensions where: N: baselines F: frequency channels T: time vectors C: real and imaginary components """ import copy import logging import os import matplotlib from mat...
36.662745
114
0.594823
import copy import logging import os import matplotlib from matplotlib import pyplot as plt import numpy as np import pandas as pd from numpy import sqrt,angle from tqdm import tqdm import processors from joblib import Parallel, delayed from sklearn.preprocessing import StandardScaler,MinMaxScaler from skimage.tra...
true
true
1c27c6a210ed35fce6f35a4a94e0f84edea7c390
3,134
py
Python
venv/lib/python3.6/site-packages/github/StatsCodeFrequency.py
jannahuang/blog
e1d8cfa9d79ac06097a0e55531bba9421fcbf283
[ "MIT" ]
1
2021-10-14T16:13:12.000Z
2021-10-14T16:13:12.000Z
venv/lib/python3.6/site-packages/github/StatsCodeFrequency.py
jannahuang/blog
e1d8cfa9d79ac06097a0e55531bba9421fcbf283
[ "MIT" ]
null
null
null
venv/lib/python3.6/site-packages/github/StatsCodeFrequency.py
jannahuang/blog
e1d8cfa9d79ac06097a0e55531bba9421fcbf283
[ "MIT" ]
null
null
null
############################ Copyrights and license ############################ # # # Copyright 2013 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2014 Vincent Jacques <vincent@vincent-jacques.net> ...
48.215385
202
0.485003
true
true
1c27c7c1054492c085f21273b2abe4c7e81698f2
1,165
py
Python
script/AnnoyinBot.py
MathewsDuarte/AnnoyingBot-Whatsapp-Web
18ac523332714e57644c756d5c33dcf5b7388158
[ "MIT" ]
null
null
null
script/AnnoyinBot.py
MathewsDuarte/AnnoyingBot-Whatsapp-Web
18ac523332714e57644c756d5c33dcf5b7388158
[ "MIT" ]
null
null
null
script/AnnoyinBot.py
MathewsDuarte/AnnoyingBot-Whatsapp-Web
18ac523332714e57644c756d5c33dcf5b7388158
[ "MIT" ]
null
null
null
from selenium import webdriver import sys driver = webdriver.Chrome(executable_path="YOUR PATH/DIR/chromedriver.exe") driver.get("https://web.whatsapp.com/") while True: print ("Welcome to Annoying Bot, take a sit, please.") print ("--------------------------------------------") print("# \n # \n...
31.486486
85
0.586266
from selenium import webdriver import sys driver = webdriver.Chrome(executable_path="YOUR PATH/DIR/chromedriver.exe") driver.get("https://web.whatsapp.com/") while True: print ("Welcome to Annoying Bot, take a sit, please.") print ("--------------------------------------------") print("# \n # \n...
false
true
1c27c87650bec01e41b8451f15cf42e52ab6707c
647
py
Python
dopamine/visualization/__init__.py
K-Kielak/dopamine
f0bbc39825c7b769023901aa6c60e2b068390a42
[ "Apache-2.0" ]
null
null
null
dopamine/visualization/__init__.py
K-Kielak/dopamine
f0bbc39825c7b769023901aa6c60e2b068390a42
[ "Apache-2.0" ]
null
null
null
dopamine/visualization/__init__.py
K-Kielak/dopamine
f0bbc39825c7b769023901aa6c60e2b068390a42
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2018 The Dopamine Authors. # Modifications copyright 2019 Kacper Kielak # # 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/LICE...
38.058824
74
0.76507
true
true
1c27c8b9f3470b7063e2d0f98b831f3ac57d0172
3,407
py
Python
scripts/dataentry/paths.py
acl-org/emnlp-2020-virtual-conference
3a58c584e826fc53aa47f892e40ad829664b0d1a
[ "MIT" ]
14
2021-06-20T08:19:33.000Z
2022-03-06T01:34:49.000Z
scripts/dataentry/paths.py
teddylfwu/AAAI21-Virtual-Conference
aa5f260d586fdf65b7128ee533a1910b85d1452c
[ "MIT" ]
2
2021-11-11T21:53:31.000Z
2021-12-13T13:56:20.000Z
scripts/dataentry/paths.py
teddylfwu/AAAI21-Virtual-Conference
aa5f260d586fdf65b7128ee533a1910b85d1452c
[ "MIT" ]
1
2021-03-31T09:40:46.000Z
2021-03-31T09:40:46.000Z
import os import shutil from pathlib import Path import wget ROOT = Path(__file__).parent.absolute() PATH_DOWNLOADS = ROOT / "downloads" PATH_YAMLS = ROOT / "yamls" URL_SLIDESLIVE_OTHER = "https://docs.google.com/spreadsheets/d/1Cp04DGRiDj8oY00-xDjTpjzCd_fjq3YhqOclhvFRK94/export?format=csv&gid=1157572740" PATH_SLIDE...
43.679487
145
0.835926
import os import shutil from pathlib import Path import wget ROOT = Path(__file__).parent.absolute() PATH_DOWNLOADS = ROOT / "downloads" PATH_YAMLS = ROOT / "yamls" URL_SLIDESLIVE_OTHER = "https://docs.google.com/spreadsheets/d/1Cp04DGRiDj8oY00-xDjTpjzCd_fjq3YhqOclhvFRK94/export?format=csv&gid=1157572740" PATH_SLIDE...
true
true
1c27c8d2ffc08dc2e7957c970fb25d78eba5f09d
1,446
py
Python
tests/integration/fileserver/fileclient_test.py
ContinuumIO/salt
91c0955cfc24b13f07f4917d3d44a9fd9636347a
[ "Apache-2.0" ]
2
2017-09-17T21:10:35.000Z
2019-08-26T03:00:12.000Z
tests/integration/fileserver/fileclient_test.py
ContinuumIO/salt
91c0955cfc24b13f07f4917d3d44a9fd9636347a
[ "Apache-2.0" ]
null
null
null
tests/integration/fileserver/fileclient_test.py
ContinuumIO/salt
91c0955cfc24b13f07f4917d3d44a9fd9636347a
[ "Apache-2.0" ]
3
2021-02-23T08:12:48.000Z
2021-02-23T08:13:13.000Z
# -*- coding: utf-8 -*- ''' :codeauthor: :email:`Mike Place <mp@saltstack.com>` ''' # Import Salt Testing libs from salttesting.unit import skipIf from salttesting.helpers import ensure_in_syspath from salttesting.mock import MagicMock, patch, NO_MOCK, NO_MOCK_REASON ensure_in_syspath('../') # Import salt libs im...
31.434783
96
0.695021
from salttesting.unit import skipIf from salttesting.helpers import ensure_in_syspath from salttesting.mock import MagicMock, patch, NO_MOCK, NO_MOCK_REASON ensure_in_syspath('../') import integration from salt import fileclient @skipIf(NO_MOCK, NO_MOCK_REASON) class FileClientTest(integration.ModuleCase): ...
true
true
1c27c90a5b4f0b01480f50bf213c491cc4a038d6
2,426
py
Python
apps/life_sci/dgllife/model/model_zoo/schnet_predictor.py
arangoml/dgl
d135058f9986fadcbdf6aa1011a00c3ad45a8ce3
[ "Apache-2.0" ]
3
2020-02-28T07:28:52.000Z
2020-06-03T08:41:55.000Z
apps/life_sci/dgllife/model/model_zoo/schnet_predictor.py
arangoml/dgl
d135058f9986fadcbdf6aa1011a00c3ad45a8ce3
[ "Apache-2.0" ]
null
null
null
apps/life_sci/dgllife/model/model_zoo/schnet_predictor.py
arangoml/dgl
d135058f9986fadcbdf6aa1011a00c3ad45a8ce3
[ "Apache-2.0" ]
null
null
null
"""SchNet""" import torch.nn as nn from dgl.nn.pytorch.conv.cfconv import ShiftedSoftplus from ..gnn import SchNetGNN from ..readout import MLPNodeReadout __all__ = ['SchNetPredictor'] class SchNetPredictor(nn.Module): """SchNet for regression and classification on graphs. SchNet is introduced in `SchNet: ...
38.507937
95
0.654988
import torch.nn as nn from dgl.nn.pytorch.conv.cfconv import ShiftedSoftplus from ..gnn import SchNetGNN from ..readout import MLPNodeReadout __all__ = ['SchNetPredictor'] class SchNetPredictor(nn.Module): def __init__(self, node_feats=64, hidden_feats=None, classifier_hidden_feats=64, n_tasks=1, ...
true
true
1c27c95d2ab8bd89bfcf85bbd90aa4997163ea09
76,747
py
Python
tests/integration/test_storage_rabbitmq/test.py
540522905/ClickHouse
299445ec7da10bd2ef62d8e333a95b7ab12bf5f2
[ "Apache-2.0" ]
1
2021-02-12T22:34:04.000Z
2021-02-12T22:34:04.000Z
tests/integration/test_storage_rabbitmq/test.py
540522905/ClickHouse
299445ec7da10bd2ef62d8e333a95b7ab12bf5f2
[ "Apache-2.0" ]
null
null
null
tests/integration/test_storage_rabbitmq/test.py
540522905/ClickHouse
299445ec7da10bd2ef62d8e333a95b7ab12bf5f2
[ "Apache-2.0" ]
null
null
null
import json import os.path as p import random import subprocess import threading import logging import time from random import randrange import math import pika import pytest from google.protobuf.internal.encoder import _VarintBytes from helpers.client import QueryRuntimeException from helpers.cluster import ClickHous...
36.703491
193
0.625041
import json import os.path as p import random import subprocess import threading import logging import time from random import randrange import math import pika import pytest from google.protobuf.internal.encoder import _VarintBytes from helpers.client import QueryRuntimeException from helpers.cluster import ClickHous...
true
true
1c27c9954448555b9f86f6dc9ad84ffe852c15af
19,886
py
Python
nethack_baselines/torchbeast/models/baseline_tensorized.py
ege-k/nlp4nethack
8b8b45a2f0be09c5233b33a47f421906e9e4b561
[ "MIT" ]
null
null
null
nethack_baselines/torchbeast/models/baseline_tensorized.py
ege-k/nlp4nethack
8b8b45a2f0be09c5233b33a47f421906e9e4b561
[ "MIT" ]
null
null
null
nethack_baselines/torchbeast/models/baseline_tensorized.py
ege-k/nlp4nethack
8b8b45a2f0be09c5233b33a47f421906e9e4b561
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
36.421245
157
0.6052
import collections import torch from torch import nn from torch.nn import functional as F from einops import rearrange from nle import nethack from .util import id_pairs_table import numpy as np NUM_GLYPHS = nethack.MAX_GLYPH NUM_FEATURES = nethack.BLSTATS_SHAPE[0] PAD_CHAR = 0 NUM_CHARS = 256 def g...
true
true
1c27ca5595f72c88e15e99701aec43e9eeb4b86e
1,005
py
Python
nebullvm/converters/tests/test_converters.py
zeyus/nebullvm
ccb1a55d12f55f8f27b1ca832ac516df5c6d1886
[ "Apache-2.0" ]
1
2022-02-24T16:25:11.000Z
2022-02-24T16:25:11.000Z
nebullvm/converters/tests/test_converters.py
zeyus/nebullvm
ccb1a55d12f55f8f27b1ca832ac516df5c6d1886
[ "Apache-2.0" ]
null
null
null
nebullvm/converters/tests/test_converters.py
zeyus/nebullvm
ccb1a55d12f55f8f27b1ca832ac516df5c6d1886
[ "Apache-2.0" ]
null
null
null
from pathlib import Path from tempfile import TemporaryDirectory import pytest import torch from nebullvm.converters import ONNXConverter class TorchTestModel(torch.nn.Module): def __init__(self): super().__init__() self.conv = torch.nn.Conv2d( in_channels=3, out_channels=256, kernel...
29.558824
71
0.671642
from pathlib import Path from tempfile import TemporaryDirectory import pytest import torch from nebullvm.converters import ONNXConverter class TorchTestModel(torch.nn.Module): def __init__(self): super().__init__() self.conv = torch.nn.Conv2d( in_channels=3, out_channels=256, kernel...
true
true
1c27ca5f8d1ff7a1199a1c7adde310873ac72ee9
799
py
Python
contrib/spanlib/test/test_yespca_nomssa_yesphases.py
xylar/cdat
8a5080cb18febfde365efc96147e25f51494a2bf
[ "BSD-3-Clause" ]
62
2018-03-30T15:46:56.000Z
2021-12-08T23:30:24.000Z
contrib/spanlib/test/test_yespca_nomssa_yesphases.py
xylar/cdat
8a5080cb18febfde365efc96147e25f51494a2bf
[ "BSD-3-Clause" ]
114
2018-03-21T01:12:43.000Z
2021-07-05T12:29:54.000Z
contrib/spanlib/test/test_yespca_nomssa_yesphases.py
CDAT/uvcdat
5133560c0c049b5c93ee321ba0af494253b44f91
[ "BSD-3-Clause" ]
14
2018-06-06T02:42:47.000Z
2021-11-26T03:27:00.000Z
import sys #sys.path.insert(0,'../src/build/lib.linux-i686-2.4') import cdms import spanlib import vcs import MV import Numeric import cdutil import genutil cdms.axis.latitude_aliases.append('Y') cdms.axis.longitude_aliases.append('X') cdms.axis.time_aliases.append('T') f=cdms.open('../example/data2.cdf') s=f('ssta'...
20.487179
73
0.705882
import sys import cdms import spanlib import vcs import MV import Numeric import cdutil import genutil cdms.axis.latitude_aliases.append('Y') cdms.axis.longitude_aliases.append('X') cdms.axis.time_aliases.append('T') f=cdms.open('../example/data2.cdf') s=f('ssta',time=slice(0,120)) print s.shape SP=spanlib.SpAn(s)...
false
true
1c27cba01bab714007793244d7d06cae68eb032f
568
py
Python
util/preprocess.py
ikhwan1234/ae-blender-camera-export
b18169e84ebd3c4fb86aed2cf12a00fe4d4c7cc7
[ "MIT" ]
null
null
null
util/preprocess.py
ikhwan1234/ae-blender-camera-export
b18169e84ebd3c4fb86aed2cf12a00fe4d4c7cc7
[ "MIT" ]
null
null
null
util/preprocess.py
ikhwan1234/ae-blender-camera-export
b18169e84ebd3c4fb86aed2cf12a00fe4d4c7cc7
[ "MIT" ]
null
null
null
import re from os import path incl_regex = re.compile('\/\/ ?@include *(\'(.+)\'|"(.+)")') def process_includes(file_path): srcdir = path.dirname(file_path) def make_include(matchobj): return process_includes(path.join(srcdir, matchobj.group(1)[1:-1])) with open(file_path, encoding='utf...
33.411765
84
0.65669
import re from os import path incl_regex = re.compile('\/\/ ?@include *(\'(.+)\'|"(.+)")') def process_includes(file_path): srcdir = path.dirname(file_path) def make_include(matchobj): return process_includes(path.join(srcdir, matchobj.group(1)[1:-1])) with open(file_path, encoding='utf...
true
true
1c27ccbfd50f0daca9c5e0afb30cab7cbaccd21a
18,743
py
Python
tests/gis_tests/test_geoforms.py
Yoann-Vie/esgi-hearthstone
115d03426c7e8e80d89883b78ac72114c29bed12
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
tests/gis_tests/test_geoforms.py
Yoann-Vie/esgi-hearthstone
115d03426c7e8e80d89883b78ac72114c29bed12
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
tests/gis_tests/test_geoforms.py
Yoann-Vie/esgi-hearthstone
115d03426c7e8e80d89883b78ac72114c29bed12
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
import re from django.contrib.gis import forms from django.contrib.gis.forms import BaseGeometryWidget, OpenLayersWidget from django.contrib.gis.geos import GEOSGeometry from django.forms import ValidationError from django.test import SimpleTestCase, override_settings from django.utils.html import escape c...
44.839713
114
0.550392
import re from django.contrib.gis import forms from django.contrib.gis.forms import BaseGeometryWidget, OpenLayersWidget from django.contrib.gis.geos import GEOSGeometry from django.forms import ValidationError from django.test import SimpleTestCase, override_settings from django.utils.html import escape c...
true
true