max_stars_repo_path
stringlengths
4
286
max_stars_repo_name
stringlengths
5
119
max_stars_count
int64
0
191k
id
stringlengths
1
7
content
stringlengths
6
1.03M
content_cleaned
stringlengths
6
1.03M
language
stringclasses
111 values
language_score
float64
0.03
1
comments
stringlengths
0
556k
edu_score
float64
0.32
5.03
edu_int_score
int64
0
5
src/Tools/FigureOfMerit/FigureOfMerit/BlockCiphers/Scenario2/Constants.py
GaloisInc/hacrypto
34
6621451
# # University of Luxembourg # Laboratory of Algorithmics, Cryptology and Security (LACS) # # FigureOfMerit (FOM) # # Copyright (C) 2015 University of Luxembourg # # Written in 2015 by <NAME> <<EMAIL>> # # This file is part of FigureOfMerit. # # This program is free software: you can redistribute it and/or modify # it ...
# # University of Luxembourg # Laboratory of Algorithmics, Cryptology and Security (LACS) # # FigureOfMerit (FOM) # # Copyright (C) 2015 University of Luxembourg # # Written in 2015 by <NAME> <<EMAIL>> # # This file is part of FigureOfMerit. # # This program is free software: you can redistribute it and/or modify # it ...
en
0.756042
# # University of Luxembourg # Laboratory of Algorithmics, Cryptology and Security (LACS) # # FigureOfMerit (FOM) # # Copyright (C) 2015 University of Luxembourg # # Written in 2015 by <NAME> <<EMAIL>> # # This file is part of FigureOfMerit. # # This program is free software: you can redistribute it and/or modify # it ...
1.668509
2
src/settings/workspace.py
struts2spring/sql-editor
9
6621452
''' Created on Feb 26, 2019 @author: xbbntni ''' import json from datetime import date from src.sqlite_executer.ConnectExecuteSqlite import SQLExecuter import os class Project(): def __init__(self, basePath=None, projectDirName=None, projectName=None, natures=list()): self.basePath = basePath se...
''' Created on Feb 26, 2019 @author: xbbntni ''' import json from datetime import date from src.sqlite_executer.ConnectExecuteSqlite import SQLExecuter import os class Project(): def __init__(self, basePath=None, projectDirName=None, projectName=None, natures=list()): self.basePath = basePath se...
en
0.526662
Created on Feb 26, 2019 @author: xbbntni # self.projectPath = os.path.join(basePath, projectDirName) # directory path in system # java, javascript, python # self.createdOn = createdOn # def serialize(obj): # """JSON serializer for objects not serializable by default json code""" # # if isinsta...
2.535485
3
project/GroundFloor.py
louay-rouabeh/Energy-Management-Live-Dashboard
0
6621453
import dash_core_components as dcc import dash_html_components as html import pandas as pd from dash.dependencies import Output, Input from app import app from dash_extensions import Download from dash_extensions.snippets import send_data_frame ground = pd.read_excel("consumption.xlsx", "Sheet1") content0 = html.Div(...
import dash_core_components as dcc import dash_html_components as html import pandas as pd from dash.dependencies import Output, Input from app import app from dash_extensions import Download from dash_extensions.snippets import send_data_frame ground = pd.read_excel("consumption.xlsx", "Sheet1") content0 = html.Div(...
none
1
2.758678
3
test/py_orchestrator/test_stage.py
abhinav-kumar-thakur/orchestrator
0
6621454
from py_orchestrator.stage import Stage class Adder(Stage): def perform(self, state): return self.configs['a'] + self.configs['b'] class TestStage: def test_run(self): configs = {'a': 1, 'b': 2} assert Adder(configs).perform(None) == 3
from py_orchestrator.stage import Stage class Adder(Stage): def perform(self, state): return self.configs['a'] + self.configs['b'] class TestStage: def test_run(self): configs = {'a': 1, 'b': 2} assert Adder(configs).perform(None) == 3
none
1
2.715396
3
app.py
Healthedata1/pubsub-endpoint
0
6621455
<reponame>Healthedata1/pubsub-endpoint<filename>app.py # A very simple Flask app to get started with using # FHIR Subscriptions # This is a reciever for the FHIR R4 Server URL (https://subscriptions.argo.run/) # with an ednpoint = "http://healthedatainc2.pythonanywhere.com/webhook" # It just saves the subscription noti...
# A very simple Flask app to get started with using # FHIR Subscriptions # This is a reciever for the FHIR R4 Server URL (https://subscriptions.argo.run/) # with an ednpoint = "http://healthedatainc2.pythonanywhere.com/webhook" # It just saves the subscription notification data to a flat csv file "data.csv" # to initi...
en
0.529515
# A very simple Flask app to get started with using # FHIR Subscriptions # This is a reciever for the FHIR R4 Server URL (https://subscriptions.argo.run/) # with an ednpoint = "http://healthedatainc2.pythonanywhere.com/webhook" # It just saves the subscription notification data to a flat csv file "data.csv" # to initi...
2.498161
2
example_snippets/multimenus_snippets/Snippets/SciPy/Special functions/Orthogonal polynomials/laguerre Coefficients of the $n$th order Laguerre polynoimal, $L_n(x)$.py
kuanpern/jupyterlab-snippets-multimenus
0
6621456
special.laguerre(n[, monic])
special.laguerre(n[, monic])
none
1
1.134404
1
website/drawquest/management/commands/initialize_qotd.py
bopopescu/drawquest-web
19
6621457
import datetime from django.core.management.base import BaseCommand from canvas.notifications.actions import Actions from drawquest import knobs, economy from drawquest.apps.quests.models import Quest, ScheduledQuest class Command(BaseCommand): args = '' help = '' def handle(self, *args, **options): ...
import datetime from django.core.management.base import BaseCommand from canvas.notifications.actions import Actions from drawquest import knobs, economy from drawquest.apps.quests.models import Quest, ScheduledQuest class Command(BaseCommand): args = '' help = '' def handle(self, *args, **options): ...
none
1
2.241616
2
idgraph/__init__.py
jbn/idgraph
2
6621458
<reponame>jbn/idgraph # -*- coding: utf-8 -*- import argparse import json import os import requests import shlex import sys from IPython.display import Markdown JINJA2_ENABLED = True try: import jinja2 except ImportError: # pragma: no cover JINJA2_ENABLED = False JMESPATH_ENABLED = True try: import jme...
# -*- coding: utf-8 -*- import argparse import json import os import requests import shlex import sys from IPython.display import Markdown JINJA2_ENABLED = True try: import jinja2 except ImportError: # pragma: no cover JINJA2_ENABLED = False JMESPATH_ENABLED = True try: import jmespath except ImportErr...
en
0.878098
# -*- coding: utf-8 -*- # pragma: no cover # pragma: no cover <NAME> # The FileSystemLoader should operate in the current working directory. # By assumption, extended jinja templates aren't temporary files -- # the user wrote them by hand. They are part of code you would want in # your repository! # The final template ...
2.334485
2
tests/test_charm.py
xavpaice/lma-proxy-operator
0
6621459
# Copyright 2021 Canonical # See LICENSE file for licensing details. # # Learn more about testing at: https://juju.is/docs/sdk/testing import unittest from charm import LMAProxyCharm from ops.model import ActiveStatus, BlockedStatus from ops.testing import Harness class LMAProxyCharmTest(unittest.TestCase): def...
# Copyright 2021 Canonical # See LICENSE file for licensing details. # # Learn more about testing at: https://juju.is/docs/sdk/testing import unittest from charm import LMAProxyCharm from ops.model import ActiveStatus, BlockedStatus from ops.testing import Harness class LMAProxyCharmTest(unittest.TestCase): def...
en
0.628941
# Copyright 2021 Canonical # See LICENSE file for licensing details. # # Learn more about testing at: https://juju.is/docs/sdk/testing
1.937857
2
src/robotec_sensor_processing/devices/daily_bms.py
robotec-ua/robotec_sensor_processing
0
6621460
<filename>src/robotec_sensor_processing/devices/daily_bms.py<gh_stars>0 # -*- coding: utf-8 -*- """ Class DailyBMS The class is dedicated to provide a functionality of Daily BMS (Battery Management System) to control battery status. """ from .bms import GenericBMS class DailyBMS(GenericBMS): """ Constructo...
<filename>src/robotec_sensor_processing/devices/daily_bms.py<gh_stars>0 # -*- coding: utf-8 -*- """ Class DailyBMS The class is dedicated to provide a functionality of Daily BMS (Battery Management System) to control battery status. """ from .bms import GenericBMS class DailyBMS(GenericBMS): """ Constructo...
en
0.833888
# -*- coding: utf-8 -*- Class DailyBMS The class is dedicated to provide a functionality of Daily BMS (Battery Management System) to control battery status. Constructor. Delegates the parameters to the superclass. Calculating the overall value of voltage. The method opens the serial port, reads and verifies data ...
3.257563
3
Codewars/8kyu/fix-the-bugs-syntax-my-first-kata/Python/solution1.py
RevansChen/online-judge
7
6621461
<reponame>RevansChen/online-judge # Python - 2.7.6 def my_first_kata(a, b): if (type(a) != int) or (type(b) != int): return False else: return a % b + b % a
# Python - 2.7.6 def my_first_kata(a, b): if (type(a) != int) or (type(b) != int): return False else: return a % b + b % a
en
0.123735
# Python - 2.7.6
3.501208
4
test/test_dada_fildb.py
loostrum/psrdada_filterbankdb
0
6621462
<filename>test/test_dada_fildb.py import os import unittest import time import multiprocessing as mp import numpy as np from psrdada import Reader, Writer from dada_fildb import dada_fildb from dada_fildb.sigproc import SigprocFile class TestDadaFildb(unittest.TestCase): def setUp(self): """ Se...
<filename>test/test_dada_fildb.py import os import unittest import time import multiprocessing as mp import numpy as np from psrdada import Reader, Writer from dada_fildb import dada_fildb from dada_fildb.sigproc import SigprocFile class TestDadaFildb(unittest.TestCase): def setUp(self): """ Se...
en
0.74257
Set configuration, create filterbank files Create a test filterbank file :return: path to file, pointer to file # add some data # data is increasing values in time and freq in each page, multiplied by page and beam index (1-based) Create a PSRDADA ringbuffer :return: Remove any remaining buffers and fil...
2.365953
2
nova3/engines/skytorrents.py
chr0nu5/qBittorrent-Plugins-Easy-Install
0
6621463
# -*- coding: utf-8 -*- #VERSION: 2.0 #AUTHORS: <NAME> (<EMAIL>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. #...
# -*- coding: utf-8 -*- #VERSION: 2.0 #AUTHORS: <NAME> (<EMAIL>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. #...
en
0.81361
# -*- coding: utf-8 -*- #VERSION: 2.0 #AUTHORS: <NAME> (<EMAIL>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. #...
2.597398
3
__init__.py
stobinaator/virtual-assistant
0
6621464
# -*- coding: utf-8 -*- from __future__ import print_function import requests import json import datetime import pickle import os.path import webbrowser import random import wikipedia import time import os from time import ctime from configparser import ConfigParser import speech_recognition as sr from gtts import gT...
# -*- coding: utf-8 -*- from __future__ import print_function import requests import json import datetime import pickle import os.path import webbrowser import random import wikipedia import time import os from time import ctime from configparser import ConfigParser import speech_recognition as sr from gtts import gT...
en
0.799388
# -*- coding: utf-8 -*- #Read config.ini file # accessing information from config.ini Shows basic usage of the Google Calendar API. Prints the start and name of the next 10 events on the user's calendar. # The file token.pickle stores the user's access and refresh tokens, and is # created automatically when the aut...
3.073953
3
whatismyip.py
MaxBrady/whatismyip
0
6621465
#!/usr/bin/python3 import os ip = os.getenv('REMOTE_ADDR') site_title = "Max's Test Site" print('Content-Type: text/html\n\n') print('') # Print Header print('<html>') print('<head>') print('<title>%s</title>' % site_title) print('</head>') print('<body>') print("<b>Max's IP Page</b>") print('My ip adress is %s...
#!/usr/bin/python3 import os ip = os.getenv('REMOTE_ADDR') site_title = "Max's Test Site" print('Content-Type: text/html\n\n') print('') # Print Header print('<html>') print('<head>') print('<title>%s</title>' % site_title) print('</head>') print('<body>') print("<b>Max's IP Page</b>") print('My ip adress is %s...
fr
0.163132
#!/usr/bin/python3 # Print Header
2.411081
2
code/chapter_04/listing_04_10.py
guinslym/python_earth_science_book
80
6621466
import pandas as pd import matplotlib.pyplot as plt my_dataset = pd.read_excel( 'Smith_glass_post_NYT_data.xlsx', sheet_name='Supp_traces') my_dataset1 = my_dataset[my_dataset.Epoch == 'one'] my_dataset2 = my_dataset[my_dataset.Epoch == 'two'] fig = plt.figure() ax1 = fig.add_subplot(2, 1, 1) ax1.scatter(my_data...
import pandas as pd import matplotlib.pyplot as plt my_dataset = pd.read_excel( 'Smith_glass_post_NYT_data.xlsx', sheet_name='Supp_traces') my_dataset1 = my_dataset[my_dataset.Epoch == 'one'] my_dataset2 = my_dataset[my_dataset.Epoch == 'two'] fig = plt.figure() ax1 = fig.add_subplot(2, 1, 1) ax1.scatter(my_data...
none
1
2.859349
3
webRoot/patric/static/generateSitemapIndex.py
PATRIC3/patric3_website
6
6621467
<gh_stars>1-10 #!/usr/bin/python import os import sys import datetime # setting default encoding to utf-8 reload(sys) sys.setdefaultencoding("UTF-8") outfile = open("sitemapindex.xml", "wb") print >>outfile, """<?xml version="1.0" encoding="UTF-8"?> <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">"...
#!/usr/bin/python import os import sys import datetime # setting default encoding to utf-8 reload(sys) sys.setdefaultencoding("UTF-8") outfile = open("sitemapindex.xml", "wb") print >>outfile, """<?xml version="1.0" encoding="UTF-8"?> <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">""" # read dire...
en
0.181248
#!/usr/bin/python # setting default encoding to utf-8 <?xml version="1.0" encoding="UTF-8"?> <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> # read directory listing <sitemap> <loc>http://patricbrc.org/patric/static/sitemaps/%s</loc> <lastmod>%s</lastmod> </sitemap>
2.538384
3
profiles_api/permissions.py
Chau-Ngoc/profiles_project_api
0
6621468
from rest_framework.permissions import BasePermission, SAFE_METHODS class ProfileUpdatePermission(BasePermission): """Allow user to only update their own profile.""" def has_object_permission(self, request, view, obj) -> bool: """Check if user is trying to update their own profile.""" if requ...
from rest_framework.permissions import BasePermission, SAFE_METHODS class ProfileUpdatePermission(BasePermission): """Allow user to only update their own profile.""" def has_object_permission(self, request, view, obj) -> bool: """Check if user is trying to update their own profile.""" if requ...
en
0.962413
Allow user to only update their own profile. Check if user is trying to update their own profile. Allow users to only update their own status feeds.
2.768073
3
faimed3d/models/unet.py
KRoszyk/faimed3d
22
6621469
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/06d_models.unet.ipynb (unless otherwise specified). __all__ = ['ConvTranspose3D', 'UnetBlock3D', 'ResizeToOrig', 'DynamicUnet3D'] # Cell # export from fastai.basics import * from ..basics import * from fastai.vision.all import create_body, hook_outputs from torchvision....
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/06d_models.unet.ipynb (unless otherwise specified). __all__ = ['ConvTranspose3D', 'UnetBlock3D', 'ResizeToOrig', 'DynamicUnet3D'] # Cell # export from fastai.basics import * from ..basics import * from fastai.vision.all import create_body, hook_outputs from torchvision....
en
0.429098
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/06d_models.unet.ipynb (unless otherwise specified). # Cell # export # Cell # Cell # layers[0].weight.data.copy_(icnr_init(layers[0].weight.data)) # Cell # Cell # Cell #apply_init(nn.Sequential(layers[2]), init)
1.809362
2
src/ntopng_constants.py
samuelesabella/Detecting-network-anomalies-using-the-feature-space-latent-representation
1
6621470
<reponame>samuelesabella/Detecting-network-anomalies-using-the-feature-space-latent-representation import numpy as np import logging import copy from collections import defaultdict # ----- ----- NDPI ----- ----- # # ----- ----- ---- ----- ----- # NDPI_DEFAULTS = { "unknown": "unspecified", "ftp_...
import numpy as np import logging import copy from collections import defaultdict # ----- ----- NDPI ----- ----- # # ----- ----- ---- ----- ----- # NDPI_DEFAULTS = { "unknown": "unspecified", "ftp_control": "download-filetransfer-filesharing", "pop3": "email", "s...
en
0.40538
# ----- ----- NDPI ----- ----- # # ----- ----- ---- ----- ----- # https://www.reddit.com/r/Python/comments/27crqg/making_defaultdict_create_defaults_that_are_a/ # base class doesn't get a factory # save f(x) # called when a default needed # calculate default value # and install it in the dict # ----- ----- FEATURES ---...
1.716633
2
Bangu/Semana 5/Exemplo013/main.py
profoswaldo/Unisuam_2022-1
2
6621471
# numero1 = 6 # numero2 = 10 # numero3 = 4 numeros = [6, 10, 4] # print(numeros[0]) # print(numeros[1]) # print(numeros[2]) for i in range(3): print(numeros[i])
# numero1 = 6 # numero2 = 10 # numero3 = 4 numeros = [6, 10, 4] # print(numeros[0]) # print(numeros[1]) # print(numeros[2]) for i in range(3): print(numeros[i])
it
0.411001
# numero1 = 6 # numero2 = 10 # numero3 = 4 # print(numeros[0]) # print(numeros[1]) # print(numeros[2])
3.899752
4
openff/cli/get_conformer_energies.py
openforcefield/openff-cli
0
6621472
<reponame>openforcefield/openff-cli<gh_stars>0 import argparse from typing import List from openforcefield.topology import Molecule from openforcefield.utils.toolkits import ToolkitRegistry from simtk import unit from openff.cli.core import ( _build_simulation, _get_conformer_data, _get_forcefield, _g...
import argparse from typing import List from openforcefield.topology import Molecule from openforcefield.utils.toolkits import ToolkitRegistry from simtk import unit from openff.cli.core import ( _build_simulation, _get_conformer_data, _get_forcefield, _get_rms_two_conformers, _minimize_conformer,...
en
0.892721
# This is duplicated from generate_conformers
2.39362
2
hello_genomics/main.py
chkra/calc_batch_correct
0
6621473
<filename>hello_genomics/main.py<gh_stars>0 #!/usr/bin/env python # coding: utf-8 ''' Combat batch correction app for FASTGenomics ''' import json import pathlib import random import csv import jinja2 import logging import enum import pandas as pd import numpy as np import matplotlib matplotlib.use(...
<filename>hello_genomics/main.py<gh_stars>0 #!/usr/bin/env python # coding: utf-8 ''' Combat batch correction app for FASTGenomics ''' import json import pathlib import random import csv import jinja2 import logging import enum import pandas as pd import numpy as np import matplotlib matplotlib.use(...
en
0.602794
#!/usr/bin/env python # coding: utf-8 Combat batch correction app for FASTGenomics # initialize logging # set paths to jinja2-templates for summary.md etc. # @todo: this is horrible on so many levels ... # BATCH = '_generated_batch*Text' # @todo: tidy up # genes_path = fg_io.get_input_path('genes_data_input') # combat ...
2.174983
2
user.py
Emmanuel687/PassWord-Locker-App
0
6621474
class User: """ creates new user instances """ pass user_array = [] def __init__(self,fullName,email,mobileNumber): self.fullName = fullName self.email = email self.mobileNumber = mobileNumber def saveUserDetails(self): User.user_array.append(self) @c...
class User: """ creates new user instances """ pass user_array = [] def __init__(self,fullName,email,mobileNumber): self.fullName = fullName self.email = email self.mobileNumber = mobileNumber def saveUserDetails(self): User.user_array.append(self) @c...
en
0.711728
creates new user instances
3.11604
3
pt/shared.py
fstraw/django-pt
0
6621475
DEPARTMENTS = ( ('Dept 1', 'Dept 1'), ('Dept 2', 'Dept 2'), ('Dept 3', 'Dept 3'), ('Dept 4', 'Dept 4'), ('Dept 5', 'Dept 5'), ) EMPLOYEES = ( ('Employee 1', 'Employee 1'), ('Employee 2', 'Employee 2'), ('Employee 3', 'Employee 3'), ('Employee 4', 'Employee 4'), ('Employee 5', 'Em...
DEPARTMENTS = ( ('Dept 1', 'Dept 1'), ('Dept 2', 'Dept 2'), ('Dept 3', 'Dept 3'), ('Dept 4', 'Dept 4'), ('Dept 5', 'Dept 5'), ) EMPLOYEES = ( ('Employee 1', 'Employee 1'), ('Employee 2', 'Employee 2'), ('Employee 3', 'Employee 3'), ('Employee 4', 'Employee 4'), ('Employee 5', 'Em...
none
1
1.535332
2
chat/utils.py
lorenzoconcas/CheChat
0
6621476
# contiene funzioni utili per le view e per il db def json_element(dataora, contenuto, sent, mittente): # trasforma i dati del messaggio in una linea json da spedire al client return '{"time":"' + dataora.strftime("%Y-%m-%d %H:%M:%S") + '", "content":"' \ + contenuto + '", "sent":"' + str(sent) + '...
# contiene funzioni utili per le view e per il db def json_element(dataora, contenuto, sent, mittente): # trasforma i dati del messaggio in una linea json da spedire al client return '{"time":"' + dataora.strftime("%Y-%m-%d %H:%M:%S") + '", "content":"' \ + contenuto + '", "sent":"' + str(sent) + '...
it
0.970949
# contiene funzioni utili per le view e per il db # trasforma i dati del messaggio in una linea json da spedire al client
2.128399
2
linkedList/removeNthNodeFromEndOfList.py
G-MontaG/leetcode
1
6621477
<reponame>G-MontaG/leetcode # https://leetcode.com/problems/remove-nth-node-from-end-of-list/ class Solution: def removeNthFromEnd(self, head: ListNode, n: int) -> ListNode: fast = slow = head for _ in range(n): fast = fast.next if not fast: return head.next w...
# https://leetcode.com/problems/remove-nth-node-from-end-of-list/ class Solution: def removeNthFromEnd(self, head: ListNode, n: int) -> ListNode: fast = slow = head for _ in range(n): fast = fast.next if not fast: return head.next while fast.next: ...
en
0.625186
# https://leetcode.com/problems/remove-nth-node-from-end-of-list/
3.55531
4
gh.py
mnzr/json-scraper
0
6621478
<reponame>mnzr/json-scraper<filename>gh.py #!/usr/bin/env python """Script to get Github info using API""" import requests # Add any number of usernames here users = ['google', 'facebook', 'apache'] url = "https://api.github.com/users/" # Which JSON properties we want to catch properties = ['login', 'id', 'html_url',...
#!/usr/bin/env python """Script to get Github info using API""" import requests # Add any number of usernames here users = ['google', 'facebook', 'apache'] url = "https://api.github.com/users/" # Which JSON properties we want to catch properties = ['login', 'id', 'html_url', 'public_repos', 'created_at'] for user in...
en
0.736748
#!/usr/bin/env python Script to get Github info using API # Add any number of usernames here # Which JSON properties we want to catch # make API url with Github username # take response from the url # conversion to human readable format
3.587639
4
crackers/MonoSubstitutionCracker.py
qpwoeirut/ClassicalCipherCracker
1
6621479
<filename>crackers/MonoSubstitutionCracker.py import random import string from typing import Type from ciphers.Cipher import Cipher from ciphers.MonoSubstitutionCipher import MonoSubstitutionCipher from crackers.ClimbingCracker import ClimbingCracker from crackers.SubstitutionCracker import SubstitutionCracker class...
<filename>crackers/MonoSubstitutionCracker.py import random import string from typing import Type from ciphers.Cipher import Cipher from ciphers.MonoSubstitutionCipher import MonoSubstitutionCipher from crackers.ClimbingCracker import ClimbingCracker from crackers.SubstitutionCracker import SubstitutionCracker class...
en
0.888641
# TODO maybe make keys lists or tuples instead?
3.141931
3
tests/examples/bankfile_test.py
kalaspuff/stockholm
15
6621480
from typing import List from stockholm import Money, get_currency from stockholm.exceptions import CurrencyMismatchError example_content = """ 000000000000001 388461894717 OLDSCHOOLFINTECHSOLUTIONS004711000003 471846827769 9173689 9999000192000000272947 USD - 3336282671946 471846827769 557274901 1000824...
from typing import List from stockholm import Money, get_currency from stockholm.exceptions import CurrencyMismatchError example_content = """ 000000000000001 388461894717 OLDSCHOOLFINTECHSOLUTIONS004711000003 471846827769 9173689 9999000192000000272947 USD - 3336282671946 471846827769 557274901 1000824...
en
0.182762
000000000000001 388461894717 OLDSCHOOLFINTECHSOLUTIONS004711000003 471846827769 9173689 9999000192000000272947 USD - 3336282671946 471846827769 557274901 1000824618000272944 USD 020000047284999 484761849926 4444205 37000116301000072944 USD - 3336282671947 990000000000001X00000399300001132919...
3.141073
3
dqc/rule/basic/rows_count_mismatch_and_another.py
Indexical-Metrics-Measure-Advisory/watchmen-dqc
1
6621481
from pandas import DataFrame from watchmen_boot.storage.model.data_source import DataSource from dqc.model.analysis.monitor_rule import MonitorRule from dqc.rule.utils.date_utils import get_date_range from dqc.rule.utils.topic_utils import data_is_empty, table_not_exist, init_topic_rule_result from dqc.sdk.admin.admin...
from pandas import DataFrame from watchmen_boot.storage.model.data_source import DataSource from dqc.model.analysis.monitor_rule import MonitorRule from dqc.rule.utils.date_utils import get_date_range from dqc.rule.utils.topic_utils import data_is_empty, table_not_exist, init_topic_rule_result from dqc.sdk.admin.admin...
none
1
2.281343
2
install/core/python/tank/util/system_settings.py
JoanAzpeitia/lp_sg
0
6621482
# Copyright (c) 2017 Shotgun Software Inc. # # CONFIDENTIAL AND PROPRIETARY # # This work is provided "AS IS" and subject to the Shotgun Pipeline Toolkit # Source Code License included in this distribution package. See LICENSE. # By accessing, using, copying or modifying this work you indicate your # agreement to the S...
# Copyright (c) 2017 Shotgun Software Inc. # # CONFIDENTIAL AND PROPRIETARY # # This work is provided "AS IS" and subject to the Shotgun Pipeline Toolkit # Source Code License included in this distribution package. See LICENSE. # By accessing, using, copying or modifying this work you indicate your # agreement to the S...
en
0.811014
# Copyright (c) 2017 Shotgun Software Inc. # # CONFIDENTIAL AND PROPRIETARY # # This work is provided "AS IS" and subject to the Shotgun Pipeline Toolkit # Source Code License included in this distribution package. See LICENSE. # By accessing, using, copying or modifying this work you indicate your # agreement to the S...
1.975871
2
Scrapy/Scrapy_project/settings.py
PPjaisri/Senior-project
0
6621483
# Scrapy settings for Scrapy_project project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # https://docs.scrapy.org/en/latest/topics/settings.html # https://docs.scrapy.org/en/latest/topics/downloader-mid...
# Scrapy settings for Scrapy_project project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # https://docs.scrapy.org/en/latest/topics/settings.html # https://docs.scrapy.org/en/latest/topics/downloader-mid...
en
0.642504
# Scrapy settings for Scrapy_project project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # https://docs.scrapy.org/en/latest/topics/settings.html # https://docs.scrapy.org/en/latest/topics/downloader-mid...
1.676047
2
pyTCPClientServer/cli_envelop_thread_after_accept.py
a2gs/pythonStudy
0
6621484
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Social Network for Programmers and Developers # from: https://morioh.com/p/1d5fd6c04b58 import socket HEADER = 64 PORT = 5050 FORMAT = 'utf-8' DISCONNECT_MESSAGE = "!DISCONNECT" #SERVER = "192.168.1.26" SERVER = "127.0.1.1" ADDR = (SERVER, PORT) client = socket.socke...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Social Network for Programmers and Developers # from: https://morioh.com/p/1d5fd6c04b58 import socket HEADER = 64 PORT = 5050 FORMAT = 'utf-8' DISCONNECT_MESSAGE = "!DISCONNECT" #SERVER = "192.168.1.26" SERVER = "127.0.1.1" ADDR = (SERVER, PORT) client = socket.socke...
en
0.64769
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Social Network for Programmers and Developers # from: https://morioh.com/p/1d5fd6c04b58 #SERVER = "192.168.1.26"
3.248038
3
coffeeBot.py
nickmachnik/CoffeeBuddyBot
0
6621485
<filename>coffeeBot.py #!/usr/bin/env python import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText import json import datetime import time def main(): with open("./config.json", 'r') as fin: config = json.load(fin) config["round"] = config["round"] % (len(...
<filename>coffeeBot.py #!/usr/bin/env python import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText import json import datetime import time def main(): with open("./config.json", 'r') as fin: config = json.load(fin) config["round"] = config["round"] % (len(...
ja
0.145505
#!/usr/bin/env python # bot._send_test("<EMAIL>") # bot._send_test("<EMAIL>")
2.837836
3
SBR/Driver.py
Bobtron/ArbFinder
0
6621486
<reponame>Bobtron/ArbFinder<gh_stars>0 from pysbr import * import pendulum from SBR.League import League from pprint import pprint start = pendulum.now().add(days=1)#.strftime('%Y-%m-%d') end = pendulum.now().add(days=8)#.strftime('%Y-%m-%d') sb = Sportsbook() # sb_ids = sb.ids(['Pinnacle', 'Bovada', 'Bookmaker', 'B...
from pysbr import * import pendulum from SBR.League import League from pprint import pprint start = pendulum.now().add(days=1)#.strftime('%Y-%m-%d') end = pendulum.now().add(days=8)#.strftime('%Y-%m-%d') sb = Sportsbook() # sb_ids = sb.ids(['Pinnacle', 'Bovada', 'Bookmaker', 'BetOnline', 'Heritage Sports', 'BetOnlin...
en
0.330259
#.strftime('%Y-%m-%d') #.strftime('%Y-%m-%d') # sb_ids = sb.ids(['Pinnacle', 'Bovada', 'Bookmaker', 'BetOnline', 'Heritage Sports', 'BetOnline', 'GTbets', 'YouWager', # 'Intertops', 'JustBet', 'WagerWeb', 'SportsBetting']) # pp = pprint.PrettyPrinter(indent=4) # # print(end) # # nfl = NFL() # epl = EPL...
2.484794
2
structures/migrations/0001_initial.py
buahaha/aa-structures
0
6621487
# Generated by Django 2.2.5 on 2019-11-21 03:27 import multiselectfield.db.fields import django.core.validators import django.db.models.deletion from django.db import migrations, models import structures.models class Migration(migrations.Migration): initial = True dependencies = [ ("eveonline", "...
# Generated by Django 2.2.5 on 2019-11-21 03:27 import multiselectfield.db.fields import django.core.validators import django.db.models.deletion from django.db import migrations, models import structures.models class Migration(migrations.Migration): initial = True dependencies = [ ("eveonline", "...
en
0.755631
# Generated by Django 2.2.5 on 2019-11-21 03:27
1.773986
2
p252.py
brandonpelfrey/project-euler
0
6621488
<filename>p252.py def random_points(max_n): S = {0: 290797} for n in xrange(2*max_n): S[n+1] = (S[n] ** 2) % 50515093 T = {} for key, val in S.items(): T[key] = (val % 2000) - 1000 return map(lambda k: (T[2*k-1], T[2*k]), xrange(1, max_n+1) ) n_points = 500 points = random_points(n_points)
<filename>p252.py def random_points(max_n): S = {0: 290797} for n in xrange(2*max_n): S[n+1] = (S[n] ** 2) % 50515093 T = {} for key, val in S.items(): T[key] = (val % 2000) - 1000 return map(lambda k: (T[2*k-1], T[2*k]), xrange(1, max_n+1) ) n_points = 500 points = random_points(n_points)
none
1
2.776737
3
skutil/grid_search.py
tgsmith61591/pynorm
38
6621489
<gh_stars>10-100 from __future__ import division, absolute_import, print_function import sklearn from .base import overrides from .utils.fixes import (_validate_X, _validate_y, _check_param_grid, _as_numpy, _CVScoreTuple) __all__ = [ 'GridSearchCV', 'RandomizedSearchCV' ] # deprecati...
from __future__ import division, absolute_import, print_function import sklearn from .base import overrides from .utils.fixes import (_validate_X, _validate_y, _check_param_grid, _as_numpy, _CVScoreTuple) __all__ = [ 'GridSearchCV', 'RandomizedSearchCV' ] # deprecation in sklearn 0.1...
en
0.701465
# deprecation in sklearn 0.18 Exhaustive search over specified parameter values for an estimator. This class is a skutil fix of the sklearn 0.18 GridSearchCV module, and allows use with SelectiveMixins and other skutil classes that don't interact so kindly with other sklearn 0.18 structures (i.e...
2.273548
2
Driver.py
Thigos/Detector-de-Carros-OpenCV
2
6621490
<filename>Driver.py import os import cv2 import pyautogui import mahotas #Local do video video_original = cv2.VideoCapture('teste.wmv') #O local aonde os arquivos estão diret = os.path.dirname(os.path.abspath(__file__)) while True: #Frame do video ret, frame = video_original.read() #Converte para escala...
<filename>Driver.py import os import cv2 import pyautogui import mahotas #Local do video video_original = cv2.VideoCapture('teste.wmv') #O local aonde os arquivos estão diret = os.path.dirname(os.path.abspath(__file__)) while True: #Frame do video ret, frame = video_original.read() #Converte para escala...
pt
0.988454
#Local do video #O local aonde os arquivos estão #Frame do video #Converte para escalas de cinza #Suaviza a imagem #Utiliza o método otsu para transformar a imagem em binário 0,1 (preto ou branco) #Copia a imagem em escalas de cinza #Calcula áreas em que há um pico de intensidade e transforma em branco (255) ou preto (...
2.979019
3
Py exercises/UnderstandingScopingAndNestedFunctions.py
arvindkarir/python-pandas-code
0
6621491
#something to understanding scoping and nested functions def f(x): def g(): x = 'abc' print 'function x=', x def h(): z = x print 'hz =', z x = x + 1 print 'x plus 1 =', x h() g() print 'gx=', x return g x = 3 z = f(x) print 'zx=', x
#something to understanding scoping and nested functions def f(x): def g(): x = 'abc' print 'function x=', x def h(): z = x print 'hz =', z x = x + 1 print 'x plus 1 =', x h() g() print 'gx=', x return g x = 3 z = f(x) print 'zx=', x
en
0.839422
#something to understanding scoping and nested functions
4.000284
4
DNA2VEC/model.py
NaiveTom/all_model
0
6621492
<gh_stars>0 from keras import initializers from tensorflow.keras.layers import Layer, InputSpec from keras import backend as K from keras.layers import * from keras.models import * from keras.optimizers import Adam from keras.regularizers import l1, l2 import keras import numpy as np MAX_LEN_en = 3000 MAX_LEN_pr = 2...
from keras import initializers from tensorflow.keras.layers import Layer, InputSpec from keras import backend as K from keras.layers import * from keras.models import * from keras.optimizers import Adam from keras.regularizers import l1, l2 import keras import numpy as np MAX_LEN_en = 3000 MAX_LEN_pr = 2000 NB_WORDS...
en
0.325064
#################### # ACGT #################### # self.init = initializers.get('normal') # size of x :[batch_size, sel_len, attention_dim] # size of u :[batch_size, attention_dim] # uit = tanh(xW+b) # Cast the mask to floatX to avoid float64 upcasting in theano # self.init = initializers.get('normal') # size of x :[ba...
2.463606
2
kong_admin/sync/apis.py
peterayeni/django-kong-admin
2
6621493
<filename>kong_admin/sync/apis.py # -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function from kong.exceptions import ConflictError from kong_admin.models import APIReference, PluginConfigurationReference, PluginConfigurationField from .base import KongProxySyncEngine class APISyncEngine(Kong...
<filename>kong_admin/sync/apis.py # -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function from kong.exceptions import ConflictError from kong_admin.models import APIReference, PluginConfigurationReference, PluginConfigurationField from .base import KongProxySyncEngine class APISyncEngine(Kong...
en
0.769321
# -*- coding: utf-8 -*-
1.907779
2
second/pytorch/models/__init__.py
yukke42/SECOND
0
6621494
<gh_stars>0 from . import net_multi_head
from . import net_multi_head
none
1
1.033595
1
Application/system/events_monitor.py
Unicorn-Dev/Minimal.io
0
6621495
import sys from Application.system.game_functions import * import Application.system.game_functions as gf settings = None screen = None stats = None def set_global_var(setts, scr, statistics): global settings global screen global stats settings = setts screen = scr stats = statistics class...
import sys from Application.system.game_functions import * import Application.system.game_functions as gf settings = None screen = None stats = None def set_global_var(setts, scr, statistics): global settings global screen global stats settings = setts screen = scr stats = statistics class...
none
1
2.454015
2
python/examples/synchronous-scraper.py
Fe-Nick-S/experiments
2
6621496
<filename>python/examples/synchronous-scraper.py from urllib.request import Request, urlopen from time import time SITES = [ "http://news.ycombinator.com/", "https://www.yahoo.com/", "http://salmonofcapistrano.com/", "https://mail.ru/" ] def find_size(url): req = Request(url) with urlopen(r...
<filename>python/examples/synchronous-scraper.py from urllib.request import Request, urlopen from time import time SITES = [ "http://news.ycombinator.com/", "https://www.yahoo.com/", "http://salmonofcapistrano.com/", "https://mail.ru/" ] def find_size(url): req = Request(url) with urlopen(r...
none
1
3.251456
3
scripts/experiments/performance.py
jjbrophy47/tree_deletion
1
6621497
""" This experiment tests predictive performance. """ import os import sys import time import argparse import resource from datetime import datetime import numpy as np import pandas as pd from sklearn.model_selection import GridSearchCV from sklearn.model_selection import StratifiedShuffleSplit from sklearn.model_sele...
""" This experiment tests predictive performance. """ import os import sys import time import argparse import resource from datetime import datetime import numpy as np import pandas as pd from sklearn.model_selection import GridSearchCV from sklearn.model_selection import StratifiedShuffleSplit from sklearn.model_sele...
en
0.650919
This experiment tests predictive performance. Return the appropriate model. Return the appropriate model. Chooses the set of hyperparameters whose `mean_fit_score` is within `tol` of the best `mean_fit_score` and has the lowest `mean_fit_time`. # filter the parameters with the highest performances # obtain data # d...
2.723881
3
lib/disco/task.py
pooya/disco
786
6621498
""" :mod:`disco.task` -- Disco Tasks ================================ This module defines objects for interfacing with :term:`tasks <task>` assigned by the master. """ import os, time from disco.compat import basestring, integer_types from disco import dPickle from disco.util import hexhash def jobdata(*objs): ...
""" :mod:`disco.task` -- Disco Tasks ================================ This module defines objects for interfacing with :term:`tasks <task>` assigned by the master. """ import os, time from disco.compat import basestring, integer_types from disco import dPickle from disco.util import hexhash def jobdata(*objs): ...
en
0.805024
:mod:`disco.task` -- Disco Tasks ================================ This module defines objects for interfacing with :term:`tasks <task>` assigned by the master. :return: :ref:`jobdata` needed for instantiating the :class:`disco.job.Job` on the node. Encapsulates the information specific to a particular :term:`task`...
2.423995
2
textcnn/model.py
bhsimon0810/text-classification
1
6621499
import tensorflow as tf import numpy as np class TextCNN(object): """ A CNN for text classification. Uses an embedding layer, followed by a convolutional, max-pooling and softmax layer. """ def __init__( self, sequence_length, num_class, vocab_size, embedding_s...
import tensorflow as tf import numpy as np class TextCNN(object): """ A CNN for text classification. Uses an embedding layer, followed by a convolutional, max-pooling and softmax layer. """ def __init__( self, sequence_length, num_class, vocab_size, embedding_s...
en
0.546746
A CNN for text classification. Uses an embedding layer, followed by a convolutional, max-pooling and softmax layer. # placeholders # embedding layer # with tf.device('/cpu:0'), tf.name_scope("embedding"): # self.embedding_matrix = tf.Variable( # tf.random_uniform([vocab_size, embedding_size], -1.0, 1.0...
3.196596
3
benchmark_primes.py
VadymTkachuk/prime-numbers
0
6621500
#!/usr/bin/python # -*- coding: utf-8 -*- # # Author: <NAME> # Date: 02.03.2019 # License: MIT # Purpose: This is a module for speed testing prime's module functions. import timeit import primes def run_test(): SETUP_CODE = ''' import primes import random import numpy as np # n = random.ran...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Author: <NAME> # Date: 02.03.2019 # License: MIT # Purpose: This is a module for speed testing prime's module functions. import timeit import primes def run_test(): SETUP_CODE = ''' import primes import random import numpy as np # n = random.ran...
en
0.623819
#!/usr/bin/python # -*- coding: utf-8 -*- # # Author: <NAME> # Date: 02.03.2019 # License: MIT # Purpose: This is a module for speed testing prime's module functions. import primes import random import numpy as np # n = random.randint(10000000, 100000000) # Making names of is_prime#() functions and testing them. # ...
3.311122
3
iguanas/rule_scoring/rule_scorer.py
Aditya-Kapadiya/Iguanas
0
6621501
<reponame>Aditya-Kapadiya/Iguanas<gh_stars>0 """ Generates scores for each rule in a set. Scaling functions can also be applied to the scores. """ from iguanas.rule_scoring.rule_scoring_methods import PerformanceScorer, LogRegScorer,\ RandomForestScorer from iguanas.utils.typing import PandasDataFrameType, PandasSe...
""" Generates scores for each rule in a set. Scaling functions can also be applied to the scores. """ from iguanas.rule_scoring.rule_scoring_methods import PerformanceScorer, LogRegScorer,\ RandomForestScorer from iguanas.utils.typing import PandasDataFrameType, PandasSeriesType from iguanas.rule_scoring.rule_score...
en
0.602884
Generates scores for each rule in a set. Scaling functions can also be applied to the scores. Generates rule scores using the rule binary columns and the target column. Parameters ---------- scoring_class : Union[PerformanceScorer, LogRegScorer, RandomForestScorer] The instantiated scoring class - ...
3.289587
3
examples/deposit.py
kaurifinance/python-sdk
0
6621502
<reponame>kaurifinance/python-sdk from kauripay.processing import KauriPay api_key = '' api_secret = '' host = '' pay = KauriPay(api_key=api_key, api_secret=api_secret, host=host) def generate_crypto_deposit_address(cryptocurrency='BTC', deposit_emai...
from kauripay.processing import KauriPay api_key = '' api_secret = '' host = '' pay = KauriPay(api_key=api_key, api_secret=api_secret, host=host) def generate_crypto_deposit_address(cryptocurrency='BTC', deposit_email='<EMAIL>', ...
en
0.832188
Generates a new deposit address for chosen cryptocurrency with custom callback_url for notifications :param cryptocurrency: cryptocurrency name :param deposit_email: user's email :param callback_url: url for order's status notifications :return: str type new deposit address Generates a new deposit a...
2.768093
3
services/arguments/arguments_service_base.py
ktodorov/eval-historical-texts
9
6621503
import argparse from typing import List, Dict from entities.custom_argument_parser import CustomArgumentParser from enums.evaluation_type import EvaluationType from enums.language import Language from enums.output_format import OutputFormat from enums.challenge import Challenge from enums.configuration import Config...
import argparse from typing import List, Dict from entities.custom_argument_parser import CustomArgumentParser from enums.evaluation_type import EvaluationType from enums.language import Language from enums.output_format import OutputFormat from enums.challenge import Challenge from enums.configuration import Config...
en
0.619166
Prints the arguments which the program was initialized with Returns an argument value from the list of registered arguments :param key: key of the argument :type key: str :raises LookupError: if no argument is found, lookup error will be raised :return: the argument value :rtype...
2.3475
2
algorithm/deep_learning/gradient3.py
kake777/python_sample
0
6621504
#勾配のグラフ import numpy as np import matplotlib.pylab as plt from mpl_toolkits.mplot3d import Axes3D from common_function import numerical_gradient, function_2 def tangent_line(f, x): d = numerical_gradient(f, x) print(d) y = f(x) - d*x return lambda t: d*t + y if __name__ == '__main__': x0 = np.aran...
#勾配のグラフ import numpy as np import matplotlib.pylab as plt from mpl_toolkits.mplot3d import Axes3D from common_function import numerical_gradient, function_2 def tangent_line(f, x): d = numerical_gradient(f, x) print(d) y = f(x) - d*x return lambda t: d*t + y if __name__ == '__main__': x0 = np.aran...
none
1
3.316455
3
pun/first/config.py
Unviray/pun
2
6621505
# Parent path to search for punfile.py PARENT_LEN = 2
# Parent path to search for punfile.py PARENT_LEN = 2
en
0.732154
# Parent path to search for punfile.py
1.15729
1
drf_auth/exceptions.py
TheArtling/django-drf-auth
0
6621506
"""Exceptions for the drf_auth app.""" class AccessTokenException(Exception): # pragma: nocover """ Raised when we could not get an app access token from Facebook. This can happen when our settings are wrong. Facebook will return a 400 response, but we don't want to show this to the user, because it...
"""Exceptions for the drf_auth app.""" class AccessTokenException(Exception): # pragma: nocover """ Raised when we could not get an app access token from Facebook. This can happen when our settings are wrong. Facebook will return a 400 response, but we don't want to show this to the user, because it...
en
0.868615
Exceptions for the drf_auth app. # pragma: nocover Raised when we could not get an app access token from Facebook. This can happen when our settings are wrong. Facebook will return a 400 response, but we don't want to show this to the user, because it is our own fault. We will raise this exception instead....
3.073008
3
lyapy/systems/system.py
vdorobantu/lyapy
36
6621507
<reponame>vdorobantu/lyapy<filename>lyapy/systems/system.py<gh_stars>10-100 """Base class for dynamical systems of the form x_dot = f(t, x).""" from scipy.integrate import solve_ivp class System: """Base class for dynamical systems of the form x_dot = f(t, x). Override dx. Let n be number of states. ...
"""Base class for dynamical systems of the form x_dot = f(t, x).""" from scipy.integrate import solve_ivp class System: """Base class for dynamical systems of the form x_dot = f(t, x). Override dx. Let n be number of states. """ def dx(self, t, x): """Evaluate state derivative at a time...
en
0.634002
Base class for dynamical systems of the form x_dot = f(t, x). Base class for dynamical systems of the form x_dot = f(t, x). Override dx. Let n be number of states. Evaluate state derivative at a time and state. Outputs a numpy array (n,). Inputs: Time, t: float State, x: nump...
3.518088
4
terkey.py
djunekz/terkey
0
6621508
import os from time import sleep a ='\033[92m' b ='\033[91m' c ='\033[0m' def setup(): try: os.mkdir('/data/data/com.termux/files/home/.termux') except: pass key = "extra-keys = [['ESC','/','-','HOME','UP','END','PGUP'],['TAB','CTRL','ALT','LEFT','DOWN','RIGHT','PGDN']]" open('/data/d...
import os from time import sleep a ='\033[92m' b ='\033[91m' c ='\033[0m' def setup(): try: os.mkdir('/data/data/com.termux/files/home/.termux') except: pass key = "extra-keys = [['ESC','/','-','HOME','UP','END','PGUP'],['TAB','CTRL','ALT','LEFT','DOWN','RIGHT','PGDN']]" open('/data/d...
id
0.511568
# ini cuma shortcut buat bantu para newbie # D J U N E K Z
2.011941
2
src/easy/real-fake/solutions/python/solution.py
rdtsc/codeeval-solutions
0
6621509
#!/usr/bin/env python3 import sys for line in sys.stdin: digits = [int(c) for c in line if c.isdigit()] tally = sum(n * 2 for n in digits[::2]) + sum(digits[1::2]) print('Fake' if tally % 10 else 'Real')
#!/usr/bin/env python3 import sys for line in sys.stdin: digits = [int(c) for c in line if c.isdigit()] tally = sum(n * 2 for n in digits[::2]) + sum(digits[1::2]) print('Fake' if tally % 10 else 'Real')
fr
0.221828
#!/usr/bin/env python3
3.334594
3
poly/app.py
entangle2giraffe/scikitlearn_demo
0
6621510
import matplotlib.pyplot as plt import numpy as np from sklearn.linear_model import LinearRegression from sklearn.metrics import r2_score, mean_squared_error, mean_absolute_error from sklearn.preprocessing import PolynomialFeatures import sys # Import the local module # The module import pandas and slicing dat...
import matplotlib.pyplot as plt import numpy as np from sklearn.linear_model import LinearRegression from sklearn.metrics import r2_score, mean_squared_error, mean_absolute_error from sklearn.preprocessing import PolynomialFeatures import sys # Import the local module # The module import pandas and slicing dat...
en
0.578102
# Import the local module # The module import pandas and slicing dataset # for specific country of the input of variable 'coa' # Read the table # Store the variable in cdf # Separate 80% for train dataset and rest as test dataset # Import Linear Regression model # Prompt the user for degree # Train dataset # Convert Li...
3.706198
4
pyds8k/exceptions.py
27149chen/pyds8k
7
6621511
<filename>pyds8k/exceptions.py ############################################################################## # Copyright 2019 IBM Corp. # # 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 # # ht...
<filename>pyds8k/exceptions.py ############################################################################## # Copyright 2019 IBM Corp. # # 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 # # ht...
en
0.750318
############################################################################## # Copyright 2019 IBM Corp. # # 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/LI...
2.332659
2
pyjac/loopy_utils/loopy_utils.py
stgeke/pyJac-v2
9
6621512
<reponame>stgeke/pyJac-v2<filename>pyjac/loopy_utils/loopy_utils.py from __future__ import print_function import logging import os import stat import re import six from string import Template # package imports import loopy as lp from loopy.target.c.c_execution import CPlusPlusCompiler import numpy as np import warnin...
from __future__ import print_function import logging import os import stat import re import six from string import Template # package imports import loopy as lp from loopy.target.c.c_execution import CPlusPlusCompiler import numpy as np import warnings try: import pyopencl as cl from pyopencl.tools import cl...
en
0.651991
# package imports # local imports Loads a code-generation platform from a file, and returns the corresponding :class:`loopy_options` Parameters ---------- codegen: str The user-specified code-generation platform yaml file Returns ------- :class:`loopy_options` The loaded pl...
1.928156
2
fbssdc/bpy.py
Eijebong/binjs-ref
391
6621513
<filename>fbssdc/bpy.py #!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import format import idl import opt import os import strings import subprocess import tempfile...
<filename>fbssdc/bpy.py #!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import format import idl import opt import os import strings import subprocess import tempfile...
en
0.847826
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # 1. Prepare destination directory # 2. Extract AST # 3. Encode # 4. Copy source file # FIXME: Make this a specific exce...
2.086848
2
lab03/book_registry/test_script.py
Boris-Barboris/rsoi
0
6621514
#!/usr/bin/python3 from app_book_registry.oauthclient import * from app_book_registry.book_registry_client import * from app_book_registry.rsoi_common import AlreadyExists import json import requests import logging import http.client http.client.HTTPConnection.debuglevel = 1 logging.basicConfig() logging.getLogger()...
#!/usr/bin/python3 from app_book_registry.oauthclient import * from app_book_registry.book_registry_client import * from app_book_registry.rsoi_common import AlreadyExists import json import requests import logging import http.client http.client.HTTPConnection.debuglevel = 1 logging.basicConfig() logging.getLogger()...
fr
0.386793
#!/usr/bin/python3
2.238985
2
Controllers/UI.py
DeerChen/LRCPlayer
0
6621515
''' Description: Author: Senkita Date: 2021-04-16 18:53:58 LastEditors: Senkita LastEditTime: 2021-04-16 20:48:53 ''' from pathlib import Path from typing import List from .Player import Player import os from random import shuffle class UI: def __init__(self) -> None: self.lrc_dir = Path(...
''' Description: Author: Senkita Date: 2021-04-16 18:53:58 LastEditors: Senkita LastEditTime: 2021-04-16 20:48:53 ''' from pathlib import Path from typing import List from .Player import Player import os from random import shuffle class UI: def __init__(self) -> None: self.lrc_dir = Path(...
en
0.44344
Description: Author: Senkita Date: 2021-04-16 18:53:58 LastEditors: Senkita LastEditTime: 2021-04-16 20:48:53
3.295915
3
cloudnet-package/trainer/utils.py
Windact/cloud_detection
0
6621516
<gh_stars>0 from tensorflow.keras import backend as K from tensorflow import keras smooth = 0.0000001 def jacc_coef(y_true, y_pred): y_true_f = K.flatten(y_true) y_pred_f = K.flatten(y_pred) intersection = K.sum(y_true_f * y_pred_f) return 1 - ((intersection + smooth) / (K.sum(y_true_f) + K.sum(y_pre...
from tensorflow.keras import backend as K from tensorflow import keras smooth = 0.0000001 def jacc_coef(y_true, y_pred): y_true_f = K.flatten(y_true) y_pred_f = K.flatten(y_pred) intersection = K.sum(y_true_f * y_pred_f) return 1 - ((intersection + smooth) / (K.sum(y_true_f) + K.sum(y_pred_f) - inter...
en
0.57163
It prints out the last used learning rate after each epoch (useful for resuming a training) original code: https://github.com/keras-team/keras/issues/7874#issuecomment-329347949 # works only when decay in optimizer is zero # t = K.cast(optimizer.iterations, K.floatx()) + 1 # lr_t = K.eval(optimizer.lr * (K.sqrt(1. ...
2.929758
3
Module6_HW/hw6_1_4.py
vladspirin/python_core
0
6621517
from random import randint list_1 = [] list_2 = [] numbers = [randint(-5, 5) for i in range(-5, 5)] for i in numbers: print(i) if i < 0: list_1.append(i) if i > 0: list_2.append(i) print(list_1) print(list_2)
from random import randint list_1 = [] list_2 = [] numbers = [randint(-5, 5) for i in range(-5, 5)] for i in numbers: print(i) if i < 0: list_1.append(i) if i > 0: list_2.append(i) print(list_1) print(list_2)
none
1
3.626039
4
export.py
jessedp/tut
4
6621518
import gevent import os import contextlib import shutil import socket import tempfile import logging from tqdm import tqdm import ffmpeg from tinydb import TinyDB, Query from config import built_ins from recording import Recording logger = logging.getLogger(__name__) def copy(id_list, args): total = len(id_l...
import gevent import os import contextlib import shutil import socket import tempfile import logging from tqdm import tqdm import ffmpeg from tinydb import TinyDB, Query from config import built_ins from recording import Recording logger = logging.getLogger(__name__) def copy(id_list, args): total = len(id_l...
en
0.896116
# TODO: put a X of Y somewhere near here # TODO: Whoops, now used this twice (search.py too) # shortcut for later # TODO: deal with pieces of the same recording (TMSID?) marked "finished" # ie, 2 portions (non-full) of the an episode # + just skip them (do this!) # + differentiate on recorded at the ...
2.525855
3
src/isle/memoize.py
chelseajohn/isle
2
6621519
r"""!\file \brief Utilities for memoizing function results. Memoization decorators let us compute expensive functions once and store the result, so that if the function is called again with the same arguments the result is just returned. """ import functools import inspect import typing import weakref from dataclass...
r"""!\file \brief Utilities for memoizing function results. Memoization decorators let us compute expensive functions once and store the result, so that if the function is called again with the same arguments the result is just returned. """ import functools import inspect import typing import weakref from dataclass...
en
0.816139
!\file \brief Utilities for memoizing function results. Memoization decorators let us compute expensive functions once and store the result, so that if the function is called again with the same arguments the result is just returned. ! Decorator that memoizes the result of a method call based on given arguments. ...
4.267141
4
src/lander/__init__.py
lsst-sqre/lander
2
6621520
"""HTML landing page generator for LSST PDF documentation deployed from Git to LSST the Docs. https://github.com/lsst-sqre/lander """ from pkg_resources import DistributionNotFound, get_distribution try: __version__ = get_distribution("lander").version except DistributionNotFound: # package is not installed ...
"""HTML landing page generator for LSST PDF documentation deployed from Git to LSST the Docs. https://github.com/lsst-sqre/lander """ from pkg_resources import DistributionNotFound, get_distribution try: __version__ = get_distribution("lander").version except DistributionNotFound: # package is not installed ...
en
0.77478
HTML landing page generator for LSST PDF documentation deployed from Git to LSST the Docs. https://github.com/lsst-sqre/lander # package is not installed
1.408901
1
examples/some_activity/tests.py
klausfmh/pypeman
6
6621521
<gh_stars>1-10 from pypeman.test import PypeTestCase # from pypeman.message import Message class MyChanTest(PypeTestCase): def test1_great_channel(self): """ Test example """ self.get_channel("periodic")
from pypeman.test import PypeTestCase # from pypeman.message import Message class MyChanTest(PypeTestCase): def test1_great_channel(self): """ Test example """ self.get_channel("periodic")
en
0.314678
# from pypeman.message import Message Test example
2.465531
2
src/Accunniscila/frontend/views.py
GiorgioBelli/Accunniscila
2
6621522
<filename>src/Accunniscila/frontend/views.py from django.shortcuts import render import Orders.views as order_views from Menu.models import Pizza from Utilities.views import EmptyAPIView, NoAuthAPIView, AuthAPIView # Create your views here. class IndexView(EmptyAPIView): def get(self,request): return...
<filename>src/Accunniscila/frontend/views.py from django.shortcuts import render import Orders.views as order_views from Menu.models import Pizza from Utilities.views import EmptyAPIView, NoAuthAPIView, AuthAPIView # Create your views here. class IndexView(EmptyAPIView): def get(self,request): return...
en
0.968116
# Create your views here.
2.249313
2
vnet_manager/config/validate.py
ppartarr/vnet-manager
0
6621523
from ipaddress import IPv4Interface, IPv6Interface, ip_interface from re import fullmatch from logging import getLogger from os.path import isdir, isfile, join from copy import deepcopy from vnet_manager.utils.mac import random_mac_generator from vnet_manager.conf import settings logger = getLogger(__name__) class ...
from ipaddress import IPv4Interface, IPv6Interface, ip_interface from re import fullmatch from logging import getLogger from os.path import isdir, isfile, join from copy import deepcopy from vnet_manager.utils.mac import random_mac_generator from vnet_manager.conf import settings logger = getLogger(__name__) class ...
en
0.686238
Validates the config generated by get_config() and updates some values if missing :param dict config: The config generated by get_config() This property can be called to see if any unrecoverable errors in the config have been found This property contains a updated config dict, with all values that have been fixed by th...
2.341737
2
sequences.py
chapman-cs510-2017f/cw-03-kris_ehsan_evan
0
6621524
<filename>sequences.py #!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys def fibonacci(n): count = 0 while True: try: if count >= 1: n = int(input("enter a positve integer: ")) my_list = [] a,b = 0,1 for i in range(n): ...
<filename>sequences.py #!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys def fibonacci(n): count = 0 while True: try: if count >= 1: n = int(input("enter a positve integer: ")) my_list = [] a,b = 0,1 for i in range(n): ...
en
0.068134
#!/usr/bin/env python3 # -*- coding: utf-8 -*- #print(my_list) #fibonacci(10.3333333) #fibonacci("Dw") #fibonacci(wadkvsa) #fibonacci(100)
4.135221
4
service_info_cms/templatetags/si_cms_language_tags.py
hanaahajj/Serviceinfo_hanaa
0
6621525
from django import template from django.conf import settings register = template.Library() @register.simple_tag(takes_context=True) def service_language_code(context, service): request = context['request'] return settings.SERVICE_LANGUAGE_CODES[service.lower()][request.LANGUAGE_CODE] @register.simple_tag d...
from django import template from django.conf import settings register = template.Library() @register.simple_tag(takes_context=True) def service_language_code(context, service): request = context['request'] return settings.SERVICE_LANGUAGE_CODES[service.lower()][request.LANGUAGE_CODE] @register.simple_tag d...
none
1
1.831308
2
tckdb/backend/app/schemas/trans.py
TCKDB/TCKDB
2
6621526
""" TCKDB backend app schemas energy transfer (trans) module """ from enum import Enum from typing import Dict, Optional, Tuple, Union from pydantic import BaseModel, Field, validator class TransModelEnum(str, Enum): """ The supported Trans models """ single_exponential_down = 'Single Exponential Do...
""" TCKDB backend app schemas energy transfer (trans) module """ from enum import Enum from typing import Dict, Optional, Tuple, Union from pydantic import BaseModel, Field, validator class TransModelEnum(str, Enum): """ The supported Trans models """ single_exponential_down = 'Single Exponential Do...
en
0.716901
TCKDB backend app schemas energy transfer (trans) module The supported Trans models A TransBase class (shared properties) Trans.reviewer_flags validator Trans.parameters validator Create a Trans item: Properties to receive on item creation Update a Trans item: Properties to receive on item update Properties shared by m...
2.42363
2
Python/Ex049.py
EspagueteTV/Meus-Estudos-CursoEmVideo
0
6621527
n = int(input('Informe um número para ver a sua tabuada: ')) for i in range(0, 11): print('{} x {:2} = {}'.format(n, i, n * i))
n = int(input('Informe um número para ver a sua tabuada: ')) for i in range(0, 11): print('{} x {:2} = {}'.format(n, i, n * i))
none
1
3.937096
4
sensor_correction/apps/train.py
cheind/rgbd-correction
15
6621528
__author__ = '<NAME>' __copyright__ = 'Copyright 2017, Profactor GmbH' __license__ = 'BSD' import glob import os import numpy as np import matplotlib.pyplot as plt from sensor_correction.utils import sensor_unproject from sensor_correction.gp_cpu import GPRegressor def select_data(temps, poses, all_depths_ir, all_de...
__author__ = '<NAME>' __copyright__ = 'Copyright 2017, Profactor GmbH' __license__ = 'BSD' import glob import os import numpy as np import matplotlib.pyplot as plt from sensor_correction.utils import sensor_unproject from sensor_correction.gp_cpu import GPRegressor def select_data(temps, poses, all_depths_ir, all_de...
en
0.106481
# Actual plt.imshow(depth_rgb - depth_ir) plt.plot(xy[:,0][mask], xy[:,1][mask], 'k+') plt.colorbar() plt.show() # Load depth data # Load intrinsics # Create train and test data
2.349477
2
TM1py/Services/DimensionService.py
lotsaram/TM1py
0
6621529
# -*- coding: utf-8 -*- import json from TM1py.Exceptions import TM1pyException from TM1py.Objects.Dimension import Dimension from TM1py.Services.ObjectService import ObjectService from TM1py.Services.SubsetService import SubsetService from TM1py.Services.HierarchyService import HierarchyService class DimensionSer...
# -*- coding: utf-8 -*- import json from TM1py.Exceptions import TM1pyException from TM1py.Objects.Dimension import Dimension from TM1py.Services.ObjectService import ObjectService from TM1py.Services.SubsetService import SubsetService from TM1py.Services.HierarchyService import HierarchyService class DimensionSer...
en
0.721588
# -*- coding: utf-8 -*- Service to handle Object Updates for TM1 Dimensions create a dimension :param dimension: instance of TM1py.Dimension :return: response # If Dimension exists. throw Exception # If not all subsequent calls successfull -> undo everything that has been done in this function # create...
2.445708
2
epyseg/draw/shapes/ellipse2d.py
jo-mueller/EPySeg
14
6621530
from PyQt5 import QtWidgets from PyQt5.QtCore import QPoint, QPointF, Qt, QRectF from PyQt5.QtGui import QBrush, QPen, QColor, QTransform from epyseg.tools.logger import TA_logger logger = TA_logger() class Ellipse2D(QtWidgets.QGraphicsEllipseItem): isSet = False def __init__(self, *args, color=0xFFFF00, f...
from PyQt5 import QtWidgets from PyQt5.QtCore import QPoint, QPointF, Qt, QRectF from PyQt5.QtGui import QBrush, QPen, QColor, QTransform from epyseg.tools.logger import TA_logger logger = TA_logger() class Ellipse2D(QtWidgets.QGraphicsEllipseItem): isSet = False def __init__(self, *args, color=0xFFFF00, f...
en
0.556848
# rotation allows lines to be dashed or dotted or have custom pattern :param style: a list of numbers or any of the following Qt.SolidLine, Qt.DashLine, Qt.DashDotLine, Qt.DotLine, Qt.DashDotDotLine but not Qt.CustomDashLine, Qt.CustomDashLine is assumed by default if a list is passed in. None is also a valid ...
2.738286
3
fastreg/testing.py
fmcetin/fastreg
34
6621531
<gh_stars>10-100 import numpy as np import pandas as pd from . import linear from .formula import I, R, C # true parameters params0 = { 'I': 0.1, 'x1': 0.3, 'x2': 0.6, 'id1': 1.0, 'id2': 1.0, 'sigma': 1.0, 'pz': 0.2, 'alpha': 0.3 } # poisson dampening pfact = 100 # default specificat...
import numpy as np import pandas as pd from . import linear from .formula import I, R, C # true parameters params0 = { 'I': 0.1, 'x1': 0.3, 'x2': 0.6, 'id1': 1.0, 'id2': 1.0, 'sigma': 1.0, 'pz': 0.2, 'alpha': 0.3 } # poisson dampening pfact = 100 # default specification default_x = I...
en
0.362519
# true parameters # poisson dampening # default specification # good negbin in terms of mean and overdispersion (var = m + alpha*m^2) # init random # core regressors # predictors # linear # logit # poisson # zero-inflated poisson # negative binomial # zero-inflated poisson # inferred ranges # plot estimates
2.427204
2
pyh3lib/tests/test_multipart.py
dimosarvanitakis/H3
10
6621532
<gh_stars>1-10 # Copyright [2019] [FORTH-ICS] # # 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 agree...
# Copyright [2019] [FORTH-ICS] # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
en
0.861314
# Copyright [2019] [FORTH-ICS] # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
2.157727
2
vk.py
Kwentar/ImageDownloader
2
6621533
import json import random from urllib.error import URLError from urllib.parse import urlencode from urllib.request import urlopen, http, Request import time from datetime import date from Profiler import Profiler import __setup_photo__ as setup class VkError(Exception): def __init__(self, value): self.val...
import json import random from urllib.error import URLError from urllib.parse import urlencode from urllib.request import urlopen, http, Request import time from datetime import date from Profiler import Profiler import __setup_photo__ as setup class VkError(Exception): def __init__(self, value): self.val...
en
0.651787
# Vk.call_api(method, params) Count more than 1000, count = {}, age = {}, month = {}, day = {}
2.679518
3
twitter/credentials.py
eferrares/codeinquero
1
6621534
CONSUMER_KEY = 'q8hG77NeTRXu4ldDyZb8kjw4S' CONSUMER_SECRET = '<KEY>' ACCESS_TOKEN = '<KEY>' ACCESS_TOKEN_SECRET = '<KEY>'
CONSUMER_KEY = 'q8hG77NeTRXu4ldDyZb8kjw4S' CONSUMER_SECRET = '<KEY>' ACCESS_TOKEN = '<KEY>' ACCESS_TOKEN_SECRET = '<KEY>'
none
1
1.002039
1
python/learning/sample_03.py
erisky/my_practices
0
6621535
<reponame>erisky/my_practices #!/usr/bin/env python import sys #tmp = sys.stdout #sys.stdout = open('output.txt', 'a') # variable number of arguments def min1(*args): res = args[0] for val in args[1:]: if (res > val): res = val return res print min1(1,2,3,4,5) print min1('a', 'b')...
#!/usr/bin/env python import sys #tmp = sys.stdout #sys.stdout = open('output.txt', 'a') # variable number of arguments def min1(*args): res = args[0] for val in args[1:]: if (res > val): res = val return res print min1(1,2,3,4,5) print min1('a', 'b') print min1('12321', '1efwef')...
en
0.270844
#!/usr/bin/env python #tmp = sys.stdout #sys.stdout = open('output.txt', 'a') # variable number of arguments #lambda -- easier format of function #ex # apply function, something useful when make use of function pointer of C # map function
3.952479
4
gluetool_modules_framework/tests/test_coldstore.py
testing-farm/gluetool-modules
0
6621536
# Copyright Contributors to the Testing Farm project. # SPDX-License-Identifier: Apache-2.0 import logging import pytest from mock import MagicMock import gluetool_modules_framework.helpers.coldstore from . import create_module, patch_shared, check_loadable @pytest.fixture(name='module') def fixture_module(): ...
# Copyright Contributors to the Testing Farm project. # SPDX-License-Identifier: Apache-2.0 import logging import pytest from mock import MagicMock import gluetool_modules_framework.helpers.coldstore from . import create_module, patch_shared, check_loadable @pytest.fixture(name='module') def fixture_module(): ...
en
0.55216
# Copyright Contributors to the Testing Farm project. # SPDX-License-Identifier: Apache-2.0
1.84635
2
pobalog/text_area_detection.py
select766/PoBaLog
0
6621537
<reponame>select766/PoBaLog """ 文字の面積を検出する """ import numpy as np import cv2 class TextAreaDetection: def __init__(self, rectangle, threshold): """ :param rectangle: 対象領域の上、下、左、右の座標 :param threshold: 明るさ閾値(0~255,これ以下が文字とみなされる) """ self.rectangle = rectangle self.t...
""" 文字の面積を検出する """ import numpy as np import cv2 class TextAreaDetection: def __init__(self, rectangle, threshold): """ :param rectangle: 対象領域の上、下、左、右の座標 :param threshold: 明るさ閾値(0~255,これ以下が文字とみなされる) """ self.rectangle = rectangle self.threshold = threshold de...
ja
0.986953
文字の面積を検出する :param rectangle: 対象領域の上、下、左、右の座標 :param threshold: 明るさ閾値(0~255,これ以下が文字とみなされる)
3.258983
3
migrations/versions/fe743605e1a_remove_repositoryoption.py
vault-the/changes
443
6621538
"""Remove RepositoryOption Revision ID: fe743605e1a Revises: <PASSWORD> Create Date: 2014-09-17 15:17:09.925681 """ # revision identifiers, used by Alembic. revision = 'fe743605e1a' down_revision = '<PASSWORD>' from alembic import op def upgrade(): op.drop_table('repositoryoption') def downgrade(): rais...
"""Remove RepositoryOption Revision ID: fe743605e1a Revises: <PASSWORD> Create Date: 2014-09-17 15:17:09.925681 """ # revision identifiers, used by Alembic. revision = 'fe743605e1a' down_revision = '<PASSWORD>' from alembic import op def upgrade(): op.drop_table('repositoryoption') def downgrade(): rais...
en
0.428106
Remove RepositoryOption Revision ID: fe743605e1a Revises: <PASSWORD> Create Date: 2014-09-17 15:17:09.925681 # revision identifiers, used by Alembic.
0.925398
1
my_test/Net.py
RuoyuX-2018/6998DL
0
6621539
import cv2 import os import torch import torchvision from torchvision import transforms, utils import matplotlib.pyplot as plt import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.autograd import Variable class Net(nn.Module): def __init__(self): super(N...
import cv2 import os import torch import torchvision from torchvision import transforms, utils import matplotlib.pyplot as plt import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.autograd import Variable class Net(nn.Module): def __init__(self): super(N...
en
0.298467
#torch.nn.Linear(4096, 1024), #torch.nn.ReLU(), # training----------------------------- # evaluation-------------------------------- #torch.save(model, "CNN_model")
2.915636
3
jurisdictions/canada/can_financial_scrape.py
DiarmuidM/charity-dissolution
0
6621540
<filename>jurisdictions/canada/can_financial_scrape.py ## Python script to download financial data ## of Canadian charities from the CRA website # <NAME>, <NAME> # Created: 17 May 2018 # Last edited: captured in Github file history import csv import requests import os import os.path import errno import zipfile impor...
<filename>jurisdictions/canada/can_financial_scrape.py ## Python script to download financial data ## of Canadian charities from the CRA website # <NAME>, <NAME> # Created: 17 May 2018 # Last edited: captured in Github file history import csv import requests import os import os.path import errno import zipfile impor...
en
0.850296
## Python script to download financial data ## of Canadian charities from the CRA website # <NAME>, <NAME> # Created: 17 May 2018 # Last edited: captured in Github file history #prob dont need basic info or B #in A need question 2 as it's the dependant - make a note of this in the markdown # grab the links to the sced...
2.964407
3
covid/dashboard.py
jgdelrio/covid-data
0
6621541
import dash import dash_core_components as dcc import dash_html_components as html from covid.data_manager import global_data external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css'] app = dash.Dash(__name__, external_stylesheets=external_stylesheets) colors = { 'background': '#111111', 'text':...
import dash import dash_core_components as dcc import dash_html_components as html from covid.data_manager import global_data external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css'] app = dash.Dash(__name__, external_stylesheets=external_stylesheets) colors = { 'background': '#111111', 'text':...
en
0.303264
Generates an HTML table from a pandas dataframe with the number of rows specified
2.734759
3
Action_CNN.py
adewopova/Demonstration-Repo-GAGS
0
6621542
<reponame>adewopova/Demonstration-Repo-GAGS<filename>Action_CNN.py #!/usr/bin/env python # coding: utf-8 # # Training a ConvNet PyTorch # # In this notebook, you'll learn how to use the powerful PyTorch framework to specify a conv net architecture and train it on the human action recognition dataset. # # In[30]: ...
#!/usr/bin/env python # coding: utf-8 # # Training a ConvNet PyTorch # # In this notebook, you'll learn how to use the powerful PyTorch framework to specify a conv net architecture and train it on the human action recognition dataset. # # In[30]: #ip install -r requirements.txt # In[1]: import torch import t...
en
0.796817
#!/usr/bin/env python # coding: utf-8 # # Training a ConvNet PyTorch # # In this notebook, you'll learn how to use the powerful PyTorch framework to specify a conv net architecture and train it on the human action recognition dataset. # # In[30]: #ip install -r requirements.txt # In[1]: # ## What's this PyTorch busines...
4.100268
4
djangophysics/units/migrations/0008_auto_20210603_2248.py
fmeurou/django-physics
1
6621543
<reponame>fmeurou/django-physics # Generated by Django 3.2.3 on 2021-06-03 22:48 from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('units', '0007_customdime...
# Generated by Django 3.2.3 on 2021-06-03 22:48 from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('units', '0007_customdimension'), ] operations = ...
en
0.876073
# Generated by Django 3.2.3 on 2021-06-03 22:48
1.696179
2
Lab10/checkpoint5.py
demsks/CSCI2961
0
6621544
<filename>Lab10/checkpoint5.py from pymongo import MongoClient from random import randint import datetime client = MongoClient() db = client.csci2963 definitions = db.definitions def random_word_requester(): total = definitions.count() index = randint(0, total) target = definitions.find()[index...
<filename>Lab10/checkpoint5.py from pymongo import MongoClient from random import randint import datetime client = MongoClient() db = client.csci2963 definitions = db.definitions def random_word_requester(): total = definitions.count() index = randint(0, total) target = definitions.find()[index...
none
1
2.563196
3
postpy/ddl.py
portfoliome/pgdabble
24
6621545
""" ddl.py contains the Data Definition Language for Postgresql Server. """ from psycopg2.extensions import AsIs def compile_qualified_name(table: str, schema='public') -> str: """Format table's fully qualified name string.""" return '{}.{}'.format(schema, table) def compile_create_table(qualified_name: s...
""" ddl.py contains the Data Definition Language for Postgresql Server. """ from psycopg2.extensions import AsIs def compile_qualified_name(table: str, schema='public') -> str: """Format table's fully qualified name string.""" return '{}.{}'.format(schema, table) def compile_create_table(qualified_name: s...
en
0.526439
ddl.py contains the Data Definition Language for Postgresql Server. Format table's fully qualified name string. Postgresql Create Table statement formatter. CREATE TABLE {table} ({columns} {primary_keys}); Postgresql Create Temporary Table statement formatter. CREATE TEMPORARY TABLE {table} ({columns} {primary_keys}); ...
3.050603
3
use_cases/BBerliner_tests.py
czack425/openc2_schema_tests
0
6621546
<filename>use_cases/BBerliner_tests.py<gh_stars>0 """ OpenC2 Profile Use Case Command/Response Pairs from <NAME> """ import unittest from .test_setup import SetupTests, ValidationError from .utils import check_profiles_skip profile = "BBerliner" @unittest.skipIf(check_profiles_skip(profile), f"{profile} Profile tes...
<filename>use_cases/BBerliner_tests.py<gh_stars>0 """ OpenC2 Profile Use Case Command/Response Pairs from <NAME> """ import unittest from .test_setup import SetupTests, ValidationError from .utils import check_profiles_skip profile = "BBerliner" @unittest.skipIf(check_profiles_skip(profile), f"{profile} Profile tes...
en
0.628155
OpenC2 Profile Use Case Command/Response Pairs from <NAME> # Dynamic Validation Variables # Static Validation Functions
1.814135
2
RL/DQN/settings.py
ColinFred/Reinforce_Learning_Pytorch
0
6621547
<filename>RL/DQN/settings.py # hyper-parameters MEMORY_CAPACITY = 1000 C = 50 BATCH_SIZE = 32 LR = 0.01 GAMMA = 0.90 EPISILO = 0.9 TEST_EPISODE = 30
<filename>RL/DQN/settings.py # hyper-parameters MEMORY_CAPACITY = 1000 C = 50 BATCH_SIZE = 32 LR = 0.01 GAMMA = 0.90 EPISILO = 0.9 TEST_EPISODE = 30
fi
0.260391
# hyper-parameters
1.123773
1
app/migrations/0012_auto_20160315_1419.py
westos007/OMS-1
32
6621548
<reponame>westos007/OMS-1 # -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('app', '0011_network'), ] operations = [ migrations.AlterField( model_name='network', ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('app', '0011_network'), ] operations = [ migrations.AlterField( model_name='network', name='info', ...
en
0.769321
# -*- coding: utf-8 -*-
1.516918
2
evaluate.py
shgoren/ShapeWorld
1
6621549
<reponame>shgoren/ShapeWorld import argparse from datetime import datetime from importlib import import_module import json import os import sys from shapeworld import dataset, util from models.TFMacros.tf_macros import Model if __name__ == '__main__': parser = argparse.ArgumentParser(description='Evaluate a model...
import argparse from datetime import datetime from importlib import import_module import json import os import sys from shapeworld import dataset, util from models.TFMacros.tf_macros import Model if __name__ == '__main__': parser = argparse.ArgumentParser(description='Evaluate a model') parser.add_argument('...
en
0.419457
# import tensorflow # dataset # information about dataset and model # restore # no input tensors, hence None for placeholder creation # else: # training # if args.verbosity >= 1: # sys.stdout.write('{} train model...\n'.format(datetime.now().strftime('%H:%M:%S'))) # sys.stdout.flush() # before ...
2.164194
2
autoflow/feature_engineer/text/topic/lda.py
auto-flow/autoflow
49
6621550
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author : <NAME> # @Contact : <EMAIL> from autoflow.feature_engineer.text.topic.base import BaseGensim import numpy as np class LdaTransformer(BaseGensim): def __init__(self, num_topics=100, chunksize=2000, passes=1, update_every=1, alpha='symmetric', ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author : <NAME> # @Contact : <EMAIL> from autoflow.feature_engineer.text.topic.base import BaseGensim import numpy as np class LdaTransformer(BaseGensim): def __init__(self, num_topics=100, chunksize=2000, passes=1, update_every=1, alpha='symmetric', ...
fr
0.289745
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author : <NAME> # @Contact : <EMAIL>
2.332128
2