blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 3 281 | content_id stringlengths 40 40 | detected_licenses listlengths 0 57 | license_type stringclasses 2
values | repo_name stringlengths 6 116 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 313
values | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 18.2k 668M ⌀ | star_events_count int64 0 102k | fork_events_count int64 0 38.2k | gha_license_id stringclasses 17
values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 107
values | src_encoding stringclasses 20
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 4 6.02M | extension stringclasses 78
values | content stringlengths 2 6.02M | authors listlengths 1 1 | author stringlengths 0 175 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ab2580456643f3039913d26a1e590f2ea28c0723 | 9a4e70dfa288c0f0bf30cec8f57d398bef78a22c | /zajecia/zadCwiczenia4e.py | 5869fd0b84adb44eea1cc85c3668029a064d6660 | [] | no_license | mronowska/python_code_me | 3a7ff4bf5459e623c2af1d0331c1becb413d769b | 916f62bfe3ae41f76750953fba4b50d0be99ea13 | refs/heads/master | 2023-01-29T01:50:10.788469 | 2020-12-05T22:09:01 | 2020-12-05T22:09:01 | 317,294,972 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 239 | py | #modyfikatory - continue i break
lista = ["Andrzej", "Monika", "Marek", "Karolina", "Ania"]
for imie in lista:
print(2 + 1)
continue
for imie in lista:
if imie == "Marek":
print("Nie lubimy Marka...")
break
| [
"monronow@gmail.com"
] | monronow@gmail.com |
b6eef210780de471b358d6fde062f998bd503b03 | b2e8b8223b1742bcb4d5798f0162b79d683fd877 | /algorithms/fixed_sequence_lstm.py | f6dbc12635f003625d1830b17bfb42592927f754 | [] | no_license | spolu/neuromancer | 5fa8c21be35ab0709a1ee0477d3d86624b4c70a9 | ce1bd64edcf4cd3da3ae21bb27a0e8b4c10e3c13 | refs/heads/master | 2020-04-08T12:19:08.961253 | 2018-11-27T16:47:51 | 2018-11-27T16:47:51 | 159,342,333 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,015 | py | import sys
import torch
import collections
import torch.nn as nn
import torch.optim as optim
from data.corpus import Corpus, CorpusDictionary
from utils import Meter, Config
from torch.utils.data import DataLoader
class LSTMPolicy(nn.Module):
def __init__(
self,
config: Config,
... | [
"polu.stanislas@gmail.com"
] | polu.stanislas@gmail.com |
3f8a0fafc7d03d42481365c073a4dad659afc6ac | 49ba5356bdc5df7dd9803b56fe507c5164a90716 | /greatest-common-divisor-of-strings/test_solution.py | 2c2c95aefa31c52e1d40ac929287824839313cf5 | [] | no_license | uxlsl/leetcode_practice | d80ad481c9d8ee71cce0f3c66e98446ced149635 | d8ed762d1005975f0de4f07760c9671195621c88 | refs/heads/master | 2021-04-25T18:12:28.136504 | 2020-03-11T07:54:15 | 2020-03-11T07:54:15 | 121,472,384 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 138 | py | from solution import Solution
def test_solution():
s = Solution()
assert s.gcdOfStrings(str1 = "ABCABC", str2 = "ABC") == "ABC"
| [
"songlin.lin@yunfangdata.com"
] | songlin.lin@yunfangdata.com |
0761dd7b9e1f4aca94905c69990cea9ea5a77a27 | 873548523bc4a6bd876560e7ae21a8a1554ebd3c | /wiki.py | 34cc582884b8d5554221d2efdf72a7f720cf92fe | [] | no_license | FinnishArmy/sixDegrees-of-Wikipedia- | 7fa3ea93cdef402cfc04708ed493845eb7baba5f | 39ef3a77cf29f482498277fad7983252c0890a4e | refs/heads/main | 2023-07-16T09:17:52.143414 | 2021-08-30T01:14:07 | 2021-08-30T01:14:07 | 401,179,199 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,471 | py | # Import libraries
from bs4 import BeautifulSoup
import requests
from urllib.request import urlparse
import re
# !-- Change for starting URL --! #
inputUrl = "https://en.wikipedia.org/wiki/Special:Random"
# !-- Change for ending URL --! #
endUrl = "https://en.wikipedia.org/wiki/Star_Wars"
# Parse the page for the ur... | [
"ronnyvaltonen@gmail.com"
] | ronnyvaltonen@gmail.com |
00d25f08e4aa860241e4affc07de3522cdf299a7 | f5f9e89cfe942ce18e62d222c2cefb83d0ef9e47 | /callapi.py | cd875acfcf6e5acf31afbaea77da6e5b7689e2c0 | [] | no_license | malu1112/REST_RESTFUL_API | cc40c0304364364ede33b882cdacc50eff08816e | 250e0ca83c69f329637684a020b855bdba7ef7e1 | refs/heads/master | 2020-04-08T03:41:51.229435 | 2018-11-25T01:07:29 | 2018-11-25T01:07:29 | 158,986,535 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 439 | py | import requests
import json
client = requests.session()
parameters = {
"mytest" : "hello",
"age": 2,
"name" : ["malu","jasu","gopi"]
}
output = client.post("http://localhost:5000", json=parameters)
if output.status_code == 200:
out = output.content
json_out = json.loads(out)
pr... | [
"noreply@github.com"
] | noreply@github.com |
4a98b8fcc727e88ce26f8d3498359f3e14bd2787 | 76c50a9849b4093c6339dfeff888a5a0672a92bc | /yatsm/phenology/longtermmean.py | 627bb96a977f314a1651c0440907c1813340f769 | [
"MIT"
] | permissive | valpasq/yatsm | d2fac9c7eea6f8a785d6c5b6c24196bb9f441db0 | 44e2124c1bae3dd4245437475d709187f52d376d | refs/heads/master | 2021-01-18T07:40:33.260515 | 2016-09-13T16:22:36 | 2016-09-13T16:22:36 | 40,021,588 | 0 | 0 | null | 2015-07-31T19:30:14 | 2015-07-31T19:30:14 | null | UTF-8 | Python | false | false | 11,900 | py | """ Implementation of Eli Melaas' Landsat phenology algorithm
See:
Melaas, EK, MA Friedl, and Z Zhu. 2013. Detecting interannual variation in
deciduous broadleaf forest phenology using Landsat TM/ETM+ data. Remote
Sensing of Environment 132: 176-185.
"""
from __future__ import division
from datetime impo... | [
"ceholden@gmail.com"
] | ceholden@gmail.com |
abde29d25e43903a0f6e1f4c46de3be8af5ee9eb | bd55aab776360070f792cef0fca3d63dba7071bf | /forum.py | 93c6601b53d09dc38275b4dcd2c2398206a2bdcb | [] | no_license | as234545/security_bug | 04e1bb8223c1b00c61827b3b6add6cc650cc2099 | 76fac9274ae0635e22f0131f6e4f71f8c5341a74 | refs/heads/master | 2020-04-24T19:55:18.965954 | 2019-02-23T17:52:04 | 2019-02-23T17:52:04 | 172,227,718 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,416 | py | #!/usr/bin/env python3
#
# A buggy web service in need of a database.
from flask import Flask, request, redirect, url_for
from forumdb_stepone import get_posts, add_post
app = Flask(__name__)
# HTML template for the forum page
HTML_WRAP = '''\
<!DOCTYPE html>
<html>
<head>
<title>DB Forum</title>
<style>... | [
"noreply@github.com"
] | noreply@github.com |
9adcb1a5555e830b00e068904e3ce63eda4ba958 | a9ae0954990a25fd075568c133cb3770cb389395 | /learning_logs/forms.py | 0889a743179edc52a6ce8e843a4106bf40412c87 | [] | no_license | Yi1ee/djangotest | 6bdeda068b3c705bec25a7bb0d92cf0154c90d25 | b247ac8c0dc304141ce2d3df55278c1eb409a10e | refs/heads/master | 2020-11-29T12:18:19.962387 | 2020-01-03T14:22:11 | 2020-01-03T14:22:11 | 230,111,854 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 383 | py | from django import forms
from .models import Topic,Entry
class TopicForm(forms.ModelForm):
class Meta:
model = Topic
fields = {'text'}
labels = {'text':''}
class EntryForm(forms.ModelForm):
class Meta:
model = Entry
fields = {'text'}
labels = {'text':''}
... | [
"951251531@qq.com"
] | 951251531@qq.com |
cc23c76134fe06afbe66053ce6dfcbbd9a64b1d3 | e427b8c03b5003e1ee7dfa6ac5b873f02c448fba | /add_negatives_of_array.py | 93c2ea2b9d78bb9484ee13edfdd444ba1f828bc9 | [] | no_license | stephensander1161/python-scripts | dd050fab0821f4d6067784673a02d00416d0953a | 2fe3dda779ca5fb8448ed0af38d673a223eea771 | refs/heads/master | 2022-12-19T20:39:01.685693 | 2020-10-07T18:18:33 | 2020-10-07T18:18:33 | 296,124,355 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 199 | py | # add all the negative numbers
given_list = [ 7,5,4,4,3,1,-2,-2,-3,-5,-7]
total = 0
i = 0
while i < len(given_list):
if given_list[i] <= 0:
total += given_list[i]
i += 1
print(total) | [
"57675208+stephensander1161@users.noreply.github.com"
] | 57675208+stephensander1161@users.noreply.github.com |
94335ba4ed3a67c901f91ec637afbe9e6529c4f5 | 1244661f62272cd96ba9861f7224304f08a7a9a8 | /ZooGame/Classes/Creatures/Animals/Fish.py | 99d35fa837a8ff956909352a0659ea60f11abbf1 | [] | no_license | anfelder/Games | d891d2400efb80c0e8d9a45a29e47b225de7dac7 | c20867301196693a0d9b968b8f19457a8dbdfa60 | refs/heads/main | 2022-12-25T17:23:07.515837 | 2020-10-10T06:50:43 | 2020-10-10T06:50:43 | 302,818,674 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 199 | py | from .Animal import *
class Fish(Animal):
type_count = 0
def __init__(self):
super(Fish, self).__init__()
print("created fish")
Fish.type_count = Fish.type_count + 1 | [
"andrewfelder95@gmail.com"
] | andrewfelder95@gmail.com |
7b1476f393a32073bc75fe957ff8aba1b89d083f | 311441e62df50beafb96206de63ffe5a63735190 | /docker_file/django_project/bookmark/views.py | 3679cfa57ffe1abc235eef2314a05248004b5084 | [] | no_license | jaden7856/Docker_Basic | d06c428b4b944f50df69a2052ef4c0aa39cd9d8d | 6ae628c451a679cb19cc3d72df713b50ace335f9 | refs/heads/master | 2023-03-04T18:35:28.605436 | 2021-02-17T09:15:40 | 2021-02-17T09:15:40 | 339,667,536 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 856 | py | from django.shortcuts import render
from django.views.generic import ListView, DetailView
from django.views.decorators.csrf import csrf_exempt
from django.utils.decorators import method_decorator
from bookmark.models import Post
class StockLV(ListView):
model = Post
template_name = "stock/stock_search.html"
... | [
"jhg7856@gmail.com"
] | jhg7856@gmail.com |
9a85960314498e7b55a3db26c634ede1ce43bfd3 | e3f4d69cc9336e5a00600b561b456572e6c38832 | /Django_Blog/00-Practices/B-Application-And-Routes/django_project/django_project/urls.py | 5a2984ce2a82614370f09ce997d319a41fd1ef92 | [
"MIT"
] | permissive | zhjohn925/code_snippets | 18b2f1e6c79dfbfbc9e08c2a6b339201676788b5 | 101e5c1b927b055635afe0d819cb1e00481bf855 | refs/heads/master | 2023-04-12T01:17:48.341800 | 2021-05-02T00:19:57 | 2021-05-02T00:19:57 | 339,921,028 | 0 | 1 | MIT | 2021-03-13T07:06:11 | 2021-02-18T03:07:18 | Jupyter Notebook | UTF-8 | Python | false | false | 1,518 | py | """django_project URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Clas... | [
"zhjohn925@gmail.com"
] | zhjohn925@gmail.com |
3950ab2a7b19d43bc531cfedbfd8218a3bbc7b7f | 8b9c9bd74d0d5d6b9e718ea7acf772a1d5c8e484 | /GG/cheat_gg.py | 43e36b633ab17728ec5407cf76b6d0218ff21c11 | [] | no_license | falperen/smartbin | b879196e3caa1e527368d6b269f98413e054d5cb | b4ed769f0f0e89867752495fd1d45fc20eb4491b | refs/heads/master | 2021-01-04T11:19:30.198171 | 2020-02-06T13:34:04 | 2020-02-06T13:34:04 | 240,524,329 | 0 | 0 | null | 2020-02-14T14:18:18 | 2020-02-14T14:18:18 | null | UTF-8 | Python | false | false | 625 | py | import paho.mqtt.client as mqtt
import json
BROKER = '34.244.160.143'
TOPIC_TO_PUBLISH_TO = 'response/prediction/fake'
client = mqtt.Client()
client.connect(BROKER)
def parse_waste(val):
if(int(val) == 1):
return "UNSORTED"
if(int(val) == 2):
return "PLASTIC"
if(int(val) == 3):
return "PAPER"
if(int(val) ... | [
"edoardesd@gmail.com"
] | edoardesd@gmail.com |
87eca9bfb7dbc8df0651f0215177ed8b0404fe4e | d6ccde759a45d7889b84814dd88ffd2f50ba1269 | /booksAuthors/booksAuthors/urls.py | c4fe9059b05ed608d8b88130898b5ee93705c933 | [] | no_license | JNeigel87/BooksAuthorsTemplates_more | 5a2a72a506ca8a7f147f6e82796cf2b0c42d8671 | e7f88b567b4644df1021690c2bff3742e9487cc7 | refs/heads/master | 2022-12-15T08:49:49.081252 | 2020-09-15T23:31:34 | 2020-09-15T23:31:34 | 295,872,126 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 526 | py | # from django.contrib import admin
from django.urls import path, include
from booksAuthorsApp import views
urlpatterns = [
# path('admin/', admin.site.urls),
path('', views.index),
path('create', views.create),
path('books/<booksid>', views.info),
path('addAuthor/<booksid>', views.addAutho... | [
"noreply@github.com"
] | noreply@github.com |
15537541af3b013586f74d9aabe94351b5b26601 | 333597d1986180cdc73d5b4313acd6ba5f12ce1f | /tensorflow/patch_cnn_triplet.py | 9a6f0ca7f12b0a6ce628263e58b22760343fb5e3 | [] | no_license | ColumbiaDVMM/Spread-out_Local_Feature_Descriptor | 78d90e70e03b9a9e61d5cf0b9040756926aeab0a | 1d8c170cc06b3d0a732359dfc9bd5d94b28445b7 | refs/heads/master | 2021-01-01T17:49:42.425361 | 2019-02-20T20:13:14 | 2019-02-20T20:13:14 | 98,167,594 | 47 | 17 | null | null | null | null | UTF-8 | Python | false | false | 17,399 | py | import tensorflow as tf
class PatchCNN_triplet:
def __init__(self, CNNConfig):
self.channel_num = CNNConfig["channel_num"]
self.patch = tf.placeholder("float32", [None, CNNConfig["patch_size"], CNNConfig["patch_size"], CNNConfig["channel_num"]])
self.patch_p = tf.placeholder("float32", [Non... | [
"spongezhang@gmail.com"
] | spongezhang@gmail.com |
6f2bc69f6325b24048fbf182011b336ea9ff6e4e | cfa35dc2ea93ee0eceb2399a9e6112e987579c09 | /stonesoup/reader/tests/test_opensky.py | 82d07f42184777b38386c2e114ca28d738c58229 | [
"LicenseRef-scancode-proprietary-license",
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"Python-2.0",
"LicenseRef-scancode-secret-labs-2011"
] | permissive | dstl/Stone-Soup | 227e6a9e6fbdceca14af3f0259f311ec74095597 | f24090cc919b3b590b84f965a3884ed1293d181d | refs/heads/main | 2023-09-01T14:33:14.626428 | 2023-09-01T11:35:46 | 2023-09-01T11:35:46 | 98,420,803 | 315 | 126 | MIT | 2023-09-14T14:55:34 | 2017-07-26T12:34:28 | Python | UTF-8 | Python | false | false | 1,326 | py | import pytest
from ..opensky import OpenSkyNetworkDetectionReader, OpenSkyNetworkGroundTruthReader
pytestmark = pytest.mark.remote_data
@pytest.mark.parametrize(
'reader_type',
(OpenSkyNetworkDetectionReader, OpenSkyNetworkGroundTruthReader))
@pytest.mark.parametrize(
'bbox',
[None, (-7.57216793459,... | [
"sdhiscocks@dstl.gov.uk"
] | sdhiscocks@dstl.gov.uk |
31fa0acdc7085e5cf9d4ea46e68b082051dd56a6 | c2ff76e463728bc1337a24d94569c56a1a9037c0 | /getInspectionInfo.py | 8f8330931688c4da9149701282f96bb1212cb7c5 | [
"Apache-2.0"
] | permissive | appapixie/KMS | 262c9641f6b8d1ab232ebc31b283e1eda8f9f4b7 | 676f155b21fbbffb1177d3e793459c5988d9b5ed | refs/heads/main | 2023-07-04T11:58:40.984421 | 2021-08-06T10:49:33 | 2021-08-06T10:49:33 | 388,676,336 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,696 | py | import discord
import datetime
import time
import pytz
import requests
from bs4 import BeautifulSoup as bs
from discord.ext import commands
def path():
URL = 'http://api.maplestory.nexon.com/soap/maplestory.asmx'
req = requests.get(URL)
# 과부화 방지
time.sleep(0.500)
# 정보를 받아오지 못함
... | [
"noreply@github.com"
] | noreply@github.com |
2b7cd34e138bf0a7cb2c905966cf0a355e52fb45 | d584010272ac8ece7796e3e6e3dcb5e01930a606 | /day_03_answers_fail.py | 3cdafab0deb5945f2feb29cdcc7ba8407b73878c | [] | no_license | saltyjohn/advent-2019 | c6b56b2044d4ceb5001f90e2f604852c5496fd42 | aa02bb9a1e42ac6b28f9588b1ec00369d97c5f21 | refs/heads/master | 2020-09-22T14:08:42.729374 | 2019-12-04T07:46:08 | 2019-12-04T07:46:08 | 225,233,466 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 3,202 | py | """
Tests passed, but lots of looping lead to crazy amounts of processing time...
"""
from day_03_inputs import wires, traverse_tests, coords_tests
def get_next_coords(coords: list, direction):
coords = coords.copy()
direction, distance = direction[0], int(direction[1:])
# x-axis / y-axis
change_pos... | [
"john.r.salzman@gmail.com"
] | john.r.salzman@gmail.com |
b7f0061d99244aae1da5a9aef8766a06adfd3742 | f30a39d61626efcd350bab4c0ad2d9a3c463b654 | /JackKnife.3.GenerateJackKnifeDataSet.py | 633ec1a3c4c8ef9ce02ba4928c303d2853af893c | [] | no_license | pmonnahan/EarlyLate | 6bccab763462ada51ad84fa7b7ac54eefc1b1a75 | 1d9e064ea71562d201facc9785591f2e605faabb | refs/heads/master | 2021-01-19T02:03:49.422576 | 2018-02-13T01:22:54 | 2018-02-13T01:22:54 | 38,701,501 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,484 | py | # matching Patrick for EL data 12/7/15
# Takes a file containing all contrasts
# 2a take output from 2: IM.snps.txt and perform contrasts
# 2a take output from 2a: IM.z_diffs.txt and calculate variance stats
import math
import sys
import csv
DIR="/Users/patrick/Documents/Research/EarlyLate/Current_Files/"
INPU... | [
"pmonnahan@gmail.com"
] | pmonnahan@gmail.com |
bf8169d194fe538162f5d753982b29e9691f3be8 | e92acf7efacca486ae8840349bda75e5bbbbe84e | /mkNUTcert.py | 518fe63c6f6993b7651a495840f4179e5c759942 | [] | no_license | NUT-RogerPrice/Shims | a40935049e3f6bd3eba6665fcbaa2dea24035d6e | ff7e1c1c7ef8ae042865bc3c9840f0bf8549ecbf | refs/heads/master | 2023-05-04T16:35:30.521417 | 2021-05-22T13:04:31 | 2021-05-22T13:04:31 | 369,806,938 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 16,500 | py | #!/usr/bin/python3 -u
# mkNUTcert Make a self-signed TLS private key and public key for NUT.
# RFC5280 chap 3.2 :
# Starting with the public key of a CA in a user's own domain has certain
# advantages. In some environments, the local domain is the most trusted.
# Copyright (C) 2020 Roger Price. GPL v3 or later at your... | [
"rprice@maria.rogerprice.org"
] | rprice@maria.rogerprice.org |
4494d0f5dc2b0454e71cd7321cd213c12af7d23e | fe7fbc889253226999c8733e8860baa8b55730a1 | /app/utils.py | f73e1ee2d8bad91d5e8f74197e5063b0b3a1bda4 | [
"MIT"
] | permissive | jkereako/flask-api-skeleton | 043952a82c19a04dffa44a10120d8533f134a503 | b765f335208b93056867f8f28d072dbd42abe826 | refs/heads/master | 2021-01-15T13:33:56.925625 | 2018-03-06T15:22:37 | 2018-03-06T15:22:37 | 26,651,614 | 4 | 3 | null | null | null | null | UTF-8 | Python | false | false | 2,460 | py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
utils
~~~~~
Utility methods.
I'm including this file in the skeleton because it contains methods I've
found useful.
The goal is to keep this file as lean as possible.
:author: Jeff Kereakoglow
:date: 2014-11-14
:copyright: (c) 2014 ... | [
"jkereako@users.noreply.github.com"
] | jkereako@users.noreply.github.com |
a72c4b171b56f552b80dd405c09ad2d92871525b | fc7e78a8d4c9456e496051d870031015280a7c95 | /aistudio_notebook/component_drill/drill/python_single_drill.py | e06b02db45324a901eff1e3a69f6bb287933cb3a | [] | no_license | youxuehu/tiger_notebook | 049a6cea5bd15df2b370925f8f932cde3b43936e | d08a21023b9c9f519ba0a0ab7085ca976663dcaa | refs/heads/master | 2023-07-17T22:57:32.583241 | 2021-08-26T13:27:10 | 2021-08-26T13:27:10 | 369,700,570 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 703 | py | # -*- coding:utf-8 -*-
from aistudio_notebook.component_drill.drill.base_drill import BaseDrill
from aistudio_notebook.component_drill.util.log_util import get_logger
logger = get_logger("__name__")
class PythonSingleDrill(BaseDrill):
code_name = 'python_job'
engine_type = 2
def get_main_file_path(self)... | [
"youxuehu@hotmail.com"
] | youxuehu@hotmail.com |
9520ad44cace073dcbbf25bfb2530de13bce6960 | fe19d2fac4580d463132e61509bd6e3cc2cf958d | /toontown/suit/DistributedGoon.py | 6f991324caf0d47395d571c95bf7668c93012657 | [] | no_license | t00nt0wn1dk/c0d3 | 3e6db6dd42c3aa36ad77709cf9016176a3f3a44f | 7de105d7f3de0f8704b020e32fd063ee2fad8d0d | refs/heads/master | 2021-01-01T16:00:15.367822 | 2015-03-21T21:25:52 | 2015-03-21T21:25:55 | 32,647,654 | 3 | 5 | null | null | null | null | UTF-8 | Python | false | false | 18,204 | py | # 2013.08.22 22:25:21 Pacific Daylight Time
# Embedded file name: toontown.suit.DistributedGoon
from pandac.PandaModules import *
from direct.interval.IntervalGlobal import *
from toontown.battle.BattleProps import *
from GoonGlobals import *
from direct.fsm import FSM
from direct.distributed import ClockDelta
from otp... | [
"anonymoustoontown@gmail.com"
] | anonymoustoontown@gmail.com |
0ce1bf69a2b8a5808a2c956fa31056573999b1ab | 52f3a75f7c88df928d00e3c203b751a860bdf627 | /modelTraining/modelTraining-v2-cl.py | 54b4a0068aec7a82463afe4b5501d7f0fc21817c | [] | no_license | meiwenPKU/ML-based-Flow-Table-Eviction | 03fe2680d4d12b3eeb02ce4a8f5a519c30649dea | 5027820986b52783a9e8087b5241a7e5e915537c | refs/heads/master | 2020-04-05T09:35:01.054156 | 2019-01-25T18:32:24 | 2019-01-25T18:32:24 | 156,764,434 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,533 | py | '''
This script is used to train and save a specified classifier
'''
import pandas as pd
import numpy as np
import time, json
import os, sys, getopt, csv
from sklearn.preprocessing import StandardScaler
from sklearn.datasets import make_moons, make_circles, make_classification
from sklearn.neural_network import MLPClas... | [
"yhmpku@live.cn"
] | yhmpku@live.cn |
bd1e0023e976133adf144217da8c40767542ad6a | 40c4b8e9ac9074869bfb0dc1d3c3f566371f1764 | /Hangman1/dog_1.py | 8ef10b06f11b544da283359081ffd9dca0a7cd4a | [] | no_license | katuhito/Hangman001 | 870a8827e69cbd9a8b01ffb55f5c499c71861b76 | 710a201c6ad8284e164ea8ad26cd061486c50849 | refs/heads/master | 2022-12-06T16:30:24.613288 | 2020-08-22T10:19:27 | 2020-08-22T10:19:27 | 285,448,433 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 296 | py | class Dog:
def __init__(self, name, breed, owner):
self.name = name
self.breed = breed
self.owner = owner
class Person:
def __init__(self, name):
self.name = name
mick = Person("Mick Jagger")
stan = Dog("Stanley", "Bulldog", mick)
print(stan.owner.name)
| [
"katuhitohara@gmail.com"
] | katuhitohara@gmail.com |
68a9bcd343e4e582c247a38c6f147b4c42167918 | a3ce9a4c5f826f85a7196d3bf962431e7cd9d055 | /2.py | ad4bb38d890a3a6364886633a0af9938e1a01408 | [] | no_license | renikustanti/Homework3 | 53151037034f5686a2438fa3826c390aee9821b7 | 0300f6c72cf6753a51bc40223c05efd93c828f52 | refs/heads/main | 2023-04-02T09:05:20.046388 | 2021-03-29T18:11:24 | 2021-03-29T18:11:24 | 352,715,114 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 108 | py |
#fibonaci
a, b, c= 2, 3, 2
for i in range(10):
print(a,'', end='')
c=a+b
a=b
b=c | [
"noreply@github.com"
] | noreply@github.com |
26f27f6bef8158d0d5d23fb374ed418fe6487251 | 7c96f6f6523bf194c32d709ea787ab080de96df1 | /meiduo_mall/meiduo_mall/apps/orders/models.py | eddebbe0c8f196ff7dbd05a9cf729b8eac91cc8f | [] | no_license | 513024429/test | 689c4e8c968e3590243f80c8850c2fa4313d939e | 4bc6cb07658b926b19a2ca922ca4703aff9a63d9 | refs/heads/master | 2021-06-19T03:30:21.338347 | 2021-04-22T07:33:31 | 2021-04-22T07:33:31 | 200,480,104 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,471 | py | from django.db import models
# Create your models here.
from goods.models import SKU
from meiduo_mall.utils.models import BasModel
from users.models import User, Address
class OrderInfo(BasModel):
"""订单信息"""
PAY_METHODS_ENUM = {
"CASH": 1,
"ALIPAY": 2
}
PAY_METHOD_CHOICES = (
... | [
"513024429@qq.com"
] | 513024429@qq.com |
2c3eb399a17b07707cfeb5cc6f0d9b0e3fcdd9df | 4bbd0a5de1b9a849b77a642ce4e7b1432decfef4 | /code/dataAnalyze.py | 04dc67f112d03536339aa7430aac6d08b6abe49b | [] | no_license | Riverstrider/logAnalyze | c687f8c056232444a9131b2e673ad85e7ce7b689 | 5c167b9735cae4ced44f7f7c6b837250d4bbbb9e | refs/heads/master | 2021-01-18T21:48:55.800754 | 2017-08-07T16:39:26 | 2017-08-07T16:39:26 | 53,485,820 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,365 | py | # -*- coding: utf-8 -*-
from tkMessageBox import *
class Data(object):
def __init__(self):
pass
def sortData(self, data):
dataTemp = data[:]
dataNum = len(dataTemp)
dataIdxList = range(dataNum)
for i in dataIdxList:
for j in range(i+1, dataNum):
... | [
"30065240@qq.com"
] | 30065240@qq.com |
6f82494371dfa89abc75f24106979386cb34c94a | 41777d4d219ea97b4632f4a8a31ab6c82a60772c | /kubernetes_typed/client/models/v1_scale_io_volume_source.py | b1eccb02122f904eb1df1f33838af3ec15a3c9d6 | [
"Apache-2.0"
] | permissive | gordonbondon/kubernetes-typed | 501d9c998c266386dc7f66f522f71ac3ba624d89 | 82995b008daf551a4fe11660018d9c08c69f9e6e | refs/heads/master | 2023-07-18T12:06:04.208540 | 2021-09-05T19:50:05 | 2021-09-05T19:50:05 | 319,183,135 | 24 | 2 | Apache-2.0 | 2021-09-05T19:50:06 | 2020-12-07T02:34:12 | Python | UTF-8 | Python | false | false | 584 | py | # Code generated by `typeddictgen`. DO NOT EDIT.
"""V1ScaleIOVolumeSourceDict generated type."""
from typing import TypedDict
from kubernetes_typed.client import V1LocalObjectReferenceDict
V1ScaleIOVolumeSourceDict = TypedDict(
"V1ScaleIOVolumeSourceDict",
{
"fsType": str,
"gateway": str,
... | [
"noreply@github.com"
] | noreply@github.com |
7485d135f304c948e022e8b980dde259bad1e39d | 03dd284dc87d2cd363434fc88fc72ef25fac2673 | /DSD/dual_diaeMnist_unitLeng50/test_getRepreCodes_forMetrics.py | b99db4856348b1671cc1a04eae17f02b24bbf7ef | [
"Apache-2.0"
] | permissive | HymEric/One-GORD | 49db9f71976e352bd222d283445c17841a11a3dc | a63ecaf2b9538789ca0e761d55608a28d7194c4d | refs/heads/main | 2023-06-01T16:53:54.200546 | 2021-06-13T14:26:22 | 2021-06-13T14:26:22 | 305,567,777 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,921 | py | import os
import tensorflow as tf
from operator import mul
from functools import reduce
import sys
import numpy as np
sys.path.append("../")
from model_class_metric import DIAE
from lib.utils import init_directories, create_directories
from lib.models.data_managers_ae import ShapesDataManager
flags = tf.a... | [
"noreply@github.com"
] | noreply@github.com |
63b8b77a370f3612692fe98f54fa7850defc8a61 | bb8e64698cfd52acb4a6b61d6e3011c6b2f9eb4a | /Project_Advanced_Lane_Finding/measure_curvature.py | b10e3985e49c0c75800d04fc6c378656e93634a9 | [
"MIT"
] | permissive | Nyarish/Udacity_Self_Driving_Car_Engineer | 0b345d7d42ba1844b1a03da26676537b513d3c05 | 4153d610a7daeabe357d851b1816a1fce5eabf1b | refs/heads/master | 2022-12-25T19:56:11.948271 | 2020-10-06T08:38:25 | 2020-10-06T08:38:25 | 299,612,023 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,589 | py | # Get imports
import pickle
import numpy as np
import cv2
import glob
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
# Helper functions
import detect_lane_pixels
import perspective_transform
def get_lane_curvature_real(image):
'''
Calculates the curvature of polynomial functions in meters.... | [
"bnyaribo1@gmail.com"
] | bnyaribo1@gmail.com |
db020dee28333450b4488bcbe8e3d99e84ea44b1 | 86d47c09ba2f78378991987295166752ece188eb | /lab6quest5.py | c8d4dc383543bd8de93aaedda8110209dcd5be29 | [] | no_license | khadafyb/all-labs- | da34b51d2b0962388ebe8cdaa44bce84866858ba | 7aa531dd9068ddf712a0b321d81d18909d359471 | refs/heads/master | 2020-12-10T23:21:18.511803 | 2020-01-14T03:35:11 | 2020-01-14T03:35:11 | 233,739,826 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 98 | py | x=input("enter a word")
x.replace('b','bub')
x.replace('c','cash')
x.replace('d', 'dud')
print(x)
| [
"noreply@github.com"
] | noreply@github.com |
07d5638db70f7b03592a53359906e9ffba7f6c80 | 10d122ce596ffe8c7b61e899a20cef36acc0385c | /tools/Json.py | 1efb49bb489b01a6cab31bc268ab549edfdbc416 | [] | no_license | liucong233/UI | 2d76d1e95d4bb5dbec2b5f1e945643aa78a840e0 | 5759d2c71a36f8b46c9358a877033718121bbe15 | refs/heads/master | 2023-02-24T07:36:15.330843 | 2021-01-06T09:55:33 | 2021-01-06T09:55:33 | 326,951,105 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 3,344 | py | # -*- coding: utf-8 -*-
# author:liucong
import xlwings as xw
import os
import time
import json
import numpy as np
'''
生成一个json文件用来存储每次性能测试的数据
'''
def create_log_json(nowtime, device):
create_time = time.strftime("%m%d%H%M", nowtime)
jsonfile = create_time + "_" + device + "_log.json"
if os.path.exists... | [
"liucong@situdata.com"
] | liucong@situdata.com |
d999fadd92ee1ee31d67cc6dcf004ce5929507d7 | 7abfcac48de139e9e2b18a017d415fd81fe4f91e | /learn-stats-python/bin/jupyter-kernelspec | 20277f325486cf45990a6b8566cc411769614a9e | [] | no_license | JChrisWolfe/Teach-Stats-w-Python | 3e250f09b370b566b06bda75d82b7f6ee916dd9c | d67ec71d8b8f138b068c8ff23dfa40e3f91889dc | refs/heads/master | 2022-09-23T17:15:58.980092 | 2020-03-24T04:08:00 | 2020-03-24T04:08:00 | 249,580,867 | 0 | 0 | null | 2022-08-23T18:06:02 | 2020-03-24T01:10:46 | Python | UTF-8 | Python | false | false | 344 | #!/home/chris/Documents/Projects-Personal/Teach-Statistics-w-Python/learn-stats-python/bin/python3
# -*- coding: utf-8 -*-
import re
import sys
from jupyter_client.kernelspecapp import KernelSpecApp
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(KernelSpe... | [
"jcwolfe0729@gmail.com"
] | jcwolfe0729@gmail.com | |
73632a0fc46bcb44ba1b1359191e89d643076b20 | 6d87f66357e4002c461532b39498636d29956097 | /stack/cinder/cinder/tests/integrated/test_volumes.py | 0ec851113d15b555d1a9e13b95fbf0ec2994a1dd | [
"Apache-2.0"
] | permissive | megaumi/openstack-tbd-scheduler | b8588b35c45b8fe9eee59723276047601ce2dfde | 13928e9fec092e573c4945343a8b60e1fa86c4b3 | refs/heads/master | 2021-06-06T05:45:48.026940 | 2020-07-24T08:52:55 | 2020-07-24T08:52:55 | 6,046,752 | 0 | 1 | null | 2020-07-24T08:52:57 | 2012-10-02T15:11:38 | Python | UTF-8 | Python | false | false | 7,530 | py | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 Justin Santa Barbara
# 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.apach... | [
"umi@apricot.(none)"
] | umi@apricot.(none) |
67ebf188eb312e2c449daaf169618e36b0c90169 | b16dfed12919e6ee4590ab511ea599ca2ce74d85 | /hyperdao-bot/handler/keyboardHandler.py | 8f27bee20359d3cbffb2d376e4cba6be2ea16dcc | [
"MIT"
] | permissive | Curve-Labs/hyperdao | 0a7aaa51c26915e7eb7c61cc416c6899ea726632 | b13dea1023cf61ff0a28b9996a26b5a12ee46264 | refs/heads/main | 2023-08-29T00:13:13.974810 | 2021-10-24T10:51:18 | 2021-10-24T10:51:18 | 420,163,863 | 10 | 2 | null | 2021-10-24T01:20:23 | 2021-10-22T16:11:27 | TypeScript | UTF-8 | Python | false | false | 6,689 | py | from web3 import Web3
from handler.base import cancel, unknown
from handler.proposal import proposal
from handler.vote import vote
from handler.initialize import initialize
from handler.reserve import userState
import requests
import json
hyper_ABI = [{"inputs":[{"internalType":"address","name":"_safeMasterCopy","typ... | [
"BritikovKI@Yandex.ru"
] | BritikovKI@Yandex.ru |
09d3d8a2585f50378623bc5bdfa193ca1566f7db | 85e640b742d0d934efe1c3c6fab5244f21978965 | /code/py/init.py | cdcc7365144059162d0a271f7b7fa57044593f20 | [] | no_license | johnsogg/cs1300 | 73c6e6f08d42bdd2d5b82e347cd7271771b915b3 | 8d216fed1be7de157406b2fbb0a453028c52633d | refs/heads/master | 2020-05-28T05:20:41.722601 | 2013-05-09T08:24:18 | 2013-05-09T08:24:18 | 7,390,771 | 3 | 0 | null | 2013-04-23T21:58:25 | 2012-12-31T20:38:21 | C++ | UTF-8 | Python | false | false | 567 | py | name = ""
class Widget:
all_widgets = { }
spokes=0
teeth=0
def __init__(self, realname, spokes, teeth):
self.spokes=spokes
self.teeth=teeth
self.realname = realname
Widget.all_widgets[realname]= self
name = Widget.all_widgets[realname]
# def __str__(self):
# ... | [
"gabe.johnson@gmail.com"
] | gabe.johnson@gmail.com |
94fbe69e87d3f0925a0ca8e972ed4ae747558bfa | 1c4cda369eb6900e7f76c50acc0199fa638df2f0 | /pycparser/tests/test_c_lexer.py | 23795364cec798f5687ba975ac8ec12d799ffca1 | [
"BSD-3-Clause"
] | permissive | TJSong/project-rt_energy_efficiency | cfee960cab3ca558001f779547b046e7f6eb6126 | 6d65db7d57e1ca69997ef01155bdd7e402457525 | refs/heads/master | 2021-05-31T06:36:59.578508 | 2016-04-29T23:55:23 | 2016-04-29T23:55:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,667 | py | import re
import sys
import unittest
sys.path.insert(0, '..')
from pycparser.c_lexer import CLexer
def token_list(clex):
return list(iter(clex.token, None))
def token_types(clex):
return [i.type for i in token_list(clex)]
class TestCLexerNoErrors(unittest.TestCase):
""" Test lexing of strings that ar... | [
"dl575@cornell.edu"
] | dl575@cornell.edu |
45e7d6e184ed6cffdc042e6944e836118994e09f | 2a7d50cfe4cd2982e272553d86feb9b34b35e886 | /classification/ClassificationAll.py | 83e85841ce06c66fdc656e907d27fa81c9e8f609 | [] | no_license | arturtarasov/machine_learning | 8e2d428a4bab8e821c8c62a5e64a1a0bce7648dc | f22e61e0bdc3501d2144a5b2e9a67d81b6d3bf43 | refs/heads/master | 2021-05-08T02:14:36.561793 | 2017-10-24T07:12:50 | 2017-10-24T07:12:50 | 107,991,189 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,999 | py | import numpy as np
def α_error(FalsePositive, TrueNegative):
return round((FalsePositive / (TrueNegative + FalsePositive)), 3)
def β_error(FalseNegative, TruePositive):
return round((FalseNegative/(TruePositive + FalseNegative)), 3)
def accuracy(TruePositive, TrueNegative, N):
return round(((TruePositive... | [
"tarasov.a@imatic.pro"
] | tarasov.a@imatic.pro |
a7d0ee108cfecaaabfebf9402ede19e56c1c6a38 | 8bbbac5e797deb8d769050396c60d9fbadad8b17 | /sentence_embeddings_search/bin/faiss_util.py | 3dcae20340dfe401f44d7ed411a1304c8f03100f | [] | no_license | Dikea/Sentence-Embedding-Retrieval | e5ee6944a0e6ad1698872b9c357003c3a706913f | 77783e29b2bfeec72b29de2ec5d8b33e2d06d333 | refs/heads/master | 2020-04-17T21:56:50.045812 | 2019-01-22T13:29:19 | 2019-01-22T13:29:19 | 166,973,268 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,993 | py | #!/bin/env python
#-*- encoding: utf-8 -*-
import os
import sys
#sys.path.append('../')
import codecs
from collections import defaultdict
import numpy as np
import faiss
from tools.infersent_encoder import Encoder
from tools import config
from tools.log import g_log_inst as logger
class FaissUtil(object):
... | [
"huanghailong17@mails.ucas.ac.cn"
] | huanghailong17@mails.ucas.ac.cn |
a39f7c4243bad9b0555f4bb4d6305727a09ea242 | 00eec44fcc51dae987ce0de72f77ecd3672d0b8b | /steps/step41.py | dfc58992c263c0f0f6a745b3c310b138dfbbe654 | [] | no_license | nishio240git/DeZero_nishio240 | 779be64b5ff0ccb184860ed054990d687dadcde6 | 544bb0ac418456be0774e2d3eac962891f746f38 | refs/heads/master | 2023-01-03T19:05:31.080206 | 2020-10-30T14:58:01 | 2020-10-30T14:58:01 | 302,052,282 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 336 | py | if '__file__' in globals():
import os, sys
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from dezero import Variable
import dezero.functions as F
import numpy as np
x = Variable(np.random.randn(2,3))
W = Variable(np.random.randn(3,4))
y = F.matmul(x, W)
y.backward()
print(x.grad.shape)
pri... | [
"messi240exe@gmail.com"
] | messi240exe@gmail.com |
03f248b629f31ffa4dcc9a81d282824209c99876 | ed233affe005ad7fa1b7105df5a41d95400b76ce | /dsa/trees/fenwick/test_fenwick.py | 01fcc6b7a04a71cefbd13ef649f9cb39b6e083ae | [] | no_license | rtunn/dsa_study_guide | aeadfa6d0e1a91c6b086cb169d83de7d0e2b7378 | 168b2b4706511458e5c59ab65ea93a3aea3f0140 | refs/heads/main | 2023-09-03T11:15:06.114459 | 2021-10-26T21:13:42 | 2021-10-26T21:13:42 | 405,507,124 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,883 | py | import pytest
from dsa.trees.fenwick.fenwick import Fenwick, num_sequences
@pytest.fixture
def fw():
return Fenwick(10)
# @pytest.fixture
# def items():
# return [2, 5, 3, 4, 1]
# @pytest.fixture
# def bound():
# return 10
@pytest.fixture
def bit():
arr = [3, 2, -1, 6, 5, 4, -3, 3, 7, 2, 3]
... | [
"rtunnell9@gmail.com"
] | rtunnell9@gmail.com |
998cd10dc3929399e4f47aca2202bdd489e68149 | 0e26bf132ffbcc871e58f31066cff3bcb2f506ce | /accounts/views.py | 6bfd392b7926c46b8691b9587258b18a3f229cb9 | [] | no_license | hardik-dadhich/Skills_find | fbc8a154cf2bef362aa17a890311ce60c84ac979 | aae5a90b2e457aa39a1e92a6ac4965650c52d382 | refs/heads/master | 2021-05-09T01:41:07.345181 | 2018-02-12T11:49:13 | 2018-02-12T11:49:13 | 119,181,754 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 310 | py | from django.shortcuts import render
from django.core.urlresolvers import reverse_lazy
from django.views.generic import CreateView
from . import forms
# Create your views here.
class SignUp(CreateView):
form_class = forms.UserForm
success_url = reverse_lazy('login')
template_name = 'accounts/signup.html'
| [
"dadhichhardik26@gmail.com"
] | dadhichhardik26@gmail.com |
f803fbecba1cb8219e55c6aa7277a4742903b8bd | e9c3d83b77f05125530b1c25e60d5c1ea9f1dd7e | /app.py | bbabedcc22840c0c1c31e2b3e34c8f5bfa3296e4 | [] | no_license | yaswanth118/portfolio | f3e92570e3c793db0e5459158994237cd89aee82 | 45309d1b29c39b6daac6b7ef86dc5ec377f703bf | refs/heads/master | 2023-06-16T00:42:56.197778 | 2021-07-10T08:35:38 | 2021-07-10T08:35:38 | 384,646,319 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 295 | py | from flask import Flask, render_template, send_file
app = Flask(__name__)
@app.route('/')
def hello_world():
return render_template('index.html')
@app.route('/download')
def download_file():
return send_file('resume.pdf',as_attachment=True)
if __name__ == '__main__':
app.run()
| [
"67913346+CvYaswanth@users.noreply.github.com"
] | 67913346+CvYaswanth@users.noreply.github.com |
3b39a7459507e3e865fdf5bbc05da93b29990c97 | 8792e3449fbc6c8dec99f6af1d9f1b4caddad1f7 | /105.py | 9c3a0992e67c64804a57d489ee89d15378444d1d | [] | no_license | aarthisandhiya/aarthisandhiya1 | c19c1951c9ba01cd97eeddd44614953088718357 | e6f10247b6a84d6eaf371a23f2f9c3bebbc73e5b | refs/heads/master | 2020-04-15T17:17:07.151242 | 2019-05-20T05:24:19 | 2019-05-20T05:24:19 | 164,868,494 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 63 | py | a,b=map(str,input().split())
z = int(str(a) + str(b))
print(z)
| [
"noreply@github.com"
] | noreply@github.com |
8d7c64e5138fc727e2fd69ce1dc7f96a19e08284 | 76516a803a8aa5f800aef195a6c31bcf17f215b5 | /blog/decorators.py | b07f0d46cf1292dc323f413f3a7ce5947b9add87 | [] | no_license | vadimArc/blog | 033dc47fcec43efdff4b48609848ecd12e6c5332 | 679ca851639f8202bca31e4af13b6eaee6541564 | refs/heads/master | 2023-04-30T23:39:49.304411 | 2017-04-16T14:05:43 | 2017-04-16T14:05:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,030 | py | from flask import redirect, url_for
from functools import wraps
def check_role (user=None, roleType=[]):
def decorator (f):
@wraps(f)
def check_for_role(*args, **kwargs):
if user:
for req_role in roleType:
if req_role in [role.role_name for role in ... | [
"vzblazer@gmail.com"
] | vzblazer@gmail.com |
66b1056f1b05e70727e644c2bb4078ba4e84d3cc | 26994543d1689b1d1f96faf5ecee4d253532074f | /Pillow/Program Files/Brightness.py | 674472aa3cb28fd74c002fd2ceaa1758976def51 | [] | no_license | GHOST5454/Image-Processing | d3104d4391efa3616c7dc885b2934ba2bb25050f | 9156a46c4eec24e45f8165ae81fe405a3412bf37 | refs/heads/master | 2022-04-07T21:27:50.031680 | 2020-03-14T15:50:21 | 2020-03-14T15:50:21 | 247,304,196 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,227 | py | # This program contains information about how we are going to change the brightness of the image.
# Step 1 : In this step we are importing Library for the editing of the image.
from PIL import Image, ImageEnhance
# Step 2 : In second step we are giving the address of the image form the "INPUT" folder.
image = Image.o... | [
"sachinmeena550@gmail.com"
] | sachinmeena550@gmail.com |
1e8012f4ae3c858937de4c40d2d7a45e47fce1ec | 3d5b5c66a2a253ebac4adc5ea32ce4581876a90a | /common/util/util.py | 4846d0872aa96d6d8abcd55657fde45f121c1aaa | [
"Apache-2.0"
] | permissive | wallnerryan/nvpnsxapi | 0ce8d115a2ae23c1096102da4ae465649d26aaaf | e16e3e4e25c20ff8321f0efa853087a9a06c4891 | refs/heads/master | 2020-05-25T12:09:14.237979 | 2015-04-06T13:56:05 | 2015-04-06T13:56:05 | 31,033,102 | 2 | 1 | null | 2015-04-03T19:18:58 | 2015-02-19T19:40:05 | Python | UTF-8 | Python | false | false | 309 | py | #!/usr/bin/python
import sys
import os
import commands
def cmdrun(cmd):
status,output = commands.getstatusoutput(cmd);
return status
def execute(cmd):
print cmd
status,output = commands.getstatusoutput(cmd);
if status :
sys.stderr.write(output)
exit(1)
return status
| [
"labadmin@sclr024.lss.emc.com"
] | labadmin@sclr024.lss.emc.com |
23d5fe764245483ef794afcafa37bb449d1c61db | 5e2248b40278d83ea91e483d1f11ecd1151e1e65 | /comments/migrations/0001_initial.py | e78a63dc6bc998daec67ff4419a8e7e2ac7d2aca | [] | no_license | squarrel/django-react-tut | 42e505ddad6ff8e133c56f2001baa7f46fccad1c | 7bc5549c0249d8b8a62850a2124884502ebaf411 | refs/heads/master | 2020-05-29T14:41:32.457020 | 2016-06-19T16:53:31 | 2016-06-19T16:53:31 | 61,489,970 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 659 | py | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-06-17 09:36
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Comment... | [
"milosbulatovic3@gmail.com"
] | milosbulatovic3@gmail.com |
2512b083e55f6101e8cf2f1a317a475ba920dc4c | 32e948f9e7d6bd8771d266d93db0a2653043af0c | /retrieve_cci.py | 2e4c71257d529c9c71e1d2bc844b836f83643c91 | [
"MIT"
] | permissive | brorfred/density_stats | f14c979f6b6214f4546f5d6f14767cb0825c1d02 | b66673c67083010f29afbac1ce30ab431643697f | refs/heads/main | 2023-05-05T11:26:48.312639 | 2023-04-17T13:39:42 | 2023-04-17T13:39:42 | 506,174,445 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,701 | py |
import numpy as np
import xarray as xr
import pandas as pd
import pyresample as pr
from fast_histogram import histogram1d
import resample
bins = 100
binrange = np.log(10**-4), np.log(10**2)
binlist = np.linspace(*binrange, bins)
def open_dataset(date="2000-01-01"):
"""Open OC-CCI dataset as xarray dataarray via... | [
"brorfred@gmail.com"
] | brorfred@gmail.com |
629e4a5b96cc123996f75d85c63b5ddf89acba76 | a41520fe9dd9d71acd66130eca9a41ecc3bc313f | /05-Les_Boucles.py | e6c2a9ef22ce95a0ec85e425a7ee895e50517b9b | [] | no_license | lxkrv/Formation_Python | 05feefcd98799c0265487ee29b252d1594760d4c | 04acff85ee4dc64d5b4a67e2bb0c9dc498cd967b | refs/heads/master | 2022-04-14T11:30:32.189078 | 2020-04-20T13:01:47 | 2020-04-20T13:01:47 | 254,882,394 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 838 | py | #coding:utf-8
import os
import time
# for windows
os.system('cls')
#os.system("ls")
time.sleep(0.5)
"""
Boucles : while / for
Mots-clés : break (casse la boucle) / continue (revient au début de la boucle)
"""
#Boucle while
#-------------
#exemple 1
compteur = 0
while(compteur<5):
print("je suis une phrase")
... | [
"alxkorova@gmail.com"
] | alxkorova@gmail.com |
bedbe306e37d3c8d542039b06503cdebb3cdd0dd | e2c1b93c044406402bf823e29d85870d16ab5c44 | /Array/find_duplicate_ints.py | 79f407656551b0b26c09b2792af95c702ee76f13 | [] | no_license | usman-personal-home/projects | df64c9d0fd134c70aba6e2fcfcb679173f776eb3 | d83f19c2958466a01d624177d8874f8a9f9bcd0a | refs/heads/master | 2021-06-05T21:09:43.107886 | 2020-01-24T03:17:56 | 2020-01-24T03:17:56 | 115,402,104 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 599 | py | import os
from os.path import basename
import pprint
import random
def main():
mylist = [1, 1, 1, 6, 2, 3, 4, 4, 4, 4]
# new_list = remove_duplicates_sorted(mylist)
new_list = find_duplicate_dict(mylist)
print (new_list)
def find_duplicate_dict(lst):
duplicate_lst = []
dup_dict = {}
fo... | [
"usman.saeed@oracle.com"
] | usman.saeed@oracle.com |
7ac9d1d7cdbc4d296c89596b2cbfc6ba7d04f0d9 | f7c07caa1210d2a08e8433cdd854b1232efa88e3 | /Date-And-Time-Modules/Time-Module/asctime.py | 4636038147253d9c36f45035d301ee8980be3e2f | [] | no_license | rchicoli/ispycode-python | c2fbecc28bf32933150986d24f77b7297f50b78e | fa27f2377943ac2e4d983065406578151091e3f5 | refs/heads/master | 2020-03-20T11:34:59.698618 | 2018-06-14T21:14:02 | 2018-06-14T21:14:02 | 137,407,150 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 89 | py |
import time
print(time.asctime())
print(time.asctime([2000,1,31,6,30,59,17,0,0]))
| [
"rafaelchicoli@hotmail.com"
] | rafaelchicoli@hotmail.com |
58919cddfd7d8eac3f1bf86c64a774625201faa8 | f2cf4ddd91b11cb963ebd3626775ed26a7c71f5e | /DS_BackToSchool/CS2_Count.py | fa28bebac0f9950bc90a845fc25bb1d05a229f75 | [] | no_license | divyamvpandian/MyLearning | e1b890b07c5241b3132b6f4f1f1a6f7f549d69b2 | cef580290f2fe1b0913bc6db04e79b2d16d8e89a | refs/heads/master | 2020-12-29T02:20:55.085746 | 2020-10-17T09:41:21 | 2020-10-17T09:41:21 | 68,702,667 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 998 | py | def main():
n=10
sum=0
for i in range(1,n+1):
sum+=i
print(sum)
print(round((n*(n+1))/2))
##Collapse the list
# list=[None for i in range(0,10)]
#
# list[1]="A"
# list[4]="B"
# list[3]="C"
# list[6]="D"
# list[8]="E"
# print(list)
# replacepos = len(... | [
"divyamvpandian@gmail.com"
] | divyamvpandian@gmail.com |
252b14f18e6f35787cc4aec9a870e497c91462b0 | b93d95b41a9b0e4170a98f4b8a7d9bc4a68e2d12 | /RRT.py | e6d8345c1898d2d4473a5236e3c5004c401ecc6f | [] | no_license | WojtekG98/PWAPSDRM_241477 | e5d7ed4a2e8f692c6f0e7ed4e73b888ab8141c04 | 8d5b64437246457729d37f6f6b35a86f4dd9320e | refs/heads/master | 2023-02-01T02:18:29.742200 | 2020-12-10T11:37:08 | 2020-12-10T11:37:08 | 280,842,980 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,082 | py | #!/usr/bin/env python
import matplotlib.pyplot as plt
import Plan
import math
import random
from enum import Enum
try:
from ompl import base as ob
from ompl import geometric as og
except ImportError:
from os.path import abspath, dirname, join
import sys
sys.path.insert(0, join(dirname(dirname(abs... | [
"wojtek.golebiowski98@gmail.com"
] | wojtek.golebiowski98@gmail.com |
3b9af8dadb4fca4bf3eb2a3bf454343e196f858e | 1408fa5bdf9b18c0e3d42db2a52ea25d8a0d9fca | /deploy/deploy_asterisk_provider2.py | 6f5dc8fddaaa9b918695e316e6b45bac16a19712 | [
"MIT"
] | permissive | orpolaczek/astricon-2017-demos | ab9268927426e222945014c392fb6563114b222e | 1d3f24a72b19bf7ecf70831fd6b122cde59ea47b | refs/heads/master | 2021-05-14T23:41:15.156732 | 2017-10-05T02:27:40 | 2017-10-05T02:27:40 | 104,631,208 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 880 | py | import datetime
import libcloud
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver
from pprint import pprint
Engine = get_driver(Provider.ELASTICHOSTS)
driver = Engine("733b7dc7-7498-4db4-9dc4-74d3fee8abed",
secret="6w6CDAqL6JyXFj3xNkWW2zpUjYfv9dYaLVdaaR4Y",... | [
"or.polaczek@forter.com"
] | or.polaczek@forter.com |
0e9b9d7b4cfe391c63a71319701c9315c52c1588 | efc690a4c42b1511deb0fe80bf146872c45aed69 | /conf_site/sponsorship/models.py | f1a2c0a6aceed0242319506cff3c3807176f3152 | [
"MIT"
] | permissive | jasongrout/conf_site | 34aa1197727fbbbdf8811338764a7451445f1803 | 6b3beb21de8d847cba65dcb6da84464b40739d48 | refs/heads/master | 2021-03-31T06:35:59.696561 | 2020-03-17T20:39:57 | 2020-03-17T20:39:57 | 248,086,087 | 0 | 0 | MIT | 2020-03-17T22:32:02 | 2020-03-17T22:32:01 | null | UTF-8 | Python | false | false | 421 | py | from django.db import models
from wagtail.contrib.settings.models import BaseSetting, register_setting
@register_setting(icon="group")
class SponsorshipSettings(BaseSetting):
info_link = models.URLField(
default=u"https://pydata.org/pdf/sponsor-prospectus.pdf",
max_length=2083,
verbose_na... | [
"martey@mobolic.com"
] | martey@mobolic.com |
a97ebd7f1794021d4e05d1c1508cd1b47901e33e | 6c1a6651d804b0f7f427efd4b3f2cf2a9f17195a | /Combat.py | d0725289173dafe57e4f738ad8719685dcc3d0c3 | [] | no_license | Ixeldr7/RISK_NeuralNetwork | 1d734be48ee71caa0960c57292a9932adfc051d6 | 4207baa0490d63bcbf1d46a01f4eac37e5c70881 | refs/heads/master | 2022-12-02T08:04:24.804514 | 2020-08-16T13:02:52 | 2020-08-16T13:02:52 | 287,942,139 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,489 | py | from Territory import Territory
from random import randint
class Combat():
#function for combat
def combat(attacking, defending):
attacking.printDetails()
defending.printDetails()
a = attacking.getUnits()
b = defending.getUnits()
print(a)
print(b)
combat... | [
"35033845+Ixeldr7@users.noreply.github.com"
] | 35033845+Ixeldr7@users.noreply.github.com |
73d0714f19bdb72afedfbdfb6a4e3fdd2f379fcd | c57439f0c98af370ace65f9d55ef5a457bedc531 | /ydk/models/infra/Cisco_IOS_XR_infra_infra_clock_cfg.py | f85b7e5635a2a58fec6e49f2f48e3d0d54e76eaa | [
"Apache-2.0"
] | permissive | myahmao/ydk-py | c932fbd8245e554227cce0fd723d9a22887b0c40 | 2f367d93f2088d4abdc2f2bb10ca4864952b458a | refs/heads/master | 2021-01-14T11:32:29.064494 | 2016-03-15T22:44:05 | 2016-03-15T22:44:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,599 | py | """ Cisco_IOS_XR_infra_infra_clock_cfg
This module contains a collection of YANG definitions
for Cisco IOS\-XR infra\-infra\-clock package configuration.
This module contains definitions
for the following management objects\:
clock\: Configure time\-of\-day clock
Copyright (c) 2013\-2015 by Cisco Systems, Inc.
Al... | [
"manradha@cisco.com"
] | manradha@cisco.com |
cc4d1a777b82c57297ced99c26076184686c1a16 | de8e0c5c759347917ca7f06b42ca6c82b8f8c95f | /baekjoon/11_math-2/9613.py | b08bf5a8ddfbf8f859876049db7ce69d8f7dcee3 | [] | no_license | Greek-and-Roman-God/Apollo | aaeb315a9e70c719b3e53e3c4b9b5dde7b517ec0 | 2823cbcc9fc10ecd3f1785732403cb9c288f8ef3 | refs/heads/main | 2023-08-23T12:08:05.322733 | 2021-10-02T10:54:13 | 2021-10-02T10:54:13 | 308,242,023 | 1 | 1 | null | 2020-11-26T12:03:44 | 2020-10-29T06:49:26 | Python | UTF-8 | Python | false | false | 502 | py | # 9613 GCD 합
# https://www.acmicpc.net/problem/9613
def gcd(a, b):
result = 0
if a > b:
a, b = b, a
while b > 0:
result = b
a, b = b, a % b
return result
t = int(input())
for _ in range(t):
inp = list(map(int, input().split()))
cnt = inp[0]
num_list = inp[1:]
... | [
"doyeon311@gmail.com"
] | doyeon311@gmail.com |
0380087cdeb8e7364c4ba402c20e400b93331fb5 | a5d795406ebc0ffaa00f7da03aec99ce422fbd48 | /api-gateway/middleware/validator.py | 0a5514681b22789686e4b9ea8eade506a4a01b34 | [
"Apache-2.0"
] | permissive | Niweera/DNSTool-Middleware-API | ed9a0f64a9bed3fc6a0689e97c22d63df776fdc0 | 0e83d9f62fb65d9223b86a7876b3f30b2771befb | refs/heads/main | 2023-07-11T12:38:37.110388 | 2021-08-14T09:33:56 | 2021-08-14T09:33:56 | 369,843,939 | 0 | 0 | null | 2021-05-22T15:33:50 | 2021-05-22T15:33:49 | null | UTF-8 | Python | false | false | 2,440 | py | from typing import Dict, Any, Optional, Union
from flask import request, Response
import json
from models import (
UserSchema,
OrganizationEmailSchema,
CreateScanSchema,
UpdateScanSchema,
)
from functools import wraps
from middleware.error_handling import write_log
validator_schemas: Dict[str, Any] = {... | [
"w.nipuna@gmail.com"
] | w.nipuna@gmail.com |
9b9bc5ff883c628e8d71a64359ade085b3351337 | b41e47e8cfad55bb7af75bc603b96968058e0163 | /parser.py | 253e8821ee705ff26d2a558faa6b3041d348fdc7 | [
"Apache-2.0"
] | permissive | xaviercallens/xLogReducer | bb4d2c59b648570741bd98a5107c83e3e748e5ba | 40005419022c02454eca7b027d76b99b3dfad543 | refs/heads/main | 2023-08-30T15:09:46.591898 | 2021-11-11T02:22:57 | 2021-11-11T02:22:57 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,503 | py | import re
import os
import json
import numpy as np
import pandas as pd
from datetime import datetime
from util import timeCount
import util
import random
from findrule import RuleFinder
from itertools import combinations, permutations
class Logcluster:
def __init__(self, logTemplate='' ,Eid='E0'):#E0 means no matc... | [
"theweijy@gmail.com"
] | theweijy@gmail.com |
89948ab885ab0bd2162f01ebcf7a59fe1ad29ca9 | 290bec701d4f9cec704fdd71ba016baae85951c8 | /CS101/classes/students.py | 197c3fc07564f68f1919d1bac4cfcde255d7c9a7 | [] | no_license | javierunix/ca_computerscience | 95a12c03514de16bfaaa719bbad3b0d7123ad0a3 | b33ee5c4d4e664dc7829dafeb3b2f85452634a57 | refs/heads/main | 2023-07-11T09:39:29.963220 | 2021-08-14T16:44:47 | 2021-08-14T16:44:47 | 368,616,838 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 983 | py | # define the class student
class Student:
def __init__(self, name, year):
self.name = name
self.year = year
self.grades = []
def add_grade(self, grade):
if type(grade) is Grade: # if grade belongs to the class Grade is appended to the list
self.grades.append(grade)
def get_average(sel... | [
"fjguijarromartinez@gmail.com"
] | fjguijarromartinez@gmail.com |
771e6c3062b7e2a77caea1a1a55a767ff423b937 | fbf19ea11edf7e862a10ba5e1ac2d45a97b65c5a | /user_profile/models.py | a6b9c000f67be6903ec510ac2208b6158b0114ae | [] | no_license | AlexandruGhergut/epic-online-judge | c4bed0e69a98d369a9f95c00b9529a4967db9818 | 1af79e9343e722f352d974f445ad641c79016667 | refs/heads/master | 2021-03-22T03:22:45.447253 | 2017-06-29T06:19:48 | 2017-06-29T06:19:48 | 86,570,515 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 779 | py | from django.db import models
from authentication.models import User
from django.utils.translation import ugettext_lazy as _
from django.db.models.signals import post_save
from django.dispatch import receiver
class Profile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE)
first_name = ... | [
"alexandru.ghergut94@gmail.com"
] | alexandru.ghergut94@gmail.com |
e625389e69e48d3ef9324934bca70afa302115ab | 8c000cbabdd26a2d97ffea0e9a92b8eaaecf64a4 | /project_tests/other_test_files/test_sum_unittest.py | 0d12d3dac11f2046a2616c0e0d3b886f3d1d1641 | [] | no_license | alinasansevich/coding-playground | 0d557329dfab8f9016824b6fc8081a158c171efe | 3a9b4261c26e4ef3da75c3038a52cbacd9ea512b | refs/heads/main | 2023-08-06T01:46:20.108059 | 2021-10-03T22:15:08 | 2021-10-03T22:15:08 | 381,760,961 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 510 | py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Jul 9 15:11:41 2021
@author: alina
Getting started with unittest (step 1 towards TTD!)
Resources:
https://realpython.com/python-testing/#writing-your-first-test
"""
import unittest
class TestSum(unittest.TestCase):
def test_sum(self):
... | [
"alinasansevich@gmail.com"
] | alinasansevich@gmail.com |
533602f46e5fd616444778719ca121007c3b3786 | 8e58feae60f66ed52e5e5a04843580591bc6968d | /setup.py | b295a85ded33f5522c9e1cac762aaf01290d18b2 | [
"BSD-3-Clause"
] | permissive | rblack42/sphinxcontrib-lpblocks | 89a50ff64cbf8866ec2663dd999ccca0fad4bfd9 | a30869b1ee2f4f0f73b35f4a9841609d1fafd487 | refs/heads/master | 2022-07-31T23:29:57.534383 | 2020-05-18T20:06:33 | 2020-05-18T20:06:33 | 264,270,050 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,256 | py | '''
Sphinxcontrib-lpblocks
~~~~~~~~~~~~~~~~~~~~~~
Sphinx extension to support Literate Programming.
'''
import io
from setuptools import setup, find_packages
import sphinxcontrib.lpblocks as lp
def readfile(filename):
with io.open(filename, encoding="utf-8") as stream:
return stream.read().... | [
"roie.black@gmail.com"
] | roie.black@gmail.com |
ac498115b44ad7aeb41e6a0d9691f022b8f96844 | aa909c123d8daf4b4205a37232cd63f80f2e7227 | /the learning for zhuyonghan/元组-列表-字典-集合的区别.py | 6a4a19f93a66ce45c8006193653dfa58c072fe1c | [] | no_license | zhuxinkai/python-by-pyCharm | 4c74d2183c6e8d61a97ef3842ca150f39a4513d0 | c6815051e794b1f12f49d6c8cef6c8d533b04b0e | refs/heads/master | 2021-01-27T19:23:35.724483 | 2020-04-07T09:05:41 | 2020-04-07T09:05:41 | 243,486,109 | 0 | 0 | null | 2020-04-07T09:09:33 | 2020-02-27T09:55:46 | Python | UTF-8 | Python | false | false | 4,895 | py | # coding=utf-8
#列表
list1 = [2,3,'zhuxinkai',123,'liusha']
print list1[2]
print list1[:3]
list1.append('zhuyonghan')
print len(list1)
'''
操作 解释
list.append(): 追加成员
list.count(x): 计算列表中参数x出现的次数
list.extend(L): 向列表中追加另一个列表L
list.index(x): 获得参数x在列表中的位置
list.insert(): 向列表中插入数据
list.pop(): 删除列表中的成员(通过下标删除)
list.remove(): ... | [
"zhuxinkai@126.com"
] | zhuxinkai@126.com |
9c4c84794897db611285d44fe40a857bd5997ffb | e1303b5f9b13b9b7f0fa7b5af1e7b8b38314d31f | /findTreeDiameter.py | 8945e0de95a004a85b0c3fd800eb3850c42f4d14 | [] | no_license | middleverse/ads_prac | a77b0a162ac34eae3847533f773e28e6bec93fbb | 5b41defb74b1ae1fb38f244d9ffa070ac07d44c9 | refs/heads/master | 2023-03-25T06:54:56.913539 | 2021-03-10T23:06:51 | 2021-03-10T23:06:51 | 307,391,921 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,408 | py | class TreeNode:
def __init__(self, val, left=None, right=None):
self.val = val
self.left = left
self.right = right
class TreeDiameter:
def __init__(self):
self.treeDiameter = 0
def find_diameter(self, root):
self.find_diameter_recursive(root)
return self.treeDiameter
... | [
"arshi_b@hotmail.com"
] | arshi_b@hotmail.com |
f27905bc61a5ffb0f48c1098574050cf4d9b0290 | e9541a6abd895956326ebaf02fa7d64426657967 | /pg_SesVariables.py | bb9056bca2fcca50449dcc565576c2793c4de4b5 | [] | no_license | capocchi/sestopy | 508625d9b1de2a5a85f3bbcaab231ab72347c4aa | 6d7e43f436a6f14d1f9d887caf76b7d3930d3028 | refs/heads/master | 2020-07-28T22:56:53.179108 | 2019-08-28T05:59:01 | 2019-08-28T05:59:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 23,218 | py | # -*- coding: utf-8 -*-
__author__ = 'Hendrik Folkerts'
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from PyQt5.QtCore import * #QItemSelectionModel
import ast
import re
import keyword
class SesVariables(QtCore.QObject):
sesvarChangedSignal = pyqtSignal()
... | [
"noreply@github.com"
] | noreply@github.com |
28b5f273d0e04b143c9cd5bb9d092bf1a50eedb1 | 1dacbf90eeb384455ab84a8cf63d16e2c9680a90 | /pkgs/ipython-5.0.0-py27_0/lib/python2.7/site-packages/IPython/core/pylabtools.py | e7327e58e8c5648d59463ff3f067689983b9f24d | [
"Apache-2.0",
"BSD-3-Clause",
"LicenseRef-scancode-unknown"
] | permissive | wangyum/Anaconda | ac7229b21815dd92b0bd1c8b7ec4e85c013b8994 | 2c9002f16bb5c265e0d14f4a2314c86eeaa35cb6 | refs/heads/master | 2022-10-21T15:14:23.464126 | 2022-10-05T12:10:31 | 2022-10-05T12:10:31 | 76,526,728 | 11 | 10 | Apache-2.0 | 2022-10-05T12:10:32 | 2016-12-15T05:26:12 | Python | UTF-8 | Python | false | false | 13,845 | py | # -*- coding: utf-8 -*-
"""Pylab (matplotlib) support utilities."""
from __future__ import print_function
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
from io import BytesIO
from IPython.core.display import _pngxy
from IPython.utils.decorators import flag_calls... | [
"wgyumg@mgail.com"
] | wgyumg@mgail.com |
21d604e037016e240c4d2f045337630663627915 | 86023057f945e8cf0b901c62ff1f6ae3af5b4e21 | /src/db/models/article.py | 19fb8e99729c8e2d4ea61a3d39f4dc73ee22b2e4 | [] | no_license | kawalerzy/nlp-pln | 061320c6b9d709b4228b94ee8aec72d689d28db2 | 989ca86168bc6108c0c8baf3e8d2014472fbd8e9 | refs/heads/master | 2020-12-29T08:29:26.052221 | 2020-03-22T18:45:49 | 2020-03-22T18:45:49 | 238,536,071 | 0 | 0 | null | 2020-03-08T21:35:07 | 2020-02-05T19:55:04 | HTML | UTF-8 | Python | false | false | 584 | py | from sqlalchemy import Column, Integer, String
from sqlalchemy.dialects.postgresql import TEXT, ENUM, DATE
from db.models.model_base import Base
from scraping.pilkanoznapl import categories
category_enum = ENUM(*categories.values(), name="pilkanoznapl_article_category", create_type=False)
class Article(Base):
_... | [
"jakub.sokolowski1996@gmail.com"
] | jakub.sokolowski1996@gmail.com |
3b0602f75b50071a6aea6950b8d69ee16ab2bda1 | 5e476093ab3626b13fad752258ac604641d9882f | /config.default.py | 1b68ba367e897329bf9f7b2794007c2cbc93b4ec | [] | no_license | dag-hammarskjold-library/itp_extract | 570250af37060922946ab61d3de2e1cc0c664ff5 | c1f76ad4ec14841d4682426d30c4a71ea4c0d3ce | refs/heads/master | 2020-04-16T05:47:22.962600 | 2019-03-07T22:58:02 | 2019-03-07T22:58:02 | 165,320,994 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 389 | py | from pymongo import MongoClient
class Config(object):
DB_CLIENT = MongoClient(
'your.db.host',
port=13207,
username='username',
password='password',
authSource='authentication database',
authMechanism='SCRAM-SHA-256'
)
DB = DB_CLIENT['your database']
BI... | [
"helton@un.org"
] | helton@un.org |
3449d4acb323536e96aa682507bac00e41a31aef | cdb64459166f74bc2fe208f3bf857bb05a6071be | /limits/dcMaker_HZToUpsilonPhoton_forLimits_v03.py | b79b619ba66df5bddd19dc0c7a8c15f84cc824d6 | [] | no_license | ossobooker/HZToUpsilonPhotonStatisticsAndLimits | 0ab75f67bb72a00c6b4eb5c14b22e3f25cce7a22 | e2de881b2af45a0f799c005be91d85e7a6038f1c | refs/heads/master | 2022-06-21T00:51:02.595343 | 2018-10-28T10:51:59 | 2018-10-28T10:51:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 24,155 | py | #!/usr/bin/env python
import json
import argparse
import StringIO
import os
import ROOT
limitsJSON = {}
def getRate(ratesJSON, analysisBranch, quarkoniaState, selCategory, sample):
altAnalysisBranch = analysisBranch.replace("Photon", "").replace("To", "to")
if (sample == "bckg"):
return str(ratesJSON[alt... | [
"felipe.silva@cern.ch"
] | felipe.silva@cern.ch |
3b7a975f24fd0f809736879f19b731f5822e9ca7 | 585bac463cb1919ac697391ff130bbced73d6307 | /498_DiagonalTraverse/solution1.py | 01cf69981435f0b60f55bc4c079176ec25b77f13 | [] | no_license | llgeek/leetcode | ce236cf3d3e3084933a7a4a5e8c7766f7f407285 | 4d340a45fb2e9459d47cbe179ebfa7a82e5f1b8c | refs/heads/master | 2021-01-22T23:44:13.318127 | 2020-03-11T00:59:05 | 2020-03-11T00:59:05 | 85,667,214 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 646 | py | class Solution:
def findDiagonalOrder(self, matrix: List[List[int]]) -> List[int]:
if not matrix or not matrix[0]: return []
m, n = len(matrix), len(matrix[0])
i, j = 0, 0
res = []
for _ in range(m * n):
if (i + j) % 2 == 0: #move up
if i == 0:
... | [
"linlinc@twitter.com"
] | linlinc@twitter.com |
22acd42a9618fef3bee6c7dbe0f9704666958875 | 216e82d85a4d9aaa624bbcf11f25003892f2192b | /docs/conf.py | f68a9c870c5d09bd93480b5999d59c6cc6176c23 | [
"BSD-3-Clause"
] | permissive | krautradio/PyRfK | 1b023ea09687d76ad8754bb54b23673ea516dbad | d25ec3f9b49915214d10714260f0d171356e49c5 | refs/heads/master | 2021-01-16T20:27:05.210240 | 2015-04-02T14:33:22 | 2015-04-02T14:33:22 | 32,661,116 | 2 | 3 | null | 2015-03-22T04:00:28 | 2015-03-22T04:00:28 | null | UTF-8 | Python | false | false | 8,081 | py | # -*- coding: utf-8 -*-
#
# PyRfK documentation build configuration file, created by
# sphinx-quickstart on Thu Jul 4 23:42:05 2013.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All c... | [
"mrloom@buckket.local"
] | mrloom@buckket.local |
f95a5a18b076a96c572670f92020e9b9eb2a8756 | faa84a83a3d347ac8b17cab2fa0599c65652a85d | /uliweb/contrib/jsonql/__init__.py | 983480b5218ad736d2b4e7dba40780990a35cd85 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | permissive | limodou/uliweb | 4d829568cb6bab4a807fb80adb84b6aa1d0e76ab | 8bc827fa6bf7bf58aa8136b6c920fe2650c52422 | refs/heads/master | 2023-08-22T09:10:34.609797 | 2021-07-04T01:20:33 | 2021-07-04T01:20:33 | 283,042 | 230 | 65 | BSD-2-Clause | 2019-07-29T11:17:01 | 2009-08-20T13:50:46 | Python | UTF-8 | Python | false | false | 22,652 | py | #coding=utf8
from uliweb import settings
from uliweb.utils.common import safe_str, import_attr
from uliweb.utils.storage import Storage
from uliweb.orm import do_, get_model
from uliweb.utils.sorteddict import SortedDict
from sqlalchemy import __version__ as sa_version, select, true, text, literal
import logging
DEBU... | [
"limodou@gmail.com"
] | limodou@gmail.com |
46446b438bf73386af0ad384477665140340d12e | 57e9af825cdcd854fecf352b19c9068cdc1eb1fb | /tests/test_converter.py | 380937d8d97eaad1169132038f2e59127620b171 | [] | no_license | DanielCreeklear/string_image_converter | 681766b8f9e1dc87db603844d1aaa2ae77218e6e | 157f5e7d3259ee84b5eb0add35a2f92f62db32a4 | refs/heads/main | 2023-07-03T04:44:51.379613 | 2021-08-11T01:51:15 | 2021-08-11T01:51:15 | 394,829,962 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 918 | py | from PIL.JpegImagePlugin import JpegImageFile
from PIL.Image import Image
from pytest import mark
@mark.usefixtures('image_processing')
def test_should_return_jpeg_image_object(image_processing):
image_processing.open_image('./example.jpg')
assert type(image_processing.image) is JpegImageFile
@mark.usefixtu... | [
"ddanielssoares@gmail.com"
] | ddanielssoares@gmail.com |
9c031704a42a5213d8455b26de9faad8a89709ab | a5f06b298b5f7408dbf7d985d91cad7225a270f8 | /Week_02/groupAnagrams.py | 29e79095c373b6005a8c285d6256eb508149c2e1 | [] | no_license | ZGingko/algorithm008-class02 | 8e22e433b560a81ac3eab0a544e03be114cc2bbc | 6580c7fd9a62494f82cedf69edda793865b5bd2d | refs/heads/master | 2022-11-15T23:55:10.852582 | 2020-07-04T08:53:09 | 2020-07-04T08:53:09 | 255,088,941 | 0 | 0 | null | 2020-04-12T13:31:49 | 2020-04-12T13:31:48 | null | UTF-8 | Python | false | false | 1,937 | py | class Solution:
def groupAnagrams(self, strs:list) -> list:
"""
49. 字母异位词分组
给定一个字符串数组,将字母异位词组合在一起。字母异位词指字母相同,但排列不同的字符串。
示例:
输入: ["eat", "tea", "tan", "ate", "nat", "bat"]
输出:
[
["ate","eat","tea"],
... | [
"zhengcanping147@sina.com"
] | zhengcanping147@sina.com |
12a0858f92e944f3282765fe64115943dabf630e | a838d4bed14d5df5314000b41f8318c4ebe0974e | /sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_11_01/aio/operations/_express_route_service_providers_operations.py | 562620df96ed6195c4d70aade703489bdeef9938 | [
"MIT",
"LicenseRef-scancode-generic-cla",
"LGPL-2.1-or-later"
] | permissive | scbedd/azure-sdk-for-python | ee7cbd6a8725ddd4a6edfde5f40a2a589808daea | cc8bdfceb23e5ae9f78323edc2a4e66e348bb17a | refs/heads/master | 2023-09-01T08:38:56.188954 | 2021-06-17T22:52:28 | 2021-06-17T22:52:28 | 159,568,218 | 2 | 0 | MIT | 2019-08-11T21:16:01 | 2018-11-28T21:34:49 | Python | UTF-8 | Python | false | false | 5,138 | py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | [
"noreply@github.com"
] | noreply@github.com |
687def1b00e2781482f96ddc8983ae235a12f86e | 571eb3953181bdc95cbc98cce1966c4982de9cad | /Sequence/q1-q99/q40-q49/q49/q49.py | 0993944f8b85fd4d43f59ab1fdbc3f9b9bc83fd4 | [] | no_license | KevinHaoranZhang/Leetcode | 16075e601b431b128904b62b38a82a22e017d732 | bd1e06a56eba31c03eb557ce933bd2cbe1d41927 | refs/heads/master | 2023-07-11T10:57:27.825661 | 2021-08-11T03:11:01 | 2021-08-11T03:11:01 | 280,320,266 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 250 | py | class Solution:
def groupAnagrams(self, strs: List[str]) -> List[List[str]]:
solution = collections.defaultdict(list)
for string in strs:
solution[tuple(sorted(string))].append(string)
return solution.values()
| [
"zhr9118@gmail.com"
] | zhr9118@gmail.com |
88ccd66155ff44ef7b2f635eda6a211f07592c79 | ea541e5cb1edc39571dd5008472c055567ea0ecb | /Bikeshare_jessica.py | 7af99657d599fe99d37bd37048ad93cec9302ac1 | [] | no_license | Jessicamaple/Udacity-Data-Analysis-Nanodegree | 41c0d33faa611b1a14cd956cf27d5b709289fb66 | 27a1ff2bd58bab7872579f42e65ac26dc23c26ed | refs/heads/master | 2020-03-10T17:14:35.506424 | 2018-10-27T06:33:32 | 2018-10-27T06:33:32 | 129,495,320 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,547 | py |
# coding: utf-8
# In[1]:
# %load bikeshare.py
import time
import pandas as pd
import numpy as np
CITY_DATA = { 'chicago': 'chicago.csv',
'new york city': 'new-york-city.csv',
'washington': 'washington.csv' }
def get_filters():
"""
Asks user to specify a city, month, and day to ... | [
"34986245+Jessicamaple@users.noreply.github.com"
] | 34986245+Jessicamaple@users.noreply.github.com |
90cec1ab49e52fccaa6aa9922683ffe103721e6a | 3002452f8e5520645109eb68b70128b9ebb01ccf | /turngeneration/tests/test_models.py | bfd85131f2c6bbacf1a3efafc5563b520a00a38f | [
"MIT"
] | permissive | jbradberry/django-turn-generation | f01b2d681ec8a01263dd8afa467544ae85082351 | dbfec9d0addbff2d8d54597b7520e171938c9107 | refs/heads/master | 2021-05-16T03:13:09.156798 | 2019-12-21T02:21:24 | 2019-12-21T02:21:24 | 14,544,818 | 0 | 1 | MIT | 2019-12-21T02:21:26 | 2013-11-20T02:45:08 | Python | UTF-8 | Python | false | false | 10,757 | py | import datetime
from django.contrib.auth.models import User
from django.utils import timezone
from django.test import TestCase
from mock import patch, call
from dateutil import rrule
import pytz
from ..models import Generator, GenerationTime, GenerationRule, Pause, Ready
from sample_app.models import TestRealm, TestA... | [
"jeff.bradberry@gmail.com"
] | jeff.bradberry@gmail.com |
e53dd06c2a2df6fe95473cf29333718731785fe7 | be5f4d79910e4a93201664270916dcea51d3b9ee | /rovers/fastdownward/experiments/issue420/issue420-v1.py | b5d93b01dad7fc570cabc56ea38aee5819c50c0a | [
"MIT",
"GPL-1.0-or-later",
"GPL-3.0-or-later"
] | permissive | mehrdadzakershahrak/Online-Explanation-Generation | 17c3ab727c2a4a60381402ff44e95c0d5fd0e283 | e41ad9b5a390abdaf271562a56105c191e33b74d | refs/heads/master | 2022-12-09T15:49:45.709080 | 2019-12-04T10:23:23 | 2019-12-04T10:23:23 | 184,834,004 | 0 | 0 | MIT | 2022-12-08T17:42:50 | 2019-05-04T00:04:59 | Python | UTF-8 | Python | false | false | 718 | py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
from downward.suites import suite_optimal_with_ipc11
import common_setup
REVS = ["issue420-base", "issue420-v1"]
CONFIGS = {
"blind": ["--search", "astar(blind())"],
"lmcut": ["--search", "astar(lmcut())"],
}
TEST_RUN = False
if TEST_RUN:
SUITE = "gripper... | [
"zaker.mehrdad@gmail.com"
] | zaker.mehrdad@gmail.com |
983ce2d509900ae5200fec07c1c4b3844a01010b | cc7ed079d195bcb02062cc07a6eb791d03838a90 | /projectrunner.py | 18c3a7068199b5f5e8535c64574ea6e6d48d395b | [
"MIT"
] | permissive | andrew4699/sublime-project-runnner | 20575402b9b82a0479718b91d6920e8ad585cdd7 | 0cf52aef777c25c01a209db0376e640e0d724f44 | refs/heads/master | 2020-03-11T05:17:13.953050 | 2018-05-29T00:34:29 | 2018-05-29T00:34:29 | 129,798,371 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 548 | py | import sublime
import sublime_plugin
from .windowmanager import WindowManager
class ProjectRunner(sublime_plugin.EventListener):
window_controllers = None
def __init__(self):
self.window_controllers = {}
def on_activated(self, view):
self.on_load(view)
def on_load(self, view):
win = view... | [
"andrew_guterman@yahoo.com"
] | andrew_guterman@yahoo.com |
5816c206734e6cf3cb235de70f1cbbda8f9e2845 | 38131ac8076cacb94e6f733f0613c9ac3f608a61 | /day19/day19.py | 453ad7dbbeede7923ea4e50fe41708a05e5bb32b | [] | no_license | moink/Advent2020 | 4c152f39f577ef6299c378256c153d3bbd11cc7b | 12cd534ed7f0cfe464ed86e06b13007e65e38a4b | refs/heads/master | 2023-02-02T15:08:45.930861 | 2020-12-25T05:02:09 | 2020-12-25T05:02:09 | 316,603,193 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,603 | py | import collections
import advent_tools
def main():
# advent_tools.TESTING = True
data = advent_tools.read_input_line_groups()
print('Part 1:', run_part_1(data[0], data[1]))
print('Part 2:', run_part_2(data[0], data[1]))
def process_rules(data):
rules = collections.defaultdict(list)
for line... | [
"theresa.robinson@gmail.com"
] | theresa.robinson@gmail.com |
0ff02e25580b1f88fab4ada558e89ad22be6b57f | eab20b7346501b63a0384dc35841e927b43d2929 | /old_code/module.py | ab00cd33314f7f7fa2e8ff2938820d110f8ebfb1 | [] | no_license | jacky860226/buffer_and_splitter_insertion | 601ce8a80986f6acec5698cbb494282578490015 | 315724cf96708e06553b0b5a6e9f565b4e31fef3 | refs/heads/master | 2023-05-07T15:09:04.447826 | 2021-04-05T04:46:15 | 2021-04-05T04:46:15 | 283,094,994 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 10,553 | py | from abstract_net_model import Device
from wires import Wire, PortIn, PortOut, Constant, VectorWire
from instance import Instance
from alias import Alias
from typing import Dict
class Module(Device):
def __init__(self, name: str):
super().__init__(name)
self._interface = list()
self._netli... | [
"jacky860226@yahoo.com.tw"
] | jacky860226@yahoo.com.tw |
88bb225b71c33abc9202e0ece79f3cb66040e618 | 055748f2dff82a9aa8cb18bb176908a6cc83d3dd | /src/countries.py | 70011fa8d0a052013c9edb60ac32c8d7568bea92 | [] | no_license | tgpmoraes/learning-python | 0be5971ce7d96fff21c60a2c18857a7fb1e18a1c | d771fe5cc06dbee77934931e0af91ae007b1b260 | refs/heads/master | 2021-07-21T03:15:54.841907 | 2017-10-24T07:32:00 | 2017-10-24T07:32:00 | 107,514,066 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 83 | py | f = open("../input/countries.txt", "r")
for line in f:
print(line)
f.close():
| [
"tgpmoraes@gmail.com"
] | tgpmoraes@gmail.com |
627593462347feaa981a7a8ea25b09ebbcdacb5e | 6b294709e6110f395b3f67ae57eb590152376e19 | /user_test.py | dc00747dad1b79dafcc25c0988f6897c89f5bd1c | [
"MIT"
] | permissive | kelvinadeu/password_locker | f715ba1e7a61ee77b664563cd77ff97de5449f88 | a652f7440510de44ce3d1cf1b88bda4c53b4522e | refs/heads/master | 2020-04-18T13:29:59.309656 | 2019-02-07T01:21:11 | 2019-02-07T01:21:11 | 167,563,172 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 720 | py | import unittest
from user import User
class TestUser(unittest.TestCase):
"""
This is a class that will contain all tests for the user class
"""
def setUp(self):
"""
this will create new user before each test
"""
self.new_user("kelvin","6980")
def test_init(self):
... | [
"kelvinadeu25@gmail.com"
] | kelvinadeu25@gmail.com |
258b646c702736c7a992f113a68f318a0df6c2a5 | e0980f704a573894350e285f66f4cf390837238e | /.history/menus/models_20201030152822.py | c70dffeb2c5e9ce219e941ae4b37043c1fd1e98f | [] | no_license | rucpata/WagtailWebsite | 28008474ec779d12ef43bceb61827168274a8b61 | 5aa44f51592f49c9a708fc5515ad877c6a29dfd9 | refs/heads/main | 2023-02-09T15:30:02.133415 | 2021-01-05T14:55:45 | 2021-01-05T14:55:45 | 303,961,094 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,640 | py | from django.db import models
from django_extensions.db.fields import AutoSlugField
from modelcluster.models import ClusterableModel
from modelcluster.fields import ParentalKey
from wagtail.core.models import Orderable
from wagtail.admin.edit_handlers import FieldPanel, PageChooserPanel, InlinePanel
class MenuItem(O... | [
"rucinska.patrycja@gmail.com"
] | rucinska.patrycja@gmail.com |
f0198df4f69f169cf503f0beedf9b1d4108bf3b0 | f0f66bc28bb6fea6a0c0fa9e1907b1c8388348a1 | /ads/views.py | cf0603d756789d25bf21a3fd7aef628e5dd2a5eb | [] | no_license | mhaouili2020/django_projects | 911c0c12a8038a42ea427fcb8202c71f00094f6d | 5d626cdc93cc33b86a04f37de44b1eb5cba116e1 | refs/heads/master | 2023-01-05T02:57:41.371366 | 2020-10-23T15:25:13 | 2020-10-23T15:25:13 | 299,993,647 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 546 | py | from ads.models import Ad
from ads.owner import OwnerListView, OwnerDetailView, OwnerCreateView, OwnerUpdateView, OwnerDeleteView
class AdListView(OwnerListView):
model = Ad
# By convention:
# template_name = "myarts/article_list.html"
class AdDetailView(OwnerDetailView):
model = Ad
class AdCreate... | [
"mustapha@hts-hosting.com"
] | mustapha@hts-hosting.com |
d1e0879a97e4847c1245bd0cbc2ead0c8db5de8d | 8ffa2d4635e16c5b85abfa293797978820c300c7 | /bunq_bot/views.py | 90cc1e8c3819104fb3fe852f21aad1283042090d | [
"MIT"
] | permissive | OGKevin/ComBunqWebApp | 5630d9e6befeadb99dd1b327d76ed4911d991580 | 25bc6118427f3b369fb61ba0bd38c977be05644f | refs/heads/develop | 2021-07-03T17:28:53.391796 | 2017-07-30T16:50:06 | 2017-07-30T16:50:06 | 87,387,464 | 31 | 7 | MIT | 2021-06-10T19:45:58 | 2017-04-06T04:52:18 | Python | UTF-8 | Python | false | false | 652 | py | # from django.shortcuts import render
from django.views import View
# from pprint import pprint
from django.views.decorators.csrf import csrf_exempt
from django.utils.decorators import method_decorator
from django.http import HttpResponse
import json
from box import Box
from bunq_bot.main import MessagesHandler
# Cre... | [
"kevinhellemun@icloud.com"
] | kevinhellemun@icloud.com |
f38e2eee95a62392e464c51457f01f9956100409 | 0d4a8ef7356dd40118f55bbe8337959d05ba7439 | /woordener/extract.py | 444835ae7d7123c31d56972b5d5066b02ab49e15 | [
"MIT"
] | permissive | luisparravicini/woordener | c4805d714c23e24df5efc9111df3971bf4f5a201 | d404cd366ed0e7a1fa8f6eac90185364d4f85d3d | refs/heads/master | 2020-07-23T18:13:36.107909 | 2019-09-14T19:00:46 | 2019-09-14T19:00:46 | 207,663,481 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 539 | py | from .page_handler import parse_xml
import re
def extract_section(data):
result = None
m = re.search(r'==Dutch==\s*(.+?)(?:\s+==[^=]|$)', data, re.DOTALL)
if m is not None:
result = m.group(1)
return result
def extract(path, collector):
c = lambda x: _prepare_section(x, collector)
p... | [
"lparravi@gmail.com"
] | lparravi@gmail.com |
3e9956e9dcc4a1c4b5873fb6cc00798a7a1b8a6e | 2eb386991d9975f0f8440d90de26e950304ac42f | /TGHACK2020/mystic/mystic.py | 890845cecbe1fd91e46764c04ab3175c590b43f6 | [] | no_license | Quintec/CTFs2020 | 2816a66e8a486537c31e5ac25253840bc3a8ffe9 | bdaa327c9f0b0ee16ff95bafcaf65f0df8acd8b9 | refs/heads/master | 2022-12-19T21:39:14.129702 | 2020-10-01T16:49:06 | 2020-10-01T16:49:06 | 281,812,929 | 1 | 0 | null | 2020-10-01T16:49:08 | 2020-07-23T00:37:44 | null | UTF-8 | Python | false | false | 182 | py | with open("mystic.png", 'rb') as file:
dat = file.read()
print(dat)
print(type(dat))
dat = bytes([d^42 for d in dat])
with open("mystic.dat", 'wb') as file:
file.write(dat) | [
"zhongbrothers@gmail.com"
] | zhongbrothers@gmail.com |
3d1c90fbb7d008695235865dafff9c1cbc5a140c | 137df3d0c74ba6d8a0cde625b3ab5310497d2775 | /mlrank/synth/features.py | 9574e7644ce9e0298c7fe8a17124f0af0cb014ca | [] | no_license | isaintnik/ml-rank | d79311ab74854e366cc65884e8de218e4e0f2069 | e97121db61d5b29d94c7383b60d113233d739a21 | refs/heads/master | 2020-04-01T09:43:20.710492 | 2020-02-06T12:02:35 | 2020-02-06T12:02:35 | 153,087,186 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,514 | py | import numpy as np
def shuffle_features(dataset):
n_features = dataset.shape[1]
feature_permutation = np.random.choice(n_features, n_features, replace=False)
return dataset[:, feature_permutation]
class FeaturesGenerator(object):
@staticmethod
def generate_normal_features(
mean_spre... | [
"peter.pogorelov@gmail.com"
] | peter.pogorelov@gmail.com |
e8722bbc3a76907f918f9415777a7921091bc190 | 4e41e39deb3a6385011b0da759ef42f5840c5039 | /script popolamento DB/env/lib/python3.7/site-packages/pip/_vendor/idna/codec.py | 2a0dfe85716b2a35b461e349f85606250023dc4c | [
"Apache-2.0"
] | permissive | 2dadsgn/Smart-vase-webapp-flask- | 0cfbd22e16a5591aa678b2a7b949c113beb678aa | 0714d960ec21c77be069dd07b1bc8407f33e0b72 | refs/heads/master | 2022-07-20T13:23:45.128082 | 2022-06-16T18:36:24 | 2022-06-16T18:36:24 | 195,382,328 | 0 | 0 | Apache-2.0 | 2019-07-18T21:22:41 | 2019-07-05T09:34:46 | Python | UTF-8 | Python | false | false | 3,300 | py | import codecs
import re
from .core import encode, decode, alabel, ulabel, IDNAError
_unicode_dots_re = re.compile(u'[\u002e\u3002\uff0e\uff61]')
class Codec(codecs.Codec):
def encode(self, data, errors='strict'):
if errors != 'strict':
raise IDNAError("Unsupported error handling \"{0}\"".fo... | [
"2da.dsgn@gmail.com"
] | 2da.dsgn@gmail.com |
a9ad2f99f41cf22329620560cf731132d89642f0 | ded0c9093eb8916f3cd02a118c88a5ba653a9c12 | /snl/util/io.py | 7ff6cd7ae8629d2b7842b67d08f0fa3395539012 | [
"MIT"
] | permissive | mnonnenm/SNL_py3port | 851e69cf0a3eeca3740049db81c490cd7ef1899b | ddd591b611f680ccc01ad4e95345a2c2992d4abd | refs/heads/master | 2020-04-06T19:44:49.287288 | 2019-02-13T16:37:35 | 2019-02-13T16:37:35 | 157,748,162 | 2 | 4 | MIT | 2019-02-13T16:37:36 | 2018-11-15T17:29:32 | Python | UTF-8 | Python | false | false | 1,729 | py | import pickle as pickle
import os
import sys
def save(data, file):
"""
Saves data to a file.
"""
dir = os.path.dirname(file)
if dir:
make_folder(dir)
with open(file + '.pkl', 'w') as f:
pickle.dump(data, f)
def load(file):
"""
Loads data from file.
"""
with... | [
"mnonnenm@uos.de"
] | mnonnenm@uos.de |
c1807ce4ed651c8eb16b08dac2986489cac5b35f | fcc07961425f5a4f3387e74cbdae36829b49fc4f | /backend/transfers/models.py | 34c045ead72be043cfec55304e0d2ab4d664afaa | [] | no_license | phHank/ptBank | ed82662b88d67d2d0bb159b84c0e70d7b187e4e8 | f29e600728d58659e50d092239d3c1d1541397ef | refs/heads/main | 2023-08-02T20:06:01.870065 | 2021-09-28T17:47:57 | 2021-09-28T17:47:57 | 338,149,465 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,512 | py | from django.utils import timezone
from django.db import models
from django.contrib.auth.models import User
from django.contrib.auth import get_user_model
from cosec.models import Company
class Bank(models.Model):
name = models.CharField(max_length=200, null=False)
country = models.CharField(max_length=200, nu... | [
"hankey.ph@gmail.com"
] | hankey.ph@gmail.com |
00b51cd8339ee6726731147e53432b24dc540662 | a4146004694aa8745f751fd49152b01718e43cdd | /Algorithm/test/IM/D03/미로탈출 로봇중간 단계2.py | 6085d18524e9fd1a78f28e0e385c58c842be2f6e | [] | no_license | hoyoung2176/TIL | 1f4e2110e1e21d03855889044a7df280ad9788fc | e2bca069d36455fdf8f142fa9a06fb1a39f3c99f | refs/heads/master | 2021-06-25T13:34:01.463989 | 2019-07-31T05:05:45 | 2019-07-31T05:05:45 | 163,781,026 | 0 | 0 | null | 2021-06-10T21:19:53 | 2019-01-02T01:39:56 | Python | UTF-8 | Python | false | false | 872 | py | import sys
sys.stdin = open("미로탈출 로봇중간 단계.txt")
N = int(input())
arr = [[1]*(N*2) for _ in range(N+2)]
for i in range(1,N+1):
arr[i]= [1] + (list(map(int, input()))) + [1]
Darr = list(map(int,input().split()))
Dno = 0 #방향순서
dr = [0, 1, 0, -1, 0] #아래1 왼2 위3, 오른4 방향
dc = [0, -1, 0, 1]
r,c = 1, 1 #현재좌표
cnt = 0
while... | [
"hoyoung2176@gmail.com"
] | hoyoung2176@gmail.com |
1cc919de041c45de9d95e37af262c9a2f2d6e5fe | c2f85286d1e21fb803c35f6d996abc850b993e53 | /mystorage/models.py | 3b1da397f6d612372399cd856fd46f538d5bc4d8 | [] | no_license | devdw98/likelion_drf | dfeec1bf5ee153918807f99040c8c33240c4344c | 6d0171961bc93f4edd7998b7351034e0a936079d | refs/heads/master | 2020-07-29T20:38:29.041098 | 2019-10-27T07:22:53 | 2019-10-27T07:22:53 | 209,951,594 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 984 | py | from django.db import models
from django.conf import settings
class Essay(models.Model):
author = models.ForeignKey(settings.AUTH_USER_MODEL, default = 1, on_delete=models.CASCADE) #모델지우면 그 모델과 관련한 모든 것 지움
title = models.CharField(max_length = 30)
body = models.TextField()
class Album(models.Model): #imag... | [
"devdw98@gmail.com"
] | devdw98@gmail.com |
571dce4b35f1680fb3c9ae0aa7327fffecc8a440 | eac985db4df6ef7429ee6798956aad85087dc444 | /rcsfootprints/settings.py | 5809049ca8dfede2566f444d0a91519b4eaebd56 | [] | no_license | scottcoughlin2014/rcsfootprints | 10e7caafda5062ecece0cf1eba978a853e35240e | 06317fd97cd1feda745428df4c65662941caa755 | refs/heads/master | 2022-11-28T15:50:57.004215 | 2020-08-03T20:34:06 | 2020-08-03T20:34:06 | 284,801,649 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,713 | py | """
Django settings for rcsfootprints project.
Generated by 'django-admin startproject' using Django 3.0.9.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
"""
import... | [
"scottcoughlin2014@u.northwestern.edu"
] | scottcoughlin2014@u.northwestern.edu |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.