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
f7f7334d1c20c11af6d89fb9cc93933ed93f73a1
1,692
py
Python
Machine Learning A-Z/Part 7 - Natural Language Processing/Section 36 - Natural Language Processing/natural_language_processing.py
lifehouse11amber2/Machine-Learning-A-Z-hands-on-Python-And-R-in-data-Science
6ae9d490466546405517c07406526a4f3fcd9710
[ "MIT" ]
23
2020-05-29T08:38:03.000Z
2022-02-25T20:43:09.000Z
Machine Learning A-Z/Part 7 - Natural Language Processing/Section 36 - Natural Language Processing/natural_language_processing.py
garciamilord/Machine-Learning-A-Z-hands-on-Python-And-R-in-data-Science
d804e7eeace1e5187b156b2fa3e71125b2a3448a
[ "MIT" ]
null
null
null
Machine Learning A-Z/Part 7 - Natural Language Processing/Section 36 - Natural Language Processing/natural_language_processing.py
garciamilord/Machine-Learning-A-Z-hands-on-Python-And-R-in-data-Science
d804e7eeace1e5187b156b2fa3e71125b2a3448a
[ "MIT" ]
22
2020-12-05T15:14:43.000Z
2022-03-12T23:28:49.000Z
# Natural Language Processing # Importing the libraries import numpy as np import matplotlib.pyplot as plt import pandas as pd # Importing the dataset dataset = pd.read_csv('Restaurant_Reviews.tsv', delimiter = '\t', quoting = 3) # Cleaning the texts import re import nltk nltk.download('stopwords') from nltk.corpus ...
26.030769
94
0.735225
import numpy as np import matplotlib.pyplot as plt import pandas as pd dataset = pd.read_csv('Restaurant_Reviews.tsv', delimiter = '\t', quoting = 3) import re import nltk nltk.download('stopwords') from nltk.corpus import stopwords from nltk.stem.porter import PorterStemmer corpus = [] for i in range(0, 1000): ...
true
true
f7f7357fab8832ac539d527238dda69853cd1514
1,184
py
Python
Back/user/forms.py
BUYA-GH/heavenhold
1814e12a4071f3e6ebd2920ab22718beb4e511ca
[ "Apache-2.0" ]
null
null
null
Back/user/forms.py
BUYA-GH/heavenhold
1814e12a4071f3e6ebd2920ab22718beb4e511ca
[ "Apache-2.0" ]
null
null
null
Back/user/forms.py
BUYA-GH/heavenhold
1814e12a4071f3e6ebd2920ab22718beb4e511ca
[ "Apache-2.0" ]
null
null
null
from django import forms from django.contrib.auth.forms import ReadOnlyPasswordHashField from .models import User class UserCreationForm(forms.ModelForm): password1 = forms.CharField(label='Password',widget=forms.PasswordInput) password2 = forms.CharField(label='Password confirmation',widget=forms.PasswordInp...
32.888889
89
0.678209
from django import forms from django.contrib.auth.forms import ReadOnlyPasswordHashField from .models import User class UserCreationForm(forms.ModelForm): password1 = forms.CharField(label='Password',widget=forms.PasswordInput) password2 = forms.CharField(label='Password confirmation',widget=forms.PasswordInp...
true
true
f7f736ac5c0500a5ccbc31d0b4a87511d470887c
2,600
py
Python
examples/dagster_examples/intro_tutorial/serialization_strategy.py
naralogics/dagster
16d599daa380b800149474fcaff2311b3f8f269a
[ "Apache-2.0" ]
null
null
null
examples/dagster_examples/intro_tutorial/serialization_strategy.py
naralogics/dagster
16d599daa380b800149474fcaff2311b3f8f269a
[ "Apache-2.0" ]
null
null
null
examples/dagster_examples/intro_tutorial/serialization_strategy.py
naralogics/dagster
16d599daa380b800149474fcaff2311b3f8f269a
[ "Apache-2.0" ]
null
null
null
import csv from dagster import ( Selector, SerializationStrategy, execute_pipeline, input_hydration_config, pipeline, solid, usable_as_dagster_type, ) class CsvSerializationStrategy(SerializationStrategy): def __init__(self): super(CsvSerializationStrategy, self).__init__( ...
27.659574
75
0.68
import csv from dagster import ( Selector, SerializationStrategy, execute_pipeline, input_hydration_config, pipeline, solid, usable_as_dagster_type, ) class CsvSerializationStrategy(SerializationStrategy): def __init__(self): super(CsvSerializationStrategy, self).__init__( ...
true
true
f7f7374ec3cb970060e338dbf2c44fef2ca8280c
1,134
py
Python
tests/storage/cases/test_KT1VHqKm6KjUqspTAmWiBJbTDBjbn8PAfGvr.py
juztin/pytezos-1
7e608ff599d934bdcf129e47db43dbdb8fef9027
[ "MIT" ]
1
2021-05-20T16:52:08.000Z
2021-05-20T16:52:08.000Z
tests/storage/cases/test_KT1VHqKm6KjUqspTAmWiBJbTDBjbn8PAfGvr.py
juztin/pytezos-1
7e608ff599d934bdcf129e47db43dbdb8fef9027
[ "MIT" ]
1
2020-12-30T16:44:56.000Z
2020-12-30T16:44:56.000Z
tests/storage/cases/test_KT1VHqKm6KjUqspTAmWiBJbTDBjbn8PAfGvr.py
juztin/pytezos-1
7e608ff599d934bdcf129e47db43dbdb8fef9027
[ "MIT" ]
1
2022-03-20T19:01:00.000Z
2022-03-20T19:01:00.000Z
from unittest import TestCase from tests import get_data from pytezos.michelson.converter import build_schema, decode_micheline, encode_micheline, micheline_to_michelson class StorageTestKT1VHqKm6KjUqspTAmWiBJbTDBjbn8PAfGvr(TestCase): @classmethod def setUpClass(cls): cls.maxDiff = None cls....
40.5
112
0.749559
from unittest import TestCase from tests import get_data from pytezos.michelson.converter import build_schema, decode_micheline, encode_micheline, micheline_to_michelson class StorageTestKT1VHqKm6KjUqspTAmWiBJbTDBjbn8PAfGvr(TestCase): @classmethod def setUpClass(cls): cls.maxDiff = None cls....
true
true
f7f73815845e4a757af05db650704b3bfcd93c76
1,683
py
Python
migrations/versions/000000000000_create_table_checksum_and_logs.py
brighthive/data-resource-api
a012fc0743f1ce2b72ddacf348c57adf44245cfa
[ "MIT" ]
4
2019-02-14T01:07:54.000Z
2019-11-04T17:28:35.000Z
migrations/versions/000000000000_create_table_checksum_and_logs.py
brighthive/data-resource-api
a012fc0743f1ce2b72ddacf348c57adf44245cfa
[ "MIT" ]
39
2019-05-30T22:08:46.000Z
2022-02-17T02:47:00.000Z
migrations/versions/000000000000_create_table_checksum_and_logs.py
brighthive/data-resource-api
a012fc0743f1ce2b72ddacf348c57adf44245cfa
[ "MIT" ]
1
2020-04-29T18:16:20.000Z
2020-04-29T18:16:20.000Z
"""Create table checksum_and_logs Revision ID: c84467455016 Revises: Create Date: 2020-02-14 20:31:39.065035 """ import sqlalchemy as sa from alembic import op from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = "000000000000" down_revision = None branch_labels = None depend...
31.166667
85
0.639929
import sqlalchemy as sa from alembic import op from sqlalchemy.dialects import postgresql revision = "000000000000" down_revision = None branch_labels = None depends_on = None def upgrade(): sa.Column("date_modified", sa.DateTime(), nullable=True), sa.Column( "descriptor_json", postgresql...
true
true
f7f73831b920f239d1f4fcf6d18367f2ef00498c
908
py
Python
dnafrag/tests/test_vplot_end_to_end.py
kundajelab/dnafrag
3c6cb2c585fc35aa1882dcff2f171cbc9020c091
[ "BSD-3-Clause" ]
1
2021-03-11T07:57:10.000Z
2021-03-11T07:57:10.000Z
dnafrag/tests/test_vplot_end_to_end.py
DebadityaPal/dnafrag
f9703ac84c740e122cb07c5e4c6f7b871ac1b0ee
[ "BSD-3-Clause" ]
null
null
null
dnafrag/tests/test_vplot_end_to_end.py
DebadityaPal/dnafrag
f9703ac84c740e122cb07c5e4c6f7b871ac1b0ee
[ "BSD-3-Clause" ]
null
null
null
import os import numpy as np import dnafrag MODULE_BASE_PATH = os.path.abspath(os.path.dirname(dnafrag.__file__)) FRAGBED_PATH = os.path.join(MODULE_BASE_PATH, "tests/test_fragbed_100k.fragbed.gz") CHRSZ_PATH = os.path.join(MODULE_BASE_PATH, "tests/test_fragbed_hg19.chrom.sizes") def test_vplot_end_to_end(tmpdir)...
25.942857
88
0.665198
import os import numpy as np import dnafrag MODULE_BASE_PATH = os.path.abspath(os.path.dirname(dnafrag.__file__)) FRAGBED_PATH = os.path.join(MODULE_BASE_PATH, "tests/test_fragbed_100k.fragbed.gz") CHRSZ_PATH = os.path.join(MODULE_BASE_PATH, "tests/test_fragbed_hg19.chrom.sizes") def test_vplot_end_to_end(tmpdir)...
true
true
f7f738a5e023eec6d4eec09d9dfdcba6df63c765
1,141
py
Python
hard-gists/777789/snippet.py
jjhenkel/dockerizeme
eaa4fe5366f6b9adf74399eab01c712cacaeb279
[ "Apache-2.0" ]
21
2019-07-08T08:26:45.000Z
2022-01-24T23:53:25.000Z
hard-gists/777789/snippet.py
jjhenkel/dockerizeme
eaa4fe5366f6b9adf74399eab01c712cacaeb279
[ "Apache-2.0" ]
5
2019-06-15T14:47:47.000Z
2022-02-26T05:02:56.000Z
hard-gists/777789/snippet.py
jjhenkel/dockerizeme
eaa4fe5366f6b9adf74399eab01c712cacaeb279
[ "Apache-2.0" ]
17
2019-05-16T03:50:34.000Z
2021-01-14T14:35:12.000Z
# -*- coding:utf-8 -*- import re import urllib2 from lib.BeautifulSoup import BeautifulSoup agent="""Sosospider+(+http://help.soso.com/webspider.htm)""" blog_url = 'http://blog.sina.com.cn/s/articlelist_1517582220_0_1.html' spider_handle = urllib2.urlopen(blog_url) blog_content = spider_handle.read() soup = Beautiful...
33.558824
74
0.675723
import re import urllib2 from lib.BeautifulSoup import BeautifulSoup agent="""Sosospider+(+http://help.soso.com/webspider.htm)""" blog_url = 'http://blog.sina.com.cn/s/articlelist_1517582220_0_1.html' spider_handle = urllib2.urlopen(blog_url) blog_content = spider_handle.read() soup = BeautifulSoup(blog_content, fro...
false
true
f7f738e8584f0ec5c8b3d8c314118027dfd488de
2,215
bzl
Python
deps/core/repository.bzl
y0psolo/YAD
0f1f9c5140687345dee591667793d6f8ed6e29e5
[ "Apache-2.0" ]
1
2021-11-05T09:13:57.000Z
2021-11-05T09:13:57.000Z
deps/core/repository.bzl
y0psolo/YAD
0f1f9c5140687345dee591667793d6f8ed6e29e5
[ "Apache-2.0" ]
9
2021-12-02T13:25:52.000Z
2022-01-26T14:24:05.000Z
deps/core/repository.bzl
y0psolo/YAD
0f1f9c5140687345dee591667793d6f8ed6e29e5
[ "Apache-2.0" ]
null
null
null
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file") load(":ubuntu_focal_amd64.bzl", "ubuntu_focal_amd64") load(":ubuntu_focal_arm64.bzl", "ubuntu_focal_arm64") load(":ubuntu_bionic_amd64.bzl", "ubuntu_bionic_amd64") load(":ubuntu_bionic_arm64.bzl", "ubuntu_bionic_arm64") def core_repository(): # Ubun...
36.916667
116
0.695711
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file") load(":ubuntu_focal_amd64.bzl", "ubuntu_focal_amd64") load(":ubuntu_focal_arm64.bzl", "ubuntu_focal_arm64") load(":ubuntu_bionic_amd64.bzl", "ubuntu_bionic_amd64") load(":ubuntu_bionic_arm64.bzl", "ubuntu_bionic_arm64") def core_repository(): h...
true
true
f7f7390e07b6cc7e6cd311651787c896d95584ec
5,544
py
Python
oauth_dropins/medium.py
ravenscroftj/oauth-dropins
59cc4bfc8157142249c5eb561b1f665da560e6c1
[ "Unlicense" ]
null
null
null
oauth_dropins/medium.py
ravenscroftj/oauth-dropins
59cc4bfc8157142249c5eb561b1f665da560e6c1
[ "Unlicense" ]
null
null
null
oauth_dropins/medium.py
ravenscroftj/oauth-dropins
59cc4bfc8157142249c5eb561b1f665da560e6c1
[ "Unlicense" ]
null
null
null
"""Medium OAuth drop-in. API docs: https://github.com/Medium/medium-api-docs#contents https://medium.com/developers/welcome-to-the-medium-api-3418f956552 Medium doesn't let you use a localhost redirect URL. :/ A common workaround is to map an arbitrary host to localhost in your /etc/hosts, e.g.: 127.0.0.1 my.dev.com...
32.421053
104
0.701659
import logging import urllib.parse from flask import request from google.cloud import ndb from . import views from .models import BaseAuth from .webutil import flask_util, util from .webutil.util import json_dumps, json_loads MEDIUM_CLIENT_ID = util.read('medium_client_id') MEDIUM_CLIENT_SECRET = util.read('medium_c...
true
true
f7f7394e504d7d329c52bef00fe2a3781ebcba3a
7,265
py
Python
bigbench/models/json_rpc_model.py
dimmollo/BIG-bench
f0dffeb4f16ef5489686a81e2d63362d251cda3e
[ "Apache-2.0" ]
null
null
null
bigbench/models/json_rpc_model.py
dimmollo/BIG-bench
f0dffeb4f16ef5489686a81e2d63362d251cda3e
[ "Apache-2.0" ]
null
null
null
bigbench/models/json_rpc_model.py
dimmollo/BIG-bench
f0dffeb4f16ef5489686a81e2d63362d251cda3e
[ "Apache-2.0" ]
null
null
null
"""JSON-rpc proxy model for BIG-Bench.""" # Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
33.634259
80
0.662354
import os from typing import Optional, Any, Dict, Union, List import urllib.parse import uuid import bigbench.api.model as model import requests import requests_unixsocket import time _RPC_VERSION = '2.0' _INET_URL_PREFIX = 'http://' _UNIX_URL_PREFIX = 'http+unix://' _MAX_RETRIES = 8 _RETRY_DELAY_SEC = 1...
true
true
f7f73a40647537ff77146cae81c85a1e916c601b
627
py
Python
home/migrations/0001_initial.py
VSevagen/ProctOS
a34124b0a5d152e30c064c8ed801e7af894eb04a
[ "MIT" ]
null
null
null
home/migrations/0001_initial.py
VSevagen/ProctOS
a34124b0a5d152e30c064c8ed801e7af894eb04a
[ "MIT" ]
null
null
null
home/migrations/0001_initial.py
VSevagen/ProctOS
a34124b0a5d152e30c064c8ed801e7af894eb04a
[ "MIT" ]
null
null
null
# Generated by Django 2.1.7 on 2019-04-06 16:47 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='UserProfile', fields=[ ('id', models.AutoFi...
26.125
114
0.575758
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='UserProfile', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serial...
true
true
f7f73b2e0b65aaa27677c44b8ec7c97509604f5f
8,595
py
Python
experiments/experiment_base_original.py
Emmyphung/flexible-input-slu
a2c7fff640b2b4aec830f3ca1b447c28dc506bb4
[ "Apache-2.0" ]
null
null
null
experiments/experiment_base_original.py
Emmyphung/flexible-input-slu
a2c7fff640b2b4aec830f3ca1b447c28dc506bb4
[ "Apache-2.0" ]
null
null
null
experiments/experiment_base_original.py
Emmyphung/flexible-input-slu
a2c7fff640b2b4aec830f3ca1b447c28dc506bb4
[ "Apache-2.0" ]
null
null
null
# Copyright Amazon.com, Inc. or its affiliates. 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 ...
46.967213
108
0.54078
import os import torch import numpy as np from utils.utils import AverageMeter from tqdm import tqdm from sklearn.metrics import confusion_matrix class ExperimentRunnerBase: def __init__(self, args): if args.scheduler == 'plateau': self.scheduler = torch.optim.lr_schedu...
true
true
f7f73cc1c33a82a6602a7eae3653a3ab0b58758b
2,287
py
Python
load_cifar10.py
Monster880/pytorch_py
9c5ac5974f48edb5ea3d897a1100a63d488c61d9
[ "MIT" ]
null
null
null
load_cifar10.py
Monster880/pytorch_py
9c5ac5974f48edb5ea3d897a1100a63d488c61d9
[ "MIT" ]
null
null
null
load_cifar10.py
Monster880/pytorch_py
9c5ac5974f48edb5ea3d897a1100a63d488c61d9
[ "MIT" ]
null
null
null
import glob from torchvision import transforms from torch.utils.data import DataLoader, Dataset import os from PIL import Image import numpy as np label_name = [ "airplane", "automobile", "bird", "cat", "deer", "dog", "frog", "horse", "ship", "truck" ] label_dict = {} for idx...
26.287356
98
0.682991
import glob from torchvision import transforms from torch.utils.data import DataLoader, Dataset import os from PIL import Image import numpy as np label_name = [ "airplane", "automobile", "bird", "cat", "deer", "dog", "frog", "horse", "ship", "truck" ] label_dict = {} for idx...
true
true
f7f73d19ef67a6a11368996051e1a1a402f71bfa
3,828
py
Python
qwirk/deck.py
jensenak/qwirk
7ddfa010d12770827ed1778dff4eabd2c2f8b462
[ "MIT" ]
null
null
null
qwirk/deck.py
jensenak/qwirk
7ddfa010d12770827ed1778dff4eabd2c2f8b462
[ "MIT" ]
null
null
null
qwirk/deck.py
jensenak/qwirk
7ddfa010d12770827ed1778dff4eabd2c2f8b462
[ "MIT" ]
null
null
null
import random from queue import Queue from threading import Thread, Timer from qwirk.game import GameObj class BadOptions(Exception): pass class BadDeck(Exception): pass class Deck(): def __init__(self, settings): self.game = GameObj.game self.deck = [] self.settings = settings ...
40.723404
114
0.576019
import random from queue import Queue from threading import Thread, Timer from qwirk.game import GameObj class BadOptions(Exception): pass class BadDeck(Exception): pass class Deck(): def __init__(self, settings): self.game = GameObj.game self.deck = [] self.settings = settings ...
false
true
f7f73d90929fc8e469ecd85269d19748280b98ba
6,704
py
Python
scripts/DL_final_Encoder_regressor.py
svenvanderburg/EEG_age_prediction
6ce32d0776f4f0cf6287d8b7b215c20cef5d9926
[ "Apache-2.0" ]
2
2021-09-23T07:45:29.000Z
2022-03-18T13:21:57.000Z
scripts/DL_final_Encoder_regressor.py
NadineUU/EEG_age_prediction
958e8d6445bf277a445608e05d779315dbd9b376
[ "Apache-2.0" ]
8
2021-09-21T08:08:53.000Z
2022-03-16T18:19:55.000Z
scripts/DL_final_Encoder_regressor.py
NadineUU/EEG_age_prediction
958e8d6445bf277a445608e05d779315dbd9b376
[ "Apache-2.0" ]
2
2022-03-16T10:50:52.000Z
2022-03-17T15:41:53.000Z
#!/usr/bin/env python # ================ IMPORT LIBRARIES ================ # import sys, os, fnmatch, time import numpy as np import pandas as pd from sklearn.model_selection import train_test_split sys.path.insert(0, os.path.dirname(os.getcwd())) from dataset_generator import DataGenerator import tensorflow as tf...
40.878049
160
0.637381
import sys, os, fnmatch, time import numpy as np import pandas as pd from sklearn.model_selection import train_test_split sys.path.insert(0, os.path.dirname(os.getcwd())) from dataset_generator import DataGenerator import tensorflow as tf import tensorflow_addons as tfa from tensorflow import keras from tensorflo...
true
true
f7f73e3fa0545b771ffcadd2a3b29e9ec40e8abf
1,285
py
Python
aoc_01.py
ForestRupicolous/advent_of_code
1335e695e79842ae68c4b492ac2ad89c87a6ea29
[ "MIT" ]
null
null
null
aoc_01.py
ForestRupicolous/advent_of_code
1335e695e79842ae68c4b492ac2ad89c87a6ea29
[ "MIT" ]
null
null
null
aoc_01.py
ForestRupicolous/advent_of_code
1335e695e79842ae68c4b492ac2ad89c87a6ea29
[ "MIT" ]
null
null
null
#! python3 # aoc_01.py # Advent of code: # https://adventofcode.com/2021/day/1 # https://adventofcode.com/2021/day/1#part2 # download input data (optional, for future use) # Count depth increase (if current num is > last: ++) # return number of depth increases def aoc_count_depth_increase(aoc_input): prev_depth ...
29.204545
71
0.647471
def aoc_count_depth_increase(aoc_input): prev_depth = 0 cnt = -1 with open(aoc_input, 'r') as input: for depth in input.readlines(): if int(depth) > prev_depth: cnt+=1 prev_depth = int(depth) return cnt def aoc_count_depth_sum_increase(aoc_input, wi...
true
true
f7f7402df691933fa0171ff77a9abbad10862589
8,904
py
Python
pyevr/openapi_client/models/consolidated_act_all_of.py
thorgate/pyevr
168f2e9459020212213ed0291882a285ebb53839
[ "MIT" ]
3
2020-04-18T19:45:51.000Z
2022-03-01T19:48:11.000Z
pyevr/openapi_client/models/consolidated_act_all_of.py
thorgate/pyevr
168f2e9459020212213ed0291882a285ebb53839
[ "MIT" ]
39
2019-11-16T01:35:35.000Z
2021-11-18T12:58:41.000Z
pyevr/openapi_client/models/consolidated_act_all_of.py
thorgate/pyevr
168f2e9459020212213ed0291882a285ebb53839
[ "MIT" ]
null
null
null
# coding: utf-8 """ EVR API OpenAPI Generator'i jaoks kohandatud EVR API kirjeldus. Kasuta seda juhul, kui spetsifikatsioonile vastava EVR API kirjeldusega ei õnnestu klienti genereerida. # noqa: E501 The version of the OpenAPI document: 1.8.0 Generated by: https://openapi-generator.tech """ impor...
35.474104
177
0.640611
import pprint import re import six from pyevr.openapi_client.configuration import Configuration class ConsolidatedActAllOf(object): openapi_types = { 'contract_number': 'str', 'contract_date': 'datetime', 'cadaster': 'str', 'compartment': 'str', 'forest_allocation_...
true
true
f7f74173e04fb3a67359a4386b15eb25ac3757e4
1,815
py
Python
IPL_Match_Simulation/Step3/Step3_4_Program6_Player_vs_Player_Calculate_wickets.py
KavyaThani/Cls_IPL_01FB15ECS326
ba8642596d559a9d0af0bfff2bf2afcfdc937332
[ "MIT" ]
null
null
null
IPL_Match_Simulation/Step3/Step3_4_Program6_Player_vs_Player_Calculate_wickets.py
KavyaThani/Cls_IPL_01FB15ECS326
ba8642596d559a9d0af0bfff2bf2afcfdc937332
[ "MIT" ]
null
null
null
IPL_Match_Simulation/Step3/Step3_4_Program6_Player_vs_Player_Calculate_wickets.py
KavyaThani/Cls_IPL_01FB15ECS326
ba8642596d559a9d0af0bfff2bf2afcfdc937332
[ "MIT" ]
null
null
null
f = open('player_vs_player_Probability_wickets3.txt', 'w') inF = open('player_vs_player_Probability_wickets2.txt', 'r') lines = inF.readlines() w=0 counter=0 for i in range(len(lines)): line1=lines[i] if i+1 <= len(lines)-1: line2=lines[i+1] else : break list1=[] list2=[] list1=line1.split(',') ...
20.166667
64
0.525069
f = open('player_vs_player_Probability_wickets3.txt', 'w') inF = open('player_vs_player_Probability_wickets2.txt', 'r') lines = inF.readlines() w=0 counter=0 for i in range(len(lines)): line1=lines[i] if i+1 <= len(lines)-1: line2=lines[i+1] else : break list1=[] list2=[] list1=line1.split(',') ...
true
true
f7f741ac22ba841535c7e0857f0335593ff5f99e
566
py
Python
pythonProject2/exercicios/exercicio02.py
DeyvidMonteiro/PycharmProjects
c8fb45f05bbbaab41a20ff22f0e60fdde87210af
[ "MIT" ]
null
null
null
pythonProject2/exercicios/exercicio02.py
DeyvidMonteiro/PycharmProjects
c8fb45f05bbbaab41a20ff22f0e60fdde87210af
[ "MIT" ]
null
null
null
pythonProject2/exercicios/exercicio02.py
DeyvidMonteiro/PycharmProjects
c8fb45f05bbbaab41a20ff22f0e60fdde87210af
[ "MIT" ]
null
null
null
num = int(input('digite um numero inteiro: ')) print('''escolha umas das bases para conversão: [ 1 ] converter para BINARIO [ 2 ] converter para OCTAL [ 3 ] converter para EXADECIMAL ''') opcao = int(input('sua opção: ')) if opcao == 1: print('{} convertido para binario é igual a {} '.format(num, bin(num)[2:])) ...
40.428571
82
0.646643
num = int(input('digite um numero inteiro: ')) print('''escolha umas das bases para conversão: [ 1 ] converter para BINARIO [ 2 ] converter para OCTAL [ 3 ] converter para EXADECIMAL ''') opcao = int(input('sua opção: ')) if opcao == 1: print('{} convertido para binario é igual a {} '.format(num, bin(num)[2:])) ...
true
true
f7f743aafe5ab0506d150de4f2d0d80c7e9d962c
3,710
py
Python
tests/core/test_format_validators.py
maroux/flex
dfd7c6d79d065d7ce1b0c799e51e9bb5292612b2
[ "MIT" ]
160
2015-01-15T05:36:44.000Z
2021-08-04T00:43:54.000Z
tests/core/test_format_validators.py
maroux/flex
dfd7c6d79d065d7ce1b0c799e51e9bb5292612b2
[ "MIT" ]
151
2015-01-20T16:45:36.000Z
2022-02-23T21:07:58.000Z
tests/core/test_format_validators.py
maroux/flex
dfd7c6d79d065d7ce1b0c799e51e9bb5292612b2
[ "MIT" ]
90
2015-01-20T11:19:36.000Z
2021-08-03T08:58:18.000Z
import pytest import uuid from flex.exceptions import ValidationError from flex.formats import ( date_time_format_validator, uuid_format_validator, int32_validator, int64_validator, email_validator, ) # # date_time_format_validator tests # @pytest.mark.parametrize( 'value', (1, True, None...
24.569536
80
0.668464
import pytest import uuid from flex.exceptions import ValidationError from flex.formats import ( date_time_format_validator, uuid_format_validator, int32_validator, int64_validator, email_validator, ) @pytest.mark.parametrize( 'value', (1, True, None, 2.0, [], {}), ) def test_date_time...
true
true
f7f745691a17c855759eaa6d1a27b92ce0957319
2,235
py
Python
server/www/packages/packages-windows/x86/ldap3/protocol/sasl/plain.py
tinygg/teleport
5ac759c707d355767a209e29becaadf250b0e366
[ "Apache-2.0" ]
640
2018-09-12T03:14:13.000Z
2022-03-30T04:38:09.000Z
server/www/packages/packages-windows/x86/ldap3/protocol/sasl/plain.py
tinygg/teleport
5ac759c707d355767a209e29becaadf250b0e366
[ "Apache-2.0" ]
175
2018-09-10T19:52:20.000Z
2022-03-30T04:37:30.000Z
server/www/packages/packages-windows/x86/ldap3/protocol/sasl/plain.py
tinygg/teleport
5ac759c707d355767a209e29becaadf250b0e366
[ "Apache-2.0" ]
230
2018-09-13T02:40:49.000Z
2022-03-29T11:53:58.000Z
""" """ # Created on 2014.01.04 # # Author: Giovanni Cannata # # Copyright 2014 - 2020 Giovanni Cannata # # This file is part of ldap3. # # ldap3 is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Founda...
31.478873
75
0.656823
from ...protocol.sasl.sasl import send_sasl_negotiation from .sasl import sasl_prep from ...utils.conv import to_raw, to_unicode def sasl_plain(connection, controls): authzid = connection.sasl_credentials[0] authcid = connection.sasl_credentials[1] passw...
true
true
f7f74639fb5a2a886b8020a3fba3b1af8656fbe3
4,700
py
Python
tree.py
arash2060/WeSHClass
5251689f1d064e41f8d8aa8c48baf7052ad74a9a
[ "Apache-2.0" ]
null
null
null
tree.py
arash2060/WeSHClass
5251689f1d064e41f8d8aa8c48baf7052ad74a9a
[ "Apache-2.0" ]
null
null
null
tree.py
arash2060/WeSHClass
5251689f1d064e41f8d8aa8c48baf7052ad74a9a
[ "Apache-2.0" ]
null
null
null
class ClassNode(object): def __init__(self, name, parent, label=None): self.name = name self.parent = parent self.label = label self.children = [] self.keywords = [] self.expanded = [] self.doc_idx = [] self.model = None self.embedding = None...
30.718954
97
0.548085
class ClassNode(object): def __init__(self, name, parent, label=None): self.name = name self.parent = parent self.label = label self.children = [] self.keywords = [] self.expanded = [] self.doc_idx = [] self.model = None self.embedding = None...
true
true
f7f746654d3d209cfadfd94cc49e682df5e712a0
555
py
Python
Backend/equation test/venv/Lib/site-packages/kwargs/__init__.py
chehansivaruban/Cyber---SDGP
6676c284c34c4c15279bf3e5cfb73fd4e5b7391a
[ "CC0-1.0" ]
1
2021-05-18T10:55:32.000Z
2021-05-18T10:55:32.000Z
Backend/equation test/venv/Lib/site-packages/kwargs/__init__.py
chehansivaruban/Cyber---SDGP
6676c284c34c4c15279bf3e5cfb73fd4e5b7391a
[ "CC0-1.0" ]
null
null
null
Backend/equation test/venv/Lib/site-packages/kwargs/__init__.py
chehansivaruban/Cyber---SDGP
6676c284c34c4c15279bf3e5cfb73fd4e5b7391a
[ "CC0-1.0" ]
2
2021-03-29T19:00:55.000Z
2021-04-02T13:18:07.000Z
#pylint: disable=too-few-public-methods """ Kwargs is the only True python micro-framework that doesn't limit your creativity™. """ def run(callback, *args, **kwargs): """ Alias for App.run """ return callback(*args, **kwargs) class App(object): """ App represents Kwargs application instance. """ de...
30.833333
91
0.664865
def run(callback, *args, **kwargs): return callback(*args, **kwargs) class App(object): def __init__(self, callback): self.callback = callback def run(self, *args, **kwargs): return run(self.callback, *args, **kwargs)
true
true
f7f747bd1f403cd6bba10abbd1809c53f6884a40
2,198
py
Python
merge.py
Junot974/Excel-Merge-Script
6c2216043f665affa8db70bf353c40a0deed82d5
[ "MIT" ]
1
2022-02-02T14:47:39.000Z
2022-02-02T14:47:39.000Z
merge.py
Junot974/Excel-Merge-Script
6c2216043f665affa8db70bf353c40a0deed82d5
[ "MIT" ]
null
null
null
merge.py
Junot974/Excel-Merge-Script
6c2216043f665affa8db70bf353c40a0deed82d5
[ "MIT" ]
null
null
null
# importing openpyxl module import openpyxl as xl; from openpyxl import load_workbook from openpyxl import Workbook ## #Create Workbook ## wb = Workbook() ws = wb.active ws.title = "worksheet" wb.save(filename = '/path/file.xlsx') ## # opening the source excel file ## wb1 = xl.load_workbook("/path/file1.xlsx") ws1 ...
23.382979
58
0.674249
import openpyxl as xl; from openpyxl import load_workbook from openpyxl import Workbook wb = Workbook() ws = wb.active ws.title = "worksheet" wb.save(filename = '/path/file.xlsx') wb1 = xl.load_workbook("/path/file1.xlsx") ws1 = wb1.worksheets[0] wb2 = xl.load_workbook("/path/file2.xlsx") ws2 = wb2.worksheets[0...
true
true
f7f7485c61c709ca15618f4cdb3c6f17289f7bfd
3,535
py
Python
kaori/plugins/gacha/engine/core/battle.py
austinpray/kaori
b21c4146b9d0d27b87015cff0768138568a12e9c
[ "MIT" ]
3
2020-05-04T03:43:20.000Z
2020-12-03T22:34:47.000Z
kaori/plugins/gacha/engine/core/battle.py
austinpray/kaori
b21c4146b9d0d27b87015cff0768138568a12e9c
[ "MIT" ]
287
2020-04-21T02:39:47.000Z
2022-03-28T13:11:59.000Z
kaori/plugins/gacha/engine/core/battle.py
austinpray/kaori
b21c4146b9d0d27b87015cff0768138568a12e9c
[ "MIT" ]
1
2020-10-22T00:20:43.000Z
2020-10-22T00:20:43.000Z
from __future__ import annotations import re from enum import Enum, unique from random import sample, random from typing import List from .card import Card from .. import CRIT_MULTIPLIER @unique class TurnResult(Enum): standoff = 'S' evade = 'E' hit = 'H' kill = 'K' def __str__(self): r...
26.380597
106
0.546252
from __future__ import annotations import re from enum import Enum, unique from random import sample, random from typing import List from .card import Card from .. import CRIT_MULTIPLIER @unique class TurnResult(Enum): standoff = 'S' evade = 'E' hit = 'H' kill = 'K' def __str__(self): r...
true
true
f7f748efe0013552a936e9073a8acffd56620df4
4,626
py
Python
torchreid/data/datasets/video/mars.py
qw85639229/hardest
ef86536dbbe1089248e34afbbb7bb513f97f58f1
[ "MIT" ]
23
2021-08-06T01:08:34.000Z
2022-03-30T02:54:57.000Z
torchreid/data/datasets/video/mars.py
qw85639229/hardest
ef86536dbbe1089248e34afbbb7bb513f97f58f1
[ "MIT" ]
10
2020-11-18T07:40:22.000Z
2021-10-05T07:58:25.000Z
torchreid/data/datasets/video/mars.py
qw85639229/hardest
ef86536dbbe1089248e34afbbb7bb513f97f58f1
[ "MIT" ]
7
2020-11-19T08:40:27.000Z
2022-02-05T06:24:08.000Z
from __future__ import absolute_import from __future__ import print_function from __future__ import division import sys import os import os.path as osp from scipy.io import loadmat import warnings from torchreid.data.datasets import VideoDataset class Mars(VideoDataset): """MARS. Reference: Zheng e...
41.303571
112
0.648508
from __future__ import absolute_import from __future__ import print_function from __future__ import division import sys import os import os.path as osp from scipy.io import loadmat import warnings from torchreid.data.datasets import VideoDataset class Mars(VideoDataset): dataset_dir = 'mars' dataset_url = N...
true
true
f7f74941e5f5f6321fad4f1337bc31f93ae45f52
862
py
Python
talent/admin.py
flannerykj/urbanapplause
c9b6c0f9a2f65b869fe1e6fa921972e7236e4fe5
[ "MIT" ]
null
null
null
talent/admin.py
flannerykj/urbanapplause
c9b6c0f9a2f65b869fe1e6fa921972e7236e4fe5
[ "MIT" ]
null
null
null
talent/admin.py
flannerykj/urbanapplause
c9b6c0f9a2f65b869fe1e6fa921972e7236e4fe5
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Musician from .models import Artist class MusicianAdmin(admin.ModelAdmin): fieldsets = [ (None, {'fields': ['name']}), (None, {'fields': ['instruments']}), ] list_display = ('name', 'author') def save_mode...
29.724138
58
0.562645
from django.contrib import admin from .models import Musician from .models import Artist class MusicianAdmin(admin.ModelAdmin): fieldsets = [ (None, {'fields': ['name']}), (None, {'fields': ['instruments']}), ] list_display = ('name', 'author') def save_mode...
false
true
f7f74a63b487684635c3869ac1122ea2a0b8e2e9
18,906
py
Python
FeatureServer/Server.py
AstunTechnology/featureserver
0697730de12b7bc4c8d90bab829d95a865253e77
[ "BSD-3-Clause-Open-MPI", "MIT" ]
55
2015-01-20T14:29:59.000Z
2020-12-13T12:54:28.000Z
FeatureServer/Server.py
makinacorpus/featureserver
379c1a7f51e75517ae7237751e1908f45c0c4d9a
[ "BSD-3-Clause-Open-MPI", "MIT" ]
3
2017-01-17T13:52:43.000Z
2021-01-13T10:50:27.000Z
FeatureServer/Server.py
makinacorpus/featureserver
379c1a7f51e75517ae7237751e1908f45c0c4d9a
[ "BSD-3-Clause-Open-MPI", "MIT" ]
19
2015-02-08T12:32:25.000Z
2021-12-01T08:14:32.000Z
#!/usr/bin/python __author__ = "MetaCarta" __copyright__ = "Copyright (c) 2006-2008 MetaCarta" __license__ = "Clear BSD" __version__ = "$Id: Server.py 607 2009-04-27 15:53:15Z crschmidt $" import sys import time import os import traceback import ConfigParser from web_request.handlers import wsgi, mod_python, cgi fro...
42.200893
210
0.54972
__author__ = "MetaCarta" __copyright__ = "Copyright (c) 2006-2008 MetaCarta" __license__ = "Clear BSD" __version__ = "$Id: Server.py 607 2009-04-27 15:53:15Z crschmidt $" import sys import time import os import traceback import ConfigParser from web_request.handlers import wsgi, mod_python, cgi from lxml import etr...
false
true
f7f74b1c3145d6c93b73607c24604efc144ca890
1,951
py
Python
examples/custom_context.py
Ryomen-Sukuna/discord.py
0bcb0d0e3ce395d42a5b1dae61b0090791ee018d
[ "MIT" ]
1
2021-09-11T09:24:38.000Z
2021-09-11T09:24:38.000Z
examples/custom_context.py
Ryomen-Sukuna/discord.py
0bcb0d0e3ce395d42a5b1dae61b0090791ee018d
[ "MIT" ]
1
2022-02-19T18:25:19.000Z
2022-02-19T18:25:19.000Z
examples/custom_context.py
Ryomen-Sukuna/discord.py
0bcb0d0e3ce395d42a5b1dae61b0090791ee018d
[ "MIT" ]
null
null
null
# This example requires the 'message_content' privileged intent to function. import random import discord from discord.ext import commands class MyContext(commands.Context): async def tick(self, value): # reacts to the message with an emoji # depending on whether value is True or False ...
32.516667
76
0.674013
import random import discord from discord.ext import commands class MyContext(commands.Context): async def tick(self, value): # otherwise, it'll add a red cross mark emoji = '\N{WHITE HEAVY CHECK MARK}' if value else '\N{CROSS MARK}' try: ...
true
true
f7f74b41bc438a17f0cd16a5250d1822798dfb2b
1,571
py
Python
oxe-api/resource/user/update_user_group_assignment.py
CybersecurityLuxembourg/openxeco
8d4e5578bde6a07f5d6d569b16b4de224abf7bf0
[ "BSD-2-Clause" ]
null
null
null
oxe-api/resource/user/update_user_group_assignment.py
CybersecurityLuxembourg/openxeco
8d4e5578bde6a07f5d6d569b16b4de224abf7bf0
[ "BSD-2-Clause" ]
null
null
null
oxe-api/resource/user/update_user_group_assignment.py
CybersecurityLuxembourg/openxeco
8d4e5578bde6a07f5d6d569b16b4de224abf7bf0
[ "BSD-2-Clause" ]
null
null
null
from flask_apispec import MethodResource from flask_apispec import use_kwargs, doc from flask_jwt_extended import jwt_required from flask_restful import Resource from webargs import fields from decorator.catch_exception import catch_exception from decorator.log_request import log_request from decorator.verify_admin_ac...
28.563636
90
0.631445
from flask_apispec import MethodResource from flask_apispec import use_kwargs, doc from flask_jwt_extended import jwt_required from flask_restful import Resource from webargs import fields from decorator.catch_exception import catch_exception from decorator.log_request import log_request from decorator.verify_admin_ac...
true
true
f7f74b630d636082a2cbce49328a0e6143b855f2
324
py
Python
setup.py
ap193uee/common
9fd1674260a6188b1cefebad46f9fafd542554c1
[ "MIT" ]
3
2019-02-04T06:42:58.000Z
2019-08-21T09:40:44.000Z
setup.py
ap193uee/cvutils
9fd1674260a6188b1cefebad46f9fafd542554c1
[ "MIT" ]
1
2020-03-23T15:56:20.000Z
2020-03-23T15:56:20.000Z
setup.py
ap193uee/cvutils
9fd1674260a6188b1cefebad46f9fafd542554c1
[ "MIT" ]
1
2019-03-20T08:31:20.000Z
2019-03-20T08:31:20.000Z
from setuptools import setup setup( name='common', version='1.1.0', description='Common utlity functions', url='http://demo.vedalabs.in/', # Author details author='Atinderpal Singh', author_email='atinderpalap@gmail.com', license='MIT', packages=['common'], zip_safe=False ...
17.052632
42
0.635802
from setuptools import setup setup( name='common', version='1.1.0', description='Common utlity functions', url='http://demo.vedalabs.in/', author='Atinderpal Singh', author_email='atinderpalap@gmail.com', license='MIT', packages=['common'], zip_safe=False )
true
true
f7f74ce8643d997aee4cc71cad42ca18ae6f6280
81,660
py
Python
nova/compute/resource_tracker.py
rolaya/nova
5434e4c401cc7968ddd516537971b687631b3147
[ "Apache-2.0" ]
null
null
null
nova/compute/resource_tracker.py
rolaya/nova
5434e4c401cc7968ddd516537971b687631b3147
[ "Apache-2.0" ]
null
null
null
nova/compute/resource_tracker.py
rolaya/nova
5434e4c401cc7968ddd516537971b687631b3147
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
46.796562
79
0.620745
import collections import copy from keystoneauth1 import exceptions as ks_exc import os_traits from oslo_log import log as logging from oslo_serialization import jsonutils from oslo_utils import excutils import retrying from nova.compute import claims from nova.compute import monitors from nova.compute...
true
true
f7f74cedd8841a5a3ea6d6418f64ff79898b7956
834
py
Python
commands/enable.py
s2ff2/voicechannel
ed35d8a52cf423f81c9f33b316355621555938cf
[ "MIT" ]
177
2020-02-02T18:03:46.000Z
2022-03-17T06:18:43.000Z
commands/enable.py
zigsphere/Auto-Voice-Channels
6ae901728580bef4246737a6f1b9f10763badd3e
[ "MIT" ]
82
2020-02-02T17:43:18.000Z
2022-03-24T20:34:55.000Z
commands/enable.py
zigsphere/Auto-Voice-Channels
6ae901728580bef4246737a6f1b9f10763badd3e
[ "MIT" ]
165
2019-02-17T20:15:20.000Z
2022-03-27T23:59:23.000Z
import utils from functions import log from commands.base import Cmd help_text = [ [ ("Usage:", "<PREFIX><COMMAND>"), ("Description:", "Turn me on. If I'm not enabled, I won't create any new voice channels, rename, or delete them."), ] ] async def execute(ctx, params): settings =...
26.0625
107
0.633094
import utils from functions import log from commands.base import Cmd help_text = [ [ ("Usage:", "<PREFIX><COMMAND>"), ("Description:", "Turn me on. If I'm not enabled, I won't create any new voice channels, rename, or delete them."), ] ] async def execute(ctx, params): settings =...
true
true
f7f74d5ce4c3b50878aa5b9a5850004c59664f14
223
py
Python
zinnia_ckeditor/__init__.py
pancodia/zinnia-wysiwyg-ckeditor
79143b9bdfaee44760c1367392869eacb32b7ee2
[ "BSD-3-Clause" ]
null
null
null
zinnia_ckeditor/__init__.py
pancodia/zinnia-wysiwyg-ckeditor
79143b9bdfaee44760c1367392869eacb32b7ee2
[ "BSD-3-Clause" ]
null
null
null
zinnia_ckeditor/__init__.py
pancodia/zinnia-wysiwyg-ckeditor
79143b9bdfaee44760c1367392869eacb32b7ee2
[ "BSD-3-Clause" ]
null
null
null
"""CKEditor for Django-blog-zinnia""" __version__ = '1.3' __license__ = 'BSD License' __author__ = 'Fantomas42' __email__ = 'fantomas42@gmail.com' __url__ = 'https://github.com/django-blog-zinnia/zinnia-wysiwyg-ckeditor'
24.777778
73
0.744395
__version__ = '1.3' __license__ = 'BSD License' __author__ = 'Fantomas42' __email__ = 'fantomas42@gmail.com' __url__ = 'https://github.com/django-blog-zinnia/zinnia-wysiwyg-ckeditor'
true
true
f7f74d810ddf4f5049e93dcc2ed679b7a44fa491
1,069
py
Python
pathmatcher/mlabwrap/mlabraw.py
lrq3000/pathmatcher
8baee07542f99e8bfa6fcb65c1e3008c080f037b
[ "MIT" ]
1
2021-01-06T11:53:07.000Z
2021-01-06T11:53:07.000Z
pathmatcher/mlabwrap/mlabraw.py
lrq3000/pathmatcher
8baee07542f99e8bfa6fcb65c1e3008c080f037b
[ "MIT" ]
null
null
null
pathmatcher/mlabwrap/mlabraw.py
lrq3000/pathmatcher
8baee07542f99e8bfa6fcb65c1e3008c080f037b
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ A quick and extremely dirty hack to wrap matlabpipe/matlabcom as if they were mlabraw. Author: Dani Valevski <daniva@gmail.com> License: MIT """ from __future__ import absolute_import from __future__ import unicode_literals import sys is_win = sys.platform == 'win32' if is_win: from .ma...
19.436364
76
0.700655
from __future__ import absolute_import from __future__ import unicode_literals import sys is_win = sys.platform == 'win32' if is_win: from .matlabcom import MatlabCom as MatlabConnection from .matlabcom import MatlabError as error else: from .matlabpipe import MatlabPipe as MatlabConnection from .mat...
true
true
f7f74dac2c1964ddf3afd52141a596cbc94aab37
3,612
py
Python
test/functional/mining_getblocktemplate_longpoll.py
bizzy401/BazCoin
a8868b45533a7d0d8bd2fbec71a5b2c92517bacd
[ "MIT" ]
null
null
null
test/functional/mining_getblocktemplate_longpoll.py
bizzy401/BazCoin
a8868b45533a7d0d8bd2fbec71a5b2c92517bacd
[ "MIT" ]
null
null
null
test/functional/mining_getblocktemplate_longpoll.py
bizzy401/BazCoin
a8868b45533a7d0d8bd2fbec71a5b2c92517bacd
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test longpolling with getblocktemplate.""" from decimal import Decimal import random import threading ...
44.04878
134
0.680509
from decimal import Decimal import random import threading from test_framework.test_framework import BazCoinTestFramework from test_framework.util import get_rpc_proxy from test_framework.wallet import MiniWallet class LongpollThread(threading.Thread): def __init__(self, node): threading.Thread.__in...
true
true
f7f74db7e24564dc9d0214292ac723a6c63d8f1e
1,968
py
Python
meta-yocto-bsp/lib/oeqa/selftest/systemd_boot.py
prakhya/luv_sai
91d7d83a3e71b63164f683274dcf2392d64892e7
[ "MIT" ]
null
null
null
meta-yocto-bsp/lib/oeqa/selftest/systemd_boot.py
prakhya/luv_sai
91d7d83a3e71b63164f683274dcf2392d64892e7
[ "MIT" ]
null
null
null
meta-yocto-bsp/lib/oeqa/selftest/systemd_boot.py
prakhya/luv_sai
91d7d83a3e71b63164f683274dcf2392d64892e7
[ "MIT" ]
null
null
null
from oeqa.selftest.base import oeSelfTest from oeqa.utils.commands import runCmd, bitbake, get_bb_var, runqemu from oeqa.utils.decorators import testcase import re import os import sys import logging class Systemdboot(oeSelfTest): def _common_setup(self): """ Common setup for test cases: 1445, XX...
34.526316
114
0.657012
from oeqa.selftest.base import oeSelfTest from oeqa.utils.commands import runCmd, bitbake, get_bb_var, runqemu from oeqa.utils.decorators import testcase import re import os import sys import logging class Systemdboot(oeSelfTest): def _common_setup(self): features = 'EFI_PROVIDER = "systemd-boo...
true
true
f7f74e48a1fe4265126ce8e2493fb41a5a24b937
2,664
py
Python
predRoC.py
paperclip/tf2-eager-yolo3
7f6b137c50525f91ed5026c6cb1d556e9b6d9bed
[ "MIT" ]
null
null
null
predRoC.py
paperclip/tf2-eager-yolo3
7f6b137c50525f91ed5026c6cb1d556e9b6d9bed
[ "MIT" ]
null
null
null
predRoC.py
paperclip/tf2-eager-yolo3
7f6b137c50525f91ed5026c6cb1d556e9b6d9bed
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import tensorflow as tf import argparse import cv2 import matplotlib.pyplot as plt import glob import json import sys import os from yolo.utils.box import visualize_boxes from yolo.config import ConfigParser if tf.executing_eagerly(): print("Executing eargerly") else: print("Executing...
21.312
78
0.629505
import tensorflow as tf import argparse import cv2 import matplotlib.pyplot as plt import glob import json import sys import os from yolo.utils.box import visualize_boxes from yolo.config import ConfigParser if tf.executing_eagerly(): print("Executing eargerly") else: print("Executing lazily") tf.enable_ea...
true
true
f7f74e55ac96cd6d94790fbf618ec9f9810b3dea
698
py
Python
test/test_gender.py
kinow-io/kinow-python-sdk
4c1699a3c78048b84287bd049a669651a5b4e2d5
[ "Apache-2.0" ]
1
2019-06-26T14:24:54.000Z
2019-06-26T14:24:54.000Z
test/test_gender.py
kinow-io/kinow-python-sdk
4c1699a3c78048b84287bd049a669651a5b4e2d5
[ "Apache-2.0" ]
null
null
null
test/test_gender.py
kinow-io/kinow-python-sdk
4c1699a3c78048b84287bd049a669651a5b4e2d5
[ "Apache-2.0" ]
1
2018-02-01T10:08:40.000Z
2018-02-01T10:08:40.000Z
# coding: utf-8 """ Server API Reference for Server API (REST/Json) OpenAPI spec version: 1.4.58 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys import unittest import kinow_client from kinow_client.rest import ...
16.232558
68
0.660458
from __future__ import absolute_import import os import sys import unittest import kinow_client from kinow_client.rest import ApiException from kinow_client.models.gender import Gender class TestGender(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def testGend...
true
true
f7f74eef92c28adef66c4f1ec70ea2a5ac127046
20,940
py
Python
src/ADDA/Networks.py
fol21/domain-adaptation-in-deforestation
ae1c37b1634f54230f1d2217c209dabd6780568a
[ "MIT" ]
null
null
null
src/ADDA/Networks.py
fol21/domain-adaptation-in-deforestation
ae1c37b1634f54230f1d2217c209dabd6780568a
[ "MIT" ]
null
null
null
src/ADDA/Networks.py
fol21/domain-adaptation-in-deforestation
ae1c37b1634f54230f1d2217c209dabd6780568a
[ "MIT" ]
null
null
null
import os import numpy as np import tensorflow as tf class Networks(): def __init__(self, args): super(Networks, self).__init__() self.args = args # Wittich design def VNET_16L(self, I, is_train, reuse_unet=False, reuse_ada=False, adaption_net=False): def encoder_conf(name, ...
56.747967
200
0.545463
import os import numpy as np import tensorflow as tf class Networks(): def __init__(self, args): super(Networks, self).__init__() self.args = args def VNET_16L(self, I, is_train, reuse_unet=False, reuse_ada=False, adaption_net=False): def encoder_conf(name, X, filter, f_siz...
true
true
f7f74f5cc4f1243dee69589ce37bced6dbb80b6b
1,198
py
Python
src/simulation.py
julinas/town-sim-py
f0fa1671bd5003053957f722d78d90161ff407a7
[ "BSD-3-Clause" ]
11
2019-06-08T20:27:39.000Z
2021-11-02T15:02:14.000Z
src/simulation.py
julinas/town-sim-py
f0fa1671bd5003053957f722d78d90161ff407a7
[ "BSD-3-Clause" ]
1
2020-01-11T18:48:21.000Z
2020-01-12T22:33:54.000Z
src/simulation.py
julinas/town-sim-py
f0fa1671bd5003053957f722d78d90161ff407a7
[ "BSD-3-Clause" ]
2
2020-06-09T06:08:51.000Z
2020-08-31T18:09:15.000Z
# BSD 3-Clause License # # Copyright (c) 2019, Augmented Design Lab # All rights reserved. import copy import random import time from agent import Agent from landscape import Landscape from lot import Lot import gc class Simulation: def __init__(self, size=200, r1=3, r2=5, r3=10, r4=10, load_filename=None): self.l...
26.622222
115
0.717863
import copy import random import time from agent import Agent from landscape import Landscape from lot import Lot import gc class Simulation: def __init__(self, size=200, r1=3, r2=5, r3=10, r4=10, load_filename=None): self.landscape = Landscape(size, size, self, r1, r2, r3, r4, load_filename) if not load_fil...
true
true
f7f750029073ef7e7effd0f2582d27e265caa3bd
720
py
Python
examples/dft/32-xcfun_as_default.py
QuESt-Calculator/pyscf
0ed03633b699505c7278f1eb501342667d0aa910
[ "Apache-2.0" ]
501
2018-12-06T23:48:17.000Z
2022-03-31T11:53:18.000Z
examples/dft/32-xcfun_as_default.py
QuESt-Calculator/pyscf
0ed03633b699505c7278f1eb501342667d0aa910
[ "Apache-2.0" ]
710
2018-11-26T22:04:52.000Z
2022-03-30T03:53:12.000Z
examples/dft/32-xcfun_as_default.py
QuESt-Calculator/pyscf
0ed03633b699505c7278f1eb501342667d0aa910
[ "Apache-2.0" ]
273
2018-11-26T10:10:24.000Z
2022-03-30T12:25:28.000Z
#!/usr/bin/env python ''' Set the default XC functional library to XCFun (https://github.com/dftlibs/xcfun) ''' from pyscf import gto, dft, grad mol = gto.M( atom = ''' F 0. 0. 0. H 0. 0. 1.587 ''', basis = 'ccpvdz') # # Scheme 1: Change ._numint of MF object for a single calculati...
18.461538
81
0.640278
from pyscf import gto, dft, grad mol = gto.M( atom = ''' F 0. 0. 0. H 0. 0. 1.587 ''', basis = 'ccpvdz') mf = dft.RKS(mol) mf._numint.libxc = dft.xcfun mf.xc = 'b88,lyp' mf.kernel() mf.nuc_grad_method().run() mf.xc = 'scan' mf.kernel() dft.numint.NumInt.libxc = dft.xcfun ...
true
true
f7f75070c9c1069c11fc9c9d8af25c07064cd6e8
9,290
py
Python
src/grading.py
TMinuzzo/berkeleyRL3
2f69c6239d1a4328ac36ec923d88d577c9e37a28
[ "MIT" ]
2
2021-05-12T22:24:18.000Z
2021-05-13T12:12:51.000Z
src/grading.py
TMinuzzo/berkeleyRL3
2f69c6239d1a4328ac36ec923d88d577c9e37a28
[ "MIT" ]
1
2021-10-20T00:15:14.000Z
2021-10-20T00:15:14.000Z
src/grading.py
TMinuzzo/berkeleyRL3
2f69c6239d1a4328ac36ec923d88d577c9e37a28
[ "MIT" ]
9
2021-05-02T01:27:03.000Z
2021-10-29T22:24:29.000Z
# grading.py # ---------- # Licensing Information: You are free to use or extend these projects for # educational purposes provided that (1) you do not distribute or publish # solutions, (2) you retain this notice, and (3) you provide clear # attribution to UC Berkeley, including a link to http://ai.berkeley.edu. # #...
32.943262
99
0.557266
import html import time import sys import traceback import pdb from collections import defaultdict import util class Grades: def __init__(self, projectName, questionsAndMaxesList, edxOutput=False, muteOutput=False): self.questions = [el[0] for el in questionsAndMaxesList] self.maxes = dict(que...
true
true
f7f7509c12387da9c3493856e291768b196daa46
12,568
py
Python
sdk/python/pulumi_azure/eventhub/namespace.py
suresh198526/pulumi-azure
bf27206a38d7a5c58b3c2c57ec8769fe3d0fc5d7
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure/eventhub/namespace.py
suresh198526/pulumi-azure
bf27206a38d7a5c58b3c2c57ec8769fe3d0fc5d7
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure/eventhub/namespace.py
suresh198526/pulumi-azure
bf27206a38d7a5c58b3c2c57ec8769fe3d0fc5d7
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from .. import _utilitie...
47.787072
192
0.660487
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from .. import _utilities, _tables __all__ = ['Namespace'] warnings.warn("""azure.eventhub.Namespace has been deprecated in favor of azure.servicebus.Namespace""", DeprecationWarning) class Namespace(p...
true
true
f7f7517c6272bbbf39f0892d3d627ebf0d939075
10,527
py
Python
ASR_TransV1/Dataloader_for_AM_v3_dev.py
BUTSpeechFIT/ASR_Transformer
814f720aa8265e9a377869f93dc65b251338e985
[ "MIT" ]
1
2020-10-25T00:21:40.000Z
2020-10-25T00:21:40.000Z
ASR_TransV1/Dataloader_for_AM_v3_dev.py
BUTSpeechFIT/ASR_Transformer
814f720aa8265e9a377869f93dc65b251338e985
[ "MIT" ]
null
null
null
ASR_TransV1/Dataloader_for_AM_v3_dev.py
BUTSpeechFIT/ASR_Transformer
814f720aa8265e9a377869f93dc65b251338e985
[ "MIT" ]
1
2021-09-08T10:32:55.000Z
2021-09-08T10:32:55.000Z
#!/usr/bin/python import kaldi_io import sys import os from os.path import join, isdir from numpy.random import permutation import itertools import keras import numpy as np from keras.preprocessing.sequence import pad_sequences import queue from threading import Thread import random import glob import sys sys.path.i...
45.969432
212
0.533295
import kaldi_io import sys import os from os.path import join, isdir from numpy.random import permutation import itertools import keras import numpy as np from keras.preprocessing.sequence import pad_sequences import queue from threading import Thread import random import glob import sys sys.path.insert(0, '/home/v...
true
true
f7f7519652b4dd1057c2877c1a69a72c9a4f8e67
2,366
py
Python
lxmls/classifiers/mira.py
SimonSuster/lxmls-toolkit
6a57884f8b7c98da816a60eb88593e0a1585d434
[ "MIT" ]
1
2015-09-20T05:16:38.000Z
2015-09-20T05:16:38.000Z
lxmls/classifiers/mira.py
daviddao/LxMLS-labs-solution
78413c1ee61752ca33988c454e3b2c27326e7063
[ "MIT" ]
null
null
null
lxmls/classifiers/mira.py
daviddao/LxMLS-labs-solution
78413c1ee61752ca33988c454e3b2c27326e7063
[ "MIT" ]
null
null
null
import sys import numpy as np import lxmls.classifiers.linear_classifier as lc from lxmls.util.my_math_utils import * class Mira(lc.LinearClassifier): def __init__(self,nr_rounds = 10,regularizer = 1.0, averaged = True): lc.LinearClassifier.__init__(self) self.trained = False self.nr_round...
38.16129
109
0.536348
import sys import numpy as np import lxmls.classifiers.linear_classifier as lc from lxmls.util.my_math_utils import * class Mira(lc.LinearClassifier): def __init__(self,nr_rounds = 10,regularizer = 1.0, averaged = True): lc.LinearClassifier.__init__(self) self.trained = False self.nr_round...
false
true
f7f751eb5a1a3a813fcef511924ca68864fa3ff2
18,483
py
Python
pydefect/tests/cli/vasp/test_main_function.py
KazMorita/pydefect
681e4bfe92c53edfe8b50cb72768114b28daabc9
[ "MIT" ]
1
2021-09-10T05:07:39.000Z
2021-09-10T05:07:39.000Z
pydefect/tests/cli/vasp/test_main_function.py
obaica/pydefect-1
31e5ad774845f436554ef15000b8eba3b168a65c
[ "MIT" ]
null
null
null
pydefect/tests/cli/vasp/test_main_function.py
obaica/pydefect-1
31e5ad774845f436554ef15000b8eba3b168a65c
[ "MIT" ]
1
2022-01-07T10:14:16.000Z
2022-01-07T10:14:16.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2020. Distributed under the terms of the MIT License. from argparse import Namespace from pathlib import Path import numpy as np import pytest from monty.serialization import loadfn from pydefect.analyzer.band_edge_states import EdgeCharacters, BandEdgeStates from pydefect.anal...
43.387324
144
0.707569
from argparse import Namespace from pathlib import Path import numpy as np import pytest from monty.serialization import loadfn from pydefect.analyzer.band_edge_states import EdgeCharacters, BandEdgeStates from pydefect.analyzer.calc_results import CalcResults from pydefect.analyzer.unitcell import Unitcell from pyd...
true
true
f7f752c31e2eeeafff5313258ef00d4f89156fb2
8,740
py
Python
src/dacirco/scheduler/scheduler.py
albertoblanc/dacirco
965a2e4ad49ec7754eb42442a570bf6d1bf00e89
[ "MIT" ]
null
null
null
src/dacirco/scheduler/scheduler.py
albertoblanc/dacirco
965a2e4ad49ec7754eb42442a570bf6d1bf00e89
[ "MIT" ]
null
null
null
src/dacirco/scheduler/scheduler.py
albertoblanc/dacirco
965a2e4ad49ec7754eb42442a570bf6d1bf00e89
[ "MIT" ]
null
null
null
import logging import os from collections import deque from typing import Optional from dataclasses import asdict from datetime import timedelta from dacirco.grpc_service.events import ( TCWorkerErrorEvent, TCWorkerEvent, TCWorkerEventType, ) from dacirco.scheduler.container_manager import ContainerManage...
39.727273
87
0.615675
import logging import os from collections import deque from typing import Optional from dataclasses import asdict from datetime import timedelta from dacirco.grpc_service.events import ( TCWorkerErrorEvent, TCWorkerEvent, TCWorkerEventType, ) from dacirco.scheduler.container_manager import ContainerManage...
true
true
f7f75320ba9854dd84f539c4ce20a0915dd92aab
14,442
py
Python
tests/storage/test_client_ips.py
rkfg/synapse
0b3112123da5fae4964db784e3bab0c4d83d9d62
[ "Apache-2.0" ]
1
2021-09-09T08:50:13.000Z
2021-09-09T08:50:13.000Z
tests/storage/test_client_ips.py
rkfg/synapse
0b3112123da5fae4964db784e3bab0c4d83d9d62
[ "Apache-2.0" ]
null
null
null
tests/storage/test_client_ips.py
rkfg/synapse
0b3112123da5fae4964db784e3bab0c4d83d9d62
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2016 OpenMarket Ltd # Copyright 2018 New Vector 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 # # ...
31.395652
87
0.549439
from unittest.mock import Mock import synapse.rest.admin from synapse.http.site import XForwardedForRequest from synapse.rest.client.v1 import login from tests import unittest from tests.server import make_request from tests.test_utils import make_awaitable from tests.unittest import override_config ...
true
true
f7f753631736997093b14272740f46e184248add
4,286
py
Python
models/LSTM_Attn.py
lxh5147/Text-Classification-Pytorch
51f9189aad62051127c5a537c72ab3a8b0f97c60
[ "MIT" ]
1
2019-09-20T18:16:33.000Z
2019-09-20T18:16:33.000Z
models/LSTM_Attn.py
lxh5147/Text-Classification-Pytorch
51f9189aad62051127c5a537c72ab3a8b0f97c60
[ "MIT" ]
null
null
null
models/LSTM_Attn.py
lxh5147/Text-Classification-Pytorch
51f9189aad62051127c5a537c72ab3a8b0f97c60
[ "MIT" ]
null
null
null
# _*_ coding: utf-8 _*_ import torch import torch.nn as nn from torch.autograd import Variable from torch.nn import functional as F class AttentionModel(torch.nn.Module): def __init__(self, batch_size, output_size, hidden_size, vocab_size, embedding_length, weights): super(AttentionModel, self).__init__(...
39.685185
177
0.654456
import torch import torch.nn as nn from torch.autograd import Variable from torch.nn import functional as F class AttentionModel(torch.nn.Module): def __init__(self, batch_size, output_size, hidden_size, vocab_size, embedding_length, weights): super(AttentionModel, self).__init__() self.batch_...
true
true
f7f7536ba50888f24d4f09fb8604303ffc29a4a1
3,198
py
Python
tests/func/test_remove.py
mrstegeman/dvc
03fc531a5c1f3814061e83bc26e7af5b0ff02f1d
[ "Apache-2.0" ]
null
null
null
tests/func/test_remove.py
mrstegeman/dvc
03fc531a5c1f3814061e83bc26e7af5b0ff02f1d
[ "Apache-2.0" ]
2
2020-02-10T03:57:58.000Z
2020-10-12T00:33:01.000Z
tests/func/test_remove.py
mrstegeman/dvc
03fc531a5c1f3814061e83bc26e7af5b0ff02f1d
[ "Apache-2.0" ]
1
2021-02-06T12:48:24.000Z
2021-02-06T12:48:24.000Z
import os import pytest from dvc.exceptions import DvcException from dvc.main import main from dvc.stage.exceptions import StageFileDoesNotExistError from dvc.system import System from dvc.utils.fs import remove from tests.utils import get_gitignore_content @pytest.mark.parametrize("remove_outs", [True, False]) def...
32.632653
72
0.674484
import os import pytest from dvc.exceptions import DvcException from dvc.main import main from dvc.stage.exceptions import StageFileDoesNotExistError from dvc.system import System from dvc.utils.fs import remove from tests.utils import get_gitignore_content @pytest.mark.parametrize("remove_outs", [True, False]) def...
true
true
f7f7543cf04437475c253ab4731019e1fc5df3d2
9,624
py
Python
robosat_pink/tools/rasterize.py
MinnDevelopment/robosat.pink
0e4b88a7b1fc91e2a20e5e3bf0c4f742be9ea2c5
[ "MIT" ]
null
null
null
robosat_pink/tools/rasterize.py
MinnDevelopment/robosat.pink
0e4b88a7b1fc91e2a20e5e3bf0c4f742be9ea2c5
[ "MIT" ]
null
null
null
robosat_pink/tools/rasterize.py
MinnDevelopment/robosat.pink
0e4b88a7b1fc91e2a20e5e3bf0c4f742be9ea2c5
[ "MIT" ]
null
null
null
import os import sys import json import collections import numpy as np from tqdm import tqdm import mercantile from rasterio.crs import CRS from rasterio.transform import from_bounds from rasterio.features import rasterize from rasterio.warp import transform from supermercado import burntiles import psycopg2 from r...
42.773333
124
0.617623
import os import sys import json import collections import numpy as np from tqdm import tqdm import mercantile from rasterio.crs import CRS from rasterio.transform import from_bounds from rasterio.features import rasterize from rasterio.warp import transform from supermercado import burntiles import psycopg2 from r...
true
true
f7f75508c9afb6ec184e85b4b6b62ae88a847469
8,772
py
Python
app/src/main/python/image.py
CCH852573130/3DPrinting10
ca843d728bd7501f332a7946976c40d86b362930
[ "MIT" ]
null
null
null
app/src/main/python/image.py
CCH852573130/3DPrinting10
ca843d728bd7501f332a7946976c40d86b362930
[ "MIT" ]
null
null
null
app/src/main/python/image.py
CCH852573130/3DPrinting10
ca843d728bd7501f332a7946976c40d86b362930
[ "MIT" ]
3
2020-04-12T01:53:41.000Z
2020-07-06T08:07:49.000Z
# coding=utf-8 import numpy import time import struct from PIL import Image from MeshBuilder import MeshBuilder from Vector import Vector from CuraSceneNode import CuraSceneNode as SceneNode def generateSceneNode(file_name, xz_size, peak_height, base_height, blur_iterations, max_size,lighter_is_higher,file): scene...
35.804082
124
0.621979
import numpy import time import struct from PIL import Image from MeshBuilder import MeshBuilder from Vector import Vector from CuraSceneNode import CuraSceneNode as SceneNode def generateSceneNode(file_name, xz_size, peak_height, base_height, blur_iterations, max_size,lighter_is_higher,file): scene_node = SceneN...
true
true
f7f755fdb958e86c397a6ec2994c176c678ee8d4
8,630
py
Python
tests/test_conv_internal.py
CalebBell/ht
3b95f9cfff30c8c0272443d523a484977eedbf0d
[ "MIT" ]
118
2016-01-04T07:46:23.000Z
2022-03-29T14:12:59.000Z
tests/test_conv_internal.py
CalebBell/ht
3b95f9cfff30c8c0272443d523a484977eedbf0d
[ "MIT" ]
4
2017-06-27T08:01:02.000Z
2020-10-06T14:18:46.000Z
tests/test_conv_internal.py
CalebBell/ht
3b95f9cfff30c8c0272443d523a484977eedbf0d
[ "MIT" ]
22
2016-04-20T06:17:35.000Z
2022-03-07T01:40:25.000Z
# -*- coding: utf-8 -*- '''Chemical Engineering Design Library (ChEDL). Utilities for process modeling. Copyright (C) 2016, 2017, 2018, 2019, Caleb Bell <Caleb.Andrew.Bell@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "S...
38.017621
232
0.714253
from __future__ import division import ht.conv_internal from ht.conv_internal import * from fluids.numerics import linspace, assert_close, assert_close1d, assert_close2d from ht.boiling_nucleic import _angles_Stephan_Abdelsalam import pytest t_close(laminar_T_const(), 3.66) assert_close(laminar_Q_const(), 48/11...
true
true
f7f75607fb80c2e93bbb8101fb10225c200e68c5
1,185
py
Python
code/python/ProcuretoPayAPISCIM/v1/setup.py
factset/enterprise-sdk
3fd4d1360756c515c9737a0c9a992c7451d7de7e
[ "Apache-2.0" ]
6
2022-02-07T16:34:18.000Z
2022-03-30T08:04:57.000Z
code/python/ProcuretoPayAPISCIM/v1/setup.py
factset/enterprise-sdk
3fd4d1360756c515c9737a0c9a992c7451d7de7e
[ "Apache-2.0" ]
2
2022-02-07T05:25:57.000Z
2022-03-07T14:18:04.000Z
code/python/ProcuretoPayAPISCIM/v1/setup.py
factset/enterprise-sdk
3fd4d1360756c515c9737a0c9a992c7451d7de7e
[ "Apache-2.0" ]
null
null
null
""" FactSet SCIM API FactSet's SCIM API implementation. # noqa: E501 The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech """ from setuptools import setup, find_packages # noqa: H301 import os def read(filename): return open(os.path.join(os.path.dirname(__file...
25.212766
97
0.697046
from setuptools import setup, find_packages import os def read(filename): return open(os.path.join(os.path.dirname(__file__), filename)).read() NAME = "fds.sdk.ProcuretoPayAPISCIM" VERSION = "0.20.0" REQUIRES = [ "urllib3 >= 1.25.3", "python-dateutil", "fds.sdk.utils >= 1.0.0", ] setup( name=N...
true
true
f7f75617f7246e8d3ad11994cbe5145c2cd3ddbb
2,170
py
Python
ocr_service/service/main.py
onlycska/depersonalization-of-data
d11497d0f0708496975d682ae447e97bfd9177d9
[ "MIT" ]
null
null
null
ocr_service/service/main.py
onlycska/depersonalization-of-data
d11497d0f0708496975d682ae447e97bfd9177d9
[ "MIT" ]
null
null
null
ocr_service/service/main.py
onlycska/depersonalization-of-data
d11497d0f0708496975d682ae447e97bfd9177d9
[ "MIT" ]
null
null
null
import time import fastapi import uvicorn import logging import os from process_doc import process_image from models.document_model import DocumentModel from pdf2jpg import pdf2jpg from datetime import datetime logs_folder_path = os.path.join(os.getcwd(), 'logs') os.makedirs(logs_folder_path, exist_ok=True) log_path ...
27.125
86
0.599539
import time import fastapi import uvicorn import logging import os from process_doc import process_image from models.document_model import DocumentModel from pdf2jpg import pdf2jpg from datetime import datetime logs_folder_path = os.path.join(os.getcwd(), 'logs') os.makedirs(logs_folder_path, exist_ok=True) log_path ...
true
true
f7f756bdd65cb3accc511c823b1331f7b2394d34
418
py
Python
molsysmt/tools/openmm_Modeller/to_molsysmt_MolSys.py
dprada/molsysmt
83f150bfe3cfa7603566a0ed4aed79d9b0c97f5d
[ "MIT" ]
null
null
null
molsysmt/tools/openmm_Modeller/to_molsysmt_MolSys.py
dprada/molsysmt
83f150bfe3cfa7603566a0ed4aed79d9b0c97f5d
[ "MIT" ]
null
null
null
molsysmt/tools/openmm_Modeller/to_molsysmt_MolSys.py
dprada/molsysmt
83f150bfe3cfa7603566a0ed4aed79d9b0c97f5d
[ "MIT" ]
null
null
null
def to_molsysmt_MolSys(item, selection='all', frame_indices='all', syntaxis='MolSysMT'): from molsysmt.tools.openmm_Modeller import is_openmm_Modeller from molsysmt.basic import convert if not is_openmm_Modeller(item): raise ValueError tmp_item = convert(item, to_form='molsysmt.MolSys', selec...
29.857143
88
0.744019
def to_molsysmt_MolSys(item, selection='all', frame_indices='all', syntaxis='MolSysMT'): from molsysmt.tools.openmm_Modeller import is_openmm_Modeller from molsysmt.basic import convert if not is_openmm_Modeller(item): raise ValueError tmp_item = convert(item, to_form='molsysmt.MolSys', selec...
true
true
f7f756f6a2cb0bef58469a1c4ce6c3c8090f97f8
4,711
py
Python
rr/experiment/database.py
sdevenes/M05_MiniProject
38f81c6cc0b0d8f777c51609118b160c010c5590
[ "MIT" ]
1
2022-03-25T06:44:42.000Z
2022-03-25T06:44:42.000Z
rr/experiment/database.py
sdevenes/M05_MiniProject
38f81c6cc0b0d8f777c51609118b160c010c5590
[ "MIT" ]
22
2020-09-15T14:56:25.000Z
2020-10-12T08:31:21.000Z
rr/experiment/database.py
sdevenes/M05_MiniProject
38f81c6cc0b0d8f777c51609118b160c010c5590
[ "MIT" ]
null
null
null
import numpy as np import csv from sklearn.model_selection import train_test_split PROTOCOLS = { "proto1": {"train": 0.8, "test": 0.2, "random": 1}, "proto2": {"train": 0.8, "test": 0.2, "random": 2}, } SUBSETS = ["train", "validation", "test"] CLASSES = [ "Other_Activity", "Watch_TV", "Sleep_Out...
28.209581
125
0.637869
import numpy as np import csv from sklearn.model_selection import train_test_split PROTOCOLS = { "proto1": {"train": 0.8, "test": 0.2, "random": 1}, "proto2": {"train": 0.8, "test": 0.2, "random": 2}, } SUBSETS = ["train", "validation", "test"] CLASSES = [ "Other_Activity", "Watch_TV", "Sleep_Out...
true
true
f7f7577be18813be11da8db7ee9a682a9c76edaa
1,874
py
Python
test/dvc/test_stages.py
giganticode/bohr-framework
fd364a1f036123985ac96e9076e5dce3bbc2ca2c
[ "MIT" ]
null
null
null
test/dvc/test_stages.py
giganticode/bohr-framework
fd364a1f036123985ac96e9076e5dce3bbc2ca2c
[ "MIT" ]
54
2021-02-17T13:36:51.000Z
2021-08-25T05:06:57.000Z
test/dvc/test_stages.py
giganticode/bohr-framework
fd364a1f036123985ac96e9076e5dce3bbc2ca2c
[ "MIT" ]
null
null
null
from pathlib import Path from test.testutils import stub_commit_mapper, stub_task from bohr.config.pathconfig import PathConfig from bohr.dvc.stages import ApplyHeuristicsCommand, ParseLabelsCommand def test_parse_labels_command(): command = ParseLabelsCommand( PathConfig(Path("/project_root"), Path("/so...
26.027778
88
0.5619
from pathlib import Path from test.testutils import stub_commit_mapper, stub_task from bohr.config.pathconfig import PathConfig from bohr.dvc.stages import ApplyHeuristicsCommand, ParseLabelsCommand def test_parse_labels_command(): command = ParseLabelsCommand( PathConfig(Path("/project_root"), Path("/so...
true
true
f7f75821b79fd09f670067d0c26839a8e5b0bdae
1,134
py
Python
tensorboard/__init__.py
lgeiger/tensorboard
6b012202689ae3c55e27c3690455e47f8d18c54d
[ "Apache-2.0" ]
1
2018-07-03T08:08:42.000Z
2018-07-03T08:08:42.000Z
tensorboard/__init__.py
lgeiger/tensorboard
6b012202689ae3c55e27c3690455e47f8d18c54d
[ "Apache-2.0" ]
null
null
null
tensorboard/__init__.py
lgeiger/tensorboard
6b012202689ae3c55e27c3690455e47f8d18c54d
[ "Apache-2.0" ]
1
2020-09-11T19:10:19.000Z
2020-09-11T19:10:19.000Z
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
34.363636
80
0.707231
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorboard import lazy pkg = lambda i: i mod = lambda i: lazy.LazyLoader(i[i.rindex('.') + 1:], globals(), i) program = mod(pkg('tensorboard.program')) summary = mod(pkg('tensorboard.su...
true
true
f7f75835308c2019c9691223c754b5a36ad105a5
6,134
py
Python
pygame_gui/elements/ui_label.py
halfninja/pygame_gui
71b1150cb0c789339a9f8d781da15bdfad604f6c
[ "MIT" ]
null
null
null
pygame_gui/elements/ui_label.py
halfninja/pygame_gui
71b1150cb0c789339a9f8d781da15bdfad604f6c
[ "MIT" ]
null
null
null
pygame_gui/elements/ui_label.py
halfninja/pygame_gui
71b1150cb0c789339a9f8d781da15bdfad604f6c
[ "MIT" ]
null
null
null
import pygame import warnings from typing import Union from pygame_gui import ui_manager from pygame_gui.core import ui_container from pygame_gui.core.ui_element import UIElement class UILabel(UIElement): """ A label lets us display a single line of text with a single font style. It's a quick to redraw and s...
52.42735
118
0.612488
import pygame import warnings from typing import Union from pygame_gui import ui_manager from pygame_gui.core import ui_container from pygame_gui.core.ui_element import UIElement class UILabel(UIElement): def __init__(self, relative_rect: pygame.Rect, text: str, manager: ui_manager.UIManager, co...
true
true
f7f75998c2c90f0a89be5cab6b41f53ab97c8e4d
165
py
Python
behavior/iterator/iterator_gen.py
lockeCucumber/DesignPatterns
9681aea059d6b29466077910662889801cee3703
[ "MIT" ]
2
2019-07-22T09:22:30.000Z
2021-04-24T22:32:35.000Z
behavior/iterator/iterator_gen.py
lockeCucumber/DesignPatterns
9681aea059d6b29466077910662889801cee3703
[ "MIT" ]
null
null
null
behavior/iterator/iterator_gen.py
lockeCucumber/DesignPatterns
9681aea059d6b29466077910662889801cee3703
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- '结合yield做一个生成器,实现一个迭代器' def gen(value, max_count): for _ in range(max_count): yield value for _ in gen('hello', 3): print _
18.333333
30
0.612121
'结合yield做一个生成器,实现一个迭代器' def gen(value, max_count): for _ in range(max_count): yield value for _ in gen('hello', 3): print _
false
true
f7f75a094258132d14f75dd5cc77e2cb274ea7ce
2,028
py
Python
MHCSeqNet/PredictionModel/Utility/AllelePrimarySequenceManager.py
cmbcu/-MHCSeqNet
707edbd204e4b78d7fd04cecc9168691c8469d00
[ "Apache-2.0" ]
14
2018-07-24T14:49:51.000Z
2019-10-03T20:35:11.000Z
MHCSeqNet/PredictionModel/Utility/AllelePrimarySequenceManager.py
cmbcu/-MHCSeqNet
707edbd204e4b78d7fd04cecc9168691c8469d00
[ "Apache-2.0" ]
4
2018-08-24T14:18:58.000Z
2019-03-28T13:53:06.000Z
MHCSeqNet/PredictionModel/Utility/AllelePrimarySequenceManager.py
cmbcu/-MHCSeqNet
707edbd204e4b78d7fd04cecc9168691c8469d00
[ "Apache-2.0" ]
10
2019-11-12T16:59:05.000Z
2021-08-02T11:37:04.000Z
import csv class AllelePrimarySequenceManager: AMINO_ACIDS_WITH_UNKNOWN = ['^', '-', 'A', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'V', 'W', 'Y', 'X'] NUM_AMINO_ACID = len(AMINO_ACIDS_WITH_UNKNOWN) sequence_index_dict = {} sequence...
36.872727
116
0.533037
import csv class AllelePrimarySequenceManager: AMINO_ACIDS_WITH_UNKNOWN = ['^', '-', 'A', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'V', 'W', 'Y', 'X'] NUM_AMINO_ACID = len(AMINO_ACIDS_WITH_UNKNOWN) sequence_index_dict = {} sequence...
true
true
f7f75a4ef8094682a7058e35f93e95067b0925d6
41,880
py
Python
proteus/mprans/MoveMesh.py
dloney/proteus
615cdf57f765b2e99bac904bb6eb71e39e58ab56
[ "MIT" ]
null
null
null
proteus/mprans/MoveMesh.py
dloney/proteus
615cdf57f765b2e99bac904bb6eb71e39e58ab56
[ "MIT" ]
null
null
null
proteus/mprans/MoveMesh.py
dloney/proteus
615cdf57f765b2e99bac904bb6eb71e39e58ab56
[ "MIT" ]
null
null
null
from __future__ import division from builtins import str from builtins import range from past.utils import old_div import proteus from proteus.mprans.cMoveMesh import * from proteus.mprans.cMoveMesh2D import * class Coefficients(proteus.TransportCoefficients.TC_base): def __init__(self, modelType...
53.079848
182
0.601695
from __future__ import division from builtins import str from builtins import range from past.utils import old_div import proteus from proteus.mprans.cMoveMesh import * from proteus.mprans.cMoveMesh2D import * class Coefficients(proteus.TransportCoefficients.TC_base): def __init__(self, modelType...
true
true
f7f75a96746e49407a881c06c1369b6bbd9f34e5
591
py
Python
database_service.py
LizaGenke/dinner-at-lizas
591841b807cc248d68139b6823ca2fb8fbad0452
[ "MIT" ]
null
null
null
database_service.py
LizaGenke/dinner-at-lizas
591841b807cc248d68139b6823ca2fb8fbad0452
[ "MIT" ]
null
null
null
database_service.py
LizaGenke/dinner-at-lizas
591841b807cc248d68139b6823ca2fb8fbad0452
[ "MIT" ]
null
null
null
import pyrebase import json with open('env/database_config.json', 'r') as config_file: config = json.load(config_file) firebase = pyrebase.initialize_app(config) # import firebase_admin # from firebase_admin import credentials # cred = credentials.Certificate("path/to/serviceAccountKey.json") # firebase_admin.init...
21.888889
91
0.734349
import pyrebase import json with open('env/database_config.json', 'r') as config_file: config = json.load(config_file) firebase = pyrebase.initialize_app(config) db = firebase.database() data = { "user": { "name": "Mortimer Smith" } } results = db.child("users").push(data) print(results)
true
true
f7f75bcb45ca3635c70b5e03ef40746b85a6857b
21,603
py
Python
python/ray/tests/test_actor_resources.py
AshHarvey/ray
f35339b5ff3d5e85c20720637e28bd5a380a545e
[ "Apache-2.0" ]
null
null
null
python/ray/tests/test_actor_resources.py
AshHarvey/ray
f35339b5ff3d5e85c20720637e28bd5a380a545e
[ "Apache-2.0" ]
null
null
null
python/ray/tests/test_actor_resources.py
AshHarvey/ray
f35339b5ff3d5e85c20720637e28bd5a380a545e
[ "Apache-2.0" ]
null
null
null
import collections import os import pytest try: import pytest_timeout except ImportError: pytest_timeout = None import sys import time import ray import ray.test_utils import ray.cluster_utils def test_actor_deletion_with_gpus(shutdown_only): ray.init( num_cpus=1, num_gpus=1, object_store_memory=...
33.493023
79
0.648336
import collections import os import pytest try: import pytest_timeout except ImportError: pytest_timeout = None import sys import time import ray import ray.test_utils import ray.cluster_utils def test_actor_deletion_with_gpus(shutdown_only): ray.init( num_cpus=1, num_gpus=1, object_store_memory=...
true
true
f7f75c32bc1653963cbbab84ee7282e0d0063ffe
8,078
py
Python
core/admin/mailu/ui/views/users.py
Nebukadneza/Mailu
c25c646909823dc4250636bb73167c6a2ea8b43c
[ "MIT" ]
null
null
null
core/admin/mailu/ui/views/users.py
Nebukadneza/Mailu
c25c646909823dc4250636bb73167c6a2ea8b43c
[ "MIT" ]
null
null
null
core/admin/mailu/ui/views/users.py
Nebukadneza/Mailu
c25c646909823dc4250636bb73167c6a2ea8b43c
[ "MIT" ]
null
null
null
from mailu import db, models, app from mailu.ui import ui, access, forms import flask import flask_login import wtforms import wtforms_components @ui.route('/user/list/<domain_name>', methods=['GET']) @access.domain_admin(models.Domain, 'domain_name') def user_list(domain_name): domain = models.Domain.query.get(...
42.072917
93
0.673929
from mailu import db, models, app from mailu.ui import ui, access, forms import flask import flask_login import wtforms import wtforms_components @ui.route('/user/list/<domain_name>', methods=['GET']) @access.domain_admin(models.Domain, 'domain_name') def user_list(domain_name): domain = models.Domain.query.get(...
true
true
f7f75dd62613ec944a98de990b49820e4b4fb528
95,865
py
Python
testsuite.py
weety/Kconfiglib
ef5358e8b8174716470b00691fba9946b7d307ce
[ "ISC" ]
null
null
null
testsuite.py
weety/Kconfiglib
ef5358e8b8174716470b00691fba9946b7d307ce
[ "ISC" ]
null
null
null
testsuite.py
weety/Kconfiglib
ef5358e8b8174716470b00691fba9946b7d307ce
[ "ISC" ]
null
null
null
# Copyright (c) 2011-2018, Ulf Magnusson # SPDX-License-Identifier: ISC # This is the Kconfiglib test suite. It runs selftests on Kconfigs provided by # us and tests compatibility with the C Kconfig implementation by comparing the # output of Kconfiglib with the output of the scripts/kconfig/*conf utilities # for diff...
32.277778
272
0.62105
# service. from kconfiglib import Kconfig, Symbol, Choice, COMMENT, MENU, MenuNode, \ BOOL, TRISTATE, HEX, STRING, \ TRI_TO_STR, \ escape, unescape, \ expr_str, expr_value, expr_items, split_e...
true
true
f7f75ebe5411c610c2b0d4c422d7d98754dee352
3,839
py
Python
build_dictionaries.py
spallas/wsd
97154b7c1ba5baa68e6336d709f188f416fe2f4c
[ "MIT" ]
4
2020-01-07T15:45:37.000Z
2020-09-11T08:25:14.000Z
build_dictionaries.py
spallas/wsd
97154b7c1ba5baa68e6336d709f188f416fe2f4c
[ "MIT" ]
1
2020-06-08T21:15:22.000Z
2020-06-09T21:56:03.000Z
build_dictionaries.py
spallas/wsd
97154b7c1ba5baa68e6336d709f188f416fe2f4c
[ "MIT" ]
1
2020-11-19T06:06:31.000Z
2020-11-19T06:06:31.000Z
import argparse from collections import OrderedDict from nltk.corpus import wordnet as wn def _get_dicts(syn_lemma_vocab='res/dictionaries/syn_lemma_vocab.txt', senses_vocab='res/dictionaries/senses.txt'): with open(senses_vocab) as f: sense2id = {line.strip().split()[0]: int(line.strip().s...
43.134831
99
0.642355
import argparse from collections import OrderedDict from nltk.corpus import wordnet as wn def _get_dicts(syn_lemma_vocab='res/dictionaries/syn_lemma_vocab.txt', senses_vocab='res/dictionaries/senses.txt'): with open(senses_vocab) as f: sense2id = {line.strip().split()[0]: int(line.strip().s...
true
true
f7f75fa6812685470f7d045729a7a77b6d6e0f56
12,299
py
Python
xgcm/test/test_autogenerate.py
IvanaEscobar/xgcm
2ecc59cbd0af9ac1d21eee9c2b18a639cf0e02b4
[ "MIT" ]
174
2015-09-19T16:40:29.000Z
2022-03-25T13:25:45.000Z
xgcm/test/test_autogenerate.py
IvanaEscobar/xgcm
2ecc59cbd0af9ac1d21eee9c2b18a639cf0e02b4
[ "MIT" ]
384
2015-10-27T18:55:28.000Z
2022-03-31T21:33:04.000Z
xgcm/test/test_autogenerate.py
andersy005/xgcm
95f4f33d72d2add00136e27f6b3bedecb97d4d77
[ "MIT" ]
74
2015-08-30T23:19:19.000Z
2021-07-29T00:41:49.000Z
import numpy as np import pytest import xarray as xr from xarray.testing import assert_allclose, assert_equal from xgcm.autogenerate import ( _fill_attrs, _parse_boundary_params, _parse_position, _position_to_relative, generate_axis, generate_grid_ds, ) # create test datasets pad_value = 1000 ...
31.616967
88
0.484917
import numpy as np import pytest import xarray as xr from xarray.testing import assert_allclose, assert_equal from xgcm.autogenerate import ( _fill_attrs, _parse_boundary_params, _parse_position, _position_to_relative, generate_axis, generate_grid_ds, ) pad_value = 1000 dx = 5.0 dy = 2.5 dz =...
true
true
f7f75fc521da9a6159324701bc2b50c00bb27f08
1,644
py
Python
Week 08/id_475/LeetCode_198_475.py
sekishi/algorithm004-05
1f1508c03edb94db96a7642e0c746233184a60d3
[ "Apache-2.0" ]
1
2019-10-12T06:48:45.000Z
2019-10-12T06:48:45.000Z
Week 08/id_475/LeetCode_198_475.py
sekishi/algorithm004-05
1f1508c03edb94db96a7642e0c746233184a60d3
[ "Apache-2.0" ]
null
null
null
Week 08/id_475/LeetCode_198_475.py
sekishi/algorithm004-05
1f1508c03edb94db96a7642e0c746233184a60d3
[ "Apache-2.0" ]
null
null
null
# 打家劫舍 # DP # 法一:一维数组 class Solution: def rob(self, nums: List[int]) -> int: if len(nums) == 0: return 0 if len(nums) == 1: return nums[0] # 创建数组 dp = [0] * len(nums) # 初始化数组 dp[0] = nums[0] dp[1] = max(nums[0],nums[1]) ...
27.864407
70
0.414234
class Solution: def rob(self, nums: List[int]) -> int: if len(nums) == 0: return 0 if len(nums) == 1: return nums[0] dp = [0] * len(nums) dp[0] = nums[0] dp[1] = max(nums[0],nums[1]) for i in range(2,len(n...
true
true
f7f75fec0375333f03591fba930dbd99b228e1fc
458
py
Python
data/scripts/templates/object/draft_schematic/weapon/component/shared_scope_weapon.py
obi-two/GameServer
7d37024e2291a97d49522610cd8f1dbe5666afc2
[ "MIT" ]
20
2015-02-23T15:11:56.000Z
2022-03-18T20:56:48.000Z
data/scripts/templates/object/draft_schematic/weapon/component/shared_scope_weapon.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
null
null
null
data/scripts/templates/object/draft_schematic/weapon/component/shared_scope_weapon.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
20
2015-04-04T16:35:59.000Z
2022-03-24T14:54:37.000Z
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Intangible() result.template = "object/draft_schematic/weapon/component/shared_scope_weapon.iff" result.attribute...
26.941176
84
0.731441
true
true
f7f762a365ccaf1e254982cb24ffeb96db2bb8ae
6,318
py
Python
grpclib/health/check.py
artificial-aidan/grpclib
948e32a29a4ad82ebbfdbb681f7a797f6233bff3
[ "BSD-3-Clause" ]
754
2017-08-01T23:41:24.000Z
2022-03-31T09:03:24.000Z
grpclib/health/check.py
artificial-aidan/grpclib
948e32a29a4ad82ebbfdbb681f7a797f6233bff3
[ "BSD-3-Clause" ]
154
2017-09-17T21:58:38.000Z
2022-03-10T20:58:39.000Z
grpclib/health/check.py
artificial-aidan/grpclib
948e32a29a4ad82ebbfdbb681f7a797f6233bff3
[ "BSD-3-Clause" ]
86
2017-09-17T12:53:23.000Z
2022-02-16T21:59:24.000Z
import abc import time import asyncio import logging import warnings from typing import Optional, Set, Callable, Awaitable from ..utils import DeadlineWrapper from ..metadata import Deadline log = logging.getLogger(__name__) DEFAULT_CHECK_TTL = 30 DEFAULT_CHECK_TIMEOUT = 10 _Status = Optional[bool] class CheckB...
28.588235
78
0.588319
import abc import time import asyncio import logging import warnings from typing import Optional, Set, Callable, Awaitable from ..utils import DeadlineWrapper from ..metadata import Deadline log = logging.getLogger(__name__) DEFAULT_CHECK_TTL = 30 DEFAULT_CHECK_TIMEOUT = 10 _Status = Optional[bool] class CheckB...
true
true
f7f7644ca49e57dd1a6bdb0cc8f2811b6bb5c356
4,641
py
Python
bempp/api/external/fenicsx.py
ignacia-fp/bempp-cl
a65232558826e51e624b1a4f649b6a0ed5a7f551
[ "MIT" ]
null
null
null
bempp/api/external/fenicsx.py
ignacia-fp/bempp-cl
a65232558826e51e624b1a4f649b6a0ed5a7f551
[ "MIT" ]
null
null
null
bempp/api/external/fenicsx.py
ignacia-fp/bempp-cl
a65232558826e51e624b1a4f649b6a0ed5a7f551
[ "MIT" ]
null
null
null
"""Interface to DOLFINX for FEM-BEM coupling.""" def boundary_grid_from_fenics_mesh(fenics_mesh): """ Create a Bempp boundary grid from a FEniCS Mesh. Return the Bempp grid and a map from the node numberings of the FEniCS mesh to the node numbers of the boundary grid. """ import bempp.api ...
32.683099
85
0.676147
def boundary_grid_from_fenics_mesh(fenics_mesh): import bempp.api import numpy as np from dolfinx.cpp.mesh import entities_to_geometry, exterior_facet_indices boundary = entities_to_geometry( fenics_mesh, fenics_mesh.topology.dim - 1, exterior_facet_indices(fenics_mesh), ...
true
true
f7f7652849187a87b9a4981eb7e2055a91bd9c9e
3,301
py
Python
example/example.py
twhiteaker/arc_panimate
b68f8ff43f2b9b665852c09124d35885ab4685b7
[ "MIT" ]
null
null
null
example/example.py
twhiteaker/arc_panimate
b68f8ff43f2b9b665852c09124d35885ab4685b7
[ "MIT" ]
null
null
null
example/example.py
twhiteaker/arc_panimate
b68f8ff43f2b9b665852c09124d35885ab4685b7
[ "MIT" ]
null
null
null
import inspect import json import os import sys import arcpy sys.path.append('../arc_panimate') import arc_panimate def _demo_follow_line(): """Demonstrate follow_line function. Requires data/demo.mxd next to this script. The map has a single dataframe with a line layer named Paths with an attribute na...
31.141509
79
0.609815
import inspect import json import os import sys import arcpy sys.path.append('../arc_panimate') import arc_panimate def _demo_follow_line(): """Demonstrate follow_line function. Requires data/demo.mxd next to this script. The map has a single dataframe with a line layer named Paths with an attribute na...
false
true
f7f765410c70a6bac214f9982212e2721a78b766
2,225
py
Python
port_scan_threading.py
michaelmdresser/neteng2017-ddos
78abbcac2bc9fc461e8f61307202f04a9d7b883d
[ "MIT" ]
null
null
null
port_scan_threading.py
michaelmdresser/neteng2017-ddos
78abbcac2bc9fc461e8f61307202f04a9d7b883d
[ "MIT" ]
null
null
null
port_scan_threading.py
michaelmdresser/neteng2017-ddos
78abbcac2bc9fc461e8f61307202f04a9d7b883d
[ "MIT" ]
null
null
null
#!/usr/bin/env python # https://securitylair.wordpress.com/2014/02/21/simple-port-scanner-in-python-with-scapy-2/ import time import Queue import threading import logging logging.getLogger("scapy.runtime").setLevel(logging.ERROR) from scapy.all import * closed = 0 class Scanner(threading.Thread): """ Scanner ...
28.896104
101
0.594157
import time import Queue import threading import logging logging.getLogger("scapy.runtime").setLevel(logging.ERROR) from scapy.all import * closed = 0 class Scanner(threading.Thread): """ Scanner Thread class """ def __init__(self, ip, test_port_queue, open_port_queue, lock): super(Scanner, self...
false
true
f7f765ad3a913c16cf6675d0ff79879c15b3b651
982
py
Python
iwpt2020/package_for_submit.py
attardi/iwpt-shared-task-2020
3a70c42d53716678776afcccf02d896655777353
[ "Apache-2.0" ]
3
2020-06-16T12:58:57.000Z
2021-06-07T21:07:37.000Z
iwpt2020/package_for_submit.py
attardi/iwpt-shared-task-2020
3a70c42d53716678776afcccf02d896655777353
[ "Apache-2.0" ]
6
2020-06-22T07:46:49.000Z
2022-02-10T02:22:14.000Z
iwpt2020/package_for_submit.py
attardi/iwpt-shared-task-2020
3a70c42d53716678776afcccf02d896655777353
[ "Apache-2.0" ]
2
2020-06-27T07:32:43.000Z
2020-11-10T07:21:03.000Z
# -*- coding:utf-8 -*- # Author: hankcs # Date: 2020-04-22 21:09 import glob import os from shutil import copyfile from edparser.metrics.parsing.iwpt20_eval import conllu_quick_fix, remove_complete_edges, remove_collapse_edges from iwpt2020 import cdroot def main(): cdroot() submission = 'data/model/iwpt2020...
29.757576
111
0.660896
import glob import os from shutil import copyfile from edparser.metrics.parsing.iwpt20_eval import conllu_quick_fix, remove_complete_edges, remove_collapse_edges from iwpt2020 import cdroot def main(): cdroot() submission = 'data/model/iwpt2020/emorynlp-submission' os.makedirs(submission, exist_ok=Tru...
true
true
f7f765b4aa77a2955b43e1e082ddda90d7050f46
63,678
py
Python
salt/utils/network.py
ContextLogic/salt
f98839c72df2294cdd1670835d10904b12089622
[ "Apache-2.0" ]
null
null
null
salt/utils/network.py
ContextLogic/salt
f98839c72df2294cdd1670835d10904b12089622
[ "Apache-2.0" ]
null
null
null
salt/utils/network.py
ContextLogic/salt
f98839c72df2294cdd1670835d10904b12089622
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Define some generic socket functions for network modules ''' # Import python libs from __future__ import absolute_import, unicode_literals, print_function import itertools import os import re import types import socket import logging import platform import random import subprocess from stri...
33.200209
134
0.566538
from __future__ import absolute_import, unicode_literals, print_function import itertools import os import re import types import socket import logging import platform import random import subprocess from string import ascii_letters, digits from salt.ext import six from salt.ext.six.moves import range try: ...
true
true
f7f766642397ef85a2fa7f20d230bb307e3a6828
7,804
py
Python
docs/conf.py
ProkMar/case5_homework
7606dfc2127aec366f48d14c4d4737e93ceb0a87
[ "MIT" ]
null
null
null
docs/conf.py
ProkMar/case5_homework
7606dfc2127aec366f48d14c4d4737e93ceb0a87
[ "MIT" ]
null
null
null
docs/conf.py
ProkMar/case5_homework
7606dfc2127aec366f48d14c4d4737e93ceb0a87
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # case5_homework documentation build configuration file, created by # sphinx-quickstart. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values...
31.853061
80
0.708355
import os import sys extensions = [] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'case5_homework' # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. version = '0.1' # ...
true
true
f7f7676817428dfeaa132ad7ad9fa21330e6fe0c
2,396
py
Python
pc-bot/cmd.py
magnickolas/pc-bot
32c16a5213deaba5e66265cbadb73bafe9078404
[ "MIT" ]
null
null
null
pc-bot/cmd.py
magnickolas/pc-bot
32c16a5213deaba5e66265cbadb73bafe9078404
[ "MIT" ]
null
null
null
pc-bot/cmd.py
magnickolas/pc-bot
32c16a5213deaba5e66265cbadb73bafe9078404
[ "MIT" ]
null
null
null
from functools import wraps from pathlib import Path from subprocess import CalledProcessError, check_call, DEVNULL from urllib.request import urlopen from loguru import logger from paramiko import AutoAddPolicy from paramiko.client import SSHClient from paramiko.config import SSHConfig from .config import TG_ID, MA...
30.329114
114
0.628965
from functools import wraps from pathlib import Path from subprocess import CalledProcessError, check_call, DEVNULL from urllib.request import urlopen from loguru import logger from paramiko import AutoAddPolicy from paramiko.client import SSHClient from paramiko.config import SSHConfig from .config import TG_ID, MA...
true
true
f7f7688a6bdc0768e6e4e2abb0bd6f041e48c972
2,175
py
Python
Month 03/Week 01/Day 04/d.py
KevinKnott/Coding-Review
6a83cb798cc317d1e4357ac6b2b1fbf76fa034fb
[ "MIT" ]
null
null
null
Month 03/Week 01/Day 04/d.py
KevinKnott/Coding-Review
6a83cb798cc317d1e4357ac6b2b1fbf76fa034fb
[ "MIT" ]
null
null
null
Month 03/Week 01/Day 04/d.py
KevinKnott/Coding-Review
6a83cb798cc317d1e4357ac6b2b1fbf76fa034fb
[ "MIT" ]
null
null
null
# Is Graph Bipartite?: https://leetcode.com/problems/is-graph-bipartite/ # There is an undirected graph with n nodes, where each node is numbered between 0 and n - 1. You are given a 2D array graph, where graph[u] is an array of nodes that node u is adjacent to. More formally, for each v in graph[u], there is an undir...
39.545455
323
0.648736
class Solution: def isBipartite(self, graph) -> bool: visited = {} self.hasFaled = False def dfs(node, color=0): if node in visited: if visited[node] ^ color: self.hasFaled = True return False ...
true
true
f7f76895dbd522ada9e5faf2505b3b065054aa1b
5,616
py
Python
bird_view/models/birdview.py
jostl/masters-thesis
211e1f12a07428d37507e2bddc808f6da1149efb
[ "MIT" ]
3
2021-06-19T10:49:26.000Z
2022-03-26T11:31:28.000Z
bird_view/models/birdview.py
jostl/masters-thesis
211e1f12a07428d37507e2bddc808f6da1149efb
[ "MIT" ]
1
2021-10-12T15:40:55.000Z
2021-10-12T15:40:55.000Z
bird_view/models/birdview.py
jostl/masters-thesis
211e1f12a07428d37507e2bddc808f6da1149efb
[ "MIT" ]
null
null
null
import cv2 import numpy as np import torch import torch.nn as nn from . import common from .agent import Agent from .controller import PIDController, CustomController from .controller import ls_circle STEPS = 5 SPEED_STEPS = 3 COMMANDS = 4 DT = 0.1 CROP_SIZE = 192 PIXELS_PER_METER = 5 def regression_base(): r...
32.091429
99
0.567308
import cv2 import numpy as np import torch import torch.nn as nn from . import common from .agent import Agent from .controller import PIDController, CustomController from .controller import ls_circle STEPS = 5 SPEED_STEPS = 3 COMMANDS = 4 DT = 0.1 CROP_SIZE = 192 PIXELS_PER_METER = 5 def regression_base(): r...
true
true
f7f768f7511e008b1772d075266a4d419b58f3d7
75,962
py
Python
synapse/handlers/sync.py
zauguin/synapse
ea00f18135ce30e8415526ce68585ea90da5b856
[ "Apache-2.0" ]
null
null
null
synapse/handlers/sync.py
zauguin/synapse
ea00f18135ce30e8415526ce68585ea90da5b856
[ "Apache-2.0" ]
null
null
null
synapse/handlers/sync.py
zauguin/synapse
ea00f18135ce30e8415526ce68585ea90da5b856
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2015, 2016 OpenMarket Ltd # Copyright 2018 New Vector 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....
39.440291
90
0.596746
import collections import itertools import logging from six import iteritems, itervalues from prometheus_client import Counter from twisted.internet import defer from synapse.api.constants import EventTypes, Membership from synapse.push.clientformat import format_push_rules_for_user from synapse.sto...
true
true
f7f76a8dbbe03fcfd920e2164c035881009fb089
31
py
Python
test/example/python/kwargs.py
Hirse/brackets-outline-list
a42568bb92d2b9a98f1d33d89f251c8b97b662b1
[ "MIT" ]
88
2015-01-03T11:20:13.000Z
2021-08-19T19:15:40.000Z
test/example/python/kwargs.py
Hirse/brackets-outline-list
a42568bb92d2b9a98f1d33d89f251c8b97b662b1
[ "MIT" ]
101
2015-01-08T12:28:47.000Z
2022-03-02T03:34:12.000Z
test/example/python/kwargs.py
Hirse/brackets-outline-list
a42568bb92d2b9a98f1d33d89f251c8b97b662b1
[ "MIT" ]
51
2015-01-03T11:20:14.000Z
2021-02-23T07:09:59.000Z
def whoami(**kwargs): pass
10.333333
21
0.612903
def whoami(**kwargs): pass
true
true
f7f76ad3a9f9e445bf7a7b2318ffb9bc4aa25f30
3,996
py
Python
University/sem 1/Roots/RootMethods.py
Watcher1337/Python
e063bdce3d972cf71fbdf7df567afbd6b6623141
[ "MIT" ]
null
null
null
University/sem 1/Roots/RootMethods.py
Watcher1337/Python
e063bdce3d972cf71fbdf7df567afbd6b6623141
[ "MIT" ]
null
null
null
University/sem 1/Roots/RootMethods.py
Watcher1337/Python
e063bdce3d972cf71fbdf7df567afbd6b6623141
[ "MIT" ]
1
2019-01-17T15:49:06.000Z
2019-01-17T15:49:06.000Z
import math as m # Методы для нахождения корней уравнения с точностью eps на заданном промежутке def f(x): return x ** 3 + x - 2 def f_prime(x): return 3 * x ** 2 + 1 # ------------------------------------------------------ # Метод Ньютона(касательных) # Для получения сжимающего отображения применяется метод прост...
29.6
99
0.535536
import math as m def f(x): return x ** 3 + x - 2 def f_prime(x): return 3 * x ** 2 + 1 def newtone(a,b,eps): c = a result = c x = c - f(c) / f_prime(c) while abs(result - x) > eps: result = x x = x - f(x) / f_prime(x) return x def easy_newtone(a,b,eps): c = (a + b) / 2 result = c x = c - f(c) /...
true
true
f7f76b1eeda6ae1996bf716246f781b095c6da3a
4,089
py
Python
tutorials/stats-sensor-space/plot_stats_cluster_1samp_test_time_frequency.py
abramhindle/mne-python
989390a484cba219aae74c778b71568586f9edb2
[ "BSD-3-Clause" ]
null
null
null
tutorials/stats-sensor-space/plot_stats_cluster_1samp_test_time_frequency.py
abramhindle/mne-python
989390a484cba219aae74c778b71568586f9edb2
[ "BSD-3-Clause" ]
1
2019-09-17T23:54:38.000Z
2019-09-17T23:54:38.000Z
tutorials/stats-sensor-space/plot_stats_cluster_1samp_test_time_frequency.py
abramhindle/mne-python
989390a484cba219aae74c778b71568586f9edb2
[ "BSD-3-Clause" ]
null
null
null
""" =============================================================== Non-parametric 1 sample cluster statistic on single trial power =============================================================== This script shows how to estimate significant clusters in time-frequency power estimates. It uses a non-parametric statisti...
32.712
79
0.630227
import numpy as np import matplotlib.pyplot as plt import mne from mne.time_frequency import tfr_morlet from mne.stats import permutation_cluster_1samp_test from mne.datasets import sample print(__doc__)
true
true
f7f76b7f9f4b3d20d8a6b74c87176038ceefa163
20,840
py
Python
baselines/deepq_n_step/build_graph.py
LinghengMeng/openai_baselines_extension
65ec57a71be77b6cfd92defd070d76ae225a92e7
[ "MIT" ]
null
null
null
baselines/deepq_n_step/build_graph.py
LinghengMeng/openai_baselines_extension
65ec57a71be77b6cfd92defd070d76ae225a92e7
[ "MIT" ]
null
null
null
baselines/deepq_n_step/build_graph.py
LinghengMeng/openai_baselines_extension
65ec57a71be77b6cfd92defd070d76ae225a92e7
[ "MIT" ]
null
null
null
"""Deep Q learning graph The functions in this file can are used to create the following functions: ======= act ======== Function to chose an action given an observation Parameters ---------- observation: object Observation that can be feed into the output of make_obs_ph stochastic: bool...
46.208426
168
0.669674
import tensorflow as tf import baselines.common.tf_util as U def scope_vars(scope, trainable_only=False): return tf.get_collection( tf.GraphKeys.TRAINABLE_VARIABLES if trainable_only else tf.GraphKeys.GLOBAL_VARIABLES, scope=scope if isinstance(scope, str) else scope.name ) def scope_name():...
true
true
f7f76c59e08fe8569a149d156bf36cfecb763081
985
py
Python
generator/group.py
AlreyQuin/python_training
7b14723a61768cb5cbf58c3192e64fd9fc98d6ab
[ "Apache-2.0" ]
null
null
null
generator/group.py
AlreyQuin/python_training
7b14723a61768cb5cbf58c3192e64fd9fc98d6ab
[ "Apache-2.0" ]
null
null
null
generator/group.py
AlreyQuin/python_training
7b14723a61768cb5cbf58c3192e64fd9fc98d6ab
[ "Apache-2.0" ]
null
null
null
from model.group import Group import random import string import os.path import jsonpickle import getopt import sys try: opts, args = getopt.getopt(sys.argv[1:], "n:f:", ["number of groups", "file"]) except getopt.GetoptError as err: getopt.usage() sys.exit(2) n = 5 f = "data/groups.json" for o, a in op...
24.625
135
0.647716
from model.group import Group import random import string import os.path import jsonpickle import getopt import sys try: opts, args = getopt.getopt(sys.argv[1:], "n:f:", ["number of groups", "file"]) except getopt.GetoptError as err: getopt.usage() sys.exit(2) n = 5 f = "data/groups.json" for o, a in op...
true
true
f7f76cd61bc4095247c0f7686a55424c769bfb33
14,393
py
Python
projectq/ops/_qubit_operator_test.py
VirtueQuantumCloud/projectqX
fa484fe037a3a1772127bbd00fe4628ddba34611
[ "Apache-2.0" ]
null
null
null
projectq/ops/_qubit_operator_test.py
VirtueQuantumCloud/projectqX
fa484fe037a3a1772127bbd00fe4628ddba34611
[ "Apache-2.0" ]
null
null
null
projectq/ops/_qubit_operator_test.py
VirtueQuantumCloud/projectqX
fa484fe037a3a1772127bbd00fe4628ddba34611
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 ProjectQ-Framework (www.projectq.ch) # # 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 app...
31.15368
78
0.564302
import copy import numpy import pytest from projectq.ops import _qubit_operator as qo def test_pauli_operator_product_unchanged(): correct = {('I', 'I'): (1., 'I'), ('I', 'X'): (1., 'X'), ('X', 'I'): (1., 'X'), ('I', 'Y'): (1., 'Y'), ('Y'...
true
true
f7f76dcfbd7015d65610d16e50728f5601080041
326
py
Python
bann/b_frameworks/pytorch/p_activation_fun/p_activation_fun_enum.py
arturOnRails/BANN
027af04349304941fb73c2ede502aca4b76f1ad1
[ "MIT" ]
null
null
null
bann/b_frameworks/pytorch/p_activation_fun/p_activation_fun_enum.py
arturOnRails/BANN
027af04349304941fb73c2ede502aca4b76f1ad1
[ "MIT" ]
null
null
null
bann/b_frameworks/pytorch/p_activation_fun/p_activation_fun_enum.py
arturOnRails/BANN
027af04349304941fb73c2ede502aca4b76f1ad1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """.. moduleauthor:: Artur Lissin""" from enum import Enum from typing import final @final class PActId(Enum): LOGSOFTMAX = 'LogSoftMax' NONE = 'NoLayer' SOFTMAX = 'SoftMax' RELU = 'ReLu' ELU = 'ELu' LRELU = 'LReLu' SILU = 'SiLu' TANH = 'Tanh' SIGMOID = 'Sig...
18.111111
36
0.58589
from enum import Enum from typing import final @final class PActId(Enum): LOGSOFTMAX = 'LogSoftMax' NONE = 'NoLayer' SOFTMAX = 'SoftMax' RELU = 'ReLu' ELU = 'ELu' LRELU = 'LReLu' SILU = 'SiLu' TANH = 'Tanh' SIGMOID = 'Sigmoid'
true
true
f7f76e0fc7a709ebf9eb534fcbcfe6f125ceb1ce
1,416
py
Python
src/Miscellaneous/Parser/ParserClass.py
edouard-lebas/CryptoGenerator
d43f2b3fa472493f49015e8402e382681692a63c
[ "MIT" ]
null
null
null
src/Miscellaneous/Parser/ParserClass.py
edouard-lebas/CryptoGenerator
d43f2b3fa472493f49015e8402e382681692a63c
[ "MIT" ]
null
null
null
src/Miscellaneous/Parser/ParserClass.py
edouard-lebas/CryptoGenerator
d43f2b3fa472493f49015e8402e382681692a63c
[ "MIT" ]
null
null
null
import argparse class ParserClass: def __init__(self): self.parser = argparse.ArgumentParser(description="Crypto / Hash Translator", usage="\npython CryptoHashTranslator.py --translate --text textToTranslate --md5 \npython CryptoHashTranslator.py --generate --text textToGenerate --md5") self.setAr...
42.909091
240
0.617938
import argparse class ParserClass: def __init__(self): self.parser = argparse.ArgumentParser(description="Crypto / Hash Translator", usage="\npython CryptoHashTranslator.py --translate --text textToTranslate --md5 \npython CryptoHashTranslator.py --generate --text textToGenerate --md5") self.setAr...
true
true
f7f76e61faf32cac7de3d02a9884550a03a23708
211
py
Python
tests/test_version.py
dataops-tk/tapdance
9ba09ab1625bb3bb49ca7cc4fe659402280b038f
[ "MIT" ]
8
2020-04-23T05:45:38.000Z
2020-08-29T23:26:58.000Z
tests/test_version.py
aaronsteers/tapdance
9ba09ab1625bb3bb49ca7cc4fe659402280b038f
[ "MIT" ]
7
2020-05-11T17:36:59.000Z
2021-02-10T20:48:30.000Z
tests/test_version.py
dataops-tk/tapdance
9ba09ab1625bb3bb49ca7cc4fe659402280b038f
[ "MIT" ]
null
null
null
"""Test Version Prints""" from tapdance import cli def test_print_version(): """Test the ability to print a version string""" cli.print_version() if __name__ == "__main__": test_print_version()
16.230769
52
0.691943
from tapdance import cli def test_print_version(): cli.print_version() if __name__ == "__main__": test_print_version()
true
true
f7f76ee4ab2c9f7027d85ae0fa5e6d857e647a38
675
py
Python
easydbo/main/cli/select/alias.py
kinkalow/easydbo
a1925e130f74d03b77683b7906d5ca46eff56167
[ "MIT" ]
1
2021-12-16T03:11:06.000Z
2021-12-16T03:11:06.000Z
easydbo/main/cli/select/alias.py
kinkalow/easydbo
a1925e130f74d03b77683b7906d5ca46eff56167
[ "MIT" ]
null
null
null
easydbo/main/cli/select/alias.py
kinkalow/easydbo
a1925e130f74d03b77683b7906d5ca46eff56167
[ "MIT" ]
null
null
null
from easydbo.init.alias import AliasManagerCLI from easydbo.output.print_ import SimplePrint as SP def main(arguments, configs, tableop, dbop): aliasmgr = AliasManagerCLI() # Check tgt_alias_name = arguments.name if not tgt_alias_name: SP.error('--alias option is required at this time') al...
30.681818
67
0.734815
from easydbo.init.alias import AliasManagerCLI from easydbo.output.print_ import SimplePrint as SP def main(arguments, configs, tableop, dbop): aliasmgr = AliasManagerCLI() tgt_alias_name = arguments.name if not tgt_alias_name: SP.error('--alias option is required at this time') aliasmgr....
true
true
f7f76ee957473f9252e6a9858c5daa7ac006e93b
1,958
py
Python
openaerostruct/structures/tests/test_vonmises_wingbox.py
EricUrbineer/OpenAeroStruct
26c37a0e86074517680405687824e27b3b2caaec
[ "Apache-2.0" ]
4
2020-09-15T23:24:15.000Z
2021-01-11T19:59:39.000Z
openaerostruct/structures/tests/test_vonmises_wingbox.py
EricUrbineer/OpenAeroStruct
26c37a0e86074517680405687824e27b3b2caaec
[ "Apache-2.0" ]
null
null
null
openaerostruct/structures/tests/test_vonmises_wingbox.py
EricUrbineer/OpenAeroStruct
26c37a0e86074517680405687824e27b3b2caaec
[ "Apache-2.0" ]
2
2020-08-25T16:38:14.000Z
2020-12-03T09:49:45.000Z
import unittest import numpy as np from openmdao.api import Group, IndepVarComp from openaerostruct.structures.vonmises_wingbox import VonMisesWingbox from openaerostruct.utils.testing import run_test, get_default_surfaces class Test(unittest.TestCase): def test(self): surface = get_default_surfaces()[0]...
36.259259
91
0.615424
import unittest import numpy as np from openmdao.api import Group, IndepVarComp from openaerostruct.structures.vonmises_wingbox import VonMisesWingbox from openaerostruct.utils.testing import run_test, get_default_surfaces class Test(unittest.TestCase): def test(self): surface = get_default_surfaces()[0]...
true
true
f7f76fce8fecfca7f63f370a75e89d265e1f2469
4,607
py
Python
python/otimage/deformations.py
evarol/ot_tracking
cddf27558fa5679ef06aad6a0945c34db0209ee7
[ "MIT" ]
1
2020-04-05T17:01:39.000Z
2020-04-05T17:01:39.000Z
python/otimage/deformations.py
evarol/ot_tracking
cddf27558fa5679ef06aad6a0945c34db0209ee7
[ "MIT" ]
null
null
null
python/otimage/deformations.py
evarol/ot_tracking
cddf27558fa5679ef06aad6a0945c34db0209ee7
[ "MIT" ]
1
2021-06-03T16:48:45.000Z
2021-06-03T16:48:45.000Z
"""Deformation models for worm registration""" from abc import ABC, abstractmethod import numpy as np import matplotlib.pyplot as plt from sklearn.preprocessing import PolynomialFeatures from sklearn.linear_model import LinearRegression from sklearn.pipeline import Pipeline class DeformationModel(ABC): @abstra...
26.477011
71
0.408292
from abc import ABC, abstractmethod import numpy as np import matplotlib.pyplot as plt from sklearn.preprocessing import PolynomialFeatures from sklearn.linear_model import LinearRegression from sklearn.pipeline import Pipeline class DeformationModel(ABC): @abstractmethod def fit(self, x, y, weights): ...
true
true
f7f7704b4a1f14593200d6d01e141ad1264d40b9
1,866
py
Python
doepy/Test/doepy/read_write.py
Sigmun/doepy
091df7e3cc8efd5e604fa99e40c4ca5f7f49de25
[ "MIT" ]
92
2019-07-22T17:34:34.000Z
2022-03-29T08:58:22.000Z
doepy/Test/doepy/read_write.py
Sigmun/doepy
091df7e3cc8efd5e604fa99e40c4ca5f7f49de25
[ "MIT" ]
10
2020-02-14T11:27:15.000Z
2022-02-13T22:07:33.000Z
doepy/Test/doepy/read_write.py
Sigmun/doepy
091df7e3cc8efd5e604fa99e40c4ca5f7f49de25
[ "MIT" ]
26
2019-08-15T14:18:55.000Z
2022-03-31T15:48:10.000Z
import csv # ========================================================== # Function for reading a CSV file into a dictionary format # ========================================================== def read_variables_csv(csvfile): """ Builds a Python dictionary object from an input CSV file. Helper function to ...
38.875
113
0.543408
import csv def read_variables_csv(csvfile): dict_key={} try: with open(csvfile) as f: reader = csv.DictReader(f) fields = reader.fieldnames for field in fields: lst=[] with open(csvfile) as f: reader = csv.DictR...
true
true
f7f770cfaffd2ea33312dd398bd03d14defe7aa1
27,386
py
Python
lib/dev_server_wrapper.py
hustwei/chromite
10eb79abeb64e859362546214b7e039096ac9830
[ "BSD-3-Clause" ]
null
null
null
lib/dev_server_wrapper.py
hustwei/chromite
10eb79abeb64e859362546214b7e039096ac9830
[ "BSD-3-Clause" ]
null
null
null
lib/dev_server_wrapper.py
hustwei/chromite
10eb79abeb64e859362546214b7e039096ac9830
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2011 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Module containing methods and classes to interact with a devserver instance. """ from __future__ import print_function import multiprocessing imp...
35.705346
80
0.682429
from __future__ import print_function import multiprocessing import os import socket import shutil import sys import tempfile import httplib import urllib2 import urlparse from chromite.lib import constants from chromite.cli import command from chromite.lib import cros_build_lib from chromite.lib import cros_log...
true
true
f7f770d77835c8395aa86ea8522e3f36a6066d2d
6,003
py
Python
awx_collection/plugins/modules/tower_instance_group.py
DamoR25/awxnew
03ed6e97558ae090ea52703caf6ed1b196557981
[ "Apache-2.0" ]
11,396
2017-09-07T04:56:02.000Z
2022-03-31T13:56:17.000Z
awx_collection/plugins/modules/tower_instance_group.py
DamoR25/awxnew
03ed6e97558ae090ea52703caf6ed1b196557981
[ "Apache-2.0" ]
11,046
2017-09-07T09:30:46.000Z
2022-03-31T20:28:01.000Z
awx_collection/plugins/modules/tower_instance_group.py
TinLe/awx
73d8c12e3bf5b193305ed1202549331ea00088c1
[ "Apache-2.0" ]
3,592
2017-09-07T04:14:31.000Z
2022-03-31T23:53:09.000Z
#!/usr/bin/python # coding: utf-8 -*- # (c) 2020, John Westcott IV <john.westcott.iv@redhat.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version'...
36.162651
156
0.695819
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = ''' --- module: instance_group author: "John Westcott IV (@john-westcott-iv)" version_added: "4.0.0" short_d...
true
true
f7f77101cd59393b0ea89ebff088b0aa3d848f89
14,352
py
Python
src/anygen/__init__.py
kshpytsya/anygen
418d5d98550bc305514ef26e925cf5c0e0846c59
[ "MIT" ]
null
null
null
src/anygen/__init__.py
kshpytsya/anygen
418d5d98550bc305514ef26e925cf5c0e0846c59
[ "MIT" ]
null
null
null
src/anygen/__init__.py
kshpytsya/anygen
418d5d98550bc305514ef26e925cf5c0e0846c59
[ "MIT" ]
null
null
null
import c3linearize as _c3linearize import collections as _collections import jinja2 as _jinja2 import json as _json import pathlib as _pathlib import pkg_resources as _pkg_resources import ruamel.yaml as _yaml from ruamel.yaml import YAML as _YAML import runpy as _runpy import subprocess as _subprocess import sys as _s...
28.877264
111
0.604236
import c3linearize as _c3linearize import collections as _collections import jinja2 as _jinja2 import json as _json import pathlib as _pathlib import pkg_resources as _pkg_resources import ruamel.yaml as _yaml from ruamel.yaml import YAML as _YAML import runpy as _runpy import subprocess as _subprocess import sys as _s...
true
true
f7f7715cde2a7388f587cf7db9ed983c764367e2
858
py
Python
examples/units/bar_unit_demo.py
SoftwareDev/mat-plot-lib
abaf94859d5ef6e653a4d8a7ce2c59cea1724a57
[ "MIT", "BSD-3-Clause" ]
16
2016-06-14T19:45:35.000Z
2020-11-30T19:02:58.000Z
lib/mpl_examples/units/bar_unit_demo.py
yingkailiang/matplotlib
255a79b106c98c1904489afe6a754e4d943179d6
[ "MIT", "BSD-3-Clause" ]
7
2015-05-08T19:36:25.000Z
2015-06-30T15:32:17.000Z
lib/mpl_examples/units/bar_unit_demo.py
yingkailiang/matplotlib
255a79b106c98c1904489afe6a754e4d943179d6
[ "MIT", "BSD-3-Clause" ]
6
2015-06-05T03:34:06.000Z
2022-01-25T09:07:10.000Z
#!/usr/bin/env python import numpy as np from basic_units import cm, inch import matplotlib.pyplot as plt N = 5 menMeans = (150*cm, 160*cm, 146*cm, 172*cm, 155*cm) menStd = ( 20*cm, 30*cm, 32*cm, 10*cm, 20*cm) fig, ax = plt.subplots() ind = np.arange(N) # the x locations for the groups width = 0.35 ...
26.8125
80
0.651515
import numpy as np from basic_units import cm, inch import matplotlib.pyplot as plt N = 5 menMeans = (150*cm, 160*cm, 146*cm, 172*cm, 155*cm) menStd = ( 20*cm, 30*cm, 32*cm, 10*cm, 20*cm) fig, ax = plt.subplots() ind = np.arange(N) width = 0.35 p1 = ax.bar(ind, menMeans, width, color='r', bottom...
true
true