hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f76e8bfe7082bd7e73150eb62fbe3ddd8a03715a
1,251
py
Python
src/utils/aes_cbc.py
iicc/EauDouce
6d9850c4b62309a6b88ec8a960ed54ffd641fa10
[ "MIT" ]
null
null
null
src/utils/aes_cbc.py
iicc/EauDouce
6d9850c4b62309a6b88ec8a960ed54ffd641fa10
[ "MIT" ]
null
null
null
src/utils/aes_cbc.py
iicc/EauDouce
6d9850c4b62309a6b88ec8a960ed54ffd641fa10
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ EauDouce.utils.aes_cbc ~~~~~~~~~~~~~~ AES加密的实现模式CBC。 CBC使用密码和salt(起扰乱作用)按固定算法(md5)产生key和iv。然后用key和iv(初始向量,加密第一块明文)加密(明文)和解密(密文)。 :copyright: (c) 2017 by Mr.tao. :license: MIT, see LICENSE for more details. """ from Crypto.Cipher import AES from binascii import b2a_...
28.431818
80
0.6251
from Crypto.Cipher import AES from binascii import b2a_hex, a2b_hex from config import SYSTEM class CBC(): def __init__(self): self.key = SYSTEM["AES_CBC_KEY"] self.mode = AES.MODE_CBC def encrypt(self, text): cryptor = AES.new(self.key, self.mode, self.key) ...
true
true
f76e8c0816e0732209dd45d0b04e05b55b084888
377
py
Python
Ejercicio/Ejercicio6.py
tavo1599/F.P2021
a592804fb5ae30da55551d9e29819887919db041
[ "Apache-2.0" ]
1
2021-05-05T19:39:37.000Z
2021-05-05T19:39:37.000Z
Ejercicio/Ejercicio6.py
tavo1599/F.P2021
a592804fb5ae30da55551d9e29819887919db041
[ "Apache-2.0" ]
null
null
null
Ejercicio/Ejercicio6.py
tavo1599/F.P2021
a592804fb5ae30da55551d9e29819887919db041
[ "Apache-2.0" ]
null
null
null
#Datos de entrada numE=float(input("Ingrese el numero de estudiantes a realizar el viaje:")) #Proceso if numE>100: print("El pasaje por alumno es de $20.00") elif numE>=50 and numE<=100: print("El pasaje por estudiante es de $35.00") elif numE>=20 and numE<50: print("El pasaje por estudiante es de $40.00") elif n...
31.416667
74
0.713528
numE=float(input("Ingrese el numero de estudiantes a realizar el viaje:")) if numE>100: print("El pasaje por alumno es de $20.00") elif numE>=50 and numE<=100: print("El pasaje por estudiante es de $35.00") elif numE>=20 and numE<50: print("El pasaje por estudiante es de $40.00") elif numE<20: print("El pasaje ...
true
true
f76e8c43f9f72682b96e9f0d61486a8847037b7e
88,512
py
Python
tests/test_ms.py
popsim-consortium/demes
ee43e396217dfcb833e9ccfdf449a21de770d781
[ "ISC" ]
4
2020-07-17T17:17:40.000Z
2020-11-17T22:14:28.000Z
tests/test_ms.py
grahamgower/demes
4fca50b23f82436e026490b5e7c30abf51dd3ba2
[ "ISC" ]
127
2020-07-17T20:14:28.000Z
2020-11-27T08:42:34.000Z
tests/test_ms.py
popsim-consortium/demes
ee43e396217dfcb833e9ccfdf449a21de770d781
[ "ISC" ]
5
2020-07-17T19:41:28.000Z
2020-11-25T15:42:56.000Z
import collections import math import pathlib import pytest import tempfile import demes from demes import ms import tests def N_ref(*, theta, mu, length): """ Calculate N0 reference size for an ms command. """ return theta / (4 * mu * length) def N_ref_macs(*, theta, mu): """ Calculate N0 ...
40.583219
88
0.51454
import collections import math import pathlib import pytest import tempfile import demes from demes import ms import tests def N_ref(*, theta, mu, length): return theta / (4 * mu * length) def N_ref_macs(*, theta, mu): return theta / (4 * mu) class TestFromMs: def test_ignored_options_have_no_effect(...
true
true
f76e8ca4ef2931ba10f394b62f00d9eb0b684d8c
201
py
Python
archive/testing/test_bloom.py
iphilpot/DoE_Bloom_Filter
bb3c60a9679c853510233480e8876364c147838b
[ "MIT" ]
1
2019-06-06T23:17:18.000Z
2019-06-06T23:17:18.000Z
archive/testing/test_bloom.py
iphilpot/DoE_Bloom_Filter
bb3c60a9679c853510233480e8876364c147838b
[ "MIT" ]
null
null
null
archive/testing/test_bloom.py
iphilpot/DoE_Bloom_Filter
bb3c60a9679c853510233480e8876364c147838b
[ "MIT" ]
null
null
null
#!/usr/bin/env python import unittest import bloom class BloomTest(unittest.TestCase): def test_fun(self): self.assertEqual(bloom.fun(3), 4) if __name__ == '__main__': unittest.main()
20.1
41
0.696517
import unittest import bloom class BloomTest(unittest.TestCase): def test_fun(self): self.assertEqual(bloom.fun(3), 4) if __name__ == '__main__': unittest.main()
true
true
f76e8d4ddd71115a8463e7e98b45af281d5c2e93
2,580
py
Python
gryphon/tests/logic/models/trade_test.py
qiquanzhijia/gryphon
7bb2c646e638212bd1352feb1b5d21536a5b918d
[ "Apache-2.0" ]
1,109
2019-06-20T19:23:27.000Z
2022-03-20T14:03:43.000Z
gryphon/tests/logic/models/trade_test.py
qiquanzhijia/gryphon
7bb2c646e638212bd1352feb1b5d21536a5b918d
[ "Apache-2.0" ]
63
2019-06-21T05:36:17.000Z
2021-05-26T21:08:15.000Z
gryphon/tests/logic/models/trade_test.py
qiquanzhijia/gryphon
7bb2c646e638212bd1352feb1b5d21536a5b918d
[ "Apache-2.0" ]
181
2019-06-20T19:42:05.000Z
2022-03-21T13:05:13.000Z
import pyximport; pyximport.install() import gryphon.lib; gryphon.lib.prepare() import os import unittest import sure import mock from decimal import Decimal from gryphon.lib.money import Money from gryphon.lib.exchange.consts import Consts from gryphon.lib.models.trade import Trade import logging logger = logging.g...
37.391304
94
0.673643
import pyximport; pyximport.install() import gryphon.lib; gryphon.lib.prepare() import os import unittest import sure import mock from decimal import Decimal from gryphon.lib.money import Money from gryphon.lib.exchange.consts import Consts from gryphon.lib.models.trade import Trade import logging logger = logging.g...
true
true
f76e8da74a54adfa78448a92dc07b047c621ad68
8,320
py
Python
benchmark/pyg/model.py
sangyx/graph-tricks
618bea55e221a9a3caedbe73aaa584303e583a98
[ "MIT" ]
null
null
null
benchmark/pyg/model.py
sangyx/graph-tricks
618bea55e221a9a3caedbe73aaa584303e583a98
[ "MIT" ]
null
null
null
benchmark/pyg/model.py
sangyx/graph-tricks
618bea55e221a9a3caedbe73aaa584303e583a98
[ "MIT" ]
null
null
null
import torch import torch.nn as nn from torch_geometric.nn import MessagePassing import torch.nn.functional as F from torch_geometric.nn import global_mean_pool, GCNConv, SAGEConv from torch_geometric.utils import degree from ogb.graphproppred.mol_encoder import AtomEncoder, BondEncoder ### GIN convolution along the ...
33.28
162
0.621034
import torch import torch.nn as nn from torch_geometric.nn import MessagePassing import torch.nn.functional as F from torch_geometric.nn import global_mean_pool, GCNConv, SAGEConv from torch_geometric.utils import degree from ogb.graphproppred.mol_encoder import AtomEncoder, BondEncoder class EGINConv(MessagePassing)...
true
true
f76e8dcf8628320c8ed9d3b697a62e84ac514c12
6,226
py
Python
CodeAnalysis/SourceMeter_Interface/SourceMeter-8.2.0-x64-linux/Python/Demo/ceilometer/ceilometer/event/trait_plugins.py
ishtjot/susereumutep
56e20c1777e0c938ac42bd8056f84af9e0b76e46
[ "Apache-2.0" ]
2
2018-11-07T20:52:53.000Z
2019-10-20T15:57:01.000Z
CodeAnalysis/SourceMeter_Interface/SourceMeter-8.2.0-x64-linux/Python/Demo/ceilometer/ceilometer/event/trait_plugins.py
ishtjot/susereumutep
56e20c1777e0c938ac42bd8056f84af9e0b76e46
[ "Apache-2.0" ]
3
2021-12-14T20:57:54.000Z
2022-01-21T23:50:36.000Z
CodeAnalysis/SourceMeter_Interface/SourceMeter-8.2.0-x64-linux/Python/Demo/ceilometer/ceilometer/event/trait_plugins.py
ishtjot/susereumutep
56e20c1777e0c938ac42bd8056f84af9e0b76e46
[ "Apache-2.0" ]
2
2018-11-16T04:20:06.000Z
2019-03-28T23:49:13.000Z
# # Copyright 2013 Rackspace Hosting. # # Author: Monsyne Dragon <mdragon@rackspace.com> # # 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/LICEN...
38.432099
78
0.537424
import abc import six @six.add_metaclass(abc.ABCMeta) class TraitPluginBase(object): def __init__(self, **kw): super(TraitPluginBase, self).__init__() @abc.abstractmethod def trait_value(self, match_list): class SplitterTraitPlugin(TraitPluginBase): def __init__(self, se...
true
true
f76e8df1fc9c8d185ab0ea82792f487d3ce6f3c7
399
py
Python
oledb_runner.py
thinkAmi-sandbox/python_ms_access_sample
c0e2c270cb4ff1be8812e9742ba226695d5c8767
[ "Unlicense" ]
1
2020-08-29T03:45:26.000Z
2020-08-29T03:45:26.000Z
oledb_runner.py
thinkAmi-sandbox/python_ms_access_sample
c0e2c270cb4ff1be8812e9742ba226695d5c8767
[ "Unlicense" ]
null
null
null
oledb_runner.py
thinkAmi-sandbox/python_ms_access_sample
c0e2c270cb4ff1be8812e9742ba226695d5c8767
[ "Unlicense" ]
null
null
null
import adodbapi import config def main(): con_str = 'Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};'.format(config.PATH_ACCDB) conn = adodbapi.connect(con_str) cur = conn.cursor() cur.execute("select item_name from item") for c in cur.fetchall(): print(c[0]) #=> `ringo`, `みかん ...
23.470588
92
0.611529
import adodbapi import config def main(): con_str = 'Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};'.format(config.PATH_ACCDB) conn = adodbapi.connect(con_str) cur = conn.cursor() cur.execute("select item_name from item") for c in cur.fetchall(): print(c[0]) cur.close(...
true
true
f76e8e065863e366abd123dbf21989d0effc8d3c
771
py
Python
example13-CNC/bot1.py
PacktPublishing/Python-Ethical-Hacking
a2aaf2dd2ba86535b6884ad4089d94594b9dc54a
[ "MIT" ]
39
2021-04-19T05:14:23.000Z
2022-03-29T03:08:21.000Z
example13-CNC/bot1.py
PacktPublishing/Python-Ethical-Hacking
a2aaf2dd2ba86535b6884ad4089d94594b9dc54a
[ "MIT" ]
null
null
null
example13-CNC/bot1.py
PacktPublishing/Python-Ethical-Hacking
a2aaf2dd2ba86535b6884ad4089d94594b9dc54a
[ "MIT" ]
26
2021-04-11T08:46:51.000Z
2022-03-22T06:04:21.000Z
import socket if __name__ == "__main__": print("[+] Connecting with server") s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(("192.168.0.11", 8085)) run_bot = True while run_bot: communicate_bot = True while communicate_bot: msg = s.recv(1024) ...
29.653846
62
0.521401
import socket if __name__ == "__main__": print("[+] Connecting with server") s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(("192.168.0.11", 8085)) run_bot = True while run_bot: communicate_bot = True while communicate_bot: msg = s.recv(1024) ...
true
true
f76e8e8467edb4401c922c0501f659ab13617b00
10,386
py
Python
homeassistant/components/minecraft_server/__init__.py
edofullin/core
106dc4d28ad59cb192c60fc7a354cafa86899ea4
[ "Apache-2.0" ]
1
2021-03-23T07:20:03.000Z
2021-03-23T07:20:03.000Z
homeassistant/components/minecraft_server/__init__.py
edofullin/core
106dc4d28ad59cb192c60fc7a354cafa86899ea4
[ "Apache-2.0" ]
60
2020-07-06T15:10:30.000Z
2022-03-31T06:01:46.000Z
homeassistant/components/minecraft_server/__init__.py
edofullin/core
106dc4d28ad59cb192c60fc7a354cafa86899ea4
[ "Apache-2.0" ]
4
2017-01-10T04:17:33.000Z
2021-09-02T16:37:24.000Z
"""The Minecraft Server integration.""" from __future__ import annotations import asyncio from datetime import datetime, timedelta import logging from typing import Any from mcstatus.server import MinecraftServer as MCStatus from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_HO...
34.504983
95
0.633353
from __future__ import annotations import asyncio from datetime import datetime, timedelta import logging from typing import Any from mcstatus.server import MinecraftServer as MCStatus from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_HOST, CONF_NAME, CONF_PORT from homeassist...
true
true
f76e8f8dc7eb6336ca60f32a1a2c6d3a86a7ae3b
8,899
py
Python
iclientpy/iclientpy/dtojson/__init__.py
SuperMap/iClientPython
5e741c1efda9b12d321909428bd5c95e22482ea7
[ "Apache-2.0" ]
28
2018-04-19T07:11:34.000Z
2022-02-24T08:31:08.000Z
iclientpy/iclientpy/dtojson/__init__.py
SuperMap/iClientPython
5e741c1efda9b12d321909428bd5c95e22482ea7
[ "Apache-2.0" ]
3
2019-05-06T07:58:45.000Z
2020-11-18T21:16:38.000Z
iclientpy/iclientpy/dtojson/__init__.py
SuperMap/iClientPython
5e741c1efda9b12d321909428bd5c95e22482ea7
[ "Apache-2.0" ]
8
2018-06-14T02:29:53.000Z
2020-11-03T01:36:35.000Z
import json import typing from enum import Enum import importlib __all__ = [ 'to_json_str', 'deserializer', 'ByFieldValueParserSwitcher', 'parser', 'AbstractTypeParserSwitcher', 'register' ] primitive_types = (int, str, bool, float) type_parser_map = {} def register(clz: type, parser_clz, force: bo...
31.556738
160
0.627037
import json import typing from enum import Enum import importlib __all__ = [ 'to_json_str', 'deserializer', 'ByFieldValueParserSwitcher', 'parser', 'AbstractTypeParserSwitcher', 'register' ] primitive_types = (int, str, bool, float) type_parser_map = {} def register(clz: type, parser_clz, force: bo...
true
true
f76e8ff1b919a34a90deb3fa49d580935f00d483
8,787
py
Python
pysecurityspy/server.py
briis/pysecurityspy
803933afa4f24f815c259fb473206d411435bc94
[ "MIT" ]
1
2021-02-11T21:02:20.000Z
2021-02-11T21:02:20.000Z
pysecurityspy/server.py
briis/pysecurityspy
803933afa4f24f815c259fb473206d411435bc94
[ "MIT" ]
null
null
null
pysecurityspy/server.py
briis/pysecurityspy
803933afa4f24f815c259fb473206d411435bc94
[ "MIT" ]
null
null
null
"""Module to communicate with the SecuritySpy API.""" import logging import asyncio import sys import xml.etree.ElementTree as ET from typing import Optional from aiohttp import ClientSession, ClientTimeout from aiohttp.client_exceptions import ClientError from base64 import b64encode from pysecurityspy.const import ...
37.712446
166
0.544327
import logging import asyncio import sys import xml.etree.ElementTree as ET from typing import Optional from aiohttp import ClientSession, ClientTimeout from aiohttp.client_exceptions import ClientError from base64 import b64encode from pysecurityspy.const import ( DEFAULT_TIMEOUT, RECORDING_MODE_ALWAYS, ...
true
true
f76e91726bd86917c02bb07052d4f23001e57241
1,000
py
Python
Missions_to_Mars/app.py
Ivanpalalia/web-scraping-challenge
42caf4b9b8da186999e91d1ec44bbe7a3e81395f
[ "ADSL" ]
null
null
null
Missions_to_Mars/app.py
Ivanpalalia/web-scraping-challenge
42caf4b9b8da186999e91d1ec44bbe7a3e81395f
[ "ADSL" ]
null
null
null
Missions_to_Mars/app.py
Ivanpalalia/web-scraping-challenge
42caf4b9b8da186999e91d1ec44bbe7a3e81395f
[ "ADSL" ]
null
null
null
from flask import Flask, render_template, redirect from flask_pymongo import PyMongo import scrape_mars # Create an instance of Flask app = Flask(__name__) # Use PyMongo to establish Mongo connection app.config["MONGO_URI"] = "mongodb://localhost:27017/mars_app" mongo = PyMongo(app) # Route to render index.html te...
25
76
0.738
from flask import Flask, render_template, redirect from flask_pymongo import PyMongo import scrape_mars app = Flask(__name__) app.config["MONGO_URI"] = "mongodb://localhost:27017/mars_app" mongo = PyMongo(app) @app.route("/") def home(): destination_data = mongo.db.collection.find_one() return re...
true
true
f76e91ea826b119a3a03a3aeb2469283566f0274
535
py
Python
cmp_command_acceptor/app/controllers/implementations/MessageHolder.py
andrii-z4i/xmind-telegram
82e50ae0ada048b87a2c082bbdd4510e02cb3694
[ "MIT" ]
null
null
null
cmp_command_acceptor/app/controllers/implementations/MessageHolder.py
andrii-z4i/xmind-telegram
82e50ae0ada048b87a2c082bbdd4510e02cb3694
[ "MIT" ]
16
2018-05-07T09:42:56.000Z
2018-11-19T06:05:51.000Z
cmp_command_acceptor/app/controllers/implementations/MessageHolder.py
andrii-z4i/xmind-telegram
82e50ae0ada048b87a2c082bbdd4510e02cb3694
[ "MIT" ]
null
null
null
import app.controllers.interfaces as interfaces class MessageHolder(interfaces.MessageHolder): def __init__(self, event): self.items = [] self.event = event @property def isEmpty(self): return self.items == [] is_empty = isEmpty def put(self, item): self.items.ins...
21.4
47
0.596262
import app.controllers.interfaces as interfaces class MessageHolder(interfaces.MessageHolder): def __init__(self, event): self.items = [] self.event = event @property def isEmpty(self): return self.items == [] is_empty = isEmpty def put(self, item): self.items.ins...
true
true
f76e91ff352a9096f8c94778d34c12be1acb8fff
6,887
py
Python
little_questions/models/__init__.py
OpenJarbas/little_questions
c1ae7634856521ff6315e8f22c6d198604718916
[ "MIT" ]
6
2019-12-13T04:14:08.000Z
2022-01-16T06:27:17.000Z
little_questions/models/__init__.py
OpenJarbas/little_questions
c1ae7634856521ff6315e8f22c6d198604718916
[ "MIT" ]
1
2020-02-28T11:21:46.000Z
2020-03-06T17:28:07.000Z
little_questions/models/__init__.py
OpenJarbas/little_questions
c1ae7634856521ff6315e8f22c6d198604718916
[ "MIT" ]
3
2020-08-16T16:38:49.000Z
2021-04-27T16:44:56.000Z
import pickle from os.path import join, isfile import JarbasModelZoo import nltk import requests from JarbasModelZoo import LOG from xdg import BaseDirectory as XDG MODEL2URL = { "questions52_EN": "https://github.com/OpenJarbas/little_questions/releases/download/0.7.0a1/questions52_svm_EN_0.7.0a1.pkl", ...
38.47486
121
0.676637
import pickle from os.path import join, isfile import JarbasModelZoo import nltk import requests from JarbasModelZoo import LOG from xdg import BaseDirectory as XDG MODEL2URL = { "questions52_EN": "https://github.com/OpenJarbas/little_questions/releases/download/0.7.0a1/questions52_svm_EN_0.7.0a1.pkl", ...
true
true
f76e92580604c23c81fce819af679c5ffd97bc62
21,692
py
Python
electrum/gui/kivy/uix/screens.py
ZenyattaAbosom/AbosomElectrum
02748b0b14e37385d6e77591d122e592740222bf
[ "MIT" ]
4
2020-06-27T22:43:34.000Z
2021-04-12T02:29:30.000Z
electrum/gui/kivy/uix/screens.py
ZenyattaAbosom/AbosomElectrum
02748b0b14e37385d6e77591d122e592740222bf
[ "MIT" ]
21
2020-06-20T15:02:50.000Z
2021-04-07T10:14:59.000Z
electrum/gui/kivy/uix/screens.py
ZenyattaAbosom/AbosomElectrum
02748b0b14e37385d6e77591d122e592740222bf
[ "MIT" ]
13
2020-06-28T08:13:28.000Z
2021-12-28T00:11:56.000Z
import asyncio from weakref import ref from decimal import Decimal import re import threading import traceback, sys from typing import TYPE_CHECKING, List, Optional from kivy.app import App from kivy.cache import Cache from kivy.clock import Clock from kivy.compat import string_types from kivy.properties import (Objec...
35.32899
157
0.600913
import asyncio from weakref import ref from decimal import Decimal import re import threading import traceback, sys from typing import TYPE_CHECKING, List, Optional from kivy.app import App from kivy.cache import Cache from kivy.clock import Clock from kivy.compat import string_types from kivy.properties import (Objec...
true
true
f76e92ef353b4bbc07977806b95b9549e9c7b572
5,053
py
Python
__main__.py
JeanTR20/SeleccionEstudiante
501a3de46ca0cb922f2699218bcd467414b45871
[ "MIT" ]
null
null
null
__main__.py
JeanTR20/SeleccionEstudiante
501a3de46ca0cb922f2699218bcd467414b45871
[ "MIT" ]
null
null
null
__main__.py
JeanTR20/SeleccionEstudiante
501a3de46ca0cb922f2699218bcd467414b45871
[ "MIT" ]
null
null
null
from src.modelo.Asignatura import Asignatura from src.modelo.Profesor import Profesor from src.modelo.Estudiante import Estudiante, Escala from src.modelo.declarative_base import Session, engine, Base from src.logica.coleccion import Coleccion def anadir_estudiante (nombre , ciclo , apellido , escala) : # Crea la ...
37.154412
129
0.664754
from src.modelo.Asignatura import Asignatura from src.modelo.Profesor import Profesor from src.modelo.Estudiante import Estudiante, Escala from src.modelo.declarative_base import Session, engine, Base from src.logica.coleccion import Coleccion def anadir_estudiante (nombre , ciclo , apellido , escala) : Base.me...
true
true
f76e931a332150337f24e5a44864ea7cc1375954
507
py
Python
LeetCode/Python/median_of_two_sorted_arrays.py
tejeshreddy/competitive-programming
e98d3800c7f1dcca285286cac1ac056b11201e12
[ "MIT" ]
null
null
null
LeetCode/Python/median_of_two_sorted_arrays.py
tejeshreddy/competitive-programming
e98d3800c7f1dcca285286cac1ac056b11201e12
[ "MIT" ]
null
null
null
LeetCode/Python/median_of_two_sorted_arrays.py
tejeshreddy/competitive-programming
e98d3800c7f1dcca285286cac1ac056b11201e12
[ "MIT" ]
null
null
null
""" Title: 0004 - Median of Two Sorted Arrays Tags: Array Time: O(log(min(m, n))) Space: O(n) Source: https://leetcode.com/problems/median-of-two-sorted-arrays/ Difficulty: Hard """ class Solution: def findMedianSortedArrays(self, nums1: List[int], nums2: List[int]) -> float: nums1.extend(nums2) nu...
26.684211
82
0.601578
class Solution: def findMedianSortedArrays(self, nums1: List[int], nums2: List[int]) -> float: nums1.extend(nums2) nums1.sort() if len(nums1) % 2 == 0: return (nums1[int(len(nums1)/2)-1] + nums1[int(len(nums1)/2)])/2 else: return nums1[int(len(nums1)...
true
true
f76e9356f59603e75c3d7590f9f9fcc7913c0200
6,824
py
Python
samples/sdk/video_search_samples.py
WMRamadan/bing-search-sdk-for-python
276d9cd6963c939081b3dec91bdd9aded42b3b35
[ "MIT" ]
12
2021-03-11T20:24:12.000Z
2022-02-10T22:55:03.000Z
samples/sdk/video_search_samples.py
WMRamadan/bing-search-sdk-for-python
276d9cd6963c939081b3dec91bdd9aded42b3b35
[ "MIT" ]
null
null
null
samples/sdk/video_search_samples.py
WMRamadan/bing-search-sdk-for-python
276d9cd6963c939081b3dec91bdd9aded42b3b35
[ "MIT" ]
10
2021-03-09T17:02:48.000Z
2022-02-12T18:40:01.000Z
import os from video_search_client import VideoSearchClient from video_search_client.models import VideoPricing, VideoLength, VideoResolution, VideoInsightModule from azure.core.credentials import AzureKeyCredential SUBSCRIPTION_KEY = None ENDPOINT = "https://api.bing.microsoft.com"+ "/v7.0/" def video_search(subsc...
40.141176
174
0.631594
import os from video_search_client import VideoSearchClient from video_search_client.models import VideoPricing, VideoLength, VideoResolution, VideoInsightModule from azure.core.credentials import AzureKeyCredential SUBSCRIPTION_KEY = None ENDPOINT = "https://api.bing.microsoft.com"+ "/v7.0/" def video_search(subsc...
true
true
f76e95253379a9a7539bbb50cad6b7e5ae48256e
333
py
Python
Chapter18/18-4/create_deployment.py
boriphuth/Getting-Started-with-Containerization
4f7e41a7a44119cc6b657da10526b757ff34cfae
[ "MIT" ]
25
2018-05-31T11:58:51.000Z
2021-12-31T01:48:41.000Z
Chapter08/8-4/create_deployment.py
PacktPublishing/Kubernetes-Cookbook-Second-Edition
96258aa596a9fd25b5832d067c3b6b1ef8c34c8f
[ "MIT" ]
null
null
null
Chapter08/8-4/create_deployment.py
PacktPublishing/Kubernetes-Cookbook-Second-Edition
96258aa596a9fd25b5832d067c3b6b1ef8c34c8f
[ "MIT" ]
35
2018-10-07T11:34:39.000Z
2021-12-13T12:51:05.000Z
from kubernetes import client, config import json config.load_kube_config() resource_config = json.load(open("./nginx-deployment.json")) api_instance = client.AppsV1Api() response = api_instance.create_namespaced_deployment(body=resource_config, namespace="default") print("add new deployment, status={}".format(respon...
30.272727
95
0.801802
from kubernetes import client, config import json config.load_kube_config() resource_config = json.load(open("./nginx-deployment.json")) api_instance = client.AppsV1Api() response = api_instance.create_namespaced_deployment(body=resource_config, namespace="default") print("add new deployment, status={}".format(respon...
true
true
f76e9549f0d35549927c35a51e926c27ea5ef406
2,578
py
Python
ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/service_check.py
mkozinenko/ambari
9cfe9559420a1f4af89a2d645af84b1ab20d6737
[ "Apache-2.0", "MIT" ]
null
null
null
ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/service_check.py
mkozinenko/ambari
9cfe9559420a1f4af89a2d645af84b1ab20d6737
[ "Apache-2.0", "MIT" ]
null
null
null
ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/service_check.py
mkozinenko/ambari
9cfe9559420a1f4af89a2d645af84b1ab20d6737
[ "Apache-2.0", "MIT" ]
null
null
null
#!/usr/bin/env python """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License");...
42.966667
193
0.752521
from resource_management.libraries.script.script import Script from resource_management.libraries.functions.validate import call_and_match_output from resource_management.libraries.functions.format import format from resource_management.core.logger import Logger class ServiceCheck(Script): def service_check(self, en...
true
true
f76e96e6436cfb0805c9cc9c3bd93e3fdbcb9b36
1,206
py
Python
tensorflow_io/cifar/__init__.py
rjpower/tensorflow-io
39aa0b46cfaa403121fdddbd491a03d2f3190a87
[ "Apache-2.0" ]
10
2019-04-19T01:21:09.000Z
2021-11-17T11:25:52.000Z
tensorflow_io/cifar/__init__.py
rjpower/tensorflow-io
39aa0b46cfaa403121fdddbd491a03d2f3190a87
[ "Apache-2.0" ]
null
null
null
tensorflow_io/cifar/__init__.py
rjpower/tensorflow-io
39aa0b46cfaa403121fdddbd491a03d2f3190a87
[ "Apache-2.0" ]
2
2019-04-25T14:31:06.000Z
2019-06-25T03:47:34.000Z
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
33.5
80
0.742952
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow_io.cifar.python.ops.cifar_ops import CIFAR10Dataset from tensorflow_io.cifar.python.ops.cifar_ops import CIFAR100Dataset from tensorflow.python.util.all_util import remove_undocumented _allow...
true
true
f76e972b2c2c69dd3bbbf37d7f90f708d535fd9f
54
py
Python
hanibal/pg1__notas_credito_cliente/models/__init__.py
Christian-Castro/castro_odoo8
8247fdb20aa39e043b6fa0c4d0af509462ab3e00
[ "Unlicense" ]
null
null
null
hanibal/pg1__notas_credito_cliente/models/__init__.py
Christian-Castro/castro_odoo8
8247fdb20aa39e043b6fa0c4d0af509462ab3e00
[ "Unlicense" ]
null
null
null
hanibal/pg1__notas_credito_cliente/models/__init__.py
Christian-Castro/castro_odoo8
8247fdb20aa39e043b6fa0c4d0af509462ab3e00
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- import nota_credito_proveedor
18
29
0.703704
import nota_credito_proveedor
true
true
f76e97a69d518ec11f2196f391d81f0973e5cad5
2,701
py
Python
pics/test.py
sam2020-4/Gallery-prj
0518d460f8ce038d2e3e86e6ad6d6f846fd531e3
[ "MIT" ]
null
null
null
pics/test.py
sam2020-4/Gallery-prj
0518d460f8ce038d2e3e86e6ad6d6f846fd531e3
[ "MIT" ]
null
null
null
pics/test.py
sam2020-4/Gallery-prj
0518d460f8ce038d2e3e86e6ad6d6f846fd531e3
[ "MIT" ]
null
null
null
from django.test import TestCase from .models import Image,Category,Location class CategoryTestClass(TestCase): def setUp(self): self.category_name = Category(category_name='FOOD') self.category_name.save() def tearDown(self): category_name.objects.all().delete() def test_instanc...
32.154762
178
0.671973
from django.test import TestCase from .models import Image,Category,Location class CategoryTestClass(TestCase): def setUp(self): self.category_name = Category(category_name='FOOD') self.category_name.save() def tearDown(self): category_name.objects.all().delete() def test_instanc...
true
true
f76e98912e66c29fe99c3dccdd1a6fd0f4bd9f23
1,108
py
Python
models/Session.py
DanielAlao/Collab-Panopto
43e2cb2434df78adc9fa9b930241280966b7cb03
[ "BSD-3-Clause" ]
3
2020-12-10T11:17:34.000Z
2021-06-18T13:17:30.000Z
models/Session.py
DanielAlao/Collab-Panopto
43e2cb2434df78adc9fa9b930241280966b7cb03
[ "BSD-3-Clause" ]
1
2021-05-14T22:50:20.000Z
2021-05-14T22:50:20.000Z
models/Session.py
DanielAlao/Collab-Panopto
43e2cb2434df78adc9fa9b930241280966b7cb03
[ "BSD-3-Clause" ]
8
2020-11-11T14:57:18.000Z
2022-02-10T16:21:08.000Z
import datetime class Session(): def __init__(self, name, description, survey_url): self.sessionJson = { "createdTimezone" : "America/New_York", "allowInSessionInvitees": 'true', "guestRole": "presenter", "openChair": 'true', "sessionExitUrl": s...
33.575758
92
0.520758
import datetime class Session(): def __init__(self, name, description, survey_url): self.sessionJson = { "createdTimezone" : "America/New_York", "allowInSessionInvitees": 'true', "guestRole": "presenter", "openChair": 'true', "sessionExitUrl": s...
true
true
f76e989173e7d31050f57b7f4afbded23c833c7c
23,008
py
Python
indoorplants/analysis/wrangle.py
lermana/indoorplants
c557fdb973442533487ed3803f4c72a2645607a3
[ "MIT" ]
4
2019-03-08T21:00:45.000Z
2019-10-05T14:49:23.000Z
indoorplants/analysis/wrangle.py
lermana/modeling
c557fdb973442533487ed3803f4c72a2645607a3
[ "MIT" ]
37
2018-12-05T18:19:22.000Z
2020-07-10T19:34:27.000Z
indoorplants/analysis/wrangle.py
lermana/modeling
c557fdb973442533487ed3803f4c72a2645607a3
[ "MIT" ]
2
2019-05-08T01:07:34.000Z
2019-07-07T19:19:38.000Z
import pandas as pd def get_clean_df_index(df): if isinstance(df.index, pd.core.index.MultiIndex): return df.index.remove_unused_levels() else: return df.index def get_feature_size_by_class(df, class_col, features, normalize="class"): """ Given pandas.DataFrame, class column name, an...
32.868571
83
0.612526
import pandas as pd def get_clean_df_index(df): if isinstance(df.index, pd.core.index.MultiIndex): return df.index.remove_unused_levels() else: return df.index def get_feature_size_by_class(df, class_col, features, normalize="class"): if isinstance(features, str): features = [fea...
true
true
f76e98f70948ac4990a20f6eaaa8a3834d95a5df
10,151
py
Python
configs/future/htc_x101_32x4d_fpn_4x_gcb_dcn_mst_largermask_fp16.py
zehuichen123/mmdet2.0
a491935af7b9e42ded1e44045b550171fec76deb
[ "Apache-2.0" ]
null
null
null
configs/future/htc_x101_32x4d_fpn_4x_gcb_dcn_mst_largermask_fp16.py
zehuichen123/mmdet2.0
a491935af7b9e42ded1e44045b550171fec76deb
[ "Apache-2.0" ]
null
null
null
configs/future/htc_x101_32x4d_fpn_4x_gcb_dcn_mst_largermask_fp16.py
zehuichen123/mmdet2.0
a491935af7b9e42ded1e44045b550171fec76deb
[ "Apache-2.0" ]
null
null
null
# model settings fp16 = dict(loss_scale=512.) model = dict( type='HybridTaskCascade', pretrained='/mnt/truenas/scratch/czh/others/pretrain_models/resnext101_32x4d-a5af3160.pth', backbone=dict( type='ResNeXt', depth=101, groups=32, base_width=4, num_stages=4, o...
32.745161
95
0.514728
fp16 = dict(loss_scale=512.) model = dict( type='HybridTaskCascade', pretrained='/mnt/truenas/scratch/czh/others/pretrain_models/resnext101_32x4d-a5af3160.pth', backbone=dict( type='ResNeXt', depth=101, groups=32, base_width=4, num_stages=4, out_indices=(0, 1,...
true
true
f76e994bb1c1cf19cd1bce28a260dfa556fbf34e
1,275
py
Python
test.py
mozillazg/f
82b33b9d38d90d974deb01b79cb01b149fe2488f
[ "MIT" ]
1
2017-01-13T03:47:05.000Z
2017-01-13T03:47:05.000Z
test.py
mozillazg/f
82b33b9d38d90d974deb01b79cb01b149fe2488f
[ "MIT" ]
null
null
null
test.py
mozillazg/f
82b33b9d38d90d974deb01b79cb01b149fe2488f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import pytest import f test_cases = ( ('', None, ''), ('', {'a': 5}, ''), ('a', None, 'a'), ('a', {'a': 5}, 'a'), ('#{a}', None, '2'), ('hello #{a}', None, 'hello 2'), ('#{a} hello', None, '2 hello'), ('hello #{a} world', None, 'hello 2 world'), ('#{a}', {'...
29.651163
68
0.39451
import pytest import f test_cases = ( ('', None, ''), ('', {'a': 5}, ''), ('a', None, 'a'), ('a', {'a': 5}, 'a'), ('#{a}', None, '2'), ('hello #{a}', None, 'hello 2'), ('#{a} hello', None, '2 hello'), ('hello #{a} world', None, 'hello 2 world'), ('#{a}', {'a': 5}, '5'), ('#{a ...
true
true
f76e995c665dfa0b569fe0e8215915dfe057bbd9
8,175
py
Python
matdeeplearn/models/super_mpnn.py
usccolumbia/deeperGATGNN
24ee53b23d1559040b7aab971768434753b582ff
[ "MIT" ]
19
2021-09-29T20:32:50.000Z
2022-02-22T11:32:18.000Z
matdeeplearn/models/super_mpnn.py
usccolumbia/deeperGATGNN
24ee53b23d1559040b7aab971768434753b582ff
[ "MIT" ]
1
2021-11-23T07:37:50.000Z
2021-11-23T07:37:50.000Z
matdeeplearn/models/super_mpnn.py
usccolumbia/deeperGATGNN
24ee53b23d1559040b7aab971768434753b582ff
[ "MIT" ]
2
2021-09-30T10:18:37.000Z
2022-01-30T01:08:05.000Z
import torch from torch import Tensor import torch.nn.functional as F from torch.nn import Sequential, Linear, ReLU, BatchNorm1d, GRU import torch_geometric from torch_geometric.nn import ( Set2Set, global_mean_pool, global_add_pool, global_max_pool, NNConv, DiffGroupNorm ) from tor...
39.302885
192
0.518043
import torch from torch import Tensor import torch.nn.functional as F from torch.nn import Sequential, Linear, ReLU, BatchNorm1d, GRU import torch_geometric from torch_geometric.nn import ( Set2Set, global_mean_pool, global_add_pool, global_max_pool, NNConv, DiffGroupNorm ) from tor...
true
true
f76e9963e8e0fa29fdbfe41fcb7d31defa9c6184
4,527
py
Python
models/decoder.py
foocker/Image2Katex
775efd6a68168fe46572e5017a861321c342e623
[ "MIT" ]
3
2020-04-20T07:57:40.000Z
2021-11-19T13:20:24.000Z
models/decoder.py
tanglinjie0815/Image2Katex
775efd6a68168fe46572e5017a861321c342e623
[ "MIT" ]
null
null
null
models/decoder.py
tanglinjie0815/Image2Katex
775efd6a68168fe46572e5017a861321c342e623
[ "MIT" ]
1
2019-11-05T02:37:56.000Z
2019-11-05T02:37:56.000Z
''' Filename: decoder.py Project: models File Created: Wednesday, 11th July 2018 3:37:09 pm Author: xiaofeng (sxf1052566766@163.com) -------------------------- Last Modified: Sunday, 2nd December 2018 4:09:59 pm Modified By: xiaofeng (sxf1052566766@163.com) --------------------------- Copyright: 2018.06 - 2018 OnionMat...
48.159574
100
0.666667
from __future__ import division import tensorflow as tf from models.component.attention_cell_compile import AttCell from models.component.decoder_beamsearch import BeamSearchDecoderCell from models.component.decoder_dynamic import dynamic_decode from models.component.decoder_greedy import GreedyDecoderCell from tens...
true
true
f76e99940cb8a4ccc419a55cc3adf039438de521
588
py
Python
clickbay/migrations/0010_image_user.py
kilonzijnr/Click-Bay
4f69584127d5b5defbfb47a7de0e3b198843f9d7
[ "MIT" ]
null
null
null
clickbay/migrations/0010_image_user.py
kilonzijnr/Click-Bay
4f69584127d5b5defbfb47a7de0e3b198843f9d7
[ "MIT" ]
null
null
null
clickbay/migrations/0010_image_user.py
kilonzijnr/Click-Bay
4f69584127d5b5defbfb47a7de0e3b198843f9d7
[ "MIT" ]
null
null
null
# Generated by Django 3.2.9 on 2021-12-06 11:52 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('clickbay', '0009_remove_...
26.727273
124
0.676871
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('clickbay', '0009_remove_image_user'), ] operations = [ ...
true
true
f76e9a673a0f2deba304eb7bc1ed7c2503b7978f
31,693
py
Python
modules/templates/RMSAmericas/menus.py
flavour/RMS
1472859338690d15310743ed1d7a4092f4721f8d
[ "MIT" ]
null
null
null
modules/templates/RMSAmericas/menus.py
flavour/RMS
1472859338690d15310743ed1d7a4092f4721f8d
[ "MIT" ]
null
null
null
modules/templates/RMSAmericas/menus.py
flavour/RMS
1472859338690d15310743ed1d7a4092f4721f8d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from gluon import current from s3 import * from s3layouts import * try: from .layouts import * except ImportError: pass import s3menus as default RC = {"organisation_type.name" : "Red Cross / Red Crescent"} # ============================================================================...
41.866579
124
0.390591
from gluon import current from s3 import * from s3layouts import * try: from .layouts import * except ImportError: pass import s3menus as default RC = {"organisation_type.name" : "Red Cross / Red Crescent"} class S3MainMenu(default.S3MainMenu): @classmethod def menu(cls): main_m...
true
true
f76e9a750117b841074530945e5040b426a2a794
35,241
py
Python
tests/connection/test_arrayconnection.py
ptcfrontend/graphql-relay-py
e9122d3a9754fc866ce5da64d3ccc3003a7b70d2
[ "MIT" ]
124
2015-10-08T18:45:49.000Z
2022-02-15T01:51:28.000Z
tests/connection/test_arrayconnection.py
ptcfrontend/graphql-relay-py
e9122d3a9754fc866ce5da64d3ccc3003a7b70d2
[ "MIT" ]
40
2015-10-10T07:07:37.000Z
2022-01-28T13:54:20.000Z
tests/connection/test_arrayconnection.py
ptcfrontend/graphql-relay-py
e9122d3a9754fc866ce5da64d3ccc3003a7b70d2
[ "MIT" ]
35
2016-05-17T15:35:07.000Z
2022-01-25T07:24:08.000Z
from typing import cast, Sequence from pytest import deprecated_call, raises # type: ignore from graphql_relay import ( connection_from_array, connection_from_array_slice, cursor_for_object_in_connection, Connection, Edge, PageInfo, ) # noinspection PyProtectedMember from graphql_relay impor...
39.64117
87
0.521722
from typing import cast, Sequence from pytest import deprecated_call, raises from graphql_relay import ( connection_from_array, connection_from_array_slice, cursor_for_object_in_connection, Connection, Edge, PageInfo, ) from graphql_relay import connection_from_list, connection_from_list_sli...
true
true
f76e9c76e2889a5e302713c92474c9cc9f1882ec
1,914
py
Python
example/device.py
andrzejressel/tuya-iot-python-sdk
cbe628695b8adb966a333ff28f6f41653baa1e5f
[ "MIT" ]
null
null
null
example/device.py
andrzejressel/tuya-iot-python-sdk
cbe628695b8adb966a333ff28f6f41653baa1e5f
[ "MIT" ]
null
null
null
example/device.py
andrzejressel/tuya-iot-python-sdk
cbe628695b8adb966a333ff28f6f41653baa1e5f
[ "MIT" ]
1
2021-12-21T17:00:27.000Z
2021-12-21T17:00:27.000Z
import logging from env import ENDPOINT, ACCESS_ID, ACCESS_KEY, USERNAME, PASSWORD from tuya_iot import ( TuyaOpenAPI, AuthType, TuyaOpenMQ, TuyaDeviceManager, TuyaHomeManager, TuyaDeviceListener, TuyaDevice, TuyaTokenInfo, TUYA_LOGGER ) TUYA_LOGGER.setLevel(logging.DEBUG) # Init op...
26.583333
82
0.719436
import logging from env import ENDPOINT, ACCESS_ID, ACCESS_KEY, USERNAME, PASSWORD from tuya_iot import ( TuyaOpenAPI, AuthType, TuyaOpenMQ, TuyaDeviceManager, TuyaHomeManager, TuyaDeviceListener, TuyaDevice, TuyaTokenInfo, TUYA_LOGGER ) TUYA_LOGGER.setLevel(logging.DEBUG) openapi =...
true
true
f76e9cc6999d9dc5fe509a415753fd9713629267
12,077
py
Python
cif/atoms.py
dkratzert/FinalCif
07ca23dbb4e7439b108a906521a118cdb876d97e
[ "Beerware" ]
13
2020-01-14T16:23:48.000Z
2022-02-16T18:02:08.000Z
cif/atoms.py
dkratzert/FinalCif
07ca23dbb4e7439b108a906521a118cdb876d97e
[ "Beerware" ]
24
2021-04-21T05:30:42.000Z
2022-03-31T20:07:29.000Z
cif/atoms.py
dkratzert/FinalCif
07ca23dbb4e7439b108a906521a118cdb876d97e
[ "Beerware" ]
1
2021-08-09T16:48:33.000Z
2021-08-09T16:48:33.000Z
# ---------------------------------------------------------------------------- # "THE BEER-WARE LICENSE" (Revision 42): # Daniel Kratzert <dkratzert@gmx.de> wrote this file. As long as you retain # this notice you can do whatever you want with this stuff. If we meet some day, # and you think this stuff is wo...
19.230892
93
0.368138
import re num2element = { 0 : 'n', 1 : 'H', 2 : 'He', 3 : 'Li', 4 : 'Be', 5 : 'B', 6 : 'C', 7 : 'N', 8 : 'O', 9 : 'F', 10 : 'Ne', 11 : 'Na', 12 : 'Mg', 13 : 'Al', 14 : 'Si', 15 : 'P', 16 : 'S', 17 : 'Cl', 18 : 'Ar', 19 : 'K', ...
true
true
f76e9e26702f9209b8ffa0d661dbec1b6f1c3daf
1,553
py
Python
fineuploader/ajaxuploader/backends/base.py
bashu/django-photouploader
6ac5683a33fb248f5e92a51ec9c228f493cc618f
[ "BSD-3-Clause" ]
11
2018-09-30T18:27:52.000Z
2020-12-28T14:08:53.000Z
fineuploader/ajaxuploader/backends/base.py
bashu/django-photouploader
6ac5683a33fb248f5e92a51ec9c228f493cc618f
[ "BSD-3-Clause" ]
13
2018-04-09T11:25:56.000Z
2020-10-06T06:39:48.000Z
fineuploader/ajaxuploader/backends/base.py
bashu/django-photouploader
6ac5683a33fb248f5e92a51ec9c228f493cc618f
[ "BSD-3-Clause" ]
2
2018-04-27T19:29:41.000Z
2019-01-21T20:57:04.000Z
# -*- coding: utf-8 -*- class AbstractUploadBackend(object): BUFFER_SIZE = 10485760 # 10MB def __init__(self, **kwargs): self.__dict__.update(kwargs) def setup(self, request, filename, *args, **kwargs): """Responsible for doing any pre-processing needed before the upload starts....
36.97619
76
0.591114
class AbstractUploadBackend(object): BUFFER_SIZE = 10485760 def __init__(self, **kwargs): self.__dict__.update(kwargs) def setup(self, request, filename, *args, **kwargs): def update_filename(self, request, filename, *args, **kwargs): def upload_chunk(self, chunk, *args, **kwargs): ...
true
true
f76e9e591fc7557746b1021dfa9bfa25d1b77192
1,619
py
Python
dataset.py
tareknaous/visual-clustering
73ab04b560c72917ddb5ad69594afee59ebd44d7
[ "MIT" ]
19
2021-11-17T11:44:37.000Z
2022-03-13T17:09:50.000Z
dataset.py
tareknaous/visual-clustering
73ab04b560c72917ddb5ad69594afee59ebd44d7
[ "MIT" ]
null
null
null
dataset.py
tareknaous/visual-clustering
73ab04b560c72917ddb5ad69594afee59ebd44d7
[ "MIT" ]
1
2022-01-26T10:58:20.000Z
2022-01-26T10:58:20.000Z
import numpy as np import matplotlib.pyplot as plt from sklearn import datasets #blobs n_samples = 1500 blobs = datasets.make_blobs(n_samples=n_samples, centers=4, random_state=3) # plt.scatter(blobs[0][:,0],blobs[0][:,1]) # plt.show() cluster_0_points = [] cluster_1_points = [] cluster_2_points = [] cluster_3_points...
22.178082
75
0.731316
import numpy as np import matplotlib.pyplot as plt from sklearn import datasets n_samples = 1500 blobs = datasets.make_blobs(n_samples=n_samples, centers=4, random_state=3) cluster_0_points = [] cluster_1_points = [] cluster_2_points = [] cluster_3_points = [] for i in range(0,len(blobs[0])): if blobs[1][i] == 0: ...
true
true
f76e9e7b12378ce85d5e33b5623e5d712562f88c
1,150
py
Python
test_leds.py
DavidAntliff/apa102
e8541fd1523f430067a4b5812d828ca7b1ef25c6
[ "Apache-2.0" ]
null
null
null
test_leds.py
DavidAntliff/apa102
e8541fd1523f430067a4b5812d828ca7b1ef25c6
[ "Apache-2.0" ]
null
null
null
test_leds.py
DavidAntliff/apa102
e8541fd1523f430067a4b5812d828ca7b1ef25c6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python from strip import Strip import random import time import signal import logging logger = logging.getLogger(__name__) def init_logging(log_level): logging.basicConfig(level=log_level) # catch signals for tidy exit _exiting = False def signal_handler(signal, frame): global _exiting _...
20.909091
95
0.65913
from strip import Strip import random import time import signal import logging logger = logging.getLogger(__name__) def init_logging(log_level): logging.basicConfig(level=log_level) _exiting = False def signal_handler(signal, frame): global _exiting _exiting = True NUM_LEDS = 60 SPI_BUS = 0 SPI_DEVICE...
true
true
f76e9e85bd36dd4f00a2d453f0e8e5bbfc353fb4
1,193
py
Python
urgent/parser_wrap.py
SenZhangAI/urgent-lang
5b74d6b4eb23c00b5e955aee8f0237cc81e5c039
[ "MIT" ]
7
2020-01-25T04:29:30.000Z
2021-05-01T09:52:03.000Z
urgent/parser_wrap.py
SenZhangAI/urgent-lang
5b74d6b4eb23c00b5e955aee8f0237cc81e5c039
[ "MIT" ]
9
2020-01-23T06:57:47.000Z
2020-02-03T14:16:49.000Z
urgent/parser_wrap.py
SenZhangAI/urgent-lang
5b74d6b4eb23c00b5e955aee8f0237cc81e5c039
[ "MIT" ]
3
2020-02-01T05:17:32.000Z
2020-02-03T14:09:53.000Z
from urgent.parser_gen import * from urgent import ast from rbnf_rts.rts import Tokens, State from rbnf_rts.routine import DQString __all__ = ['parse'] co = mk_parser.__code__ requires = co.co_varnames[:co.co_argcount] ctx = {} ctx['DQString'] = DQString for each in requires: if each not in ctx: ctx[each...
22.509434
64
0.601006
from urgent.parser_gen import * from urgent import ast from rbnf_rts.rts import Tokens, State from rbnf_rts.routine import DQString __all__ = ['parse'] co = mk_parser.__code__ requires = co.co_varnames[:co.co_argcount] ctx = {} ctx['DQString'] = DQString for each in requires: if each not in ctx: ctx[each...
true
true
f76e9f764451282894c329e7e0917334fe2124a4
3,991
py
Python
app/recipe/tests/test_tags_api.py
AndresH1213/recipe-app-api
cd091dd61a61d9e194d659f242b8a8a26b18d3bd
[ "MIT" ]
null
null
null
app/recipe/tests/test_tags_api.py
AndresH1213/recipe-app-api
cd091dd61a61d9e194d659f242b8a8a26b18d3bd
[ "MIT" ]
null
null
null
app/recipe/tests/test_tags_api.py
AndresH1213/recipe-app-api
cd091dd61a61d9e194d659f242b8a8a26b18d3bd
[ "MIT" ]
null
null
null
from django.contrib.auth import get_user_model from django.urls import reverse from django.test import TestCase from rest_framework import status from rest_framework.test import APIClient from core.models import Tag, Recipe from recipe.serializers import TagSerializer TAGS_URL = reverse('recipe:tag-list') class P...
31.928
71
0.630418
from django.contrib.auth import get_user_model from django.urls import reverse from django.test import TestCase from rest_framework import status from rest_framework.test import APIClient from core.models import Tag, Recipe from recipe.serializers import TagSerializer TAGS_URL = reverse('recipe:tag-list') class P...
true
true
f76ea106f5fa8a127169c215b42309642c73b488
2,622
py
Python
setup.py
stefanv/timedomain-taxonomy
d66c5e1c2c1a09a4bea4565d8b2e7c004fb7838f
[ "MIT" ]
null
null
null
setup.py
stefanv/timedomain-taxonomy
d66c5e1c2c1a09a4bea4565d8b2e7c004fb7838f
[ "MIT" ]
null
null
null
setup.py
stefanv/timedomain-taxonomy
d66c5e1c2c1a09a4bea4565d8b2e7c004fb7838f
[ "MIT" ]
null
null
null
# Copyright (c) 2019, UC Berkeley # 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 conditions and the f...
39.134328
80
0.755912
import ast from setuptools import setup import sys from os import path requires = [] setup_requires = ['setuptools >= 30.3.0'] if {'pytest', 'test', 'ptr'}.intersection(sys.argv): setup_requires.append('pytest-runner') with open('requirements.txt') as f: requirements = f.read().splitlines() with open...
true
true
f76ea14e174c2353ce84848b62d57eada064a2b8
9,874
py
Python
src/oci/config.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
249
2017-09-11T22:06:05.000Z
2022-03-04T17:09:29.000Z
src/oci/config.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
228
2017-09-11T23:07:26.000Z
2022-03-23T10:58:50.000Z
src/oci/config.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
224
2017-09-27T07:32:43.000Z
2022-03-25T16:55:42.000Z
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
41.141667
245
0.706401
from __future__ import absolute_import import configparser import os import re import logging from oci._vendor import six from .exceptions import ConfigFileNotFound, ProfileNotFound, InvalidConfig, InvalidKeyFilePath from .auth import signers from .util import AUTHENTICATION_TYPE_FIELD_NAME, get_authentication_type_...
true
true
f76ea20fb71cd451022b7d378041397667780cb8
2,118
py
Python
code/ompc/my_runs/_sources/2shftlm_39937601ab80b68b8a55e169d25eb30a.py
jfilter/masters-thesis
39a3d9b862444507982cc4ccd98b6809cab72d82
[ "MIT" ]
5
2019-04-24T19:45:07.000Z
2020-12-29T06:40:58.000Z
code/ompc/my_runs/_sources/2shftlm_39937601ab80b68b8a55e169d25eb30a.py
jfilter/masters-thesis
39a3d9b862444507982cc4ccd98b6809cab72d82
[ "MIT" ]
2
2019-11-05T17:17:38.000Z
2019-11-05T17:17:39.000Z
code/ompc/my_runs/_sources/2shftlm_39937601ab80b68b8a55e169d25eb30a.py
jfilter/masters-thesis
39a3d9b862444507982cc4ccd98b6809cab72d82
[ "MIT" ]
null
null
null
#!/usr/bin/env python from fastai.text import * from fastai.datasets import * from pathlib import Path import pandas as pd from fastai.metrics import * from fastai.train import * from fastai.imports import nn, torch from fastai.callbacks import * from fastai import * from fastai.text import * import random import m...
27.153846
167
0.709632
from fastai.text import * from fastai.datasets import * from pathlib import Path import pandas as pd from fastai.metrics import * from fastai.train import * from fastai.imports import nn, torch from fastai.callbacks import * from fastai import * from fastai.text import * import random import math import datetime fr...
true
true
f76ea2b93b5ffd34b2e9ed6311fa10049ff4ca94
6,687
py
Python
athena/data/datasets/base.py
wgfi110/athena
e704884ec6a3a947769d892aa267578038e49ecb
[ "Apache-2.0" ]
791
2019-12-22T03:09:04.000Z
2022-03-26T01:57:42.000Z
athena/data/datasets/base.py
wgfi110/athena
e704884ec6a3a947769d892aa267578038e49ecb
[ "Apache-2.0" ]
198
2019-12-22T03:06:27.000Z
2022-03-29T02:57:59.000Z
athena/data/datasets/base.py
wgfi110/athena
e704884ec6a3a947769d892aa267578038e49ecb
[ "Apache-2.0" ]
194
2019-12-24T03:59:29.000Z
2022-03-25T02:44:51.000Z
# coding=utf-8 # Copyright (C) 2019 ATHENA AUTHORS; Xiangang Li; Shuaijiang Zhao # # 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 ...
32.779412
96
0.635861
import math import random import os from absl import logging import tensorflow as tf from athena.transform import AudioFeaturizer from ..feature_normalizer import FeatureNormalizer from ...utils.hparam import register_and_parse_hparams from ...utils.data_queue import DataQueue def data_loader(dataset_builder, batch_...
true
true
f76ea3a4ed813b8f5771b8bb3ff5e002c4eb6413
23,296
py
Python
marionette_tg/dsl_tests.py
kpdyer/marionette
bb40a334a18c82728eec01c9b56330bcb91a28da
[ "Apache-2.0" ]
73
2015-05-22T20:07:32.000Z
2015-11-12T15:09:00.000Z
marionette_tg/dsl_tests.py
kpdyer/marionette
bb40a334a18c82728eec01c9b56330bcb91a28da
[ "Apache-2.0" ]
20
2015-04-14T03:40:41.000Z
2015-10-02T00:57:28.000Z
marionette_tg/dsl_tests.py
kpdyer/marionette
bb40a334a18c82728eec01c9b56330bcb91a28da
[ "Apache-2.0" ]
14
2015-04-29T18:10:42.000Z
2015-11-03T00:36:29.000Z
import sys import unittest sys.path.append('.') import marionette_tg.dsl class Tests(unittest.TestCase): def test1(self): mar_format = """connection(tcp, 80): start downstream NULL 1.0 downstream upstream http_get 1.0 upstream end http_ok 1.0 ...
40.304498
100
0.613496
import sys import unittest sys.path.append('.') import marionette_tg.dsl class Tests(unittest.TestCase): def test1(self): mar_format = """connection(tcp, 80): start downstream NULL 1.0 downstream upstream http_get 1.0 upstream end http_ok 1.0 ...
true
true
f76ea40fd5ec69795c0e5e8ebf7e449b6f1c8434
10,188
py
Python
tests/test_modeling_tf_pytorch.py
Liang813/transformers
08f534d2da47875a4b7eb1c125cfa7f0f3b79642
[ "Apache-2.0" ]
2
2020-11-03T22:52:22.000Z
2021-11-09T10:29:16.000Z
tests/test_modeling_tf_pytorch.py
Liang813/transformers
08f534d2da47875a4b7eb1c125cfa7f0f3b79642
[ "Apache-2.0" ]
1
2021-03-21T03:28:23.000Z
2021-03-21T06:06:39.000Z
tests/test_modeling_tf_pytorch.py
Liang813/transformers
08f534d2da47875a4b7eb1c125cfa7f0f3b79642
[ "Apache-2.0" ]
2
2021-05-25T19:59:13.000Z
2022-02-28T18:11:12.000Z
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
41.754098
114
0.707597
import unittest from transformers import is_tf_available, is_torch_available from transformers.testing_utils import DUMMY_UNKWOWN_IDENTIFIER, SMALL_MODEL_IDENTIFIER, is_pt_tf_cross_test, slow if is_tf_available(): from transformers import ( AutoConfig, BertConfig, GPT2Config, T5...
true
true
f76ea4685c64753f1e9191b2805abf286a13b2bb
394
py
Python
server/site.py
sgenoud/federa
1c3dacacee1345f96c99e9d92b7c3c6745eb08ee
[ "MIT" ]
6
2019-02-23T12:53:59.000Z
2022-03-26T21:00:10.000Z
server/site.py
sgenoud/federa
1c3dacacee1345f96c99e9d92b7c3c6745eb08ee
[ "MIT" ]
3
2019-06-27T12:43:17.000Z
2019-11-21T09:40:11.000Z
server/site.py
sgenoud/federa
1c3dacacee1345f96c99e9d92b7c3c6745eb08ee
[ "MIT" ]
2
2019-06-27T12:42:19.000Z
2020-07-05T17:23:51.000Z
from flask import Blueprint, redirect, url_for, jsonify, render_template from framework.api.oauth import mastodon from .group.common import user_groups site = Blueprint("site", __name__) @site.route("/") def index(): if not mastodon.authorized: return render_template("login.html") print(mastodon.a...
21.888889
72
0.741117
from flask import Blueprint, redirect, url_for, jsonify, render_template from framework.api.oauth import mastodon from .group.common import user_groups site = Blueprint("site", __name__) @site.route("/") def index(): if not mastodon.authorized: return render_template("login.html") print(mastodon.a...
true
true
f76ea4d782ddf14c6a7da9a3ef858cca2da717c1
5,641
py
Python
demo.py
wangbingok1118/SSD_Pytorch
8d3f924671cec367c3c420eba2f002cc5b5181bb
[ "MIT" ]
null
null
null
demo.py
wangbingok1118/SSD_Pytorch
8d3f924671cec367c3c420eba2f002cc5b5181bb
[ "MIT" ]
null
null
null
demo.py
wangbingok1118/SSD_Pytorch
8d3f924671cec367c3c420eba2f002cc5b5181bb
[ "MIT" ]
null
null
null
import os os.environ["CUDA_VISIBLE_DEVICES"] = "1,0" import torch import torch.nn as nn import torch.optim as optim import torch.backends.cudnn as cudnn import torch.nn.init as init import argparse from torch.autograd import Variable import torch.utils.data as data from data import COCODetection, VOCDetection, detectio...
32.606936
87
0.616203
import os os.environ["CUDA_VISIBLE_DEVICES"] = "1,0" import torch import torch.nn as nn import torch.optim as optim import torch.backends.cudnn as cudnn import torch.nn.init as init import argparse from torch.autograd import Variable import torch.utils.data as data from data import COCODetection, VOCDetection, detectio...
true
true
f76ea514870c14e16a694883c7a8e81cd12fc63a
22,813
py
Python
TransForm_Kit/Quantization/debug/Pytorch-ResNet50-Log2QuantizeLoad-FPGA_Quantize-Batch-2.py
inaccel/TF2
1a3ce4c63675a30156bfcf3a1b9682154ef13183
[ "Apache-2.0" ]
144
2019-08-28T01:10:20.000Z
2022-03-23T08:47:57.000Z
TransForm_Kit/Quantization/debug/Pytorch-ResNet50-Log2QuantizeLoad-FPGA_Quantize-Batch-2.py
inaccel/TF2
1a3ce4c63675a30156bfcf3a1b9682154ef13183
[ "Apache-2.0" ]
19
2019-09-10T01:46:34.000Z
2021-12-02T09:05:14.000Z
TransForm_Kit/Quantization/debug/Pytorch-ResNet50-Log2QuantizeLoad-FPGA_Quantize-Batch-2.py
TF2-Engine/TF2
1a3ce4c63675a30156bfcf3a1b9682154ef13183
[ "Apache-2.0" ]
63
2019-08-28T08:28:50.000Z
2022-01-19T01:44:30.000Z
# coding: utf-8 import math import struct import cv2 import numpy as np import torch import torch.nn as nn import torch.utils.model_zoo as model_zoo import torch.utils.data as data import torchvision import torchvision.models as tvmodel import torchvision.transforms as transforms import torchvision.datasets as datas...
39.468858
1,376
0.618463
import math import struct import cv2 import numpy as np import torch import torch.nn as nn import torch.utils.model_zoo as model_zoo import torch.utils.data as data import torchvision import torchvision.models as tvmodel import torchvision.transforms as transforms import torchvision.datasets as datasets import torch...
true
true
f76ea678678ad777a5d98b69fefb7449bbae3d77
562,675
py
Python
template_container_macaque/labels/slice_55.py
lkondratova/Brainplot
3c8a88c1995dedeaa5cbd88ee71499c7cf9c571d
[ "MIT" ]
null
null
null
template_container_macaque/labels/slice_55.py
lkondratova/Brainplot
3c8a88c1995dedeaa5cbd88ee71499c7cf9c571d
[ "MIT" ]
null
null
null
template_container_macaque/labels/slice_55.py
lkondratova/Brainplot
3c8a88c1995dedeaa5cbd88ee71499c7cf9c571d
[ "MIT" ]
null
null
null
coordinates_00EBFF = ((47, 184), (47, 185), (47, 186), (47, 187), (47, 188), (47, 189), (47, 190), (47, 191), (47, 192), (48, 180), (48, 182), (48, 183), (48, 191), (49, 184), (49, 185), (49, 186), (49, 187), (49, 188), (49, 189), (49, 191), (50, 178), (50, 181), (50, 182), (50, 183), (50, 184), (50, 185), (50, 186),...
783.669916
865
0.48568
coordinates_00EBFF = ((47, 184), (47, 185), (47, 186), (47, 187), (47, 188), (47, 189), (47, 190), (47, 191), (47, 192), (48, 180), (48, 182), (48, 183), (48, 191), (49, 184), (49, 185), (49, 186), (49, 187), (49, 188), (49, 189), (49, 191), (50, 178), (50, 181), (50, 182), (50, 183), (50, 184), (50, 185), (50, 186),...
true
true
f76ea731914c9f0e1ada8935db962b0d4744e861
995
py
Python
foocat/foocat.py
franklu2014/foocat
5d452996ba139693fcbcda05c7500b24b9d1ad50
[ "MIT" ]
null
null
null
foocat/foocat.py
franklu2014/foocat
5d452996ba139693fcbcda05c7500b24b9d1ad50
[ "MIT" ]
null
null
null
foocat/foocat.py
franklu2014/foocat
5d452996ba139693fcbcda05c7500b24b9d1ad50
[ "MIT" ]
null
null
null
import pandas as pd def catbind(a, b): """ Concatenates two pandas categoricals. Parameters ---------- a : pandas.core.arrays.categorical.Categorical A pandas categorical. b : pandas.core.arrays.categorical.Categorical A pandas categorical that you wish to concatenate to a. R...
30.151515
69
0.61608
import pandas as pd def catbind(a, b): concatenated = pd.concat([pd.Series(a.astype("str")), pd.Series(b.astype("str"))]) return pd.Categorical(concatenated)
true
true
f76ea775cb1f93bef1d95335864f9f79aa1f7ad2
13,576
py
Python
mpu/layers.py
Hzfinfdu/BBT_CPM
ee095727c714902fa6f8f5deebf1c30dc1956520
[ "MIT" ]
120
2021-08-04T01:30:10.000Z
2022-03-31T13:18:03.000Z
mpu/layers.py
Hzfinfdu/BBT_CPM
ee095727c714902fa6f8f5deebf1c30dc1956520
[ "MIT" ]
35
2021-06-23T08:55:44.000Z
2022-03-30T13:47:46.000Z
mpu/layers.py
Hzfinfdu/BBT_CPM
ee095727c714902fa6f8f5deebf1c30dc1956520
[ "MIT" ]
24
2021-08-04T05:54:59.000Z
2022-03-31T03:12:35.000Z
# coding=utf-8 # Copyright (c) 2019, NVIDIA CORPORATION. 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 re...
41.015106
80
0.639511
import math import torch import torch.nn.functional as F import torch.nn.init as init from torch.nn.parameter import Parameter from apex.normalization.fused_layer_norm import FusedLayerNorm as LayerNorm from .initialize import get_model_parallel_rank from .initialize import get_model_parallel_world_size from .ma...
true
true
f76ea787a66f1b94a5fa2b11b8660a8ca3ba1929
1,553
py
Python
ntlmv1-ess.py
cclauss/ntlmv1-multi
f4a75b34e0840fe0a27e605485385b14c4c894dd
[ "MIT" ]
1
2019-08-19T10:52:17.000Z
2019-08-19T10:52:17.000Z
ntlmv1-ess.py
TaharAmine/ntlmv1-multi
f4a75b34e0840fe0a27e605485385b14c4c894dd
[ "MIT" ]
null
null
null
ntlmv1-ess.py
TaharAmine/ntlmv1-multi
f4a75b34e0840fe0a27e605485385b14c4c894dd
[ "MIT" ]
1
2019-05-04T22:09:41.000Z
2019-05-04T22:09:41.000Z
import hashlib,binascii import argparse import binascii import hashlib parser = argparse.ArgumentParser() parser.add_argument('--ess', help='NTLMv1 ESS Hash in responder format', required=True) args = parser.parse_args() hashsplit = args.ess.split(':') srvchallenge = hashsplit[5] ntresp = hashsplit[4] ct3 = ntresp[3...
31.693878
150
0.742434
import hashlib,binascii import argparse import binascii import hashlib parser = argparse.ArgumentParser() parser.add_argument('--ess', help='NTLMv1 ESS Hash in responder format', required=True) args = parser.parse_args() hashsplit = args.ess.split(':') srvchallenge = hashsplit[5] ntresp = hashsplit[4] ct3 = ntresp[3...
false
true
f76ea79f12cc42887a2c2b233a4ca3ca1c29ec70
584
py
Python
app/__init__.py
samwel-chege/News
2eca2af35f34473a4c2ef69d570f99cdb6619cc6
[ "Unlicense", "MIT" ]
null
null
null
app/__init__.py
samwel-chege/News
2eca2af35f34473a4c2ef69d570f99cdb6619cc6
[ "Unlicense", "MIT" ]
null
null
null
app/__init__.py
samwel-chege/News
2eca2af35f34473a4c2ef69d570f99cdb6619cc6
[ "Unlicense", "MIT" ]
null
null
null
from flask import Flask from config import config_options from flask_bootstrap import Bootstrap bootstrap = Bootstrap() #Initializing the application def create_app(config_name): app = Flask(__name__) #Setting up configurations app.config.from_object(config_options[config_name]) #Initializing flask extens...
20.137931
55
0.77226
from flask import Flask from config import config_options from flask_bootstrap import Bootstrap bootstrap = Bootstrap() def create_app(config_name): app = Flask(__name__) app.config.from_object(config_options[config_name]) bootstrap.init_app(app) from .main import main as main_blueprint ...
true
true
f76ea82ed756cf7630e642876abc39014ec2c499
1,269
py
Python
tests/io/test_pazy_udpout.py
ACea15/sharpy
c89ecb74be3cb9e37b23ac8a282c73b9b55dd792
[ "BSD-3-Clause" ]
80
2018-08-30T13:01:52.000Z
2022-03-24T15:02:48.000Z
tests/io/test_pazy_udpout.py
ACea15/sharpy
c89ecb74be3cb9e37b23ac8a282c73b9b55dd792
[ "BSD-3-Clause" ]
88
2018-05-17T16:18:58.000Z
2022-03-11T21:05:48.000Z
tests/io/test_pazy_udpout.py
ACea15/sharpy
c89ecb74be3cb9e37b23ac8a282c73b9b55dd792
[ "BSD-3-Clause" ]
44
2018-01-02T14:27:28.000Z
2022-03-12T13:49:36.000Z
import unittest import tests.io.generate_pazy_udpout as gp import os import shutil class TestPazyCoupledStatic(unittest.TestCase): """ Test Pazy wing static coupled case and compare against a benchmark result. As of the time of writing, benchmark result has not been verified but it serves as a backward...
30.214286
81
0.590229
import unittest import tests.io.generate_pazy_udpout as gp import os import shutil class TestPazyCoupledStatic(unittest.TestCase): route_test_dir = os.path.abspath(os.path.dirname(os.path.realpath(__file__))) def test_dynamic_aoa(self): u_inf = 50 alpha = 0 case_name = 'pazy_uinf{:04g...
true
true
f76ea85a50d455692cef3339599ef9c9c92f4bc3
11,766
py
Python
venv/Lib/site-packages/IPython/core/completerlib.py
Kiiwi/Syssel
83705e3fd0edf40f09df950d5ce91c95586573f5
[ "BSD-3-Clause" ]
652
2015-07-26T00:00:17.000Z
2022-02-24T18:30:04.000Z
SLpackage/private/thirdparty/pythonpkgs/ipython/ipython_4.0.0/lib/python2.7/site-packages/IPython/core/completerlib.py
fanglab/6mASCOPE
3f1fdcb7693ff152f17623ce549526ec272698b1
[ "BSD-3-Clause" ]
8
2015-09-07T03:38:19.000Z
2021-05-23T03:18:51.000Z
SLpackage/private/thirdparty/pythonpkgs/ipython/ipython_4.0.0/lib/python2.7/site-packages/IPython/core/completerlib.py
fanglab/6mASCOPE
3f1fdcb7693ff152f17623ce549526ec272698b1
[ "BSD-3-Clause" ]
40
2015-07-24T19:45:08.000Z
2021-11-01T14:54:56.000Z
# encoding: utf-8 """Implementations for various useful completers. These are all loaded by default by IPython. """ #----------------------------------------------------------------------------- # Copyright (C) 2010-2011 The IPython Development Team. # # Distributed under the terms of the BSD License. # # The full ...
33.237288
82
0.562213
from __future__ import print_function import glob import inspect import os import re import sys try: from importlib.machinery import all_suffixes _suffixes = all_suffixes() except ImportError: from imp import get_suffixes _suffixes = [ s[0] for s in get_suffixes() ] from time import time from zi...
true
true
f76ea9a5d3246facb02914faf64e4d013b907c6b
134,098
py
Python
tests/python/frontend/pytorch/test_forward.py
wjj19950828/tvm
9c63f4fc318652f6fff68342da2d11b26592a3e0
[ "Zlib", "Unlicense", "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0" ]
null
null
null
tests/python/frontend/pytorch/test_forward.py
wjj19950828/tvm
9c63f4fc318652f6fff68342da2d11b26592a3e0
[ "Zlib", "Unlicense", "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0" ]
1
2019-08-16T20:37:41.000Z
2019-08-16T20:38:15.000Z
tests/python/frontend/pytorch/test_forward.py
wjj19950828/tvm
9c63f4fc318652f6fff68342da2d11b26592a3e0
[ "Zlib", "Unlicense", "Apache-2.0", "BSD-2-Clause", "MIT", "ECL-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
32.73877
115
0.631568
import os import sys from time import time import numpy as np import torch import torchvision import tvm import tvm.testing from packaging import version as package_version from scipy.stats import t as tdistr from torch.nn import Module from torch.nn import functional as F from tvm import relay from tvm.contrib import...
true
true
f76eaa7db969f6b6cbd956304d895a63bbefaa08
2,176
py
Python
certbot-dns-digitalocean/setup.py
aaroncohen/certbot
c3434bac26592585d12feb781a87f3e2be846e42
[ "Apache-2.0" ]
1
2018-09-12T03:07:11.000Z
2018-09-12T03:07:11.000Z
certbot-dns-digitalocean/setup.py
978740431/certbot
c3434bac26592585d12feb781a87f3e2be846e42
[ "Apache-2.0" ]
null
null
null
certbot-dns-digitalocean/setup.py
978740431/certbot
c3434bac26592585d12feb781a87f3e2be846e42
[ "Apache-2.0" ]
null
null
null
import sys from setuptools import setup from setuptools import find_packages version = '0.15.0.dev0' # Please update tox.ini when modifying dependency version requirements install_requires = [ 'acme=={0}'.format(version), 'certbot=={0}'.format(version), 'mock', 'python-digitalocean>=1.11', # For...
31.085714
89
0.627757
import sys from setuptools import setup from setuptools import find_packages version = '0.15.0.dev0' install_requires = [ 'acme=={0}'.format(version), 'certbot=={0}'.format(version), 'mock', 'python-digitalocean>=1.11', 'setuptools>=1.0', 'zope.interface', ] docs_extras = [ 'Sph...
true
true
f76eaaffb0ddab223ac508235fd623e650353922
4,081
py
Python
vspreview/models/outputs.py
wwww-wwww/vs-preview
3aaad4f2242ca1d490dccb895efe27e823162d2a
[ "Apache-2.0" ]
null
null
null
vspreview/models/outputs.py
wwww-wwww/vs-preview
3aaad4f2242ca1d490dccb895efe27e823162d2a
[ "Apache-2.0" ]
null
null
null
vspreview/models/outputs.py
wwww-wwww/vs-preview
3aaad4f2242ca1d490dccb895efe27e823162d2a
[ "Apache-2.0" ]
null
null
null
from __future__ import annotations import vapoursynth as vs from typing import Any, cast, Iterator, List, Mapping, Type, TypeVar, OrderedDict, Generic from PyQt5.QtCore import Qt, QModelIndex, QAbstractListModel from ..core import main_window, QYAMLObject, VideoOutput, AudioOutput, try_load T = TypeVar('T', VideoO...
30.684211
113
0.609409
from __future__ import annotations import vapoursynth as vs from typing import Any, cast, Iterator, List, Mapping, Type, TypeVar, OrderedDict, Generic from PyQt5.QtCore import Qt, QModelIndex, QAbstractListModel from ..core import main_window, QYAMLObject, VideoOutput, AudioOutput, try_load T = TypeVar('T', VideoO...
true
true
f76eab52065f256c61cf357f4f78b5c3130fa1db
32,755
py
Python
bootleg/layers/attn_networks.py
Mehrad0711/bootleg
f812b6200eb84b0163d353f0d4f73308a921fcfa
[ "Apache-2.0" ]
null
null
null
bootleg/layers/attn_networks.py
Mehrad0711/bootleg
f812b6200eb84b0163d353f0d4f73308a921fcfa
[ "Apache-2.0" ]
null
null
null
bootleg/layers/attn_networks.py
Mehrad0711/bootleg
f812b6200eb84b0163d353f0d4f73308a921fcfa
[ "Apache-2.0" ]
null
null
null
"""Attention networks.""" import logging import torch import torch.nn as nn import bootleg.utils.model_utils from bootleg.layers.helper_modules import MLP, AttnBlock, NormAndSum, SelfAttnBlock from bootleg.symbols.constants import ( BERT_WORD_DIM, DISAMBIG, KG_BIAS_LOAD_CLASS, MAIN_CONTEXT_MATRIX, ) f...
43.966443
119
0.581011
import logging import torch import torch.nn as nn import bootleg.utils.model_utils from bootleg.layers.helper_modules import MLP, AttnBlock, NormAndSum, SelfAttnBlock from bootleg.symbols.constants import ( BERT_WORD_DIM, DISAMBIG, KG_BIAS_LOAD_CLASS, MAIN_CONTEXT_MATRIX, ) from bootleg.utils import m...
true
true
f76eac0dc8f02a899e02ceefc7fa94ad39de960c
3,691
py
Python
ppb/vfs.py
ironfroggy/pursuedpybear
a17d29dd58a6f2ecad1f0a9dcf4ee23bed87d780
[ "Artistic-2.0" ]
null
null
null
ppb/vfs.py
ironfroggy/pursuedpybear
a17d29dd58a6f2ecad1f0a9dcf4ee23bed87d780
[ "Artistic-2.0" ]
null
null
null
ppb/vfs.py
ironfroggy/pursuedpybear
a17d29dd58a6f2ecad1f0a9dcf4ee23bed87d780
[ "Artistic-2.0" ]
null
null
null
""" Handles opening files from the Python "VFS". The VFS is the same file space that Python modules are imported from, so the module spam.eggs comes from spam/eggs.py, and you can load spam/foo.png that lives next to it. """ import logging from pathlib import Path import sys try: import importlib.resources as impr...
31.279661
91
0.632891
import logging from pathlib import Path import sys try: import importlib.resources as impres except ImportError: import importlib_resources as impres logger = logging.getLogger(__name__) def _main_path(): main = sys.modules['__main__'] mainpath = getattr(main, '__file__') if mainpath: ...
true
true
f76eacadae7c1d5059c60527704c912523e7360a
11,097
py
Python
sdk/python/pulumi_azure_nextgen/cdn/latest/get_afd_origin.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_nextgen/cdn/latest/get_afd_origin.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_nextgen/cdn/latest/get_afd_origin.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
43.347656
329
0.676669
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs __all__ = [ 'GetAFDOriginResult', 'AwaitableGetAFDOriginResult', 'get_afd_origin', ] warnings.warn("""The 'latest' version is deprecated...
true
true
f76ead9c6b65a2440b3c2e21c1fc624aa90d5d42
1,639
py
Python
imgs/test_geometry/test_extrapolated_intersection/aq_test_one_moving_one_stationary_distlimit_touch_at_limit.py
devilcry11/pygorithm
be35813729a0151da1ac9ba013453a61ffa249b8
[ "MIT" ]
4,736
2017-08-06T03:36:33.000Z
2022-03-31T07:32:55.000Z
imgs/test_geometry/test_extrapolated_intersection/aq_test_one_moving_one_stationary_distlimit_touch_at_limit.py
realChainLife/pygorithm
f72e666ee913836b95f09cced47bcc03ad68a05d
[ "MIT" ]
56
2017-08-06T16:34:49.000Z
2022-02-09T19:41:02.000Z
imgs/test_geometry/test_extrapolated_intersection/aq_test_one_moving_one_stationary_distlimit_touch_at_limit.py
realChainLife/pygorithm
f72e666ee913836b95f09cced47bcc03ad68a05d
[ "MIT" ]
658
2017-08-06T08:52:02.000Z
2022-03-15T12:09:08.000Z
from utils import create_newfig, create_moving_polygon, create_still_polygon, run_or_export func_code = 'aq' func_name = 'test_one_moving_one_stationary_distlimit_touch_at_limit' def setup_fig01(): fig, ax, renderer = create_newfig('{}01'.format(func_code), ylim=(-1, 7)) create_moving_polygon(fig, ax, render...
48.205882
99
0.61684
from utils import create_newfig, create_moving_polygon, create_still_polygon, run_or_export func_code = 'aq' func_name = 'test_one_moving_one_stationary_distlimit_touch_at_limit' def setup_fig01(): fig, ax, renderer = create_newfig('{}01'.format(func_code), ylim=(-1, 7)) create_moving_polygon(fig, ax, render...
true
true
f76eb04538602135251cc5a110f0b05f513d1e73
374,983
py
Python
DearPyGui/dearpygui/_dearpygui_RTD.py
prakritichauhanpuresoftware/DearPyGui
1741343da93dd5eca59b5ab34f9135234297291c
[ "MIT" ]
null
null
null
DearPyGui/dearpygui/_dearpygui_RTD.py
prakritichauhanpuresoftware/DearPyGui
1741343da93dd5eca59b5ab34f9135234297291c
[ "MIT" ]
null
null
null
DearPyGui/dearpygui/_dearpygui_RTD.py
prakritichauhanpuresoftware/DearPyGui
1741343da93dd5eca59b5ab34f9135234297291c
[ "MIT" ]
null
null
null
########################################################## # Dear PyGui User Interface (MODIFIED FOR READTHEDOCS) # ~ Version: master # # Notes: # * This file is automatically generated. # # Resources: # * FAQ: https://github.com/hoffstadt/DearPyGui/discussions/categories/frequently-asked-questio...
43.022373
275
0.74102
from typing import List, Any, Callable, Union, Tuple from contextlib import contextmanager import warnings import functools import inspect import dearpygui._dearpygui as internal_dpg from dearpygui._dearpygui import mvBuffer from dearpygui._dearpygui import mvVec4 from dearpygui._dearpygui import mvMat4 def get_ma...
true
true
f76eb06ca1c27844e00781855245b6d4943d0103
1,034
py
Python
test/functional/rpc_uptime.py
adymoloca/flocoin
d9244577577dede975c852f6fcfe1afba4d71a57
[ "MIT" ]
null
null
null
test/functional/rpc_uptime.py
adymoloca/flocoin
d9244577577dede975c852f6fcfe1afba4d71a57
[ "MIT" ]
null
null
null
test/functional/rpc_uptime.py
adymoloca/flocoin
d9244577577dede975c852f6fcfe1afba4d71a57
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2017-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the RPC call related to the uptime command. Test corresponds to code in rpc/server.cpp. """ impo...
28.722222
103
0.716634
import time from test_framework.test_framework import FlocoinTestFramework from test_framework.util import assert_raises_rpc_error class UptimeTest(FlocoinTestFramework): def set_test_params(self): self.num_nodes = 1 self.setup_clean_chain = True def run_test(self): self._test_negat...
true
true
f76eb0b717da270fb5691732cf0bb01e19470d62
1,558
py
Python
temflix.py
teSill/temflix
31d40265fa71695966c6178145a1057cd2aeda27
[ "MIT" ]
3
2020-12-21T20:51:56.000Z
2022-01-04T11:55:45.000Z
temflix.py
teSill/temflix
31d40265fa71695966c6178145a1057cd2aeda27
[ "MIT" ]
null
null
null
temflix.py
teSill/temflix
31d40265fa71695966c6178145a1057cd2aeda27
[ "MIT" ]
null
null
null
from pathlib import PurePath import os.path import glob from trivia import trivia_questions from discord.ext import commands from trivia.trivia_manager import TriviaManager TOKEN = os.environ.get('DISCORD_TOKEN') bot_name = "Temflix" custom_commands = ["find", "commands", "popular", "findactor", "findactress", "findmo...
24.730159
94
0.71887
from pathlib import PurePath import os.path import glob from trivia import trivia_questions from discord.ext import commands from trivia.trivia_manager import TriviaManager TOKEN = os.environ.get('DISCORD_TOKEN') bot_name = "Temflix" custom_commands = ["find", "commands", "popular", "findactor", "findactress", "findmo...
true
true
f76eb134115e1c908ec6881ace39d0dbb7828270
2,015
py
Python
userbot/plugins/zipfile.py
Doom098/userbot
11f0225a75241ab9492b1c435414c77de287b8a6
[ "MIT" ]
12
2022-01-06T19:52:48.000Z
2022-03-06T09:05:08.000Z
userbot/plugins/zipfile.py
Doom098/userbot
11f0225a75241ab9492b1c435414c77de287b8a6
[ "MIT" ]
1
2022-01-09T11:35:06.000Z
2022-01-09T11:35:06.000Z
userbot/plugins/zipfile.py
Doom098/userbot
11f0225a75241ab9492b1c435414c77de287b8a6
[ "MIT" ]
64
2022-01-06T19:55:15.000Z
2022-03-29T21:03:01.000Z
import asyncio import os import time import zipfile from FIREX.utils import admin_cmd, edit_or_reply, sudo_cmd @bot.on(admin_cmd(pattern="compress ?(.*)", outgoing=True)) @bot.on(sudo_cmd(pattern="compress ?(.*)", allow_sudo=True)) async def _(event): if event.fwd_from: return input_str = event.pa...
23.705882
86
0.582134
import asyncio import os import time import zipfile from FIREX.utils import admin_cmd, edit_or_reply, sudo_cmd @bot.on(admin_cmd(pattern="compress ?(.*)", outgoing=True)) @bot.on(sudo_cmd(pattern="compress ?(.*)", allow_sudo=True)) async def _(event): if event.fwd_from: return input_str = event.pa...
true
true
f76eb15ddae5380305b328b439c573802a4d2c45
1,224
py
Python
reinforcement_learning/rl_portfolio_management_coach_customEnv/src/train-coach.py
jerrypeng7773/amazon-sagemaker-examples
c5ddecce1f739a345465b9a38b064983a129141d
[ "Apache-2.0" ]
2,610
2020-10-01T14:14:53.000Z
2022-03-31T18:02:31.000Z
reinforcement_learning/rl_portfolio_management_coach_customEnv/src/train-coach.py
jerrypeng7773/amazon-sagemaker-examples
c5ddecce1f739a345465b9a38b064983a129141d
[ "Apache-2.0" ]
1,959
2020-09-30T20:22:42.000Z
2022-03-31T23:58:37.000Z
reinforcement_learning/rl_portfolio_management_coach_customEnv/src/train-coach.py
jerrypeng7773/amazon-sagemaker-examples
c5ddecce1f739a345465b9a38b064983a129141d
[ "Apache-2.0" ]
2,052
2020-09-30T22:11:46.000Z
2022-03-31T23:02:51.000Z
from sagemaker_rl.coach_launcher import SageMakerCoachPresetLauncher class MyLauncher(SageMakerCoachPresetLauncher): def default_preset_name(self): """This points to a .py file that configures everything about the RL job. It can be overridden at runtime by specifying the RLCOACH_PRESET hyperparame...
40.8
102
0.688725
from sagemaker_rl.coach_launcher import SageMakerCoachPresetLauncher class MyLauncher(SageMakerCoachPresetLauncher): def default_preset_name(self): return "preset-portfolio-management-clippedppo" def map_hyperparameter(self, name, value): mapping = { "discount": "rl.agent_...
true
true
f76eb186158ca836d18df03982986a26a8c7bf90
429
py
Python
python_modules/dagster/dagster/core/storage/alembic/versions/014_0_10_0_create_new_schedule_tables_postgres.py
asamoal/dagster
08fad28e4b608608ce090ce2e8a52c2cf9dd1b64
[ "Apache-2.0" ]
null
null
null
python_modules/dagster/dagster/core/storage/alembic/versions/014_0_10_0_create_new_schedule_tables_postgres.py
asamoal/dagster
08fad28e4b608608ce090ce2e8a52c2cf9dd1b64
[ "Apache-2.0" ]
null
null
null
python_modules/dagster/dagster/core/storage/alembic/versions/014_0_10_0_create_new_schedule_tables_postgres.py
asamoal/dagster
08fad28e4b608608ce090ce2e8a52c2cf9dd1b64
[ "Apache-2.0" ]
null
null
null
"""0.10.0 create new schedule tables Revision ID: 493871843165 Revises: 942138e33bf9 Create Date: 2021-01-13 14:43:03.678784 """ from dagster.core.storage.migration.utils import create_0_10_0_schedule_tables # revision identifiers, used by Alembic. revision = "493871843165" down_revision = "942138e33bf9" branch_labe...
18.652174
78
0.773893
from dagster.core.storage.migration.utils import create_0_10_0_schedule_tables revision = "493871843165" down_revision = "942138e33bf9" branch_labels = None depends_on = None def upgrade(): create_0_10_0_schedule_tables() def downgrade(): pass
true
true
f76eb1a88d3d12dcfb6e228c69257ddc36db0485
27,733
py
Python
src/falconpy/intel.py
kra-ts/falconpy
c7c4ed93cb3b56cdfd86757f573fde57e4ccf857
[ "Unlicense" ]
1
2021-11-19T18:25:12.000Z
2021-11-19T18:25:12.000Z
src/falconpy/intel.py
kra-ts/falconpy
c7c4ed93cb3b56cdfd86757f573fde57e4ccf857
[ "Unlicense" ]
2
2022-02-03T18:04:40.000Z
2022-02-03T18:04:57.000Z
src/falconpy/intel.py
kra-ts/falconpy
c7c4ed93cb3b56cdfd86757f573fde57e4ccf857
[ "Unlicense" ]
null
null
null
"""CrowdStrike Falcon Threat Intelligence API interface class. _______ __ _______ __ __ __ | _ .----.-----.--.--.--.--| | _ | |_.----|__| |--.-----. |. 1___| _| _ | | | | _ | 1___| _| _| | <| -__| |. |___|__| |_____|________|_____|____ |____|__| |__|__|...
45.463934
105
0.60657
from ._util import force_default, process_service_request, handle_single_argument from ._payload import generic_payload_list from ._service_class import ServiceClass from ._endpoint._intel import _intel_endpoints as Endpoints class Intel(ServiceClass): @force_default(defaults=["parameters"], default_types=["dict...
true
true
f76eb3443cb063e4bd936274d1ca570dd6e2c849
1,199
py
Python
DataStructures/LRUCache/tests/lru_cache_ddl_test.py
Nalhin/AlgorithmsAndDataStructures
2d2c87d0572e107c993c3c8866b8beefd4d22082
[ "MIT" ]
1
2021-11-16T13:02:25.000Z
2021-11-16T13:02:25.000Z
DataStructures/LRUCache/tests/lru_cache_ddl_test.py
Nalhin/AlgorithmsAndDataStructures
2d2c87d0572e107c993c3c8866b8beefd4d22082
[ "MIT" ]
null
null
null
DataStructures/LRUCache/tests/lru_cache_ddl_test.py
Nalhin/AlgorithmsAndDataStructures
2d2c87d0572e107c993c3c8866b8beefd4d22082
[ "MIT" ]
null
null
null
import pytest from DataStructures.LRUCache.lru_cache_ddl import LRUCacheDDL @pytest.fixture() def lru_cache(): return LRUCacheDDL(2) class TestLRUCacheDDL: def test_put_and_get(self, lru_cache): key = 2 val = 1 lru_cache.put(key, val) result = lru_cache.get(key) as...
23.98
63
0.605505
import pytest from DataStructures.LRUCache.lru_cache_ddl import LRUCacheDDL @pytest.fixture() def lru_cache(): return LRUCacheDDL(2) class TestLRUCacheDDL: def test_put_and_get(self, lru_cache): key = 2 val = 1 lru_cache.put(key, val) result = lru_cache.get(key) as...
true
true
f76eb46433246fcd6d7ae8ef206835de0af322f9
1,171
py
Python
db_count_email.py
extwiii/C-Python
166d7abd032e0d3d150b4374b51bb1ce4d1ff3a0
[ "Apache-2.0" ]
null
null
null
db_count_email.py
extwiii/C-Python
166d7abd032e0d3d150b4374b51bb1ce4d1ff3a0
[ "Apache-2.0" ]
null
null
null
db_count_email.py
extwiii/C-Python
166d7abd032e0d3d150b4374b51bb1ce4d1ff3a0
[ "Apache-2.0" ]
null
null
null
import sqlite3 conn = sqlite3.connect('emaildb.sqlite') cur = conn.cursor() cur.execute(''' DROP TABLE IF EXISTS Counts''') cur.execute(''' CREATE TABLE Counts (org TEXT, count INTEGER)''') fname = raw_input('Enter file name: ') if ( len(fname) < 1 ) : fname = 'mbox.txt' fh = open(fname) for line in fh: if not ...
26.613636
69
0.631939
import sqlite3 conn = sqlite3.connect('emaildb.sqlite') cur = conn.cursor() cur.execute(''' DROP TABLE IF EXISTS Counts''') cur.execute(''' CREATE TABLE Counts (org TEXT, count INTEGER)''') fname = raw_input('Enter file name: ') if ( len(fname) < 1 ) : fname = 'mbox.txt' fh = open(fname) for line in fh: if not ...
false
true
f76eb596398e19a8d681afce56d0b94b973c102c
8,552
py
Python
angr/analyses/init_finder.py
mikenawrocki/angr
57f5593e902f5ad58709bc8f4ce7859134300ffb
[ "BSD-2-Clause" ]
6,132
2015-08-06T23:24:47.000Z
2022-03-31T21:49:34.000Z
angr/analyses/init_finder.py
mikenawrocki/angr
57f5593e902f5ad58709bc8f4ce7859134300ffb
[ "BSD-2-Clause" ]
2,272
2015-08-10T08:40:07.000Z
2022-03-31T23:46:44.000Z
angr/analyses/init_finder.py
mikenawrocki/angr
57f5593e902f5ad58709bc8f4ce7859134300ffb
[ "BSD-2-Clause" ]
1,155
2015-08-06T23:37:39.000Z
2022-03-31T05:54:11.000Z
from collections import defaultdict from cle.loader import MetaELF from cle.backends import Section, Segment import pyvex import claripy from ..engines.light import SimEngineLight, SimEngineLightVEXMixin from . import register_analysis from .analysis import Analysis from .forward_analysis import FunctionGraphVisitor...
34.071713
135
0.603017
from collections import defaultdict from cle.loader import MetaELF from cle.backends import Section, Segment import pyvex import claripy from ..engines.light import SimEngineLight, SimEngineLightVEXMixin from . import register_analysis from .analysis import Analysis from .forward_analysis import FunctionGraphVisitor...
true
true
f76eb5c0a0e703adc5a8d4b9f7eee86f005dd264
2,880
py
Python
Routine/PotionCombinations.py
josephxsxn/alchemists_notepad
8bf484d294a5b79ebeee2befbfaf1f32871b2882
[ "Apache-2.0" ]
null
null
null
Routine/PotionCombinations.py
josephxsxn/alchemists_notepad
8bf484d294a5b79ebeee2befbfaf1f32871b2882
[ "Apache-2.0" ]
4
2015-12-29T19:20:29.000Z
2015-12-30T19:44:14.000Z
Routine/PotionCombinations.py
josephxsxn/alchemists_notepad
8bf484d294a5b79ebeee2befbfaf1f32871b2882
[ "Apache-2.0" ]
null
null
null
from Object.PotionList import PotionList from Object.Potion import Potion from Object.PotionColor import PotionColor from Object.PotionSign import PotionSign from Object.Ingredient import Ingredient from Object.IngredientProperties import IngredientProperties class PotionCombinations: def distinct_potions_list(potio...
36.923077
138
0.756944
from Object.PotionList import PotionList from Object.Potion import Potion from Object.PotionColor import PotionColor from Object.PotionSign import PotionSign from Object.Ingredient import Ingredient from Object.IngredientProperties import IngredientProperties class PotionCombinations: def distinct_potions_list(potio...
true
true
f76eb5df60e12391a40eec0cc92e5f9b16ed5b6a
715
py
Python
tests/test_models/test_review.py
jblanco75/AirBnB_clone
383ddad51fcf34234c96dadcbeb716239002d610
[ "MIT" ]
null
null
null
tests/test_models/test_review.py
jblanco75/AirBnB_clone
383ddad51fcf34234c96dadcbeb716239002d610
[ "MIT" ]
null
null
null
tests/test_models/test_review.py
jblanco75/AirBnB_clone
383ddad51fcf34234c96dadcbeb716239002d610
[ "MIT" ]
1
2021-07-07T20:11:04.000Z
2021-07-07T20:11:04.000Z
#!/bin/usr/pyhton3 """Test Review""" import unittest from models.base_model import BaseModel from models.review import Review class TestReview(unittest.TestCase): """Test review""" def test_class(self): """Test class""" self.assertEqual(Review.place_id, "") self.assertEqual(Review.us...
27.5
57
0.654545
import unittest from models.base_model import BaseModel from models.review import Review class TestReview(unittest.TestCase): def test_class(self): self.assertEqual(Review.place_id, "") self.assertEqual(Review.user_id, "") self.assertEqual(Review.text, "") self.assertTrue(issubcl...
true
true
f76eb6c4f6c5b5001730dd8627c0a37842baf612
720
py
Python
alpyro_msgs/visualization_msgs/interactivemarkerpose.py
rho2/alpyro_msgs
b5a680976c40c83df70d61bb2db1de32a1cde8d3
[ "MIT" ]
1
2020-12-13T13:07:10.000Z
2020-12-13T13:07:10.000Z
alpyro_msgs/visualization_msgs/interactivemarkerpose.py
rho2/alpyro_msgs
b5a680976c40c83df70d61bb2db1de32a1cde8d3
[ "MIT" ]
null
null
null
alpyro_msgs/visualization_msgs/interactivemarkerpose.py
rho2/alpyro_msgs
b5a680976c40c83df70d61bb2db1de32a1cde8d3
[ "MIT" ]
null
null
null
from alpyro_msgs import RosMessage, string from alpyro_msgs.geometry_msgs.pose import Pose from alpyro_msgs.std_msgs.header import Header class InteractiveMarkerPose(RosMessage): __msg_typ__ = "visualization_msgs/InteractiveMarkerPose" __msg_def__ = "c3RkX21zZ3MvSGVhZGVyIGhlYWRlcgogIHVpbnQzMiBzZXEKICB0aW1lIHN0YW1...
51.428571
382
0.906944
from alpyro_msgs import RosMessage, string from alpyro_msgs.geometry_msgs.pose import Pose from alpyro_msgs.std_msgs.header import Header class InteractiveMarkerPose(RosMessage): __msg_typ__ = "visualization_msgs/InteractiveMarkerPose" __msg_def__ = "c3RkX21zZ3MvSGVhZGVyIGhlYWRlcgogIHVpbnQzMiBzZXEKICB0aW1lIHN0YW1...
true
true
f76eb6ce7389b2d0e2ebc334ad778c9d4f96a756
31,053
py
Python
src/SeleniumLibrary/keywords/browsermanagement.py
gecaphoenix/virtualRepo
77e325ac02dbb62434897c29b1925a50ca4e1237
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/SeleniumLibrary/keywords/browsermanagement.py
gecaphoenix/virtualRepo
77e325ac02dbb62434897c29b1925a50ca4e1237
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/SeleniumLibrary/keywords/browsermanagement.py
gecaphoenix/virtualRepo
77e325ac02dbb62434897c29b1925a50ca4e1237
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Copyright 2008-2011 Nokia Networks # Copyright 2011-2016 Ryan Tomac, Ed Manlove and contributors # Copyright 2016- Robot Framework Foundation # # 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 Licens...
42.422131
161
0.622903
import os.path import time import types from robot.errors import DataError from selenium import webdriver from selenium.common.exceptions import NoSuchWindowException from SeleniumLibrary.base import LibraryComponent, keyword from SeleniumLibrary.locators.windowmanager import WindowManager from SeleniumLibrary.utils...
true
true
f76eb9029ad2e8561cfaf3d3259f66568f82e4f0
3,946
py
Python
examples/test_shellshock.py
unixorn/agamotto
7741c9f9f51fe94ba0b91bc9af9f84258bc623a9
[ "Apache-2.0" ]
null
null
null
examples/test_shellshock.py
unixorn/agamotto
7741c9f9f51fe94ba0b91bc9af9f84258bc623a9
[ "Apache-2.0" ]
null
null
null
examples/test_shellshock.py
unixorn/agamotto
7741c9f9f51fe94ba0b91bc9af9f84258bc623a9
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # ---------------------------------------------------------------------- # Copyright (C) 2014 Numenta # # 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....
40.680412
77
0.572478
import agamotto import unittest2 as unittest class TestForBashSecurityBugs(unittest.TestCase): def testForBashCVE_2014_6271(self): test6271 = ("(env x='() { :;}; echo vulnerable' " "bash -c \"echo this is a test\") 2>&1") self.assertFalse(agamotto.process.stdoutContains(test6271, 'vulnerabl...
true
true
f76eb91960dab49a0d23b120333fb9c756585a3b
6,514
py
Python
nnf/cli.py
vishalbelsare/python-nnf
c2e81fd7851a3d11fff904bf5b4c5e521fde59ab
[ "0BSD" ]
14
2020-07-14T01:51:26.000Z
2021-12-17T22:45:47.000Z
nnf/cli.py
vishalbelsare/python-nnf
c2e81fd7851a3d11fff904bf5b4c5e521fde59ab
[ "0BSD" ]
26
2020-07-14T23:37:52.000Z
2021-11-04T18:06:38.000Z
nnf/cli.py
vishalbelsare/python-nnf
c2e81fd7851a3d11fff904bf5b4c5e521fde59ab
[ "0BSD" ]
7
2020-07-26T10:53:21.000Z
2021-09-19T00:35:30.000Z
"""A command line interface for some of the package's functionality. It can be used by invoking nnf as a module (``python3 -m nnf``) or by running the ``pynnf`` script installed with the package. """ import argparse import contextlib import subprocess import sys import time import typing as t from types import Simpl...
29.342342
77
0.600092
import argparse import contextlib import subprocess import sys import time import typing as t from types import SimpleNamespace from nnf import NNF, dimacs DOT_FORMATS = {'ps', 'pdf', 'svg', 'fig', 'png', 'gif', 'jpg', 'jpeg'} @contextlib.contextmanager def timer(args: argparse.Namespace) -> t.Iterator[SimpleNam...
true
true
f76eb9f0940977c81861454cf6b95d064162fb36
1,494
py
Python
api/services/test_stv.py
theonaciri/PoliticallyCorrect
6e7ad7b9c89ce6fefdd86ff0d8b29dde8bf0288e
[ "MIT" ]
null
null
null
api/services/test_stv.py
theonaciri/PoliticallyCorrect
6e7ad7b9c89ce6fefdd86ff0d8b29dde8bf0288e
[ "MIT" ]
null
null
null
api/services/test_stv.py
theonaciri/PoliticallyCorrect
6e7ad7b9c89ce6fefdd86ff0d8b29dde8bf0288e
[ "MIT" ]
null
null
null
from pyvotecore.stv import STV import sys import json class SetEncoder(json.JSONEncoder): def default(self, obj): if isinstance(obj, set): return list(obj) return json.JSONEncoder.default(self, obj) class TestSTV(): # STV, example from Wikipedia # http://en.wikipedia.org/wiki/...
39.315789
144
0.555556
from pyvotecore.stv import STV import sys import json class SetEncoder(json.JSONEncoder): def default(self, obj): if isinstance(obj, set): return list(obj) return json.JSONEncoder.default(self, obj) class TestSTV(): def test_stv_wiki_example(self): votes = ...
false
true
f76eba254ca732175978b3a07917f55059388b7e
386
py
Python
Config/libraries.py
HashzSoftware/YamlMake
cdd55aa0c17dbb6f396cddb2bc9ed58043b582be
[ "MIT" ]
1
2021-05-27T09:34:55.000Z
2021-05-27T09:34:55.000Z
Config/libraries.py
HashzSoftware/YamlMake
cdd55aa0c17dbb6f396cddb2bc9ed58043b582be
[ "MIT" ]
null
null
null
Config/libraries.py
HashzSoftware/YamlMake
cdd55aa0c17dbb6f396cddb2bc9ed58043b582be
[ "MIT" ]
null
null
null
libpath = "" def _set_lib_path(p_path): global libpath if libpath != "": libpath += " -L%s" % p_path else: libpath += "-L%s" % p_path def _get_lib_path(): return libpath libs = "" def _add_lib(p_lib): global libs if libs != "": libs += " -l%s" % p_lib else...
14.296296
35
0.512953
libpath = "" def _set_lib_path(p_path): global libpath if libpath != "": libpath += " -L%s" % p_path else: libpath += "-L%s" % p_path def _get_lib_path(): return libpath libs = "" def _add_lib(p_lib): global libs if libs != "": libs += " -l%s" % p_lib else...
true
true
f76eba86234f526e59578c01439cf9cd6449c95b
2,217
py
Python
presentation_materials/spreadsheet2.py
sherrli/Testing-Automation
d5a59ed10613b782cd4a8dc29d084c78ee883300
[ "MIT" ]
1
2019-04-05T15:51:30.000Z
2019-04-05T15:51:30.000Z
presentation_materials/spreadsheet2.py
shli17/Testing-Automation
d5a59ed10613b782cd4a8dc29d084c78ee883300
[ "MIT" ]
null
null
null
presentation_materials/spreadsheet2.py
shli17/Testing-Automation
d5a59ed10613b782cd4a8dc29d084c78ee883300
[ "MIT" ]
null
null
null
import gspread from oauth2client.service_account import ServiceAccountCredentials from selenium import webdriver import timeit from selenium.common.exceptions import TimeoutException from selenium.webdriver.support.ui import WebDriverWait # available since 2.4.0 from selenium.webdriver.support import expected_condition...
32.602941
102
0.691024
import gspread from oauth2client.service_account import ServiceAccountCredentials from selenium import webdriver import timeit from selenium.common.exceptions import TimeoutException from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.we...
true
true
f76ebb70e9da3f76780b0364b6648dd457bd1b86
1,171
py
Python
eng/versioning/version_set.py
quxiaozha/azure-sdk-for-python
60af58e4e356714383ced0a2cb0b1433237a0ee1
[ "MIT" ]
null
null
null
eng/versioning/version_set.py
quxiaozha/azure-sdk-for-python
60af58e4e356714383ced0a2cb0b1433237a0ee1
[ "MIT" ]
null
null
null
eng/versioning/version_set.py
quxiaozha/azure-sdk-for-python
60af58e4e356714383ced0a2cb0b1433237a0ee1
[ "MIT" ]
null
null
null
import argparse from version_shared import get_packages, set_version_py, set_dev_classifier DEFAULT_SDK_PATH = "../../sdk/" if __name__ == '__main__': parser = argparse.ArgumentParser(description='Increments version for a given package name based on the released version') parser.add_argument('--sdk-path', de...
40.37931
151
0.735269
import argparse from version_shared import get_packages, set_version_py, set_dev_classifier DEFAULT_SDK_PATH = "../../sdk/" if __name__ == '__main__': parser = argparse.ArgumentParser(description='Increments version for a given package name based on the released version') parser.add_argument('--sdk-path', de...
true
true
f76ebbecac5b53a406af7e176e3b8644d20039d0
4,628
py
Python
official/nlp/modeling/models/bert_classifier_test.py
lightbooster/models
833900b085a353712010c26c66ae9111246b5ac7
[ "Apache-2.0" ]
2
2021-04-26T06:40:23.000Z
2021-05-02T19:27:48.000Z
official/nlp/modeling/models/bert_classifier_test.py
lightbooster/models
833900b085a353712010c26c66ae9111246b5ac7
[ "Apache-2.0" ]
2
2021-03-24T23:09:46.000Z
2021-03-25T18:42:10.000Z
official/nlp/modeling/models/bert_classifier_test.py
lightbooster/models
833900b085a353712010c26c66ae9111246b5ac7
[ "Apache-2.0" ]
1
2021-12-04T19:35:04.000Z
2021-12-04T19:35:04.000Z
# Copyright 2021 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
44.932039
101
0.737684
from absl.testing import parameterized import tensorflow as tf from tensorflow.python.keras import keras_parameterized from official.nlp.modeling import networks from official.nlp.modeling.models import bert_classifier @keras_parameterized.run_all_keras_modes class BertClassifierTest(keras_parameterized.TestCase)...
true
true
f76ebc9412cc887f7eb0e2981c2ef8d6ef3ea918
82
py
Python
kivymd_extensions/akivymd/__init__.py
VICTORVICKIE/akivymd
36e3a4243ce33ae8f713297e9f590b8f6068dbc9
[ "MIT" ]
null
null
null
kivymd_extensions/akivymd/__init__.py
VICTORVICKIE/akivymd
36e3a4243ce33ae8f713297e9f590b8f6068dbc9
[ "MIT" ]
null
null
null
kivymd_extensions/akivymd/__init__.py
VICTORVICKIE/akivymd
36e3a4243ce33ae8f713297e9f590b8f6068dbc9
[ "MIT" ]
null
null
null
__version__ = "1.2.5" import kivymd_extensions.akivymd.factory_registers # NOQA
20.5
58
0.792683
__version__ = "1.2.5" import kivymd_extensions.akivymd.factory_registers
true
true
f76ebce2a5bc39aa430ce9f63f89c5d9d6c99fe7
2,365
py
Python
scripts/process_test.py
wangqi1996/ST
9ca92aafc07242b2e36d00624586b21aa58e784b
[ "MIT" ]
null
null
null
scripts/process_test.py
wangqi1996/ST
9ca92aafc07242b2e36d00624586b21aa58e784b
[ "MIT" ]
null
null
null
scripts/process_test.py
wangqi1996/ST
9ca92aafc07242b2e36d00624586b21aa58e784b
[ "MIT" ]
null
null
null
import os import shutil def process(): key = 1000 bin_dirname = "/home/data_ti5_c/wangdq/data/ema/data/split_docs/bin/" + str(key) raw_dirname = "/home/data_ti5_c/wangdq/data/ema/data/split_docs/" new_dirname = "/home/data_ti5_c/wangdq/data/ema/data/select/" + str(key) filelist = set(os.listdir(...
39.416667
373
0.626216
import os import shutil def process(): key = 1000 bin_dirname = "/home/data_ti5_c/wangdq/data/ema/data/split_docs/bin/" + str(key) raw_dirname = "/home/data_ti5_c/wangdq/data/ema/data/split_docs/" new_dirname = "/home/data_ti5_c/wangdq/data/ema/data/select/" + str(key) filelist = set(os.listdir(...
true
true
f76ebdd47c466a14492863ad32243f63fbca0328
66,533
py
Python
tensorflow/python/ops/math_grad.py
MathMachado/tensorflow
56afda20b15f234c23e8393f7e337e7dd2659c2d
[ "Apache-2.0" ]
10
2018-09-26T00:16:57.000Z
2021-12-08T06:31:39.000Z
tensorflow/python/ops/math_grad.py
MathMachado/tensorflow
56afda20b15f234c23e8393f7e337e7dd2659c2d
[ "Apache-2.0" ]
null
null
null
tensorflow/python/ops/math_grad.py
MathMachado/tensorflow
56afda20b15f234c23e8393f7e337e7dd2659c2d
[ "Apache-2.0" ]
4
2018-09-18T19:56:31.000Z
2020-09-15T09:54:44.000Z
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
34.870545
112
0.687298
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from tensorflow.python import pywrap_tensorflow as c_api from tensorflow.python.compat import compat from tensorflow.python.eager import context from tensorflow.python.framework import const...
true
true
f76ebec94419fbbfbe42a5ed9751828f4439e701
516
py
Python
challenge/users/admin.py
ramses132/spaceag-challenge
88c7a13159a4990578f7f1f5922a7c92dfde5a30
[ "MIT" ]
null
null
null
challenge/users/admin.py
ramses132/spaceag-challenge
88c7a13159a4990578f7f1f5922a7c92dfde5a30
[ "MIT" ]
null
null
null
challenge/users/admin.py
ramses132/spaceag-challenge
88c7a13159a4990578f7f1f5922a7c92dfde5a30
[ "MIT" ]
null
null
null
from django.contrib import admin from django.contrib.auth import admin as auth_admin from django.contrib.auth import get_user_model from challenge.users.forms import UserChangeForm, UserCreationForm User = get_user_model() @admin.register(User) class UserAdmin(auth_admin.UserAdmin): form = UserChangeForm a...
28.666667
83
0.748062
from django.contrib import admin from django.contrib.auth import admin as auth_admin from django.contrib.auth import get_user_model from challenge.users.forms import UserChangeForm, UserCreationForm User = get_user_model() @admin.register(User) class UserAdmin(auth_admin.UserAdmin): form = UserChangeForm a...
true
true
f76ebecc6793320ec1ceb2ccf16dc231c23eef68
839
py
Python
generator/migrations/0004_credentialsmodel.py
sewardhorace/infinite-archipelago
a3fdec376ed3512dcb82f5c49167521998787ac2
[ "MIT" ]
null
null
null
generator/migrations/0004_credentialsmodel.py
sewardhorace/infinite-archipelago
a3fdec376ed3512dcb82f5c49167521998787ac2
[ "MIT" ]
3
2020-02-12T00:19:26.000Z
2021-04-30T20:33:19.000Z
generator/migrations/0004_credentialsmodel.py
sewardhorace/infinite-archipelago
a3fdec376ed3512dcb82f5c49167521998787ac2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-08-24 23:42 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import oauth2client.contrib.django_util.models class Migration(migrations.Migration): depend...
31.074074
151
0.674613
from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import oauth2client.contrib.django_util.models class Migration(migrations.Migration): dependencies = [ ('auth', '0008_alter_user_username_max_length'), ...
true
true
f76ebf275a1de60bedf106a26d414306ba8787bd
1,349
py
Python
Tests/googledrive_test.py
Kadantte/VideoSuperResolution
4c86e49d81c7a9bea1fe0780d651afc126768df3
[ "MIT" ]
1,447
2018-06-04T08:44:07.000Z
2022-03-29T06:19:10.000Z
Tests/googledrive_test.py
AbdulMoqeet/VideoSuperResolution
82c3347554561ff9dfb5e86d9cf0a55239ca662e
[ "MIT" ]
96
2018-08-29T01:02:45.000Z
2022-01-12T06:00:01.000Z
Tests/googledrive_test.py
AbdulMoqeet/VideoSuperResolution
82c3347554561ff9dfb5e86d9cf0a55239ca662e
[ "MIT" ]
307
2018-06-26T13:35:54.000Z
2022-01-21T09:01:54.000Z
# Copyright (c) 2017-2020 Wenyi Tang. # Author: Wenyi Tang # Email: wenyitang@outlook.com # Update: 2020 - 2 - 16 import os import unittest if not os.getcwd().endswith('Tests'): os.chdir('Tests') try: from googleapiclient.discovery import build from httplib2 import Http from oauth2client import file, cli...
29.977778
79
0.704225
import os import unittest if not os.getcwd().endswith('Tests'): os.chdir('Tests') try: from googleapiclient.discovery import build from httplib2 import Http from oauth2client import file, client, tools except ImportError as ex: print(f"[!] {ex}") exit(-1) SCOPES = 'https://www.googleapis.com/auth/drive....
true
true
f76ec03added1cba9487d92c4bd6aabfdf00ee2b
1,840
py
Python
src/sagemaker_containers/_process.py
uditbhatia/sagemaker-containers
3c499c8a4e00c7ff7486a4632c9330b5ea2313d3
[ "Apache-2.0" ]
null
null
null
src/sagemaker_containers/_process.py
uditbhatia/sagemaker-containers
3c499c8a4e00c7ff7486a4632c9330b5ea2313d3
[ "Apache-2.0" ]
null
null
null
src/sagemaker_containers/_process.py
uditbhatia/sagemaker-containers
3c499c8a4e00c7ff7486a4632c9330b5ea2313d3
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the 'License'). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the 'license' file acc...
32.857143
103
0.719565
from __future__ import absolute_import import os import subprocess import sys import six from sagemaker_containers import _env def create(cmd, error_class, cwd=None, capture_error=False, **kwargs): try: stderr = subprocess.PIPE if capture_error else None return subprocess.Popen(cmd, env=os.envi...
true
true
f76ec0c0bd18d37040904f3f6825eb1003487187
746
py
Python
populous/inlines/__init__.py
caiges/populous
d07094f9d6b2528d282ed99af0063002480bc00b
[ "BSD-3-Clause" ]
2
2016-05-09T01:17:08.000Z
2017-07-18T23:35:01.000Z
populous/inlines/__init__.py
caiges/populous
d07094f9d6b2528d282ed99af0063002480bc00b
[ "BSD-3-Clause" ]
null
null
null
populous/inlines/__init__.py
caiges/populous
d07094f9d6b2528d282ed99af0063002480bc00b
[ "BSD-3-Clause" ]
null
null
null
from populous.inlines.base import Inline, ModelInline from populous.inlines.forms import InlineForm, ForeignKeyRawIdWidget from populous.inlines.models import RegisteredInline, RegisteredInlineField from populous.inlines.fields import InlineField __all__ = ['Inline', 'ModelInline', 'InlineForm', 'ForeignKeyRawIdWidget...
35.52381
75
0.756032
from populous.inlines.base import Inline, ModelInline from populous.inlines.forms import InlineForm, ForeignKeyRawIdWidget from populous.inlines.models import RegisteredInline, RegisteredInlineField from populous.inlines.fields import InlineField __all__ = ['Inline', 'ModelInline', 'InlineForm', 'ForeignKeyRawIdWidget...
true
true
f76ec10367bb25b2b10edff5272932f4031c572d
2,894
py
Python
pocket-learning-algorithm-and-feature-engineering/iris_example.py
shunsvineyard/shunsvineyard
5ef44847da95e8ad881622d2c3571a3aceb1b20c
[ "MIT" ]
1
2022-03-22T08:35:32.000Z
2022-03-22T08:35:32.000Z
pocket-learning-algorithm-and-feature-engineering/iris_example.py
shunsvineyard/shunsvineyard
5ef44847da95e8ad881622d2c3571a3aceb1b20c
[ "MIT" ]
null
null
null
pocket-learning-algorithm-and-feature-engineering/iris_example.py
shunsvineyard/shunsvineyard
5ef44847da95e8ad881622d2c3571a3aceb1b20c
[ "MIT" ]
5
2019-01-17T07:41:15.000Z
2022-02-11T15:59:18.000Z
# Copyright © 2017, 2019 by Shun Huang. All rights reserved. # Licensed under MIT License. # See LICENSE in the project root for license information. """An example of supervised learning uses the Iris data set. https://archive.ics.uci.edu/ml/datasets/Iris Attribute Information: 0. sepal length in cm 1. sepal width in...
34.452381
79
0.75812
import urllib.request import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns sns.set() import perceptron_classifier URL = "http://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data" urllib.request.urlretrieve(URL, "iris.data") # Note: the iris.data is headerl...
true
true
f76ec2628cde7681e4cb514ebd1579c15ac77e51
13,160
py
Python
tests/commands/test_list.py
alisaifee/coredis
e72f5d7c665b53e6a1d41e1a7fb9e400858a8b19
[ "MIT" ]
9
2022-01-07T07:42:08.000Z
2022-03-21T15:54:09.000Z
tests/commands/test_list.py
alisaifee/coredis
e72f5d7c665b53e6a1d41e1a7fb9e400858a8b19
[ "MIT" ]
30
2022-01-15T23:33:36.000Z
2022-03-30T22:39:53.000Z
tests/commands/test_list.py
alisaifee/coredis
e72f5d7c665b53e6a1d41e1a7fb9e400858a8b19
[ "MIT" ]
3
2022-01-13T06:11:13.000Z
2022-02-21T11:19:33.000Z
from __future__ import annotations import asyncio import pytest from coredis import PureToken from tests.conftest import server_deprecation_warning, targets @targets( "redis_basic", "redis_basic_raw", "redis_basic_resp3", "redis_basic_raw_resp3", "redis_cluster", "redis_cluster_raw", "r...
40.492308
88
0.512234
from __future__ import annotations import asyncio import pytest from coredis import PureToken from tests.conftest import server_deprecation_warning, targets @targets( "redis_basic", "redis_basic_raw", "redis_basic_resp3", "redis_basic_raw_resp3", "redis_cluster", "redis_cluster_raw", "r...
true
true
f76ec2c76125e466a12552a14a3251490a6755b9
3,332
py
Python
orc8r/gateway/python/magma/common/redis/mocks/mock_redis.py
alexsn/magma
19d930e7b78ff6916f53516d909dfd2ceba99c4a
[ "BSD-3-Clause" ]
null
null
null
orc8r/gateway/python/magma/common/redis/mocks/mock_redis.py
alexsn/magma
19d930e7b78ff6916f53516d909dfd2ceba99c4a
[ "BSD-3-Clause" ]
null
null
null
orc8r/gateway/python/magma/common/redis/mocks/mock_redis.py
alexsn/magma
19d930e7b78ff6916f53516d909dfd2ceba99c4a
[ "BSD-3-Clause" ]
null
null
null
""" Copyright (c) 2016-present, Facebook, Inc. All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. An additional grant of patent rights can be found in the PATENTS file in the same directory. """ class MockRedis(object): ...
25.630769
75
0.579232
class MockRedis(object): redis = {} def __init__(self, host, port): self.host = host self.port = port def serialize_key(self, key): return key.encode('utf-8') def deserialize_key(self, serialized): return serialized.decode('utf-8') def delete(self, key): ...
true
true
f76ec3ba753fff6e57bb4089e4cd321becfeed4b
25,640
py
Python
sphinx/ext/autosummary/__init__.py
yassu/sphinx
4b4416834b4a10b5d162ee2b6e43018f287b81f9
[ "BSD-2-Clause" ]
null
null
null
sphinx/ext/autosummary/__init__.py
yassu/sphinx
4b4416834b4a10b5d162ee2b6e43018f287b81f9
[ "BSD-2-Clause" ]
null
null
null
sphinx/ext/autosummary/__init__.py
yassu/sphinx
4b4416834b4a10b5d162ee2b6e43018f287b81f9
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ sphinx.ext.autosummary ~~~~~~~~~~~~~~~~~~~~~~ Sphinx extension that adds an autosummary:: directive, which can be used to generate function/method/attribute/etc. summary lists, similar to those output eg. by Epydoc and other API doc generation tools. An :autolink: r...
34.695535
137
0.587402
import inspect import os import posixpath import re import sys import warnings from types import ModuleType from typing import List, cast from docutils import nodes from docutils.parsers.rst import directives from docutils.parsers.rst.states import RSTStateMachine, state_classes from docutils.statemachine import Stri...
true
true
f76ec41cb4c066167806f8f77bfdb8507cdc27f6
7,351
py
Python
pyathena/tigress_xco/plt_tigress_xco.py
changgoo/pyathena-1
c461ac3390d773537ce52393e3ebf68a3282aa46
[ "MIT" ]
1
2019-10-03T13:59:14.000Z
2019-10-03T13:59:14.000Z
pyathena/tigress_xco/plt_tigress_xco.py
changgoo/pyathena-1
c461ac3390d773537ce52393e3ebf68a3282aa46
[ "MIT" ]
3
2020-09-23T23:36:17.000Z
2022-01-11T06:16:56.000Z
pyathena/tigress_xco/plt_tigress_xco.py
changgoo/pyathena-1
c461ac3390d773537ce52393e3ebf68a3282aa46
[ "MIT" ]
2
2019-06-10T04:26:16.000Z
2019-12-04T22:27:02.000Z
#!/usr/bin/env python import os import sys import time import os.path as osp import matplotlib as mpl import matplotlib.pyplot as plt from matplotlib import gridspec import numpy as np import xarray as xr from mpi4py import MPI from .load_sim_tigress_xco import LoadSimTIGRESSXCOAll from ..util.split_container import...
31.016878
97
0.573119
import os import sys import time import os.path as osp import matplotlib as mpl import matplotlib.pyplot as plt from matplotlib import gridspec import numpy as np import xarray as xr from mpi4py import MPI from .load_sim_tigress_xco import LoadSimTIGRESSXCOAll from ..util.split_container import split_container from ...
true
true
f76ec6217d93b0a1510a612bd2b515a40ebbb622
1,164
py
Python
Applications/GE/example/python_script/most_popular_flickr.py
apir8181/DLINE
2777dea9085cdf60592cfeafa1f9094c41ebe923
[ "MIT" ]
null
null
null
Applications/GE/example/python_script/most_popular_flickr.py
apir8181/DLINE
2777dea9085cdf60592cfeafa1f9094c41ebe923
[ "MIT" ]
null
null
null
Applications/GE/example/python_script/most_popular_flickr.py
apir8181/DLINE
2777dea9085cdf60592cfeafa1f9094c41ebe923
[ "MIT" ]
null
null
null
import sys from collections import defaultdict if __name__ == "__main__": in_path = sys.argv[1] out_path = sys.argv[2] group_count = defaultdict(int) with open(in_path) as in_file: for line in in_file: args = line.strip().split() for arg in args[1:]: gro...
32.333333
68
0.52921
import sys from collections import defaultdict if __name__ == "__main__": in_path = sys.argv[1] out_path = sys.argv[2] group_count = defaultdict(int) with open(in_path) as in_file: for line in in_file: args = line.strip().split() for arg in args[1:]: gro...
true
true
f76ec68c45d675b6309efe38899c12a7eeb80587
22,566
py
Python
tunnistamo/attribute-maps/basic.py
seitztimo/tunnistamo
666601489d38ab168f9a2e2020f7441c233282a9
[ "MIT" ]
8
2018-11-13T06:05:07.000Z
2021-09-18T22:01:52.000Z
tunnistamo/attribute-maps/basic.py
seitztimo/tunnistamo
666601489d38ab168f9a2e2020f7441c233282a9
[ "MIT" ]
185
2017-06-08T12:48:47.000Z
2022-03-22T08:26:36.000Z
tunnistamo/attribute-maps/basic.py
seitztimo/tunnistamo
666601489d38ab168f9a2e2020f7441c233282a9
[ "MIT" ]
19
2017-06-08T13:02:37.000Z
2021-02-15T13:10:35.000Z
MAP = { "identifier": "urn:oasis:names:tc:SAML:2.0:attrname-format:basic", "fro": { 'urn:mace:dir:attribute-def:aRecord': 'aRecord', 'urn:mace:dir:attribute-def:aliasedEntryName': 'aliasedEntryName', 'urn:mace:dir:attribute-def:aliasedObjectName': 'aliasedObjectName', 'urn:mace:...
69.009174
100
0.701143
MAP = { "identifier": "urn:oasis:names:tc:SAML:2.0:attrname-format:basic", "fro": { 'urn:mace:dir:attribute-def:aRecord': 'aRecord', 'urn:mace:dir:attribute-def:aliasedEntryName': 'aliasedEntryName', 'urn:mace:dir:attribute-def:aliasedObjectName': 'aliasedObjectName', 'urn:mace:...
true
true
f76ec8ad1be82acc2a95e6beaf1f9ebc64c02c5d
905
py
Python
recipes/update_project_title.py
marcenacp/kili-playground
d3a711d1908725d127cc99ceb504301482bf41d8
[ "Apache-2.0" ]
null
null
null
recipes/update_project_title.py
marcenacp/kili-playground
d3a711d1908725d127cc99ceb504301482bf41d8
[ "Apache-2.0" ]
null
null
null
recipes/update_project_title.py
marcenacp/kili-playground
d3a711d1908725d127cc99ceb504301482bf41d8
[ "Apache-2.0" ]
null
null
null
import getpass import click from kili.authentication import KiliAuth from kili.playground import Playground @click.command() @click.option('--api_endpoint', default='https://cloud.kili-technology.com/api/label/graphql', help='Endpoint of GraphQL client') def main(api_endpoint): email = input('Ente...
31.206897
103
0.702762
import getpass import click from kili.authentication import KiliAuth from kili.playground import Playground @click.command() @click.option('--api_endpoint', default='https://cloud.kili-technology.com/api/label/graphql', help='Endpoint of GraphQL client') def main(api_endpoint): email = input('Ente...
true
true