hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f71ec5dba68128c31f33297d8579804be932cce8
1,874
py
Python
trisicell/pp/_binary.py
faridrashidi/trisicell
4db89edd44c03ccb6c7d3477beff0079c3ff8035
[ "BSD-3-Clause" ]
2
2021-07-02T13:53:15.000Z
2021-11-16T03:14:36.000Z
trisicell/pp/_binary.py
faridrashidi/trisicell
4db89edd44c03ccb6c7d3477beff0079c3ff8035
[ "BSD-3-Clause" ]
58
2021-06-14T17:14:39.000Z
2022-03-11T19:32:54.000Z
trisicell/pp/_binary.py
faridrashidi/trisicell
4db89edd44c03ccb6c7d3477beff0079c3ff8035
[ "BSD-3-Clause" ]
null
null
null
import trisicell as tsc def binarym_filter_private_mutations(df): df.drop(df.columns[df.sum() == 1], axis=1, inplace=True) def binarym_filter_clonal_mutations(df): x = (df == 1).sum() x = x[x == df.shape[0]] df.drop(x.index, axis=1, inplace=True) def binarym_filter_nonsense_mutations(df, alt_in=2,...
27.558824
80
0.524546
import trisicell as tsc def binarym_filter_private_mutations(df): df.drop(df.columns[df.sum() == 1], axis=1, inplace=True) def binarym_filter_clonal_mutations(df): x = (df == 1).sum() x = x[x == df.shape[0]] df.drop(x.index, axis=1, inplace=True) def binarym_filter_nonsense_mutations(df, alt_in=2,...
true
true
f71ec6103355933855b1b00050428c09848264a0
1,522
py
Python
setup.py
Global-Green-Growth-Institute/GraphModels
6a1c1a545df24daf2f7571fc6be8d47bece55c55
[ "MIT" ]
null
null
null
setup.py
Global-Green-Growth-Institute/GraphModels
6a1c1a545df24daf2f7571fc6be8d47bece55c55
[ "MIT" ]
null
null
null
setup.py
Global-Green-Growth-Institute/GraphModels
6a1c1a545df24daf2f7571fc6be8d47bece55c55
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages with open('README.md', encoding='utf-8') as f: long_description = f.read() with open('requirements.txt') as f: required = f.read().splitlines() required = [r.split('==')[0] for r in required] setup( name='ggmodel_dev', version='0.0.25', description=...
47.5625
274
0.685283
from setuptools import setup, find_packages with open('README.md', encoding='utf-8') as f: long_description = f.read() with open('requirements.txt') as f: required = f.read().splitlines() required = [r.split('==')[0] for r in required] setup( name='ggmodel_dev', version='0.0.25', description=...
true
true
f71ec734137c6570fd65d5935dee186b8ceb089f
95
py
Python
lecture8/dbexample/dbexample2/apps.py
CSUChico-CINS465/CSCI465-Fall2016-Lecture-Examples
332df2821aef74c6522c53278e28ceb27cbe2fe6
[ "MIT" ]
null
null
null
lecture8/dbexample/dbexample2/apps.py
CSUChico-CINS465/CSCI465-Fall2016-Lecture-Examples
332df2821aef74c6522c53278e28ceb27cbe2fe6
[ "MIT" ]
null
null
null
lecture8/dbexample/dbexample2/apps.py
CSUChico-CINS465/CSCI465-Fall2016-Lecture-Examples
332df2821aef74c6522c53278e28ceb27cbe2fe6
[ "MIT" ]
null
null
null
from django.apps import AppConfig class Dbexample2Config(AppConfig): name = 'dbexample2'
15.833333
34
0.768421
from django.apps import AppConfig class Dbexample2Config(AppConfig): name = 'dbexample2'
true
true
f71ec7380a07ff33e88fe3a83f045f17adce3722
112,841
py
Python
subversion/tests/cmdline/switch_tests.py
saurabhacellere/subversion
6e7a18e22d4d4cbfad917e18b784adf1912aa67f
[ "Apache-2.0" ]
null
null
null
subversion/tests/cmdline/switch_tests.py
saurabhacellere/subversion
6e7a18e22d4d4cbfad917e18b784adf1912aa67f
[ "Apache-2.0" ]
null
null
null
subversion/tests/cmdline/switch_tests.py
saurabhacellere/subversion
6e7a18e22d4d4cbfad917e18b784adf1912aa67f
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # switch_tests.py: testing `svn switch'. # # Subversion is a tool for revision control. # See http://subversion.apache.org for more information. # # ==================================================================== # Licensed to the Apache Software Foundation (ASF) under one # or mo...
38.512287
88
0.549393
# # Subversion is a tool for revision control. # See http://subversion.apache.org for more information. # # ==================================================================== # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # dis...
true
true
f71ec7be2b5c89172f80a586dc9687e6c94dc760
14,797
py
Python
l3/plot.py
dominique120/12-steps-navier-stokes
3e195bf7f7895f83f5f2248ef48dc13b76e8b5de
[ "MIT" ]
null
null
null
l3/plot.py
dominique120/12-steps-navier-stokes
3e195bf7f7895f83f5f2248ef48dc13b76e8b5de
[ "MIT" ]
null
null
null
l3/plot.py
dominique120/12-steps-navier-stokes
3e195bf7f7895f83f5f2248ef48dc13b76e8b5de
[ "MIT" ]
null
null
null
#!/usr/bin/env python import matplotlib import matplotlib.pyplot as plt import numpy as np matplotlib.rcParams["font.family"] = "Serif" matplotlib.rcParams["font.size"] = 10 matplotlib.rcParams["axes.labelsize"] = 10 matplotlib.rcParams["xtick.labelsize"] = 10 matplotlib.rcParams["ytick.labelsize"] = 10 matplotlib.rc...
369.925
2,338
0.859904
import matplotlib import matplotlib.pyplot as plt import numpy as np matplotlib.rcParams["font.family"] = "Serif" matplotlib.rcParams["font.size"] = 10 matplotlib.rcParams["axes.labelsize"] = 10 matplotlib.rcParams["xtick.labelsize"] = 10 matplotlib.rcParams["ytick.labelsize"] = 10 matplotlib.rcParams["legend.fontsi...
true
true
f71ec8c0f4f79e7b5d54635479768ae036e669e3
251
py
Python
CodeChef/JUNE20/EOEO.py
mishrakeshav/Competitive-Programming
b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2
[ "MIT" ]
2
2020-06-25T21:10:32.000Z
2020-12-10T06:53:45.000Z
CodeChef/JUNE20/EOEO.py
mishrakeshav/Competitive-Programming
b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2
[ "MIT" ]
null
null
null
CodeChef/JUNE20/EOEO.py
mishrakeshav/Competitive-Programming
b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2
[ "MIT" ]
3
2020-05-15T14:17:09.000Z
2021-07-25T13:18:20.000Z
if __name__ == '__main__': for t in range(int(input())): ts = int(input()) count = 0 while ts%2 == 0: ts //= 2 if ts: print(ts//2) else: print(0)
13.944444
33
0.346614
if __name__ == '__main__': for t in range(int(input())): ts = int(input()) count = 0 while ts%2 == 0: ts //= 2 if ts: print(ts//2) else: print(0)
true
true
f71ec943bd7cd66acb6291dadc6fac09bcc5cefa
6,787
py
Python
ryu/cmd/rpc_cli.py
umkcdcrg01/ryu_openflow
37ed5b88f7d119344e07c95314a7450235c037a8
[ "Apache-2.0" ]
1
2019-05-21T12:05:57.000Z
2019-05-21T12:05:57.000Z
ryu/cmd/rpc_cli.py
umkcdcrg01/ryu_openflow
37ed5b88f7d119344e07c95314a7450235c037a8
[ "Apache-2.0" ]
1
2019-03-07T02:48:16.000Z
2019-03-07T02:48:16.000Z
ryu/cmd/rpc_cli.py
umkcdcrg01/ryu_openflow
37ed5b88f7d119344e07c95314a7450235c037a8
[ "Apache-2.0" ]
1
2019-03-10T09:32:45.000Z
2019-03-10T09:32:45.000Z
#!/usr/bin/env python # # Copyright (C) 2013 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2013 YAMAMOTO Takashi <yamamoto at valinux co jp> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the...
28.39749
77
0.594519
import ryu.contrib ryu.contrib.update_module_path() from ryu import cfg import cmd import signal import socket import sys import termios from ryu.lib import rpc CONF = cfg.CONF CONF.register_cli_opts([ cfg.ListOpt('peers', default=[], help='list of peers') ]) class Peer(ob...
true
true
f71ec9cd99fa0dd28a834ab092fb530c42fa878e
1,503
py
Python
example/tree/models.py
avaddon/django-polymorphic-tree
2077bc2b422d11b1bbf9efc0f5f8dcb83a53e550
[ "Apache-2.0" ]
13
2021-05-12T09:57:17.000Z
2021-12-27T06:46:26.000Z
example/tree/models.py
avaddon/django-polymorphic-tree
2077bc2b422d11b1bbf9efc0f5f8dcb83a53e550
[ "Apache-2.0" ]
null
null
null
example/tree/models.py
avaddon/django-polymorphic-tree
2077bc2b422d11b1bbf9efc0f5f8dcb83a53e550
[ "Apache-2.0" ]
1
2022-01-31T14:28:49.000Z
2022-01-31T14:28:49.000Z
from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ from polymorphic_tree.models import PolymorphicMPTTModel, PolymorphicTreeForeignKey # A base model for the tree: @python_2_unicode_...
30.06
120
0.72189
from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ from polymorphic_tree.models import PolymorphicMPTTModel, PolymorphicTreeForeignKey @python_2_unicode_compatible class BaseTreeNod...
true
true
f71eca38d34b1b06054a870b9abde3fef819b045
1,660
py
Python
code/config.py
sahaisaumya/informal_fallacies
630d56edb27fb0d5f32dd125ad6e886e4ca2955e
[ "MIT" ]
6
2021-08-02T14:37:46.000Z
2022-02-11T14:09:04.000Z
code/config.py
sahaisaumya/informal_fallacies
630d56edb27fb0d5f32dd125ad6e886e4ca2955e
[ "MIT" ]
null
null
null
code/config.py
sahaisaumya/informal_fallacies
630d56edb27fb0d5f32dd125ad6e886e4ca2955e
[ "MIT" ]
1
2021-12-17T16:02:11.000Z
2021-12-17T16:02:11.000Z
import transformers import argparse def none_or_str(value): if value == 'None': return None return value def primary_parse(): parser = argparse.ArgumentParser() parser.add_argument('--level') # {"token" "comment"} parser.add_argument('--max_len', type=int, default=256) parser.add_argument('--max_len_context'...
43.684211
146
0.73494
import transformers import argparse def none_or_str(value): if value == 'None': return None return value def primary_parse(): parser = argparse.ArgumentParser() parser.add_argument('--level') parser.add_argument('--max_len', type=int, default=256) parser.add_argument('--max_len_context', type=int, default=64...
true
true
f71eca6b3f158fdbe0a1271729c857c9ffafb3c5
4,565
py
Python
ValveAnnulusAnalysis/HeartValveLib/helpers.py
SlicerHeart/SlicerHeart
5ead8d723f6dec67ea6065b847cb4f8dce5bef72
[ "BSD-3-Clause" ]
48
2016-04-13T10:22:53.000Z
2022-03-21T16:31:41.000Z
ValveAnnulusAnalysis/HeartValveLib/helpers.py
SlicerHeart/SlicerHeart
5ead8d723f6dec67ea6065b847cb4f8dce5bef72
[ "BSD-3-Clause" ]
14
2018-10-25T21:15:20.000Z
2021-11-26T16:55:55.000Z
ValveAnnulusAnalysis/HeartValveLib/helpers.py
SlicerHeart/SlicerHeart
5ead8d723f6dec67ea6065b847cb4f8dce5bef72
[ "BSD-3-Clause" ]
21
2017-09-12T08:20:36.000Z
2021-10-30T02:22:11.000Z
""" collection of functions that are useful for several classes but non-specific to any """ import slicer import logging def getBinaryLabelmapRepresentation(segmentationNode, segmentID: str): segmentLabelmap = slicer.vtkOrientedImageData() segmentationNode.GetBinaryLabelmapRepresentation(segmentID, segmentLabelm...
35.664063
103
0.806134
import slicer import logging def getBinaryLabelmapRepresentation(segmentationNode, segmentID: str): segmentLabelmap = slicer.vtkOrientedImageData() segmentationNode.GetBinaryLabelmapRepresentation(segmentID, segmentLabelmap) return segmentLabelmap def getSpecificHeartValveModelNodes(phases: list): heartVal...
true
true
f71ecd5b355fa5a6dd0a436c34d7ff7e754d15d2
1,464
py
Python
tests/test_response.py
Vlsarro/pystexchapi
27618002165fc536798c46c486e78caeb85905bf
[ "MIT" ]
null
null
null
tests/test_response.py
Vlsarro/pystexchapi
27618002165fc536798c46c486e78caeb85905bf
[ "MIT" ]
null
null
null
tests/test_response.py
Vlsarro/pystexchapi
27618002165fc536798c46c486e78caeb85905bf
[ "MIT" ]
null
null
null
import unittest import json import requests from pystexchapi.response import StockExchangeResponseParser, APIResponse from pystexchapi.exc import APIDataException, APIResponseParsingException from tests import TICKER_RESPONSE, GENERIC_ERROR_RESPONSE def raise_value_error(): raise ValueError() class TestStockEx...
31.826087
94
0.729508
import unittest import json import requests from pystexchapi.response import StockExchangeResponseParser, APIResponse from pystexchapi.exc import APIDataException, APIResponseParsingException from tests import TICKER_RESPONSE, GENERIC_ERROR_RESPONSE def raise_value_error(): raise ValueError() class TestStockEx...
true
true
f71ecd6238bcff3815bc4c498aa4bcae208a60d4
12,301
py
Python
read_xml_export.py
DavidJLambert/Two-Windows-Event-Log-Summarizers
393ce7dc550b9fd52725e233f15e4eff1e9bc47a
[ "MIT" ]
null
null
null
read_xml_export.py
DavidJLambert/Two-Windows-Event-Log-Summarizers
393ce7dc550b9fd52725e233f15e4eff1e9bc47a
[ "MIT" ]
null
null
null
read_xml_export.py
DavidJLambert/Two-Windows-Event-Log-Summarizers
393ce7dc550b9fd52725e233f15e4eff1e9bc47a
[ "MIT" ]
null
null
null
""" read_xml_export.py REPOSITORY: https://github.com/DavidJLambert/Two-Windows-Event-Log-Summarizers SUMMARY: Scans XML exports of the Windows Event Log and reports summary statistics. AUTHOR: David J. Lambert VERSION: 0.1.1 DATE: July 10, 2020 """ # -------- IMPORTS. from __future__ import print_funct...
33.156334
80
0.598
from __future__ import print_function import xml.etree.ElementTree import win32security from frozendict import frozendict import glob from zipfile import ZipFile import os def handle_files() -> None: xml_zip_files = glob.glob('./sample_data/*.xml.zip') if len(xml_zip_files) > 0: for xml_zip_...
true
true
f71ece1554e7f63c5e58bcf712cb98e72ca6840c
349
py
Python
assets/csv_counter.py
romanbird/jeopardy-bot
d47600d9261fefcb5f08d699ddf8b5fdcd072da1
[ "MIT" ]
2
2019-02-09T15:33:39.000Z
2019-02-10T11:43:19.000Z
assets/csv_counter.py
romanbird/jeopardy-bot
d47600d9261fefcb5f08d699ddf8b5fdcd072da1
[ "MIT" ]
null
null
null
assets/csv_counter.py
romanbird/jeopardy-bot
d47600d9261fefcb5f08d699ddf8b5fdcd072da1
[ "MIT" ]
null
null
null
import csv import pandas as pd from tqdm import tqdm from collections import Counter dbRead = open('db.csv', "r", newline='', encoding='utf8') db = list(csv.reader(dbRead, delimiter=",")) column = [row[-1] for row in db] for row in tqdm(db): row[-2]=Counter(column)[row[-1]] df=pd.DataFrame(data=db) df.to_csv('db.cs...
31.727273
57
0.681948
import csv import pandas as pd from tqdm import tqdm from collections import Counter dbRead = open('db.csv', "r", newline='', encoding='utf8') db = list(csv.reader(dbRead, delimiter=",")) column = [row[-1] for row in db] for row in tqdm(db): row[-2]=Counter(column)[row[-1]] df=pd.DataFrame(data=db) df.to_csv('db.cs...
true
true
f71ecec53aa3a76357554679243d45b4d4803a19
188,462
py
Python
python/idc.py
0xeb/src
01d069ae681856ecc9c7a96067f60dc86a33f0ab
[ "BSD-3-Clause" ]
null
null
null
python/idc.py
0xeb/src
01d069ae681856ecc9c7a96067f60dc86a33f0ab
[ "BSD-3-Clause" ]
null
null
null
python/idc.py
0xeb/src
01d069ae681856ecc9c7a96067f60dc86a33f0ab
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python #--------------------------------------------------------------------- # IDAPython - Python plugin for Interactive Disassembler # # Original IDC.IDC: # Copyright (c) 1990-2010 Ilfak Guilfanov # # Python conversion: # Copyright (c) 2004-2010 Gergely Erdelyi <gergely.erdelyi@d-dome.net> # # All righ...
31.711593
153
0.635799
from __future__ import print_function import ida_idaapi import ida_auto import ida_dbg import ida_diskio import ida_entry import ida_enum import ida_expr import ida_fixup import ida_frame import ida_funcs import ida_gdl import ida_ida import ida_idc import ida_bytes import ida_idd import ida_idp impor...
true
true
f71ecf2af3703ebe08b3729f80b87a0c1c645aa0
16,293
py
Python
.venv/lib/python3.8/site-packages/google/resumable_media/requests/upload.py
taharh/label-studio
fab68de11bdc6699472d12a78390375928258e1e
[ "Apache-2.0" ]
2
2020-05-17T12:53:06.000Z
2021-04-12T02:13:43.000Z
.venv/lib/python3.8/site-packages/google/resumable_media/requests/upload.py
taharh/label-studio
fab68de11bdc6699472d12a78390375928258e1e
[ "Apache-2.0" ]
16
2021-03-19T09:44:52.000Z
2022-03-12T00:22:14.000Z
.venv/lib/python3.8/site-packages/google/resumable_media/requests/upload.py
taharh/label-studio
fab68de11bdc6699472d12a78390375928258e1e
[ "Apache-2.0" ]
1
2021-08-06T04:07:10.000Z
2021-08-06T04:07:10.000Z
# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
35.496732
81
0.624072
from google.resumable_media import _upload from google.resumable_media.requests import _helpers class SimpleUpload(_helpers.RequestsMixin, _upload.SimpleUpload): def transmit(self, transport, data, content_type): method, url, payload, headers = self._prepare_request(data, content_type) ...
true
true
f71ecf94681232dc19499ce57aba3e589002f9f4
20,443
py
Python
test/functional/test_framework/test_framework.py
simulacrum-trade/simulacrum
3e1962be7f9b58a1e6930658be3642de47830d74
[ "MIT" ]
1
2020-01-23T13:50:58.000Z
2020-01-23T13:50:58.000Z
test/functional/test_framework/test_framework.py
simulacrum-trade/simulacrum
3e1962be7f9b58a1e6930658be3642de47830d74
[ "MIT" ]
1
2020-04-01T13:14:36.000Z
2020-04-09T06:35:37.000Z
test/functional/test_framework/test_framework.py
simulacrum-trade/simulacrum
3e1962be7f9b58a1e6930658be3642de47830d74
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Base class for RPC testing.""" from enum import Enum import logging import optparse import os import p...
41.977413
310
0.621827
from enum import Enum import logging import optparse import os import pdb import shutil import sys import tempfile import time from .authproxy import JSONRPCException from . import coverage from .test_node import TestNode from .util import ( MAX_NODES, PortSeed, assert_equal, check_json_precision,...
true
true
f71ecfff9c183a5b99999bb2998f06e10f2e2b9c
1,030
py
Python
var/spack/repos/builtin/packages/py-msal/package.py
kkauder/spack
6ae8d5c380c1f42094b05d38be26b03650aafb39
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2019-02-10T13:47:48.000Z
2019-04-17T13:05:17.000Z
var/spack/repos/builtin/packages/py-msal/package.py
kkauder/spack
6ae8d5c380c1f42094b05d38be26b03650aafb39
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
32
2020-12-15T17:29:20.000Z
2022-03-21T15:08:31.000Z
var/spack/repos/builtin/packages/py-msal/package.py
kkauder/spack
6ae8d5c380c1f42094b05d38be26b03650aafb39
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2021-04-07T18:27:09.000Z
2022-03-31T22:52:38.000Z
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) class PyMsal(PythonPackage): """The Microsoft Authentication Library (MSAL) for Python library enables your app t...
46.818182
95
0.750485
class PyMsal(PythonPackage): homepage = "https://github.com/AzureAD/microsoft-authentication-library-for-python" pypi = "msal/msal-1.3.0.tar.gz" version('1.3.0', sha256='5442a3a9d006506e653d3c4daff40538bdf067bf07b6b73b32d1b231d5e77a92') version('1.0.0', sha256='ecbe3f5ac77facad16abf08eb9d8562af3...
true
true
f71ed0eb715dfac31c4a74be37828bd583bcf88b
15,233
py
Python
train_nuclei.py
xumm94/2018_data_science_bowl
9f7a6b60b7c1e933c30acd8abbdeeb7bd869a3f6
[ "MIT" ]
null
null
null
train_nuclei.py
xumm94/2018_data_science_bowl
9f7a6b60b7c1e933c30acd8abbdeeb7bd869a3f6
[ "MIT" ]
null
null
null
train_nuclei.py
xumm94/2018_data_science_bowl
9f7a6b60b7c1e933c30acd8abbdeeb7bd869a3f6
[ "MIT" ]
null
null
null
# coding: utf-8 """ Mask R-CNN - Train on Nuclei Dataset (Updated from train_shape.ipynb) This notebook shows how to train Mask R-CNN on your own dataset. To keep things simple we use a synthetic dataset of shapes (squares, triangles, and circles) which enables fast training. You'd still need a GPU, though, becaus...
38.760814
101
0.586359
import os import sys import random import math import re import time from tqdm import tqdm import numpy as np import pandas as pd import cv2 import matplotlib import matplotlib.pyplot as plt from config import Config import utils import model as modellib import visualize from model import log import logging impor...
true
true
f71ed1a57e43f0540a74700d7289f51d9537ec4f
39,787
py
Python
ankify_roam/roam/content.py
taylormitchell/ankify_roam
bd058e3bf086a300680a14cdfc1079d83ed8d79f
[ "MIT" ]
37
2020-07-03T01:59:13.000Z
2022-03-24T04:23:43.000Z
ankify_roam/roam/content.py
taylormitchell/ankify_roam
bd058e3bf086a300680a14cdfc1079d83ed8d79f
[ "MIT" ]
33
2020-07-05T02:09:22.000Z
2022-03-23T01:51:56.000Z
ankify_roam/roam/content.py
taylormitchell/ankify_roam
bd058e3bf086a300680a14cdfc1079d83ed8d79f
[ "MIT" ]
6
2020-07-05T07:10:33.000Z
2022-03-10T21:06:53.000Z
import os import re import logging from functools import reduce from itertools import zip_longest from collections.abc import Iterable import html logger = logging.getLogger(__name__) RE_SPLIT_OR = "(?<!\\\)\|" class BlockContent(list): def __init__(self, roam_objects=[]): """ Args: ...
33.100666
138
0.560284
import os import re import logging from functools import reduce from itertools import zip_longest from collections.abc import Iterable import html logger = logging.getLogger(__name__) RE_SPLIT_OR = "(?<!\\\)\|" class BlockContent(list): def __init__(self, roam_objects=[]): if type(roam_objects) not in ...
true
true
f71ed1eb7998078b776859f34f0555bc09cda199
712
py
Python
soluciones/empresa_pagos/main.py
carlosviveros/Soluciones
115f4fa929c7854ca497e4c994352adc64565456
[ "MIT" ]
4
2021-12-14T23:51:25.000Z
2022-03-24T11:14:00.000Z
soluciones/empresa_pagos/main.py
leugimkm/Soluciones
d71601c8d9b5e86e926f48d9e49462af8a956b6d
[ "MIT" ]
null
null
null
soluciones/empresa_pagos/main.py
leugimkm/Soluciones
d71601c8d9b5e86e926f48d9e49462af8a956b6d
[ "MIT" ]
5
2021-11-10T06:49:50.000Z
2022-03-24T01:42:28.000Z
"""AyudaEnPython: https://www.facebook.com/groups/ayudapython """ # pip install prototools from prototools import Menu from prototools.colorize import magenta, cyan, red from empresa import Empresa def main(): empresa = Empresa() menu = Menu( cyan("Menu"), exit_option_text=red("Salir"), ...
22.25
61
0.630618
from prototools import Menu from prototools.colorize import magenta, cyan, red from empresa import Empresa def main(): empresa = Empresa() menu = Menu( cyan("Menu"), exit_option_text=red("Salir"), exit_option_color=red, ) menu.add_options( ("Agregar trabajadores", emp...
true
true
f71ed277dd99ea3ca81a3df1f5f8136a8aeffc8e
5,023
py
Python
proteinhmmvisualize.py
mitenjain/protpore
06b779473c4bf9f9c8c4305aa08873ae75386886
[ "MIT" ]
null
null
null
proteinhmmvisualize.py
mitenjain/protpore
06b779473c4bf9f9c8c4305aa08873ae75386886
[ "MIT" ]
null
null
null
proteinhmmvisualize.py
mitenjain/protpore
06b779473c4bf9f9c8c4305aa08873ae75386886
[ "MIT" ]
null
null
null
''' Author: Hannah Meyers This file contains the experiment code for attempting to model protein nanopore traces via HMMs. Please see inline comments for an explanation of what each piece of the code is doing. ''' from __future__ import print_function from PyPore.parsers import * from PyPore.DataTypes impor...
37.207407
136
0.651005
from __future__ import print_function from PyPore.parsers import * from PyPore.DataTypes import * from hmm import * from yahmm import * import math import matplotlib.pyplot as plt import itertools as it import glob import seaborn as sns import sys import pandas as pd from proteinDists import * from sci...
true
true
f71ed2a62255fdb093417848fcf1c4f4c52ebe9f
1,637
py
Python
kelbyapp/settings.py
metatroid/kelbyapp
6d575f6aac38832e52f520d3a7f072f43c746670
[ "BSD-3-Clause" ]
null
null
null
kelbyapp/settings.py
metatroid/kelbyapp
6d575f6aac38832e52f520d3a7f072f43c746670
[ "BSD-3-Clause" ]
null
null
null
kelbyapp/settings.py
metatroid/kelbyapp
6d575f6aac38832e52f520d3a7f072f43c746670
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """Application configuration.""" import os class Config(object): """Base configuration.""" SECRET_KEY = "uidhbao7dbaudw8yebqnmrbqiyrnqxurgqhrqeioryq89894873264234bvm234l234pu2347" #os.environ.get('KELBYAPP_SECRET', 'secret-key') # TODO: Change me APP_DIR = os.path.abspath(os.path...
32.098039
160
0.695174
import os class Config(object): SECRET_KEY = "uidhbao7dbaudw8yebqnmrbqiyrnqxurgqhrqeioryq89894873264234bvm234l234pu2347" .path.abspath(os.path.dirname(__file__)) PROJECT_ROOT = os.path.abspath(os.path.join(APP_DIR, os.pardir)) BCRYPT_LOG_ROUNDS = 13 ASSETS_DEBUG = False DEBUG_TB_ENABLED = Fals...
true
true
f71ed2c3f4f2ed6f53d55f48bf58882fc442030c
214
py
Python
py2cytoscape_doc/py2cytoscape/data/util_style.py
idekerlab/cyrest-examples
8146c40f280d996fe14d0717038012f2507aba4e
[ "MIT" ]
1
2020-09-07T00:32:12.000Z
2020-09-07T00:32:12.000Z
py2cytoscape_doc/py2cytoscape/data/util_style.py
idekerlab/cyrest-examples
8146c40f280d996fe14d0717038012f2507aba4e
[ "MIT" ]
null
null
null
py2cytoscape_doc/py2cytoscape/data/util_style.py
idekerlab/cyrest-examples
8146c40f280d996fe14d0717038012f2507aba4e
[ "MIT" ]
5
2018-05-31T16:55:31.000Z
2021-01-19T07:00:00.000Z
# -*- coding: utf-8 -*- """ """ class StyleUtil(object): """ """ @staticmethod def create_gradient(column, vp=None): """ :param column: :param vp: """ pass
13.375
41
0.439252
class StyleUtil(object): @staticmethod def create_gradient(column, vp=None): pass
true
true
f71ed36d488977b309b3e7baf242d2d9d98bcc2e
4,465
py
Python
profiles_api/views.py
Ankitsingh24/Project-REST-API
4aac3e819e2aee49a117c79d2f151b477d75d7eb
[ "MIT" ]
null
null
null
profiles_api/views.py
Ankitsingh24/Project-REST-API
4aac3e819e2aee49a117c79d2f151b477d75d7eb
[ "MIT" ]
null
null
null
profiles_api/views.py
Ankitsingh24/Project-REST-API
4aac3e819e2aee49a117c79d2f151b477d75d7eb
[ "MIT" ]
null
null
null
from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status from rest_framework import viewsets from rest_framework.authentication import TokenAuthentication from rest_framework import filters from rest_framework.authtoken.views import ObtainAuthToken from res...
33.320896
77
0.664726
from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status from rest_framework import viewsets from rest_framework.authentication import TokenAuthentication from rest_framework import filters from rest_framework.authtoken.views import ObtainAuthToken from res...
true
true
f71ed394f273d02af2d30bdc28d867676cfc930d
15,202
py
Python
geopandas/tools/tests/test_clip.py
cloudscenes/geopandas
409d8f0a1562df088ce28c39a48fe4df669660fe
[ "BSD-3-Clause" ]
2,914
2015-01-01T14:27:43.000Z
2022-03-31T22:26:39.000Z
geopandas/tools/tests/test_clip.py
cloudscenes/geopandas
409d8f0a1562df088ce28c39a48fe4df669660fe
[ "BSD-3-Clause" ]
2,040
2015-01-16T11:34:26.000Z
2022-03-31T12:13:39.000Z
geopandas/tools/tests/test_clip.py
cloudscenes/geopandas
409d8f0a1562df088ce28c39a48fe4df669660fe
[ "BSD-3-Clause" ]
758
2015-01-21T20:23:32.000Z
2022-03-31T17:22:53.000Z
"""Tests for the clip module.""" import warnings from distutils.version import LooseVersion import numpy as np import pandas as pd import shapely from shapely.geometry import ( Polygon, Point, LineString, LinearRing, GeometryCollection, MultiPoint, ) import geopandas from geopandas import Ge...
36.987835
88
0.698527
import warnings from distutils.version import LooseVersion import numpy as np import pandas as pd import shapely from shapely.geometry import ( Polygon, Point, LineString, LinearRing, GeometryCollection, MultiPoint, ) import geopandas from geopandas import GeoDataFrame, GeoSeries, clip from...
true
true
f71ed3c14f730535ffa1e416a7661b591a5802cb
1,854
py
Python
src/cpu/testers/gpu_ruby_test/GpuWavefront.py
hyu-iot/gem5
aeccc8bd8e9a86f96fc7a6f40d978f8494337fc5
[ "BSD-3-Clause" ]
765
2015-01-14T16:17:04.000Z
2022-03-28T07:46:28.000Z
src/cpu/testers/gpu_ruby_test/GpuWavefront.py
hyu-iot/gem5
aeccc8bd8e9a86f96fc7a6f40d978f8494337fc5
[ "BSD-3-Clause" ]
30
2015-01-01T21:49:38.000Z
2021-04-20T19:01:54.000Z
src/cpu/testers/gpu_ruby_test/GpuWavefront.py
hyu-iot/gem5
aeccc8bd8e9a86f96fc7a6f40d978f8494337fc5
[ "BSD-3-Clause" ]
807
2015-01-06T09:55:38.000Z
2022-03-30T10:23:36.000Z
# Copyright (c) 2017-2021 Advanced Micro Devices, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of ...
45.219512
78
0.782093
from m5.params import * from m5.proxy import * from m5.objects.TesterThread import TesterThread class GpuWavefront(TesterThread): type = 'GpuWavefront' cxx_header = "cpu/testers/gpu_ruby_test/gpu_wavefront.hh" cxx_class = 'gem5::GpuWavefront' cu_id = Param.Int("Compute Un...
true
true
f71ed54fb01d8a712469fee4d6600f643a833730
8,129
py
Python
tests/unit/modules/test_modjk.py
byteskeptical/salt
637fe0b04f38b2274191b005d73b3c6707d7f400
[ "Apache-2.0" ]
5
2018-05-01T20:51:14.000Z
2021-11-09T05:43:00.000Z
tests/unit/modules/test_modjk.py
byteskeptical/salt
637fe0b04f38b2274191b005d73b3c6707d7f400
[ "Apache-2.0" ]
86
2017-01-27T11:54:46.000Z
2020-05-20T06:25:26.000Z
tests/unit/modules/test_modjk.py
byteskeptical/salt
637fe0b04f38b2274191b005d73b3c6707d7f400
[ "Apache-2.0" ]
11
2017-01-26T19:36:29.000Z
2021-12-11T07:54:16.000Z
# -*- coding: utf-8 -*- ''' :codeauthor: Jayesh Kariya <jayeshk@saltstack.com> ''' # Import Python Libs from __future__ import absolute_import, print_function, unicode_literals # Import Salt Testing Libs from tests.support.unit import TestCase, skipIf from tests.support.mock import ( patch, NO_MOCK, N...
35.497817
80
0.549637
from __future__ import absolute_import, print_function, unicode_literals from tests.support.unit import TestCase, skipIf from tests.support.mock import ( patch, NO_MOCK, NO_MOCK_REASON ) import salt.modules.modjk as modjk @skipIf(NO_MOCK, NO_MOCK_REASON) class ModjkTestCase(TestCase): def...
true
true
f71ed55e2fa3d1075c8a3ae94a4d68e6353fb1e3
15,527
py
Python
eval.py
mendelmaker/yolact
83e7d08f03951c49a9731759e8458c51fe0922d7
[ "MIT" ]
null
null
null
eval.py
mendelmaker/yolact
83e7d08f03951c49a9731759e8458c51fe0922d7
[ "MIT" ]
null
null
null
eval.py
mendelmaker/yolact
83e7d08f03951c49a9731759e8458c51fe0922d7
[ "MIT" ]
null
null
null
import json import numpy as np import torch import pycocotools import argparse from pycocotools.coco import COCO from pycocotools.cocoeval import COCOeval from terminaltables import AsciiTable from collections import OrderedDict import torch.backends.cudnn as cudnn from data.coco import COCODetection from modules.buil...
40.860526
129
0.597153
import json import numpy as np import torch import pycocotools import argparse from pycocotools.coco import COCO from pycocotools.cocoeval import COCOeval from terminaltables import AsciiTable from collections import OrderedDict import torch.backends.cudnn as cudnn from data.coco import COCODetection from modules.buil...
true
true
f71ed5dd900f5b4c9d430cc903b05e70c9ce4cd5
554
py
Python
mini_gplus/daos/post_cache.py
KTachibanaM/pill-city
8a5a9c6a46c79f2e5c33c598d931360c319b75f4
[ "MIT" ]
16
2021-08-03T07:03:15.000Z
2021-09-23T09:09:57.000Z
mini_gplus/daos/post_cache.py
KTachibanaM/pill-city
8a5a9c6a46c79f2e5c33c598d931360c319b75f4
[ "MIT" ]
193
2021-07-29T09:43:54.000Z
2021-10-05T05:18:55.000Z
mini_gplus/daos/post_cache.py
KTachibanaM/mini-gplus
1881bef983797fe99e1499fb794976cb48863c70
[ "MIT" ]
3
2021-09-14T10:08:41.000Z
2021-09-20T12:47:40.000Z
from bson import ObjectId from mini_gplus.models import Post from mini_gplus.utils.profiling import timer from .cache import r RPost = "post" def set_in_post_cache(post: Post): r.hset(RPost, str(post.id), post.to_json()) @timer def get_in_post_cache(oid: ObjectId): r_post = r.hget(RPost, str(oid)) if n...
22.16
49
0.705776
from bson import ObjectId from mini_gplus.models import Post from mini_gplus.utils.profiling import timer from .cache import r RPost = "post" def set_in_post_cache(post: Post): r.hset(RPost, str(post.id), post.to_json()) @timer def get_in_post_cache(oid: ObjectId): r_post = r.hget(RPost, str(oid)) if n...
true
true
f71ed605bc82fb5d11760fc4169a8b8a0d93880d
23
py
Python
trimesh/version.py
pramukta/trimesh
4b01ef0ea2d6f8a8bcc981d87dd3ae097bc62f11
[ "MIT" ]
null
null
null
trimesh/version.py
pramukta/trimesh
4b01ef0ea2d6f8a8bcc981d87dd3ae097bc62f11
[ "MIT" ]
null
null
null
trimesh/version.py
pramukta/trimesh
4b01ef0ea2d6f8a8bcc981d87dd3ae097bc62f11
[ "MIT" ]
null
null
null
__version__ = '3.1.11'
11.5
22
0.652174
__version__ = '3.1.11'
true
true
f71edb5720eb737000f91add91b888d1d80e37fe
2,047
py
Python
book/conf.py
Superwallah/tip-toi-reveng
2e7a8e3e70805c7c59e920151aa34da466eeeddb
[ "MIT" ]
null
null
null
book/conf.py
Superwallah/tip-toi-reveng
2e7a8e3e70805c7c59e920151aa34da466eeeddb
[ "MIT" ]
null
null
null
book/conf.py
Superwallah/tip-toi-reveng
2e7a8e3e70805c7c59e920151aa34da466eeeddb
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from recommonmark.parser import CommonMarkParser source_parsers = { '.md': CommonMarkParser, } extensions = [] templates_path = ['_templates'] source_suffix = ['.rst', '.md'] master_doc = 'index' # General information about the project. project = u'Das tttool-Buch' copyright = u'2019, Joa...
24.369048
75
0.611138
from recommonmark.parser import CommonMarkParser source_parsers = { '.md': CommonMarkParser, } extensions = [] templates_path = ['_templates'] source_suffix = ['.rst', '.md'] master_doc = 'index' project = u'Das tttool-Buch' copyright = u'2019, Joachim Breitner' author = u'Joachim Breitner' version = u'1.8.1'...
true
true
f71edbd83661cc9f7d04a5509ea567a09ae80c46
1,163
py
Python
693.binary-number-with-alternating-bits.py
Lonitch/hackerRank
84991b8340e725422bc47eec664532cc84a3447e
[ "MIT" ]
null
null
null
693.binary-number-with-alternating-bits.py
Lonitch/hackerRank
84991b8340e725422bc47eec664532cc84a3447e
[ "MIT" ]
null
null
null
693.binary-number-with-alternating-bits.py
Lonitch/hackerRank
84991b8340e725422bc47eec664532cc84a3447e
[ "MIT" ]
null
null
null
# # @lc app=leetcode id=693 lang=python3 # # [693] Binary Number with Alternating Bits # # https://leetcode.com/problems/binary-number-with-alternating-bits/description/ # # algorithms # Easy (58.47%) # Likes: 359 # Dislikes: 74 # Total Accepted: 52.4K # Total Submissions: 89.1K # Testcase Example: '5' # # Given...
17.358209
80
0.625107
class Solution: def hasAlternatingBits(self, n: int) -> bool: b = list(bin(n)[2:]) if len(b)<2: return True else: return b[0]!=b[1] and len(set(b[::2]))==1 and len(set(b[1::2]))==1
true
true
f71edc46484d5881b91881dddb4abd954210f9ec
2,782
py
Python
setup.py
nealde/Ampere
75fa9c34940a71ef865eb98b551b4a4a27da96c3
[ "MIT" ]
19
2019-03-25T09:49:47.000Z
2022-02-20T07:40:18.000Z
setup.py
nealde/battery
75fa9c34940a71ef865eb98b551b4a4a27da96c3
[ "MIT" ]
6
2018-09-28T19:27:25.000Z
2019-01-07T16:00:09.000Z
setup.py
nealde/battery
75fa9c34940a71ef865eb98b551b4a4a27da96c3
[ "MIT" ]
6
2019-01-25T16:50:56.000Z
2021-01-29T21:36:32.000Z
import setuptools import pkg_resources from setuptools import setup, Extension def is_installed(requirement): try: pkg_resources.require(requirement) except pkg_resources.ResolutionError: return False else: return True if not is_installed('numpy>=1.11.0'): print(""" ...
36.12987
211
0.686556
import setuptools import pkg_resources from setuptools import setup, Extension def is_installed(requirement): try: pkg_resources.require(requirement) except pkg_resources.ResolutionError: return False else: return True if not is_installed('numpy>=1.11.0'): print(""" ...
true
true
f71edc5b2c821754fa672bd832207da961a8f04e
20,410
py
Python
bot.py
themagicalmammal/wikibot
9f7b5f588bbf69ad66af50d573efd6d30c5a64d6
[ "MIT" ]
8
2021-02-18T10:08:59.000Z
2022-01-23T00:39:17.000Z
bot.py
themagicalmammal/wikibot
9f7b5f588bbf69ad66af50d573efd6d30c5a64d6
[ "MIT" ]
7
2021-02-04T07:21:46.000Z
2021-08-30T08:34:45.000Z
bot.py
themagicalmammal/wikibot
9f7b5f588bbf69ad66af50d573efd6d30c5a64d6
[ "MIT" ]
1
2021-05-22T06:15:59.000Z
2021-05-22T06:15:59.000Z
from os import environ from firebase_admin import credentials, db, initialize_app from flask import Flask, request from telebot import TeleBot, types from wikipedia import ( WikipediaPage, geosearch, page, random, search, set_lang, suggest, summary, ) # Firebase connection cred = crede...
20.595358
88
0.502303
from os import environ from firebase_admin import credentials, db, initialize_app from flask import Flask, request from telebot import TeleBot, types from wikipedia import ( WikipediaPage, geosearch, page, random, search, set_lang, suggest, summary, ) cred = credentials.Certificate("f...
true
true
f71edc861b7845660a5affbfdfb2cda3e677aa82
2,517
py
Python
src/process_event_api.py
AndreasVikke/ComputerScience-Final
52d09a5876bfde661a00736712db6e3d19be877d
[ "MIT" ]
1
2021-01-15T11:23:20.000Z
2021-01-15T11:23:20.000Z
src/process_event_api.py
AndreasVikke/ComputerScience-Final
52d09a5876bfde661a00736712db6e3d19be877d
[ "MIT" ]
null
null
null
src/process_event_api.py
AndreasVikke/ComputerScience-Final
52d09a5876bfde661a00736712db6e3d19be877d
[ "MIT" ]
null
null
null
""" Processes event api from slack :license: MIT """ import json import os from typing import Dict from src.modules.create_signedup_homepage import create_home_tap from src.dependencies.dependency_typing import Requests, PynamoDBConsultant from src.dependencies.requests_provider import get_requests_provider fr...
32.269231
92
0.636075
import json import os from typing import Dict from src.modules.create_signedup_homepage import create_home_tap from src.dependencies.dependency_typing import Requests, PynamoDBConsultant from src.dependencies.requests_provider import get_requests_provider from src.dependencies.pynamodb_consultant_provider import get_c...
true
true
f71eddda4654e992cc72ae838a6aad60385ed3a6
2,393
py
Python
authosm/backend.py
TCSOSM-20/LW-UI
70c3331278f71d3b22fc3a090d526b4b8106d155
[ "Apache-2.0" ]
null
null
null
authosm/backend.py
TCSOSM-20/LW-UI
70c3331278f71d3b22fc3a090d526b4b8106d155
[ "Apache-2.0" ]
null
null
null
authosm/backend.py
TCSOSM-20/LW-UI
70c3331278f71d3b22fc3a090d526b4b8106d155
[ "Apache-2.0" ]
null
null
null
# # Copyright 2018 EveryUP Srl # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
36.257576
109
0.587547
from django.core.exceptions import PermissionDenied from .models import OsmUser from lib.osm.osmclient.clientv2 import Client from .exceptions import OSMAuthException class OsmBackend(object): def authenticate(self, **kwargs): if all(k in kwargs for k in ('username', 'password', 'project_...
true
true
f71edf88cfb79a1cb25ad3a7be93346ae19cb1ee
1,670
py
Python
apartment/apartment/urls.py
Hardy7/CS465_Final
a38ccc1ebd988ed5ded9acc05ad6c8dd1cc2d1bd
[ "MIT" ]
1
2020-03-15T22:45:42.000Z
2020-03-15T22:45:42.000Z
apartment/apartment/urls.py
Hardy7/CS465_Final
a38ccc1ebd988ed5ded9acc05ad6c8dd1cc2d1bd
[ "MIT" ]
null
null
null
apartment/apartment/urls.py
Hardy7/CS465_Final
a38ccc1ebd988ed5ded9acc05ad6c8dd1cc2d1bd
[ "MIT" ]
null
null
null
"""apartment URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-...
46.388889
101
0.694012
from django.conf.urls import include, url from django.contrib import admin from django.urls import path from django.conf.urls import re_path from myapp.views import * urlpatterns = [ re_path(r'^admin/', admin.site.urls), re_path('^users/', include('users.urls', namespace = "users")), re_path('^$', HomeView...
true
true
f71edf8ec073efffa34dabc63868cec27920ed6d
43,616
py
Python
instructor/day_one.py
deniederhut/workshop_pyintensive
f8f494081c6daabeae0724aa058c2b80fe42878b
[ "BSD-2-Clause" ]
1
2016-10-04T00:04:56.000Z
2016-10-04T00:04:56.000Z
instructor/day_one.py
deniederhut/workshop_pyintensive
f8f494081c6daabeae0724aa058c2b80fe42878b
[ "BSD-2-Clause" ]
8
2015-12-26T05:49:39.000Z
2016-05-26T00:10:57.000Z
instructor/day_one.py
deniederhut/workshop_pyintensive
f8f494081c6daabeae0724aa058c2b80fe42878b
[ "BSD-2-Clause" ]
null
null
null
# coding: utf-8 # # Day One # ## Table of Contents # 1. [Data Model](#Data-Model) # 2. [Data Structures](#Data-Structures) # 3. [Control Flow](#Control-Flow) # 4. [Input and Output](#Input-and-Output) # 5. [`os`](#os) # 6. [`glob`](#glob) # 7. [`subprocess`](#subprocess) # # Links to documentation will be provided...
24.824132
554
0.686216
ction for data. All data in a Python program is represented by objects or by relations between objects. # # Every object in Python has a **type**, a **value**, and an **identity**. We've already seen several data types, such as `int`, `float`, and `str`. An object's type determines its supported operations as well ...
true
true
f71ee34b346861ec238e28be1637923444343508
763
py
Python
test/basic/test_oplog.py
KentWangYQ/mongo2es
8952640e8ac3f2b1aa6845082fce04b7c4f7bd1e
[ "Apache-2.0" ]
5
2018-12-24T10:45:56.000Z
2019-07-29T07:26:28.000Z
test/basic/test_oplog.py
KentWangYQ/mongo2es
8952640e8ac3f2b1aa6845082fce04b7c4f7bd1e
[ "Apache-2.0" ]
null
null
null
test/basic/test_oplog.py
KentWangYQ/mongo2es
8952640e8ac3f2b1aa6845082fce04b7c4f7bd1e
[ "Apache-2.0" ]
2
2019-07-30T06:27:49.000Z
2021-09-24T08:21:52.000Z
import datetime import bson from common.mongo import oplog from common import event_emitter mo = oplog.MongoOplog('mongodb://eslocal:PHuance01@172.16.100.150,172.16.100.151,172.16.100.152/?replicaSet=foobar', ts=bson.Timestamp(1524735047, 1)) @event_emitter.on(mo.event_emitter, 'data') def on_d...
17.744186
116
0.70118
import datetime import bson from common.mongo import oplog from common import event_emitter mo = oplog.MongoOplog('mongodb://eslocal:PHuance01@172.16.100.150,172.16.100.151,172.16.100.152/?replicaSet=foobar', ts=bson.Timestamp(1524735047, 1)) @event_emitter.on(mo.event_emitter, 'data') def on_d...
true
true
f71ee3fea2be9796b955bd8e5429594c3c36ac84
886
py
Python
tests/test_vrp_constructive.py
MichaelAllen1966/2004_covid_dialysis
62c6842fc14acee07aee12ac2f238cbd1c3881d6
[ "MIT" ]
null
null
null
tests/test_vrp_constructive.py
MichaelAllen1966/2004_covid_dialysis
62c6842fc14acee07aee12ac2f238cbd1c3881d6
[ "MIT" ]
1
2020-05-15T11:11:53.000Z
2020-05-15T11:11:53.000Z
tests/test_vrp_constructive.py
MichaelAllen1966/2004_covid_dialysis
62c6842fc14acee07aee12ac2f238cbd1c3881d6
[ "MIT" ]
null
null
null
''' Tests for vrp package construction module ''' import pytest import vrp.constructive as cn import vrp.io as io @pytest.mark.parametrize("warehouse, selected_sectors, expected_cost", [ ('L51', ['L51', 'L1', 'L10', 'L100','L101'], 196.1*2), ...
31.642857
80
0.563205
import pytest import vrp.constructive as cn import vrp.io as io @pytest.mark.parametrize("warehouse, selected_sectors, expected_cost", [ ('L51', ['L51', 'L1', 'L10', 'L100','L101'], 196.1*2), ('L51', ['L51', 'L1', 'L10'], 116.7*2), ...
true
true
f71ee406bcdf8fe6a12c7bd165c46a5f00d242d8
609
py
Python
ejemplo_barra_progreso.py
jlaica/ejercicios_tkinter
4656c26b83957ee4742c4b28611ec048254dcc69
[ "MIT" ]
null
null
null
ejemplo_barra_progreso.py
jlaica/ejercicios_tkinter
4656c26b83957ee4742c4b28611ec048254dcc69
[ "MIT" ]
null
null
null
ejemplo_barra_progreso.py
jlaica/ejercicios_tkinter
4656c26b83957ee4742c4b28611ec048254dcc69
[ "MIT" ]
null
null
null
import sys from tkinter import * from tkinter import ttk import time myGui = Tk() myGui.geometry('300x200') myGui.title('Retro Code 80s') style = ttk.Style() style.configure("black.Horizontal.TProgressbar", background='black') bar = ttk.Progressbar(myGui,orient ="horizontal",length = 200, style='black.Horizontal.TPr...
23.423077
121
0.688013
import sys from tkinter import * from tkinter import ttk import time myGui = Tk() myGui.geometry('300x200') myGui.title('Retro Code 80s') style = ttk.Style() style.configure("black.Horizontal.TProgressbar", background='black') bar = ttk.Progressbar(myGui,orient ="horizontal",length = 200, style='black.Horizontal.TPr...
true
true
f71ee4a4d67144c392ef4063c47fef4809302ba0
418
py
Python
tests/test_local.py
ngoet/text-sent-api
eccfc2e65269350da0f60d5f014374433b4794b8
[ "MIT" ]
null
null
null
tests/test_local.py
ngoet/text-sent-api
eccfc2e65269350da0f60d5f014374433b4794b8
[ "MIT" ]
null
null
null
tests/test_local.py
ngoet/text-sent-api
eccfc2e65269350da0f60d5f014374433b4794b8
[ "MIT" ]
null
null
null
""" Local endpoint tests. Requires that the app is running locally (run `uvicorn main:app --reload`) """ import os import pytest from tests.endpoint_scenarios import SCENARIOS from tests.endpoint_test_utils import run_endpoint_test os.environ["LOCAL"] = "True" @pytest.mark.parametrize("scenario", list(SC...
20.9
84
0.753589
import os import pytest from tests.endpoint_scenarios import SCENARIOS from tests.endpoint_test_utils import run_endpoint_test os.environ["LOCAL"] = "True" @pytest.mark.parametrize("scenario", list(SCENARIOS.values()), ids=SCENARIOS.keys()) def test_eval(scenario): run_endpoint_test(scenario)
true
true
f71ee5485fea9a858d5cc8b330eb0e30bd658488
720
py
Python
example/nonlinear.py
Cjkkkk/Pyflow
22fd5b0141fac33ba19daa5217eee33df060a457
[ "MIT" ]
4
2019-12-18T02:05:15.000Z
2021-09-18T09:45:22.000Z
example/nonlinear.py
Cjkkkk/Pyflow
22fd5b0141fac33ba19daa5217eee33df060a457
[ "MIT" ]
null
null
null
example/nonlinear.py
Cjkkkk/Pyflow
22fd5b0141fac33ba19daa5217eee33df060a457
[ "MIT" ]
null
null
null
import flow from flow.module import Module, Linear from flow.optim import SGD from flow import function as F import numpy as np class Net(Module): def __init__(self): super().__init__() self.fc1 = Linear(2, 10) self.fc2 = Linear(10, 1) def forward(self, a): x = self.fc1(a) ...
24
60
0.5875
import flow from flow.module import Module, Linear from flow.optim import SGD from flow import function as F import numpy as np class Net(Module): def __init__(self): super().__init__() self.fc1 = Linear(2, 10) self.fc2 = Linear(10, 1) def forward(self, a): x = self.fc1(a) ...
true
true
f71ee7a978b5915f4678383805f77825d8dc0762
18,825
py
Python
mindarmour/fuzz_testing/model_coverage_metrics.py
hboshnak/mindarmour
0609a4eaea875a84667bed279add9305752880cc
[ "Apache-2.0" ]
null
null
null
mindarmour/fuzz_testing/model_coverage_metrics.py
hboshnak/mindarmour
0609a4eaea875a84667bed279add9305752880cc
[ "Apache-2.0" ]
null
null
null
mindarmour/fuzz_testing/model_coverage_metrics.py
hboshnak/mindarmour
0609a4eaea875a84667bed279add9305752880cc
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
45.691748
120
0.65259
from abc import abstractmethod from collections import defaultdict import math import numpy as np from mindspore import Tensor from mindspore import Model from mindspore.train.summary.summary_record import _get_summary_tensor_data from mindarmour.utils._check_param import check_model, check_numpy_param, ...
true
true
f71ee84796075a987a34679b0f4402f426c24334
2,327
py
Python
main.py
Shikhar1998/Basic-Facebook-Notifications-Informer-
575e3446656697c071739e3ccc65764c5ac1e5ec
[ "MIT" ]
1
2017-01-13T11:10:16.000Z
2017-01-13T11:10:16.000Z
main.py
Shikhar1998/Basic-Facebook-Notifications-Informer-
575e3446656697c071739e3ccc65764c5ac1e5ec
[ "MIT" ]
null
null
null
main.py
Shikhar1998/Basic-Facebook-Notifications-Informer-
575e3446656697c071739e3ccc65764c5ac1e5ec
[ "MIT" ]
null
null
null
import urllib import urllib2 import time import json #install using facebook-sdk" import facebook def main(): access = "https://graph.facebook.com/" ACCESS_TOKEN = XXXXXXXXXXXXX #enter your access token here datafile = urllib2.urlopen(access + 'me?fields=feed&access_token='+ACCESS_TOKEN) sigma...
30.618421
100
0.421573
import urllib import urllib2 import time import json import facebook def main(): access = "https://graph.facebook.com/" ACCESS_TOKEN = XXXXXXXXXXXXX #enter your access token here datafile = urllib2.urlopen(access + 'me?fields=feed&access_token='+ACCESS_TOKEN) sigma = 0 try: fo =...
true
true
f71ee856c8feca44b1ac13c75d39f7729b50ec80
753
py
Python
setup.py
quiquee/python-bip32
c8d04eb7d25320d93ae5d05f9c6415b70d56b97f
[ "BSD-3-Clause" ]
28
2020-02-13T18:04:57.000Z
2022-03-14T05:27:18.000Z
setup.py
quiquee/python-bip32
c8d04eb7d25320d93ae5d05f9c6415b70d56b97f
[ "BSD-3-Clause" ]
15
2020-02-14T14:36:22.000Z
2022-03-10T11:43:32.000Z
setup.py
quiquee/python-bip32
c8d04eb7d25320d93ae5d05f9c6415b70d56b97f
[ "BSD-3-Clause" ]
11
2020-05-21T16:35:48.000Z
2022-03-28T20:37:30.000Z
from setuptools import setup import bip32 import io with io.open("README.md", encoding="utf-8") as f: long_description = f.read() with io.open("requirements.txt", encoding="utf-8") as f: requirements = [r for r in f.read().split('\n') if len(r)] setup(name="bip32", version=bip32.__version__, des...
31.375
83
0.686587
from setuptools import setup import bip32 import io with io.open("README.md", encoding="utf-8") as f: long_description = f.read() with io.open("requirements.txt", encoding="utf-8") as f: requirements = [r for r in f.read().split('\n') if len(r)] setup(name="bip32", version=bip32.__version__, des...
true
true
f71ee911da76fff248edaa53f5ef983542823256
1,003
py
Python
degvabank/degvabank/core/admin.py
Vixx-X/DEGVABanck-backend
de413d55b55dba25e89b7f3bc60dfa94e89ddcde
[ "MIT" ]
null
null
null
degvabank/degvabank/core/admin.py
Vixx-X/DEGVABanck-backend
de413d55b55dba25e89b7f3bc60dfa94e89ddcde
[ "MIT" ]
null
null
null
degvabank/degvabank/core/admin.py
Vixx-X/DEGVABanck-backend
de413d55b55dba25e89b7f3bc60dfa94e89ddcde
[ "MIT" ]
1
2022-02-03T03:18:43.000Z
2022-02-03T03:18:43.000Z
from django.contrib.admin import AdminSite from django.contrib.admin.apps import AdminConfig from django.urls import path class CustomAdminSite(AdminSite): def get_urls(self): from degvabank.core import views urls = super().get_urls() my_urls = [ path( 'reports/...
30.393939
73
0.57328
from django.contrib.admin import AdminSite from django.contrib.admin.apps import AdminConfig from django.urls import path class CustomAdminSite(AdminSite): def get_urls(self): from degvabank.core import views urls = super().get_urls() my_urls = [ path( 'reports/...
true
true
f71eea01e30f1d3cf1b00ffad3c1feb94073a3fe
10,231
py
Python
dev/dev.py
glryanon/Trusty-cogs
1d5056ad166a7e7ee5039baa31748b1995ae81f6
[ "MIT" ]
1
2020-12-28T15:58:16.000Z
2020-12-28T15:58:16.000Z
dev/dev.py
glryanon/Trusty-cogs
1d5056ad166a7e7ee5039baa31748b1995ae81f6
[ "MIT" ]
null
null
null
dev/dev.py
glryanon/Trusty-cogs
1d5056ad166a7e7ee5039baa31748b1995ae81f6
[ "MIT" ]
null
null
null
import asyncio import inspect import io import textwrap import traceback import re from contextlib import redirect_stdout from copy import copy import discord from redbot.core import checks, commands from redbot.core.i18n import Translator from redbot.core.utils.chat_formatting import box, pagify """ Notice: 95% of ...
32.274448
99
0.55498
import asyncio import inspect import io import textwrap import traceback import re from contextlib import redirect_stdout from copy import copy import discord from redbot.core import checks, commands from redbot.core.i18n import Translator from redbot.core.utils.chat_formatting import box, pagify _ = Translator("Dev...
true
true
f71eea68f5a737010440afc05bea9804d4dc0846
4,204
py
Python
python/jittor/test/test_argsort_op.py
Exusial/jittor
eca21d5bba5098bce4f492fa44908677b6e76588
[ "Apache-2.0" ]
2,571
2020-03-20T03:38:35.000Z
2022-03-31T08:20:05.000Z
python/jittor/test/test_argsort_op.py
Exusial/jittor
eca21d5bba5098bce4f492fa44908677b6e76588
[ "Apache-2.0" ]
197
2020-03-20T04:11:47.000Z
2022-03-31T10:14:24.000Z
python/jittor/test/test_argsort_op.py
Exusial/jittor
eca21d5bba5098bce4f492fa44908677b6e76588
[ "Apache-2.0" ]
284
2020-03-20T03:53:15.000Z
2022-03-28T07:20:32.000Z
# *************************************************************** # Copyright (c) 2021 Jittor. All Rights Reserved. # Maintainers: # Guoye Yang <498731903@qq.com> # Dun Liang <randonlang@gmail.com>. # # This file is subject to the terms and conditions defined in # file 'LICENSE.txt', which is part of this s...
33.903226
90
0.575642
import unittest import jittor as jt import numpy as np from jittor import compile_extern from .test_log import find_log_with_re if jt.has_cuda: from jittor.compile_extern import cublas_ops, cudnn_ops, cub_ops else: cublas_ops = cudnn_ops = cub_ops = None def check_argsort(shape, dim, descending = Fals...
true
true
f71eea94ed32d1472943ed5187bc14418db296ff
40,905
py
Python
gpMgmt/bin/gppylib/operations/buildMirrorSegments.py
abhisheknishant138/gpdb
1805743d505837026aa137cabb8a7072d745a129
[ "PostgreSQL", "Apache-2.0" ]
4
2017-11-28T08:12:58.000Z
2020-10-28T04:15:52.000Z
gpMgmt/bin/gppylib/operations/buildMirrorSegments.py
abhisheknishant138/gpdb
1805743d505837026aa137cabb8a7072d745a129
[ "PostgreSQL", "Apache-2.0" ]
null
null
null
gpMgmt/bin/gppylib/operations/buildMirrorSegments.py
abhisheknishant138/gpdb
1805743d505837026aa137cabb8a7072d745a129
[ "PostgreSQL", "Apache-2.0" ]
null
null
null
import datetime import os import pipes import signal import time from gppylib.mainUtils import * from gppylib.utils import checkNotNone from gppylib.db import dbconn from gppylib import gparray, gplog from gppylib.commands import unix from gppylib.commands import gp from gppylib.commands import base from gppylib.gpar...
45.652902
154
0.590661
import datetime import os import pipes import signal import time from gppylib.mainUtils import * from gppylib.utils import checkNotNone from gppylib.db import dbconn from gppylib import gparray, gplog from gppylib.commands import unix from gppylib.commands import gp from gppylib.commands import base from gppylib.gpar...
true
true
f71eecf30391d625a435cc49f57cec598c53b612
42,870
py
Python
great_expectations/execution_engine/sqlalchemy_execution_engine.py
joeltone/great_expectations
ea9d68c33d955c44e3da619b627fd66f070909ff
[ "Apache-2.0" ]
null
null
null
great_expectations/execution_engine/sqlalchemy_execution_engine.py
joeltone/great_expectations
ea9d68c33d955c44e3da619b627fd66f070909ff
[ "Apache-2.0" ]
null
null
null
great_expectations/execution_engine/sqlalchemy_execution_engine.py
joeltone/great_expectations
ea9d68c33d955c44e3da619b627fd66f070909ff
[ "Apache-2.0" ]
null
null
null
import copy import datetime import logging import traceback import warnings from pathlib import Path from typing import Any, Dict, Iterable, List, Optional, Tuple, Union from urllib.parse import urlparse from great_expectations._version import get_versions # isort:skip __version__ = get_versions()["version"] # isor...
40.519849
143
0.586937
import copy import datetime import logging import traceback import warnings from pathlib import Path from typing import Any, Dict, Iterable, List, Optional, Tuple, Union from urllib.parse import urlparse from great_expectations._version import get_versions __version__ = get_versions()["version"] del get_versions ...
true
true
f71eed9031059f80aef2fada7ae4f0a9856e325f
1,967
py
Python
Python/zc16 password.py
KIrayamoto/666
6b8f83312ea400fc6399da4d474ce9829059cfbf
[ "MIT" ]
2
2020-10-27T14:31:48.000Z
2022-03-05T10:27:47.000Z
Python/zc16 password.py
KIrayamoto/Program
b63cf5c614aa02bc59ea7e0c716282465823a1e6
[ "MIT" ]
1
2018-04-10T15:32:14.000Z
2018-04-28T10:36:18.000Z
Python/zc16 password.py
KIrayamoto/666
6b8f83312ea400fc6399da4d474ce9829059cfbf
[ "MIT" ]
null
null
null
import math a=str(input('输入一串数字或字母:',)) a=a.replace('a','01') a=a.replace('b','02') a=a.replace('c','03') a=a.replace('d','04') a=a.replace('e','05') a=a.replace('f','06') a=a.replace('g','07') a=a.replace('h','08') a=a.replace('i','09') a=a.replace('j','10') a=a.replace('k','11') a=a.replace('l','12') a=a.replace('m',...
22.101124
137
0.597356
import math a=str(input('输入一串数字或字母:',)) a=a.replace('a','01') a=a.replace('b','02') a=a.replace('c','03') a=a.replace('d','04') a=a.replace('e','05') a=a.replace('f','06') a=a.replace('g','07') a=a.replace('h','08') a=a.replace('i','09') a=a.replace('j','10') a=a.replace('k','11') a=a.replace('l','12') a=a.replace('m',...
true
true
f71eedd59815c48ae102ad9122ad01d977f6d026
4,679
py
Python
tests/test_typing_compat.py
PrettyWood/typingx
881b250da6e7629dce1e71efa153a5cfbfc9a13e
[ "MIT" ]
46
2021-02-01T02:06:01.000Z
2022-03-25T12:27:12.000Z
tests/test_typing_compat.py
PrettyWood/typing-extend
881b250da6e7629dce1e71efa153a5cfbfc9a13e
[ "MIT" ]
13
2021-02-14T13:16:32.000Z
2022-03-29T12:36:00.000Z
tests/test_typing_compat.py
PrettyWood/typingx
881b250da6e7629dce1e71efa153a5cfbfc9a13e
[ "MIT" ]
null
null
null
import collections import pytest from typingx import ( Annotated, Any, Callable, Collection, Constraints, Dict, FrozenSet, Generic, List, Listx, Literal, Mapping, NewType, NoneType, Optional, Sequence, Set, Tuple, Tuplex, Type, TypedD...
26.435028
98
0.518059
import collections import pytest from typingx import ( Annotated, Any, Callable, Collection, Constraints, Dict, FrozenSet, Generic, List, Listx, Literal, Mapping, NewType, NoneType, Optional, Sequence, Set, Tuple, Tuplex, Type, TypedD...
true
true
f71eef5e3b50cc1a621eae8d1fbd631562a1ba66
11,433
py
Python
examples/roberta_coarsness_NER_CRF_train.py
6666ev/bert_seq2seq
caa9b6c5629ae5783c733aebbbcf669d8ab5dde2
[ "Apache-2.0" ]
795
2020-03-13T10:16:26.000Z
2022-03-30T02:07:57.000Z
examples/roberta_coarsness_NER_CRF_train.py
6666ev/bert_seq2seq
caa9b6c5629ae5783c733aebbbcf669d8ab5dde2
[ "Apache-2.0" ]
51
2020-03-23T09:09:45.000Z
2022-03-24T02:44:53.000Z
examples/roberta_coarsness_NER_CRF_train.py
6666ev/bert_seq2seq
caa9b6c5629ae5783c733aebbbcf669d8ab5dde2
[ "Apache-2.0" ]
152
2020-04-01T04:37:18.000Z
2022-03-31T03:22:14.000Z
## 粗粒度ner加crf层的例子 import torch from tqdm import tqdm import unicodedata import os import time from torch.utils.data import Dataset, DataLoader from bert_seq2seq import Tokenizer, load_chinese_base_vocab from bert_seq2seq import load_bert data_path = "./state_dict/corase_train_update.txt" vocab_path = "./state_dict/ro...
33.332362
498
0.542202
om tqdm import tqdm import unicodedata import os import time from torch.utils.data import Dataset, DataLoader from bert_seq2seq import Tokenizer, load_chinese_base_vocab from bert_seq2seq import load_bert data_path = "./state_dict/corase_train_update.txt" vocab_path = "./state_dict/roberta_wwm_vocab.txt" model_name ...
true
true
f71ef1685e3a5f1c9663866f64524d16649aeb78
3,206
py
Python
msgraph_async/common/tests/test_odata_query.py
blbuford/msgraph-async
c368fbef230a45d173e260775a693df456e60aa9
[ "MIT" ]
5
2021-02-28T08:54:09.000Z
2022-03-21T16:00:35.000Z
msgraph_async/common/tests/test_odata_query.py
blbuford/msgraph-async
c368fbef230a45d173e260775a693df456e60aa9
[ "MIT" ]
1
2021-04-01T16:16:11.000Z
2021-04-01T16:16:11.000Z
msgraph_async/common/tests/test_odata_query.py
blbuford/msgraph-async
c368fbef230a45d173e260775a693df456e60aa9
[ "MIT" ]
1
2021-03-31T22:50:19.000Z
2021-03-31T22:50:19.000Z
import unittest from msgraph_async.common.odata_query import * class TestODataQuery(unittest.TestCase): def setUp(self): pass @classmethod def setUpClass(cls): pass def get_instance(self): return ODataQuery() def test_empty_odata(self): i = self.get_instance() ...
26.278689
169
0.577979
import unittest from msgraph_async.common.odata_query import * class TestODataQuery(unittest.TestCase): def setUp(self): pass @classmethod def setUpClass(cls): pass def get_instance(self): return ODataQuery() def test_empty_odata(self): i = self.get_instance() ...
true
true
f71ef27549495f887aeb09772634895ce12eecb3
3,612
py
Python
src/backend/settings.py
HectorPulido/nlu-brain-api
1e0a3adbb7401b717d7b6ac13de75c761d1a87cf
[ "MIT" ]
3
2021-09-14T17:38:55.000Z
2022-01-02T06:06:57.000Z
src/backend/settings.py
HectorPulido/nlu-brain-api
1e0a3adbb7401b717d7b6ac13de75c761d1a87cf
[ "MIT" ]
null
null
null
src/backend/settings.py
HectorPulido/nlu-brain-api
1e0a3adbb7401b717d7b6ac13de75c761d1a87cf
[ "MIT" ]
null
null
null
""" Django settings for backend project. Generated by 'django-admin startproject' using Django 3.1.1. For more information on this file, see https://docs.djangoproject.com/en/3.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.1/ref/settings/ """ import os im...
26.364964
91
0.712071
import os import dj_database_url from pathlib import Path from chatbot.nlu_engine import NLUEngine BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = os.environ.get("SECRET_KEY", default="foo") DEBUG = int(os.environ.get("DEBUG", default=1)) ALLOWED_HOSTS = ["*"] # Application definition INST...
true
true
f71ef33a954ffb0394694494df32c893a8f5ed2a
3,335
py
Python
scripts/releaser_hooks.py
jmelloy/django-photologue
b0a3072e331cdbf2240db0b8a5a91f31c04fee64
[ "BSD-3-Clause" ]
1
2021-01-21T15:25:20.000Z
2021-01-21T15:25:20.000Z
scripts/releaser_hooks.py
jmelloy/django-photologue
b0a3072e331cdbf2240db0b8a5a91f31c04fee64
[ "BSD-3-Clause" ]
null
null
null
scripts/releaser_hooks.py
jmelloy/django-photologue
b0a3072e331cdbf2240db0b8a5a91f31c04fee64
[ "BSD-3-Clause" ]
null
null
null
import os import subprocess try: import polib except ImportError: print('Msg to the package releaser: prerelease hooks will not work as you have not installed polib.') raise import copy import codecs def prereleaser_before(data): """ 1. Run the unit tests one last time before we make a release. ...
38.77907
113
0.653073
import os import subprocess try: import polib except ImportError: print('Msg to the package releaser: prerelease hooks will not work as you have not installed polib.') raise import copy import codecs def prereleaser_before(data): print('Running unit tests.') subprocess.check_output(["python", "ex...
true
true
f71ef585eef7e5fc1bee36b16be5ea58999073c9
465
py
Python
Python/RotateArrayTest.py
TonnyL/Windary
39f85cdedaaf5b85f7ce842ecef975301fc974cf
[ "MIT" ]
205
2017-11-16T08:38:46.000Z
2022-03-06T05:50:03.000Z
Python/RotateArrayTest.py
santosh241/Windary
39f85cdedaaf5b85f7ce842ecef975301fc974cf
[ "MIT" ]
3
2018-04-10T10:17:52.000Z
2020-12-11T08:00:09.000Z
Python/RotateArrayTest.py
santosh241/Windary
39f85cdedaaf5b85f7ce842ecef975301fc974cf
[ "MIT" ]
28
2018-04-10T06:42:42.000Z
2021-09-14T14:15:39.000Z
from unittest import TestCase from RotateArray import RotateArray class TestRotateArray(TestCase): def test_rotate(self): ra = RotateArray() array0 = [1] ra.rotate(array0, 1) self.assertEqual(array0, [1]) array1 = [1, 2] ra.rotate(array1, 1) self.assertEq...
22.142857
55
0.565591
from unittest import TestCase from RotateArray import RotateArray class TestRotateArray(TestCase): def test_rotate(self): ra = RotateArray() array0 = [1] ra.rotate(array0, 1) self.assertEqual(array0, [1]) array1 = [1, 2] ra.rotate(array1, 1) self.assertEq...
true
true
f71ef5f561ecfaddb53695c882f1a617b5a5d0a2
1,413
py
Python
pyart/testing/sample_files.py
kmuehlbauer/pyart
4accda3fc02490d135373ad5b054899c6781e762
[ "OLDAP-2.6", "Python-2.0" ]
null
null
null
pyart/testing/sample_files.py
kmuehlbauer/pyart
4accda3fc02490d135373ad5b054899c6781e762
[ "OLDAP-2.6", "Python-2.0" ]
null
null
null
pyart/testing/sample_files.py
kmuehlbauer/pyart
4accda3fc02490d135373ad5b054899c6781e762
[ "OLDAP-2.6", "Python-2.0" ]
null
null
null
""" pyart.testing.sample_files ========================== Sample radar files in a number of formats. Many of these files are incomplete, they should only be used for testing, not production. .. autosummary:: :toctree: generated/ MDV_PPI_FILE MDV_RHI_FILE CFRADIAL_PPI_FILE CFRADIAL_RHI_FILE C...
33.642857
77
0.772116
import os DATA_PATH = os.path.join(os.path.dirname(__file__), 'data') MDV_PPI_FILE = os.path.join(DATA_PATH, 'example_mdv_ppi.mdv') MDV_RHI_FILE = os.path.join(DATA_PATH, 'example_mdv_rhi.mdv') CFRADIAL_PPI_FILE = os.path.join(DATA_PATH, 'example_cfradial_ppi.nc') CFRADIAL_RHI_FILE = os.path.join(DATA_PATH, 'example...
true
true
f71ef602df7023b9ceea5044b4fb1a54d0c1617e
4,760
py
Python
tests/problems/np/test_graphpartitioning.py
panaali/qubovert
d5ea46349d2a058954fb2cb06f559c0d3fb382c5
[ "Apache-2.0" ]
15
2020-07-10T20:46:50.000Z
2021-12-29T05:01:55.000Z
tests/problems/np/test_graphpartitioning.py
panaali/qubovert
d5ea46349d2a058954fb2cb06f559c0d3fb382c5
[ "Apache-2.0" ]
13
2020-06-12T22:37:59.000Z
2022-02-22T20:11:13.000Z
tests/problems/np/test_graphpartitioning.py
panaali/qubovert
d5ea46349d2a058954fb2cb06f559c0d3fb382c5
[ "Apache-2.0" ]
4
2020-05-13T06:02:38.000Z
2022-03-22T20:45:23.000Z
# Copyright 2020 Joseph T. Iosue # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
27.514451
76
0.721218
from qubovert.problems import GraphPartitioning from qubovert.utils import ( solve_qubo_bruteforce, solve_quso_bruteforce, solve_pubo_bruteforce, solve_puso_bruteforce ) from numpy import allclose edges = {("a", "b"), ("a", "c"), ("c", "d"), ("b", "c"), ("e", "f"), ("d", "e")} problem ...
true
true
f71ef6adf9445440b9d5b44b2d38774311b99add
2,408
py
Python
geocode/latlons2llsoa.py
JackKelly/Geocode
b3cc89c7467384e41c5be6bcd80b36271cfc252c
[ "MIT" ]
8
2020-06-03T14:49:10.000Z
2021-05-23T19:50:23.000Z
geocode/latlons2llsoa.py
JackKelly/Geocode
b3cc89c7467384e41c5be6bcd80b36271cfc252c
[ "MIT" ]
7
2021-05-21T11:19:13.000Z
2022-03-04T13:20:11.000Z
geocode/latlons2llsoa.py
JackKelly/Geocode
b3cc89c7467384e41c5be6bcd80b36271cfc252c
[ "MIT" ]
2
2021-05-21T11:00:32.000Z
2021-06-15T13:58:55.000Z
#!/usr/bin/env python3 """ Load a list of lat/lons from a CSV file and reverse-geocode them to LLSOA. - Jamie Taylor <jamie.taylor@sheffield.ac.uk> - First Authored: 2020-04-16 """ import sys import os import argparse import time as TIME import pandas as pd from geocode import Geocoder, query_yes_no def parse_optio...
43
99
0.5951
import sys import os import argparse import time as TIME import pandas as pd from geocode import Geocoder, query_yes_no def parse_options(): parser = argparse.ArgumentParser(description=("This is a command line interface (CLI) for " "the latlons2llsoa.py module"...
true
true
f71ef86436cc76a69e74c61126c0c795ea593197
1,017
py
Python
Aulas Python/Aula016.py
RenanRibeiroDaSilva/Meu-Aprendizado-Python
280bf2ad132ae0d26255e70b894fa7dbb69a5d01
[ "MIT" ]
2
2021-05-21T23:17:44.000Z
2021-05-22T04:34:37.000Z
Aulas Python/Aula016.py
RenanRibeiroDaSilva/Meu-Aprendizado-Python
280bf2ad132ae0d26255e70b894fa7dbb69a5d01
[ "MIT" ]
null
null
null
Aulas Python/Aula016.py
RenanRibeiroDaSilva/Meu-Aprendizado-Python
280bf2ad132ae0d26255e70b894fa7dbb69a5d01
[ "MIT" ]
null
null
null
""" Aula - 016 - Tuplas""" # Teoria: # Variáveis compostas: ''' Tuplas, o que são?: Em uma explicação bem simples, é uma variável que guarda vários valores! As tuplas usam indexições para indentificar seu componentes internos! As tuplas são imultáveis! ''' # Parte prática: lanche = ('Hamb...
23.651163
98
0.656834
lanche = ('Hamburguer', 'Suco', 'Pizza', 'Pudim', 'Batata Frita') print(lanche[0]) print(lanche[1]) print(lanche[2]) print(lanche[3], '\n') for comida in lanche: print(f'Eu vou comer {comida}') print('Comi pra caramba\n') for cont in range(0, len(lanche)): print(f'Eu vou comer {lanche[cont]} na posição...
true
true
f71ef89a094d1be41d5d328cb9ace8e241cf546b
2,543
py
Python
examples/acoustics_2d_radial/1drad/setplot.py
navravi/amrclaw
727d98d243c521267c927f6fe107ba6f1155597b
[ "BSD-3-Clause" ]
16
2015-05-27T08:16:09.000Z
2022-01-21T06:36:24.000Z
examples/acoustics_2d_radial/1drad/setplot.py
navravi/amrclaw
727d98d243c521267c927f6fe107ba6f1155597b
[ "BSD-3-Clause" ]
107
2015-01-02T19:51:43.000Z
2021-11-24T03:35:32.000Z
examples/acoustics_2d_radial/1drad/setplot.py
BrisaDavis/amrclaw
c5cacdf00f1959e160ea5616cdf6ea7b6cd374f3
[ "BSD-3-Clause" ]
28
2015-01-10T00:03:56.000Z
2022-02-11T23:52:34.000Z
""" Set up the plot figures, axes, and items to be done for each frame. This module is imported by the plotting routines and then the function setplot is called to set the plot parameters. """ #-------------------------- def setplot(plotdata=None): #-------------------------- """ Specify what is...
31.012195
80
0.616201
def setplot(plotdata=None): if plotdata is None: from clawpack.visclaw.data import ClawPlotData plotdata = ClawPlotData() plotdata.clearfigures() plotfigure = plotdata.new_plotfigure(name='q[0]', figno=0) plotaxes = plotfigure.new_plotaxes() plotaxes.x...
true
true
f71ef8c3544ef60ba5a8d26863bc684e75fe233f
750
py
Python
cv2ools/cli.py
narumiruna/opencv-tools
444a2ec31e01d6dc023ad40a7187f493c91e7ce2
[ "MIT" ]
1
2019-12-20T08:33:09.000Z
2019-12-20T08:33:09.000Z
cv2ools/cli.py
narumiruna/opencv-tools
444a2ec31e01d6dc023ad40a7187f493c91e7ce2
[ "MIT" ]
1
2020-04-22T02:43:22.000Z
2020-06-08T04:14:52.000Z
cv2ools/cli.py
narumiruna/opencv-tools
444a2ec31e01d6dc023ad40a7187f493c91e7ce2
[ "MIT" ]
null
null
null
from pathlib import Path import click import cv2 from .core import VideoWriter @click.group() def cli(): pass @cli.command() @click.argument('image-dir') @click.option('-o', '--output', default=None) @click.option('--fps', default=60) def merge(image_dir, output, fps): r"""Create video from images""" ...
20.27027
93
0.642667
from pathlib import Path import click import cv2 from .core import VideoWriter @click.group() def cli(): pass @cli.command() @click.argument('image-dir') @click.option('-o', '--output', default=None) @click.option('--fps', default=60) def merge(image_dir, output, fps): image_extensions = ['.jpg', '.jpeg',...
true
true
f71ef8c9bc4b3379b8be5bf1c34f17b64744b949
1,716
py
Python
plugins/plugin_hevc/hevc_codec.py
G-AshwinKumar/experiment-notebook
aae1c5fb9ef8f84dce5d75989ed8975797282f37
[ "MIT" ]
null
null
null
plugins/plugin_hevc/hevc_codec.py
G-AshwinKumar/experiment-notebook
aae1c5fb9ef8f84dce5d75989ed8975797282f37
[ "MIT" ]
null
null
null
plugins/plugin_hevc/hevc_codec.py
G-AshwinKumar/experiment-notebook
aae1c5fb9ef8f84dce5d75989ed8975797282f37
[ "MIT" ]
null
null
null
import os from enb import icompression from enb.config import get_options options = get_options() class HEVC(icompression.WrapperCodec, icompression.LosslessCodec): def __init__(self, config_path=None, chroma_format="400"): config_path = config_path if config_path is not None \ else os.path.j...
46.378378
117
0.689977
import os from enb import icompression from enb.config import get_options options = get_options() class HEVC(icompression.WrapperCodec, icompression.LosslessCodec): def __init__(self, config_path=None, chroma_format="400"): config_path = config_path if config_path is not None \ else os.path.j...
true
true
f71ef8f8f357ec451ae6259a9f7e22daf2e0c8ec
221
py
Python
spec/fixtures/one.py
elarivie/atom-python-linter
54190a2817ada801849bee4cffca95bd75123573
[ "MIT" ]
5
2020-01-16T11:21:29.000Z
2021-05-23T03:32:49.000Z
spec/fixtures/one.py
elarivie/atom-python-linter
54190a2817ada801849bee4cffca95bd75123573
[ "MIT" ]
8
2020-01-16T11:44:26.000Z
2020-11-25T01:58:25.000Z
spec/fixtures/one.py
elarivie/atom-python-linter
54190a2817ada801849bee4cffca95bd75123573
[ "MIT" ]
2
2021-01-19T08:30:09.000Z
2021-04-19T07:50:26.000Z
"""This file contains by default (without config file) ONE lint message. for EVERY linter: - flake8 - mypy - pydocstyle - pylint """ X = lambda: 1 def one() -> int: """One. """ return one return 1
12.277778
72
0.597285
X = lambda: 1 def one() -> int: return one return 1
true
true
f71ef9c89f7f1d80f649b6d8f7720bf60c9f6349
9,850
py
Python
kornia/enhance/histogram.py
Ishticode/kornia
974abb43ec72d12dbd244a2fb247bbbab8498de0
[ "ECL-2.0", "Apache-2.0" ]
418
2018-10-02T22:31:36.000Z
2019-01-16T14:15:45.000Z
kornia/enhance/histogram.py
Ishticode/kornia
974abb43ec72d12dbd244a2fb247bbbab8498de0
[ "ECL-2.0", "Apache-2.0" ]
94
2019-01-17T22:10:45.000Z
2019-05-22T23:47:58.000Z
kornia/enhance/histogram.py
Ishticode/kornia
974abb43ec72d12dbd244a2fb247bbbab8498de0
[ "ECL-2.0", "Apache-2.0" ]
25
2018-10-02T22:50:04.000Z
2019-01-13T18:14:11.000Z
from typing import Optional, Tuple import torch def marginal_pdf( values: torch.Tensor, bins: torch.Tensor, sigma: torch.Tensor, epsilon: float = 1e-10 ) -> Tuple[torch.Tensor, torch.Tensor]: """Calculate the marginal probability distribution function of the input tensor based on the number of histogram ...
38.326848
116
0.63665
from typing import Optional, Tuple import torch def marginal_pdf( values: torch.Tensor, bins: torch.Tensor, sigma: torch.Tensor, epsilon: float = 1e-10 ) -> Tuple[torch.Tensor, torch.Tensor]: if not isinstance(values, torch.Tensor): raise TypeError(f"Input values type is not a torch.Tensor. Got {typ...
true
true
f71ef9efed3b82abc8f4e9d4d5ce1687926182ce
2,633
py
Python
util/annotate-image.py
sasile/openface
5946f37d6045820dfa4e81ba2baac719563abc87
[ "Apache-2.0" ]
31
2016-05-27T21:27:06.000Z
2021-07-19T16:11:43.000Z
util/annotate-image.py
sasile/openface
5946f37d6045820dfa4e81ba2baac719563abc87
[ "Apache-2.0" ]
2
2021-04-30T20:33:54.000Z
2022-02-11T03:39:24.000Z
util/annotate-image.py
sasile/openface
5946f37d6045820dfa4e81ba2baac719563abc87
[ "Apache-2.0" ]
20
2016-01-26T00:38:09.000Z
2020-02-06T18:51:55.000Z
#!/usr/bin/env python2 # # Copyright 2015-2016 Carnegie Mellon University # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
34.644737
100
0.684011
import os import sys fileDir = os.path.dirname(os.path.realpath(__file__)) sys.path.append(os.path.join(fileDir, "..")) import argparse import cv2 from openface.alignment import NaiveDlib modelDir = os.path.join(fileDir, '..', 'models') dlibModelDir = os.path.join(modelDir, 'dlib') openfaceModel...
true
true
f71efa967077a2e3a9d5fff7e6ea1107f61cda2a
579
py
Python
arkav_is_api/quiz/migrations/0016_auto_20181214_0043.py
arkavidia5/arkav-is
6c6e8d091ead5bfff664d86f7903c62209800031
[ "MIT" ]
3
2018-10-01T16:30:15.000Z
2020-01-06T09:03:57.000Z
arkav_is_api/quiz/migrations/0016_auto_20181214_0043.py
arkavidia5/arkav-is
6c6e8d091ead5bfff664d86f7903c62209800031
[ "MIT" ]
4
2018-11-03T10:56:52.000Z
2020-04-26T06:54:16.000Z
arkav_is_api/quiz/migrations/0016_auto_20181214_0043.py
arkavidia5/arkav-is
6c6e8d091ead5bfff664d86f7903c62209800031
[ "MIT" ]
2
2018-09-26T16:28:01.000Z
2019-09-04T06:23:14.000Z
# Generated by Django 2.1.4 on 2018-12-13 17:43 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('quiz', '0015_auto_20181209_0433'), ] operations = [ migrations.AlterField( model_name='quizattempt', name='finish_ti...
24.125
62
0.592401
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('quiz', '0015_auto_20181209_0433'), ] operations = [ migrations.AlterField( model_name='quizattempt', name='finish_time', field=models.DateTimeField(bla...
true
true
f71efa9e075feb99d16e9b1180b94b2da938dc88
1,531
py
Python
batsky/batsky_sim.py
oar-team/batsky
3e9f14a4bdaac56d934c31f888858ac7a9f645c8
[ "BSD-3-Clause" ]
null
null
null
batsky/batsky_sim.py
oar-team/batsky
3e9f14a4bdaac56d934c31f888858ac7a9f645c8
[ "BSD-3-Clause" ]
null
null
null
batsky/batsky_sim.py
oar-team/batsky
3e9f14a4bdaac56d934c31f888858ac7a9f645c8
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import zmq import click import logging BATSIM_PORT = 28000 @click.command() @click.option('-d', '--debug', is_flag=True, help='Debug flag.') @click.option('-l', '--logfile', type=click.STRING, help='Specify log file.') @click.option('-c', '--controller', type=click.STR...
32.574468
104
0.639451
import zmq import click import logging BATSIM_PORT = 28000 @click.command() @click.option('-d', '--debug', is_flag=True, help='Debug flag.') @click.option('-l', '--logfile', type=click.STRING, help='Specify log file.') @click.option('-c', '--controller', type=click.STRING, help='Specify which hostname is the cont...
true
true
f71efbaaaabe7fbbea180e4b469c59a3c7315938
1,719
py
Python
spider/featurization/load_subclip_audio.py
Rosna/P4ML-UI
edf0dd830588f03b197e4d6532830a5aedd88424
[ "Apache-2.0" ]
1
2021-11-05T17:42:47.000Z
2021-11-05T17:42:47.000Z
spider/featurization/load_subclip_audio.py
Rosna/P4ML-UI
edf0dd830588f03b197e4d6532830a5aedd88424
[ "Apache-2.0" ]
null
null
null
spider/featurization/load_subclip_audio.py
Rosna/P4ML-UI
edf0dd830588f03b197e4d6532830a5aedd88424
[ "Apache-2.0" ]
2
2019-02-21T18:29:51.000Z
2019-09-02T21:21:26.000Z
import argparse import librosa import numpy as np def make_subclips(audio, sr, clip_size, pad=True): # Given a list of audio files and corresponding sample rates, # return a 2D list of subclips, each of size clip_size # Optional padding takes care of audio files shorter than clip size clips = [] fo...
33.705882
77
0.649215
import argparse import librosa import numpy as np def make_subclips(audio, sr, clip_size, pad=True): clips = [] for idx, a in enumerate(audio): step = int(sr[idx] * clip_size) overhang = len(a) % step if overhang != 0 and pad: a = np.concat...
true
true
f71efc84499c92428e12278751bbf13f4217a6f2
3,011
py
Python
pyrl/esper_ext.py
abesto/pyrl
34eb9843217ed5b557bff99ed66ef46b49b5c295
[ "MIT" ]
10
2019-12-03T03:59:41.000Z
2021-04-13T11:52:20.000Z
pyrl/esper_ext.py
abesto/pyrl
34eb9843217ed5b557bff99ed66ef46b49b5c295
[ "MIT" ]
1
2021-04-06T03:28:02.000Z
2021-05-31T09:34:48.000Z
pyrl/esper_ext.py
abesto/pyrl
34eb9843217ed5b557bff99ed66ef46b49b5c295
[ "MIT" ]
1
2019-12-03T02:50:02.000Z
2019-12-03T02:50:02.000Z
#!/usr/bin/env python from typing import Any, Dict, Optional, Type, TypeVar import esper # type: ignore import tabulate T = TypeVar("T") class WorldExt(esper.World): def __init__(self, timed=False): super(WorldExt, self).__init__(timed) self.resources: Dict = {} def _process(self, *args, ...
33.087912
81
0.659582
from typing import Any, Dict, Optional, Type, TypeVar import esper import tabulate T = TypeVar("T") class WorldExt(esper.World): def __init__(self, timed=False): super(WorldExt, self).__init__(timed) self.resources: Dict = {} def _process(self, *args, **kwargs): for processor in...
true
true
f71efc870b7a9b185f58cab460182c3571267535
1,288
py
Python
savu/test/travis/plugin_tests/filter_tests/hilbert_test.py
malte-storm/Savu
16291e8a22464c50c511af01fbc648860c1236e6
[ "Apache-2.0" ]
1
2021-04-18T09:30:54.000Z
2021-04-18T09:30:54.000Z
savu/test/travis/plugin_tests/filter_tests/hilbert_test.py
reubenlindroos/Savu
4bf93b818df41fc8c231b23f48393cb8fa00255d
[ "Apache-2.0" ]
null
null
null
savu/test/travis/plugin_tests/filter_tests/hilbert_test.py
reubenlindroos/Savu
4bf93b818df41fc8c231b23f48393cb8fa00255d
[ "Apache-2.0" ]
1
2021-05-20T16:31:29.000Z
2021-05-20T16:31:29.000Z
# Copyright 2014 Diamond Light Source Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
33.025641
78
0.726708
import unittest from savu.test import test_utils as tu from savu.test.travis.framework_tests.plugin_runner_test import \ run_protected_plugin_runner class HilbertTest(unittest.TestCase): def test_hilbert(self): data_file = tu.get_test_data_path('24737.nxs') process_file = tu.ge...
true
true
f71efcff616f3335a8fa825beb91566c27a20f16
35,204
py
Python
tests/model_fields/test_jsonfield.py
kevinmarsh/django
00a1d42bf0d83ba4b329271433eb5e3fd0f704fe
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
null
null
null
tests/model_fields/test_jsonfield.py
kevinmarsh/django
00a1d42bf0d83ba4b329271433eb5e3fd0f704fe
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
null
null
null
tests/model_fields/test_jsonfield.py
kevinmarsh/django
00a1d42bf0d83ba4b329271433eb5e3fd0f704fe
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
null
null
null
import operator import uuid from unittest import mock from django import forms from django.core import serializers from django.core.exceptions import ValidationError from django.core.serializers.json import DjangoJSONEncoder from django.db import ( DataError, IntegrityError, NotSupportedError, OperationalError, co...
38.306855
100
0.572293
import operator import uuid from unittest import mock from django import forms from django.core import serializers from django.core.exceptions import ValidationError from django.core.serializers.json import DjangoJSONEncoder from django.db import ( DataError, IntegrityError, NotSupportedError, OperationalError, co...
true
true
f71efd99812e463f3811b77ce6cfe3ce1b3d6a49
26,107
py
Python
run_manager.py
Johnzhjw/CIT2FR-FL-NAS
53e93075ff1834ab817ad6359025ddafd20e6ef4
[ "Apache-2.0" ]
null
null
null
run_manager.py
Johnzhjw/CIT2FR-FL-NAS
53e93075ff1834ab817ad6359025ddafd20e6ef4
[ "Apache-2.0" ]
null
null
null
run_manager.py
Johnzhjw/CIT2FR-FL-NAS
53e93075ff1834ab817ad6359025ddafd20e6ef4
[ "Apache-2.0" ]
null
null
null
# Once for All: Train One Network and Specialize it for Efficient Deployment # Han Cai, Chuang Gan, Tianzhe Wang, Zhekai Zhang, Song Han # International Conference on Learning Representations (ICLR), 2020. import os import time import json import math from tqdm import tqdm import numpy as np import copy import torc...
40.792188
131
0.569847
import os import time import json import math from tqdm import tqdm import numpy as np import copy import torch.nn as nn import torch.nn.functional as F import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.optim import torchvision from ofa.imagenet_codebase.utils import count_parameters, ...
true
true
f71efda83eac0f41becf83c63eefaf707a80c70d
1,677
py
Python
junior_class/chapter-7-Recommendation_System/code/examples/7-5-1-read-feature.py
wwhio/awesome-DeepLearning
2cc92edcf0c22bdfc670c537cc819c8fadf33fac
[ "Apache-2.0" ]
1,150
2021-06-01T03:44:21.000Z
2022-03-31T13:43:42.000Z
junior_class/chapter-7-Recommendation_System/code/examples/7-5-1-read-feature.py
wwhio/awesome-DeepLearning
2cc92edcf0c22bdfc670c537cc819c8fadf33fac
[ "Apache-2.0" ]
358
2021-06-01T03:58:47.000Z
2022-03-28T02:55:00.000Z
junior_class/chapter-7-Recommendation_System/code/examples/7-5-1-read-feature.py
wwhio/awesome-DeepLearning
2cc92edcf0c22bdfc670c537cc819c8fadf33fac
[ "Apache-2.0" ]
502
2021-05-31T12:52:14.000Z
2022-03-31T02:51:41.000Z
# copyright (c) 2021 PaddlePaddle Authors. All Rights Reserve. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
27.048387
74
0.700656
import pickle import numpy as np mov_feat_dir = 'mov_feat.pkl' usr_feat_dir = 'usr_feat.pkl' usr_feats = pickle.load(open(usr_feat_dir, 'rb')) mov_feats = pickle.load(open(mov_feat_dir, 'rb')) usr_id = 2 usr_feat = usr_feats[str(usr_id)] mov_id = 1 mov_feat = mov_feats[str(mov_id)] movie_data_p...
true
true
f71efea9b7b1591329208d4b70a055688fc34558
4,175
py
Python
wrapper.py
crsqq/OpenNE
0cecb2b5076b878d2f07ed1130682aeab6ce37f1
[ "MIT" ]
null
null
null
wrapper.py
crsqq/OpenNE
0cecb2b5076b878d2f07ed1130682aeab6ce37f1
[ "MIT" ]
null
null
null
wrapper.py
crsqq/OpenNE
0cecb2b5076b878d2f07ed1130682aeab6ce37f1
[ "MIT" ]
null
null
null
from OpenNE.src.libnrl import graph from OpenNE.src.libnrl import grarep from OpenNE.src.libnrl import line from OpenNE.src.libnrl import node2vec from OpenNE.src.libnrl.gcn import gcnAPI from itertools import product import networkx as nx import numpy as np import tensorflow as tf def nx_to_openne_graph(nxgraph, stri...
33.134921
109
0.668982
from OpenNE.src.libnrl import graph from OpenNE.src.libnrl import grarep from OpenNE.src.libnrl import line from OpenNE.src.libnrl import node2vec from OpenNE.src.libnrl.gcn import gcnAPI from itertools import product import networkx as nx import numpy as np import tensorflow as tf def nx_to_openne_graph(nxgraph, stri...
true
true
f71eff5ae0a308b7cbc26231bed0d1f82d0ac6ae
4,630
py
Python
examples/dfp/v201802/native_style_service/create_native_styles.py
christineyi3898/googleads-python-lib
cd707dc897b93cf1bbb19355f7424e7834e7fb55
[ "Apache-2.0" ]
1
2019-10-21T04:10:22.000Z
2019-10-21T04:10:22.000Z
examples/dfp/v201802/native_style_service/create_native_styles.py
christineyi3898/googleads-python-lib
cd707dc897b93cf1bbb19355f7424e7834e7fb55
[ "Apache-2.0" ]
null
null
null
examples/dfp/v201802/native_style_service/create_native_styles.py
christineyi3898/googleads-python-lib
cd707dc897b93cf1bbb19355f7424e7834e7fb55
[ "Apache-2.0" ]
1
2019-10-21T04:10:51.000Z
2019-10-21T04:10:51.000Z
#!/usr/bin/env python # # Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
25.58011
79
0.641685
import uuid from googleads import dfp CREATIVE_TEMPLATE_ID = 10004400 WIDTH = 300 HEIGHT = 345 HTML_SNIPPET = """<div id="adunit" style="overflow: hidden;"> <img src="[%Thirdpartyimpressiontracker%]" style="display:none"> <div class="attribution">Ad</div> <div class="image"> <a cla...
true
true
f71f0026e3dbe9f832b36a3f578a89ccc56f0ac7
7,413
py
Python
minimal_controler.py
thibnoel/solopython
0977c6de8bcee2b8ecabaa46f6953e7a05334af1
[ "BSD-2-Clause" ]
null
null
null
minimal_controler.py
thibnoel/solopython
0977c6de8bcee2b8ecabaa46f6953e7a05334af1
[ "BSD-2-Clause" ]
null
null
null
minimal_controler.py
thibnoel/solopython
0977c6de8bcee2b8ecabaa46f6953e7a05334af1
[ "BSD-2-Clause" ]
null
null
null
# coding: utf8 from coll_avoidance_modules.solo_coll_wrapper_c import * from coll_avoidance_modules.collisions_controller import * from PA_utils_mpc import PyBulletSimulator import numpy as np import argparse # from solo12 import Solo12 # from pynput import keyboard from PA_logger import Logger # from utils.qualisysC...
34.004587
159
0.6351
from coll_avoidance_modules.solo_coll_wrapper_c import * from coll_avoidance_modules.collisions_controller import * from PA_utils_mpc import PyBulletSimulator import numpy as np import argparse from PA_logger import Logger import os import sys sys.path.insert(0, './mpctsid') DT = 0.002 key_pressed = False de...
true
true
f71f00e65a4151c70e6c2c60982959a593e585b2
1,112
py
Python
pincer/middleware/guild_integrations_update.py
shivamdurgbuns/Pincer
aa27d6d65023ea62a2d0c09c1e9bc0fe4763e0c3
[ "MIT" ]
null
null
null
pincer/middleware/guild_integrations_update.py
shivamdurgbuns/Pincer
aa27d6d65023ea62a2d0c09c1e9bc0fe4763e0c3
[ "MIT" ]
null
null
null
pincer/middleware/guild_integrations_update.py
shivamdurgbuns/Pincer
aa27d6d65023ea62a2d0c09c1e9bc0fe4763e0c3
[ "MIT" ]
null
null
null
# Copyright Pincer 2021-Present # Full MIT License can be found in `LICENSE` at the project root. """sent when a guild integration is updated.""" from ..core.dispatch import GatewayDispatch from ..objects.events.guild import GuildIntegrationsUpdateEvent from ..utils import Coro from ..utils.conversion import construc...
29.263158
91
0.717626
from ..core.dispatch import GatewayDispatch from ..objects.events.guild import GuildIntegrationsUpdateEvent from ..utils import Coro from ..utils.conversion import construct_client_dict async def guild_integrations_update_middleware(self, payload: GatewayDispatch): return ( "on_guild_integrations_upd...
true
true
f71f03689a16c5f974779067cfd512bb47598768
3,725
py
Python
users/migrations/0001_initial.py
SmartDataWithR/CovidHelper
21f8c3f3d81da0b5ec32b228c711e96f9d5c168e
[ "MIT" ]
null
null
null
users/migrations/0001_initial.py
SmartDataWithR/CovidHelper
21f8c3f3d81da0b5ec32b228c711e96f9d5c168e
[ "MIT" ]
9
2020-03-27T10:33:35.000Z
2022-03-12T00:20:47.000Z
users/migrations/0001_initial.py
SmartDataWithR/CovidHelper
21f8c3f3d81da0b5ec32b228c711e96f9d5c168e
[ "MIT" ]
null
null
null
# Generated by Django 2.1.15 on 2020-03-25 20:14 import django.contrib.auth.models import django.contrib.auth.validators from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0009_alter_user_last_name_m...
68.981481
329
0.646443
import django.contrib.auth.models import django.contrib.auth.validators from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0009_alter_user_last_name_max_length'), ] operations = [ m...
true
true
f71f03785f8115503091745a9d96b1e53cf9430e
18,668
py
Python
tornado/test/template_test.py
DengJackNo1/tornado
895a4fa69817c24fbf6ada6c5fb07351c6e91cd5
[ "Apache-2.0" ]
15,056
2015-01-01T03:08:16.000Z
2022-03-31T14:44:56.000Z
tornado/test/template_test.py
DengJackNo1/tornado
895a4fa69817c24fbf6ada6c5fb07351c6e91cd5
[ "Apache-2.0" ]
1,645
2015-01-05T08:15:32.000Z
2022-03-24T20:30:10.000Z
tornado/test/template_test.py
DengJackNo1/tornado
895a4fa69817c24fbf6ada6c5fb07351c6e91cd5
[ "Apache-2.0" ]
5,098
2015-01-02T15:43:36.000Z
2022-03-30T06:04:43.000Z
import os import traceback import unittest from tornado.escape import utf8, native_str, to_unicode from tornado.template import Template, DictLoader, ParseError, Loader from tornado.util import ObjectDict import typing # noqa: F401 class TemplateTest(unittest.TestCase): def test_simple(self): template ...
34.763501
87
0.558871
import os import traceback import unittest from tornado.escape import utf8, native_str, to_unicode from tornado.template import Template, DictLoader, ParseError, Loader from tornado.util import ObjectDict import typing class TemplateTest(unittest.TestCase): def test_simple(self): template = Template("...
true
true
f71f0417c195d615119c5f534227e39a67905bf1
7,169
py
Python
daskms/tests/test_ordering.py
ratt-ru/dask-ms
becd3572f86a0ad78b55540f25fce6e129976a29
[ "BSD-3-Clause" ]
7
2019-08-23T03:44:53.000Z
2021-05-06T00:51:18.000Z
daskms/tests/test_ordering.py
ska-sa/dask-ms
ce33e7aad36eeb7c2c79093622b9776186856304
[ "BSD-3-Clause" ]
76
2019-08-20T14:34:05.000Z
2022-02-10T13:21:29.000Z
daskms/tests/test_ordering.py
ratt-ru/dask-ms
becd3572f86a0ad78b55540f25fce6e129976a29
[ "BSD-3-Clause" ]
4
2019-10-15T13:35:19.000Z
2021-03-23T14:52:23.000Z
# -*- coding: utf-8 -*- import dask import dask.array as da from numpy.testing import assert_array_equal import pyrap.tables as pt import pytest from daskms.table_proxy import TableProxy from daskms.ordering import (ordering_taql, row_ordering, group_ordering_...
32.885321
77
0.590598
import dask import dask.array as da from numpy.testing import assert_array_equal import pyrap.tables as pt import pytest from daskms.table_proxy import TableProxy from daskms.ordering import (ordering_taql, row_ordering, group_ordering_taql, ...
true
true
f71f0462323accc1bfac00a9a945ecba1fea9b04
4,261
py
Python
tempest/api/compute/floating_ips/test_floating_ips_actions_negative.py
gamado/ds_tempest_rm_me_please
3f5d149b3a32e713c60c59a054035ac2e5c73c28
[ "Apache-2.0" ]
null
null
null
tempest/api/compute/floating_ips/test_floating_ips_actions_negative.py
gamado/ds_tempest_rm_me_please
3f5d149b3a32e713c60c59a054035ac2e5c73c28
[ "Apache-2.0" ]
null
null
null
tempest/api/compute/floating_ips/test_floating_ips_actions_negative.py
gamado/ds_tempest_rm_me_please
3f5d149b3a32e713c60c59a054035ac2e5c73c28
[ "Apache-2.0" ]
2
2015-04-30T08:46:29.000Z
2020-03-01T17:05:23.000Z
# Copyright 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 requ...
41.368932
79
0.678479
from tempest.api.compute.floating_ips import base from tempest.common.utils import data_utils from tempest import config from tempest.lib import exceptions as lib_exc from tempest import test CONF = config.CONF class FloatingIPsNegativeTestJSON(base.BaseFloatingIPsTest): server_id = None @cla...
true
true
f71f04cf727d577cc22cb2ba39ff8a53f6e09d7c
6,354
py
Python
batch/batch/cloud/gcp/instance_config.py
jkgoodrich/hail
95ce1d792b553a5e97b390d349237a7ed86fbf98
[ "MIT" ]
null
null
null
batch/batch/cloud/gcp/instance_config.py
jkgoodrich/hail
95ce1d792b553a5e97b390d349237a7ed86fbf98
[ "MIT" ]
null
null
null
batch/batch/cloud/gcp/instance_config.py
jkgoodrich/hail
95ce1d792b553a5e97b390d349237a7ed86fbf98
[ "MIT" ]
null
null
null
from typing import List from ...driver.billing_manager import ProductVersions from ...instance_config import InstanceConfig from .resource_utils import family_worker_type_cores_to_gcp_machine_type, gcp_machine_type_to_parts from .resources import ( GCPComputeResource, GCPDynamicSizedDiskResource, GCPIPFeeR...
38.743902
116
0.645735
from typing import List from ...driver.billing_manager import ProductVersions from ...instance_config import InstanceConfig from .resource_utils import family_worker_type_cores_to_gcp_machine_type, gcp_machine_type_to_parts from .resources import ( GCPComputeResource, GCPDynamicSizedDiskResource, GCPIPFeeR...
true
true
f71f053563ce5cd186a0f53cca0666f1cfc62e50
4,047
py
Python
apps/modules/post/process/adm_post.py
think-wang/osroom
67bb5bbd7a63fbaeb0d919738859444b54500152
[ "BSD-2-Clause" ]
null
null
null
apps/modules/post/process/adm_post.py
think-wang/osroom
67bb5bbd7a63fbaeb0d919738859444b54500152
[ "BSD-2-Clause" ]
null
null
null
apps/modules/post/process/adm_post.py
think-wang/osroom
67bb5bbd7a63fbaeb0d919738859444b54500152
[ "BSD-2-Clause" ]
null
null
null
# -*-coding:utf-8-*- from bson import ObjectId from flask import request from flask_babel import gettext from flask_login import current_user from apps.core.utils.get_config import get_config from apps.modules.message.process.user_message import insert_user_msg from apps.utils.format.obj_format import json_to_pyseq fro...
37.12844
137
0.613541
from bson import ObjectId from flask import request from flask_babel import gettext from flask_login import current_user from apps.core.utils.get_config import get_config from apps.modules.message.process.user_message import insert_user_msg from apps.utils.format.obj_format import json_to_pyseq from apps.app import md...
true
true
f71f05a946b87cc6dad001f46064a2923b2dd621
2,720
py
Python
WeatherReader.py
pm3512/WeatherMonitor
64b9c3fd16c6813bdf39e32ec2cf384e9b5c7e96
[ "MIT" ]
null
null
null
WeatherReader.py
pm3512/WeatherMonitor
64b9c3fd16c6813bdf39e32ec2cf384e9b5c7e96
[ "MIT" ]
null
null
null
WeatherReader.py
pm3512/WeatherMonitor
64b9c3fd16c6813bdf39e32ec2cf384e9b5c7e96
[ "MIT" ]
null
null
null
import json import requests import os from dotenv import load_dotenv import datetime load_dotenv() batch_size = 130 def get_raw_weather(ids, start_date, end_date): request_ids = '&stationid='.join(id for id in ids) return requests.get('https://www.ncdc.noaa.gov/cdo-web/api/v2/data?datasetid=GHCND&stationid=...
40
168
0.627206
import json import requests import os from dotenv import load_dotenv import datetime load_dotenv() batch_size = 130 def get_raw_weather(ids, start_date, end_date): request_ids = '&stationid='.join(id for id in ids) return requests.get('https://www.ncdc.noaa.gov/cdo-web/api/v2/data?datasetid=GHCND&stationid=...
true
true
f71f05d3643b66a85749a7d0e9c6270f4abb6a4d
8,454
py
Python
config/settings/production.py
dl0312/nomadgram
babec04ffa471a94499dbb2bd13ca5b832451599
[ "MIT" ]
null
null
null
config/settings/production.py
dl0312/nomadgram
babec04ffa471a94499dbb2bd13ca5b832451599
[ "MIT" ]
6
2020-06-05T17:02:46.000Z
2022-03-08T22:50:11.000Z
config/settings/production.py
dl0312/nomadgram
babec04ffa471a94499dbb2bd13ca5b832451599
[ "MIT" ]
null
null
null
import logging from .base import * # noqa from .base import env # GENERAL # ------------------------------------------------------------------------------ # https://docs.djangoproject.com/en/dev/ref/settings/#secret-key SECRET_KEY = env('DJANGO_SECRET_KEY') # https://docs.djangoproject.com/en/dev/ref/settings/#allow...
41.64532
96
0.61876
import logging from .base import * from .base import env = env('DJANGO_SECRET_KEY') = env.list('DJANGO_ALLOWED_HOSTS', default=['geonlee.co']) DATABASES['default'] = env.db('DATABASE_URL') DATABASES['default']['ATOMIC_REQUESTS'] = True DATABASES['default']['CONN_MAX_AGE'] = env.int('CONN_MAX_AGE', defaul...
true
true
f71f0643e19be8949af25c088e16a9f19b2b8080
4,285
py
Python
vscodenv/main.py
AlexCovizzi/vscodenv
ddaf61c40a1278e923909201a5ec8ef62c5315f9
[ "Apache-2.0" ]
17
2018-04-29T21:14:24.000Z
2018-11-12T21:08:24.000Z
vscodenv/main.py
AlexCovizzi/vscodenv
ddaf61c40a1278e923909201a5ec8ef62c5315f9
[ "Apache-2.0" ]
null
null
null
vscodenv/main.py
AlexCovizzi/vscodenv
ddaf61c40a1278e923909201a5ec8ef62c5315f9
[ "Apache-2.0" ]
1
2019-02-07T15:25:31.000Z
2019-02-07T15:25:31.000Z
import argparse import os from .vscode_extensions import * from .extensions_json import * from .vscode_cli import code_open from .utils import extension_base_name, get_work_dir parser = argparse.ArgumentParser(add_help=False) parser.add_argument("path", nargs='?', default=os.getcwd()) group = parser.add_mutually_exclu...
33.217054
91
0.69895
import argparse import os from .vscode_extensions import * from .extensions_json import * from .vscode_cli import code_open from .utils import extension_base_name, get_work_dir parser = argparse.ArgumentParser(add_help=False) parser.add_argument("path", nargs='?', default=os.getcwd()) group = parser.add_mutually_exclu...
true
true
f71f06a96f54f410eaecad5e993586b799f4e2d5
29,641
py
Python
back/api/models.py
maltaesousa/geoshop2
624c6d79b5a29b39a898e0d1332fb8de23bd96e4
[ "BSD-3-Clause" ]
null
null
null
back/api/models.py
maltaesousa/geoshop2
624c6d79b5a29b39a898e0d1332fb8de23bd96e4
[ "BSD-3-Clause" ]
155
2020-01-06T09:32:32.000Z
2022-03-31T09:21:39.000Z
back/api/models.py
maltaesousa/geoshop2
624c6d79b5a29b39a898e0d1332fb8de23bd96e4
[ "BSD-3-Clause" ]
3
2020-01-29T15:48:02.000Z
2020-06-04T12:50:24.000Z
import logging import uuid from django.conf import settings from django.core.validators import RegexValidator from django.contrib.gis.db import models from django.contrib.gis.geos import Polygon from django.contrib.auth import get_user_model from django.contrib.postgres.search import SearchVectorField from django.contr...
40.327891
123
0.638676
import logging import uuid from django.conf import settings from django.core.validators import RegexValidator from django.contrib.gis.db import models from django.contrib.gis.geos import Polygon from django.contrib.auth import get_user_model from django.contrib.postgres.search import SearchVectorField from django.contr...
true
true
f71f078a37046cc1c37c66c423f06348996abe5e
4,144
py
Python
tests/data_handler/test_cities.py
natylaza89/covid19_il
ee5c46670383e76074edac4efe19f8d20e2f914d
[ "MIT" ]
1
2020-11-17T17:57:17.000Z
2020-11-17T17:57:17.000Z
tests/data_handler/test_cities.py
natylaza89/covid19_il
ee5c46670383e76074edac4efe19f8d20e2f914d
[ "MIT" ]
null
null
null
tests/data_handler/test_cities.py
natylaza89/covid19_il
ee5c46670383e76074edac4efe19f8d20e2f914d
[ "MIT" ]
1
2020-11-17T17:57:20.000Z
2020-11-17T17:57:20.000Z
from collections import defaultdict from tests.data_handler.data_handler_tests_utils import DataHandlerTestsUtils from covid19_il.data_handler.data_handlers.cities import Cities from covid19_il.data_handler.enums.resource_id import ResourceId class TestCities(DataHandlerTestsUtils): """ Tests for Cities Data Han...
62.787879
294
0.644546
from collections import defaultdict from tests.data_handler.data_handler_tests_utils import DataHandlerTestsUtils from covid19_il.data_handler.data_handlers.cities import Cities from covid19_il.data_handler.enums.resource_id import ResourceId class TestCities(DataHandlerTestsUtils): def setUp(self) -> None: ...
true
true
f71f07ba0a89ab8d3a9de7b6745a6368217f2aa6
8,554
py
Python
scripts/slave/recipes/dart/dart2js_nobuild.py
mithro/chromium-build
98d83e124dc08510756906171922a22ba27b87fa
[ "BSD-3-Clause" ]
null
null
null
scripts/slave/recipes/dart/dart2js_nobuild.py
mithro/chromium-build
98d83e124dc08510756906171922a22ba27b87fa
[ "BSD-3-Clause" ]
null
null
null
scripts/slave/recipes/dart/dart2js_nobuild.py
mithro/chromium-build
98d83e124dc08510756906171922a22ba27b87fa
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. DEPS = [ 'depot_tools/bot_update', 'depot_tools/gclient', 'file', 'depot_tools/gsutil', 'recipe_engine/context', 'recipe_engine/path', 'recipe_...
37.353712
79
0.58347
DEPS = [ 'depot_tools/bot_update', 'depot_tools/gclient', 'file', 'depot_tools/gsutil', 'recipe_engine/context', 'recipe_engine/path', 'recipe_engine/platform', 'recipe_engine/properties', 'recipe_engine/python', 'recipe_engine/step', 'test_utils', 'zip', ] all_runtimes = ['d8', 'jsshell',...
true
true
f71f08034890f90569427564d97d80b2faa70404
339
py
Python
setup.py
afansky/btce-bot
976474a42de0651d00f435b6db7c8f2c15352f62
[ "MIT" ]
null
null
null
setup.py
afansky/btce-bot
976474a42de0651d00f435b6db7c8f2c15352f62
[ "MIT" ]
null
null
null
setup.py
afansky/btce-bot
976474a42de0651d00f435b6db7c8f2c15352f62
[ "MIT" ]
null
null
null
#!/usr/bin/env python from distutils.core import setup setup(name='btce-bot', version='0.3', description='A framework for building trading bots for BTC-e.com.', author='Alan McIntyre', author_email='alan.mcintyre@gmail.com', url='https://github.com/alanmcintyre/btce-bot', packages=...
28.25
73
0.654867
from distutils.core import setup setup(name='btce-bot', version='0.3', description='A framework for building trading bots for BTC-e.com.', author='Alan McIntyre', author_email='alan.mcintyre@gmail.com', url='https://github.com/alanmcintyre/btce-bot', packages=['btcebot'], )
true
true
f71f083705a2de8c8bb69ce11b3257c5a85d6917
7,108
py
Python
lib/distributed_utils.py
TB5zhh/ViewpointBottleneck
db0fe4b61ae42eceff21296844200d636e6e5e83
[ "MIT" ]
244
2020-11-09T02:45:20.000Z
2022-03-24T18:49:18.000Z
lib/distributed_utils.py
TB5zhh/ViewpointBottleneck
db0fe4b61ae42eceff21296844200d636e6e5e83
[ "MIT" ]
27
2020-11-20T13:19:36.000Z
2022-03-10T08:52:12.000Z
lib/distributed_utils.py
TB5zhh/ViewpointBottleneck
db0fe4b61ae42eceff21296844200d636e6e5e83
[ "MIT" ]
33
2020-11-09T07:55:06.000Z
2022-03-26T06:18:12.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import os import pickle import socket import struct import subprocess import warnings import torch import torch.distributed as dist def is...
37.21466
107
0.638436
import os import pickle import socket import struct import subprocess import warnings import torch import torch.distributed as dist def is_master(args): return args.distributed_rank == 0 def infer_init_method(args): if args.distributed_init_method is not None: return if all(key in o...
true
true
f71f089fb2941cb1a4ebbf5163178e3ab237ecd2
938
py
Python
examples/flow_interaction/flow_data_to_vtk.py
eirikur16/flrs
c98604593753def05086b54ce82f5551f01d2529
[ "Apache-2.0" ]
1
2021-04-20T03:21:34.000Z
2021-04-20T03:21:34.000Z
examples/flow_interaction/flow_data_to_vtk.py
eirikur16/flrs
c98604593753def05086b54ce82f5551f01d2529
[ "Apache-2.0" ]
3
2020-01-27T23:41:56.000Z
2020-03-07T04:12:23.000Z
examples/flow_interaction/flow_data_to_vtk.py
eirikur16/flrs
c98604593753def05086b54ce82f5551f01d2529
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 NREL # 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 # distri...
31.266667
79
0.775053
import floris.tools as wfct fi = wfct.floris_interface.FlorisInterface("../example_input.json") fi.calculate_wake() flow_data = fi.get_flow_data() flow_data.save_as_vtk("flow.vtk")
true
true
f71f08cdf9fcc8d348fb81bf95869f81920304bf
762
py
Python
spectrochempy/core/readers/api.py
dcambie/spectrochempy
e376082d66be7a4c528b7d83be076d77534e39bd
[ "CECILL-B" ]
3
2021-04-09T09:13:21.000Z
2022-01-09T00:05:42.000Z
spectrochempy/core/readers/api.py
fernandezc/spectrochempy
4707c51dba0032c160afc40682fa16d4b9855ded
[ "CECILL-B" ]
null
null
null
spectrochempy/core/readers/api.py
fernandezc/spectrochempy
4707c51dba0032c160afc40682fa16d4b9855ded
[ "CECILL-B" ]
null
null
null
# -*- coding: utf-8 -*- # ====================================================================================================================== # Copyright (©) 2015-2021 LCS - Laboratoire Catalyse et Spectrochimie, Caen, France. = # CeCILL-B FREE SOFTWARE LICENSE AGREEMENT - See ful...
47.625
120
0.328084
from spectrochempy.utils import generate_api __all__ = generate_api(__file__) if __name__ == '__main__': pass
true
true
f71f098d2009d8c51769c68ec91c230e6fd290b1
9,535
py
Python
salt/cli/cp.py
Noah-Huppert/salt
998c382f5f2c3b4cbf7d96aa6913ada6993909b3
[ "Apache-2.0" ]
19
2016-01-29T14:37:52.000Z
2022-03-30T18:08:01.000Z
salt/cli/cp.py
Noah-Huppert/salt
998c382f5f2c3b4cbf7d96aa6913ada6993909b3
[ "Apache-2.0" ]
223
2016-03-02T16:39:41.000Z
2022-03-03T12:26:35.000Z
salt/cli/cp.py
Noah-Huppert/salt
998c382f5f2c3b4cbf7d96aa6913ada6993909b3
[ "Apache-2.0" ]
64
2016-02-04T19:45:26.000Z
2021-12-15T02:02:31.000Z
# -*- coding: utf-8 -*- """ The cp module is used to execute the logic used by the salt-cp command line application, salt-cp is NOT intended to broadcast large files, it is intended to handle text files. Salt-cp can be used to distribute configuration files """ # Import python libs from __future__ import absolute_impo...
32.65411
86
0.52753
from __future__ import absolute_import, print_function, unicode_literals import base64 import errno import logging import os import re import sys import salt.client import salt.output import salt.utils.files import salt.utils.gzip_util import salt.utils.itertools import salt.utils.minions import salt.utils.parser...
true
true
f71f0a1725b858fec70598ade4805d6cd2dbc892
11,475
py
Python
jacket/tests/compute/unit/virt/disk/vfs/test_guestfs.py
bopopescu/jacket
d7ad3147fcb43131098c2a5210847634ff5fb325
[ "Apache-2.0" ]
null
null
null
jacket/tests/compute/unit/virt/disk/vfs/test_guestfs.py
bopopescu/jacket
d7ad3147fcb43131098c2a5210847634ff5fb325
[ "Apache-2.0" ]
null
null
null
jacket/tests/compute/unit/virt/disk/vfs/test_guestfs.py
bopopescu/jacket
d7ad3147fcb43131098c2a5210847634ff5fb325
[ "Apache-2.0" ]
2
2016-08-10T02:21:49.000Z
2020-07-24T01:57:21.000Z
# Copyright (C) 2012 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 applicable law ...
36.661342
78
0.613159
import fixtures import mock from jacket.compute import exception from jacket.compute import test from jacket.tests.compute.unit.virt.disk.vfs import fakeguestfs from jacket.compute.virt.disk.vfs import guestfs as vfsimpl from jacket.compute.virt.image import model as imgmodel class VirtDiskVFSGuestFSTe...
true
true
f71f0a64179b2199ac8d77a585db1e15d2f9a7d9
7,949
py
Python
software/jetson/ArduCAM/Arducam_OBISP_MIPI_Camera_Module/ptz_focus_example/FocuserExample.py
abstractguy/TSO_project
1130e6fb081d1486ff15339a9757c46a927a2965
[ "BSD-2-Clause" ]
1
2021-06-06T14:12:32.000Z
2021-06-06T14:12:32.000Z
software/jetson/ArduCAM/MIPI_Camera/Jetson/JetsonNano_PTZ/FocuserExample.py
abstractguy/TSO_project
1130e6fb081d1486ff15339a9757c46a927a2965
[ "BSD-2-Clause" ]
6
2021-04-06T12:35:34.000Z
2022-03-12T00:58:16.000Z
software/jetson/ArduCAM/MIPI_Camera/Jetson/JetsonNano_PTZ/FocuserExample.py
abstractguy/TSO_project
1130e6fb081d1486ff15339a9757c46a927a2965
[ "BSD-2-Clause" ]
2
2020-03-05T00:09:48.000Z
2021-06-03T20:06:03.000Z
# encoding: UTF-8 ''' Arducam programable zoom-lens controller. Copyright (c) 2019-4 Arducam <http://www.arducam.com>. 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 ...
36.631336
106
0.66977
import cv2 import numpy as py import os import sys import time from JetsonCamera import Camera from Focuser import Focuser from AutoFocus import AutoFocus import curses global image_count image_count = 0 def RenderStatusBar(stdscr): height, width = stdscr.getmaxyx() statusbarstr = "Press 'q' to exit" ...
true
true
f71f0b899f3bc15789f65e943d198f999ea55b6f
10,044
py
Python
zulipterminal/config/keys.py
fredrikekre/zulip-terminal
5609c78bdc45f972dc1f4bd30399bb6cafe5f332
[ "Apache-2.0" ]
null
null
null
zulipterminal/config/keys.py
fredrikekre/zulip-terminal
5609c78bdc45f972dc1f4bd30399bb6cafe5f332
[ "Apache-2.0" ]
null
null
null
zulipterminal/config/keys.py
fredrikekre/zulip-terminal
5609c78bdc45f972dc1f4bd30399bb6cafe5f332
[ "Apache-2.0" ]
1
2020-10-21T08:20:30.000Z
2020-10-21T08:20:30.000Z
from collections import OrderedDict from typing import List, Set from typing_extensions import TypedDict KeyBinding = TypedDict('KeyBinding', { 'keys': Set[str], 'help_text': str, 'excluded_from_random_tips': bool, 'key_category': str, }, total=False) KEY_BINDINGS = OrderedDict([ ('HELP', { ...
29.282799
77
0.52718
from collections import OrderedDict from typing import List, Set from typing_extensions import TypedDict KeyBinding = TypedDict('KeyBinding', { 'keys': Set[str], 'help_text': str, 'excluded_from_random_tips': bool, 'key_category': str, }, total=False) KEY_BINDINGS = OrderedDict([ ('HELP', { ...
true
true