blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 288 | content_id stringlengths 40 40 | detected_licenses listlengths 0 112 | license_type stringclasses 2
values | repo_name stringlengths 5 115 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 684
values | visit_date timestamp[us]date 2015-08-06 10:31:46 2023-09-06 10:44:38 | revision_date timestamp[us]date 1970-01-01 02:38:32 2037-05-03 13:00:00 | committer_date timestamp[us]date 1970-01-01 02:38:32 2023-09-06 01:08:06 | github_id int64 4.92k 681M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 22
values | gha_event_created_at timestamp[us]date 2012-06-04 01:52:49 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[us]date 2008-05-22 07:58:19 2023-08-21 12:35:19 ⌀ | gha_language stringclasses 147
values | src_encoding stringclasses 25
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 128 12.7k | extension stringclasses 142
values | content stringlengths 128 8.19k | authors listlengths 1 1 | author_id stringlengths 1 132 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5ebb3eb417bdf94394f350700bcb281d08622d0c | 739bb7e4a2579047ebdb5bdd27bd0664f3cf49bc | /creme/anomaly/hst.py | a0a9deec871f90f30b28656af736facd8c174d67 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | igorol/creme | 93595ffcbbd34fccd247f523afb3a2e89262d307 | 60977c4accfdca08cfd76a162095ff738ef87281 | refs/heads/master | 2023-04-06T07:09:42.766293 | 2019-09-08T09:16:45 | 2019-09-08T09:16:45 | 207,170,095 | 0 | 0 | NOASSERTION | 2023-03-24T23:29:46 | 2019-09-08T20:34:07 | null | UTF-8 | Python | false | false | 6,263 | py | import collections
import random
from .. import preprocessing
from . import base
Limits = collections.namedtuple('Limits', 'lower upper')
Split = collections.namedtuple('Split', 'feature value')
class Node:
def __init__(self, depth, size_limit, split=None, left=None, right=None):
self.split = split
... | [
"maxhalford25@gmail.com"
] | maxhalford25@gmail.com |
9c8b11a8616514eca2971f2771b3f0e71f38c6fa | 2b5dfacdb7389aefff64c67fac863e3f82d3723e | /source/tyframework/src/tyframework/_private_/util/constants.py | 65ddd337dca2ec164f9f24c34c413175befa579b | [] | no_license | hi-noikiy/hall0 | 54ef76c715f7ac7fec4c9ca175817e12f60fbd6a | 21ea94c5b048bc611fb1557ac0b6e3ef4fdbbc09 | refs/heads/master | 2020-04-08T21:58:55.239106 | 2018-01-15T14:58:32 | 2018-01-15T14:58:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,385 | py | # -*- coding=utf-8 -*-
class Const(object):
SDK_GAMEID = 9998
REDIS_POOL_SIZE = 16
PROVINCE_MAP = {'230000': u"安徽",
'100000': u"北京",
'350000': u"福建",
'730000': u"甘肃",
'510000': u"广东",
'530000': u"广西",
... | [
"cg@ibenxi.com"
] | cg@ibenxi.com |
561504db44c2c789fabd0e298c4a9470c57ba9be | 830ed761c1cbca7bd36bd2e0513f0d27c60ac53f | /apps/light-bootstrap-dashboard-flask/app/views.py | 619d6db58c988cff0cdb35469880e60db1f043d4 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | giasukg/appseed | e3972198c1a7aea435ebb5b03d977c78c9a3e964 | cb82732b263086570b39fe181eb3e3e88d949562 | refs/heads/master | 2020-04-09T20:53:09.947324 | 2018-11-29T21:34:48 | 2018-11-29T21:34:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,234 | py | # -*- encoding: utf-8 -*-
"""
Flask Web App - Generated by www.AppSeed.us
AppSeed - developed by RoSoft | www.RoSoftware.ro
Licence: MIT
"""
# all the imports necessary
from flask import url_for, redirect, render_template, flash, g, session, jsonify, request, send_from_directory
from flask_login import login_use... | [
"developer@rosoftware.ro"
] | developer@rosoftware.ro |
adf32da6d160fcea3a3c5abbaf2c6b30cd6e9b21 | e88dbf121b5b9669daca50c536df74b159968e10 | /Client/Tests/StressTestSuite/parameters.py | 3dc8c70f0767bce52b56da7b43f14f911c5d43e6 | [] | no_license | dmwm/DLSAPI | 82fef7fd322bd8478299be87ae785ab4d1fa1274 | a8618da6aec68df001cc7bd05ac64b8916c34e71 | refs/heads/master | 2021-01-20T11:31:48.878894 | 2013-10-30T12:08:00 | 2013-10-30T12:08:00 | 13,985,003 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,230 | py | #!/usr/bin/env python
#
# 17-February-2006 Fabio Farina
#
# Parameters file: put here the test case configuration parameters
# general CLI and client parameters
threadNum = 1
#clientDir = './dummy_dls/'
clientDir = '../../LFCClient/'
# attribute for action2command list expansion
nBlocks = 4
nReplicas = 1
# paretoK ... | [
"giulio.eulisse@cern.ch"
] | giulio.eulisse@cern.ch |
498ff6bef16a5c0227cfad5f4ab8438b6c385bf6 | 0e27bd3707eb1578e156dff1d47041afa7a7865e | /pycatia/in_interfaces/references.py | b5cb8e80bddcf8ba3e5b0d049e75709f34d747f3 | [
"MIT"
] | permissive | xiaoxiongnpu/pycatia | f14b12348b8020b3a1bab076fb3fafd3c8fb371c | 8ede0a340c40d3d20b676ed718f03460bad1d8c4 | refs/heads/master | 2023-04-02T13:35:19.920804 | 2020-12-30T13:35:01 | 2020-12-30T13:35:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,321 | py | #! usr/bin/python3.6
"""
Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-06-11 12:40:47.360445
.. warning::
The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only.
They are there as a guide as to how the visual basic / catscript function... | [
"evereux@gmail.com"
] | evereux@gmail.com |
c1f8e1b11393b9ed8b7008ced50591584cb855c0 | 8f64d50494507fd51c0a51010b84d34c667bd438 | /BeautyForMe/myvenv/Lib/site-packages/openpyxl/xml/__init__.py | b566c7bfa1d1d9e2d92a01bbe09b586d5b1b2884 | [
"MIT"
] | permissive | YooInKeun/CAU_CSE_Capstone_3 | 5a4a61a916dc13c8635d25a04d59c21279678477 | 51405c4bed2b55661aa0708c8acea17fe72aa701 | refs/heads/master | 2022-12-11T15:39:09.721019 | 2021-07-27T08:26:04 | 2021-07-27T08:26:04 | 207,294,862 | 6 | 1 | MIT | 2022-11-22T04:52:11 | 2019-09-09T11:37:13 | Python | UTF-8 | Python | false | false | 1,016 | py | # Copyright (c) 2010-2019 openpyxl
"""Collection of XML resources compatible across different Python versions"""
import os
def lxml_available():
try:
from lxml.etree import LXML_VERSION
LXML = LXML_VERSION >= (3, 3, 1, 0)
if not LXML:
import warnings
warnings.warn... | [
"keun0390@naver.com"
] | keun0390@naver.com |
b38c42cf79036f3d5a780f3ca08e1ec832ae42e1 | 1e26ab8c87abbd7a5c7353fc85e868badaed51c1 | /{{ cookiecutter.service_name }}/{{ cookiecutter.package_name }}/utils.py | a64e60cdf914c3d20467f1725c49d202c24a9451 | [
"MIT"
] | permissive | Aniket1313/boilerplate | 78be5a83de403d32a44cac127569bdc31d827380 | 8b0c80b17dbc0d410347116e20866afdca487c1c | refs/heads/master | 2022-07-18T22:48:26.351864 | 2020-05-19T03:44:14 | 2020-05-19T03:44:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,215 | py | # utils.py - utility functions to aid app operations.
import os
from datetime import datetime
from functools import wraps
from http import HTTPStatus
import json
import shutil
def create_dirs(dirpath):
"""Creating directories."""
if not os.path.exists(dirpath):
os.makedirs(dirpath)
def load_json(fi... | [
"gokumd@gmail.com"
] | gokumd@gmail.com |
d138f72ceeaa5f2327cbfe7c41b6fa993cd411ca | 80cfd0cc52f585f6fb7f6c0e06776861ac6f2122 | /max_points_from_cards_v1.py | 66cf9f794a81a6c4023eddaaab9d5b8f705c7dfc | [] | no_license | coilysiren/leetcode-snippets | 18f1e3d12fcc33634f744248620b45c0f2a44679 | 442d906e317d73868dedd697713aa0871ccacad5 | refs/heads/master | 2022-04-24T15:31:18.704278 | 2020-04-26T04:48:52 | 2020-04-26T04:48:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,980 | py | # https://leetcode.com/contest/weekly-contest-186/problems/maximum-points-you-can-obtain-from-cards/
#
# time: O(TODO) - TODO
# space: O(TODO) - TODO
from typing import List
class Solution:
def maxScore(self, cardPoints: List[int], k: int) -> int:
maxScore = 0
# this is a recursive decision tre... | [
"firemagelynn@gmail.com"
] | firemagelynn@gmail.com |
b90ed07f9983c6f74e3912db5e70b7e063eabbc8 | a4a31e5603e95fa92ef3af08a04f397a9a26e3fc | /teachers/forms.py | 0c976974f66f2e617a0bbc9f47bcef6670e02b6a | [] | no_license | Erick-ViBe/Temach | 1e3b3a281b3b70968c2c4d4044d67e58610d867e | f4cfd4c21fef17048c499e0a9968dd5b638c0b41 | refs/heads/main | 2022-12-27T10:23:52.601752 | 2020-10-15T21:56:58 | 2020-10-15T21:56:58 | 304,448,275 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 577 | py | from django_registration.forms import RegistrationForm
from teachers.models import Teacher
from django import forms
class TeacherForm(RegistrationForm):
class Meta(RegistrationForm.Meta):
model = Teacher
class CompleteTeacherForm(forms.Form):
CHOICES_GRADE = [
(0, "------"),
(1, "P... | [
"erickvb12@gmail.com"
] | erickvb12@gmail.com |
afd8fcfbdd3fbaee6c1a7604a51bb974a551033f | 5e0144f135edff456caf2045cec53b737e7e8e46 | /encapsulation/grade.py | 77546a7a74bae74bb56212ce29bff749a39a2b6d | [] | no_license | yunnyisgood/python-oop | 8a9ad75b35352288a96df6fb1bb590acb49cdbf7 | 8bf8296c40418ebc34dd1716a3999ca7cc33bce8 | refs/heads/master | 2023-04-27T00:08:12.756096 | 2021-05-25T03:20:39 | 2021-05-25T03:20:39 | 368,100,024 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,256 | py | class Grade:
def __init__(self, kor, math, eng):
self.kor = kor
self.math = math
self.eng = eng
def sum(self):
return self.kor + self.math + self.eng
def avg(self):
return self.sum()/3
def get_grade(self):
score = int(self.avg())
# grade = ''
... | [
"cyeon0801@gmail.com"
] | cyeon0801@gmail.com |
11fd7c7f6a74d7361fe97e944d3612ce28311f41 | addd8285679af957e9990400fc891e80c529a9fa | /weight/users/admin.py | 42ad5190a20688bbc8f7703ad74fc52bef4632dc | [
"MIT"
] | permissive | sirkao/lose_weightapp | 0ac05fe6ca10a0d196b18ef5c9105ba3c425ecc6 | 5e8144b41a598d675e0bd4e3ec88c1087eccea50 | refs/heads/master | 2020-07-17T05:24:57.241622 | 2019-09-03T00:09:10 | 2019-09-03T00:09:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 839 | py | """User models admin."""
# Django
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
# Models
from weight.users.models import (
User,
Profile,
RegistrationType,
Speciality
)
class CustomUserAdmin(UserAdmin):
"""User model admin."""
list_display = ('email', ... | [
"ducode@outlook.com"
] | ducode@outlook.com |
5f2b45868878a160d3a849b4dceb4773943fb1cd | a121722217c4eb002ac2d0217f911bb29960cbaa | /flavio/test_parameters.py | 92ce0f91327ecb948368d9d1bbdd0a17b4dfb38c | [
"MIT"
] | permissive | Varamatango/flavio | 4970c889ec2ba6fca3443cf1c82b37e8e4fd79a4 | 6eded9d7c77f3bb95c291ab4d8409642f76ca0ce | refs/heads/master | 2020-03-24T06:22:48.668065 | 2018-07-09T15:00:51 | 2018-07-09T15:34:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,818 | py | import unittest
import numpy as np
from .parameters import *
from .classes import *
from .parameters import _read_pdg_masswidth
import tempfile
s = 1.519267515435317e+24
ps = 1e-12*s
class TestPDG(unittest.TestCase):
particles = _read_pdg_masswidth('data/pdg/mass_width_2015.mcd')
def test_pdg(self):
... | [
"david.straub@tum.de"
] | david.straub@tum.de |
d51b5cdcee1bee32f7b5d9655bc009d351290341 | 4389d3bfa4ded480caf5083f410bdd2253fae767 | /20_Project/24_ciena_20spans_function/restore_model.py | b4dd4193f11cd467c8db2af81e3f97459c92e877 | [] | no_license | Freshield/LEARN_TENSORFLOW | 4fb7fec0bc7929697549ee52e453b137a24c3383 | 87be0362d24b748c841e5c9e185d2061ffae9272 | refs/heads/master | 2021-01-17T08:06:14.186041 | 2018-06-03T12:42:46 | 2018-06-03T12:42:46 | 83,846,167 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 6,555 | py | from file_system_model import *
from basic_model import *
import flow_model as fm
#restore the model
#ver 1.0
def restore_begin(para_dic, model_name, model_path, log_path = None, loop_indexs_path=None):
#choose model
if model_name == 'resnet_link':
import Resnet_link_model as rl
model = rl
... | [
"zxdsw199182@gmail.com"
] | zxdsw199182@gmail.com |
ec18ae6ca5b4bc3a9896e7bbd65e93c306d7c39a | de74a2af11962af7a8ef3dfb16fa130d35580f3a | /pylib/netutils.py | 00a97c46028ba505990f233a31cbb545a6f34c15 | [] | no_license | vieyahn/winterpy | 4d46fa196bd7517ce4adc785ec803d9fc9aad0a0 | 5a54bcd4dd6d1c6c41b971d6049bcd94e9fb0e70 | refs/heads/master | 2021-01-14T12:57:26.515877 | 2016-08-26T10:38:33 | 2016-08-26T10:39:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 297 | py | import socket
import fcntl
import struct
def get_my_ip(ifname):
ifname = ifname.encode('ascii')
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
# 0x8915 是 SIOCGIFADDR
ip = socket.inet_ntoa(
fcntl.ioctl(s.fileno(), 0x8915, struct.pack('256s', ifname[:15]))[20:24])
return ip
| [
"lilydjwg@gmail.com"
] | lilydjwg@gmail.com |
52247a2b97beacf2ff39263b52e3ae23920bea1b | 8149d1030b5bc62cc82d5afedbe7486daedbf8c5 | /solved/[978][Longest Turbulent Subarray][Medium].py | 1d09e661980929b8997028b6e6c3e63568c66247 | [] | no_license | guofei9987/leetcode_python | faef17bb59808197e32ed97e92e2222862e2ba8c | 23703a6fb5028d982b3febc630e28f9bb65a82a6 | refs/heads/master | 2020-03-21T18:24:33.014579 | 2019-10-12T13:29:03 | 2019-10-12T13:29:03 | 138,889,760 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,158 | py | class Solution:
def maxTurbulenceSize(self, A) -> int:
len_A = len(A)
B = [1] * len_A
# 1代表本次降序,2代表升序,3表示上次从头开始,这次都行
tag = 3
for i in range(1, len(A)):
if tag == 3:
if A[i] > A[i - 1]:
tag = 1
B[i] = B[i - 1]... | [
"guofei9987@foxmail.com"
] | guofei9987@foxmail.com |
cad03a4abf30102218553a83ac7261ebb10bb885 | 2760effda15d884af413ca2a35809d03fabea377 | /lc-448.py | 849eb36dfeb7730186a141d6d732dceed2e7a5c1 | [] | no_license | UtsavRaychaudhuri/leetcode | 31943b98ad89d96d72ee4b6b1d1c8d70429d1e1f | 77a13580fd6231830558b1cf8c84f8b3b62b99d0 | refs/heads/master | 2020-11-27T18:02:23.712639 | 2020-09-29T19:39:49 | 2020-09-29T19:39:49 | 229,552,583 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 580 | py | class Solution:
def findDisappearedNumbers(self, nums):
hash_table = {}
# Add each of the numbers to the hash table
for num in nums:
hash_table[num] = 1
# Response array that would contain the missing numbers
result = []
# It... | [
"utsav@pdx.edu"
] | utsav@pdx.edu |
cc4216647680d6baa071f7282e2f3b2ec4843c1a | c208954de92470c0144fad2e07a92ed1822edd59 | /py-decode/decoder2.py | 1d9b8cd910572ad2e9fdc349b329a36c01e43f8e | [
"MIT"
] | permissive | rendy026/reverse-enginnering | 4217f3b723569fb792bac0f22a56a305199db1dc | f04cec0bf518a2617fc4fd7155f755fafc2af799 | refs/heads/master | 2023-01-07T15:49:15.791052 | 2020-10-13T09:22:02 | 2020-10-13T09:22:02 | 303,575,571 | 0 | 0 | MIT | 2020-10-13T09:41:59 | 2020-10-13T03:17:42 | Python | UTF-8 | Python | false | false | 1,502 | py | # Filenames : <tahm1d>
# Python bytecode : 2.7
# Time decompiled : Fri Sep 11 20:05:16 2020
# Selector <module> in line 3 file <tahm1d>
# Timestamp in code: 2020-09-02 17:33:14
import os, re, sys, time
def decompile(file):
os.system('rm -rf .tmp .htr')
htr = '\n# Python Auto Dis Parser 1.1.0\n# Author : HTR-T... | [
"noreply@github.com"
] | rendy026.noreply@github.com |
5c5c73f08d0b0aab292675f215f17c76476423ef | a2fc262d906004914b340afe1a4bbec28e1a7a52 | /scripts/needs_update/plot_pedestal_waveforms.py | cda9409a48f485fab36595d6085a9770f9d84344 | [] | no_license | watsonjj/targetpipe | 927aeede44548043fd9d6106b6089219e3f024cd | 7238646f0793f9d9b0544be6723152d540b061a3 | refs/heads/master | 2020-04-18T02:34:22.530251 | 2019-01-23T14:42:44 | 2019-01-23T14:42:44 | 60,016,031 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,783 | py | from matplotlib.backends.backend_pdf import PdfPages
from tqdm import tqdm, trange
from traitlets import Dict, List
from matplotlib import pyplot as plt, gridspec
import numpy as np
from IPython import embed
from ctapipe.calib.camera.dl0 import CameraDL0Reducer
from ctapipe.calib.camera.dl1 import CameraDL1Calibrator
... | [
"jason.jw@live.co.uk"
] | jason.jw@live.co.uk |
03dcc52e67854b612c3b74a100a88b30c7167bfe | 2386722682c9e4cfb285f38f91dbeb6099edf183 | /openjournal/routes/profiles.py | 927bc3530a17fefddc811d7c3bd53764e6fc1501 | [] | no_license | xraymemory/openjournal | 68837cbba51b8ecc81a8d60d6549ff3c88de027c | 582328a1ca10d80d4e2d511a598ecf58fc6594ea | refs/heads/master | 2021-01-16T19:39:01.851820 | 2013-03-01T14:19:05 | 2013-03-01T14:19:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 372 | py | from waltz import web, render, session, User
class Profile:
def GET(self, username=""):
if username:
try:
user = User.get(username, safe=True)
return render().profiles.index(user)
except:
pass
raise web.seeother('/')
def ... | [
"michael.karpeles@gmail.com"
] | michael.karpeles@gmail.com |
ad22fb5241958a01bc0e4868d39242606d806aaa | 53fab060fa262e5d5026e0807d93c75fb81e67b9 | /backup/user_220/ch26_2020_09_27_14_04_55_789142.py | a5401c19cce2c4d8f57461c5e562350bbf8bd9e9 | [] | no_license | gabriellaec/desoft-analise-exercicios | b77c6999424c5ce7e44086a12589a0ad43d6adca | 01940ab0897aa6005764fc220b900e4d6161d36b | refs/heads/main | 2023-01-31T17:19:42.050628 | 2020-12-16T05:21:31 | 2020-12-16T05:21:31 | 306,735,108 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 439 | py | valor=int(input("Qual o valor da casa? "))
salario=int(input("Qual o seu salario? "))
anos=int(input("Quantos anos a pagar? "))
def meses(anos):
meses=anos*12
return meses
meses=meses(anos)
def prestaçao(valor,meses):
prestaçao=valor/meses
return prestaçao
def x(salario):
x=salario*30/100
return... | [
"you@example.com"
] | you@example.com |
adcaa4a66a574bb85846e4fd6fd9d092d93a22ac | 0af30c2e3ddcc80a19ea9cfaad9d7e1fedf8b876 | /210203/최단경로/플로이드/이동재.py | 80c971bf263b34f78fed95eade576f2b62667e6f | [] | no_license | winterash2/algorithm_study_2021_1 | d1cd6077f71f68e7fc3eb6dfae7b2cc220885e4c | c1fee62c7e5e560c3bf7ae5e6166866d0147f23f | refs/heads/master | 2023-04-02T20:11:04.169856 | 2021-04-05T11:18:22 | 2021-04-05T11:18:22 | 327,563,535 | 1 | 2 | null | 2021-01-24T14:17:40 | 2021-01-07T09:28:08 | Python | UTF-8 | Python | false | false | 898 | py | # https://www.acmicpc.net/problem/11404
import sys
input = sys.stdin.readline
N = int(input())
M = int(input())
INF = float('inf')
floyd = [[INF for _ in range(N+1)] for _ in range(N+1)]
for _ in range(M):
a,b,c = map(int, input().split())
floyd[a][b] = min(floyd[a][b], c) # 아니 같은 곳 가는 버스가 중복해서 있으면 어쩌자는거임...
fo... | [
"winterash2@naver.com"
] | winterash2@naver.com |
ce28d37ea4009bab3af6cf555c894b29a670e83f | 04b1803adb6653ecb7cb827c4f4aa616afacf629 | /ios/DEPS | aabcd439eb78faf478ae8dc4839ffd849f088480 | [
"BSD-3-Clause"
] | permissive | Samsung/Castanets | 240d9338e097b75b3f669604315b06f7cf129d64 | 4896f732fc747dfdcfcbac3d442f2d2d42df264a | refs/heads/castanets_76_dev | 2023-08-31T09:01:04.744346 | 2021-07-30T04:56:25 | 2021-08-11T05:45:21 | 125,484,161 | 58 | 49 | BSD-3-Clause | 2022-10-16T19:31:26 | 2018-03-16T08:07:37 | null | UTF-8 | Python | false | false | 757 | include_rules = [
# The subdirectories in ios/ will manually allow their own include
# directories in ios/ so we disallow all of them.
"-ios",
# To avoid ODR violation, direct import of these libraries is forbidden in
# ios/DEPS and code should instead use import as if they were in a framework
# (i.e. #imp... | [
"sunny.nam@samsung.com"
] | sunny.nam@samsung.com | |
b49f8710991a51aba2e32c0328a7b2ad0770498e | 077f29021738c3b577c7c3d9ef5851d76e93cbed | /demo/libdemo/list_countries.py | 82cb820542f307c8ea19c2cdc458b70771c60c23 | [] | no_license | srikanthpragada/PYTHON_10_JULY_2020 | fb410d87260eb290ebcc5ac6a88b6d6b01ee15b5 | b7a586cbcd49934d36facb4dd748c54038838334 | refs/heads/master | 2022-12-05T09:05:33.192365 | 2020-08-26T14:27:09 | 2020-08-26T14:27:09 | 279,319,937 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 218 | py | import requests
resp = requests.get("https://restcountries.eu/rest/v2/all")
countries = resp.json()
for c in sorted(countries, key=lambda c: c['region']):
print(f"{c['name']:50} {c['capital']:30} {c['region']}")
| [
"srikanthpragada@gmail.com"
] | srikanthpragada@gmail.com |
ff5e69e00c52d82e23c6564c42268518a6cf9f09 | 522a630f49b298caa21469a51ae6c2dbbe216352 | /codingbat/string2.py | a9bdcc7ea10f07b82a62283e0375f4731075c77c | [] | no_license | crashtack/401prework | bbaf613b219c50b0b1e6411aaa723ccd1f605197 | c8d22910cab50c707e954dbed2dee18ea1b6c001 | refs/heads/master | 2021-01-16T20:42:28.185417 | 2016-08-08T15:57:40 | 2016-08-08T15:57:40 | 63,438,586 | 0 | 0 | null | 2016-08-08T15:57:41 | 2016-07-15T17:14:03 | null | UTF-8 | Python | false | false | 3,204 | py | def double_char(str):
out = ''
for c in str:
out += c * 2
return out
# print(double_char('the'))
# print(double_char('Hi-There'))
# def double_char(str):
# result = ""
# for i in range(len(str)):
# result += str[i] + str[i]
# return result
def count_code(str):
count = 0
index = ... | [
"crashtack@gmail.com"
] | crashtack@gmail.com |
a54be7d2416dc1b8a715462607b7d1b3571d2efd | a0741f52ce7865473c7b0c99b94e987f640647fa | /sdk/ml/azure-ai-ml/azure/ai/ml/_utils/_virtual_cluster_utils/__init__.py | 5a7e3fd37e8c4de60c3175593adb5941e0c60c3d | [
"LicenseRef-scancode-generic-cla",
"MIT",
"LGPL-2.1-or-later",
"LicenseRef-scancode-python-cwi",
"PSF-2.0",
"LGPL-2.0-or-later",
"GPL-3.0-or-later",
"GPL-1.0-or-later",
"LicenseRef-scancode-warranty-disclaimer",
"LGPL-2.1-only",
"Python-2.0",
"MPL-2.0",
"LicenseRef-scancode-other-copyleft",
... | permissive | c-ryan-k/azure-sdk-for-python | f47b5b13204d5ad5b417bcb60131a38472a11e87 | 5655518477adb8be63e6ff43a8852553a602f6a9 | refs/heads/master | 2023-06-22T14:58:08.010015 | 2023-05-25T18:00:55 | 2023-05-25T18:00:55 | 250,091,391 | 0 | 0 | MIT | 2020-03-25T21:06:22 | 2020-03-25T21:06:21 | null | UTF-8 | Python | false | false | 2,002 | py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
from azure.ai.ml.entities import Job
from azure.ai.ml.entities._job.base_job import _BaseJob
from azure.ai.ml.entities._system_data import ... | [
"noreply@github.com"
] | c-ryan-k.noreply@github.com |
b60b9063f57c5d59e0f9d686e9d824eae955a2b3 | 91a9f5a7afb398f4238527708cbc155dc972cbfa | /older/pytorch4/Train_SqueezeNet/Parameters_Module.py | 40ff3faf4f91c0ca2abf61861594f41b5bc6f607 | [] | no_license | bddmodelcar/kzpy3.2 | cd6f9bf6b7b8b920c79b4ee36c2592b992ae4332 | b044b26649b19b240bd580feca20424a237374b1 | refs/heads/master | 2021-01-19T21:01:58.687712 | 2017-08-23T22:39:56 | 2017-08-23T22:39:56 | 101,243,308 | 0 | 1 | null | 2017-08-24T02:04:50 | 2017-08-24T02:04:50 | null | UTF-8 | Python | false | false | 862 | py | from Names_Module import *
exec(identify_file_str)
P = {}
P[GPU] = 0
P[BATCH_SIZE] = 64
P[DISPLAY] = True
P[VERBOSE] = True
P[LOAD_ARUCO] = False
P[BAIR_CAR_DATA_PATH] = opjD('bdd_car_data_July2017_LCR')
P[CODE_PATH] = CODE_PATH__
P[IGNORE] = [reject_run,left,out1_in2]#,'Smyth','racing','local','Tilden','campus']
P[R... | [
"karlzipser@berkeley.edu"
] | karlzipser@berkeley.edu |
48607f0f6a73dd0aa329fa5dcea5c77986b1169c | 676f6f2d02db6aeeaa1bb0b28ab49e8c73923d0e | /venv/Lib/site-packages/ftfy/badness.py | b00d4e887a3efa9df4fd61ff35881c3c9ed9edd1 | [
"Apache-2.0"
] | permissive | vrian/orsen | ce34f74ea3a14c95d37ffa5c694b7c66725925df | 9c10148aba62868fad4b679a4b9b717829586e96 | refs/heads/master | 2023-01-21T21:47:06.210918 | 2018-06-23T04:46:26 | 2018-06-23T04:46:26 | 120,284,869 | 1 | 0 | Apache-2.0 | 2023-01-09T09:39:16 | 2018-02-05T09:44:03 | Python | UTF-8 | Python | false | false | 5,908 | py | # -*- coding: utf-8 -*-
"""
Heuristics to determine whether re-encoding text is actually making it
more reasonable.
"""
from __future__ import unicode_literals
import re
import unicodedata
from ftfy.chardata import chars_to_classes
# The following regex uses the mapping of character classes to ASCII
# characters defi... | [
"jbryanalburo@gmail.com"
] | jbryanalburo@gmail.com |
ad1d114b5065f0fd12865e668064e791dc15bb00 | 68397841b48aa6802ebca4cb546d6707f7938745 | /data/mTurkExp/hyperboleOneDomainPilot/makeLong_exactUtterance.py | 674ed474c59348b11dd852240c1abbff1e79f5b1 | [] | no_license | jeaneis/hyperbole | 53b23714125f8a3dca04ef5b36076cf70c81fc9f | 84d0415538cca3f8b495b29c9937c06dad83a25f | refs/heads/master | 2021-01-18T16:32:08.224706 | 2014-06-17T05:35:23 | 2014-06-17T05:35:23 | 4,486,212 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,539 | py | # turn trimmed data into long form
import sys, re, string
f = open(sys.argv[1], "r")
subject_fields = ["workerid", "Answer.gender", "Answer.nativeLanguage", "Answer.income", "Answer.age"]
item_fields = ["Answer.sentenceIDs", "Answer.domains", "Answer.numberTypes", "Answer.utteredPricesRounded", "Answer.utteredPrices... | [
"justinek@stanford.edu"
] | justinek@stanford.edu |
ceff5e9c5450b41be73f8be43421d1c1f91b6630 | fe1e601b67a30e9215fe858e16b9c2965f8a3576 | /f10.py | c95d12c8febc1bc264dd0da0e5fdbc5a28dd05cc | [] | no_license | z-o-e/algoFun | 8a53b0804d9ddb019133981ebd677b768d25cee6 | 539f89bece5791a1aadfafbddc3ce7c48fbf12ac | refs/heads/master | 2020-04-19T00:49:53.957430 | 2014-10-22T20:32:17 | 2014-10-22T20:32:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,195 | py | """
Given a list of words, L, that are all the same length, and a string, S,
find the starting position of the substring of S that is a concatenation of each word in L exactly once and without any intervening characters.
This substring will occur exactly once in S.
Example:
L: "fooo", "barr", "wing", "ding", "wing"... | [
"hyzhang22@gmail.com"
] | hyzhang22@gmail.com |
af3e2674cdd3ee28c6f8fdacc0fecfe368384496 | 71acb7214efd91c0d327f6d8958e1798eadb4401 | /locations/spiders/conad_it.py | b8124733d07e10ce80284bd0b5cb306acc4e7646 | [
"CC0-1.0",
"MIT"
] | permissive | alltheplaces/alltheplaces | 21b9f8b4ace1352e52ae7b8f8825a930d2cb033e | 1bcbb55cfcf06f2c714465570711f6e83f205c22 | refs/heads/master | 2023-08-30T19:45:35.098658 | 2023-08-30T17:51:54 | 2023-08-30T17:51:54 | 61,166,935 | 453 | 176 | NOASSERTION | 2023-09-14T17:16:40 | 2016-06-15T01:09:18 | Python | UTF-8 | Python | false | false | 3,663 | py | from scrapy import Spider
from scrapy.http import JsonRequest
from locations.categories import Categories
from locations.hours import DAYS_IT, OpeningHours, sanitise_day
from locations.items import Feature
class ConadITSpider(Spider):
name = "conad_it"
brands = {
"CONAD": {"brand": "Conad", "brand_w... | [
"noreply@github.com"
] | alltheplaces.noreply@github.com |
d7f668144235fca2660b6045e9cffa80b91a97be | 80246a001c0358defc4ff193b5b14cdaffafe8df | /history/models.py | 12cc06c3b8a56e053e77195756fd5bda7d74fadf | [
"ISC"
] | permissive | pmaigutyak/mp-history | 41cfc2dad04f25fdefd1fb2fd15f37d10bb534ef | 3172d6aab2ec8ecfaaf29c04e75abfe064e3236c | refs/heads/master | 2022-03-02T00:19:07.653722 | 2022-02-16T09:04:55 | 2022-02-16T09:04:55 | 243,751,705 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,606 | py |
from django.db import models
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
class HistoryGroup(models.Model):
name = models.CharField(_('Name'), max_length=255)
code = models.CharField(_('Code'), max_length=100, unique=True)
def __str__(self):
return s... | [
"pmaigutyak@gmail.com"
] | pmaigutyak@gmail.com |
72dd515dca83ea6653898ad17e7bb9031f8d7690 | 385e00e3d48446baf20cb3d0fbf9db0344cd95da | /qiskit_experiments/library/quantum_volume/qv_experiment.py | 0770c2bbcfdad03d1ea045d344740a85d13c16c5 | [
"Apache-2.0"
] | permissive | oliverdial/qiskit-experiments | d670f9151116e2e7d9a67f304a23313aa31fc30f | a387675a3fe817cef05b968bbf3e05799a09aaae | refs/heads/main | 2023-06-24T08:07:19.505243 | 2023-06-09T21:01:59 | 2023-06-09T21:01:59 | 362,153,676 | 0 | 0 | Apache-2.0 | 2021-04-27T15:03:52 | 2021-04-27T15:03:51 | null | UTF-8 | Python | false | false | 7,792 | py | # This code is part of Qiskit.
#
# (C) Copyright IBM 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative wo... | [
"noreply@github.com"
] | oliverdial.noreply@github.com |
92580cc88ce3c4ed522ec7fd087d5f7242c3c2a8 | 297497957c531d81ba286bc91253fbbb78b4d8be | /third_party/rust/jsparagus/.metrics/fuzzbug_date_badge.py | aae6d6af9995026a57b436d4b24d76ffa408081f | [
"MIT",
"LLVM-exception",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | marco-c/gecko-dev-comments-removed | 7a9dd34045b07e6b22f0c636c0a836b9e639f9d3 | 61942784fb157763e65608e5a29b3729b0aa66fa | refs/heads/master | 2023-08-09T18:55:25.895853 | 2023-08-01T00:40:39 | 2023-08-01T00:40:39 | 211,297,481 | 0 | 0 | NOASSERTION | 2019-09-29T01:27:49 | 2019-09-27T10:44:24 | C++ | UTF-8 | Python | false | false | 932 | py |
import json
from datetime import datetime
read_filename = 'count/fuzzbug.json'
write_since = 'badges/since-last-fuzzbug.json'
days_since = None
with open(read_filename, 'r') as f:
filedata = json.load(f)
count = len(filedata)
if count > 0:
dt_format = "%Y-%m-%dT%H:%M:%SZ"
fuzzbug_ope... | [
"mcastelluccio@mozilla.com"
] | mcastelluccio@mozilla.com |
5642541b04a49edc833f43af42b6ab0a71101a49 | a07fd8aca2d69ade2e388054dd2c1c9991232185 | /docs_src/schema_extra_example/tutorial004_an_py310.py | 650da3187e8aed5cef37b57dee4c949753809cd1 | [
"MIT"
] | permissive | vitalik/fastapi | 76b71bbbade19f12484c73dcbdca426197cc2db6 | 0276f5fd3aafb38dcbb430177a4685aeb58e5c69 | refs/heads/master | 2023-08-01T06:56:06.053824 | 2023-07-25T20:46:02 | 2023-07-25T20:46:02 | 315,668,229 | 1 | 0 | MIT | 2020-11-24T15:07:16 | 2020-11-24T15:07:15 | null | UTF-8 | Python | false | false | 917 | py | from typing import Annotated
from fastapi import Body, FastAPI
from pydantic import BaseModel
app = FastAPI()
class Item(BaseModel):
name: str
description: str | None = None
price: float
tax: float | None = None
@app.put("/items/{item_id}")
async def update_item(
*,
item_id: int,
item:... | [
"noreply@github.com"
] | vitalik.noreply@github.com |
d315470a2050fe5090d9f18c26c232b57f287c53 | a5d05e3cecfa6571016e41d19c982f1082714582 | /POSAND.py | dd5105b217cfa4b79b83087f26442936f82993df | [] | no_license | Sanket-Mathur/CodeChef-Practice | 8ebc80eb9a32c90a5b3785348fca2048190dbeb0 | cba5bc2eaaf5489cbd8e85acaca6f82d223cff4f | refs/heads/master | 2023-08-08T05:59:42.755206 | 2021-09-26T12:44:15 | 2021-09-26T12:44:15 | 268,267,425 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 326 | py | for _ in range(int(input())):
N = int(input())
if N == 1:
print(1)
elif N & N-1 == 0:
print(-1)
else:
L = list(range(1,N+1))
L[:3] = [2,3,1]
for i in range(3,N):
if L[i] & L[i-1] == 0:
L[i] , L[i+1] = L[i+1], L[i]
prin... | [
"rajeev.sanket@gmail.com"
] | rajeev.sanket@gmail.com |
95cb3867e9c462b069d1b43f4e9879f0be347ba4 | 8afb5afd38548c631f6f9536846039ef6cb297b9 | /MY_REPOS/DATA_STRUC_PYTHON_NOTES/python-prac/mini-scripts/python_Using_Asterix_(multible)_2.txt.py | c420ada4343ca669960fe46c8bfed8ca4f8decf5 | [
"MIT",
"Python-2.0"
] | permissive | bgoonz/UsefulResourceRepo2.0 | d87588ffd668bb498f7787b896cc7b20d83ce0ad | 2cb4b45dd14a230aa0e800042e893f8dfb23beda | refs/heads/master | 2023-03-17T01:22:05.254751 | 2022-08-11T03:18:22 | 2022-08-11T03:18:22 | 382,628,698 | 10 | 12 | MIT | 2022-10-10T14:13:54 | 2021-07-03T13:58:52 | null | UTF-8 | Python | false | false | 132 | py | fruits = ("apple", "mango", "papaya", "pineapple", "cherry")
(green, *tropic, red) = fruits
print(green)
print(tropic)
print(red)
| [
"bryan.guner@gmail.com"
] | bryan.guner@gmail.com |
93cac95df69f8ef1e0759e40e2dc08dd262b8084 | b76e39e535499704368eddc26237dc0016ef7d06 | /CASTERSIMULATION/SPECIALFUNCTION/PLC_2_PLC_Communication/fn_plc_to_plc_communication.py | 70848201380d6cb301214ed55fecabf4b4befe24 | [] | no_license | BUBAIMITRA2018/castersimulation | 0532e53df7d346c2824e577cc91cd0ac2ce4694c | eca5fddff5c0f33f785168f6b1e9f572c1622be0 | refs/heads/master | 2022-12-10T02:45:04.207196 | 2020-09-09T05:35:54 | 2020-09-09T05:35:54 | 260,110,682 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,816 | py |
from clientcomm_v1 import *
from readgeneral_v2 import *
from writegeneral_v2 import *
import logging
logger = logging.getLogger("main.log")
__all__ = ['Fn_PLC_2_PLC_COMMUNICATION']
class Fn_PLC_2_PLC_COMMUNICATION():
def __init__(self):
self.devicename = 'PLC_2_PLC_COMMUNICATION'
self._bre... | [
"subrata.mitra@sms-group.com"
] | subrata.mitra@sms-group.com |
027b1059d5fa75c09f9616c4fcc26cdb432cd3cd | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2980/60593/270670.py | d5e3111969f834881581183e72b72b98fae486d9 | [] | no_license | AdamZhouSE/pythonHomework | a25c120b03a158d60aaa9fdc5fb203b1bb377a19 | ffc5606817a666aa6241cfab27364326f5c066ff | refs/heads/master | 2022-11-24T08:05:22.122011 | 2020-07-28T16:21:24 | 2020-07-28T16:21:24 | 259,576,640 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 476 | py | str1=input()
list1=input().split(" ")
print(len(list1))
list2=list(str1)
if list1[0]=='D':
list2.remove(list1[1])
str1 = ''.join(list2)
print(str1)
elif list1[0]=='I':
ind=-1
for i in range(len(str1)):
if str1[i]==list1[1]:
ind=i
if(ind==-1):
print(list1)
else:
... | [
"1069583789@qq.com"
] | 1069583789@qq.com |
63ed87e1f361816c431050296b3b94540b5855d1 | 70fa6468c768d4ec9b4b14fc94fa785da557f1b5 | /lib/surface/compute/http_health_checks/__init__.py | b43767b7b5f7bb65bbe365ba26e3f52836af9655 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | kylewuolle/google-cloud-sdk | d43286ef646aec053ecd7eb58566ab2075e04e76 | 75f09ebe779e99fdc3fd13b48621fe12bfaa11aa | refs/heads/master | 2020-04-20T22:10:41.774132 | 2019-01-26T09:29:26 | 2019-01-26T09:29:26 | 169,131,028 | 0 | 0 | NOASSERTION | 2019-02-04T19:04:40 | 2019-02-04T18:58:36 | Python | UTF-8 | Python | false | false | 1,159 | py | # -*- coding: utf-8 -*- #
# Copyright 2014 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | [
"cloudsdk.mirror@gmail.com"
] | cloudsdk.mirror@gmail.com |
c7a27ddad15df21c24fb74afc29a9913df036ca5 | ac5e52a3fc52dde58d208746cddabef2e378119e | /exps-mrsp.0/mrsp_ut=3.5_rd=0.5_rw=0.04_rn=4_u=0.075-0.325_p=harmonic-2/sched=RUN_trial=68/params.py | d03959aea60867f60065846cde90c30404327c84 | [] | no_license | ricardobtxr/experiment-scripts | 1e2abfcd94fb0ef5a56c5d7dffddfe814752eef1 | 7bcebff7ac2f2822423f211f1162cd017a18babb | refs/heads/master | 2023-04-09T02:37:41.466794 | 2021-04-25T03:27:16 | 2021-04-25T03:27:16 | 358,926,457 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 250 | py | {'cpus': 4,
'duration': 30,
'final_util': '3.521976',
'max_util': '3.5',
'periods': 'harmonic-2',
'release_master': False,
'res_distr': '0.5',
'res_nmb': '4',
'res_weight': '0.04',
'scheduler': 'RUN',
'trial': 68,
'utils': 'uni-medium-3'}
| [
"ricardo.btxr@gmail.com"
] | ricardo.btxr@gmail.com |
8072732a8e63985b5a49441e23614775212edef0 | e66e9f6e8d8c0c77b48b433b4063272cf4296104 | /convokit/forecaster/forecaster.py | 035a3d7010021073b710a718d314566ad5189d23 | [
"MIT"
] | permissive | ohyj1002/Cornell-Conversational-Analysis-Toolkit | f42cb548cc9bb28f7bd0522f1248bb6baa245477 | 216e4fb43a0ccab0b30e70db29a8aa2528924a76 | refs/heads/master | 2020-12-02T06:13:22.360063 | 2019-12-30T10:10:16 | 2019-12-30T10:10:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,033 | py | from convokit.model import Corpus, Conversation, Utterance
from typing import Callable, Optional
from convokit import Transformer
from .cumulativeBoW import CumulativeBoW
from .forecasterModel import ForecasterModel
import pandas as pd
class Forecaster(Transformer):
"""
Implements basic Forecaster behavior
... | [
"calebchiam@gmail.com"
] | calebchiam@gmail.com |
aee0308fdaac9f82fcf14721ba1f8c28e2394b3d | 2a54e8d6ed124c64abb9e075cc5524bb859ba0fa | /.history/3-OO-Python/1-create-object_20200415000231.py | 0b1ee85c98484249044c371f68e85486e9a20dd9 | [] | no_license | CaptainStorm21/Python-Foundation | 01b5fbaf7a913506518cf22e0339dd948e65cea1 | a385adeda74f43dd7fb2d99d326b0be23db25024 | refs/heads/master | 2021-05-23T01:29:18.885239 | 2020-04-23T19:18:06 | 2020-04-23T19:18:06 | 253,171,611 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 269 | py | # OOP
class PlayerCharacter :
# constructor method / init method
def __init__(self, name, age):
self.name = name
self.age = age
def run (self):
print('running')
player1 = PlayerCharacter('Josh')
print(player1.name) | [
"tikana4@yahoo.com"
] | tikana4@yahoo.com |
f0fd20ea9d9b876f57fbebf227b848a560fcf083 | 9e988c0dfbea15cd23a3de860cb0c88c3dcdbd97 | /sdBs/AllRun/galex_j21035+3035/sdB_galex_j21035+3035_lc.py | 4f82a4d58f8cb9db21b1a4248ffaa38b1edfd268 | [] | no_license | tboudreaux/SummerSTScICode | 73b2e5839b10c0bf733808f4316d34be91c5a3bd | 4dd1ffbb09e0a599257d21872f9d62b5420028b0 | refs/heads/master | 2021-01-20T18:07:44.723496 | 2016-08-08T16:49:53 | 2016-08-08T16:49:53 | 65,221,159 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 355 | py | from gPhoton.gAperture import gAperture
def main():
gAperture(band="NUV", skypos=[315.8855,30.594236], stepsz=30., csvfile="/data2/fleming/GPHOTON_OUTPU/LIGHTCURVES/sdBs/sdB_galex_j21035+3035/sdB_galex_j21035+3035_lc.csv", maxgap=1000., overwrite=True, radius=0.00555556, annulus=[0.005972227,0.0103888972], verbose=3)
... | [
"thomas@boudreauxmail.com"
] | thomas@boudreauxmail.com |
237a1f31990650654b92c6e81dff761072d63b9f | dc222b7713453f4653da00fa8ce7a76d89c51e68 | /javascript/jquery/jQuery_book_code/chapter_six/load/example_in_book/demo.py | 36f2210c69f7abb93ec430c9bda9621cd26c1e49 | [] | no_license | aimeiyan/exercise | d935d48ddab90c55b8b9ac89e821abf117d5f609 | 617261af69db836a649bd4044f97bec7ab3e845d | refs/heads/master | 2020-05-20T11:36:34.698664 | 2014-02-18T11:27:44 | 2014-02-18T11:27:44 | 10,766,847 | 0 | 3 | null | null | null | null | UTF-8 | Python | false | false | 688 | py | __author__ = 'nancy'
# -*- coding: utf-8 -*-
import tornado.ioloop
import tornado.web
import json
class MainHandler(tornado.web.RequestHandler):
def get(self, *args, **kwargs):
# self.set_header("Content-Type", "application/json")
myFile = open("test.html", "r").read()
data = myFile
... | [
"aimeiyan@gmail.com"
] | aimeiyan@gmail.com |
f39f3744d06985d342d5514630dde54e4b954917 | 1f3fd863a2dbe8d25a52fb3ea50ff786979fbdb3 | /_unittests/ut_dnotebooks/test_LONG_2A_notebook_eleves_201810.py | 7a4cf4dff7d6dc2f8c08348c03dae1d2725494a5 | [
"MIT"
] | permissive | SNachar/ensae_teaching_cs | d55770ff664e03b21af79627ac1632adc95fa129 | d419b9fb261c0332a17e9ea84869b7676956e5e6 | refs/heads/master | 2020-04-18T19:48:16.833073 | 2019-01-25T15:37:03 | 2019-01-25T15:37:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,764 | py | """
@brief test log(time=51s)
"""
import sys
import os
import unittest
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import add_missing_development_version
try:
import src
except ImportError:
path = os.path.normpath(
os.path.abspath(
os.path.join(
... | [
"xavier.dupre@gmail.com"
] | xavier.dupre@gmail.com |
2b4d1f95920ddf34d05baecb63ec7cb2f03ed92e | e32a88c345e6985ff22705d130ae9715f0258c45 | /lsapling/functions.py | e336b7db03b3c03a2919d7413558533403e057cb | [
"MIT",
"BSD-3-Clause"
] | permissive | diego-plan9/django-lsapling | ff4efe4ed110521cb088d8ef745f528866b13f20 | b738638a478f853d52fc4d3f53b107eeab892641 | refs/heads/master | 2020-05-29T14:38:59.087710 | 2016-07-11T18:05:40 | 2016-07-11T18:05:40 | 63,079,943 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 865 | py | from django.db.models import Func, Value
class Subpath(Func):
function = 'SUBPATH'
def __init__(self, expression, pos, length=None, **extra):
"""
expression: the name of a field, or an expression returning a string
pos: an integer > 0, or an expression returning an integer
len... | [
"diego.plan9@gmail.com"
] | diego.plan9@gmail.com |
aab29dcd1dc991d1caabeda3e59a5464529e84c1 | 2009317345638b26796c13fe73a2bdb2058cd428 | /ocial/ocial_project/recommendation/views.py | 7cb3cb9a6e243118dd19b47e3a38226736ac14c4 | [
"MIT",
"GPL-3.0-only"
] | permissive | kasimbozdag/swe_574 | 8cafce660df7967f4e2f94a42457ec799c4f2161 | a77fa29fd80c713cd202ccbb82cfcadfa52b81fa | refs/heads/master | 2022-10-03T17:28:56.200424 | 2021-06-16T12:44:06 | 2021-06-16T12:44:06 | 210,579,882 | 1 | 0 | MIT | 2022-02-10T11:28:33 | 2019-09-24T10:53:32 | CSS | UTF-8 | Python | false | false | 4,067 | py | import json
from django.contrib.auth.models import User
from django.shortcuts import render
# Create your views here.
from django.views import View
from recommendation.models import Recommendation
from recommendation.sparql_queries import query_common_p_o, query_most_common_p_s, common_instance_of
from topics.models... | [
"bozdag80@yahoo.com"
] | bozdag80@yahoo.com |
5e11fb98f17cde3fd679960f7c138082d5e04ad8 | 991288a9f4f75998a5334f6d9a83c34a2ecaa322 | /apps/product/migrations/0002_auto_20210316_1246.py | 385b5346f63360bbb0d654741a5233d195b055bf | [] | no_license | AlekseiChirkov/neolabs | 20a06568050282c507d771a27124ef398e538629 | 3361cc7a392e534be480252f576b7b3db9280057 | refs/heads/main | 2023-03-22T04:36:06.242335 | 2021-03-20T05:53:36 | 2021-03-20T05:53:36 | 337,086,135 | 0 | 0 | null | 2021-03-20T05:53:36 | 2021-02-08T13:32:55 | JavaScript | UTF-8 | Python | false | false | 1,004 | py | # Generated by Django 3.1.7 on 2021-03-16 12:46
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('product', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Order',
f... | [
"tektonikboy98@gmail.com"
] | tektonikboy98@gmail.com |
962e5942a2ec9e734154019b62e866497a7d3471 | 134c429df7d5c4d067d9761cb1435992b048adaf | /notes/0140/0140.py | ee4303839b68f81482c1a22b38f6901261e8c412 | [] | no_license | PaulGuo5/Leetcode-notes | 65c6ebb61201d6f16386062e4627291afdf2342d | 431b763bf3019bac7c08619d7ffef37e638940e8 | refs/heads/master | 2021-06-23T09:02:58.143862 | 2021-02-26T01:35:15 | 2021-02-26T01:35:15 | 177,007,645 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 711 | py | class Solution:
def wordBreak(self, s: str, wordDict: List[str]) -> List[str]:
if not s or not wordDict: return []
res = []
words = set(wordDict)
dp = [0]*(len(s)+1)
dp[0] = 1
parent = collections.defaultdict(list)
for i in range(1, len(s)+1):
for ... | [
"zhg26@pitt.edu"
] | zhg26@pitt.edu |
4c8ded6a4e9a90c301d446e07287a9d24967d861 | 54f51768002c8e677eb43f0d7e0448d7d0761976 | /ribbit/apps/users/models.py | 07f1650464149fd47a6564a1688afef0957ee4c8 | [] | no_license | giginet/ribbit | ed6c901e47050c8642e1480c1cfbb0fa06ad444a | 72c70021cb51b543cf121adc1869ceab24aa1a74 | refs/heads/master | 2020-05-17T03:32:11.176318 | 2013-12-18T00:48:07 | 2013-12-18T00:48:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,283 | py | import os
from django.db import models
from django.contrib.auth.models import AbstractUser
from django.utils.translation import ugettext as _
from django.conf import settings
from easy_thumbnails.fields import ThumbnailerImageField
class User(AbstractUser):
def avatar_image_path(instance, filename):
retu... | [
"giginet.net@gmail.com"
] | giginet.net@gmail.com |
a331b662fcef526a4c8e0ff1ed4450ebbf92331e | d214b72b3ae340d288c683afe356de6846a9b09d | /高级算法/最大间距_164.py | 14d6f45dd141104ebb2df47cf0d4c2cc48d9bb75 | [] | no_license | Xiaoctw/LeetCode1_python | 540af6402e82b3221dad8648bbdcce44954a9832 | b2228230c90d7c91b0a40399fa631520c290b61d | refs/heads/master | 2021-08-29T15:02:37.786181 | 2021-08-22T11:12:07 | 2021-08-22T11:12:07 | 168,444,276 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,154 | py | from typing import *
class Solution:
def maximumGap(self, nums: List[int]) -> int:
if len(nums) < 2:
return 0
max_val, min_val = max(nums), min(nums)
if min_val == max_val:
return 0
# 确保bucket的长度至少为1
len_bucket = max(1, (max_val - min_val) // (len(nu... | [
"m18846183092@163.com"
] | m18846183092@163.com |
bb9c592c3cd843e361532f533194010e9a88e1ac | f8f00752a04917b3ef1652f8b292f3b582ab536a | /news_posts/tasks.py | 60b6a44e4ad363abfdbbd8a25a40c86e3ee6770d | [] | no_license | SergeZazik/Planeks-test | 183049e38840564996b9875dbd76b0f309d177ca | da7b4151fd602b6a2e7629d31024acd8912437c2 | refs/heads/master | 2023-05-06T03:17:25.265079 | 2019-10-14T21:07:04 | 2019-10-14T21:07:04 | 215,135,203 | 0 | 0 | null | 2023-04-21T20:52:13 | 2019-10-14T20:05:49 | Python | UTF-8 | Python | false | false | 249 | py | from django.core.mail import EmailMessage
from news_service.celery import app
@app.task
def send_mail_notification_task(mail_subject, message, to_email):
email = EmailMessage(
mail_subject, message, to=[to_email]
)
email.send()
| [
"zavizionsergey@gmail.com"
] | zavizionsergey@gmail.com |
9eca95db1c7c6859693dc0fa61fe7e82a015b333 | 55ceefc747e19cdf853e329dba06723a44a42623 | /_CodeTopics/LeetCode/1201-1400/001332/001332_impl.py3 | ac86529393bdfc78b2c8795ffc95969ad28bfcd1 | [] | no_license | BIAOXYZ/variousCodes | 6c04f3e257dbf87cbe73c98c72aaa384fc033690 | ee59b82125f100970c842d5e1245287c484d6649 | refs/heads/master | 2023-09-04T10:01:31.998311 | 2023-08-26T19:44:39 | 2023-08-26T19:44:39 | 152,967,312 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 557 | py3 | class Solution:
def removePalindromeSub(self, s: str) -> int:
def is_palindrome_v2(s):
n = len(s)
for i in range(n//2):
if s[i] != s[n-1-i]:
return False
return True
return 1 if is_palindrome_v2(s) else 2
"""
... | [
"noreply@github.com"
] | BIAOXYZ.noreply@github.com |
ddf2cbf0d442627986c2cbd53267d97f2878b21e | 36660024d16f67de731b0cbe089a498c5b123cf4 | /blog/settings.py | b6a6cda6b3dc2b13a173691e5b2028ee7244bc06 | [] | no_license | ingafter60/dreamblog | 6ed9098102c5eb2f57dcf3d13c7f8ae70e3e7e3d | 2a93fec00842aa2d27ff48d6b6653f99f7375499 | refs/heads/master | 2020-12-20T16:49:46.374356 | 2020-01-25T15:47:03 | 2020-01-25T15:47:03 | 236,144,231 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,331 | py | """
Django settings for blog project.
Generated by 'django-admin startproject' using Django 2.2.4.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os
# Bu... | [
"inyoman_gurnitha@yahoo.com"
] | inyoman_gurnitha@yahoo.com |
091f88a4dfa3db03de6f591bc0b0171ab713237d | 8099c07d5694a179e6d037b20ea848c63a85b18b | /QUANTAXIS/__init__.py | 7675e90097c7bb822471b9e9c137ffbcc653aa25 | [
"MIT"
] | permissive | lipq525/QUANTAXIS | 1196e6161056efa8cf358bfa430a82718f7eadfe | 7ce3d5fb8706e058bfa2f7fc68cdb0b26c82abb2 | refs/heads/master | 2021-01-19T23:40:14.530475 | 2017-08-23T07:42:31 | 2017-08-23T07:42:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,641 | py | #coding :utf-8
#
# The MIT License (MIT)
#
# Copyright (c) 2016-2017 yutiansut/QUANTAXIS
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation th... | [
"yutiansut@qq.com"
] | yutiansut@qq.com |
1b4ac01f2c0ba6fa968835393a80a3bcf04ab7b9 | d310eea95db0eec75a983b7ce86cad1435b25673 | /tests/unit/test_time/test_time_reader.py | 8baafd751a80b7a9ab105491df03ef142c33d183 | [
"MIT"
] | permissive | Nishikinor/resistics | d70eca2dfa6d91ebfc588dd814b6a975859954d6 | a93040521fd6506929a59c363ee58b7ca073bac1 | refs/heads/master | 2023-01-10T23:14:02.014908 | 2020-10-26T20:11:42 | 2020-10-26T20:11:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 740 | py | def test_getTimeData() -> None:
"""Test getting time data"""
from datapaths import path_integrated_singlesite
from resistics.project.io import loadProject
from resistics.project.io import loadProject
from resistics.project.time import getTimeReader
from datetime import datetime
proj = loadP... | [
"nss350@gmail.com"
] | nss350@gmail.com |
775a1ff0be0bf7d1749aaaf7c7b9f3ed858771b9 | f0d713996eb095bcdc701f3fab0a8110b8541cbb | /q7rHnH9Jhf35NqSjG_11.py | 02e706b8e6ec0da0719ea4dbd4eb688075e4ee85 | [] | no_license | daniel-reich/turbo-robot | feda6c0523bb83ab8954b6d06302bfec5b16ebdf | a7a25c63097674c0a81675eed7e6b763785f1c41 | refs/heads/main | 2023-03-26T01:55:14.210264 | 2021-03-23T16:08:01 | 2021-03-23T16:08:01 | 350,773,815 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 708 | py | """
**Mubashir** needs your help to find out trailing zeros after calculating
factorial of a given number.
Create a function which takes a number `n` and calculates the **number of
trailing zeros** in factorial of the given number.
n! = 1 * 2 * 3 * ... * n
### Examples
trailing_zeros(0) ➞ 0
# 0! = 1
... | [
"daniel.reich@danielreichs-MacBook-Pro.local"
] | daniel.reich@danielreichs-MacBook-Pro.local |
58776669d2c236ad1ef19d5c2904134bcf7dea66 | 9dd14d428b2513376f0e1c3ec06a3b06fc60fc73 | /deprecated/customOperatorTemplate.py | a51c3ab117afbe06581ff06596ed3355332f16e7 | [
"MIT"
] | permissive | thhapke/sdi_pandas | 38b1a3a688c62621fb858f03e4ac2f3bcbc20b88 | 7a9108007459260a30ea7ee404a76b42861c81c5 | refs/heads/master | 2020-07-24T10:40:05.643337 | 2020-04-08T06:59:52 | 2020-04-08T06:59:52 | 207,894,698 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,483 | py |
import sdi_utils.gensolution as gs
import sdi_utils.set_logging as slog
import sdi_utils.tprogress as tp
import os
try:
api
except NameError:
class api:
class config:
## Meta data
tags = {'python36': ''} # tags that helps to select the appropriate container
opera... | [
"53856509+thhapke@users.noreply.github.com"
] | 53856509+thhapke@users.noreply.github.com |
01cb3c1cac87f683a3d3ecc1230b0ad6f6646365 | 017090be7ab186cb6b47f49e1066ac5cfec3a542 | /tests/unit/neptune/new/internal/backends/test_swagger_client_wrapper.py | 2cf848044466168bb101dabccb9fa4bd5e8b8836 | [
"Apache-2.0"
] | permissive | neptune-ai/neptune-client | 9a79f9d93c84b3a20114e6e49a80652930399ece | 9b697ce548634c30dbc5881d4a0b223c8987515d | refs/heads/master | 2023-08-18T01:48:22.634432 | 2023-08-17T11:55:57 | 2023-08-17T11:55:57 | 170,117,229 | 408 | 55 | Apache-2.0 | 2023-09-13T12:51:03 | 2019-02-11T11:25:57 | Python | UTF-8 | Python | false | false | 1,481 | py | #
# Copyright (c) 2022, Neptune Labs Sp. z o.o.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | [
"noreply@github.com"
] | neptune-ai.noreply@github.com |
ac87fcc43e5f40d4d973f978cdfce516fa25b995 | d80e150db8237aa58daae02e3731a1e452dc5b26 | /Past_Exams/2014-2015/Cold-puter Science/solution.py | b4ae62148516441bc3d520ab8ba94850c26ef263 | [] | no_license | langzippkk/MPCS_Programming_Placement_Exam | a2ac389a29b08f56229b13240e98a72a485ab025 | e0791a3d8e14da529d751fcd90a11335d81ed5fc | refs/heads/master | 2020-07-01T21:59:40.130076 | 2017-09-13T13:29:40 | 2017-09-13T13:29:40 | 201,315,683 | 1 | 0 | null | 2019-08-08T18:31:17 | 2019-08-08T18:31:16 | null | UTF-8 | Python | false | false | 278 | py | import sys
fhand = sys.stdin
lines = fhand.readlines()
num_days = int(lines[0].strip())
num_days_below_zero = 0
temperatures = lines[1].strip().split()
for temperature in temperatures:
if int(temperature) < 0:
num_days_below_zero += 1
print num_days_below_zero
| [
"dukeleimao@gmail.com"
] | dukeleimao@gmail.com |
0a29e9668fa6b201977ee02d1ca173d5a0769c67 | 987a68b9c196f39ba1810a2261cd4a08c35416a3 | /Stack/636-exclusive-time-of-functions.py | 6b70a387193ebc0c4b222e20d0c5c901fe26d1b6 | [] | no_license | xizhang77/LeetCode | c26e4699fbe1f2d2c4706b2e5ee82131be066ee5 | ce68f5af57f772185211f4e81952d0345a6d23cb | refs/heads/master | 2021-06-05T15:33:22.318833 | 2019-11-19T06:53:24 | 2019-11-19T06:53:24 | 135,076,199 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 789 | py | # -*- coding: utf-8 -*-
'''
https://leetcode.com/problems/exclusive-time-of-functions/
'''
# Time & Space: O(n)
class Solution(object):
def exclusiveTime(self, n, logs):
"""
:type n: int
:type logs: List[str]
:rtype: List[int]
"""
ans = [0]*n
stack = []
... | [
"xizhang1@cs.stonybrook.edu"
] | xizhang1@cs.stonybrook.edu |
30ccfd1ed3f01390266018c0656b8b53f74ae360 | 9b867302d4b49658a6ad1e5041385695058ea789 | /examples/diffuse_scale_steps.py | f3c5a0515432386b73e4952cde24e74edf8427c5 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | almarklein/pirt | 393640057934ef0a64788d075898b6d1ed1d9893 | 1647f8fd94aaf20350c972e0c405338ee841f8bf | refs/heads/master | 2023-04-13T19:40:11.729330 | 2023-04-11T13:36:55 | 2023-04-11T13:36:55 | 263,040,175 | 17 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,331 | py | """
Illustate the levels in a scale space pyramid.
"""
import visvis as vv
final_scale = 1.0
scale_sampling = 7
scale_levels = 3
iter_factor = 0.5**(1.0/scale_sampling)
finetune_factor = 1.0/(scale_sampling+1)
def calc_scales(smooth_scale):
iters = []
scales = []
count ... | [
"almar.klein@gmail.com"
] | almar.klein@gmail.com |
eba6c12c1e10dbf37335c6d9dcea15f7468c5ece | f0856e60a095ce99ec3497b3f27567803056ac60 | /keras/keras34~42[RNN(LSTM,GRU,split)]/keras39_LSTM_ensemble.py | 64f015a1996ca6bca28170656755f06015c0148a | [] | no_license | hjuju/TF_Study-HAN | dcbac17ce8b8885f5fb7d7f554230c2948fda9ac | c0faf98380e7f220868ddf83a9aaacaa4ebd2c2a | refs/heads/main | 2023-09-04T09:13:33.212258 | 2021-10-27T08:00:49 | 2021-10-27T08:00:49 | 384,371,952 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,425 | py | import numpy as np
from tensorflow.python.keras.callbacks import EarlyStopping
from tensorflow.python.ops.gen_control_flow_ops import merge
from tensorflow.keras.models import Sequential, Model
from tensorflow.keras.layers import Dense, SimpleRNN, LSTM, GRU, Input
from icecream import ic
import time
x1 = np.array([[1,... | [
"tkackeowjs@naver.com"
] | tkackeowjs@naver.com |
d0d3fe15bf14d1852a6c42e8708b7695922ab3f9 | 5a9194df7e40b1f9694576c88c536b24d22f548b | /tests/crm/test_delete_account.py | d1dca293e212706fab07c51bb456e08e251901ef | [] | no_license | jamesstidard/Talk-Zoho | 17230611e40e5c232dcd33bdbd5148ba20543810 | 3a918d72146dae1ed6bb8afee09dfe658a540048 | refs/heads/master | 2021-05-08T10:44:05.881154 | 2017-03-03T16:49:34 | 2017-03-03T16:49:34 | 119,862,940 | 0 | 0 | null | 2018-02-01T16:34:38 | 2018-02-01T16:34:38 | null | UTF-8 | Python | false | false | 294 | py | import pytest
from tests.crm.fixtures import * # noqa
@pytest.mark.gen_test
def test_can_delete_account(crm):
account = {'Account Name': 'DELETE ME'}
account_id = yield crm.accounts.insert(account)
result = yield crm.accounts.delete(account_id)
assert result is True
| [
"jamesstidard@gmail.com"
] | jamesstidard@gmail.com |
46423c1df939cc2fedd77349f77790e0438281a2 | ab5f28c2ef1d0e40fd335796f9717a0bb83f4ad6 | /server/test/test_modules_entity.py | f828406b01efe18811665d68e2631048e02a40b4 | [
"Apache-2.0"
] | permissive | Folashade/sagefy | dd2c40e3459c10c9cbc6ac7f283618b094b3aa5b | f92dcd8122ab524935dfaf50f1c15489f3e502f5 | refs/heads/master | 2021-01-12T20:59:16.852371 | 2016-01-04T02:58:18 | 2016-01-04T02:58:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,421 | py | import rethinkdb as r
from models.card import Card
from modules import entity
import pytest
xfail = pytest.mark.xfail
def test_get_latest_accepted(db_conn, cards_table):
"""
Expect to pull the latest accepted
version out of the database, given a kind and an entity_id.
"""
cards_table.insert([{... | [
"heiskr@users.noreply.github.com"
] | heiskr@users.noreply.github.com |
c1bc2f4a7a6e19053fc6df54b28c1c5f3462b74c | eaa257be0b019d4436d0f35a363bc6ab5d014863 | /games/windjammers/runners/SafeWindJammersRunner.py | 167a4475437f5acfdb45aaa3a83953aa37dde5e7 | [] | no_license | antlev/2019-5A-IBD-DRL-Ecosystem | 7ec8ea281b8ff1f99a763fa15eb3f011d6075530 | 3b8cbe2384b5b9be37d7cdda3aa9c1029f2d0e87 | refs/heads/master | 2020-04-07T16:39:35.264162 | 2019-01-20T12:12:59 | 2019-01-20T12:12:59 | 158,537,520 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,581 | py | import os
from environments import Agent
from environments.GameRunner import GameRunner
from games.windjammers.WindJammersGameState import WindJammersGameState
os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" # see issue #152
os.environ["CUDA_VISIBLE_DEVICES"] = "-1"
class SafeWindJammersRunner(GameRunner):
def _... | [
"you@example.com"
] | you@example.com |
2fd9aacbf2ecf655dfcdcb9b6a0e0fff33b75f8f | 8fe514d15c340acbd73da359e2db5ad84853d1a4 | /examples/user/components/greeters/Greeter.py | b20e5a7cada8855f4dca69140ba12d6c490013af | [
"BSD-3-Clause"
] | permissive | geodynamics/pythia | 1e265f5b50263adf149d102c8c51b501f8ff6f3b | e914bc62ae974b999ce556cb6b34cdbcc17338fc | refs/heads/main | 2023-08-09T17:07:01.497081 | 2023-07-26T17:56:22 | 2023-07-26T17:56:22 | 12,655,880 | 1 | 14 | BSD-3-Clause | 2023-07-26T17:56:24 | 2013-09-06T22:23:49 | Python | UTF-8 | Python | false | false | 833 | py | # ======================================================================
#
# Brad T. Aagaard, U.S. Geological Survey
#
# This code was developed as part of the Computational Infrastructure
# for Geodynamics (http://geodynamics.org).
#
# Copyright (c) 2010-2017 University of California, Davis
#
# See COPYING for license... | [
"baagaard@usgs.gov"
] | baagaard@usgs.gov |
b3d167fe431b1fad9b26212a86980d88644521c1 | ce745254ee1c55f06c90b2c0739a4db29efa9913 | /src/test/python/cpython-3f944f44ee41/Lib/tkinter/test/support.py | 7ae0cbb3da1cad9d593dd273b1430c763adce93f | [
"MIT"
] | permissive | bkiers/python3-parser | 5deb0c681e42b07d459758d864fd0689bf26dbad | 5a7e097f2dba8d38fa41ebfc95c8bdf4da3042dd | refs/heads/master | 2022-10-31T22:02:07.484767 | 2021-11-17T09:31:49 | 2021-11-17T09:31:49 | 20,738,250 | 39 | 25 | MIT | 2022-12-13T08:42:28 | 2014-06-11T19:34:28 | Python | UTF-8 | Python | false | false | 2,628 | py | import sys
import tkinter
import unittest
from test.support import requires
def get_tk_root():
requires('gui') # raise exception if tk unavailable
try:
root = tkinter._default_root
except AttributeError:
# it is possible to disable default root in Tkinter, although
# I h... | [
"bkiers@gmail.com"
] | bkiers@gmail.com |
dcbd4c8fa5b65ec4631e0a4787363a13591c241f | 18157c364b847f7d6f4d5239b636533284b9b5e9 | /core/management/commands/inittasks.py | 07c3c332b16ac5a959a10289d77e0ae8fb209a71 | [
"MIT"
] | permissive | volodya-wtf/gitbackup | 028644045a0538e69dc7b063a0bbb77b44ee52ef | df02935e00e20520ad0e2dce8b74fb5ed6fad416 | refs/heads/master | 2023-02-05T13:49:36.661965 | 2020-12-30T04:01:01 | 2020-12-30T04:01:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,100 | py | from datetime import timedelta
from django.core.management.base import BaseCommand
from django.utils import timezone
from django_q.models import Schedule
from django.core.exceptions import ObjectDoesNotExist
from django.conf import settings
class Command(BaseCommand):
help = 'Инициализация тасок'
def handle(... | [
"belyynikolay@gmail.com"
] | belyynikolay@gmail.com |
51918635c61678fa89f71e7a6a004397266657ce | 730e0b802daa7504d3dfb71802cb0a5990410f21 | /recotakd/3rdParty/impacket/build/scripts-2.7/opdump.py | 1cc98ae81aad3bba74b760b991374deab103572a | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"Apache-1.1",
"BSD-2-Clause"
] | permissive | yashraj0077/recotak-framework | 261dfe631255c5cbc7c0de56aca2484b04e586a9 | 2ccb5b378c0ca7bd2a550ac7f7190e1b6db1db0b | refs/heads/master | 2021-05-28T06:11:02.452802 | 2015-01-11T17:57:53 | 2015-01-11T17:57:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,893 | py | #!/home/file/projects/recon/venv/bin/python
"""opdump - scan for operations on a given DCERPC interface
Usage: opdump.py hostname port interface version
This binds to the given hostname:port and DCERPC interface. Then, it tries to
call each of the first 256 operation numbers in turn and reports the outcome
of each ca... | [
"dash@recotak.org"
] | dash@recotak.org |
65584f737c5b06ecec12e38e063905b88779d8bb | e89304d8a606b6505c564730e7f6573a3f996edd | /leetcode_3/easy/961_n_repeated_element_insize_2n_array.py | 10c71f37e5feec5f87554d17222a1a098bb3e533 | [] | no_license | hieubz/Crack_Coding_Interview | 5e6e86c3026d6526480bea608a032915a399b42d | 99423f99072526942fbfe45cf1fde7a53a065f3e | refs/heads/master | 2023-04-06T07:22:34.371323 | 2021-03-28T03:59:12 | 2021-03-28T03:59:12 | 307,743,174 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 240 | py | class Solution:
def repeatedNTimes(self, A):
set_num = set()
for number in A:
if number not in set_num:
set_num.add(number)
else:
return number
return None | [
"phamduyhieuit@gmail.com"
] | phamduyhieuit@gmail.com |
baa0dcb3895ef16582f29c2f0bd233a255da4ec0 | 51472796c7ab60133f1031d81772d96e6e0b12d5 | /torchreid/datasets/dukemtmcvidreid.py | d15c979e07d62fc481442a8781c1369d7abecdfa | [
"MIT"
] | permissive | PayneYong/deep-person-reid | 2dd84bdd49e8a7c020dfab961d08ad5bdfffa65f | 5803b7138e7538a1bea3101a8973ced044d3ccbd | refs/heads/master | 2020-04-22T09:33:09.187374 | 2019-02-11T16:49:27 | 2019-02-11T16:49:27 | 170,276,280 | 0 | 2 | null | 2019-02-12T07:57:08 | 2019-02-12T07:57:08 | null | UTF-8 | Python | false | false | 6,139 | py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import glob
import re
import sys
import urllib
import tarfile
import zipfile
import os.path as osp
from scipy.io import loadmat
import numpy as np
import h5py
from scipy.misc import imsave
from torch... | [
"k.zhou@qmul.ac.uk"
] | k.zhou@qmul.ac.uk |
6015fad97ea7f08a310cd2d85123da75dd586302 | 47dfa145704444bb62d9e6e4f4163bde13abdbd5 | /fancy/eventbus/executor/executor_base.py | a9b038dbb4abbb991dda2bf9e7870656720eb9da | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | susautw/fancy-eventbus | 1c2e4e8d64c2726e2f5ac373a91f2218c1ad2500 | 8c2c693538906c35ae87e12ec8a66f2e5d31f86b | refs/heads/master | 2022-12-02T01:05:17.403909 | 2020-08-21T12:59:06 | 2020-08-21T12:59:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 200 | py | from abc import ABC, abstractmethod
from fancy.eventbus import EventListener
class ExecutorBase(ABC):
@abstractmethod
def execute(self, event_listener: EventListener) -> bool:
pass
| [
"susautw@gmail.com"
] | susautw@gmail.com |
e7999ad44ac36d645a0b5b0b6e2499d6a55edb67 | 53d9fb690e702b8f9d408a08a7e8d8c62fa73504 | /docker_unpack.py | b1d59f8d39830851ef1ec095196102c35367be1d | [] | no_license | christopheralanwest/cms-bot | b0f1bd6cffc138079613fb2b3bb0cea3119e41bc | d49a3d6063e75e5681069f436267e9e213a75172 | refs/heads/master | 2021-06-14T00:34:51.141546 | 2019-04-09T21:13:52 | 2019-04-09T21:13:52 | 180,491,882 | 0 | 0 | null | 2019-04-10T03:09:11 | 2019-04-10T03:09:09 | null | UTF-8 | Python | false | false | 4,040 | py | #!/usr/bin/env python
from json import loads
from sys import exit, argv
import hashlib, stat
from os.path import exists, join
from os import makedirs, walk, lstat, chmod
from commands import getstatusoutput as runCmd
def cleanup_exit(msg, tmpdirs=[], image_hash="", exit_code=1):
if msg: print msg
for tdir in tm... | [
"Shahzad.Malik.Muzaffar@cern.ch"
] | Shahzad.Malik.Muzaffar@cern.ch |
1490eda66d6ba53657b08a255eab845d6bcedd3f | 4ff56938f2da4385929b9932433b598dd76f6173 | /plugins/modules/cp_mgmt_threat_layer.py | 530f36cc20f6715d19b1983f576d59af92917f26 | [] | no_license | ansible-collection-migration/checkpoint.checkpoint | 118eadc92c227c9752615dc2c1b32848520987d8 | 9c285cc763bb1ebaa268812d85922d9f4643135b | refs/heads/master | 2020-12-26T23:11:34.859358 | 2020-02-03T22:25:20 | 2020-02-03T22:25:20 | 237,681,634 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,724 | py | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Ansible module to manage Check Point Firewall (c) 2019
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your o... | [
"ansible_migration@example.com"
] | ansible_migration@example.com |
374aa3b434a9c3715b62b3b2e43391fb957bdc47 | c60c199410289c1d7ec4aea00833b461e1f08f88 | /.history/older-than/day2/local.py | 5bcd9deff4a176ab9679f7f6d06d10e8b9bfc55c | [] | no_license | ver007/pythonjumpstart | 66fb111e6af197fad3e853b2c2d712a1b57a7d59 | 5b1f52479abd07456e2da494149e491d398f3b7d | refs/heads/master | 2021-01-21T01:34:35.501870 | 2015-05-13T14:10:13 | 2015-05-13T14:10:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 152 | py | #!/usr/bin/env python
n = 100 #global
def test():
global n
n = 102
print id(n)
n = 103
print id(n)
print n
test()
print id(n)
print n
| [
"ravi@rootcap.in"
] | ravi@rootcap.in |
8b36b62ba212887ddafd7f3ee0185be3d5b2420a | e099a4700b8e4ed718666a76e0b09c4c2eade1ee | /extras/python/iotsaControl/protocols.py | d18abdc6ae1059333d976b9738163d5b70337edf | [
"MIT"
] | permissive | firespeed79/iotsa | 34c2c22fa86c1ad55b34f98581e0d15b60a56bab | 1639f9e0f482932a594d71f76463d2960243fff7 | refs/heads/master | 2023-01-06T19:24:57.739916 | 2020-04-22T23:23:59 | 2020-04-22T23:23:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,051 | py | from __future__ import print_function
from __future__ import absolute_import
from __future__ import unicode_literals
from future import standard_library
standard_library.install_aliases()
from builtins import str
from builtins import object
import sys
import socket
import time
import urllib.parse
import urllib.request
... | [
"Jack.Jansen@cwi.nl"
] | Jack.Jansen@cwi.nl |
23e60009a336392e90506eaafce4a3244f6937a1 | 4bed9030031fc99f6ea3d5267bd9e773f54320f8 | /sparse/repos/bmabey/pyLDAvis/setup.py | 1b5c25f6ea40c3af0ee435b2f4f67c55fc1283d6 | [
"BSD-3-Clause"
] | permissive | yuvipanda/mybinder.org-analytics | c5f4b939541d29727bc8d3c023b4d140de756f69 | 7b654e3e21dea790505c626d688aa15640ea5808 | refs/heads/master | 2021-06-13T05:49:12.447172 | 2018-12-22T21:48:12 | 2018-12-22T21:48:12 | 162,839,358 | 1 | 1 | BSD-3-Clause | 2021-06-10T21:05:50 | 2018-12-22T20:01:52 | Jupyter Notebook | UTF-8 | Python | false | false | 2,649 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import os
try:
from setuptools import setup
from setuptools.command.test import test as TestCommand
except ImportError:
from distutils.core import setup
from distutils.core.command.test import test as TestCommand
with open('README.rst') as re... | [
"yuvipanda@gmail.com"
] | yuvipanda@gmail.com |
2e61cb52fbc8af13126f7458f625f5444a81e082 | acad69f0abe162eea0cb13cbe15bfd88f6da08b4 | /down-stream-tasks/mmdetection/mmdet/models/backbones/__init__.py | d14e3e420d087cf896d78c21bc92f24123fa02e8 | [
"Apache-2.0"
] | permissive | zhangzjn/EMO | 69afcac53800d8b9a390f1214e178e2ca4da3b24 | 141afbdbce04683790f0699f256327ec420be442 | refs/heads/main | 2023-08-27T19:04:23.313676 | 2023-08-15T04:09:55 | 2023-08-15T04:09:55 | 584,987,542 | 139 | 9 | null | null | null | null | UTF-8 | Python | false | false | 1,061 | py | # Copyright (c) OpenMMLab. All rights reserved.
from .csp_darknet import CSPDarknet
from .darknet import Darknet
from .detectors_resnet import DetectoRS_ResNet
from .detectors_resnext import DetectoRS_ResNeXt
from .efficientnet import EfficientNet
from .hourglass import HourglassNet
from .hrnet import HRNet
fro... | [
"186368@zju.edu.cn"
] | 186368@zju.edu.cn |
b70a9f7d2a988bb08a6d979e700aa56d4c9b5181 | cb4a643abbc0385c77ace96e9b2f61a9900afbaa | /348_design_tic_tac_toe.py | 104a9bdac8a4d9c1f17e03790ec4501025d7956f | [] | no_license | HongsenHe/algo2018 | c0343a647993b0128d57ef779d3249a1d22d7452 | 034efcefe9940267abcf4c9cab655b2344e3e901 | refs/heads/master | 2022-05-30T14:16:11.791650 | 2022-05-11T04:33:35 | 2022-05-11T04:33:35 | 124,703,035 | 0 | 0 | null | 2019-05-22T15:48:16 | 2018-03-10T22:17:31 | Python | UTF-8 | Python | false | false | 1,851 | py | class TicTacToe:
'''
03122022
暴力解法,对于最后一步棋,即当前的row, col, 分别判断它所在的row/col/diagonal
注意 diagonal有两种,分别判断。
'''
def __init__(self, n: int):
self.n = n
self.board = [[0 for _ in range(n)] for _ in range(n)]
def move(self, row: int, col: int, player: int) -> int:
self.bo... | [
"hhsen8816@gmail.com"
] | hhsen8816@gmail.com |
54f37de64ad3b6b472500ae02bda9ba35f7583be | fab60f7263e614160b356e7a3958b286634ad4cf | /gmail_cleaner.py | 63ff0aff083544589d99a433e356d6b060ae733d | [
"Apache-2.0"
] | permissive | wflk/gmail_cleaner | a0f773998655d85dee38b8369dd556adba305dbc | 786e02bfd749af8445cb6e403461ac737d319902 | refs/heads/master | 2021-01-16T19:12:19.511019 | 2016-03-25T04:17:42 | 2016-03-25T04:17:42 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,391 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Try to clean up your fucking Gmail by deleting 1 at a time.
Hard-coded to delete by sender right now. If you want to delete by something
else, Google it.
Also, it sometimes crashes for random reasons but usually will end up deleting
10s of thousands of emails before ... | [
"jathan@gmail.com"
] | jathan@gmail.com |
aba06587619da24bb9dde615033654d635cdaca7 | 1fb4d033350981814397e3d22e8470b89b5c2738 | /karlooper/utils/encrypt.py | b76ab1d23f3f8add33746c3b4987e9e46afebd31 | [
"MIT"
] | permissive | Ulber/karlooper | 6b78e1fc069744f34ea110c36dab013c117c069c | 2e1df83ed1ec9b343cdd930162a4de7ecd149c04 | refs/heads/master | 2020-06-29T20:38:16.936151 | 2018-08-05T08:17:06 | 2018-08-05T08:17:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,681 | py | # -*-coding:utf-8-*-
"""
security
~~~~~~~~
Use this model to encrypt string.
Usage
=====
>>> d = StrEncryption()
>>> d.input_key("123456789")
>>> s = "/static/hello.js"
>>> a = d.encode(s)
>>> print a
L3N0YXRpYy9oZWxsby5qczEyMzQ1Njc4OQ==
>>> b = d.decode(a)
>>> print b
/static/hello.js
"""
from karlooper.utils impo... | [
"karlvorndoenitz@gmail.com"
] | karlvorndoenitz@gmail.com |
696901d2a6df971ed6240679fd1818e7720d51bb | 618d23ab704706d1f0f392096e401adc0cab6487 | /modules/feedgenerator/feedgenerator/generator.py | 2f0451cff6aa5ad700c2ec68272003a49ce5e297 | [] | no_license | kristofkeppens/lernfunk3 | 0225ff7485c3130d7033aba5b58bd2f29afe5a69 | 1757cd3b3286f746a0f5aadf810d8a24c7641c06 | refs/heads/master | 2021-06-04T11:05:42.078984 | 2013-09-14T13:15:14 | 2013-09-14T13:15:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,812 | py | # -*- coding: utf-8 -*-
"""
feedgenerator.generator
~~~~~~~~~~~~~~~~~~~~~~~
:copyright: 2013 by Lars Kiesow
:license: FreeBSD, see LICENSE for more details.
"""
import urllib2
import json
import time
from feedgen.feed import FeedGenerator
from feedgenerator import app
from feedgenerator.storage import *
def bu... | [
"lkiesow@uos.de"
] | lkiesow@uos.de |
2eab0466a8779480fc8fd9e0c27246030d3afc2d | 79f42fd0de70f0fea931af610faeca3205fd54d4 | /base_lib/ChartDirector/pythondemo_cgi/contour.py | c30243656f02b3fc6229f478cd8797ab81b9c5b8 | [
"IJG"
] | permissive | fanwen390922198/ceph_pressure_test | a900a6dc20473ae3ff1241188ed012d22de2eace | b6a5b6d324e935915090e791d9722d921f659b26 | refs/heads/main | 2021-08-27T16:26:57.500359 | 2021-06-02T05:18:39 | 2021-06-02T05:18:39 | 115,672,998 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,253 | py | #!/usr/bin/python
from pychartdir import *
import math
# The x and y coordinates of the grid
dataX = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
dataY = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
# The values at the grid points. In this example, we will... | [
"fanwen@sscc.com"
] | fanwen@sscc.com |
24b43d2fbb26709f4395b2be7dc8314c4e86ca96 | 63915be799c520afd94a29695d6a4d22891c0cf1 | /0x0C-python-input_output/10-class_to_json.py | 4bd8a3c8a97d3436eacaeb7bf1bfd0f6a2997715 | [] | no_license | jadsm98/holbertonschool-python | 77577e2c6c70e8e9dc3252f7fb99b98df54e6fcc | 695c2bb72f67462e977dbfba69dd67c2dcc09dae | refs/heads/master | 2023-01-13T07:39:57.486781 | 2020-11-20T22:35:12 | 2020-11-20T22:35:12 | 291,759,154 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 130 | py | #!/usr/bin/python3
"""module class_to_json"""
def class_to_json(obj):
"""function class_to_json"""
return obj.__dict__
| [
"jadsamaha98@gmail.com"
] | jadsamaha98@gmail.com |
38852508044576b657763cc77ed629ee183551ae | 8bd02f59616b05b013596146ce35bb6cdc733cec | /014-Full-Binary-Tree/code.py | 109eb1cdbcb340afbcc62b7c1fd5862a0223b2da | [] | no_license | rrkas-materials/DS-Algo | 014a3cd2206ba19613cdd35b4f2f8df20cdf042e | 7b6990759633ef20864a5b1d0af96b1f11200ea9 | refs/heads/master | 2023-06-06T23:16:57.291660 | 2021-07-04T13:26:17 | 2021-07-04T13:26:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 960 | py | # Checking if a binary tree is a full binary tree in Python
# Creating a node
class Node:
def __init__(self, item):
self.item = item
self.leftChild = None
self.rightChild = None
# Checking full binary tree
def isFullTree(root):
# Tree empty case
if root is None:
return ... | [
"rrka79wal@gmail.com"
] | rrka79wal@gmail.com |
3b4ea8600a050787974704a50a6da76e90f2d9b9 | 2aace9bb170363e181eb7520e93def25f38dbe5c | /build/idea-sandbox/system/python_stubs/cache/d88fb11e30edeea0cc9b4120d66ce9e68ab8637e8088a8439dfa63c36a34831a/pyexpat/model.py | af492121eb5ef1ab7e8bd107081c7f2f09333d21 | [] | no_license | qkpqkp/PlagCheck | 13cb66fd2b2caa2451690bb72a2634bdaa07f1e6 | d229904674a5a6e46738179c7494488ca930045e | refs/heads/master | 2023-05-28T15:06:08.723143 | 2021-06-09T05:36:34 | 2021-06-09T05:36:34 | 375,235,940 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 522 | py | # encoding: utf-8
# module pyexpat.model
# from C:\Users\Doly\Anaconda3\lib\site-packages\sklearn\tree\_splitter.cp37-win_amd64.pyd
# by generator 1.147
""" Constants used to interpret content model information. """
# no imports
# Variables with simple values
XML_CQUANT_NONE = 0
XML_CQUANT_OPT = 1
XML_CQUANT_PLUS = 3... | [
"qinkunpeng2015@163.com"
] | qinkunpeng2015@163.com |
87ed9da4b869b7adcd0616bdc2148082770a1ae2 | 37849c127c2d13f3178d416d46499c21ab4a6f4b | /user/urls.py | 75e4a0b7027d2cd240b05747ef5a57d5563f88c9 | [] | no_license | bensq2/jms | 0297fde312e57c88dcf15dec904e826843cbea23 | 5f65b2fbb59986c09cbf991c76a37bafc1540e68 | refs/heads/master | 2022-02-13T23:11:04.425385 | 2019-08-13T09:36:14 | 2019-08-13T09:36:14 | 93,011,865 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 570 | py | #!/usr/bin/env python
# coding: utf-8
# Created by guang on
#
from django.conf.urls import url
from . import views
app_name = 'user'
urlpatterns = [
url(r'^$', views.user_list, name='list'),
url(r'^add/$', views.user_add, name='add'),
url(r'^(?P<user_id>[0-9]+)/update/$', views.user_update, name='upd... | [
"ibuler@qq.com"
] | ibuler@qq.com |
7e3416829370406806cbe321dc554d08b699e7aa | 78d7d7aeb78a8cea6d0e10b89fc4aa6c46c95227 | /2611.py | d2cf1aea5707476a000d3ad7d8520a95862eddca | [] | no_license | GenryEden/kpolyakovName | 97db13ef93061a8c2afc6cc5acd91337f79063f1 | c5d7f631ae7ec8770e56170574b82ea2b7d8a4d9 | refs/heads/master | 2023-05-23T21:22:51.983756 | 2021-06-21T08:56:49 | 2021-06-21T08:56:49 | 350,466,773 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 625 | py | from math import isqrt, floor
def isSimple(x):
if x == 1:
return False
if x == 2:
return True
if x % 2 == 0:
return False
for i in range(3, min(isqrt(x)+1, x), 2):
if x % i == 0:
return False
return True
def check2(x):
for i in range(2, min(x, isqrt(x)+1)):
if x % i == 0:
if x//i != i and isSimp... | [
"a926788@gmail.com"
] | a926788@gmail.com |
a736b27f160392d3359215c49dacf39866031a0d | d35b5dc9c91bc3c2f439ce765ccda2cccd823874 | /wizard_builder/migrations/0044_auto_20171101_1412.py | fc50c0be18913e06be2d9234bc61a04684809df5 | [
"BSD-2-Clause"
] | permissive | CSC322-Grinnell/django-wizard-builder | b87493510b6e36926be9fc7c1cec0f0d5ae431ee | a01a2c44b19c9e2d338a1db2e8d40a1f938d83f0 | refs/heads/master | 2021-09-14T03:48:03.290234 | 2018-05-07T20:48:12 | 2018-05-07T20:48:12 | 122,393,490 | 0 | 0 | BSD-3-Clause | 2023-08-23T07:06:35 | 2018-02-21T21:04:51 | Python | UTF-8 | Python | false | false | 643 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-11-01 14:12
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('wizard_builder', '0043_multiplechoice'),
]
operations = [
migrations.AlterF... | [
"firemagelynn@gmail.com"
] | firemagelynn@gmail.com |
aeaf188c5e9981f6ba4d310f6115f96ed73a92d3 | 6821062a2746cc52fae66deea3d7cc83ebd14c4a | /python/49.group-anagrams.py | 9c17d5454592ea98c05a5d2a2b2b650d6e1c550b | [
"MIT"
] | permissive | csfun666/leetcode-4 | 902333d09654aba7bfaac25996b145dfc33b90ac | 1ab083b6336fbd01da44d8e5abe18a1e57a8826d | refs/heads/master | 2023-06-26T22:32:27.936625 | 2021-07-23T06:59:13 | 2021-07-23T06:59:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 526 | py | #
# @lc app=leetcode id=49 lang=python3
#
# [49] Group Anagrams
#
class Solution:
def groupAnagrams(self, strs: List[str]) -> List[List[str]]:
if not strs or len(strs) == 0:
return []
strs.sort()
mapping = {}
for word in strs:
sorted_word = ''.join(list(sorte... | [
"32248549+Zhenye-Na@users.noreply.github.com"
] | 32248549+Zhenye-Na@users.noreply.github.com |
860152cefc67bf38a4bd2ea3bafdc7cd5f16ddfe | 49791d11192837e2448c38698c6fdcfa309d680d | /src/square_sum.py | d66e9b592d717ee1823efdc987168b9a93ac89ed | [
"MIT"
] | permissive | canonicalmg/code-katas | 6ab9ec20ff7ff601f8f15b94f674f16acf3b8483 | 213bfc66b2ffb63cc2ee8c5e31123f8e803756df | refs/heads/master | 2023-08-25T17:45:56.490877 | 2017-06-27T23:26:19 | 2017-06-27T23:26:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 152 | py | """Function that returns the sum of squares."""
def square_sum(numbers):
"""Return the sum of squares."""
return sum([i**2 for i in numbers])
| [
"clairejgatenby@gmail.com"
] | clairejgatenby@gmail.com |
6087331d5b42fe3697536afa1c87bdae0f40918d | 6be8aa517e679b33b47d35f100e6590902a8a1db | /DataStructure/Tree/Problem11.py | 69bd34bc386038ffdeac746cfd4b2c026292e740 | [] | no_license | LeeJuhae/Algorithm-Python | 7ca4762712e5e84d1e277abecb3bf39c9cbd4e56 | 729947b4428205adfbac194a5527b0eeafe1c525 | refs/heads/master | 2023-04-24T01:02:36.430970 | 2021-05-23T07:17:25 | 2021-05-23T07:17:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,318 | py | # https://www.acmicpc.net/problem/11437
import sys
from collections import defaultdict, deque
from math import log
read = sys.stdin.readline
n = int(read().strip())
maxH = int(log(n, 2))
adj = defaultdict(list)
for _ in range(n - 1):
st, to = map(int, read().strip().split())
adj[st].append(to)
adj[to].appe... | [
"gusdn0657@gmail.com"
] | gusdn0657@gmail.com |
86472cb39465046e5d26d96baa112a00b19323bf | e902470b1e6dad9be93631d3663382082f2b3221 | /math/0x04-convolutions_and_pooling/6-pool.py | c639b738fda08947c0e198a712b316e0c2a790cc | [] | no_license | BrianFs04/holbertonschool-machine_learning | 11bb645d86a0de74434d37bb36a239534e7d0787 | d9b5fa4d60cd896c42242d9e72c348bd33046fba | refs/heads/master | 2022-12-30T07:13:12.868358 | 2020-10-03T22:40:36 | 2020-10-03T22:40:36 | 279,386,948 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,039 | py | #!/usr/bin/env python3
"""pool function"""
import numpy as np
def pool(images, kernel_shape, stride, mode='max'):
"""Performs pooling on images"""
# strides for height and width
sh, sw = stride
# number of images, input height, input width and channels
m, h, w, c = images.shape
# filter height... | [
"brayanflorezsanabria@gmail.com"
] | brayanflorezsanabria@gmail.com |
9f8e3a5106f0285e0879d516ae781be836c7741f | 04b494a2286e7d0ec3bbe8d25c15d575486a0f91 | /_exercises/exercise060/exercise060.py | a68ae2c3671ae176f07bfa708e81b3aa8e58608f | [] | no_license | ViniciusGranado/_studies_Python | ea6adc35edccfbd81a67a613e8cd468fd8485856 | af645fa777a408a8ff1b8ed89911971f5b537ac7 | refs/heads/master | 2023-02-01T19:57:04.117047 | 2020-12-19T00:56:10 | 2020-12-19T00:56:10 | 258,855,637 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 639 | py | def get_factorial(number):
if number == 0:
return 1
else:
return number * get_factorial(number-1)
def get_number():
while True:
user_number_str = input('Digite um número inteiro para calcular o seu fatorial: ').strip()
if user_number_str.isnumeric():
return int... | [
"vinicius.r.granado@gmail.com"
] | vinicius.r.granado@gmail.com |
64d0a2951158d57f1e36ccd84fc685402c5e165f | cced4bd53b08258ea3999e3e8282dbb3902829dd | /contracts/constants.py | be7195a6366fd226c11a9e97b45a6627d40731fe | [] | no_license | lmoppert/KRONOS-IT-Fin | 5e75e120618c8b484205538166b897a4d20c5495 | c16ec95fad8f676a16ed33fda44a3da2d907ce2d | refs/heads/master | 2022-05-31T18:53:06.550664 | 2022-05-30T09:04:41 | 2022-05-30T09:04:41 | 215,508,698 | 0 | 0 | null | 2022-03-12T00:03:14 | 2019-10-16T09:26:45 | Python | UTF-8 | Python | false | false | 312 | py | # Constant definitions for the contracts app
from django.utils.translation import ugettext_lazy as _
EXPENDITURES = (
('', _('unknown')),
('c', _('CAPEX')),
('o', _('OPEX')),
)
SUBJECTS = (
('', _('unknown')),
('hw', _('Hardware')),
('sw', _('Software')),
('ps', _('Service')),
)
| [
"lutz.moppert@kronosww.com"
] | lutz.moppert@kronosww.com |
8050bc80419acd822272512e22b2ca3894b4b787 | af17007c9f8b0ccb0b482f0c76e94b542bc236cf | /LC_n_Misc/LC_840_magic_grid.py | dae348c58cbe3e42c1e6e8c95ab36e1034b158d4 | [] | no_license | abhikrish06/PythonPractice | da72a81845bb73e2902ec37aff9c3b31587ef9ed | 24988428cada3b1f8a6c0cf0140e288511cd9a6d | refs/heads/master | 2021-03-27T18:41:59.953316 | 2018-11-03T23:44:38 | 2018-11-03T23:44:38 | 115,932,355 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 848 | py | class Solution:
def numMagicSquaresInside(self, grid):
"""
:type grid: List[List[int]]
:rtype: int
"""
cntr = 0
for i in range(len(grid)):
for i in range(len(grid) - 2):
for j in range(len(grid) - 2):
if grid[i][j] < 1 or grid[i][j... | [
"abhikrish06@gmail.com"
] | abhikrish06@gmail.com |
47aebb790a4d05492a7ea912a4fcb4844eb91baa | fb1b395c6825760226ac8a02db8fec3befe3b7d1 | /workspace/trivia/backend/tests/test_search_questions.py | 46089617f3fad4f2c23d0a5f5e7ce4d60a66ecdf | [] | no_license | AlexGeControl/Full-Stacker--06-flask-restful-api-development | b8d2444fdf0b780121d5a94cc558832f4cf428bf | 3fcdfb4e5399cf17830438bde381ac18cd88b874 | refs/heads/master | 2022-10-02T14:54:23.443757 | 2020-02-25T13:42:38 | 2020-02-25T13:42:38 | 242,454,245 | 0 | 0 | null | 2022-09-16T18:17:49 | 2020-02-23T04:09:53 | Python | UTF-8 | Python | false | false | 3,595 | py | import unittest
import json
from flask import current_app
from flask import url_for
from application import create_app, db
from application.models import Category, CategoryFactory, Question, QuestionFactory
class SearchQuestionsTestCase(unittest.TestCase):
def setUp(self):
self.app = create_app('testing... | [
"alexgecontrol@qq.com"
] | alexgecontrol@qq.com |
27f7a714fe0bdc107151ebdaa7271ce4dd736f7e | efec673fcc2c53e66a851e7899fdbd018effe615 | /keydoc/keydoc_merge.py | fce60d054668334777725287e75d538c7bac15d6 | [] | no_license | sanskrit-lexicon/hwnorm2 | 12955c137cea1785819468f5a8e69f0719f2d357 | ee21e308a322bba202aaab06ee5e64da6414511d | refs/heads/master | 2021-07-06T13:02:05.242477 | 2021-05-04T16:58:06 | 2021-05-04T16:58:06 | 237,683,670 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,146 | py | """hwnorm1c.py
An emulation of hwnorm1/sanhw1/hwnorm1c
"""
from __future__ import print_function
import sys, re,codecs
import os
#from hwnorm1c import normalize_key
class HWDoc(object):
def __init__(self,line):
line = line.rstrip('\r\n')
parts = line.split('\t')
# dochws is list of dictionary headwords defini... | [
"funderburkjim@gmail.com"
] | funderburkjim@gmail.com |
fe46d8d7d4f15f238af962ed26958ebee3e41d30 | 2f91251d41f32346f2f6eb5f0a6e957f253f005f | /tree/python/leetcode222_Count_Complete_Tree_Nodes.py | ce51ab0402d5b04916ea4865f8c8969f274a8f0e | [
"Apache-2.0"
] | permissive | wenxinjie/leetcode | 8a5f666a1548d0d205cea09cb87fc2c65aec2b58 | c459a01040c8fe0783e15a16b8d7cca4baf4612a | refs/heads/master | 2020-03-24T21:56:00.662969 | 2018-09-06T21:25:58 | 2018-09-06T21:25:58 | 143,058,016 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,586 | py | # Given a complete binary tree, count the number of nodes.
# Note:
# Definition of a complete binary tree from Wikipedia:
# In a complete binary tree every level, except possibly the last, is completely filled, and all nodes in the last level are as far left as possible. It can have between 1 and 2h nodes inclusive a... | [
"wenxinjieinnyc@gmail.com"
] | wenxinjieinnyc@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.