hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | 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 209 | max_issues_repo_name stringlengths 5 121 | 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 209 | max_forks_repo_name stringlengths 5 121 | 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 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0f1c2d482a9d464ee63f7a050253a80eb52a5d47 | 659 | py | Python | imagefactory_plugins/Atlas/__init__.py | zyga/imagefactory | b2a57168f1ef6608aedad73ed7ccd1e3626b2967 | [
"Apache-2.0"
] | 1 | 2019-06-16T07:05:24.000Z | 2019-06-16T07:05:24.000Z | imagefactory_plugins/Atlas/__init__.py | zyga/imagefactory | b2a57168f1ef6608aedad73ed7ccd1e3626b2967 | [
"Apache-2.0"
] | null | null | null | imagefactory_plugins/Atlas/__init__.py | zyga/imagefactory | b2a57168f1ef6608aedad73ed7ccd1e3626b2967 | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
# Copyright 2016 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 36.611111 | 76 | 0.737481 |
6c8143bcec986a0fd2ec04d249c3ab0573a6c5a7 | 44,514 | py | Python | keepercommander/commands/register.py | esa-security-deverlopment/Commander | 1cdba2e7ee3be17cba5ee5e6dc507e462dd6add5 | [
"MIT"
] | null | null | null | keepercommander/commands/register.py | esa-security-deverlopment/Commander | 1cdba2e7ee3be17cba5ee5e6dc507e462dd6add5 | [
"MIT"
] | null | null | null | keepercommander/commands/register.py | esa-security-deverlopment/Commander | 1cdba2e7ee3be17cba5ee5e6dc507e462dd6add5 | [
"MIT"
] | null | null | null | # _ __
# | |/ /___ ___ _ __ ___ _ _ ®
# | ' </ -_) -_) '_ \/ -_) '_|
# |_|\_\___\___| .__/\___|_|
# |_|
#
# Keeper Commander
# Copyright 2018 Keeper Security Inc.
# Contact: ops@keepersecurity.com
#
import argparse
import getpass
import re
import os
import base64
import json
import logging
from urllib... | 45.796296 | 184 | 0.481781 |
2851f310618c8917f3028e1bb80b50a4be466a29 | 14,826 | py | Python | engine/2.80/scripts/addons_contrib/object_color_rules.py | byteinc/Phasor | f7d23a489c2b4bcc3c1961ac955926484ff8b8d9 | [
"Unlicense"
] | 2 | 2019-03-20T13:10:46.000Z | 2019-05-15T20:00:31.000Z | engine/2.80/scripts/addons_contrib/object_color_rules.py | byteinc/Phasor | f7d23a489c2b4bcc3c1961ac955926484ff8b8d9 | [
"Unlicense"
] | null | null | null | engine/2.80/scripts/addons_contrib/object_color_rules.py | byteinc/Phasor | f7d23a489c2b4bcc3c1961ac955926484ff8b8d9 | [
"Unlicense"
] | null | null | null | # ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed ... | 30.506173 | 113 | 0.596857 |
114779832f44d374eeab22357254999500380424 | 751 | py | Python | vcflat/tests/test_VcfParse/test_sanitize_keys.py | arontommi/VCFlat | f707d8e564ec30c65e063eea305aa30cf698cc86 | [
"MIT"
] | 4 | 2019-11-29T12:59:12.000Z | 2020-01-28T15:30:44.000Z | vcflat/tests/test_VcfParse/test_sanitize_keys.py | arontommi/VCFlat | f707d8e564ec30c65e063eea305aa30cf698cc86 | [
"MIT"
] | 1 | 2022-01-04T22:58:58.000Z | 2022-01-04T22:58:58.000Z | vcflat/tests/test_VcfParse/test_sanitize_keys.py | arontommi/VCFlat | f707d8e564ec30c65e063eea305aa30cf698cc86 | [
"MIT"
] | 1 | 2020-01-28T15:31:29.000Z | 2020-01-28T15:31:29.000Z | import vcflat.VcfParse as VP
import os
import pytest
def get_input():
test_data_dir = os.path.join(os.path.dirname(__file__), "..", "test_data")
i = os.path.join(test_data_dir, "test.snpeff.vcf")
vcffile = VP.VcfParse(i)
return vcffile
def test_1():
""" Check i the keys are found in the header o... | 25.033333 | 89 | 0.660453 |
0d59e8cb16bef418e866500a570fda2c7d7e70db | 1,805 | py | Python | qiskit_neko/config.py | garrison/qiskit-neko | 50c6f0f6975425c7ff86417cedc094e984dc5d1c | [
"Apache-2.0"
] | 5 | 2022-01-11T16:07:48.000Z | 2022-02-01T22:05:34.000Z | qiskit_neko/config.py | garrison/qiskit-neko | 50c6f0f6975425c7ff86417cedc094e984dc5d1c | [
"Apache-2.0"
] | 1 | 2022-02-03T14:10:57.000Z | 2022-02-03T14:10:57.000Z | qiskit_neko/config.py | garrison/qiskit-neko | 50c6f0f6975425c7ff86417cedc094e984dc5d1c | [
"Apache-2.0"
] | 1 | 2022-03-07T15:06:21.000Z | 2022-03-07T15:06:21.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2022.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative wo... | 30.083333 | 79 | 0.67036 |
5d922ad9daeac39137413c21c3b00753eec6307d | 410 | py | Python | viewsets/change_serializer.py | R-Mielamud/Nicolaus | 05a28a19ca0127cf39b1238dc313cecd6e528c40 | [
"MIT"
] | null | null | null | viewsets/change_serializer.py | R-Mielamud/Nicolaus | 05a28a19ca0127cf39b1238dc313cecd6e528c40 | [
"MIT"
] | null | null | null | viewsets/change_serializer.py | R-Mielamud/Nicolaus | 05a28a19ca0127cf39b1238dc313cecd6e528c40 | [
"MIT"
] | 1 | 2021-03-09T16:06:23.000Z | 2021-03-09T16:06:23.000Z | from rest_framework.viewsets import ModelViewSet
class ChangeSerializerViewSet(ModelViewSet):
for_admin = False
def get_serializer_class(self):
if ((self.action == "list" or self.action == "retrieve") and
not (self.for_admin and self.request.GET.get("admin") == "1")):
retur... | 34.166667 | 79 | 0.665854 |
bbfdacdd057c71de652ec8de11e9d5e1e00c3cd6 | 322 | py | Python | activations.py | rpams/Neural_network | 6ef3227fb5fc69bcec8aa462e0f3d6ba17a8babf | [
"MIT"
] | 1 | 2020-06-15T14:09:48.000Z | 2020-06-15T14:09:48.000Z | activations.py | rpams/Neural_network | 6ef3227fb5fc69bcec8aa462e0f3d6ba17a8babf | [
"MIT"
] | null | null | null | activations.py | rpams/Neural_network | 6ef3227fb5fc69bcec8aa462e0f3d6ba17a8babf | [
"MIT"
] | null | null | null | import numpy as np
# activation functions and their derivative
def tanh(x):
return np.tanh(x)
def tanh_prime(x):
return 1 - np.tanh(x) ** 2
def sigmoid(x):
return 1 / 1 + np.exp(-x)
def sigmoid_prime(x):
return x * (1 - x)
def gauss(x):
return np.exp(-x)
def gauss_prime(x):
return -np.exp(-... | 15.333333 | 43 | 0.624224 |
fee58240bada87e6d34af5a1cb6572a7a5b8f125 | 26,358 | py | Python | generation_props.py | schithranandanurix/GA | f4eb388116c45bbe178835f9da0d899199b1105c | [
"Apache-1.1"
] | null | null | null | generation_props.py | schithranandanurix/GA | f4eb388116c45bbe178835f9da0d899199b1105c | [
"Apache-1.1"
] | null | null | null | generation_props.py | schithranandanurix/GA | f4eb388116c45bbe178835f9da0d899199b1105c | [
"Apache-1.1"
] | null | null | null | '''
Functions that are used while a Generation is being Evaluated
'''
import os
import multiprocessing
from rdkit import Chem
import numpy as np
from random import randrange
import discriminator as D
import evolution_functions as evo
from SAS_calculator.sascorer import calculateScore
manager = multiprocessi... | 47.75 | 252 | 0.643372 |
5b8c822bb202a604a59268cdb291c793c7854bd1 | 8,776 | py | Python | MDB.py | neoinmatrix/MDB | ca88bc3caf9f59583197598290c2f48bd370a76c | [
"Apache-2.0"
] | null | null | null | MDB.py | neoinmatrix/MDB | ca88bc3caf9f59583197598290c2f48bd370a76c | [
"Apache-2.0"
] | null | null | null | MDB.py | neoinmatrix/MDB | ca88bc3caf9f59583197598290c2f48bd370a76c | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Date : 18-11-28
# Author : neo
import yaml
import os
import torndb
class DB:
options = {
"field": "",
"table": "",
"join": "",
"where": "",
"having": "",
"group": "",
"order": "",
"limit": "",
}
temp = {
"add": "",
... | 33.242424 | 112 | 0.419325 |
76256c23fc913068f06c99ae5870cdb964ee54ba | 3,811 | py | Python | util.py | aws-samples/sagemaker-deepar-workshop-es | 3c602570781f64ee0878f942a269f30c1b46710d | [
"MIT-0"
] | 1 | 2022-03-22T21:19:18.000Z | 2022-03-22T21:19:18.000Z | util.py | aws-samples/sagemaker-deepar-workshop-es | 3c602570781f64ee0878f942a269f30c1b46710d | [
"MIT-0"
] | null | null | null | util.py | aws-samples/sagemaker-deepar-workshop-es | 3c602570781f64ee0878f942a269f30c1b46710d | [
"MIT-0"
] | null | null | null | import pandas as pd
from botocore.exceptions import ClientError
from datetime import date, timedelta
def week_days(start_date, end_date):
"""
Creates a list of the Mondays through Fridays contained in the range of dates.
:param start_date: The starting date to evaluate, if it is a working day th... | 38.494949 | 115 | 0.617423 |
f8802cfd5f72c320825a02a069ba5ae6a4b0c497 | 5,633 | py | Python | autosklearn_wrapper.py | inovex/automated-feature-engineering | 0c21690397a2cfcd0ed96f5a8be6f9ba2f370d7e | [
"MIT"
] | null | null | null | autosklearn_wrapper.py | inovex/automated-feature-engineering | 0c21690397a2cfcd0ed96f5a8be6f9ba2f370d7e | [
"MIT"
] | null | null | null | autosklearn_wrapper.py | inovex/automated-feature-engineering | 0c21690397a2cfcd0ed96f5a8be6f9ba2f370d7e | [
"MIT"
] | null | null | null | import argparse
import os
import pickle
import shutil
import time
from math import sqrt
import autosklearn.classification
import autosklearn.regression
import numpy as np
from autosklearn.pipeline.components.base import \
AutoSklearnRegressionAlgorithm
from joblib import dump
from sklearn.metrics import mean_squar... | 41.725926 | 132 | 0.676016 |
79a51cce2db2d1cf8a2fcff977874a8dfe699b68 | 13,961 | py | Python | twint/storage/elasticsearch.py | nicprd/twint | 0f19841b0f2e6456094c6c85b89faf8a0e82f7b1 | [
"MIT"
] | 4 | 2020-03-10T15:05:55.000Z | 2021-03-15T21:29:46.000Z | twint/storage/elasticsearch.py | robikurniawan/twint | 81f6c2c516a231136fbd821bd6a53d7959965fee | [
"MIT"
] | null | null | null | twint/storage/elasticsearch.py | robikurniawan/twint | 81f6c2c516a231136fbd821bd6a53d7959965fee | [
"MIT"
] | 2 | 2020-05-06T13:47:57.000Z | 2021-03-24T18:43:03.000Z | ## TODO - Fix Weekday situation
from elasticsearch import Elasticsearch, helpers
from geopy.geocoders import Nominatim
from time import strftime, localtime
import contextlib
import sys
_index_tweet_status = False
_index_follow_status = False
_index_user_status = False
_is_near_def = False
_is_location_def = False
_nea... | 38.040872 | 99 | 0.471528 |
619f90dfb5405eeae06f2b81e9a9382de2cefb76 | 1,177 | py | Python | var/spack/repos/builtin/packages/libtlx/package.py | carlabguillen/spack | 7070bb892f9bdb5cf9e76e0eecd64f6cc5f4695c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1 | 2020-05-24T15:23:12.000Z | 2020-05-24T15:23:12.000Z | var/spack/repos/builtin/packages/libtlx/package.py | carlabguillen/spack | 7070bb892f9bdb5cf9e76e0eecd64f6cc5f4695c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 6 | 2022-02-26T11:44:34.000Z | 2022-03-12T12:14:50.000Z | var/spack/repos/builtin/packages/libtlx/package.py | carlabguillen/spack | 7070bb892f9bdb5cf9e76e0eecd64f6cc5f4695c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1 | 2019-10-29T09:08:17.000Z | 2019-10-29T09:08:17.000Z | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Libtlx(CMakePackage):
""" tlx is a collection of C++ helpers and extensions universally ne... | 40.586207 | 102 | 0.700935 |
edf8a1e360cb12d9f1a05dcdf4604547c60c1867 | 3,215 | py | Python | configs/_base_/datasets/sintel_384x768.py | hologerry/mmflow | 40caf064851bd95317424e31cc137c0007a2bece | [
"Apache-2.0"
] | 481 | 2021-11-16T07:04:23.000Z | 2022-03-31T22:21:21.000Z | configs/_base_/datasets/sintel_384x768.py | hologerry/mmflow | 40caf064851bd95317424e31cc137c0007a2bece | [
"Apache-2.0"
] | 72 | 2021-11-16T12:25:55.000Z | 2022-03-28T13:10:45.000Z | configs/_base_/datasets/sintel_384x768.py | hologerry/mmflow | 40caf064851bd95317424e31cc137c0007a2bece | [
"Apache-2.0"
] | 48 | 2021-11-16T06:48:46.000Z | 2022-03-30T12:46:40.000Z | dataset_type = 'Sintel'
data_root = 'data/Sintel'
img_norm_cfg = dict(mean=[0., 0., 0.], std=[255., 255., 255.], to_rgb=False)
crop_size = (384, 768)
global_transform = dict(
translates=(0.05, 0.05),
zoom=(1.0, 1.5),
shear=(0.86, 1.16),
rotate=(-10., 10.))
relative_transform = dict(
translates=(... | 27.956522 | 78 | 0.630793 |
41c00185f3f6bcecc7cdc0c4dfef08229fb18611 | 130 | py | Python | old_versions/old_scripts/csv_to_json_2.py | jschmidtnj/OutlookContacts | baccc43e77ea3e9e0feb56564d4a2aa9413be884 | [
"MIT"
] | 1 | 2021-04-21T16:20:05.000Z | 2021-04-21T16:20:05.000Z | old_versions/old_scripts/csv_to_json_2.py | jschmidtnj/OutlookContacts | baccc43e77ea3e9e0feb56564d4a2aa9413be884 | [
"MIT"
] | null | null | null | old_versions/old_scripts/csv_to_json_2.py | jschmidtnj/OutlookContacts | baccc43e77ea3e9e0feb56564d4a2aa9413be884 | [
"MIT"
] | 1 | 2020-04-02T16:20:44.000Z | 2020-04-02T16:20:44.000Z | import csv
ifile = open('outlook_contacts.CSV', "r", encoding="ascii")
read = csv.reader(ifile)
for row in read :
print (row) | 26 | 60 | 0.684615 |
c3ba9b1cb3ab93fa946e76309a1184e5f1dec73e | 30,761 | py | Python | release/stubs.min/Autodesk/Revit/DB/__init___parts/CompoundStructure.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | release/stubs.min/Autodesk/Revit/DB/__init___parts/CompoundStructure.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | release/stubs.min/Autodesk/Revit/DB/__init___parts/CompoundStructure.py | YKato521/ironpython-stubs | b1f7c580de48528490b3ee5791b04898be95a9ae | [
"MIT"
] | null | null | null | class CompoundStructure(object, IDisposable):
""" Describes the internal structure of a wall,floor,roof or ceiling. """
def AddWallSweep(self, wallSweepInfo):
"""
AddWallSweep(self: CompoundStructure,wallSweepInfo: WallSweepInfo)
Adds a new wall sweep or reveal to the compound structure.
... | 23.698767 | 221 | 0.670102 |
b3a57165d52a3f350379f6992bb2c9476c2eee19 | 4,114 | py | Python | recipes/tiny-dnn/all/conanfile.py | marsven/conan-center-index | d8bb4ad617cee02d8664e8341fa32cdf702e4284 | [
"MIT"
] | 1 | 2021-11-11T03:07:13.000Z | 2021-11-11T03:07:13.000Z | recipes/tiny-dnn/all/conanfile.py | marsven/conan-center-index | d8bb4ad617cee02d8664e8341fa32cdf702e4284 | [
"MIT"
] | 1 | 2022-03-09T06:33:41.000Z | 2022-03-09T06:33:41.000Z | recipes/tiny-dnn/all/conanfile.py | marsven/conan-center-index | d8bb4ad617cee02d8664e8341fa32cdf702e4284 | [
"MIT"
] | null | null | null | from conans import ConanFile, CMake, tools
from conans.errors import ConanInvalidConfiguration
import os
required_conan_version = ">=1.43.0"
class TinyDnnConan(ConanFile):
name = "tiny-dnn"
license = "BSD-3-Clause"
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://github.com/... | 38.092593 | 103 | 0.637822 |
9807dcd10cee7f9786fb216b617cc5317ba4897a | 553 | py | Python | day5_nltk/stemming.py | AloyASen/Machine-learning-tutorial | 554dbd4007dd5213bb2683be2cc6a01cbc353999 | [
"MIT"
] | null | null | null | day5_nltk/stemming.py | AloyASen/Machine-learning-tutorial | 554dbd4007dd5213bb2683be2cc6a01cbc353999 | [
"MIT"
] | null | null | null | day5_nltk/stemming.py | AloyASen/Machine-learning-tutorial | 554dbd4007dd5213bb2683be2cc6a01cbc353999 | [
"MIT"
] | null | null | null | #finding the word root may help to find its meanings
from nltk.stem import PorterStemmer
from nltk.tokenize import sent_tokenize, word_tokenize
ps = PorterStemmer()
# examples
#case 1 -- only words
example_words = ["python","pythoner","pythoning","pythoned","pythonly"]
for w in example_words:
print(ps.stem(w))
... | 26.333333 | 135 | 0.750452 |
8c0fe10d137bd8bc25e69309256501485e224bf3 | 804 | py | Python | webapi/standalone_server.py | gonzalorodrigo/SoPaper | 0246c1baeb3a863cb6415ab769f363eb86267bd6 | [
"CC-BY-4.0"
] | 158 | 2015-02-07T13:19:38.000Z | 2022-03-02T15:29:22.000Z | webapi/standalone_server.py | gonzalorodrigo/SoPaper | 0246c1baeb3a863cb6415ab769f363eb86267bd6 | [
"CC-BY-4.0"
] | 8 | 2015-06-15T04:06:30.000Z | 2020-01-25T14:04:02.000Z | webapi/standalone_server.py | gonzalorodrigo/SoPaper | 0246c1baeb3a863cb6415ab769f363eb86267bd6 | [
"CC-BY-4.0"
] | 39 | 2016-01-01T07:14:32.000Z | 2021-04-26T08:25:02.000Z | #!./manage/exec-in-virtualenv.sh
# -*- coding: utf-8 -*-
# $File: standalone_server.py
# $Author: jiakai <jia.kai66@gmail.com>
from webapi import get_app
import signal
import sys
import os
import os.path
def sigint_handler(s, f):
"""receive the SIGINT signal from unittest script
and exit correctly"""
pri... | 22.971429 | 72 | 0.66791 |
89a4be4179240d1849ffa6797328faacea1f97d4 | 3,089 | py | Python | devilry/devilry_qualifiesforexam/tests/test_models.py | devilry/devilry-django | 9ae28e462dfa4cfee966ebacbca04ade9627e715 | [
"BSD-3-Clause"
] | 29 | 2015-01-18T22:56:23.000Z | 2020-11-10T21:28:27.000Z | devilry/devilry_qualifiesforexam/tests/test_models.py | devilry/devilry-django | 9ae28e462dfa4cfee966ebacbca04ade9627e715 | [
"BSD-3-Clause"
] | 786 | 2015-01-06T16:10:18.000Z | 2022-03-16T11:10:50.000Z | devilry/devilry_qualifiesforexam/tests/test_models.py | devilry/devilry-django | 9ae28e462dfa4cfee966ebacbca04ade9627e715 | [
"BSD-3-Clause"
] | 15 | 2015-04-06T06:18:43.000Z | 2021-02-24T12:28:30.000Z | # 3rd party imports
from model_bakery import baker
# Django imports
from django import test
from django.core.exceptions import ValidationError
# Devilry imports
from devilry.devilry_qualifiesforexam import models as status_models
class TestStatus(test.TestCase):
def test_notready_no_message(self):
test... | 48.265625 | 116 | 0.650372 |
d08944cf744fc23743ec9db0176bf1b5e34223cc | 1,333 | py | Python | .history/run_update_20220325105025.py | miguel-fresh/geoip-translation | ccf9dbc0330e597704e57d8b2967fc9be16017ed | [
"Info-ZIP"
] | null | null | null | .history/run_update_20220325105025.py | miguel-fresh/geoip-translation | ccf9dbc0330e597704e57d8b2967fc9be16017ed | [
"Info-ZIP"
] | null | null | null | .history/run_update_20220325105025.py | miguel-fresh/geoip-translation | ccf9dbc0330e597704e57d8b2967fc9be16017ed | [
"Info-ZIP"
] | null | null | null | import subprocess
from sys import stderr, stdout
from pathlib import Path
from os import rename, getcwd, path
START_DOWNLOAD = False
START_CONVERT = True
CURRENT_DIR = Path(getcwd())
ZIP_NAME = 'GeoLite2-City-CSV.zip'
# Relative (to current dir) paths to
DOWNLOAD_DIRNAME = './data'
OUTPUT_DIRNAME = './output'
D... | 30.295455 | 94 | 0.606152 |
a969f5c642f00dbee7ccad96ee61cba6a4d60233 | 1,938 | py | Python | 1SiteRanking/Data Collection/create_site_table.py | HCH2CHO/EmotionMap | bc572b4182637dcdd65e9a13c92f2fa0d9a3d680 | [
"MIT"
] | 3 | 2021-07-15T15:58:52.000Z | 2021-07-16T13:22:47.000Z | 1SiteRanking/Data Collection/create_site_table.py | HCH2CHO/EmotionMap | bc572b4182637dcdd65e9a13c92f2fa0d9a3d680 | [
"MIT"
] | null | null | null | 1SiteRanking/Data Collection/create_site_table.py | HCH2CHO/EmotionMap | bc572b4182637dcdd65e9a13c92f2fa0d9a3d680 | [
"MIT"
] | 4 | 2017-08-04T12:41:06.000Z | 2019-01-31T14:55:10.000Z | # coding:utf-8
# version:python3.5.1
# author:kyh
# import geodata csv files to cloud database
import psycopg2
class CloudDatabase(object):
# Init database and input ip
# 初始化数据库并传入ip
def __init__(self, database, user, password, ip="127.0.0.1", port="5432"):
self.database = database
self.u... | 33.413793 | 102 | 0.567079 |
73393ef24973b90f829aa6cd5b5b08e08245e81d | 2,200 | py | Python | setup.py | puneeth714/FinRL | ec71c84342f7b78cf91d5c32e16e5fc88f24bc56 | [
"MIT"
] | 1,949 | 2020-09-23T03:02:10.000Z | 2021-04-12T18:43:35.000Z | setup.py | puneeth714/FinRL | ec71c84342f7b78cf91d5c32e16e5fc88f24bc56 | [
"MIT"
] | 154 | 2020-09-23T03:05:09.000Z | 2021-04-11T23:57:16.000Z | setup.py | puneeth714/FinRL | ec71c84342f7b78cf91d5c32e16e5fc88f24bc56 | [
"MIT"
] | 478 | 2020-10-14T19:01:14.000Z | 2021-04-12T17:36:02.000Z | from setuptools import setup, find_packages
# Read requirements.txt, ignore comments
try:
REQUIRES = list()
f = open("requirements.txt", "rb")
for line in f.read().decode("utf-8").split("\n"):
line = line.strip()
if "#" in line:
line = line[: line.find("#")].strip()
if l... | 40 | 126 | 0.66 |
35f451087d4aec96abfe5a339b4bcd07dc759587 | 3,539 | py | Python | nova/tests/unit/policies/test_extensions.py | zjzh/nova | 7bb21723171c59b93e28f5d508c2b6df39220f13 | [
"Apache-2.0"
] | 1,874 | 2015-01-04T05:18:34.000Z | 2022-03-31T03:30:28.000Z | nova/tests/unit/policies/test_extensions.py | zjzh/nova | 7bb21723171c59b93e28f5d508c2b6df39220f13 | [
"Apache-2.0"
] | 40 | 2015-04-13T02:32:42.000Z | 2022-02-16T02:28:06.000Z | nova/tests/unit/policies/test_extensions.py | zjzh/nova | 7bb21723171c59b93e28f5d508c2b6df39220f13 | [
"Apache-2.0"
] | 1,996 | 2015-01-04T15:11:51.000Z | 2022-03-31T11:03:13.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 43.158537 | 78 | 0.68833 |
ca44b6c6d3d1297d667b1609df228e074eba3d4d | 3,694 | py | Python | days/day006/cheapest_path.py | alex-vegan/100daysofcode-with-python-course | b6c12316abe18274b7963371b8f0ed2fd549ef07 | [
"MIT"
] | 2 | 2018-10-28T17:12:37.000Z | 2018-10-28T17:12:39.000Z | days/day006/cheapest_path.py | alex-vegan/100daysofcode-with-python-course | b6c12316abe18274b7963371b8f0ed2fd549ef07 | [
"MIT"
] | 3 | 2018-10-28T17:11:04.000Z | 2018-10-29T22:36:36.000Z | days/day006/cheapest_path.py | alex-vegan/100daysofcode-with-python-course | b6c12316abe18274b7963371b8f0ed2fd549ef07 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sun Sep 30 17:43:45 2018
100DaysOfCode --- TalkPython --- Pybites
4-6days --- collections module
@author: Alexey Sidorov
"""
from collections import deque
#this graph contains all adjacent cities with cost for flight
bonds = {'Yekaterinburg': {'Kiev':101, 'St Peterbu... | 41.044444 | 115 | 0.59556 |
a7828252fefa8092c89f3c9d130fab711fdfe972 | 1,606 | py | Python | doit_doc_template/templates/base/library/cmd_skip.py | i386x/abcdoc | 04246ce33a480ce3039832db80d0f5c86a86ff54 | [
"MIT"
] | null | null | null | doit_doc_template/templates/base/library/cmd_skip.py | i386x/abcdoc | 04246ce33a480ce3039832db80d0f5c86a86ff54 | [
"MIT"
] | null | null | null | doit_doc_template/templates/base/library/cmd_skip.py | i386x/abcdoc | 04246ce33a480ce3039832db80d0f5c86a86ff54 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#! \file ~/doit_doc_template/templates/base/library/cmd_skip.py
#! \author Jiří Kučera, <sanczes AT gmail.com>
#! \stamp 2019-07-20 11:55:57 +0200
#! \project DoIt! Doc: Sphinx Extension for DoIt! Documentation
#! \license MIT
#! \ver... | 39.170732 | 79 | 0.732254 |
474259ec861e6553b3f07a33fbbb3b5647d62ae0 | 9,243 | py | Python | posthog/celery.py | atbe/posthog | c98b4eb7da13a269f3ff885a22dd471fc70162ca | [
"MIT"
] | null | null | null | posthog/celery.py | atbe/posthog | c98b4eb7da13a269f3ff885a22dd471fc70162ca | [
"MIT"
] | null | null | null | posthog/celery.py | atbe/posthog | c98b4eb7da13a269f3ff885a22dd471fc70162ca | [
"MIT"
] | null | null | null | import os
import time
import statsd
from celery import Celery
from celery.schedules import crontab
from django.conf import settings
from django.db import connection
from django.utils import timezone
from posthog.ee import is_ee_enabled
from posthog.redis import get_client
# set the default Django settings module for... | 33.857143 | 152 | 0.718057 |
db5c3ed492360b640a433a79ae54ee1783e3d091 | 14,471 | py | Python | shelldocs/shelldocs.py | lucaskanashiro/yetus | 27a1a998202b58184b369d8c92d2723019163839 | [
"Apache-2.0"
] | null | null | null | shelldocs/shelldocs.py | lucaskanashiro/yetus | 27a1a998202b58184b369d8c92d2723019163839 | [
"Apache-2.0"
] | 2 | 2021-09-27T23:07:24.000Z | 2022-02-26T05:38:49.000Z | shelldocs/shelldocs.py | lucaskanashiro/yetus | 27a1a998202b58184b369d8c92d2723019163839 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python -B
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "... | 33.497685 | 92 | 0.526225 |
4b5765b499fd75b5845e0cc23fc09047bbae17f4 | 37,175 | py | Python | sympy/integrals/tests/test_integrals.py | pv/sympy | ee2374aa2de2d730aafa1fdefbdffe08b94041ff | [
"BSD-3-Clause"
] | 1 | 2016-02-13T15:46:16.000Z | 2016-02-13T15:46:16.000Z | sympy/integrals/tests/test_integrals.py | ojengwa/sympy | f90e7a8e4fd8fa9e7d6c6fecb4c7efe8f987ec60 | [
"BSD-3-Clause"
] | null | null | null | sympy/integrals/tests/test_integrals.py | ojengwa/sympy | f90e7a8e4fd8fa9e7d6c6fecb4c7efe8f987ec60 | [
"BSD-3-Clause"
] | null | null | null | from sympy import (
Abs, acos, acosh, Add, adjoint, asin, asinh, atan, Ci, conjugate, cos,
Derivative, diff, DiracDelta, E, exp, erf, erfi, EulerGamma, factor, Function,
Heaviside, I, Integral, integrate, Interval, Lambda, LambertW, log,
Matrix, O, oo, pi, Piecewise, Poly, Rational, S, simplify, sin, ta... | 36.589567 | 89 | 0.54195 |
207bf94fb379346d0bce08acc3c5d849b81ba575 | 1,049 | py | Python | services/classes.py | TimurBaldin/FinesWebParser | 4b0155e21f054efcfde173c01f636a634f16298b | [
"Apache-2.0"
] | null | null | null | services/classes.py | TimurBaldin/FinesWebParser | 4b0155e21f054efcfde173c01f636a634f16298b | [
"Apache-2.0"
] | null | null | null | services/classes.py | TimurBaldin/FinesWebParser | 4b0155e21f054efcfde173c01f636a634f16298b | [
"Apache-2.0"
] | null | null | null | from pydantic.main import BaseModel
from enum import Enum
class CarDetailsDto:
def __init__(self, reg_num, reg_reg, sts_num, count=3):
self.reg_num = reg_num
self.reg_reg = reg_reg
self.sts_num = sts_num
self.__count = count
self.__active = True
self.__msg = None
... | 19.072727 | 59 | 0.630124 |
e2eb5c2b25874519a738eddcdcddd0266ad568cd | 4,483 | py | Python | ytree/frontends/consistent_trees/utilities.py | ytree-project/ytree | 4ba1d3e6efd1e647c594b2c0de51b0217de7a45c | [
"BSD-3-Clause-Clear"
] | 3 | 2020-02-28T10:25:39.000Z | 2021-04-13T07:18:35.000Z | ytree/frontends/consistent_trees/utilities.py | ytree-project/ytree | 4ba1d3e6efd1e647c594b2c0de51b0217de7a45c | [
"BSD-3-Clause-Clear"
] | 36 | 2019-12-03T17:33:29.000Z | 2022-02-18T10:39:25.000Z | ytree/frontends/consistent_trees/utilities.py | ytree-project/ytree | 4ba1d3e6efd1e647c594b2c0de51b0217de7a45c | [
"BSD-3-Clause-Clear"
] | 6 | 2019-08-22T16:01:34.000Z | 2020-08-25T09:57:17.000Z | """
ConsistentTreesArbor utility functions
"""
#-----------------------------------------------------------------------------
# Copyright (c) ytree development team. All rights reserved.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with th... | 30.917241 | 78 | 0.478028 |
4f3879a175716957860a50a932e7b7354f79bbe1 | 893 | py | Python | aesjosephus/matrix.py | WingedSeal/AES_Josephus | 7868fc798cce6b297c7cfd3c2f251276dd2323ac | [
"MIT"
] | 1 | 2021-12-20T06:57:09.000Z | 2021-12-20T06:57:09.000Z | aesjosephus/matrix.py | WingedSeal/AES_Josephus | 7868fc798cce6b297c7cfd3c2f251276dd2323ac | [
"MIT"
] | null | null | null | aesjosephus/matrix.py | WingedSeal/AES_Josephus | 7868fc798cce6b297c7cfd3c2f251276dd2323ac | [
"MIT"
] | null | null | null | import numpy as np
class Matrix:
@property
def array(self):
return self._state
def __init__(self, state: np.ndarray) -> np.ndarray:
if state.shape != (4,4):
raise ValueError(f"State need to be 4x4 matrix. ({state.shape} shape was given)")
self._state = ... | 34.346154 | 99 | 0.56103 |
06bc176563f0a9b515db9b4c44cfbeb1c397d3cd | 167 | py | Python | clubes/admin.py | JohnVictor2017/StartTm | 91a6f60ffd36f25f01d75798c5ef83e7dc44d97d | [
"MIT"
] | null | null | null | clubes/admin.py | JohnVictor2017/StartTm | 91a6f60ffd36f25f01d75798c5ef83e7dc44d97d | [
"MIT"
] | null | null | null | clubes/admin.py | JohnVictor2017/StartTm | 91a6f60ffd36f25f01d75798c5ef83e7dc44d97d | [
"MIT"
] | null | null | null | from django.contrib import admin
from clubes.models import Clube,AtletaClube
# Register your models here.
admin.site.register(Clube)
admin.site.register(AtletaClube) | 23.857143 | 43 | 0.826347 |
b8f5fb402359202d43256afb75e45a5f8443d27f | 20,873 | py | Python | pykg2vec/utils/trainer.py | baxtree/pykg2vec | 59498ed5aae7cbe44f881b2c807fb02f1b53999d | [
"MIT"
] | 1 | 2020-10-11T21:52:51.000Z | 2020-10-11T21:52:51.000Z | pykg2vec/utils/trainer.py | KonstantinKlepikov/pykg2vec | 658b70a54a371f79252550b0cad7e19578198505 | [
"MIT"
] | null | null | null | pykg2vec/utils/trainer.py | KonstantinKlepikov/pykg2vec | 658b70a54a371f79252550b0cad7e19578198505 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import warnings
import torch
import numpy as np
import torch.optim as optim
import torch.nn as nn
import torch.nn.functional as F
import pandas as pd
from tqdm import tqdm
from pathlib import Path
from pykg2vec.utils.evaluator import Evaluator
from pykg2vec.utils... | 41.250988 | 114 | 0.601111 |
8bfa6391903d99cee429b5a4f44fcabb34f25192 | 42,670 | py | Python | objc4/openSources/xnu-4570.71.2/tools/lldbmacros/waitq.py | honeyeeb/objc4-723 | 020a0dd480818207211835aefe04f44007c09575 | [
"MIT"
] | null | null | null | objc4/openSources/xnu-4570.71.2/tools/lldbmacros/waitq.py | honeyeeb/objc4-723 | 020a0dd480818207211835aefe04f44007c09575 | [
"MIT"
] | null | null | null | objc4/openSources/xnu-4570.71.2/tools/lldbmacros/waitq.py | honeyeeb/objc4-723 | 020a0dd480818207211835aefe04f44007c09575 | [
"MIT"
] | null | null | null | from xnu import *
from utils import *
from core.configuration import *
import sys
def GetWaitqStateStr(waitq):
wq_types = {
0: 'INV',
1: '???',
2: ' Q',
3: 'SET'
}
return wq_types[int(waitq.waitq_type)]
def GetWaitqBitsStr(waitq):
out_str = ""
if (... | 39.878505 | 186 | 0.556269 |
a35b09a17430d5ac93f8035c4cc4f7dadf67b539 | 6,561 | py | Python | io_scene_niftools/properties/object.py | ZtModArchive/blender_niftools_addon | fc28f567e1fa431ec6633cb2a138898136090b29 | [
"BSD-3-Clause"
] | 3 | 2019-10-13T19:08:12.000Z | 2020-03-26T08:25:20.000Z | io_scene_niftools/properties/object.py | ZtModArchive/blender_niftools_addon | fc28f567e1fa431ec6633cb2a138898136090b29 | [
"BSD-3-Clause"
] | 1 | 2019-09-22T12:00:04.000Z | 2019-09-22T12:00:04.000Z | io_scene_niftools/properties/object.py | ZtModArchive/blender_niftools_addon | fc28f567e1fa431ec6633cb2a138898136090b29 | [
"BSD-3-Clause"
] | null | null | null | """ Nif User Interface, custom nif properties for objects"""
# ***** BEGIN LICENSE BLOCK *****
#
# Copyright © 2014, NIF File Format Library and Tools contributors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following ... | 30.235023 | 98 | 0.637098 |
035af7ad1ec4150ab8b22f99fb860ae769afff87 | 317 | py | Python | img2Grey.py | Andre-luv/HCAP2021-EQUIPOS | c6a12b9796417a0516e5bf2bea9237a8809572b8 | [
"MIT"
] | null | null | null | img2Grey.py | Andre-luv/HCAP2021-EQUIPOS | c6a12b9796417a0516e5bf2bea9237a8809572b8 | [
"MIT"
] | null | null | null | img2Grey.py | Andre-luv/HCAP2021-EQUIPOS | c6a12b9796417a0516e5bf2bea9237a8809572b8 | [
"MIT"
] | 1 | 2021-03-19T18:55:32.000Z | 2021-03-19T18:55:32.000Z | import cv2
import numpy as np
def img2Grey(original,nombre):
IRGB= cv2.imread(original)
IGS=cv2.cvtColor(IRGB,cv2.COLOR_BGR2GRAY)
return cv2.imwrite(nombre,IGS)
img2Grey("002.jpeg","002GS.jpeg")
img2Grey("003.jpeg","003GS.jpeg")
img2Grey("008.jpeg","008GS.jpeg")
img2Grey("011.jpeg","011GS.jpeg")
| 16.684211 | 45 | 0.712934 |
55d1d94c0d22fad7e8f1aeb30e709678fb8fc844 | 3,895 | py | Python | lightly/openapi_generated/swagger_client/models/update_docker_worker_registry_entry_request.py | CodeGuy-007/lightly | 64143fe8a477c04288009c65fa1265cef8aa48f8 | [
"MIT"
] | 1 | 2022-03-10T00:22:30.000Z | 2022-03-10T00:22:30.000Z | lightly/openapi_generated/swagger_client/models/update_docker_worker_registry_entry_request.py | CodeGuy-007/lightly | 64143fe8a477c04288009c65fa1265cef8aa48f8 | [
"MIT"
] | null | null | null | lightly/openapi_generated/swagger_client/models/update_docker_worker_registry_entry_request.py | CodeGuy-007/lightly | 64143fe8a477c04288009c65fa1265cef8aa48f8 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Lightly API
Lightly.ai enables you to do self-supervised learning in an easy and intuitive way. The lightly.ai OpenAPI spec defines how one can interact with our REST API to unleash the full potential of lightly.ai # noqa: E501
OpenAPI spec version: 1.0.0
Contact: support@lightly... | 31.16 | 220 | 0.607445 |
1b9e7c787563446417d53dd66b47ca6c4dcc784e | 1,987 | py | Python | e3sm_to_cmip/cmor_handlers/dryso4.py | JGCRI/e3sm_to_cmip | 3d3bc7dd7e3a46a97dba4f13a888758e01ef4797 | [
"MIT"
] | null | null | null | e3sm_to_cmip/cmor_handlers/dryso4.py | JGCRI/e3sm_to_cmip | 3d3bc7dd7e3a46a97dba4f13a888758e01ef4797 | [
"MIT"
] | null | null | null | e3sm_to_cmip/cmor_handlers/dryso4.py | JGCRI/e3sm_to_cmip | 3d3bc7dd7e3a46a97dba4f13a888758e01ef4797 | [
"MIT"
] | null | null | null | """
so4_a1DDF + so4_a2DDF + so4_a3DDF + so4_c1DDF + so4_c2DDF + so4_c3DDF to dryso4 converter
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import cmor
from e3sm_to_cmip.lib import handle_variables
# list of raw variable names needed
RAW_VARIABLES = [str('so4_a1DDF'), str('so4... | 34.258621 | 124 | 0.598893 |
8f939dfe72bfd835138ef6558782b49ed85b6ae5 | 1,975 | py | Python | loudml/metrics.py | toni-moreno/loudml | 0252b6792393fc46f2dc9c1da25dd89fc27a5fa4 | [
"Apache-2.0"
] | 245 | 2018-01-30T08:11:53.000Z | 2022-03-26T07:17:42.000Z | loudml/metrics.py | robcowart/loudml | 0008baef02259a8ae81dd210d3f91a51ffc9ed9f | [
"Apache-2.0"
] | 620 | 2018-01-28T22:58:24.000Z | 2022-03-13T13:40:42.000Z | loudml/metrics.py | robcowart/loudml | 0008baef02259a8ae81dd210d3f91a51ffc9ed9f | [
"Apache-2.0"
] | 97 | 2018-03-06T14:44:26.000Z | 2022-03-24T01:57:31.000Z | """
Collect and send metrics about program usage
"""
from configparser import (
ConfigParser, NoSectionError
)
import io
import pkg_resources
import requests
from loudml.misc import my_host_id
# Workaround for ConfigParser requiring sections
# https://mail.python.org/pipermail/python-dev/2002-November/029987.ht... | 27.430556 | 78 | 0.623291 |
135cb746715061e52959abefe5188ce35acbd47e | 357 | py | Python | ia870/ialastero.py | bfoe/e2dhipseg | 4f6cbfd77bde2f92835c7007a230c08829f1845a | [
"MIT"
] | 4 | 2020-07-31T02:35:21.000Z | 2021-07-29T23:03:39.000Z | ia870/ialastero.py | Abigale-Xin/e2dhipseg | 520366326cd20c75b5db855c9dd05cf0a8d49089 | [
"MIT"
] | 2 | 2020-07-28T22:29:54.000Z | 2021-07-07T20:37:25.000Z | ia870/ialastero.py | Abigale-Xin/e2dhipseg | 520366326cd20c75b5db855c9dd05cf0a8d49089 | [
"MIT"
] | 7 | 2020-07-27T05:22:03.000Z | 2022-03-10T06:29:21.000Z | # -*- encoding: utf-8 -*-
# Module ialastero
from numpy import *
from ia870.iasecross import iasecross
def ialastero(f, B=iasecross()):
from iaisbinary import iaisbinary
from iadist import iadist
from iaregmax import iaregmax
assert iaisbinary(f),'Can only process binary images'
dt = iadist(f,B)
... | 21 | 57 | 0.694678 |
412ac433c0496276da3d33aabeca3bc6fc8d0c12 | 9,210 | py | Python | tools/face/detect_video.py | AruniRC/detectron-self-train | a5d0edc51aeab92b953948ef2401294e87efb719 | [
"MIT"
] | 128 | 2019-04-12T17:06:27.000Z | 2022-02-26T10:24:43.000Z | tools/face/detect_video.py | AruniRC/detectron-self-train | a5d0edc51aeab92b953948ef2401294e87efb719 | [
"MIT"
] | 15 | 2019-06-12T03:55:48.000Z | 2021-03-12T07:09:53.000Z | tools/face/detect_video.py | AruniRC/detectron-self-train | a5d0edc51aeab92b953948ef2401294e87efb719 | [
"MIT"
] | 24 | 2019-04-12T17:06:30.000Z | 2021-07-12T12:38:20.000Z | #!/usr/bin/env python3
"""
Perform inference on frames from a video using Detectron saved checkpoint.
A symlink 'data/CS6' should point to the CS6 data root location
(on Gypsum this is in /mnt/nfs/scratch1/arunirc/data/CS6/CS6/CS6.0.01/CS6).
Usage (on slurm cluster):
srun --pty --mem 100000 --gres gpu:1 python tool... | 30.39604 | 108 | 0.588274 |
3559e7c4ea30edd3eb10524698d9bf472150f4fb | 617 | py | Python | db/migrations/0010_language.py | matchd-ch/matchd-backend | 84be4aab1b4708cae50a8988301b15df877c8db0 | [
"Apache-2.0"
] | 1 | 2022-03-03T09:55:57.000Z | 2022-03-03T09:55:57.000Z | db/migrations/0010_language.py | matchd-ch/matchd-backend | 84be4aab1b4708cae50a8988301b15df877c8db0 | [
"Apache-2.0"
] | 7 | 2022-02-09T10:44:53.000Z | 2022-03-28T03:29:43.000Z | db/migrations/0010_language.py | matchd-ch/matchd-backend | 84be4aab1b4708cae50a8988301b15df877c8db0 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.1.5 on 2021-02-03 10:00
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('db', '0009_skill'),
]
operations = [
migrations.CreateModel(
name='Language',
fields=[
('id',
... | 24.68 | 59 | 0.45705 |
a0d8ebfdb6ad8323ad48626bc5b462508a9c4c2c | 489 | py | Python | api/idea_party/ideas/migrations/0004_auto_20200729_1520.py | nilq/idea-party | 08895399b72a6e735a2a6518feb205619c592ffe | [
"MIT"
] | null | null | null | api/idea_party/ideas/migrations/0004_auto_20200729_1520.py | nilq/idea-party | 08895399b72a6e735a2a6518feb205619c592ffe | [
"MIT"
] | null | null | null | api/idea_party/ideas/migrations/0004_auto_20200729_1520.py | nilq/idea-party | 08895399b72a6e735a2a6518feb205619c592ffe | [
"MIT"
] | null | null | null | # Generated by Django 3.0.8 on 2020-07-29 15:20
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('ideas', '0003_auto_20200729_1512'),
]
operations = [
migrations.AlterField(
model_name='idea',
... | 24.45 | 124 | 0.640082 |
dd3f1f196338485d5354da4f5ce2a19fdf578841 | 52,300 | py | Python | src/borg/cache.py | akozlins/borg | e4438227c1d235f1b631d400eebc22e11bb09e89 | [
"BSD-3-Clause"
] | null | null | null | src/borg/cache.py | akozlins/borg | e4438227c1d235f1b631d400eebc22e11bb09e89 | [
"BSD-3-Clause"
] | null | null | null | src/borg/cache.py | akozlins/borg | e4438227c1d235f1b631d400eebc22e11bb09e89 | [
"BSD-3-Clause"
] | null | null | null | import configparser
import os
import shutil
import stat
from binascii import unhexlify
from collections import namedtuple
from time import perf_counter
from .logger import create_logger
logger = create_logger()
from .constants import CACHE_README, DEFAULT_FILES_CACHE_MODE
from .hashindex import ChunkIndex, ChunkInde... | 46.90583 | 164 | 0.62652 |
3b7cf64bf1f795c1bf4e5edd8f4285df941d1b3a | 11,538 | py | Python | domonic/ext/html5lib_/__init__.py | ArjixWasTaken/domonic | b80433af8c3172b8a15cb62eeca4e6c5add8cb7e | [
"MIT"
] | null | null | null | domonic/ext/html5lib_/__init__.py | ArjixWasTaken/domonic | b80433af8c3172b8a15cb62eeca4e6c5add8cb7e | [
"MIT"
] | null | null | null | domonic/ext/html5lib_/__init__.py | ArjixWasTaken/domonic | b80433af8c3172b8a15cb62eeca4e6c5add8cb7e | [
"MIT"
] | null | null | null | """
domonic.ext.html5lib_
====================================
stolen from here and modded to work with domonic instead of mindidom
https://github.com/html5lib/html5lib-python/blob/master/html5lib/treebuilders/__init__.py
"""
'''
from __future__ import absolute_import, division, unicode_literals
# fr... | 36.745223 | 118 | 0.571503 |
4bd3ea42d694e0b49d6334542a235422d832e6fb | 3,699 | py | Python | src/spark/lang/rebindable.py | jbalint/spark | caccf1cd9122dd4a7dc0f26a57ee4a649056aa6f | [
"CNRI-Jython"
] | 1 | 2015-05-21T20:00:12.000Z | 2015-05-21T20:00:12.000Z | src/spark/lang/rebindable.py | jbalint/spark | caccf1cd9122dd4a7dc0f26a57ee4a649056aa6f | [
"CNRI-Jython"
] | null | null | null | src/spark/lang/rebindable.py | jbalint/spark | caccf1cd9122dd4a7dc0f26a57ee4a649056aa6f | [
"CNRI-Jython"
] | null | null | null | #*****************************************************************************#
#* Copyright (c) 2004-2008, SRI International. *#
#* All rights reserved. *#
#* ... | 46.822785 | 80 | 0.530143 |
5d95fcf3690b9edae8391b9d2572374037645103 | 2,822 | py | Python | ui/page_elements/condition_box/boxUI.py | ArcherLuo233/election-s-prediction | 9da72cb855f6d61f9cdec6e15f7ca832629ba51a | [
"MIT"
] | null | null | null | ui/page_elements/condition_box/boxUI.py | ArcherLuo233/election-s-prediction | 9da72cb855f6d61f9cdec6e15f7ca832629ba51a | [
"MIT"
] | 1 | 2022-01-26T01:23:26.000Z | 2022-01-26T01:23:34.000Z | ui/page_elements/condition_box/boxUI.py | ArcherLuo233/election-s-prediction | 9da72cb855f6d61f9cdec6e15f7ca832629ba51a | [
"MIT"
] | 1 | 2021-11-08T10:58:23.000Z | 2021-11-08T10:58:23.000Z | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'box.ui'
#
# Created by: PyQt5 UI code generator 5.15.0
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGui, Q... | 40.898551 | 104 | 0.692417 |
7f03459cf6973a6ea31c6e1c70a57d0d74a1c4d9 | 36,404 | py | Python | nf_core/download.py | krokicki/tools | 901334d94cbf2ffce0c2e6c20de4354a7fe59b09 | [
"MIT"
] | 142 | 2018-02-14T18:01:28.000Z | 2022-03-25T03:25:34.000Z | nf_core/download.py | krokicki/tools | 901334d94cbf2ffce0c2e6c20de4354a7fe59b09 | [
"MIT"
] | 1,267 | 2018-02-14T21:12:51.000Z | 2022-03-31T17:24:09.000Z | nf_core/download.py | krokicki/tools | 901334d94cbf2ffce0c2e6c20de4354a7fe59b09 | [
"MIT"
] | 127 | 2018-02-13T17:01:07.000Z | 2022-03-25T03:25:36.000Z | #!/usr/bin/env python
"""Downloads a nf-core pipeline to the local file system."""
from __future__ import print_function
from io import BytesIO
import logging
import hashlib
import os
import questionary
import re
import requests
import requests_cache
import shutil
import subprocess
import sys
import tarfile
import co... | 45.334994 | 189 | 0.573756 |
ad1e274774735a14b97dfd9c9f93922adba92d2f | 18,246 | py | Python | cudf/_gdf.py | Iroy30/cudf | c333f4191d8bc2dc00c1144df10e6d1f77610f8f | [
"Apache-2.0"
] | null | null | null | cudf/_gdf.py | Iroy30/cudf | c333f4191d8bc2dc00c1144df10e6d1f77610f8f | [
"Apache-2.0"
] | null | null | null | cudf/_gdf.py | Iroy30/cudf | c333f4191d8bc2dc00c1144df10e6d1f77610f8f | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2018, NVIDIA CORPORATION.
"""
This file provide binding to the libgdf library.
"""
import contextlib
import itertools
import numpy as np
import pandas as pd
import pyarrow as pa
from libgdf_cffi import ffi, libgdf
from librmm_cffi import librmm as rmm
from . import cudautils
from .utils import calc_... | 29.960591 | 79 | 0.580675 |
5a9a13923c92a553c0ce88bfd2968fc0adeff35a | 20,357 | py | Python | plugins/modules/oci_dns_domain_records.py | sagar2938/oci-ansible-collection | 5b8ce583a0d5d0aabf14494d61aea4649e18d1e6 | [
"Apache-2.0"
] | null | null | null | plugins/modules/oci_dns_domain_records.py | sagar2938/oci-ansible-collection | 5b8ce583a0d5d0aabf14494d61aea4649e18d1e6 | [
"Apache-2.0"
] | null | null | null | plugins/modules/oci_dns_domain_records.py | sagar2938/oci-ansible-collection | 5b8ce583a0d5d0aabf14494d61aea4649e18d1e6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# Copyright (c) 2020, 2021 Oracle and/or its affiliates.
# This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Apache License v2.0
# See LICENSE.TXT for d... | 37.83829 | 158 | 0.580095 |
ed794617fcd38ce6fef6ebcfac8f26bc4d1c678f | 314 | py | Python | HDFS-MapRed setup ansible/hdfs.py | ayu-gupta/HDFS-MapRed-Ansible | 1a2c690c686de59856d1ea32b7e0d9efcadbd02b | [
"Apache-2.0"
] | null | null | null | HDFS-MapRed setup ansible/hdfs.py | ayu-gupta/HDFS-MapRed-Ansible | 1a2c690c686de59856d1ea32b7e0d9efcadbd02b | [
"Apache-2.0"
] | null | null | null | HDFS-MapRed setup ansible/hdfs.py | ayu-gupta/HDFS-MapRed-Ansible | 1a2c690c686de59856d1ea32b7e0d9efcadbd02b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python2
print("content-type: text/html")
print("")
print("Welcome to HDFS Cluster")
print("<br/>")
print("""
<form action='hdfs_setup.py'>
Enter no of DataNode: <input type='text' name='dn' />
<br/>
Enter no of TaskTrackers: <input type='text' name='tt' />
<input type='submit' />
</form>
""")
| 14.952381 | 58 | 0.630573 |
9fa1f84d41443715e48e1d6b3a4997fdab780253 | 2,259 | py | Python | python/app/plugins/http/Struts2/S2_003.py | taomujian/linbing | fe772a58f41e3b046b51a866bdb7e4655abaf51a | [
"MIT"
] | 351 | 2020-02-26T05:23:26.000Z | 2022-03-26T12:39:19.000Z | python/app/plugins/http/Struts2/S2_003.py | taomujian/linbing | fe772a58f41e3b046b51a866bdb7e4655abaf51a | [
"MIT"
] | 15 | 2020-03-26T07:31:49.000Z | 2022-03-09T02:12:17.000Z | python/app/plugins/http/Struts2/S2_003.py | taomujian/linbing | fe772a58f41e3b046b51a866bdb7e4655abaf51a | [
"MIT"
] | 99 | 2020-02-28T07:30:46.000Z | 2022-03-16T16:41:09.000Z | #!/usr/bin/env python3
from app.lib.utils.request import request
from app.lib.utils.common import get_capta, get_useragent
class S2_003_BaseVerify:
def __init__(self, url):
self.info = {
'name': 'Struts2 S2-003漏洞,又名CVE-2008-6504漏洞.',
'description': 'Struts 2.0.0 - Struts 2.1.8.1',
... | 44.294118 | 743 | 0.602479 |
7cc259e00245b52bac2b9cede3be9c5235e72960 | 6,605 | py | Python | graphene_sqlalchemy/converter.py | dubbl/graphene-sqlalchemy | e362e3fc4993d7e95873044bb4d00185b1d3dd8b | [
"MIT"
] | null | null | null | graphene_sqlalchemy/converter.py | dubbl/graphene-sqlalchemy | e362e3fc4993d7e95873044bb4d00185b1d3dd8b | [
"MIT"
] | null | null | null | graphene_sqlalchemy/converter.py | dubbl/graphene-sqlalchemy | e362e3fc4993d7e95873044bb4d00185b1d3dd8b | [
"MIT"
] | null | null | null | from singledispatch import singledispatch
from sqlalchemy import types
from sqlalchemy.dialects import postgresql
from sqlalchemy.orm import interfaces
from graphene import (ID, Boolean, Dynamic, Enum, Field, Float, Int, List,
String)
from graphene.types.json import JSONString
try:
from sqla... | 33.527919 | 86 | 0.738834 |
27c55aed7c8e479e0934e9a5c856b2274d2d7689 | 2,022 | py | Python | inquiry/inquiry.py | movermeyer/inquiry | f6ea435c302560ba19985b5d4ce2c97e2f321508 | [
"Apache-2.0"
] | null | null | null | inquiry/inquiry.py | movermeyer/inquiry | f6ea435c302560ba19985b5d4ce2c97e2f321508 | [
"Apache-2.0"
] | null | null | null | inquiry/inquiry.py | movermeyer/inquiry | f6ea435c302560ba19985b5d4ce2c97e2f321508 | [
"Apache-2.0"
] | null | null | null | import os
from .figure import Figure
from .navigator import Navigator
try:
from psycopg2.extensions import adapt
except ImportError:
def adapt(value):
raise EnvironmentError("No adapting method found.")
class Inquiry(object):
def __init__(self, figures=None, debug=None):
"""Debug will sor... | 29.735294 | 120 | 0.596934 |
3a2c88444eb6d125ed9c6eaec55c23f740397e51 | 63 | py | Python | recap_agr/__main__.py | MirkoLenz/ReCAP-Argument-Graph-Retrieval | 5ff0b637aebfa59783f70617ebf5e618ca95168c | [
"Apache-2.0"
] | null | null | null | recap_agr/__main__.py | MirkoLenz/ReCAP-Argument-Graph-Retrieval | 5ff0b637aebfa59783f70617ebf5e618ca95168c | [
"Apache-2.0"
] | null | null | null | recap_agr/__main__.py | MirkoLenz/ReCAP-Argument-Graph-Retrieval | 5ff0b637aebfa59783f70617ebf5e618ca95168c | [
"Apache-2.0"
] | 1 | 2021-11-06T10:17:38.000Z | 2021-11-06T10:17:38.000Z | if __name__ == "__main__":
from .app import run
run()
| 12.6 | 26 | 0.587302 |
320c61502e441727f75371975a065d5fb4d57188 | 309 | py | Python | cs231n/numpy/01_quicksort.py | urunimi/cs231n | 55ed1323e1044440d8be5277116bd5a76c19d4c3 | [
"Apache-2.0"
] | null | null | null | cs231n/numpy/01_quicksort.py | urunimi/cs231n | 55ed1323e1044440d8be5277116bd5a76c19d4c3 | [
"Apache-2.0"
] | null | null | null | cs231n/numpy/01_quicksort.py | urunimi/cs231n | 55ed1323e1044440d8be5277116bd5a76c19d4c3 | [
"Apache-2.0"
] | null | null | null | def quicksort(arr):
if len(arr) <= 1:
return arr
pivot = arr[len(arr) // 2]
left = [x for x in arr if x < pivot]
middle = [x for x in arr if x == pivot]
right = [x for x in arr if x > pivot]
return quicksort(left) + middle + quicksort(right)
print(quicksort([3,6,8,10,1,2,1])) | 30.9 | 54 | 0.576052 |
6ca13146a0ab6a4d419f6328cc6bb5ce59b8fd1e | 79 | py | Python | pages/components/divider/_colors.py | AnnMarieW/dmc-docs | 5db1790b61e85209b85adb75ccf6e7462d93f231 | [
"MIT"
] | null | null | null | pages/components/divider/_colors.py | AnnMarieW/dmc-docs | 5db1790b61e85209b85adb75ccf6e7462d93f231 | [
"MIT"
] | null | null | null | pages/components/divider/_colors.py | AnnMarieW/dmc-docs | 5db1790b61e85209b85adb75ccf6e7462d93f231 | [
"MIT"
] | null | null | null | import dash_mantine_components as dmc
component = dmc.Divider(color="violet")
| 19.75 | 39 | 0.810127 |
bedb15a081cb8d5880d1635f84e3aa80e18e6f95 | 59,842 | py | Python | graphics/shader.py | est/nodebox-gl | f1909a7a4ebc55c8ba254f92e25acb26e8cf1f1d | [
"BSD-3-Clause"
] | 1 | 2015-09-29T14:22:49.000Z | 2015-09-29T14:22:49.000Z | graphics/shader.py | est/nodebox-gl | f1909a7a4ebc55c8ba254f92e25acb26e8cf1f1d | [
"BSD-3-Clause"
] | 1 | 2015-09-29T14:23:35.000Z | 2015-09-30T02:33:13.000Z | graphics/shader.py | est/nodebox-gl | f1909a7a4ebc55c8ba254f92e25acb26e8cf1f1d | [
"BSD-3-Clause"
] | null | null | null | #=== SHADER ==========================================================================================
# Fragment shaders, filters, Frame Buffer Object (FBO)
# Authors: Tom De Smedt, Frederik De Bleser
# License: BSD (see LICENSE.txt for details).
# Copyright (c) 2008 City In A Bottle (cityinabottle.org)
# http://cityi... | 39.52576 | 106 | 0.6011 |
d5ad3c70851e4863651dd23249ee7e10155e39d6 | 11,146 | py | Python | pyqt-official/mainwindows/menus.py | a358003542/pyside2_examples | 5f337211e615a726541bf6766455d4f2c9d0f551 | [
"MIT"
] | 1 | 2020-02-11T08:22:28.000Z | 2020-02-11T08:22:28.000Z | pyqt-official/mainwindows/menus.py | a358003542/pyside2_examples | 5f337211e615a726541bf6766455d4f2c9d0f551 | [
"MIT"
] | null | null | null | pyqt-official/mainwindows/menus.py | a358003542/pyside2_examples | 5f337211e615a726541bf6766455d4f2c9d0f551 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#############################################################################
##
## Copyright (C) 2013 Riverbank Computing Limited.
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
##
## This file is part of the examples of PyQt.
##
## $QT_BEGIN_LICENS... | 38.836237 | 87 | 0.649919 |
fcf62b3e18db7eca179f7349d36eec1a2f948c8b | 348 | py | Python | code/ch15/seqiofile3.py | raionik/Py4Bio | f95ba16ef295f4889149123c5f76419d38077bc5 | [
"MIT"
] | 66 | 2017-01-11T14:37:31.000Z | 2022-03-20T23:23:45.000Z | code/ch15/seqiofile3.py | raionik/Py4Bio | f95ba16ef295f4889149123c5f76419d38077bc5 | [
"MIT"
] | 8 | 2019-12-14T23:44:27.000Z | 2021-01-05T02:04:10.000Z | code/ch15/seqiofile3.py | raionik/Py4Bio | f95ba16ef295f4889149123c5f76419d38077bc5 | [
"MIT"
] | 32 | 2017-08-21T11:57:55.000Z | 2021-07-22T00:42:21.000Z | from Bio import SeqIO
INPUT_FILE = 'fasta22_out.fas'
OUTPUT_FILE = 'fasta33.fas'
with open(INPUT_FILE) as in_fh:
with open(OUTPUT_FILE, 'w') as out_fh:
for record in SeqIO.parse(in_fh,'fasta'):
# Modify description
record.description += '[Rattus norvegicus]'
SeqIO.write... | 29 | 55 | 0.643678 |
0388131b53f1e02b2d450b19132bce160c81ff92 | 835 | py | Python | salamander/get_borrow.py | cclauss/statarb | a59366f70122c355fc93a2391362a3e8818a290e | [
"Apache-2.0"
] | 51 | 2019-02-01T19:43:37.000Z | 2022-03-16T09:07:03.000Z | salamander/get_borrow.py | cclauss/statarb | a59366f70122c355fc93a2391362a3e8818a290e | [
"Apache-2.0"
] | 2 | 2019-02-23T18:54:22.000Z | 2019-11-09T01:30:32.000Z | salamander/get_borrow.py | cclauss/statarb | a59366f70122c355fc93a2391362a3e8818a290e | [
"Apache-2.0"
] | 35 | 2019-02-08T02:00:31.000Z | 2022-03-01T23:17:00.000Z | import pandas as pd
import argparse
import glob
def get_borrow(locates_dir):
result_dfs = []
for ff in sorted(glob.glob(locates_dir + "/locates/Historical_Avail_US_Weekly_*")):
print("Loading", ff)
df = pd.read_csv(ff, parse_dates=['history_date'],
usecols=['history_dat... | 37.954545 | 103 | 0.671856 |
bd29fda4b61b3b4677a3e5ccab1c901a35ea203d | 25 | py | Python | euc/kingsong/__init__.py | mrk-its/euc.kingsong | 5f29c11bd88bea5d6c89260430838c616f6518ce | [
"MIT"
] | 2 | 2020-06-05T03:21:03.000Z | 2021-03-04T23:38:36.000Z | euc/kingsong/__init__.py | mrk-its/euc.kingsong | 5f29c11bd88bea5d6c89260430838c616f6518ce | [
"MIT"
] | null | null | null | euc/kingsong/__init__.py | mrk-its/euc.kingsong | 5f29c11bd88bea5d6c89260430838c616f6518ce | [
"MIT"
] | null | null | null | from .kingsong import KS
| 12.5 | 24 | 0.8 |
57dc66e5d3d9fd175fca8aaef1065ae5141f62f1 | 9,568 | py | Python | chupbot.py | NateDimick/chupeverything | a2c5a7c9f9c9a1371d5591953a314d59b07ed124 | [
"MIT"
] | null | null | null | chupbot.py | NateDimick/chupeverything | a2c5a7c9f9c9a1371d5591953a314d59b07ed124 | [
"MIT"
] | 4 | 2021-06-08T21:31:52.000Z | 2022-03-12T00:28:43.000Z | chupbot.py | NateDimick/chupeverything | a2c5a7c9f9c9a1371d5591953a314d59b07ed124 | [
"MIT"
] | null | null | null | """
Chupbot phase 2: chup looks fine but must looks like shit
author: Nate Dimick
"""
import tweepy as tp
import json
from PIL import Image, ImageDraw
import numpy as np
from colormath.color_diff import delta_e_cie2000
from colormath.color_objects import LabColor, sRGBColor
from colormath.color_conversions import conv... | 38.736842 | 203 | 0.615176 |
f80373c0d219469676db516240231cb1d4765c33 | 3,106 | py | Python | Serveur/setup_db.py | EvannBerthou/DevoirIUT | ecc11190ad94a651a59bdb247432f71499958ffb | [
"MIT"
] | 2 | 2020-11-28T13:54:18.000Z | 2020-11-30T12:43:45.000Z | Serveur/setup_db.py | EvannBerthou/DevoirIUT | ecc11190ad94a651a59bdb247432f71499958ffb | [
"MIT"
] | 4 | 2020-12-02T18:25:35.000Z | 2020-12-16T13:13:52.000Z | Serveur/setup_db.py | EvannBerthou/DevoirIUT | ecc11190ad94a651a59bdb247432f71499958ffb | [
"MIT"
] | 2 | 2020-12-02T18:27:09.000Z | 2021-03-17T18:03:33.000Z | import sqlite3
import requests
from bs4 import BeautifulSoup
from werkzeug.security import generate_password_hash
import xml.etree.ElementTree as ET
html = requests.get('http://chronos.iut-velizy.uvsq.fr/EDT/gindex.html').content
soup = BeautifulSoup(html, features='html.parser')
options = soup.find_all('option')#.tex... | 33.397849 | 109 | 0.622344 |
c8aabfaa466e417ba3a78e727d750448e0a714ec | 1,514 | py | Python | network_checker/conftest.py | Zipfer/fuel-web | c6c4032eb6e29474e2be0318349265bdb566454c | [
"Apache-2.0"
] | 1 | 2021-04-06T16:13:35.000Z | 2021-04-06T16:13:35.000Z | network_checker/conftest.py | Zipfer/fuel-web | c6c4032eb6e29474e2be0318349265bdb566454c | [
"Apache-2.0"
] | null | null | null | network_checker/conftest.py | Zipfer/fuel-web | c6c4032eb6e29474e2be0318349265bdb566454c | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | 33.644444 | 78 | 0.653897 |
43d727b282a863f3e9e9811bc7e07c026d0cb3a4 | 1,346 | py | Python | main.py | Niels-NTG/GDMC2021MGAI | 54138ff16f24bc6c8615e54239a3d6c9245113ba | [
"MIT"
] | null | null | null | main.py | Niels-NTG/GDMC2021MGAI | 54138ff16f24bc6c8615e54239a3d6c9245113ba | [
"MIT"
] | null | null | null | main.py | Niels-NTG/GDMC2021MGAI | 54138ff16f24bc6c8615e54239a3d6c9245113ba | [
"MIT"
] | null | null | null | import interfaceUtils
import HousingBlock
# Set to True to enable multi-threading. This will make the built go slightly faster, but can also crash the
# Minecraft Forge server/client when there are too many threads, which may occur when constructing in a large
# build area.
USE_THREADING = False
def getBuildArea(are... | 31.302326 | 109 | 0.693908 |
dec14450a9dfb575457b578198456990d3a96c16 | 17,306 | py | Python | tests/test_modeling_tf_marian.py | sunjiao123sun/transformers | c994eca173f0eaf818caf4cc93148a4b040a6b04 | [
"Apache-2.0"
] | null | null | null | tests/test_modeling_tf_marian.py | sunjiao123sun/transformers | c994eca173f0eaf818caf4cc93148a4b040a6b04 | [
"Apache-2.0"
] | null | null | null | tests/test_modeling_tf_marian.py | sunjiao123sun/transformers | c994eca173f0eaf818caf4cc93148a4b040a6b04 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2021 The HuggingFace Inc. team. 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 r... | 39.875576 | 117 | 0.672946 |
1eadc6039d05c5d5b5b3a2eae61bdf65e1e82afb | 21,452 | py | Python | surfify/models/vae.py | neurospin-deepinsight/surfify | 68ba674c20e759ee9c56acbd4a1a44781d35a68c | [
"CECILL-B"
] | 2 | 2021-12-17T10:14:31.000Z | 2022-01-24T17:17:01.000Z | surfify/models/vae.py | neurospin-deepinsight/surfify | 68ba674c20e759ee9c56acbd4a1a44781d35a68c | [
"CECILL-B"
] | null | null | null | surfify/models/vae.py | neurospin-deepinsight/surfify | 68ba674c20e759ee9c56acbd4a1a44781d35a68c | [
"CECILL-B"
] | 3 | 2021-09-16T08:26:19.000Z | 2022-01-23T18:31:50.000Z | # -*- coding: utf-8 -*-
##########################################################################
# NSAp - Copyright (C) CEA, 2021
# Distributed under the terms of the CeCILL-B license, as published by
# the CEA-CNRS-INRIA. Refer to the LICENSE file or to
# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
#... | 40.628788 | 79 | 0.578827 |
e140f6ee5f31c1a4218ea968fc90d4cc71d735e8 | 29,307 | py | Python | modules/pymol/wizard/mutagenesis.py | Biondilbiondo/pymol-open-source | 65232aa82f46b453cddef492d6d90cd255dcb5aa | [
"CNRI-Python"
] | null | null | null | modules/pymol/wizard/mutagenesis.py | Biondilbiondo/pymol-open-source | 65232aa82f46b453cddef492d6d90cd255dcb5aa | [
"CNRI-Python"
] | null | null | null | modules/pymol/wizard/mutagenesis.py | Biondilbiondo/pymol-open-source | 65232aa82f46b453cddef492d6d90cd255dcb5aa | [
"CNRI-Python"
] | null | null | null |
from __future__ import print_function
from pymol.wizard import Wizard
from pymol import cmd,editor
from chempy import io
from copy import deepcopy
import pymol
import os
import traceback
src_sele = "_mutate_sel"
bump_name = "_bump_check"
obj_name = "mutation"
frag_name = "_tmp_mut"
mut_sele = "_tmp_mut_sele"
tmp_o... | 39.927793 | 122 | 0.468148 |
72a799c3f3b53672f4d0be5528a7e2ca55d2566a | 1,139 | py | Python | user_sync/version.py | sabanawaf/user-sync.py | 51a7f9165d1740120b172edf507f1b3b3d5e57f8 | [
"MIT"
] | null | null | null | user_sync/version.py | sabanawaf/user-sync.py | 51a7f9165d1740120b172edf507f1b3b3d5e57f8 | [
"MIT"
] | null | null | null | user_sync/version.py | sabanawaf/user-sync.py | 51a7f9165d1740120b172edf507f1b3b3d5e57f8 | [
"MIT"
] | null | null | null | # Copyright (c) 2016-2017 Adobe Inc. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modif... | 51.772727 | 80 | 0.775241 |
98074bd5fb28125a2d075874b342c834c7810ae3 | 523 | py | Python | code/Solution_0009_isPalindrome.py | qizhenkang/myLeetCode | cb9edce69567eba9d96ce756507a5a7ac6e74293 | [
"MIT"
] | null | null | null | code/Solution_0009_isPalindrome.py | qizhenkang/myLeetCode | cb9edce69567eba9d96ce756507a5a7ac6e74293 | [
"MIT"
] | null | null | null | code/Solution_0009_isPalindrome.py | qizhenkang/myLeetCode | cb9edce69567eba9d96ce756507a5a7ac6e74293 | [
"MIT"
] | null | null | null | class Solution:
def isPalindrome(self, x: int) -> bool:
result = False
y = x
x_p = 0
if x >= 0:
while y != 0:
x_p = x_p * 10 + y % 10
y = int(y / 10)
if x == x_p:
result = True
return result
if __name__... | 23.772727 | 58 | 0.460803 |
4559730fda304b2ab931bfc17c2a1b84111398a9 | 2,300 | py | Python | pws/scraper.py | zamys/pws | b26ddb12cbbb00ef3a337d8b5a8ef7dc051d4b13 | [
"MIT"
] | null | null | null | pws/scraper.py | zamys/pws | b26ddb12cbbb00ef3a337d8b5a8ef7dc051d4b13 | [
"MIT"
] | null | null | null | pws/scraper.py | zamys/pws | b26ddb12cbbb00ef3a337d8b5a8ef7dc051d4b13 | [
"MIT"
] | null | null | null | import keys
import tweepy
import datetime
import time
import jsonpickle
time_start = time.time()
#Authenticatie
key = keys.GetKeys()
auth = tweepy.OAuthHandler(key.consumer, key.consumer_secret)
auth.set_access_token(key.access_token, key.access_token_secret)
api = tweepy.API(auth)
#Hoeveel tweets worden opgeslagen p... | 37.704918 | 153 | 0.653043 |
e4d10182ff87fb56988884cc61ae63704f69a03e | 994 | py | Python | scripts/disc_ssl_https.py | leshak/zabbix-ssl-nginx | efed212bbb17a32dddc9d30beb354c040ba63f65 | [
"MIT"
] | null | null | null | scripts/disc_ssl_https.py | leshak/zabbix-ssl-nginx | efed212bbb17a32dddc9d30beb354c040ba63f65 | [
"MIT"
] | null | null | null | scripts/disc_ssl_https.py | leshak/zabbix-ssl-nginx | efed212bbb17a32dddc9d30beb354c040ba63f65 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import crossplane
import json
NGINX_CONFIG_PATH = '/etc/nginx/nginx.conf'
HTTPS_PORT = 'ssl'
domainsList = []
nginxConfig = crossplane.parse(NGINX_CONFIG_PATH)
if nginxConfig['config']:
for cfile in nginxConfig['config']:
for parsed in cfile['parsed']:
... | 26.157895 | 97 | 0.512072 |
43ec89f1b417e6516f1bb26be4a9317302480397 | 21,689 | py | Python | earth_enterprise/src/google/protobuf-py/google/protobuf/text_format.py | ezeeyahoo/earthenterprise | b6cac9e6228946f2f17d1edb75e118aeb3e8e8c9 | [
"Apache-2.0"
] | 2,661 | 2017-03-20T22:12:50.000Z | 2022-03-30T09:43:19.000Z | earth_enterprise/src/google/protobuf-py/google/protobuf/text_format.py | ezeeyahoo/earthenterprise | b6cac9e6228946f2f17d1edb75e118aeb3e8e8c9 | [
"Apache-2.0"
] | 1,531 | 2017-03-24T17:20:32.000Z | 2022-03-16T18:11:14.000Z | earth_enterprise/src/google/protobuf-py/google/protobuf/text_format.py | ezeeyahoo/earthenterprise | b6cac9e6228946f2f17d1edb75e118aeb3e8e8c9 | [
"Apache-2.0"
] | 990 | 2017-03-24T11:54:28.000Z | 2022-03-22T11:51:47.000Z | # Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# http://code.google.com/p/protobuf/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions o... | 31.387844 | 79 | 0.669418 |
9ad960a686576a290ce25c35c471ea05346f4786 | 419 | py | Python | src/dsalgo/queue_test.py | kagemeka/python-algorithms | dface89b8c618845cf524429aa8e97c4b2b10ceb | [
"MIT"
] | 1 | 2022-02-10T02:13:07.000Z | 2022-02-10T02:13:07.000Z | src/dsalgo/queue_test.py | kagemeka/python-algorithms | dface89b8c618845cf524429aa8e97c4b2b10ceb | [
"MIT"
] | 6 | 2022-01-05T09:15:54.000Z | 2022-01-09T05:48:43.000Z | src/dsalgo/queue_test.py | kagemeka/python-algorithms | dface89b8c618845cf524429aa8e97c4b2b10ceb | [
"MIT"
] | null | null | null | import unittest
import dsalgo.queue
class Test(unittest.TestCase):
def test_singly_linked_list(self) -> None:
que = dsalgo.queue.SinglyLinkedList[int]()
que.append(1)
self.assertEqual(len(que), 1)
self.assertEqual(que.pop(), 1)
self.assertEqual(len(que), 0)
with se... | 22.052632 | 50 | 0.630072 |
cd88a02de866c1e82cdf9dba42793edc9216ea6b | 2,923 | py | Python | benchmarks/parsetree_benchmark.py | devincornell/sqlitedocuments | 16923bb3b91af5104140e49045efdc612afbc310 | [
"MIT"
] | 1 | 2019-06-19T20:27:55.000Z | 2019-06-19T20:27:55.000Z | benchmarks/parsetree_benchmark.py | devincornell/sqlitedocuments | 16923bb3b91af5104140e49045efdc612afbc310 | [
"MIT"
] | 21 | 2019-04-12T01:08:20.000Z | 2020-11-09T18:28:41.000Z | benchmarks/parsetree_benchmark.py | devincornell/sqlitedocuments | 16923bb3b91af5104140e49045efdc612afbc310 | [
"MIT"
] | null | null | null | import pickle
import pathlib
import spacy
import sys
sys.path.append('..')
import doctable
import timing
import tqdm
import urllib.request
def download_nss(
baseurl='https://raw.githubusercontent.com/devincornell/nssdocs/master/docs/',
years = (1987, 1988, 1990, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 200... | 31.430108 | 111 | 0.669176 |
ce026a18d747345384f03f637aa8a2b7c9735496 | 1,529 | py | Python | examples/example.py | jsongmax/proxy_pool | 6e85b474d66a3f1f7bc5b006ea1d042c9ff12e14 | [
"Apache-2.0"
] | 9 | 2019-09-29T05:59:27.000Z | 2020-01-11T04:54:05.000Z | examples/example.py | jsongmax/proxy_pool | 6e85b474d66a3f1f7bc5b006ea1d042c9ff12e14 | [
"Apache-2.0"
] | 3 | 2019-09-29T06:10:56.000Z | 2019-11-29T06:41:02.000Z | examples/example.py | jsongmax/proxy_pool | 6e85b474d66a3f1f7bc5b006ea1d042c9ff12e14 | [
"Apache-2.0"
] | 5 | 2019-09-30T06:35:03.000Z | 2020-09-29T08:07:42.000Z | # -*- coding: utf-8 -*-
import random
import time
import redis
import requests
from fake_useragent import UserAgent
from lxml import etree
# redis连接池
pool = redis.ConnectionPool(host="127.0.0.1", port=6379, db=15)
# 从池子里面取除值
redis_client = redis.Redis(connection_pool=pool, decode_responses=True)
REDIS_KEY = "freeprox... | 28.314815 | 124 | 0.642904 |
53463d11d35c410f6ad13ce3ecd8c4df4070c00a | 228 | py | Python | Exercicios/exe003.py | EmersonLCruz/Python | a2f2bfdbdcce33ac5f8473b6438a04f9dbd8ce1e | [
"MIT"
] | null | null | null | Exercicios/exe003.py | EmersonLCruz/Python | a2f2bfdbdcce33ac5f8473b6438a04f9dbd8ce1e | [
"MIT"
] | null | null | null | Exercicios/exe003.py | EmersonLCruz/Python | a2f2bfdbdcce33ac5f8473b6438a04f9dbd8ce1e | [
"MIT"
] | null | null | null | # Crie um programa que leia dois números e mostre a soma entre eles.
n1 = int(input('Digite Primeiro Valor:'))
n2 = int(input('Digite Segundo Valor:'))
soma = n1 + n2
print('A soma entre {} e {} é igual a {}'.format(n1,n2,soma)) | 45.6 | 68 | 0.679825 |
3b5228e6bdb739d6fdc649837c0fd893bda9ca92 | 105 | py | Python | secrets.template.py | basilleaf/curated_retweet_bot | fb028b04c7ead353e820dad332e95e81c5e91376 | [
"MIT"
] | null | null | null | secrets.template.py | basilleaf/curated_retweet_bot | fb028b04c7ead353e820dad332e95e81c5e91376 | [
"MIT"
] | 2 | 2015-08-05T20:32:58.000Z | 2016-11-18T21:59:31.000Z | secrets.template.py | basilleaf/fav_retweet_bot | fb028b04c7ead353e820dad332e95e81c5e91376 | [
"MIT"
] | null | null | null | # twitter auth creds
consumer_key = ''
consumer_secret = ''
access_token = ''
access_token_secret = ''
| 17.5 | 24 | 0.704762 |
4c2e61e636efee10e089ef1962ecd5aad481cba2 | 7,729 | py | Python | tests/unit/test_default_connection.py | festicket/connect-sdk-python3 | c399c6443789dd978f319c89e1ebd387c812a77b | [
"MIT"
] | 12 | 2016-09-26T21:46:31.000Z | 2020-12-23T18:44:54.000Z | tests/unit/test_default_connection.py | festicket/connect-sdk-python3 | c399c6443789dd978f319c89e1ebd387c812a77b | [
"MIT"
] | 3 | 2020-05-02T16:53:02.000Z | 2020-06-02T12:49:51.000Z | tests/unit/test_default_connection.py | festicket/connect-sdk-python3 | c399c6443789dd978f319c89e1ebd387c812a77b | [
"MIT"
] | 11 | 2017-07-16T00:55:28.000Z | 2021-09-24T17:00:49.000Z | import unittest
import warnings
from ingenico.connect.sdk.communicator_configuration import CommunicatorConfiguration
from ingenico.connect.sdk.log.response_log_message import ResponseLogMessage
from ingenico.connect.sdk.log.sys_out_communicator_logger import SysOutCommunicatorLogger
from ingenico.connect.sdk.defaulti... | 50.51634 | 114 | 0.709018 |
ce66a754b61765ee75423b8d3fce7da4505ffbbd | 14,373 | py | Python | pyglet/__init__.py | theblacklion/pyglet | 5fd5c7d581e376946b7a94fac9582c09ad65bcd2 | [
"BSD-3-Clause"
] | null | null | null | pyglet/__init__.py | theblacklion/pyglet | 5fd5c7d581e376946b7a94fac9582c09ad65bcd2 | [
"BSD-3-Clause"
] | null | null | null | pyglet/__init__.py | theblacklion/pyglet | 5fd5c7d581e376946b7a94fac9582c09ad65bcd2 | [
"BSD-3-Clause"
] | null | null | null | # ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributi... | 34.385167 | 114 | 0.644542 |
c733d05361a02b979e1b0d9c33d099077d656562 | 2,370 | py | Python | selenium__examples/music_yandex_ru/set_progress_playing_track.py | DazEB2/SimplePyScripts | 1dde0a42ba93fe89609855d6db8af1c63b1ab7cc | [
"CC-BY-4.0"
] | 117 | 2015-12-18T07:18:27.000Z | 2022-03-28T00:25:54.000Z | selenium__examples/music_yandex_ru/set_progress_playing_track.py | DazEB2/SimplePyScripts | 1dde0a42ba93fe89609855d6db8af1c63b1ab7cc | [
"CC-BY-4.0"
] | 8 | 2018-10-03T09:38:46.000Z | 2021-12-13T19:51:09.000Z | selenium__examples/music_yandex_ru/set_progress_playing_track.py | DazEB2/SimplePyScripts | 1dde0a42ba93fe89609855d6db8af1c63b1ab7cc | [
"CC-BY-4.0"
] | 28 | 2016-08-02T17:43:47.000Z | 2022-03-21T08:31:12.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'ipetrash'
import itertools
import time
import re
import sys
# pip install selenium
from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains
from selenium.common.exceptions import NoSuchElementException, StaleElementR... | 30.384615 | 126 | 0.698312 |
f8f6fb4f5174ea4f5e9c897312893c77de18de33 | 358 | py | Python | app/gwells/views/APIViews.py | cvarjao/gwells | cb47ec1d0c31b6f1586843e491f7cb5f1b98d61a | [
"Apache-2.0"
] | 1 | 2020-01-29T22:42:40.000Z | 2020-01-29T22:42:40.000Z | app/gwells/views/APIViews.py | matthewhall78/gwells | cb47ec1d0c31b6f1586843e491f7cb5f1b98d61a | [
"Apache-2.0"
] | 1 | 2018-05-02T05:28:33.000Z | 2018-05-09T15:58:07.000Z | app/gwells/views/APIViews.py | matthewhall78/gwells | cb47ec1d0c31b6f1586843e491f7cb5f1b98d61a | [
"Apache-2.0"
] | 1 | 2018-05-02T23:56:48.000Z | 2018-05-02T23:56:48.000Z | from rest_framework.generics import ListAPIView
from gwells.serializers import SurveySerializer
from gwells.models.Survey import Survey
class SurveyListView(ListAPIView):
"""
get: returns a list of active surveys
"""
serializer_class = SurveySerializer
queryset = Survey.objects.filter(survey_enab... | 25.571429 | 57 | 0.773743 |
2496ca229c2c1a1f98abcabdae372cf83e34b455 | 508 | py | Python | slp/config/moviecorpus.py | manzar96/movie_corpus_chatbot | 59de55de261330ed87b652dac6f8e045bf4fffcf | [
"MIT"
] | null | null | null | slp/config/moviecorpus.py | manzar96/movie_corpus_chatbot | 59de55de261330ed87b652dac6f8e045bf4fffcf | [
"MIT"
] | 1 | 2020-12-05T22:57:13.000Z | 2020-12-05T22:57:13.000Z | slp/config/moviecorpus.py | manzar96/movie_corpus_chatbot | 59de55de261330ed87b652dac6f8e045bf4fffcf | [
"MIT"
] | null | null | null | from enum import Enum
MOVIECORPUS_URL = 'http://www.cs.cornell.edu/~cristian/data' \
'/cornell_movie_dialogs_corpus.zip'
class SPECIAL_TOKENS(Enum):
PAD = '[PAD]'
MASK = '[MASK]'
UNK = '[UNK]'
BOS = '[BOS]'
EOS = '[EOS]'
CLS = '[CLS]'
@classmethod
def has_token(cl... | 20.32 | 62 | 0.55315 |
ab28da2a5eaa377b2794e26a50717290ef685cc2 | 2,499 | py | Python | nanpack/tests/test_thirdpartyinstalls.py | vxsharma-14/DIFFUS | d70633890b8fb2e7b3dde918eb13b263f7a035ef | [
"MIT"
] | 14 | 2021-01-28T06:52:15.000Z | 2021-03-05T01:34:30.000Z | nanpack/tests/test_thirdpartyinstalls.py | vxsharma-14/DIFFUS | d70633890b8fb2e7b3dde918eb13b263f7a035ef | [
"MIT"
] | 2 | 2020-12-23T10:44:09.000Z | 2020-12-24T12:02:25.000Z | nanpack/tests/test_thirdpartyinstalls.py | vxsharma-14/DIFFUS | d70633890b8fb2e7b3dde918eb13b263f7a035ef | [
"MIT"
] | 2 | 2021-01-28T06:52:17.000Z | 2021-01-30T12:35:52.000Z | # ***********************************************************************
#
# FILE test_requiredinstalls.py
#
# AUTHOR Dr. Vishal Sharma
#
# VERSION 1.0.0-alpha4
#
# WEBSITE https://github.com/vxsharma-14/project-NAnPack
#
# NAnPack Learner's Edition is distributed under th... | 34.708333 | 76 | 0.618247 |
c834d9f137d41d2bb5017e67c608124d0d164ede | 1,341 | py | Python | Hard/Nth_Magical_Number.py | dianjiaogit/LeetCode_Python_solution | 390693c839d1be8802c21ea81062443b6d5ea36f | [
"MIT"
] | null | null | null | Hard/Nth_Magical_Number.py | dianjiaogit/LeetCode_Python_solution | 390693c839d1be8802c21ea81062443b6d5ea36f | [
"MIT"
] | null | null | null | Hard/Nth_Magical_Number.py | dianjiaogit/LeetCode_Python_solution | 390693c839d1be8802c21ea81062443b6d5ea36f | [
"MIT"
] | null | null | null | # A positive integer is magical if it is divisible by either A or B.
# Return the N-th magical number. Since the answer may be very large, return it modulo 10^9 + 7.
# Example 1:
# Input: N = 1, A = 2, B = 3
# Output: 2
# Example 2:
# Input: N = 4, A = 2, B = 3
# Output: 6
# Example 3:
# Input: N = 5, A = 2, B... | 20.953125 | 97 | 0.40343 |
22b059b73632e420a59a4ba7590ab37dc527218a | 8,040 | py | Python | src/ar_main2.py | mtc-20/augmented-reality | f86c1df4d21b87c95fd294e4553db649ec0857a1 | [
"MIT"
] | null | null | null | src/ar_main2.py | mtc-20/augmented-reality | f86c1df4d21b87c95fd294e4553db649ec0857a1 | [
"MIT"
] | null | null | null | src/ar_main2.py | mtc-20/augmented-reality | f86c1df4d21b87c95fd294e4553db649ec0857a1 | [
"MIT"
] | 1 | 2021-07-02T10:42:30.000Z | 2021-07-02T10:42:30.000Z | '''
Created on Saturday, 31st October 2019
@author: mtc-20
Coded on VS Code 2019
------
Overview:
------
Last Modified: Sun Oct 04 2020
'''
# Useful links
# http://www.pygame.org/wiki/OBJFileLoader
# TODO -> Implement command line arguments (scale, model and object to be projected)
# TODO -> Refactor and organize... | 39.029126 | 124 | 0.620025 |
ee8e7cda6e4ce11412f226862a21abfa73fc316c | 15,251 | py | Python | tests/snuba/api/serializers/test_group.py | pierredup/sentry | 0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80 | [
"BSD-3-Clause"
] | null | null | null | tests/snuba/api/serializers/test_group.py | pierredup/sentry | 0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80 | [
"BSD-3-Clause"
] | null | null | null | tests/snuba/api/serializers/test_group.py | pierredup/sentry | 0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from sentry.utils.compat import mock
import six
from datetime import timedelta
from django.utils import timezone
from sentry.utils.compat.mock import patch
from sentry.api.serializers import serialize
from sentry.api.serializers.models.group import (
... | 39.819843 | 100 | 0.636548 |
81e2a80dc6b2977de2314bab6b2a9b336abfe7ed | 54,099 | py | Python | python/cudf/dataframe/dataframe.py | OlivierNV/cudf | 7aa3799e73948899a85e70bc73d3cea50b65dff1 | [
"Apache-2.0"
] | 1 | 2019-08-13T17:19:42.000Z | 2019-08-13T17:19:42.000Z | python/cudf/dataframe/dataframe.py | OlivierNV/cudf | 7aa3799e73948899a85e70bc73d3cea50b65dff1 | [
"Apache-2.0"
] | null | null | null | python/cudf/dataframe/dataframe.py | OlivierNV/cudf | 7aa3799e73948899a85e70bc73d3cea50b65dff1 | [
"Apache-2.0"
] | 1 | 2019-08-13T17:19:45.000Z | 2019-08-13T17:19:45.000Z | # Copyright (c) 2018, NVIDIA CORPORATION.
from __future__ import print_function, division
import inspect
import random
from collections import OrderedDict
import warnings
import numpy as np
import pandas as pd
import pyarrow as pa
from numba.cuda.cudadrv.devicearray import DeviceNDArray
from librmm_cffi import lib... | 31.655354 | 84 | 0.511488 |
7531acf352e8987d94ac5c56b1c380105d4df383 | 10,302 | py | Python | deprecated_work/deprecated.py | sumanthratna/PathFlowAI | 70324e78da7ad9452789478b9be7cc76515ea3ab | [
"MIT"
] | null | null | null | deprecated_work/deprecated.py | sumanthratna/PathFlowAI | 70324e78da7ad9452789478b9be7cc76515ea3ab | [
"MIT"
] | null | null | null | deprecated_work/deprecated.py | sumanthratna/PathFlowAI | 70324e78da7ad9452789478b9be7cc76515ea3ab | [
"MIT"
] | null | null | null | def extract_patch_info(
basename,
input_dir="./",
annotations=[],
threshold=0.5,
patch_size=224,
generate_finetune_segmentation=False,
target_class=0,
intensity_threshold=100.0,
target_threshold=0.0,
):
# from collections import OrderedDict
# annotations=OrderedDict(annotatio... | 36.147368 | 109 | 0.540478 |
a9de9895fb4cc27a494d724a2d9b9ae2e348f06d | 7,550 | py | Python | mongomock/database.py | ymoran00/mongomock | c580df1455f065114bc1ac057f10414e91d95b73 | [
"BSD-3-Clause"
] | null | null | null | mongomock/database.py | ymoran00/mongomock | c580df1455f065114bc1ac057f10414e91d95b73 | [
"BSD-3-Clause"
] | null | null | null | mongomock/database.py | ymoran00/mongomock | c580df1455f065114bc1ac057f10414e91d95b73 | [
"BSD-3-Clause"
] | null | null | null | import warnings
from . import CollectionInvalid
from . import InvalidName
from . import OperationFailure
from .collection import Collection
from mongomock import read_preferences
from mongomock import store
from six import string_types
try:
from bson import codec_options as bson_codec_options
from pymongo im... | 39.94709 | 100 | 0.644503 |
bc1e2326a0a5b0e7a40bf78b903c703904993ebb | 3,362 | py | Python | GraduationDesign/SSFN_V5/Word2Vec.py | sivanWu0222/GraduationProject | 3f98d078b763dd84a246999879040c34cfbc5efb | [
"MIT"
] | 12 | 2019-04-27T11:17:16.000Z | 2022-02-27T14:03:12.000Z | GraduationDesign/SSFN_V5/Word2Vec.py | sivanWu0222/GraduationProject | 3f98d078b763dd84a246999879040c34cfbc5efb | [
"MIT"
] | 1 | 2022-03-21T12:31:29.000Z | 2022-03-26T03:01:14.000Z | GraduationDesign/SSFN_V5/Word2Vec.py | sivanWu0222/GraduationProject | 3f98d078b763dd84a246999879040c34cfbc5efb | [
"MIT"
] | null | null | null | from gensim.models import KeyedVectors
class Word2Vec():
def __init__(self, modelPath, kind='bin'):
"""
创建Word2Vec对象
modelPath: 模型路径
kind: 模型类型
bin: 二进制文件
txt: 文本文件
return: 无
"""
if kind != 'bin':
kind = False
el... | 28.982759 | 103 | 0.582689 |
d75a2ae0a72dcd116d32dd579263f6b4afa25e2c | 303 | py | Python | rss/setup.py | yxy1996/ros-wifi-localization | 891b67dfd162708201e0347a7f757093a7553348 | [
"BSD-3-Clause"
] | 25 | 2018-04-27T22:04:27.000Z | 2022-03-14T20:50:45.000Z | rss/setup.py | yxy1996/ros-wifi-localization | 891b67dfd162708201e0347a7f757093a7553348 | [
"BSD-3-Clause"
] | 3 | 2018-04-23T12:00:04.000Z | 2021-08-20T02:00:12.000Z | rss/setup.py | yxy1996/ros-wifi-localization | 891b67dfd162708201e0347a7f757093a7553348 | [
"BSD-3-Clause"
] | 7 | 2019-06-19T17:36:34.000Z | 2021-09-07T13:59:11.000Z | ## ! DO NOT MANUALLY INVOKE THIS setup.py, USE CATKIN INSTEAD
from distutils.core import setup
from catkin_pkg.python_setup import generate_distutils_setup
# fetch values from package.xml
setup_args = generate_distutils_setup(
packages=['rss'],
package_dir={'': 'src'},
)
setup(**setup_args)
| 23.307692 | 61 | 0.755776 |
25c77d6239164b01491d8e551234d6cf9e5f9140 | 5,534 | py | Python | preprocess_alignment.py | andi611/Mockingjay-Speech-Representation | 8f41f5728bdb94497e939fee0d67c7f65729a035 | [
"MIT"
] | 105 | 2019-10-24T05:28:57.000Z | 2022-02-21T23:08:07.000Z | preprocess_alignment.py | aviasd/Mockingjay-Speech-Representation | c01aef3f98bbb3fd4b0fc1b61e77fb5d02a0e453 | [
"MIT"
] | 9 | 2020-02-17T06:39:53.000Z | 2022-03-14T08:46:35.000Z | preprocess_alignment.py | aviasd/Mockingjay-Speech-Representation | c01aef3f98bbb3fd4b0fc1b61e77fb5d02a0e453 | [
"MIT"
] | 19 | 2019-10-29T11:40:34.000Z | 2021-11-24T16:36:04.000Z | # -*- coding: utf-8 -*- #
"""*********************************************************************************************"""
# FileName [ preprocess_alignment.py ]
# Synopsis [ preprocess phone alignment for the LibriSpeech dataset ]
# Author [ Andy T. Liu (Andi611) ]
# Copyright [ Copyleft(c)... | 38.430556 | 129 | 0.573003 |
b550c0e3a7b2f4bc9917cd5921f9e8dd45643661 | 4,387 | py | Python | code/model/train.py | fegonda/icon_demo | d2d1b0148989187c1433597f9c3ae4357178c082 | [
"MIT"
] | null | null | null | code/model/train.py | fegonda/icon_demo | d2d1b0148989187c1433597f9c3ae4357178c082 | [
"MIT"
] | null | null | null | code/model/train.py | fegonda/icon_demo | d2d1b0148989187c1433597f9c3ae4357178c082 | [
"MIT"
] | null | null | null | #---------------------------------------------------------------------------
# train.py
#
# Author : Felix Gonda
# Date : July 10, 2015
# School : Harvard University
#
# Project : Master Thesis
# An Interactive Deep Learning Toolkit for
# Automatic Segmentation of Images
#
# Summary : This file... | 31.113475 | 115 | 0.530203 |
1086dd793e2b8ea7d9b1e32d68cf275553b03aac | 916 | py | Python | adapo/config.py | michaelimfeld/csgo-server-manager | 06cd883b0f46924f20b7fc48260c0d0cd471d6c9 | [
"MIT"
] | 3 | 2015-11-19T19:52:00.000Z | 2016-03-13T22:53:43.000Z | adapo/config.py | michaelimfeld/adapo | 06cd883b0f46924f20b7fc48260c0d0cd471d6c9 | [
"MIT"
] | null | null | null | adapo/config.py | michaelimfeld/adapo | 06cd883b0f46924f20b7fc48260c0d0cd471d6c9 | [
"MIT"
] | null | null | null | """
Provides a YAML configuration file reader.
"""
import yaml
from adapo.logger import Logger
class Config(object):
"""
YAML configuration file reader.
"""
def __init__(self, path):
self._cfg = None
self._log = Logger()
self._path = path
self.load_config()
... | 22.9 | 62 | 0.530568 |
187bfd89bf56db61520e6e4074a511eeae1d369c | 9,279 | py | Python | zugdaten/upload_db_use_for_api.py | cfleschhut/virushack | 2fe7ded0be8672b066edef7fed52573794db2ba5 | [
"Apache-2.0"
] | null | null | null | zugdaten/upload_db_use_for_api.py | cfleschhut/virushack | 2fe7ded0be8672b066edef7fed52573794db2ba5 | [
"Apache-2.0"
] | null | null | null | zugdaten/upload_db_use_for_api.py | cfleschhut/virushack | 2fe7ded0be8672b066edef7fed52573794db2ba5 | [
"Apache-2.0"
] | null | null | null | """ Importiert die Backups aus dem Speicher und
uploaded tageweise in amazon s3 """
import os
import re
import pandas as pd
from datetime import datetime
# compatibility with ipython
try:
__IPYTHON__
os.chdir(os.path.dirname(__file__))
except: pass
from db import DatabaseWrapper
import json
import boto3
from pa... | 34.752809 | 143 | 0.598879 |
d95f95a1eede807bb4243a355e85152a2c6589d6 | 45,996 | py | Python | src/bot_detection.py | data-day-life/twitch_rec | 614071fe474d589fe610a5fd62eb8ba9fa509143 | [
"MIT"
] | null | null | null | src/bot_detection.py | data-day-life/twitch_rec | 614071fe474d589fe610a5fd62eb8ba9fa509143 | [
"MIT"
] | null | null | null | src/bot_detection.py | data-day-life/twitch_rec | 614071fe474d589fe610a5fd62eb8ba9fa509143 | [
"MIT"
] | null | null | null | from dateutil.parser import parse as dt_parse
class BotDetector:
def __init__(self):
self.total_removed = 0
def __str__(self):
return f'Removed {self.total_removed} potential follower bots total.'
@staticmethod
def parse_times(foll_list):
"""
Utilizes python's date... | 356.55814 | 41,059 | 0.657949 |
2b0efca8fd68b4a70eeabb2396ae827a6467d6dc | 30,148 | py | Python | src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2022_01_02_preview/aio/operations/_agent_pools_operations.py | zjpjack/azure-cli-extensions | 17dd637317633ea7984e168900bdf4e62c265096 | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2022_01_02_preview/aio/operations/_agent_pools_operations.py | zjpjack/azure-cli-extensions | 17dd637317633ea7984e168900bdf4e62c265096 | [
"MIT"
] | null | null | null | src/aks-preview/azext_aks_preview/vendored_sdks/azure_mgmt_preview_aks/v2022_01_02_preview/aio/operations/_agent_pools_operations.py | zjpjack/azure-cli-extensions | 17dd637317633ea7984e168900bdf4e62c265096 | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 46.310292 | 291 | 0.68104 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.