hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f71eb7670bc86d87c7539abbd12daee35e23c879
6,054
py
Python
object_detection/test_mobilenet.py
OSSDC/OSSDC-VisionBasedACC
a9004c888e91b8becaebc22524f698ebb3c9746e
[ "Apache-2.0" ]
112
2017-04-14T15:34:32.000Z
2021-05-02T21:14:09.000Z
object_detection/test_mobilenet.py
AndreSlavescu/OSSDC-VisionBasedACC
a9004c888e91b8becaebc22524f698ebb3c9746e
[ "Apache-2.0" ]
20
2017-04-11T12:24:03.000Z
2019-11-14T00:49:46.000Z
object_detection/test_mobilenet.py
AndreSlavescu/OSSDC-VisionBasedACC
a9004c888e91b8becaebc22524f698ebb3c9746e
[ "Apache-2.0" ]
46
2017-07-29T04:57:17.000Z
2022-01-25T03:57:56.000Z
import numpy as np import os import six.moves.urllib as urllib import sys import tarfile import tensorflow as tf import zipfile from collections import defaultdict from io import StringIO from matplotlib import pyplot as plt from PIL import Image import cv2 from webcamvideostream import * videoUrl = 1 videoUrl = "/...
31.046154
279
0.713578
import numpy as np import os import six.moves.urllib as urllib import sys import tarfile import tensorflow as tf import zipfile from collections import defaultdict from io import StringIO from matplotlib import pyplot as plt from PIL import Image import cv2 from webcamvideostream import * videoUrl = 1 videoUrl = "/...
true
true
f71eb8bdfedae5608421ec5e72f402a3efef2d6a
10,473
py
Python
bindings/cython/utils/gencython.py
windelbouwman/datoviz
2a8c54c06185d9ebaa2d5323b9d064b58b60133d
[ "MIT" ]
null
null
null
bindings/cython/utils/gencython.py
windelbouwman/datoviz
2a8c54c06185d9ebaa2d5323b9d064b58b60133d
[ "MIT" ]
null
null
null
bindings/cython/utils/gencython.py
windelbouwman/datoviz
2a8c54c06185d9ebaa2d5323b9d064b58b60133d
[ "MIT" ]
null
null
null
from functools import lru_cache from pathlib import Path import os from pprint import pprint import re import sys from textwrap import indent import pyparsing as pp from pyparsing import ( Suppress, Word, alphas, alphanums, nums, Optional, Group, ZeroOrMore, empty, restOfLine, Keyword, cStyleComment, Empty, Li...
31.736364
99
0.564117
from functools import lru_cache from pathlib import Path import os from pprint import pprint import re import sys from textwrap import indent import pyparsing as pp from pyparsing import ( Suppress, Word, alphas, alphanums, nums, Optional, Group, ZeroOrMore, empty, restOfLine, Keyword, cStyleComment, Empty, Li...
true
true
f71ebc6dd58650afeb83cd60ddcb615ad4faec6b
27,401
py
Python
disabled-challenges/adventure_game/poller/for-release/machine.py
pingjuiliao/cb-multios
64ededd0b87030eda7c40c4388a4ad8283712d8e
[ "MIT" ]
473
2016-08-01T12:48:16.000Z
2022-03-09T18:13:14.000Z
disabled-challenges/adventure_game/poller/for-release/machine.py
pingjuiliao/cb-multios
64ededd0b87030eda7c40c4388a4ad8283712d8e
[ "MIT" ]
71
2016-08-01T03:33:44.000Z
2022-03-09T18:37:04.000Z
disabled-challenges/adventure_game/poller/for-release/machine.py
pingjuiliao/cb-multios
64ededd0b87030eda7c40c4388a4ad8283712d8e
[ "MIT" ]
121
2016-08-01T04:07:53.000Z
2022-03-07T11:08:09.000Z
# Plan for testing # - Decide to use weak team or strong team (i.e. always lose battles or always win battles) # - Random walk with bias towards tiles that have not been visited, or have been visited least recently # - Quit after N number of steps, where N is a random number between 100 and 500 import array import ran...
57.686316
5,948
0.720923
import array import random import struct from cStringIO import StringIO from generator.actions import Actions, Variable KINDS = [ { 'type': 'earth', 'name': 'Pheapxalm', 'max_health': 100, 'attack': 90, 'defense': 100, 'attacks': [('Scratch', 20), ('Cutting Leaf', 30)] }, { 'type': 'wind', 'name'...
true
true
f71ebcebcd16f7a9e6abc4c430836637c223d9c7
3,226
py
Python
tests/test_missing_impute.py
UBC-MDS/eazieda
214f3907e71ddbaa1b64c7a201cb0f07661263ac
[ "MIT" ]
1
2021-03-12T16:19:58.000Z
2021-03-12T16:19:58.000Z
tests/test_missing_impute.py
UBC-MDS/eazieda
214f3907e71ddbaa1b64c7a201cb0f07661263ac
[ "MIT" ]
44
2021-02-26T19:15:19.000Z
2021-03-20T00:07:51.000Z
tests/test_missing_impute.py
UBC-MDS/eazieda
214f3907e71ddbaa1b64c7a201cb0f07661263ac
[ "MIT" ]
5
2021-03-07T03:17:58.000Z
2022-01-28T18:26:38.000Z
from eazieda.missing_impute import missing_impute import pandas as pd import numpy as np from pytest import raises, fixture @fixture def df_miss(): df = pd.DataFrame( [[1.0, "x"], [np.nan, "y"], [2.0, np.nan], [3.0, "y"]], columns=["a", "b"], ) return df @fixture def df_miss_2(): df ...
31.320388
79
0.651271
from eazieda.missing_impute import missing_impute import pandas as pd import numpy as np from pytest import raises, fixture @fixture def df_miss(): df = pd.DataFrame( [[1.0, "x"], [np.nan, "y"], [2.0, np.nan], [3.0, "y"]], columns=["a", "b"], ) return df @fixture def df_miss_2(): df ...
true
true
f71ebdc00dcdc70fff18cf0ff576555cd05da13f
2,262
py
Python
src/scETM/models/BatchClassifier.py
hui2000ji/scETM
0a34c345d70b262ebc38e033bae683fa4929ed3e
[ "BSD-3-Clause" ]
24
2021-07-09T12:59:31.000Z
2022-03-04T22:31:41.000Z
src/scETM/models/BatchClassifier.py
hui2000ji/scETM
0a34c345d70b262ebc38e033bae683fa4929ed3e
[ "BSD-3-Clause" ]
3
2021-09-07T11:14:19.000Z
2022-02-15T01:38:09.000Z
src/scETM/models/BatchClassifier.py
hui2000ji/scETM
0a34c345d70b262ebc38e033bae683fa4929ed3e
[ "BSD-3-Clause" ]
3
2021-12-02T23:44:37.000Z
2022-02-11T16:46:45.000Z
from typing import Sequence, Mapping from numpy import mod import torch from torch import nn from torch import optim import torch.nn.functional as F from .model_utils import get_fully_connected_layers from scETM.logging_utils import log_arguments class BatchClassifier(nn.Module): """Docstring (TODO) """ ...
31.416667
120
0.616711
from typing import Sequence, Mapping from numpy import mod import torch from torch import nn from torch import optim import torch.nn.functional as F from .model_utils import get_fully_connected_layers from scETM.logging_utils import log_arguments class BatchClassifier(nn.Module): @log_arguments def __init__...
true
true
f71ebec53b1716481e14b033e6c02c932b2b09ae
569
py
Python
app/migrations/0005_attacker.py
ArighnaIITG/Resurrector
319717fc7382af953d9bada084d00f0f0dd635e2
[ "MIT" ]
null
null
null
app/migrations/0005_attacker.py
ArighnaIITG/Resurrector
319717fc7382af953d9bada084d00f0f0dd635e2
[ "MIT" ]
null
null
null
app/migrations/0005_attacker.py
ArighnaIITG/Resurrector
319717fc7382af953d9bada084d00f0f0dd635e2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-01-29 10:24 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('app', '0004_victim_gender'), ] operations = [ migrations.CreateModel( ...
24.73913
114
0.588752
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('app', '0004_victim_gender'), ] operations = [ migrations.CreateModel( name='Attacker', fields=[ ('id', mod...
true
true
f71ebf6e2a819992e2481ad01062fab1764d0791
1,758
py
Python
models/TVAE.py
traindb-project/traindb-model
9ffdb8c0195051630692dbe6dfd8b9fe816a619f
[ "Apache-2.0" ]
4
2021-12-08T05:38:18.000Z
2022-02-23T01:33:49.000Z
models/TVAE.py
traindb-project/traindb-model
9ffdb8c0195051630692dbe6dfd8b9fe816a619f
[ "Apache-2.0" ]
null
null
null
models/TVAE.py
traindb-project/traindb-model
9ffdb8c0195051630692dbe6dfd8b9fe816a619f
[ "Apache-2.0" ]
null
null
null
""" Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed ...
33.807692
84
0.706485
import logging import rdt import sdv from TrainDBBaseModel import TrainDBSynopsisModel import pandas as pd import torch LOGGER = logging.getLogger(__name__) class TVAE(TrainDBSynopsisModel): def train(self, real_data, table_metadata): self.columns, _ = self.get_columns(real_data, table_metadata) ...
true
true
f71ec124894f9eb3d2d2ba49831d457c33672b13
152,850
py
Python
yandex/cloud/mdb/mysql/v1/cluster_service_pb2.py
ovandriyanov/python-sdk
eec7dc65ef23789388fa46d13087d4a03cdc6e57
[ "MIT" ]
null
null
null
yandex/cloud/mdb/mysql/v1/cluster_service_pb2.py
ovandriyanov/python-sdk
eec7dc65ef23789388fa46d13087d4a03cdc6e57
[ "MIT" ]
null
null
null
yandex/cloud/mdb/mysql/v1/cluster_service_pb2.py
ovandriyanov/python-sdk
eec7dc65ef23789388fa46d13087d4a03cdc6e57
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: yandex/cloud/mdb/mysql/v1/cluster_service.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection ...
50.562355
17,753
0.775139
from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database _sym_db = _symbol_database.Default() from google.api import annotations_pb2 as google_dot_api...
true
true
f71ec15b6669fd47e7a2e067624d3db4587a44da
52,763
py
Python
tensorflow/python/keras/engine/base_layer_test.py
dan-zheng/tensorflow
b4245c36bc9bcb752c0a2118728098b359fd97e2
[ "Apache-2.0" ]
1
2021-01-18T04:50:42.000Z
2021-01-18T04:50:42.000Z
tensorflow/python/keras/engine/base_layer_test.py
shyampandey1/tensorflow
5e04065935920b0a07175283408297e73d2191fb
[ "Apache-2.0" ]
1
2019-08-19T08:03:52.000Z
2019-08-19T08:03:52.000Z
tensorflow/python/keras/engine/base_layer_test.py
shyampandey1/tensorflow
5e04065935920b0a07175283408297e73d2191fb
[ "Apache-2.0" ]
1
2019-08-23T12:36:08.000Z
2019-08-23T12:36:08.000Z
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
35.459005
114
0.676648
from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import itertools as it import os import sys import traceback from absl.testing import parameterized import numpy as np from tensorflow.python import keras from tensorflow.pyth...
true
true
f71ec28ea3ab09bb3ecd1216b159b4d1db772a66
2,157
py
Python
Scripts/IsInCidrRanges/IsInCidrRanges.py
TBE-Comp/content
3a27b1c779dec1e4ee918ca2da77538238dd10f0
[ "MIT" ]
7
2020-09-24T22:38:01.000Z
2021-07-14T15:58:35.000Z
Scripts/IsInCidrRanges/IsInCidrRanges.py
TBE-Comp/content
3a27b1c779dec1e4ee918ca2da77538238dd10f0
[ "MIT" ]
7
2021-03-25T23:09:39.000Z
2021-09-23T23:27:14.000Z
Scripts/IsInCidrRanges/IsInCidrRanges.py
TBE-Comp/content
3a27b1c779dec1e4ee918ca2da77538238dd10f0
[ "MIT" ]
2
2020-12-08T17:03:33.000Z
2021-07-13T18:32:06.000Z
import demistomock as demisto # !!!IMPORTANT!!! If this script should be modified, the updated version must be copied to Scripts/IsRFC1918Address to # fulfill its unit test. This is a necessary workaround for CI configuration # borrowed from https://stackoverflow.com/questions/819355/how-can-i-check-if-an-ip-is-in-a-...
28.012987
118
0.641632
import demistomock as demisto import socket import struct import re def csv_string_to_list(v): if type(v) == str: return v.lower().replace(' ', '').replace("'", '').replace('\n', '').split(',') v = [val.lower() for val in v] return v def make_mask(n): return (2 << n - 1) - 1 def dotte...
true
true
f71ec3d88c94f5f903bd1d4299945bddb83a5f54
6,947
py
Python
tests/providers/apache/kylin/operators/test_kylin_cube.py
troywinter/airflow
ba66ba0d97941c55d9f00f66329a9d3c7ad673e7
[ "Apache-2.0" ]
1
2019-05-07T06:46:55.000Z
2019-05-07T06:46:55.000Z
tests/providers/apache/kylin/operators/test_kylin_cube.py
troywinter/airflow
ba66ba0d97941c55d9f00f66329a9d3c7ad673e7
[ "Apache-2.0" ]
9
2020-07-28T15:07:03.000Z
2022-03-29T22:27:52.000Z
tests/providers/apache/kylin/operators/test_kylin_cube.py
troywinter/airflow
ba66ba0d97941c55d9f00f66329a9d3c7ad673e7
[ "Apache-2.0" ]
2
2020-03-08T14:12:55.000Z
2020-06-10T10:17:32.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...
40.625731
99
0.601699
import unittest from datetime import datetime from unittest.mock import MagicMock, patch from airflow.exceptions import AirflowException from airflow.models import TaskInstance from airflow.models.dag import DAG from airflow.providers.apache.kylin.operators.kylin_cube import KylinCubeOperator from ai...
true
true
f71ec42a28749ddb6de8a5e3cad145986f2bf2c5
5,026
py
Python
royg_train.py
CRLarry/StyleTransfer
ddea81f8570232743bd7b8dbd569cf77f7cb5a28
[ "Apache-2.0" ]
null
null
null
royg_train.py
CRLarry/StyleTransfer
ddea81f8570232743bd7b8dbd569cf77f7cb5a28
[ "Apache-2.0" ]
null
null
null
royg_train.py
CRLarry/StyleTransfer
ddea81f8570232743bd7b8dbd569cf77f7cb5a28
[ "Apache-2.0" ]
null
null
null
import math, random, time, pygame, sys from pygame.locals import * from PIL import Image import numpy as np import json print("i tried") def random_select(distribution, color, iteration): random_r = int(np.random.normal(color[0], distribution[0] * 60 / (20*(iteration+1)))) random_g = int(np.random.normal(colo...
45.279279
296
0.53263
import math, random, time, pygame, sys from pygame.locals import * from PIL import Image import numpy as np import json print("i tried") def random_select(distribution, color, iteration): random_r = int(np.random.normal(color[0], distribution[0] * 60 / (20*(iteration+1)))) random_g = int(np.random.normal(colo...
true
true
f71ec4b896f551291624910e004a7a70b12742c5
4,570
py
Python
tests/components/freedompro/test_switch.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
tests/components/freedompro/test_switch.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
24,710
2016-04-13T08:27:26.000Z
2020-03-02T12:59:13.000Z
tests/components/freedompro/test_switch.py
MrDelik/core
93a66cc357b226389967668441000498a10453bb
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""Tests for the Freedompro switch.""" from datetime import timedelta from unittest.mock import ANY, patch from homeassistant.components.switch import DOMAIN as SWITCH_DOMAIN, SERVICE_TURN_ON from homeassistant.const import ATTR_ENTITY_ID, SERVICE_TURN_OFF, STATE_OFF, STATE_ON from homeassistant.helpers import entity_...
32.877698
95
0.70547
from datetime import timedelta from unittest.mock import ANY, patch from homeassistant.components.switch import DOMAIN as SWITCH_DOMAIN, SERVICE_TURN_ON from homeassistant.const import ATTR_ENTITY_ID, SERVICE_TURN_OFF, STATE_OFF, STATE_ON from homeassistant.helpers import entity_registry as er from homeassistant.helpe...
true
true
f71ec50af27e8ed303e8fc89876d0a14c0305d56
658
py
Python
backend/app/api/api_v1/routers/words.py
davipaula/learn-with-me
9357ee83004df2a7ddc2b278eab05dcd63119b69
[ "MIT" ]
null
null
null
backend/app/api/api_v1/routers/words.py
davipaula/learn-with-me
9357ee83004df2a7ddc2b278eab05dcd63119b69
[ "MIT" ]
null
null
null
backend/app/api/api_v1/routers/words.py
davipaula/learn-with-me
9357ee83004df2a7ddc2b278eab05dcd63119b69
[ "MIT" ]
null
null
null
from fastapi import APIRouter, Depends from app.db.crud import get_video_captions from app.db.session import get_db from app.model import tf_idf words_router = r = APIRouter() @r.get("/topics/{topic}/{number_of_words}") def by_topic(topic: str, number_of_words: int): most_important_words = tf_idf.run(topic, num...
22.689655
61
0.671733
from fastapi import APIRouter, Depends from app.db.crud import get_video_captions from app.db.session import get_db from app.model import tf_idf words_router = r = APIRouter() @r.get("/topics/{topic}/{number_of_words}") def by_topic(topic: str, number_of_words: int): most_important_words = tf_idf.run(topic, num...
true
true
f71ec523cbad689ebbde6ad316d921c9776fce3f
9,001
py
Python
metrics_utils.py
maojie/depot_tools
ba35c7f8ce4bc9ae93607109b89199d3d9e0af2d
[ "BSD-3-Clause" ]
null
null
null
metrics_utils.py
maojie/depot_tools
ba35c7f8ce4bc9ae93607109b89199d3d9e0af2d
[ "BSD-3-Clause" ]
null
null
null
metrics_utils.py
maojie/depot_tools
ba35c7f8ce4bc9ae93607109b89199d3d9e0af2d
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # Copyright (c) 2018 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. from __future__ import print_function import re import scm import subprocess2 import sys import urlparse # Current version of me...
30.003333
80
0.693479
from __future__ import print_function import re import scm import subprocess2 import sys import urlparse CURRENT_VERSION = 1 APP_URL = 'https://cit-cli-metrics.appspot.com' def get_notice_countdown_header(countdown): if countdown == 0: yield ' METRICS COLLECTION IS TAKING PLACE' else: yield...
true
true
f71ec570609d44a983cf9c03c4b5548e2be4e2ce
533
py
Python
Python Programs/string-reverse-words-zoho.py
muhammad-masood-ur-rehman/Skillrack
71a25417c89d0efab40ee6229ccd758b26ae4312
[ "CC0-1.0" ]
2
2021-06-26T21:50:59.000Z
2021-09-18T04:55:51.000Z
Python Programs/string-reverse-words-zoho.py
muhammad-masood-ur-rehman/Skillrack
71a25417c89d0efab40ee6229ccd758b26ae4312
[ "CC0-1.0" ]
null
null
null
Python Programs/string-reverse-words-zoho.py
muhammad-masood-ur-rehman/Skillrack
71a25417c89d0efab40ee6229ccd758b26ae4312
[ "CC0-1.0" ]
null
null
null
String - Reverse Words [ZOHO] A string S is passed as the input. The program must reverse the order of the words in the string and print them as the output. Input Format: The first line will contain S. Output Format: The first line will contain the words in the string S in the reverse order. Boundary Conditions: Lengt...
25.380952
126
0.75985
String - Reverse Words [ZOHO] A string S is passed as the input. The program must reverse the order of the words in the string and print them as the output. Input Format: The first line will contain S. Output Format: The first line will contain the words in the string S in the reverse order. Boundary Conditions: Lengt...
false
true
f71ec5dba68128c31f33297d8579804be932cce8
1,874
py
Python
trisicell/pp/_binary.py
faridrashidi/trisicell
4db89edd44c03ccb6c7d3477beff0079c3ff8035
[ "BSD-3-Clause" ]
2
2021-07-02T13:53:15.000Z
2021-11-16T03:14:36.000Z
trisicell/pp/_binary.py
faridrashidi/trisicell
4db89edd44c03ccb6c7d3477beff0079c3ff8035
[ "BSD-3-Clause" ]
58
2021-06-14T17:14:39.000Z
2022-03-11T19:32:54.000Z
trisicell/pp/_binary.py
faridrashidi/trisicell
4db89edd44c03ccb6c7d3477beff0079c3ff8035
[ "BSD-3-Clause" ]
null
null
null
import trisicell as tsc def binarym_filter_private_mutations(df): df.drop(df.columns[df.sum() == 1], axis=1, inplace=True) def binarym_filter_clonal_mutations(df): x = (df == 1).sum() x = x[x == df.shape[0]] df.drop(x.index, axis=1, inplace=True) def binarym_filter_nonsense_mutations(df, alt_in=2,...
27.558824
80
0.524546
import trisicell as tsc def binarym_filter_private_mutations(df): df.drop(df.columns[df.sum() == 1], axis=1, inplace=True) def binarym_filter_clonal_mutations(df): x = (df == 1).sum() x = x[x == df.shape[0]] df.drop(x.index, axis=1, inplace=True) def binarym_filter_nonsense_mutations(df, alt_in=2,...
true
true
f71ec6103355933855b1b00050428c09848264a0
1,522
py
Python
setup.py
Global-Green-Growth-Institute/GraphModels
6a1c1a545df24daf2f7571fc6be8d47bece55c55
[ "MIT" ]
null
null
null
setup.py
Global-Green-Growth-Institute/GraphModels
6a1c1a545df24daf2f7571fc6be8d47bece55c55
[ "MIT" ]
null
null
null
setup.py
Global-Green-Growth-Institute/GraphModels
6a1c1a545df24daf2f7571fc6be8d47bece55c55
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages with open('README.md', encoding='utf-8') as f: long_description = f.read() with open('requirements.txt') as f: required = f.read().splitlines() required = [r.split('==')[0] for r in required] setup( name='ggmodel_dev', version='0.0.25', description=...
47.5625
274
0.685283
from setuptools import setup, find_packages with open('README.md', encoding='utf-8') as f: long_description = f.read() with open('requirements.txt') as f: required = f.read().splitlines() required = [r.split('==')[0] for r in required] setup( name='ggmodel_dev', version='0.0.25', description=...
true
true
f71ec734137c6570fd65d5935dee186b8ceb089f
95
py
Python
lecture8/dbexample/dbexample2/apps.py
CSUChico-CINS465/CSCI465-Fall2016-Lecture-Examples
332df2821aef74c6522c53278e28ceb27cbe2fe6
[ "MIT" ]
null
null
null
lecture8/dbexample/dbexample2/apps.py
CSUChico-CINS465/CSCI465-Fall2016-Lecture-Examples
332df2821aef74c6522c53278e28ceb27cbe2fe6
[ "MIT" ]
null
null
null
lecture8/dbexample/dbexample2/apps.py
CSUChico-CINS465/CSCI465-Fall2016-Lecture-Examples
332df2821aef74c6522c53278e28ceb27cbe2fe6
[ "MIT" ]
null
null
null
from django.apps import AppConfig class Dbexample2Config(AppConfig): name = 'dbexample2'
15.833333
34
0.768421
from django.apps import AppConfig class Dbexample2Config(AppConfig): name = 'dbexample2'
true
true
f71ec7380a07ff33e88fe3a83f045f17adce3722
112,841
py
Python
subversion/tests/cmdline/switch_tests.py
saurabhacellere/subversion
6e7a18e22d4d4cbfad917e18b784adf1912aa67f
[ "Apache-2.0" ]
null
null
null
subversion/tests/cmdline/switch_tests.py
saurabhacellere/subversion
6e7a18e22d4d4cbfad917e18b784adf1912aa67f
[ "Apache-2.0" ]
null
null
null
subversion/tests/cmdline/switch_tests.py
saurabhacellere/subversion
6e7a18e22d4d4cbfad917e18b784adf1912aa67f
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # switch_tests.py: testing `svn switch'. # # Subversion is a tool for revision control. # See http://subversion.apache.org for more information. # # ==================================================================== # Licensed to the Apache Software Foundation (ASF) under one # or mo...
38.512287
88
0.549393
# # Subversion is a tool for revision control. # See http://subversion.apache.org for more information. # # ==================================================================== # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # dis...
true
true
f71ec7be2b5c89172f80a586dc9687e6c94dc760
14,797
py
Python
l3/plot.py
dominique120/12-steps-navier-stokes
3e195bf7f7895f83f5f2248ef48dc13b76e8b5de
[ "MIT" ]
null
null
null
l3/plot.py
dominique120/12-steps-navier-stokes
3e195bf7f7895f83f5f2248ef48dc13b76e8b5de
[ "MIT" ]
null
null
null
l3/plot.py
dominique120/12-steps-navier-stokes
3e195bf7f7895f83f5f2248ef48dc13b76e8b5de
[ "MIT" ]
null
null
null
#!/usr/bin/env python import matplotlib import matplotlib.pyplot as plt import numpy as np matplotlib.rcParams["font.family"] = "Serif" matplotlib.rcParams["font.size"] = 10 matplotlib.rcParams["axes.labelsize"] = 10 matplotlib.rcParams["xtick.labelsize"] = 10 matplotlib.rcParams["ytick.labelsize"] = 10 matplotlib.rc...
369.925
2,338
0.859904
import matplotlib import matplotlib.pyplot as plt import numpy as np matplotlib.rcParams["font.family"] = "Serif" matplotlib.rcParams["font.size"] = 10 matplotlib.rcParams["axes.labelsize"] = 10 matplotlib.rcParams["xtick.labelsize"] = 10 matplotlib.rcParams["ytick.labelsize"] = 10 matplotlib.rcParams["legend.fontsi...
true
true
f71ec8c0f4f79e7b5d54635479768ae036e669e3
251
py
Python
CodeChef/JUNE20/EOEO.py
mishrakeshav/Competitive-Programming
b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2
[ "MIT" ]
2
2020-06-25T21:10:32.000Z
2020-12-10T06:53:45.000Z
CodeChef/JUNE20/EOEO.py
mishrakeshav/Competitive-Programming
b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2
[ "MIT" ]
null
null
null
CodeChef/JUNE20/EOEO.py
mishrakeshav/Competitive-Programming
b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2
[ "MIT" ]
3
2020-05-15T14:17:09.000Z
2021-07-25T13:18:20.000Z
if __name__ == '__main__': for t in range(int(input())): ts = int(input()) count = 0 while ts%2 == 0: ts //= 2 if ts: print(ts//2) else: print(0)
13.944444
33
0.346614
if __name__ == '__main__': for t in range(int(input())): ts = int(input()) count = 0 while ts%2 == 0: ts //= 2 if ts: print(ts//2) else: print(0)
true
true
f71ec943bd7cd66acb6291dadc6fac09bcc5cefa
6,787
py
Python
ryu/cmd/rpc_cli.py
umkcdcrg01/ryu_openflow
37ed5b88f7d119344e07c95314a7450235c037a8
[ "Apache-2.0" ]
1
2019-05-21T12:05:57.000Z
2019-05-21T12:05:57.000Z
ryu/cmd/rpc_cli.py
umkcdcrg01/ryu_openflow
37ed5b88f7d119344e07c95314a7450235c037a8
[ "Apache-2.0" ]
1
2019-03-07T02:48:16.000Z
2019-03-07T02:48:16.000Z
ryu/cmd/rpc_cli.py
umkcdcrg01/ryu_openflow
37ed5b88f7d119344e07c95314a7450235c037a8
[ "Apache-2.0" ]
1
2019-03-10T09:32:45.000Z
2019-03-10T09:32:45.000Z
#!/usr/bin/env python # # Copyright (C) 2013 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2013 YAMAMOTO Takashi <yamamoto at valinux co jp> # # 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...
28.39749
77
0.594519
import ryu.contrib ryu.contrib.update_module_path() from ryu import cfg import cmd import signal import socket import sys import termios from ryu.lib import rpc CONF = cfg.CONF CONF.register_cli_opts([ cfg.ListOpt('peers', default=[], help='list of peers') ]) class Peer(ob...
true
true
f71ec9cd99fa0dd28a834ab092fb530c42fa878e
1,503
py
Python
example/tree/models.py
avaddon/django-polymorphic-tree
2077bc2b422d11b1bbf9efc0f5f8dcb83a53e550
[ "Apache-2.0" ]
13
2021-05-12T09:57:17.000Z
2021-12-27T06:46:26.000Z
example/tree/models.py
avaddon/django-polymorphic-tree
2077bc2b422d11b1bbf9efc0f5f8dcb83a53e550
[ "Apache-2.0" ]
null
null
null
example/tree/models.py
avaddon/django-polymorphic-tree
2077bc2b422d11b1bbf9efc0f5f8dcb83a53e550
[ "Apache-2.0" ]
1
2022-01-31T14:28:49.000Z
2022-01-31T14:28:49.000Z
from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ from polymorphic_tree.models import PolymorphicMPTTModel, PolymorphicTreeForeignKey # A base model for the tree: @python_2_unicode_...
30.06
120
0.72189
from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ from polymorphic_tree.models import PolymorphicMPTTModel, PolymorphicTreeForeignKey @python_2_unicode_compatible class BaseTreeNod...
true
true
f71eca38d34b1b06054a870b9abde3fef819b045
1,660
py
Python
code/config.py
sahaisaumya/informal_fallacies
630d56edb27fb0d5f32dd125ad6e886e4ca2955e
[ "MIT" ]
6
2021-08-02T14:37:46.000Z
2022-02-11T14:09:04.000Z
code/config.py
sahaisaumya/informal_fallacies
630d56edb27fb0d5f32dd125ad6e886e4ca2955e
[ "MIT" ]
null
null
null
code/config.py
sahaisaumya/informal_fallacies
630d56edb27fb0d5f32dd125ad6e886e4ca2955e
[ "MIT" ]
1
2021-12-17T16:02:11.000Z
2021-12-17T16:02:11.000Z
import transformers import argparse def none_or_str(value): if value == 'None': return None return value def primary_parse(): parser = argparse.ArgumentParser() parser.add_argument('--level') # {"token" "comment"} parser.add_argument('--max_len', type=int, default=256) parser.add_argument('--max_len_context'...
43.684211
146
0.73494
import transformers import argparse def none_or_str(value): if value == 'None': return None return value def primary_parse(): parser = argparse.ArgumentParser() parser.add_argument('--level') parser.add_argument('--max_len', type=int, default=256) parser.add_argument('--max_len_context', type=int, default=64...
true
true
f71eca6b3f158fdbe0a1271729c857c9ffafb3c5
4,565
py
Python
ValveAnnulusAnalysis/HeartValveLib/helpers.py
SlicerHeart/SlicerHeart
5ead8d723f6dec67ea6065b847cb4f8dce5bef72
[ "BSD-3-Clause" ]
48
2016-04-13T10:22:53.000Z
2022-03-21T16:31:41.000Z
ValveAnnulusAnalysis/HeartValveLib/helpers.py
SlicerHeart/SlicerHeart
5ead8d723f6dec67ea6065b847cb4f8dce5bef72
[ "BSD-3-Clause" ]
14
2018-10-25T21:15:20.000Z
2021-11-26T16:55:55.000Z
ValveAnnulusAnalysis/HeartValveLib/helpers.py
SlicerHeart/SlicerHeart
5ead8d723f6dec67ea6065b847cb4f8dce5bef72
[ "BSD-3-Clause" ]
21
2017-09-12T08:20:36.000Z
2021-10-30T02:22:11.000Z
""" collection of functions that are useful for several classes but non-specific to any """ import slicer import logging def getBinaryLabelmapRepresentation(segmentationNode, segmentID: str): segmentLabelmap = slicer.vtkOrientedImageData() segmentationNode.GetBinaryLabelmapRepresentation(segmentID, segmentLabelm...
35.664063
103
0.806134
import slicer import logging def getBinaryLabelmapRepresentation(segmentationNode, segmentID: str): segmentLabelmap = slicer.vtkOrientedImageData() segmentationNode.GetBinaryLabelmapRepresentation(segmentID, segmentLabelmap) return segmentLabelmap def getSpecificHeartValveModelNodes(phases: list): heartVal...
true
true
f71ecd5b355fa5a6dd0a436c34d7ff7e754d15d2
1,464
py
Python
tests/test_response.py
Vlsarro/pystexchapi
27618002165fc536798c46c486e78caeb85905bf
[ "MIT" ]
null
null
null
tests/test_response.py
Vlsarro/pystexchapi
27618002165fc536798c46c486e78caeb85905bf
[ "MIT" ]
null
null
null
tests/test_response.py
Vlsarro/pystexchapi
27618002165fc536798c46c486e78caeb85905bf
[ "MIT" ]
null
null
null
import unittest import json import requests from pystexchapi.response import StockExchangeResponseParser, APIResponse from pystexchapi.exc import APIDataException, APIResponseParsingException from tests import TICKER_RESPONSE, GENERIC_ERROR_RESPONSE def raise_value_error(): raise ValueError() class TestStockEx...
31.826087
94
0.729508
import unittest import json import requests from pystexchapi.response import StockExchangeResponseParser, APIResponse from pystexchapi.exc import APIDataException, APIResponseParsingException from tests import TICKER_RESPONSE, GENERIC_ERROR_RESPONSE def raise_value_error(): raise ValueError() class TestStockEx...
true
true
f71ecd6238bcff3815bc4c498aa4bcae208a60d4
12,301
py
Python
read_xml_export.py
DavidJLambert/Two-Windows-Event-Log-Summarizers
393ce7dc550b9fd52725e233f15e4eff1e9bc47a
[ "MIT" ]
null
null
null
read_xml_export.py
DavidJLambert/Two-Windows-Event-Log-Summarizers
393ce7dc550b9fd52725e233f15e4eff1e9bc47a
[ "MIT" ]
null
null
null
read_xml_export.py
DavidJLambert/Two-Windows-Event-Log-Summarizers
393ce7dc550b9fd52725e233f15e4eff1e9bc47a
[ "MIT" ]
null
null
null
""" read_xml_export.py REPOSITORY: https://github.com/DavidJLambert/Two-Windows-Event-Log-Summarizers SUMMARY: Scans XML exports of the Windows Event Log and reports summary statistics. AUTHOR: David J. Lambert VERSION: 0.1.1 DATE: July 10, 2020 """ # -------- IMPORTS. from __future__ import print_funct...
33.156334
80
0.598
from __future__ import print_function import xml.etree.ElementTree import win32security from frozendict import frozendict import glob from zipfile import ZipFile import os def handle_files() -> None: xml_zip_files = glob.glob('./sample_data/*.xml.zip') if len(xml_zip_files) > 0: for xml_zip_...
true
true
f71ece1554e7f63c5e58bcf712cb98e72ca6840c
349
py
Python
assets/csv_counter.py
romanbird/jeopardy-bot
d47600d9261fefcb5f08d699ddf8b5fdcd072da1
[ "MIT" ]
2
2019-02-09T15:33:39.000Z
2019-02-10T11:43:19.000Z
assets/csv_counter.py
romanbird/jeopardy-bot
d47600d9261fefcb5f08d699ddf8b5fdcd072da1
[ "MIT" ]
null
null
null
assets/csv_counter.py
romanbird/jeopardy-bot
d47600d9261fefcb5f08d699ddf8b5fdcd072da1
[ "MIT" ]
null
null
null
import csv import pandas as pd from tqdm import tqdm from collections import Counter dbRead = open('db.csv', "r", newline='', encoding='utf8') db = list(csv.reader(dbRead, delimiter=",")) column = [row[-1] for row in db] for row in tqdm(db): row[-2]=Counter(column)[row[-1]] df=pd.DataFrame(data=db) df.to_csv('db.cs...
31.727273
57
0.681948
import csv import pandas as pd from tqdm import tqdm from collections import Counter dbRead = open('db.csv', "r", newline='', encoding='utf8') db = list(csv.reader(dbRead, delimiter=",")) column = [row[-1] for row in db] for row in tqdm(db): row[-2]=Counter(column)[row[-1]] df=pd.DataFrame(data=db) df.to_csv('db.cs...
true
true
f71ecec53aa3a76357554679243d45b4d4803a19
188,462
py
Python
python/idc.py
0xeb/src
01d069ae681856ecc9c7a96067f60dc86a33f0ab
[ "BSD-3-Clause" ]
null
null
null
python/idc.py
0xeb/src
01d069ae681856ecc9c7a96067f60dc86a33f0ab
[ "BSD-3-Clause" ]
null
null
null
python/idc.py
0xeb/src
01d069ae681856ecc9c7a96067f60dc86a33f0ab
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python #--------------------------------------------------------------------- # IDAPython - Python plugin for Interactive Disassembler # # Original IDC.IDC: # Copyright (c) 1990-2010 Ilfak Guilfanov # # Python conversion: # Copyright (c) 2004-2010 Gergely Erdelyi <gergely.erdelyi@d-dome.net> # # All righ...
31.711593
153
0.635799
from __future__ import print_function import ida_idaapi import ida_auto import ida_dbg import ida_diskio import ida_entry import ida_enum import ida_expr import ida_fixup import ida_frame import ida_funcs import ida_gdl import ida_ida import ida_idc import ida_bytes import ida_idd import ida_idp impor...
true
true
f71ecf2af3703ebe08b3729f80b87a0c1c645aa0
16,293
py
Python
.venv/lib/python3.8/site-packages/google/resumable_media/requests/upload.py
taharh/label-studio
fab68de11bdc6699472d12a78390375928258e1e
[ "Apache-2.0" ]
2
2020-05-17T12:53:06.000Z
2021-04-12T02:13:43.000Z
.venv/lib/python3.8/site-packages/google/resumable_media/requests/upload.py
taharh/label-studio
fab68de11bdc6699472d12a78390375928258e1e
[ "Apache-2.0" ]
16
2021-03-19T09:44:52.000Z
2022-03-12T00:22:14.000Z
.venv/lib/python3.8/site-packages/google/resumable_media/requests/upload.py
taharh/label-studio
fab68de11bdc6699472d12a78390375928258e1e
[ "Apache-2.0" ]
1
2021-08-06T04:07:10.000Z
2021-08-06T04:07:10.000Z
# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
35.496732
81
0.624072
from google.resumable_media import _upload from google.resumable_media.requests import _helpers class SimpleUpload(_helpers.RequestsMixin, _upload.SimpleUpload): def transmit(self, transport, data, content_type): method, url, payload, headers = self._prepare_request(data, content_type) ...
true
true
f71ecf71aebb9e5ffec8c7a30cb6b389a0ce74cf
64,303
py
Python
Lib/site-packages/sqlalchemy/orm/properties.py
mariorodolfo/arrow
aa8085fd69a089650935e65e397447df8772f2b5
[ "BSD-3-Clause" ]
2
2015-11-05T09:43:45.000Z
2017-05-31T14:22:02.000Z
Lib/site-packages/sqlalchemy/orm/properties.py
mariorodolfo/arrow
aa8085fd69a089650935e65e397447df8772f2b5
[ "BSD-3-Clause" ]
null
null
null
Lib/site-packages/sqlalchemy/orm/properties.py
mariorodolfo/arrow
aa8085fd69a089650935e65e397447df8772f2b5
[ "BSD-3-Clause" ]
null
null
null
# orm/properties.py # Copyright (C) 2005-2012 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """MapperProperty implementations. This is a private module which defines the behav...
41.061941
84
0.554671
"""MapperProperty implementations. This is a private module which defines the behavior of invidual ORM- mapped attributes. """ from sqlalchemy import sql, util, log, exc as sa_exc from sqlalchemy.sql.util import ClauseAdapter, criterion_as_pairs, \ join_condition, _shallow_annotate from sqlalchemy.sql impo...
false
true
f71ecf94681232dc19499ce57aba3e589002f9f4
20,443
py
Python
test/functional/test_framework/test_framework.py
simulacrum-trade/simulacrum
3e1962be7f9b58a1e6930658be3642de47830d74
[ "MIT" ]
1
2020-01-23T13:50:58.000Z
2020-01-23T13:50:58.000Z
test/functional/test_framework/test_framework.py
simulacrum-trade/simulacrum
3e1962be7f9b58a1e6930658be3642de47830d74
[ "MIT" ]
1
2020-04-01T13:14:36.000Z
2020-04-09T06:35:37.000Z
test/functional/test_framework/test_framework.py
simulacrum-trade/simulacrum
3e1962be7f9b58a1e6930658be3642de47830d74
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Base class for RPC testing.""" from enum import Enum import logging import optparse import os import p...
41.977413
310
0.621827
from enum import Enum import logging import optparse import os import pdb import shutil import sys import tempfile import time from .authproxy import JSONRPCException from . import coverage from .test_node import TestNode from .util import ( MAX_NODES, PortSeed, assert_equal, check_json_precision,...
true
true
f71ecfff9c183a5b99999bb2998f06e10f2e2b9c
1,030
py
Python
var/spack/repos/builtin/packages/py-msal/package.py
kkauder/spack
6ae8d5c380c1f42094b05d38be26b03650aafb39
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2019-02-10T13:47:48.000Z
2019-04-17T13:05:17.000Z
var/spack/repos/builtin/packages/py-msal/package.py
kkauder/spack
6ae8d5c380c1f42094b05d38be26b03650aafb39
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
32
2020-12-15T17:29:20.000Z
2022-03-21T15:08:31.000Z
var/spack/repos/builtin/packages/py-msal/package.py
kkauder/spack
6ae8d5c380c1f42094b05d38be26b03650aafb39
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2021-04-07T18:27:09.000Z
2022-03-31T22:52:38.000Z
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) class PyMsal(PythonPackage): """The Microsoft Authentication Library (MSAL) for Python library enables your app t...
46.818182
95
0.750485
class PyMsal(PythonPackage): homepage = "https://github.com/AzureAD/microsoft-authentication-library-for-python" pypi = "msal/msal-1.3.0.tar.gz" version('1.3.0', sha256='5442a3a9d006506e653d3c4daff40538bdf067bf07b6b73b32d1b231d5e77a92') version('1.0.0', sha256='ecbe3f5ac77facad16abf08eb9d8562af3...
true
true
f71ed0eb715dfac31c4a74be37828bd583bcf88b
15,233
py
Python
train_nuclei.py
xumm94/2018_data_science_bowl
9f7a6b60b7c1e933c30acd8abbdeeb7bd869a3f6
[ "MIT" ]
null
null
null
train_nuclei.py
xumm94/2018_data_science_bowl
9f7a6b60b7c1e933c30acd8abbdeeb7bd869a3f6
[ "MIT" ]
null
null
null
train_nuclei.py
xumm94/2018_data_science_bowl
9f7a6b60b7c1e933c30acd8abbdeeb7bd869a3f6
[ "MIT" ]
null
null
null
# coding: utf-8 """ Mask R-CNN - Train on Nuclei Dataset (Updated from train_shape.ipynb) This notebook shows how to train Mask R-CNN on your own dataset. To keep things simple we use a synthetic dataset of shapes (squares, triangles, and circles) which enables fast training. You'd still need a GPU, though, becaus...
38.760814
101
0.586359
import os import sys import random import math import re import time from tqdm import tqdm import numpy as np import pandas as pd import cv2 import matplotlib import matplotlib.pyplot as plt from config import Config import utils import model as modellib import visualize from model import log import logging impor...
true
true
f71ed1a57e43f0540a74700d7289f51d9537ec4f
39,787
py
Python
ankify_roam/roam/content.py
taylormitchell/ankify_roam
bd058e3bf086a300680a14cdfc1079d83ed8d79f
[ "MIT" ]
37
2020-07-03T01:59:13.000Z
2022-03-24T04:23:43.000Z
ankify_roam/roam/content.py
taylormitchell/ankify_roam
bd058e3bf086a300680a14cdfc1079d83ed8d79f
[ "MIT" ]
33
2020-07-05T02:09:22.000Z
2022-03-23T01:51:56.000Z
ankify_roam/roam/content.py
taylormitchell/ankify_roam
bd058e3bf086a300680a14cdfc1079d83ed8d79f
[ "MIT" ]
6
2020-07-05T07:10:33.000Z
2022-03-10T21:06:53.000Z
import os import re import logging from functools import reduce from itertools import zip_longest from collections.abc import Iterable import html logger = logging.getLogger(__name__) RE_SPLIT_OR = "(?<!\\\)\|" class BlockContent(list): def __init__(self, roam_objects=[]): """ Args: ...
33.100666
138
0.560284
import os import re import logging from functools import reduce from itertools import zip_longest from collections.abc import Iterable import html logger = logging.getLogger(__name__) RE_SPLIT_OR = "(?<!\\\)\|" class BlockContent(list): def __init__(self, roam_objects=[]): if type(roam_objects) not in ...
true
true
f71ed1eb7998078b776859f34f0555bc09cda199
712
py
Python
soluciones/empresa_pagos/main.py
carlosviveros/Soluciones
115f4fa929c7854ca497e4c994352adc64565456
[ "MIT" ]
4
2021-12-14T23:51:25.000Z
2022-03-24T11:14:00.000Z
soluciones/empresa_pagos/main.py
leugimkm/Soluciones
d71601c8d9b5e86e926f48d9e49462af8a956b6d
[ "MIT" ]
null
null
null
soluciones/empresa_pagos/main.py
leugimkm/Soluciones
d71601c8d9b5e86e926f48d9e49462af8a956b6d
[ "MIT" ]
5
2021-11-10T06:49:50.000Z
2022-03-24T01:42:28.000Z
"""AyudaEnPython: https://www.facebook.com/groups/ayudapython """ # pip install prototools from prototools import Menu from prototools.colorize import magenta, cyan, red from empresa import Empresa def main(): empresa = Empresa() menu = Menu( cyan("Menu"), exit_option_text=red("Salir"), ...
22.25
61
0.630618
from prototools import Menu from prototools.colorize import magenta, cyan, red from empresa import Empresa def main(): empresa = Empresa() menu = Menu( cyan("Menu"), exit_option_text=red("Salir"), exit_option_color=red, ) menu.add_options( ("Agregar trabajadores", emp...
true
true
f71ed277dd99ea3ca81a3df1f5f8136a8aeffc8e
5,023
py
Python
proteinhmmvisualize.py
mitenjain/protpore
06b779473c4bf9f9c8c4305aa08873ae75386886
[ "MIT" ]
null
null
null
proteinhmmvisualize.py
mitenjain/protpore
06b779473c4bf9f9c8c4305aa08873ae75386886
[ "MIT" ]
null
null
null
proteinhmmvisualize.py
mitenjain/protpore
06b779473c4bf9f9c8c4305aa08873ae75386886
[ "MIT" ]
null
null
null
''' Author: Hannah Meyers This file contains the experiment code for attempting to model protein nanopore traces via HMMs. Please see inline comments for an explanation of what each piece of the code is doing. ''' from __future__ import print_function from PyPore.parsers import * from PyPore.DataTypes impor...
37.207407
136
0.651005
from __future__ import print_function from PyPore.parsers import * from PyPore.DataTypes import * from hmm import * from yahmm import * import math import matplotlib.pyplot as plt import itertools as it import glob import seaborn as sns import sys import pandas as pd from proteinDists import * from sci...
true
true
f71ed2a62255fdb093417848fcf1c4f4c52ebe9f
1,637
py
Python
kelbyapp/settings.py
metatroid/kelbyapp
6d575f6aac38832e52f520d3a7f072f43c746670
[ "BSD-3-Clause" ]
null
null
null
kelbyapp/settings.py
metatroid/kelbyapp
6d575f6aac38832e52f520d3a7f072f43c746670
[ "BSD-3-Clause" ]
null
null
null
kelbyapp/settings.py
metatroid/kelbyapp
6d575f6aac38832e52f520d3a7f072f43c746670
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """Application configuration.""" import os class Config(object): """Base configuration.""" SECRET_KEY = "uidhbao7dbaudw8yebqnmrbqiyrnqxurgqhrqeioryq89894873264234bvm234l234pu2347" #os.environ.get('KELBYAPP_SECRET', 'secret-key') # TODO: Change me APP_DIR = os.path.abspath(os.path...
32.098039
160
0.695174
import os class Config(object): SECRET_KEY = "uidhbao7dbaudw8yebqnmrbqiyrnqxurgqhrqeioryq89894873264234bvm234l234pu2347" .path.abspath(os.path.dirname(__file__)) PROJECT_ROOT = os.path.abspath(os.path.join(APP_DIR, os.pardir)) BCRYPT_LOG_ROUNDS = 13 ASSETS_DEBUG = False DEBUG_TB_ENABLED = Fals...
true
true
f71ed2c3f4f2ed6f53d55f48bf58882fc442030c
214
py
Python
py2cytoscape_doc/py2cytoscape/data/util_style.py
idekerlab/cyrest-examples
8146c40f280d996fe14d0717038012f2507aba4e
[ "MIT" ]
1
2020-09-07T00:32:12.000Z
2020-09-07T00:32:12.000Z
py2cytoscape_doc/py2cytoscape/data/util_style.py
idekerlab/cyrest-examples
8146c40f280d996fe14d0717038012f2507aba4e
[ "MIT" ]
null
null
null
py2cytoscape_doc/py2cytoscape/data/util_style.py
idekerlab/cyrest-examples
8146c40f280d996fe14d0717038012f2507aba4e
[ "MIT" ]
5
2018-05-31T16:55:31.000Z
2021-01-19T07:00:00.000Z
# -*- coding: utf-8 -*- """ """ class StyleUtil(object): """ """ @staticmethod def create_gradient(column, vp=None): """ :param column: :param vp: """ pass
13.375
41
0.439252
class StyleUtil(object): @staticmethod def create_gradient(column, vp=None): pass
true
true
f71ed36d488977b309b3e7baf242d2d9d98bcc2e
4,465
py
Python
profiles_api/views.py
Ankitsingh24/Project-REST-API
4aac3e819e2aee49a117c79d2f151b477d75d7eb
[ "MIT" ]
null
null
null
profiles_api/views.py
Ankitsingh24/Project-REST-API
4aac3e819e2aee49a117c79d2f151b477d75d7eb
[ "MIT" ]
null
null
null
profiles_api/views.py
Ankitsingh24/Project-REST-API
4aac3e819e2aee49a117c79d2f151b477d75d7eb
[ "MIT" ]
null
null
null
from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status from rest_framework import viewsets from rest_framework.authentication import TokenAuthentication from rest_framework import filters from rest_framework.authtoken.views import ObtainAuthToken from res...
33.320896
77
0.664726
from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status from rest_framework import viewsets from rest_framework.authentication import TokenAuthentication from rest_framework import filters from rest_framework.authtoken.views import ObtainAuthToken from res...
true
true
f71ed394f273d02af2d30bdc28d867676cfc930d
15,202
py
Python
geopandas/tools/tests/test_clip.py
cloudscenes/geopandas
409d8f0a1562df088ce28c39a48fe4df669660fe
[ "BSD-3-Clause" ]
2,914
2015-01-01T14:27:43.000Z
2022-03-31T22:26:39.000Z
geopandas/tools/tests/test_clip.py
cloudscenes/geopandas
409d8f0a1562df088ce28c39a48fe4df669660fe
[ "BSD-3-Clause" ]
2,040
2015-01-16T11:34:26.000Z
2022-03-31T12:13:39.000Z
geopandas/tools/tests/test_clip.py
cloudscenes/geopandas
409d8f0a1562df088ce28c39a48fe4df669660fe
[ "BSD-3-Clause" ]
758
2015-01-21T20:23:32.000Z
2022-03-31T17:22:53.000Z
"""Tests for the clip module.""" import warnings from distutils.version import LooseVersion import numpy as np import pandas as pd import shapely from shapely.geometry import ( Polygon, Point, LineString, LinearRing, GeometryCollection, MultiPoint, ) import geopandas from geopandas import Ge...
36.987835
88
0.698527
import warnings from distutils.version import LooseVersion import numpy as np import pandas as pd import shapely from shapely.geometry import ( Polygon, Point, LineString, LinearRing, GeometryCollection, MultiPoint, ) import geopandas from geopandas import GeoDataFrame, GeoSeries, clip from...
true
true
f71ed3c14f730535ffa1e416a7661b591a5802cb
1,854
py
Python
src/cpu/testers/gpu_ruby_test/GpuWavefront.py
hyu-iot/gem5
aeccc8bd8e9a86f96fc7a6f40d978f8494337fc5
[ "BSD-3-Clause" ]
765
2015-01-14T16:17:04.000Z
2022-03-28T07:46:28.000Z
src/cpu/testers/gpu_ruby_test/GpuWavefront.py
hyu-iot/gem5
aeccc8bd8e9a86f96fc7a6f40d978f8494337fc5
[ "BSD-3-Clause" ]
30
2015-01-01T21:49:38.000Z
2021-04-20T19:01:54.000Z
src/cpu/testers/gpu_ruby_test/GpuWavefront.py
hyu-iot/gem5
aeccc8bd8e9a86f96fc7a6f40d978f8494337fc5
[ "BSD-3-Clause" ]
807
2015-01-06T09:55:38.000Z
2022-03-30T10:23:36.000Z
# Copyright (c) 2017-2021 Advanced Micro Devices, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of ...
45.219512
78
0.782093
from m5.params import * from m5.proxy import * from m5.objects.TesterThread import TesterThread class GpuWavefront(TesterThread): type = 'GpuWavefront' cxx_header = "cpu/testers/gpu_ruby_test/gpu_wavefront.hh" cxx_class = 'gem5::GpuWavefront' cu_id = Param.Int("Compute Un...
true
true
f71ed45f67578898fc5ebcf1ebe0bb5a8cc1a6f8
1,990
py
Python
Python/Plotagem_varios_dadados.py
italogfernandes/minicurso-arduino-avancado
bbdfe0f4dedf684a9f480268d161c1c145661242
[ "MIT" ]
1
2016-05-15T00:20:08.000Z
2016-05-15T00:20:08.000Z
Python/Plotagem_varios_dadados.py
italogfernandes/minicurso-arduino-avancado
bbdfe0f4dedf684a9f480268d161c1c145661242
[ "MIT" ]
null
null
null
Python/Plotagem_varios_dadados.py
italogfernandes/minicurso-arduino-avancado
bbdfe0f4dedf684a9f480268d161c1c145661242
[ "MIT" ]
null
null
null
import serial import numpy import matplotlib.pyplot as plt from drawnow import * ACx= [] ACy= [] ACz = [] Temperatura = [] Girx = [] Giry = [] Girz = [] arduinoData = serial.Serial('/dev/ttyACM0', 9600, timeout=1) plt.ion() #avisando o matplot que quero fazer algo live cnt=0 def makeFig(): #...
28.028169
86
0.58593
import serial import numpy import matplotlib.pyplot as plt from drawnow import * ACx= [] ACy= [] ACz = [] Temperatura = [] Girx = [] Giry = [] Girz = [] arduinoData = serial.Serial('/dev/ttyACM0', 9600, timeout=1) plt.ion() cnt=0 def makeFig(): plt.ylim(-25000,25000) plt.title('Dados do ...
false
true
f71ed54fb01d8a712469fee4d6600f643a833730
8,129
py
Python
tests/unit/modules/test_modjk.py
byteskeptical/salt
637fe0b04f38b2274191b005d73b3c6707d7f400
[ "Apache-2.0" ]
5
2018-05-01T20:51:14.000Z
2021-11-09T05:43:00.000Z
tests/unit/modules/test_modjk.py
byteskeptical/salt
637fe0b04f38b2274191b005d73b3c6707d7f400
[ "Apache-2.0" ]
86
2017-01-27T11:54:46.000Z
2020-05-20T06:25:26.000Z
tests/unit/modules/test_modjk.py
byteskeptical/salt
637fe0b04f38b2274191b005d73b3c6707d7f400
[ "Apache-2.0" ]
11
2017-01-26T19:36:29.000Z
2021-12-11T07:54:16.000Z
# -*- coding: utf-8 -*- ''' :codeauthor: Jayesh Kariya <jayeshk@saltstack.com> ''' # Import Python Libs from __future__ import absolute_import, print_function, unicode_literals # Import Salt Testing Libs from tests.support.unit import TestCase, skipIf from tests.support.mock import ( patch, NO_MOCK, N...
35.497817
80
0.549637
from __future__ import absolute_import, print_function, unicode_literals from tests.support.unit import TestCase, skipIf from tests.support.mock import ( patch, NO_MOCK, NO_MOCK_REASON ) import salt.modules.modjk as modjk @skipIf(NO_MOCK, NO_MOCK_REASON) class ModjkTestCase(TestCase): def...
true
true
f71ed55e2fa3d1075c8a3ae94a4d68e6353fb1e3
15,527
py
Python
eval.py
mendelmaker/yolact
83e7d08f03951c49a9731759e8458c51fe0922d7
[ "MIT" ]
null
null
null
eval.py
mendelmaker/yolact
83e7d08f03951c49a9731759e8458c51fe0922d7
[ "MIT" ]
null
null
null
eval.py
mendelmaker/yolact
83e7d08f03951c49a9731759e8458c51fe0922d7
[ "MIT" ]
null
null
null
import json import numpy as np import torch import pycocotools import argparse from pycocotools.coco import COCO from pycocotools.cocoeval import COCOeval from terminaltables import AsciiTable from collections import OrderedDict import torch.backends.cudnn as cudnn from data.coco import COCODetection from modules.buil...
40.860526
129
0.597153
import json import numpy as np import torch import pycocotools import argparse from pycocotools.coco import COCO from pycocotools.cocoeval import COCOeval from terminaltables import AsciiTable from collections import OrderedDict import torch.backends.cudnn as cudnn from data.coco import COCODetection from modules.buil...
true
true
f71ed5dd900f5b4c9d430cc903b05e70c9ce4cd5
554
py
Python
mini_gplus/daos/post_cache.py
KTachibanaM/pill-city
8a5a9c6a46c79f2e5c33c598d931360c319b75f4
[ "MIT" ]
16
2021-08-03T07:03:15.000Z
2021-09-23T09:09:57.000Z
mini_gplus/daos/post_cache.py
KTachibanaM/pill-city
8a5a9c6a46c79f2e5c33c598d931360c319b75f4
[ "MIT" ]
193
2021-07-29T09:43:54.000Z
2021-10-05T05:18:55.000Z
mini_gplus/daos/post_cache.py
KTachibanaM/mini-gplus
1881bef983797fe99e1499fb794976cb48863c70
[ "MIT" ]
3
2021-09-14T10:08:41.000Z
2021-09-20T12:47:40.000Z
from bson import ObjectId from mini_gplus.models import Post from mini_gplus.utils.profiling import timer from .cache import r RPost = "post" def set_in_post_cache(post: Post): r.hset(RPost, str(post.id), post.to_json()) @timer def get_in_post_cache(oid: ObjectId): r_post = r.hget(RPost, str(oid)) if n...
22.16
49
0.705776
from bson import ObjectId from mini_gplus.models import Post from mini_gplus.utils.profiling import timer from .cache import r RPost = "post" def set_in_post_cache(post: Post): r.hset(RPost, str(post.id), post.to_json()) @timer def get_in_post_cache(oid: ObjectId): r_post = r.hget(RPost, str(oid)) if n...
true
true
f71ed605bc82fb5d11760fc4169a8b8a0d93880d
23
py
Python
trimesh/version.py
pramukta/trimesh
4b01ef0ea2d6f8a8bcc981d87dd3ae097bc62f11
[ "MIT" ]
null
null
null
trimesh/version.py
pramukta/trimesh
4b01ef0ea2d6f8a8bcc981d87dd3ae097bc62f11
[ "MIT" ]
null
null
null
trimesh/version.py
pramukta/trimesh
4b01ef0ea2d6f8a8bcc981d87dd3ae097bc62f11
[ "MIT" ]
null
null
null
__version__ = '3.1.11'
11.5
22
0.652174
__version__ = '3.1.11'
true
true
f71edb5720eb737000f91add91b888d1d80e37fe
2,047
py
Python
book/conf.py
Superwallah/tip-toi-reveng
2e7a8e3e70805c7c59e920151aa34da466eeeddb
[ "MIT" ]
null
null
null
book/conf.py
Superwallah/tip-toi-reveng
2e7a8e3e70805c7c59e920151aa34da466eeeddb
[ "MIT" ]
null
null
null
book/conf.py
Superwallah/tip-toi-reveng
2e7a8e3e70805c7c59e920151aa34da466eeeddb
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from recommonmark.parser import CommonMarkParser source_parsers = { '.md': CommonMarkParser, } extensions = [] templates_path = ['_templates'] source_suffix = ['.rst', '.md'] master_doc = 'index' # General information about the project. project = u'Das tttool-Buch' copyright = u'2019, Joa...
24.369048
75
0.611138
from recommonmark.parser import CommonMarkParser source_parsers = { '.md': CommonMarkParser, } extensions = [] templates_path = ['_templates'] source_suffix = ['.rst', '.md'] master_doc = 'index' project = u'Das tttool-Buch' copyright = u'2019, Joachim Breitner' author = u'Joachim Breitner' version = u'1.8.1'...
true
true
f71edbd83661cc9f7d04a5509ea567a09ae80c46
1,163
py
Python
693.binary-number-with-alternating-bits.py
Lonitch/hackerRank
84991b8340e725422bc47eec664532cc84a3447e
[ "MIT" ]
null
null
null
693.binary-number-with-alternating-bits.py
Lonitch/hackerRank
84991b8340e725422bc47eec664532cc84a3447e
[ "MIT" ]
null
null
null
693.binary-number-with-alternating-bits.py
Lonitch/hackerRank
84991b8340e725422bc47eec664532cc84a3447e
[ "MIT" ]
null
null
null
# # @lc app=leetcode id=693 lang=python3 # # [693] Binary Number with Alternating Bits # # https://leetcode.com/problems/binary-number-with-alternating-bits/description/ # # algorithms # Easy (58.47%) # Likes: 359 # Dislikes: 74 # Total Accepted: 52.4K # Total Submissions: 89.1K # Testcase Example: '5' # # Given...
17.358209
80
0.625107
class Solution: def hasAlternatingBits(self, n: int) -> bool: b = list(bin(n)[2:]) if len(b)<2: return True else: return b[0]!=b[1] and len(set(b[::2]))==1 and len(set(b[1::2]))==1
true
true
f71edc46484d5881b91881dddb4abd954210f9ec
2,782
py
Python
setup.py
nealde/Ampere
75fa9c34940a71ef865eb98b551b4a4a27da96c3
[ "MIT" ]
19
2019-03-25T09:49:47.000Z
2022-02-20T07:40:18.000Z
setup.py
nealde/battery
75fa9c34940a71ef865eb98b551b4a4a27da96c3
[ "MIT" ]
6
2018-09-28T19:27:25.000Z
2019-01-07T16:00:09.000Z
setup.py
nealde/battery
75fa9c34940a71ef865eb98b551b4a4a27da96c3
[ "MIT" ]
6
2019-01-25T16:50:56.000Z
2021-01-29T21:36:32.000Z
import setuptools import pkg_resources from setuptools import setup, Extension def is_installed(requirement): try: pkg_resources.require(requirement) except pkg_resources.ResolutionError: return False else: return True if not is_installed('numpy>=1.11.0'): print(""" ...
36.12987
211
0.686556
import setuptools import pkg_resources from setuptools import setup, Extension def is_installed(requirement): try: pkg_resources.require(requirement) except pkg_resources.ResolutionError: return False else: return True if not is_installed('numpy>=1.11.0'): print(""" ...
true
true
f71edc5b2c821754fa672bd832207da961a8f04e
20,410
py
Python
bot.py
themagicalmammal/wikibot
9f7b5f588bbf69ad66af50d573efd6d30c5a64d6
[ "MIT" ]
8
2021-02-18T10:08:59.000Z
2022-01-23T00:39:17.000Z
bot.py
themagicalmammal/wikibot
9f7b5f588bbf69ad66af50d573efd6d30c5a64d6
[ "MIT" ]
7
2021-02-04T07:21:46.000Z
2021-08-30T08:34:45.000Z
bot.py
themagicalmammal/wikibot
9f7b5f588bbf69ad66af50d573efd6d30c5a64d6
[ "MIT" ]
1
2021-05-22T06:15:59.000Z
2021-05-22T06:15:59.000Z
from os import environ from firebase_admin import credentials, db, initialize_app from flask import Flask, request from telebot import TeleBot, types from wikipedia import ( WikipediaPage, geosearch, page, random, search, set_lang, suggest, summary, ) # Firebase connection cred = crede...
20.595358
88
0.502303
from os import environ from firebase_admin import credentials, db, initialize_app from flask import Flask, request from telebot import TeleBot, types from wikipedia import ( WikipediaPage, geosearch, page, random, search, set_lang, suggest, summary, ) cred = credentials.Certificate("f...
true
true
f71edc861b7845660a5affbfdfb2cda3e677aa82
2,517
py
Python
src/process_event_api.py
AndreasVikke/ComputerScience-Final
52d09a5876bfde661a00736712db6e3d19be877d
[ "MIT" ]
1
2021-01-15T11:23:20.000Z
2021-01-15T11:23:20.000Z
src/process_event_api.py
AndreasVikke/ComputerScience-Final
52d09a5876bfde661a00736712db6e3d19be877d
[ "MIT" ]
null
null
null
src/process_event_api.py
AndreasVikke/ComputerScience-Final
52d09a5876bfde661a00736712db6e3d19be877d
[ "MIT" ]
null
null
null
""" Processes event api from slack :license: MIT """ import json import os from typing import Dict from src.modules.create_signedup_homepage import create_home_tap from src.dependencies.dependency_typing import Requests, PynamoDBConsultant from src.dependencies.requests_provider import get_requests_provider fr...
32.269231
92
0.636075
import json import os from typing import Dict from src.modules.create_signedup_homepage import create_home_tap from src.dependencies.dependency_typing import Requests, PynamoDBConsultant from src.dependencies.requests_provider import get_requests_provider from src.dependencies.pynamodb_consultant_provider import get_c...
true
true
f71eddda4654e992cc72ae838a6aad60385ed3a6
2,393
py
Python
authosm/backend.py
TCSOSM-20/LW-UI
70c3331278f71d3b22fc3a090d526b4b8106d155
[ "Apache-2.0" ]
null
null
null
authosm/backend.py
TCSOSM-20/LW-UI
70c3331278f71d3b22fc3a090d526b4b8106d155
[ "Apache-2.0" ]
null
null
null
authosm/backend.py
TCSOSM-20/LW-UI
70c3331278f71d3b22fc3a090d526b4b8106d155
[ "Apache-2.0" ]
null
null
null
# # Copyright 2018 EveryUP Srl # # 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 t...
36.257576
109
0.587547
from django.core.exceptions import PermissionDenied from .models import OsmUser from lib.osm.osmclient.clientv2 import Client from .exceptions import OSMAuthException class OsmBackend(object): def authenticate(self, **kwargs): if all(k in kwargs for k in ('username', 'password', 'project_...
true
true
f71edf88cfb79a1cb25ad3a7be93346ae19cb1ee
1,670
py
Python
apartment/apartment/urls.py
Hardy7/CS465_Final
a38ccc1ebd988ed5ded9acc05ad6c8dd1cc2d1bd
[ "MIT" ]
1
2020-03-15T22:45:42.000Z
2020-03-15T22:45:42.000Z
apartment/apartment/urls.py
Hardy7/CS465_Final
a38ccc1ebd988ed5ded9acc05ad6c8dd1cc2d1bd
[ "MIT" ]
null
null
null
apartment/apartment/urls.py
Hardy7/CS465_Final
a38ccc1ebd988ed5ded9acc05ad6c8dd1cc2d1bd
[ "MIT" ]
null
null
null
"""apartment URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-...
46.388889
101
0.694012
from django.conf.urls import include, url from django.contrib import admin from django.urls import path from django.conf.urls import re_path from myapp.views import * urlpatterns = [ re_path(r'^admin/', admin.site.urls), re_path('^users/', include('users.urls', namespace = "users")), re_path('^$', HomeView...
true
true
f71edf8ec073efffa34dabc63868cec27920ed6d
43,616
py
Python
instructor/day_one.py
deniederhut/workshop_pyintensive
f8f494081c6daabeae0724aa058c2b80fe42878b
[ "BSD-2-Clause" ]
1
2016-10-04T00:04:56.000Z
2016-10-04T00:04:56.000Z
instructor/day_one.py
deniederhut/workshop_pyintensive
f8f494081c6daabeae0724aa058c2b80fe42878b
[ "BSD-2-Clause" ]
8
2015-12-26T05:49:39.000Z
2016-05-26T00:10:57.000Z
instructor/day_one.py
deniederhut/workshop_pyintensive
f8f494081c6daabeae0724aa058c2b80fe42878b
[ "BSD-2-Clause" ]
null
null
null
# coding: utf-8 # # Day One # ## Table of Contents # 1. [Data Model](#Data-Model) # 2. [Data Structures](#Data-Structures) # 3. [Control Flow](#Control-Flow) # 4. [Input and Output](#Input-and-Output) # 5. [`os`](#os) # 6. [`glob`](#glob) # 7. [`subprocess`](#subprocess) # # Links to documentation will be provided...
24.824132
554
0.686216
ction for data. All data in a Python program is represented by objects or by relations between objects. # # Every object in Python has a **type**, a **value**, and an **identity**. We've already seen several data types, such as `int`, `float`, and `str`. An object's type determines its supported operations as well ...
true
true
f71ee34b346861ec238e28be1637923444343508
763
py
Python
test/basic/test_oplog.py
KentWangYQ/mongo2es
8952640e8ac3f2b1aa6845082fce04b7c4f7bd1e
[ "Apache-2.0" ]
5
2018-12-24T10:45:56.000Z
2019-07-29T07:26:28.000Z
test/basic/test_oplog.py
KentWangYQ/mongo2es
8952640e8ac3f2b1aa6845082fce04b7c4f7bd1e
[ "Apache-2.0" ]
null
null
null
test/basic/test_oplog.py
KentWangYQ/mongo2es
8952640e8ac3f2b1aa6845082fce04b7c4f7bd1e
[ "Apache-2.0" ]
2
2019-07-30T06:27:49.000Z
2021-09-24T08:21:52.000Z
import datetime import bson from common.mongo import oplog from common import event_emitter mo = oplog.MongoOplog('mongodb://eslocal:PHuance01@172.16.100.150,172.16.100.151,172.16.100.152/?replicaSet=foobar', ts=bson.Timestamp(1524735047, 1)) @event_emitter.on(mo.event_emitter, 'data') def on_d...
17.744186
116
0.70118
import datetime import bson from common.mongo import oplog from common import event_emitter mo = oplog.MongoOplog('mongodb://eslocal:PHuance01@172.16.100.150,172.16.100.151,172.16.100.152/?replicaSet=foobar', ts=bson.Timestamp(1524735047, 1)) @event_emitter.on(mo.event_emitter, 'data') def on_d...
true
true
f71ee3fea2be9796b955bd8e5429594c3c36ac84
886
py
Python
tests/test_vrp_constructive.py
MichaelAllen1966/2004_covid_dialysis
62c6842fc14acee07aee12ac2f238cbd1c3881d6
[ "MIT" ]
null
null
null
tests/test_vrp_constructive.py
MichaelAllen1966/2004_covid_dialysis
62c6842fc14acee07aee12ac2f238cbd1c3881d6
[ "MIT" ]
1
2020-05-15T11:11:53.000Z
2020-05-15T11:11:53.000Z
tests/test_vrp_constructive.py
MichaelAllen1966/2004_covid_dialysis
62c6842fc14acee07aee12ac2f238cbd1c3881d6
[ "MIT" ]
null
null
null
''' Tests for vrp package construction module ''' import pytest import vrp.constructive as cn import vrp.io as io @pytest.mark.parametrize("warehouse, selected_sectors, expected_cost", [ ('L51', ['L51', 'L1', 'L10', 'L100','L101'], 196.1*2), ...
31.642857
80
0.563205
import pytest import vrp.constructive as cn import vrp.io as io @pytest.mark.parametrize("warehouse, selected_sectors, expected_cost", [ ('L51', ['L51', 'L1', 'L10', 'L100','L101'], 196.1*2), ('L51', ['L51', 'L1', 'L10'], 116.7*2), ...
true
true
f71ee406bcdf8fe6a12c7bd165c46a5f00d242d8
609
py
Python
ejemplo_barra_progreso.py
jlaica/ejercicios_tkinter
4656c26b83957ee4742c4b28611ec048254dcc69
[ "MIT" ]
null
null
null
ejemplo_barra_progreso.py
jlaica/ejercicios_tkinter
4656c26b83957ee4742c4b28611ec048254dcc69
[ "MIT" ]
null
null
null
ejemplo_barra_progreso.py
jlaica/ejercicios_tkinter
4656c26b83957ee4742c4b28611ec048254dcc69
[ "MIT" ]
null
null
null
import sys from tkinter import * from tkinter import ttk import time myGui = Tk() myGui.geometry('300x200') myGui.title('Retro Code 80s') style = ttk.Style() style.configure("black.Horizontal.TProgressbar", background='black') bar = ttk.Progressbar(myGui,orient ="horizontal",length = 200, style='black.Horizontal.TPr...
23.423077
121
0.688013
import sys from tkinter import * from tkinter import ttk import time myGui = Tk() myGui.geometry('300x200') myGui.title('Retro Code 80s') style = ttk.Style() style.configure("black.Horizontal.TProgressbar", background='black') bar = ttk.Progressbar(myGui,orient ="horizontal",length = 200, style='black.Horizontal.TPr...
true
true
f71ee4a4d67144c392ef4063c47fef4809302ba0
418
py
Python
tests/test_local.py
ngoet/text-sent-api
eccfc2e65269350da0f60d5f014374433b4794b8
[ "MIT" ]
null
null
null
tests/test_local.py
ngoet/text-sent-api
eccfc2e65269350da0f60d5f014374433b4794b8
[ "MIT" ]
null
null
null
tests/test_local.py
ngoet/text-sent-api
eccfc2e65269350da0f60d5f014374433b4794b8
[ "MIT" ]
null
null
null
""" Local endpoint tests. Requires that the app is running locally (run `uvicorn main:app --reload`) """ import os import pytest from tests.endpoint_scenarios import SCENARIOS from tests.endpoint_test_utils import run_endpoint_test os.environ["LOCAL"] = "True" @pytest.mark.parametrize("scenario", list(SC...
20.9
84
0.753589
import os import pytest from tests.endpoint_scenarios import SCENARIOS from tests.endpoint_test_utils import run_endpoint_test os.environ["LOCAL"] = "True" @pytest.mark.parametrize("scenario", list(SCENARIOS.values()), ids=SCENARIOS.keys()) def test_eval(scenario): run_endpoint_test(scenario)
true
true
f71ee5485fea9a858d5cc8b330eb0e30bd658488
720
py
Python
example/nonlinear.py
Cjkkkk/Pyflow
22fd5b0141fac33ba19daa5217eee33df060a457
[ "MIT" ]
4
2019-12-18T02:05:15.000Z
2021-09-18T09:45:22.000Z
example/nonlinear.py
Cjkkkk/Pyflow
22fd5b0141fac33ba19daa5217eee33df060a457
[ "MIT" ]
null
null
null
example/nonlinear.py
Cjkkkk/Pyflow
22fd5b0141fac33ba19daa5217eee33df060a457
[ "MIT" ]
null
null
null
import flow from flow.module import Module, Linear from flow.optim import SGD from flow import function as F import numpy as np class Net(Module): def __init__(self): super().__init__() self.fc1 = Linear(2, 10) self.fc2 = Linear(10, 1) def forward(self, a): x = self.fc1(a) ...
24
60
0.5875
import flow from flow.module import Module, Linear from flow.optim import SGD from flow import function as F import numpy as np class Net(Module): def __init__(self): super().__init__() self.fc1 = Linear(2, 10) self.fc2 = Linear(10, 1) def forward(self, a): x = self.fc1(a) ...
true
true
f71ee7a978b5915f4678383805f77825d8dc0762
18,825
py
Python
mindarmour/fuzz_testing/model_coverage_metrics.py
hboshnak/mindarmour
0609a4eaea875a84667bed279add9305752880cc
[ "Apache-2.0" ]
null
null
null
mindarmour/fuzz_testing/model_coverage_metrics.py
hboshnak/mindarmour
0609a4eaea875a84667bed279add9305752880cc
[ "Apache-2.0" ]
null
null
null
mindarmour/fuzz_testing/model_coverage_metrics.py
hboshnak/mindarmour
0609a4eaea875a84667bed279add9305752880cc
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
45.691748
120
0.65259
from abc import abstractmethod from collections import defaultdict import math import numpy as np from mindspore import Tensor from mindspore import Model from mindspore.train.summary.summary_record import _get_summary_tensor_data from mindarmour.utils._check_param import check_model, check_numpy_param, ...
true
true
f71ee84796075a987a34679b0f4402f426c24334
2,327
py
Python
main.py
Shikhar1998/Basic-Facebook-Notifications-Informer-
575e3446656697c071739e3ccc65764c5ac1e5ec
[ "MIT" ]
1
2017-01-13T11:10:16.000Z
2017-01-13T11:10:16.000Z
main.py
Shikhar1998/Basic-Facebook-Notifications-Informer-
575e3446656697c071739e3ccc65764c5ac1e5ec
[ "MIT" ]
null
null
null
main.py
Shikhar1998/Basic-Facebook-Notifications-Informer-
575e3446656697c071739e3ccc65764c5ac1e5ec
[ "MIT" ]
null
null
null
import urllib import urllib2 import time import json #install using facebook-sdk" import facebook def main(): access = "https://graph.facebook.com/" ACCESS_TOKEN = XXXXXXXXXXXXX #enter your access token here datafile = urllib2.urlopen(access + 'me?fields=feed&access_token='+ACCESS_TOKEN) sigma...
30.618421
100
0.421573
import urllib import urllib2 import time import json import facebook def main(): access = "https://graph.facebook.com/" ACCESS_TOKEN = XXXXXXXXXXXXX #enter your access token here datafile = urllib2.urlopen(access + 'me?fields=feed&access_token='+ACCESS_TOKEN) sigma = 0 try: fo =...
true
true
f71ee856c8feca44b1ac13c75d39f7729b50ec80
753
py
Python
setup.py
quiquee/python-bip32
c8d04eb7d25320d93ae5d05f9c6415b70d56b97f
[ "BSD-3-Clause" ]
28
2020-02-13T18:04:57.000Z
2022-03-14T05:27:18.000Z
setup.py
quiquee/python-bip32
c8d04eb7d25320d93ae5d05f9c6415b70d56b97f
[ "BSD-3-Clause" ]
15
2020-02-14T14:36:22.000Z
2022-03-10T11:43:32.000Z
setup.py
quiquee/python-bip32
c8d04eb7d25320d93ae5d05f9c6415b70d56b97f
[ "BSD-3-Clause" ]
11
2020-05-21T16:35:48.000Z
2022-03-28T20:37:30.000Z
from setuptools import setup import bip32 import io with io.open("README.md", encoding="utf-8") as f: long_description = f.read() with io.open("requirements.txt", encoding="utf-8") as f: requirements = [r for r in f.read().split('\n') if len(r)] setup(name="bip32", version=bip32.__version__, des...
31.375
83
0.686587
from setuptools import setup import bip32 import io with io.open("README.md", encoding="utf-8") as f: long_description = f.read() with io.open("requirements.txt", encoding="utf-8") as f: requirements = [r for r in f.read().split('\n') if len(r)] setup(name="bip32", version=bip32.__version__, des...
true
true
f71ee911da76fff248edaa53f5ef983542823256
1,003
py
Python
degvabank/degvabank/core/admin.py
Vixx-X/DEGVABanck-backend
de413d55b55dba25e89b7f3bc60dfa94e89ddcde
[ "MIT" ]
null
null
null
degvabank/degvabank/core/admin.py
Vixx-X/DEGVABanck-backend
de413d55b55dba25e89b7f3bc60dfa94e89ddcde
[ "MIT" ]
null
null
null
degvabank/degvabank/core/admin.py
Vixx-X/DEGVABanck-backend
de413d55b55dba25e89b7f3bc60dfa94e89ddcde
[ "MIT" ]
1
2022-02-03T03:18:43.000Z
2022-02-03T03:18:43.000Z
from django.contrib.admin import AdminSite from django.contrib.admin.apps import AdminConfig from django.urls import path class CustomAdminSite(AdminSite): def get_urls(self): from degvabank.core import views urls = super().get_urls() my_urls = [ path( 'reports/...
30.393939
73
0.57328
from django.contrib.admin import AdminSite from django.contrib.admin.apps import AdminConfig from django.urls import path class CustomAdminSite(AdminSite): def get_urls(self): from degvabank.core import views urls = super().get_urls() my_urls = [ path( 'reports/...
true
true
f71eea01e30f1d3cf1b00ffad3c1feb94073a3fe
10,231
py
Python
dev/dev.py
glryanon/Trusty-cogs
1d5056ad166a7e7ee5039baa31748b1995ae81f6
[ "MIT" ]
1
2020-12-28T15:58:16.000Z
2020-12-28T15:58:16.000Z
dev/dev.py
glryanon/Trusty-cogs
1d5056ad166a7e7ee5039baa31748b1995ae81f6
[ "MIT" ]
null
null
null
dev/dev.py
glryanon/Trusty-cogs
1d5056ad166a7e7ee5039baa31748b1995ae81f6
[ "MIT" ]
null
null
null
import asyncio import inspect import io import textwrap import traceback import re from contextlib import redirect_stdout from copy import copy import discord from redbot.core import checks, commands from redbot.core.i18n import Translator from redbot.core.utils.chat_formatting import box, pagify """ Notice: 95% of ...
32.274448
99
0.55498
import asyncio import inspect import io import textwrap import traceback import re from contextlib import redirect_stdout from copy import copy import discord from redbot.core import checks, commands from redbot.core.i18n import Translator from redbot.core.utils.chat_formatting import box, pagify _ = Translator("Dev...
true
true
f71eea68f5a737010440afc05bea9804d4dc0846
4,204
py
Python
python/jittor/test/test_argsort_op.py
Exusial/jittor
eca21d5bba5098bce4f492fa44908677b6e76588
[ "Apache-2.0" ]
2,571
2020-03-20T03:38:35.000Z
2022-03-31T08:20:05.000Z
python/jittor/test/test_argsort_op.py
Exusial/jittor
eca21d5bba5098bce4f492fa44908677b6e76588
[ "Apache-2.0" ]
197
2020-03-20T04:11:47.000Z
2022-03-31T10:14:24.000Z
python/jittor/test/test_argsort_op.py
Exusial/jittor
eca21d5bba5098bce4f492fa44908677b6e76588
[ "Apache-2.0" ]
284
2020-03-20T03:53:15.000Z
2022-03-28T07:20:32.000Z
# *************************************************************** # Copyright (c) 2021 Jittor. All Rights Reserved. # Maintainers: # Guoye Yang <498731903@qq.com> # Dun Liang <randonlang@gmail.com>. # # This file is subject to the terms and conditions defined in # file 'LICENSE.txt', which is part of this s...
33.903226
90
0.575642
import unittest import jittor as jt import numpy as np from jittor import compile_extern from .test_log import find_log_with_re if jt.has_cuda: from jittor.compile_extern import cublas_ops, cudnn_ops, cub_ops else: cublas_ops = cudnn_ops = cub_ops = None def check_argsort(shape, dim, descending = Fals...
true
true
f71eea94ed32d1472943ed5187bc14418db296ff
40,905
py
Python
gpMgmt/bin/gppylib/operations/buildMirrorSegments.py
abhisheknishant138/gpdb
1805743d505837026aa137cabb8a7072d745a129
[ "PostgreSQL", "Apache-2.0" ]
4
2017-11-28T08:12:58.000Z
2020-10-28T04:15:52.000Z
gpMgmt/bin/gppylib/operations/buildMirrorSegments.py
abhisheknishant138/gpdb
1805743d505837026aa137cabb8a7072d745a129
[ "PostgreSQL", "Apache-2.0" ]
null
null
null
gpMgmt/bin/gppylib/operations/buildMirrorSegments.py
abhisheknishant138/gpdb
1805743d505837026aa137cabb8a7072d745a129
[ "PostgreSQL", "Apache-2.0" ]
null
null
null
import datetime import os import pipes import signal import time from gppylib.mainUtils import * from gppylib.utils import checkNotNone from gppylib.db import dbconn from gppylib import gparray, gplog from gppylib.commands import unix from gppylib.commands import gp from gppylib.commands import base from gppylib.gpar...
45.652902
154
0.590661
import datetime import os import pipes import signal import time from gppylib.mainUtils import * from gppylib.utils import checkNotNone from gppylib.db import dbconn from gppylib import gparray, gplog from gppylib.commands import unix from gppylib.commands import gp from gppylib.commands import base from gppylib.gpar...
true
true
f71eeb544fc08fe949ef91f0ff9a44660507c8ee
6,583
py
Python
plycompiler/parse.py
kevinaangstadt/pushdown
8b085eea189a830ae73ea1c3b0de34d105010231
[ "BSD-3-Clause" ]
1
2017-12-13T15:15:21.000Z
2017-12-13T15:15:21.000Z
plycompiler/parse.py
kevinaangstadt/pushdown
8b085eea189a830ae73ea1c3b0de34d105010231
[ "BSD-3-Clause" ]
null
null
null
plycompiler/parse.py
kevinaangstadt/pushdown
8b085eea189a830ae73ea1c3b0de34d105010231
[ "BSD-3-Clause" ]
null
null
null
import ply.yacc as yacc # get the token map from the lexer from lex import tokens import sys import pushdown Pushdown = pushdown.Pushdown State = pushdown.State Rule = pushdown.Rule ParseState = pushdown.ParseState Production = pushdown.Production Shift = pushdown.Shift Reduce = pushdown.Reduce # Grammar # # file ...
23.765343
127
0.515874
import ply.yacc as yacc from lex import tokens import sys import pushdown Pushdown = pushdown.Pushdown State = pushdown.State Rule = pushdown.Rule ParseState = pushdown.ParseState Production = pushdown.Production Shift = pushdown.Shift Reduce = pushdown.Reduce terminals = ["<empty...
false
true
f71eecf30391d625a435cc49f57cec598c53b612
42,870
py
Python
great_expectations/execution_engine/sqlalchemy_execution_engine.py
joeltone/great_expectations
ea9d68c33d955c44e3da619b627fd66f070909ff
[ "Apache-2.0" ]
null
null
null
great_expectations/execution_engine/sqlalchemy_execution_engine.py
joeltone/great_expectations
ea9d68c33d955c44e3da619b627fd66f070909ff
[ "Apache-2.0" ]
null
null
null
great_expectations/execution_engine/sqlalchemy_execution_engine.py
joeltone/great_expectations
ea9d68c33d955c44e3da619b627fd66f070909ff
[ "Apache-2.0" ]
null
null
null
import copy import datetime import logging import traceback import warnings from pathlib import Path from typing import Any, Dict, Iterable, List, Optional, Tuple, Union from urllib.parse import urlparse from great_expectations._version import get_versions # isort:skip __version__ = get_versions()["version"] # isor...
40.519849
143
0.586937
import copy import datetime import logging import traceback import warnings from pathlib import Path from typing import Any, Dict, Iterable, List, Optional, Tuple, Union from urllib.parse import urlparse from great_expectations._version import get_versions __version__ = get_versions()["version"] del get_versions ...
true
true
f71eed9031059f80aef2fada7ae4f0a9856e325f
1,967
py
Python
Python/zc16 password.py
KIrayamoto/666
6b8f83312ea400fc6399da4d474ce9829059cfbf
[ "MIT" ]
2
2020-10-27T14:31:48.000Z
2022-03-05T10:27:47.000Z
Python/zc16 password.py
KIrayamoto/Program
b63cf5c614aa02bc59ea7e0c716282465823a1e6
[ "MIT" ]
1
2018-04-10T15:32:14.000Z
2018-04-28T10:36:18.000Z
Python/zc16 password.py
KIrayamoto/666
6b8f83312ea400fc6399da4d474ce9829059cfbf
[ "MIT" ]
null
null
null
import math a=str(input('输入一串数字或字母:',)) a=a.replace('a','01') a=a.replace('b','02') a=a.replace('c','03') a=a.replace('d','04') a=a.replace('e','05') a=a.replace('f','06') a=a.replace('g','07') a=a.replace('h','08') a=a.replace('i','09') a=a.replace('j','10') a=a.replace('k','11') a=a.replace('l','12') a=a.replace('m',...
22.101124
137
0.597356
import math a=str(input('输入一串数字或字母:',)) a=a.replace('a','01') a=a.replace('b','02') a=a.replace('c','03') a=a.replace('d','04') a=a.replace('e','05') a=a.replace('f','06') a=a.replace('g','07') a=a.replace('h','08') a=a.replace('i','09') a=a.replace('j','10') a=a.replace('k','11') a=a.replace('l','12') a=a.replace('m',...
true
true
f71eedd59815c48ae102ad9122ad01d977f6d026
4,679
py
Python
tests/test_typing_compat.py
PrettyWood/typingx
881b250da6e7629dce1e71efa153a5cfbfc9a13e
[ "MIT" ]
46
2021-02-01T02:06:01.000Z
2022-03-25T12:27:12.000Z
tests/test_typing_compat.py
PrettyWood/typing-extend
881b250da6e7629dce1e71efa153a5cfbfc9a13e
[ "MIT" ]
13
2021-02-14T13:16:32.000Z
2022-03-29T12:36:00.000Z
tests/test_typing_compat.py
PrettyWood/typingx
881b250da6e7629dce1e71efa153a5cfbfc9a13e
[ "MIT" ]
null
null
null
import collections import pytest from typingx import ( Annotated, Any, Callable, Collection, Constraints, Dict, FrozenSet, Generic, List, Listx, Literal, Mapping, NewType, NoneType, Optional, Sequence, Set, Tuple, Tuplex, Type, TypedD...
26.435028
98
0.518059
import collections import pytest from typingx import ( Annotated, Any, Callable, Collection, Constraints, Dict, FrozenSet, Generic, List, Listx, Literal, Mapping, NewType, NoneType, Optional, Sequence, Set, Tuple, Tuplex, Type, TypedD...
true
true
f71eef5e3b50cc1a621eae8d1fbd631562a1ba66
11,433
py
Python
examples/roberta_coarsness_NER_CRF_train.py
6666ev/bert_seq2seq
caa9b6c5629ae5783c733aebbbcf669d8ab5dde2
[ "Apache-2.0" ]
795
2020-03-13T10:16:26.000Z
2022-03-30T02:07:57.000Z
examples/roberta_coarsness_NER_CRF_train.py
6666ev/bert_seq2seq
caa9b6c5629ae5783c733aebbbcf669d8ab5dde2
[ "Apache-2.0" ]
51
2020-03-23T09:09:45.000Z
2022-03-24T02:44:53.000Z
examples/roberta_coarsness_NER_CRF_train.py
6666ev/bert_seq2seq
caa9b6c5629ae5783c733aebbbcf669d8ab5dde2
[ "Apache-2.0" ]
152
2020-04-01T04:37:18.000Z
2022-03-31T03:22:14.000Z
## 粗粒度ner加crf层的例子 import torch from tqdm import tqdm import unicodedata import os import time from torch.utils.data import Dataset, DataLoader from bert_seq2seq import Tokenizer, load_chinese_base_vocab from bert_seq2seq import load_bert data_path = "./state_dict/corase_train_update.txt" vocab_path = "./state_dict/ro...
33.332362
498
0.542202
om tqdm import tqdm import unicodedata import os import time from torch.utils.data import Dataset, DataLoader from bert_seq2seq import Tokenizer, load_chinese_base_vocab from bert_seq2seq import load_bert data_path = "./state_dict/corase_train_update.txt" vocab_path = "./state_dict/roberta_wwm_vocab.txt" model_name ...
true
true
f71ef1685e3a5f1c9663866f64524d16649aeb78
3,206
py
Python
msgraph_async/common/tests/test_odata_query.py
blbuford/msgraph-async
c368fbef230a45d173e260775a693df456e60aa9
[ "MIT" ]
5
2021-02-28T08:54:09.000Z
2022-03-21T16:00:35.000Z
msgraph_async/common/tests/test_odata_query.py
blbuford/msgraph-async
c368fbef230a45d173e260775a693df456e60aa9
[ "MIT" ]
1
2021-04-01T16:16:11.000Z
2021-04-01T16:16:11.000Z
msgraph_async/common/tests/test_odata_query.py
blbuford/msgraph-async
c368fbef230a45d173e260775a693df456e60aa9
[ "MIT" ]
1
2021-03-31T22:50:19.000Z
2021-03-31T22:50:19.000Z
import unittest from msgraph_async.common.odata_query import * class TestODataQuery(unittest.TestCase): def setUp(self): pass @classmethod def setUpClass(cls): pass def get_instance(self): return ODataQuery() def test_empty_odata(self): i = self.get_instance() ...
26.278689
169
0.577979
import unittest from msgraph_async.common.odata_query import * class TestODataQuery(unittest.TestCase): def setUp(self): pass @classmethod def setUpClass(cls): pass def get_instance(self): return ODataQuery() def test_empty_odata(self): i = self.get_instance() ...
true
true
f71ef27549495f887aeb09772634895ce12eecb3
3,612
py
Python
src/backend/settings.py
HectorPulido/nlu-brain-api
1e0a3adbb7401b717d7b6ac13de75c761d1a87cf
[ "MIT" ]
3
2021-09-14T17:38:55.000Z
2022-01-02T06:06:57.000Z
src/backend/settings.py
HectorPulido/nlu-brain-api
1e0a3adbb7401b717d7b6ac13de75c761d1a87cf
[ "MIT" ]
null
null
null
src/backend/settings.py
HectorPulido/nlu-brain-api
1e0a3adbb7401b717d7b6ac13de75c761d1a87cf
[ "MIT" ]
null
null
null
""" Django settings for backend project. Generated by 'django-admin startproject' using Django 3.1.1. For more information on this file, see https://docs.djangoproject.com/en/3.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.1/ref/settings/ """ import os im...
26.364964
91
0.712071
import os import dj_database_url from pathlib import Path from chatbot.nlu_engine import NLUEngine BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = os.environ.get("SECRET_KEY", default="foo") DEBUG = int(os.environ.get("DEBUG", default=1)) ALLOWED_HOSTS = ["*"] # Application definition INST...
true
true
f71ef33a954ffb0394694494df32c893a8f5ed2a
3,335
py
Python
scripts/releaser_hooks.py
jmelloy/django-photologue
b0a3072e331cdbf2240db0b8a5a91f31c04fee64
[ "BSD-3-Clause" ]
1
2021-01-21T15:25:20.000Z
2021-01-21T15:25:20.000Z
scripts/releaser_hooks.py
jmelloy/django-photologue
b0a3072e331cdbf2240db0b8a5a91f31c04fee64
[ "BSD-3-Clause" ]
null
null
null
scripts/releaser_hooks.py
jmelloy/django-photologue
b0a3072e331cdbf2240db0b8a5a91f31c04fee64
[ "BSD-3-Clause" ]
null
null
null
import os import subprocess try: import polib except ImportError: print('Msg to the package releaser: prerelease hooks will not work as you have not installed polib.') raise import copy import codecs def prereleaser_before(data): """ 1. Run the unit tests one last time before we make a release. ...
38.77907
113
0.653073
import os import subprocess try: import polib except ImportError: print('Msg to the package releaser: prerelease hooks will not work as you have not installed polib.') raise import copy import codecs def prereleaser_before(data): print('Running unit tests.') subprocess.check_output(["python", "ex...
true
true
f71ef585eef7e5fc1bee36b16be5ea58999073c9
465
py
Python
Python/RotateArrayTest.py
TonnyL/Windary
39f85cdedaaf5b85f7ce842ecef975301fc974cf
[ "MIT" ]
205
2017-11-16T08:38:46.000Z
2022-03-06T05:50:03.000Z
Python/RotateArrayTest.py
santosh241/Windary
39f85cdedaaf5b85f7ce842ecef975301fc974cf
[ "MIT" ]
3
2018-04-10T10:17:52.000Z
2020-12-11T08:00:09.000Z
Python/RotateArrayTest.py
santosh241/Windary
39f85cdedaaf5b85f7ce842ecef975301fc974cf
[ "MIT" ]
28
2018-04-10T06:42:42.000Z
2021-09-14T14:15:39.000Z
from unittest import TestCase from RotateArray import RotateArray class TestRotateArray(TestCase): def test_rotate(self): ra = RotateArray() array0 = [1] ra.rotate(array0, 1) self.assertEqual(array0, [1]) array1 = [1, 2] ra.rotate(array1, 1) self.assertEq...
22.142857
55
0.565591
from unittest import TestCase from RotateArray import RotateArray class TestRotateArray(TestCase): def test_rotate(self): ra = RotateArray() array0 = [1] ra.rotate(array0, 1) self.assertEqual(array0, [1]) array1 = [1, 2] ra.rotate(array1, 1) self.assertEq...
true
true
f71ef5f561ecfaddb53695c882f1a617b5a5d0a2
1,413
py
Python
pyart/testing/sample_files.py
kmuehlbauer/pyart
4accda3fc02490d135373ad5b054899c6781e762
[ "OLDAP-2.6", "Python-2.0" ]
null
null
null
pyart/testing/sample_files.py
kmuehlbauer/pyart
4accda3fc02490d135373ad5b054899c6781e762
[ "OLDAP-2.6", "Python-2.0" ]
null
null
null
pyart/testing/sample_files.py
kmuehlbauer/pyart
4accda3fc02490d135373ad5b054899c6781e762
[ "OLDAP-2.6", "Python-2.0" ]
null
null
null
""" pyart.testing.sample_files ========================== Sample radar files in a number of formats. Many of these files are incomplete, they should only be used for testing, not production. .. autosummary:: :toctree: generated/ MDV_PPI_FILE MDV_RHI_FILE CFRADIAL_PPI_FILE CFRADIAL_RHI_FILE C...
33.642857
77
0.772116
import os DATA_PATH = os.path.join(os.path.dirname(__file__), 'data') MDV_PPI_FILE = os.path.join(DATA_PATH, 'example_mdv_ppi.mdv') MDV_RHI_FILE = os.path.join(DATA_PATH, 'example_mdv_rhi.mdv') CFRADIAL_PPI_FILE = os.path.join(DATA_PATH, 'example_cfradial_ppi.nc') CFRADIAL_RHI_FILE = os.path.join(DATA_PATH, 'example...
true
true
f71ef602df7023b9ceea5044b4fb1a54d0c1617e
4,760
py
Python
tests/problems/np/test_graphpartitioning.py
panaali/qubovert
d5ea46349d2a058954fb2cb06f559c0d3fb382c5
[ "Apache-2.0" ]
15
2020-07-10T20:46:50.000Z
2021-12-29T05:01:55.000Z
tests/problems/np/test_graphpartitioning.py
panaali/qubovert
d5ea46349d2a058954fb2cb06f559c0d3fb382c5
[ "Apache-2.0" ]
13
2020-06-12T22:37:59.000Z
2022-02-22T20:11:13.000Z
tests/problems/np/test_graphpartitioning.py
panaali/qubovert
d5ea46349d2a058954fb2cb06f559c0d3fb382c5
[ "Apache-2.0" ]
4
2020-05-13T06:02:38.000Z
2022-03-22T20:45:23.000Z
# Copyright 2020 Joseph T. Iosue # # 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...
27.514451
76
0.721218
from qubovert.problems import GraphPartitioning from qubovert.utils import ( solve_qubo_bruteforce, solve_quso_bruteforce, solve_pubo_bruteforce, solve_puso_bruteforce ) from numpy import allclose edges = {("a", "b"), ("a", "c"), ("c", "d"), ("b", "c"), ("e", "f"), ("d", "e")} problem ...
true
true
f71ef6adf9445440b9d5b44b2d38774311b99add
2,408
py
Python
geocode/latlons2llsoa.py
JackKelly/Geocode
b3cc89c7467384e41c5be6bcd80b36271cfc252c
[ "MIT" ]
8
2020-06-03T14:49:10.000Z
2021-05-23T19:50:23.000Z
geocode/latlons2llsoa.py
JackKelly/Geocode
b3cc89c7467384e41c5be6bcd80b36271cfc252c
[ "MIT" ]
7
2021-05-21T11:19:13.000Z
2022-03-04T13:20:11.000Z
geocode/latlons2llsoa.py
JackKelly/Geocode
b3cc89c7467384e41c5be6bcd80b36271cfc252c
[ "MIT" ]
2
2021-05-21T11:00:32.000Z
2021-06-15T13:58:55.000Z
#!/usr/bin/env python3 """ Load a list of lat/lons from a CSV file and reverse-geocode them to LLSOA. - Jamie Taylor <jamie.taylor@sheffield.ac.uk> - First Authored: 2020-04-16 """ import sys import os import argparse import time as TIME import pandas as pd from geocode import Geocoder, query_yes_no def parse_optio...
43
99
0.5951
import sys import os import argparse import time as TIME import pandas as pd from geocode import Geocoder, query_yes_no def parse_options(): parser = argparse.ArgumentParser(description=("This is a command line interface (CLI) for " "the latlons2llsoa.py module"...
true
true
f71ef86436cc76a69e74c61126c0c795ea593197
1,017
py
Python
Aulas Python/Aula016.py
RenanRibeiroDaSilva/Meu-Aprendizado-Python
280bf2ad132ae0d26255e70b894fa7dbb69a5d01
[ "MIT" ]
2
2021-05-21T23:17:44.000Z
2021-05-22T04:34:37.000Z
Aulas Python/Aula016.py
RenanRibeiroDaSilva/Meu-Aprendizado-Python
280bf2ad132ae0d26255e70b894fa7dbb69a5d01
[ "MIT" ]
null
null
null
Aulas Python/Aula016.py
RenanRibeiroDaSilva/Meu-Aprendizado-Python
280bf2ad132ae0d26255e70b894fa7dbb69a5d01
[ "MIT" ]
null
null
null
""" Aula - 016 - Tuplas""" # Teoria: # Variáveis compostas: ''' Tuplas, o que são?: Em uma explicação bem simples, é uma variável que guarda vários valores! As tuplas usam indexições para indentificar seu componentes internos! As tuplas são imultáveis! ''' # Parte prática: lanche = ('Hamb...
23.651163
98
0.656834
lanche = ('Hamburguer', 'Suco', 'Pizza', 'Pudim', 'Batata Frita') print(lanche[0]) print(lanche[1]) print(lanche[2]) print(lanche[3], '\n') for comida in lanche: print(f'Eu vou comer {comida}') print('Comi pra caramba\n') for cont in range(0, len(lanche)): print(f'Eu vou comer {lanche[cont]} na posição...
true
true
f71ef89a094d1be41d5d328cb9ace8e241cf546b
2,543
py
Python
examples/acoustics_2d_radial/1drad/setplot.py
navravi/amrclaw
727d98d243c521267c927f6fe107ba6f1155597b
[ "BSD-3-Clause" ]
16
2015-05-27T08:16:09.000Z
2022-01-21T06:36:24.000Z
examples/acoustics_2d_radial/1drad/setplot.py
navravi/amrclaw
727d98d243c521267c927f6fe107ba6f1155597b
[ "BSD-3-Clause" ]
107
2015-01-02T19:51:43.000Z
2021-11-24T03:35:32.000Z
examples/acoustics_2d_radial/1drad/setplot.py
BrisaDavis/amrclaw
c5cacdf00f1959e160ea5616cdf6ea7b6cd374f3
[ "BSD-3-Clause" ]
28
2015-01-10T00:03:56.000Z
2022-02-11T23:52:34.000Z
""" Set up the plot figures, axes, and items to be done for each frame. This module is imported by the plotting routines and then the function setplot is called to set the plot parameters. """ #-------------------------- def setplot(plotdata=None): #-------------------------- """ Specify what is...
31.012195
80
0.616201
def setplot(plotdata=None): if plotdata is None: from clawpack.visclaw.data import ClawPlotData plotdata = ClawPlotData() plotdata.clearfigures() plotfigure = plotdata.new_plotfigure(name='q[0]', figno=0) plotaxes = plotfigure.new_plotaxes() plotaxes.x...
true
true
f71ef8c3544ef60ba5a8d26863bc684e75fe233f
750
py
Python
cv2ools/cli.py
narumiruna/opencv-tools
444a2ec31e01d6dc023ad40a7187f493c91e7ce2
[ "MIT" ]
1
2019-12-20T08:33:09.000Z
2019-12-20T08:33:09.000Z
cv2ools/cli.py
narumiruna/opencv-tools
444a2ec31e01d6dc023ad40a7187f493c91e7ce2
[ "MIT" ]
1
2020-04-22T02:43:22.000Z
2020-06-08T04:14:52.000Z
cv2ools/cli.py
narumiruna/opencv-tools
444a2ec31e01d6dc023ad40a7187f493c91e7ce2
[ "MIT" ]
null
null
null
from pathlib import Path import click import cv2 from .core import VideoWriter @click.group() def cli(): pass @cli.command() @click.argument('image-dir') @click.option('-o', '--output', default=None) @click.option('--fps', default=60) def merge(image_dir, output, fps): r"""Create video from images""" ...
20.27027
93
0.642667
from pathlib import Path import click import cv2 from .core import VideoWriter @click.group() def cli(): pass @cli.command() @click.argument('image-dir') @click.option('-o', '--output', default=None) @click.option('--fps', default=60) def merge(image_dir, output, fps): image_extensions = ['.jpg', '.jpeg',...
true
true
f71ef8c9bc4b3379b8be5bf1c34f17b64744b949
1,716
py
Python
plugins/plugin_hevc/hevc_codec.py
G-AshwinKumar/experiment-notebook
aae1c5fb9ef8f84dce5d75989ed8975797282f37
[ "MIT" ]
null
null
null
plugins/plugin_hevc/hevc_codec.py
G-AshwinKumar/experiment-notebook
aae1c5fb9ef8f84dce5d75989ed8975797282f37
[ "MIT" ]
null
null
null
plugins/plugin_hevc/hevc_codec.py
G-AshwinKumar/experiment-notebook
aae1c5fb9ef8f84dce5d75989ed8975797282f37
[ "MIT" ]
null
null
null
import os from enb import icompression from enb.config import get_options options = get_options() class HEVC(icompression.WrapperCodec, icompression.LosslessCodec): def __init__(self, config_path=None, chroma_format="400"): config_path = config_path if config_path is not None \ else os.path.j...
46.378378
117
0.689977
import os from enb import icompression from enb.config import get_options options = get_options() class HEVC(icompression.WrapperCodec, icompression.LosslessCodec): def __init__(self, config_path=None, chroma_format="400"): config_path = config_path if config_path is not None \ else os.path.j...
true
true
f71ef8f8f357ec451ae6259a9f7e22daf2e0c8ec
221
py
Python
spec/fixtures/one.py
elarivie/atom-python-linter
54190a2817ada801849bee4cffca95bd75123573
[ "MIT" ]
5
2020-01-16T11:21:29.000Z
2021-05-23T03:32:49.000Z
spec/fixtures/one.py
elarivie/atom-python-linter
54190a2817ada801849bee4cffca95bd75123573
[ "MIT" ]
8
2020-01-16T11:44:26.000Z
2020-11-25T01:58:25.000Z
spec/fixtures/one.py
elarivie/atom-python-linter
54190a2817ada801849bee4cffca95bd75123573
[ "MIT" ]
2
2021-01-19T08:30:09.000Z
2021-04-19T07:50:26.000Z
"""This file contains by default (without config file) ONE lint message. for EVERY linter: - flake8 - mypy - pydocstyle - pylint """ X = lambda: 1 def one() -> int: """One. """ return one return 1
12.277778
72
0.597285
X = lambda: 1 def one() -> int: return one return 1
true
true
f71ef9c89f7f1d80f649b6d8f7720bf60c9f6349
9,850
py
Python
kornia/enhance/histogram.py
Ishticode/kornia
974abb43ec72d12dbd244a2fb247bbbab8498de0
[ "ECL-2.0", "Apache-2.0" ]
418
2018-10-02T22:31:36.000Z
2019-01-16T14:15:45.000Z
kornia/enhance/histogram.py
Ishticode/kornia
974abb43ec72d12dbd244a2fb247bbbab8498de0
[ "ECL-2.0", "Apache-2.0" ]
94
2019-01-17T22:10:45.000Z
2019-05-22T23:47:58.000Z
kornia/enhance/histogram.py
Ishticode/kornia
974abb43ec72d12dbd244a2fb247bbbab8498de0
[ "ECL-2.0", "Apache-2.0" ]
25
2018-10-02T22:50:04.000Z
2019-01-13T18:14:11.000Z
from typing import Optional, Tuple import torch def marginal_pdf( values: torch.Tensor, bins: torch.Tensor, sigma: torch.Tensor, epsilon: float = 1e-10 ) -> Tuple[torch.Tensor, torch.Tensor]: """Calculate the marginal probability distribution function of the input tensor based on the number of histogram ...
38.326848
116
0.63665
from typing import Optional, Tuple import torch def marginal_pdf( values: torch.Tensor, bins: torch.Tensor, sigma: torch.Tensor, epsilon: float = 1e-10 ) -> Tuple[torch.Tensor, torch.Tensor]: if not isinstance(values, torch.Tensor): raise TypeError(f"Input values type is not a torch.Tensor. Got {typ...
true
true
f71ef9efed3b82abc8f4e9d4d5ce1687926182ce
2,633
py
Python
util/annotate-image.py
sasile/openface
5946f37d6045820dfa4e81ba2baac719563abc87
[ "Apache-2.0" ]
31
2016-05-27T21:27:06.000Z
2021-07-19T16:11:43.000Z
util/annotate-image.py
sasile/openface
5946f37d6045820dfa4e81ba2baac719563abc87
[ "Apache-2.0" ]
2
2021-04-30T20:33:54.000Z
2022-02-11T03:39:24.000Z
util/annotate-image.py
sasile/openface
5946f37d6045820dfa4e81ba2baac719563abc87
[ "Apache-2.0" ]
20
2016-01-26T00:38:09.000Z
2020-02-06T18:51:55.000Z
#!/usr/bin/env python2 # # Copyright 2015-2016 Carnegie Mellon University # # 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 require...
34.644737
100
0.684011
import os import sys fileDir = os.path.dirname(os.path.realpath(__file__)) sys.path.append(os.path.join(fileDir, "..")) import argparse import cv2 from openface.alignment import NaiveDlib modelDir = os.path.join(fileDir, '..', 'models') dlibModelDir = os.path.join(modelDir, 'dlib') openfaceModel...
true
true
f71efa967077a2e3a9d5fff7e6ea1107f61cda2a
579
py
Python
arkav_is_api/quiz/migrations/0016_auto_20181214_0043.py
arkavidia5/arkav-is
6c6e8d091ead5bfff664d86f7903c62209800031
[ "MIT" ]
3
2018-10-01T16:30:15.000Z
2020-01-06T09:03:57.000Z
arkav_is_api/quiz/migrations/0016_auto_20181214_0043.py
arkavidia5/arkav-is
6c6e8d091ead5bfff664d86f7903c62209800031
[ "MIT" ]
4
2018-11-03T10:56:52.000Z
2020-04-26T06:54:16.000Z
arkav_is_api/quiz/migrations/0016_auto_20181214_0043.py
arkavidia5/arkav-is
6c6e8d091ead5bfff664d86f7903c62209800031
[ "MIT" ]
2
2018-09-26T16:28:01.000Z
2019-09-04T06:23:14.000Z
# Generated by Django 2.1.4 on 2018-12-13 17:43 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('quiz', '0015_auto_20181209_0433'), ] operations = [ migrations.AlterField( model_name='quizattempt', name='finish_ti...
24.125
62
0.592401
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('quiz', '0015_auto_20181209_0433'), ] operations = [ migrations.AlterField( model_name='quizattempt', name='finish_time', field=models.DateTimeField(bla...
true
true
f71efa9e075feb99d16e9b1180b94b2da938dc88
1,531
py
Python
batsky/batsky_sim.py
oar-team/batsky
3e9f14a4bdaac56d934c31f888858ac7a9f645c8
[ "BSD-3-Clause" ]
null
null
null
batsky/batsky_sim.py
oar-team/batsky
3e9f14a4bdaac56d934c31f888858ac7a9f645c8
[ "BSD-3-Clause" ]
null
null
null
batsky/batsky_sim.py
oar-team/batsky
3e9f14a4bdaac56d934c31f888858ac7a9f645c8
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import zmq import click import logging BATSIM_PORT = 28000 @click.command() @click.option('-d', '--debug', is_flag=True, help='Debug flag.') @click.option('-l', '--logfile', type=click.STRING, help='Specify log file.') @click.option('-c', '--controller', type=click.STR...
32.574468
104
0.639451
import zmq import click import logging BATSIM_PORT = 28000 @click.command() @click.option('-d', '--debug', is_flag=True, help='Debug flag.') @click.option('-l', '--logfile', type=click.STRING, help='Specify log file.') @click.option('-c', '--controller', type=click.STRING, help='Specify which hostname is the cont...
true
true
f71efbaaaabe7fbbea180e4b469c59a3c7315938
1,719
py
Python
spider/featurization/load_subclip_audio.py
Rosna/P4ML-UI
edf0dd830588f03b197e4d6532830a5aedd88424
[ "Apache-2.0" ]
1
2021-11-05T17:42:47.000Z
2021-11-05T17:42:47.000Z
spider/featurization/load_subclip_audio.py
Rosna/P4ML-UI
edf0dd830588f03b197e4d6532830a5aedd88424
[ "Apache-2.0" ]
null
null
null
spider/featurization/load_subclip_audio.py
Rosna/P4ML-UI
edf0dd830588f03b197e4d6532830a5aedd88424
[ "Apache-2.0" ]
2
2019-02-21T18:29:51.000Z
2019-09-02T21:21:26.000Z
import argparse import librosa import numpy as np def make_subclips(audio, sr, clip_size, pad=True): # Given a list of audio files and corresponding sample rates, # return a 2D list of subclips, each of size clip_size # Optional padding takes care of audio files shorter than clip size clips = [] fo...
33.705882
77
0.649215
import argparse import librosa import numpy as np def make_subclips(audio, sr, clip_size, pad=True): clips = [] for idx, a in enumerate(audio): step = int(sr[idx] * clip_size) overhang = len(a) % step if overhang != 0 and pad: a = np.concat...
true
true
f71efc7fd3ff76719e0c49a1d47b97d3eeeeef66
13,063
py
Python
systemvm/patches/debian/config/opt/cloud/bin/cs/CsRedundant.py
vispractice/cloudstack
d543e2aa2c05422559d866c8b2ae29c83bfd5da0
[ "Apache-2.0" ]
null
null
null
systemvm/patches/debian/config/opt/cloud/bin/cs/CsRedundant.py
vispractice/cloudstack
d543e2aa2c05422559d866c8b2ae29c83bfd5da0
[ "Apache-2.0" ]
null
null
null
systemvm/patches/debian/config/opt/cloud/bin/cs/CsRedundant.py
vispractice/cloudstack
d543e2aa2c05422559d866c8b2ae29c83bfd5da0
[ "Apache-2.0" ]
null
null
null
# -- coding: utf-8 -- # 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 # "Li...
40.193846
117
0.586695
import os import logging import CsHelper from CsFile import CsFile from CsProcess import CsProcess from CsApp import CsPasswdSvc from CsAddress import CsDevice import socket from time import sleep class CsRedundant(object): CS_RAMDISK_DIR = "/ramdisk" CS_PRIO_UP = 1 CS_PRIO_D...
false
true
f71efc84499c92428e12278751bbf13f4217a6f2
3,011
py
Python
pyrl/esper_ext.py
abesto/pyrl
34eb9843217ed5b557bff99ed66ef46b49b5c295
[ "MIT" ]
10
2019-12-03T03:59:41.000Z
2021-04-13T11:52:20.000Z
pyrl/esper_ext.py
abesto/pyrl
34eb9843217ed5b557bff99ed66ef46b49b5c295
[ "MIT" ]
1
2021-04-06T03:28:02.000Z
2021-05-31T09:34:48.000Z
pyrl/esper_ext.py
abesto/pyrl
34eb9843217ed5b557bff99ed66ef46b49b5c295
[ "MIT" ]
1
2019-12-03T02:50:02.000Z
2019-12-03T02:50:02.000Z
#!/usr/bin/env python from typing import Any, Dict, Optional, Type, TypeVar import esper # type: ignore import tabulate T = TypeVar("T") class WorldExt(esper.World): def __init__(self, timed=False): super(WorldExt, self).__init__(timed) self.resources: Dict = {} def _process(self, *args, ...
33.087912
81
0.659582
from typing import Any, Dict, Optional, Type, TypeVar import esper import tabulate T = TypeVar("T") class WorldExt(esper.World): def __init__(self, timed=False): super(WorldExt, self).__init__(timed) self.resources: Dict = {} def _process(self, *args, **kwargs): for processor in...
true
true
f71efc870b7a9b185f58cab460182c3571267535
1,288
py
Python
savu/test/travis/plugin_tests/filter_tests/hilbert_test.py
malte-storm/Savu
16291e8a22464c50c511af01fbc648860c1236e6
[ "Apache-2.0" ]
1
2021-04-18T09:30:54.000Z
2021-04-18T09:30:54.000Z
savu/test/travis/plugin_tests/filter_tests/hilbert_test.py
reubenlindroos/Savu
4bf93b818df41fc8c231b23f48393cb8fa00255d
[ "Apache-2.0" ]
null
null
null
savu/test/travis/plugin_tests/filter_tests/hilbert_test.py
reubenlindroos/Savu
4bf93b818df41fc8c231b23f48393cb8fa00255d
[ "Apache-2.0" ]
1
2021-05-20T16:31:29.000Z
2021-05-20T16:31:29.000Z
# Copyright 2014 Diamond Light Source Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
33.025641
78
0.726708
import unittest from savu.test import test_utils as tu from savu.test.travis.framework_tests.plugin_runner_test import \ run_protected_plugin_runner class HilbertTest(unittest.TestCase): def test_hilbert(self): data_file = tu.get_test_data_path('24737.nxs') process_file = tu.ge...
true
true
f71efcff616f3335a8fa825beb91566c27a20f16
35,204
py
Python
tests/model_fields/test_jsonfield.py
kevinmarsh/django
00a1d42bf0d83ba4b329271433eb5e3fd0f704fe
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
null
null
null
tests/model_fields/test_jsonfield.py
kevinmarsh/django
00a1d42bf0d83ba4b329271433eb5e3fd0f704fe
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
null
null
null
tests/model_fields/test_jsonfield.py
kevinmarsh/django
00a1d42bf0d83ba4b329271433eb5e3fd0f704fe
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
null
null
null
import operator import uuid from unittest import mock from django import forms from django.core import serializers from django.core.exceptions import ValidationError from django.core.serializers.json import DjangoJSONEncoder from django.db import ( DataError, IntegrityError, NotSupportedError, OperationalError, co...
38.306855
100
0.572293
import operator import uuid from unittest import mock from django import forms from django.core import serializers from django.core.exceptions import ValidationError from django.core.serializers.json import DjangoJSONEncoder from django.db import ( DataError, IntegrityError, NotSupportedError, OperationalError, co...
true
true
f71efd99812e463f3811b77ce6cfe3ce1b3d6a49
26,107
py
Python
run_manager.py
Johnzhjw/CIT2FR-FL-NAS
53e93075ff1834ab817ad6359025ddafd20e6ef4
[ "Apache-2.0" ]
null
null
null
run_manager.py
Johnzhjw/CIT2FR-FL-NAS
53e93075ff1834ab817ad6359025ddafd20e6ef4
[ "Apache-2.0" ]
null
null
null
run_manager.py
Johnzhjw/CIT2FR-FL-NAS
53e93075ff1834ab817ad6359025ddafd20e6ef4
[ "Apache-2.0" ]
null
null
null
# Once for All: Train One Network and Specialize it for Efficient Deployment # Han Cai, Chuang Gan, Tianzhe Wang, Zhekai Zhang, Song Han # International Conference on Learning Representations (ICLR), 2020. import os import time import json import math from tqdm import tqdm import numpy as np import copy import torc...
40.792188
131
0.569847
import os import time import json import math from tqdm import tqdm import numpy as np import copy import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.optim import torchvision from ofa.imagenet_codebase.utils import count_parameters, ...
true
true
f71efda83eac0f41becf83c63eefaf707a80c70d
1,677
py
Python
junior_class/chapter-7-Recommendation_System/code/examples/7-5-1-read-feature.py
wwhio/awesome-DeepLearning
2cc92edcf0c22bdfc670c537cc819c8fadf33fac
[ "Apache-2.0" ]
1,150
2021-06-01T03:44:21.000Z
2022-03-31T13:43:42.000Z
junior_class/chapter-7-Recommendation_System/code/examples/7-5-1-read-feature.py
wwhio/awesome-DeepLearning
2cc92edcf0c22bdfc670c537cc819c8fadf33fac
[ "Apache-2.0" ]
358
2021-06-01T03:58:47.000Z
2022-03-28T02:55:00.000Z
junior_class/chapter-7-Recommendation_System/code/examples/7-5-1-read-feature.py
wwhio/awesome-DeepLearning
2cc92edcf0c22bdfc670c537cc819c8fadf33fac
[ "Apache-2.0" ]
502
2021-05-31T12:52:14.000Z
2022-03-31T02:51:41.000Z
# copyright (c) 2021 PaddlePaddle Authors. All Rights Reserve. # # 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...
27.048387
74
0.700656
import pickle import numpy as np mov_feat_dir = 'mov_feat.pkl' usr_feat_dir = 'usr_feat.pkl' usr_feats = pickle.load(open(usr_feat_dir, 'rb')) mov_feats = pickle.load(open(mov_feat_dir, 'rb')) usr_id = 2 usr_feat = usr_feats[str(usr_id)] mov_id = 1 mov_feat = mov_feats[str(mov_id)] movie_data_p...
true
true
f71efe24cfefd8f04e8fa9c7fd40b5e0927fd058
2,592
py
Python
tests/test_nlp.py
dhimmel/sematch
7e92b171c27a8b25e844a467554fe4bb2adfb883
[ "Apache-2.0" ]
397
2015-05-30T11:02:28.000Z
2022-03-09T01:39:31.000Z
tests/test_nlp.py
dhimmel/sematch
7e92b171c27a8b25e844a467554fe4bb2adfb883
[ "Apache-2.0" ]
32
2015-04-27T21:26:29.000Z
2021-08-19T10:20:45.000Z
tests/test_nlp.py
dhimmel/sematch
7e92b171c27a8b25e844a467554fe4bb2adfb883
[ "Apache-2.0" ]
110
2015-11-06T17:01:48.000Z
2022-02-17T05:09:02.000Z
def test_extraction(): from sematch.nlp import Extraction from sematch.semantic.sparql import EntityFeatures upm = EntityFeatures().features('http://dbpedia.org/resource/Technical_University_of_Madrid') extract = Extraction() assert extract.extract_nouns(upm['abstract']) is not None assert ext...
39.272727
134
0.745756
def test_extraction(): from sematch.nlp import Extraction from sematch.semantic.sparql import EntityFeatures upm = EntityFeatures().features('http://dbpedia.org/resource/Technical_University_of_Madrid') extract = Extraction() assert extract.extract_nouns(upm['abstract']) is not None assert ext...
false
true
f71efe60dc3fc3f41673c6e0e26600a1eb10b27b
102,638
py
Python
models/models.py
sharabeshj/course-editor-test
9af15d10ef1f039fdf5758134a7cb72384ccf3f5
[ "Apache-2.0" ]
1
2021-01-06T17:58:30.000Z
2021-01-06T17:58:30.000Z
models/models.py
priyankagohil/coursebuilder-assessment
559e867a2a846dd773471c6bc76cf6005a57098f
[ "Apache-2.0" ]
null
null
null
models/models.py
priyankagohil/coursebuilder-assessment
559e867a2a846dd773471c6bc76cf6005a57098f
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
36.946724
80
0.639822
"""Core data model classes.""" __author__ = 'Pavel Simakov (psimakov@google.com)' import collections import copy import datetime import logging import os import sys import time import webapp2 import jinja2 import config import counters from counters import PerfCounter from entities import BaseEntity f...
false
true
f71efea9b7b1591329208d4b70a055688fc34558
4,175
py
Python
wrapper.py
crsqq/OpenNE
0cecb2b5076b878d2f07ed1130682aeab6ce37f1
[ "MIT" ]
null
null
null
wrapper.py
crsqq/OpenNE
0cecb2b5076b878d2f07ed1130682aeab6ce37f1
[ "MIT" ]
null
null
null
wrapper.py
crsqq/OpenNE
0cecb2b5076b878d2f07ed1130682aeab6ce37f1
[ "MIT" ]
null
null
null
from OpenNE.src.libnrl import graph from OpenNE.src.libnrl import grarep from OpenNE.src.libnrl import line from OpenNE.src.libnrl import node2vec from OpenNE.src.libnrl.gcn import gcnAPI from itertools import product import networkx as nx import numpy as np import tensorflow as tf def nx_to_openne_graph(nxgraph, stri...
33.134921
109
0.668982
from OpenNE.src.libnrl import graph from OpenNE.src.libnrl import grarep from OpenNE.src.libnrl import line from OpenNE.src.libnrl import node2vec from OpenNE.src.libnrl.gcn import gcnAPI from itertools import product import networkx as nx import numpy as np import tensorflow as tf def nx_to_openne_graph(nxgraph, stri...
true
true
f71eff5ae0a308b7cbc26231bed0d1f82d0ac6ae
4,630
py
Python
examples/dfp/v201802/native_style_service/create_native_styles.py
christineyi3898/googleads-python-lib
cd707dc897b93cf1bbb19355f7424e7834e7fb55
[ "Apache-2.0" ]
1
2019-10-21T04:10:22.000Z
2019-10-21T04:10:22.000Z
examples/dfp/v201802/native_style_service/create_native_styles.py
christineyi3898/googleads-python-lib
cd707dc897b93cf1bbb19355f7424e7834e7fb55
[ "Apache-2.0" ]
null
null
null
examples/dfp/v201802/native_style_service/create_native_styles.py
christineyi3898/googleads-python-lib
cd707dc897b93cf1bbb19355f7424e7834e7fb55
[ "Apache-2.0" ]
1
2019-10-21T04:10:51.000Z
2019-10-21T04:10:51.000Z
#!/usr/bin/env python # # Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
25.58011
79
0.641685
import uuid from googleads import dfp CREATIVE_TEMPLATE_ID = 10004400 WIDTH = 300 HEIGHT = 345 HTML_SNIPPET = """<div id="adunit" style="overflow: hidden;"> <img src="[%Thirdpartyimpressiontracker%]" style="display:none"> <div class="attribution">Ad</div> <div class="image"> <a cla...
true
true